Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Many protocols still relevant today make use of that structure, it still has widespread use.


For the average protocol you're going to init the entire message then set into it, you don't need to fully zero fields.

This is mostly relevant to write into existing memory or memory-mapped records.


Sometimes yes, but you must also not null-terminate the strings in those cases.

And on embedded devices you are often memory constrained so you might reuse an existing structure.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: