]> The Tcpdump Group git mirrors - tcpdump/commit
lwres: Modernize packet parsing style.
authorDenis Ovsienko <[email protected]>
Sun, 11 Oct 2020 16:56:12 +0000 (17:56 +0100)
committerDenis Ovsienko <[email protected]>
Sun, 11 Oct 2020 22:34:33 +0000 (23:34 +0100)
commit44008d07229f8a26868874a6d7d9e437f9492fcf
tree0f2496bd6270673fc0872cca0ba349a4d2ea8ca0
parentf75e3df13d59f25fcef920f6354eb205602b2208
lwres: Modernize packet parsing style.

Enable ND_LONGJMP_FROM_TCHECK. Do not return on truncation. Let the
standard macro guard the snapshot end. Add integers instead of
subtracting pointers where possible. Make functions that now never return
a negative value unsigned and lose respective checks at the calling end.
Return -1 to tell an invalid packet. In lwres_printname() just use
nd_printn(). In lwres_print() add and use a standard invalid section.
print-lwres.c