Commit Graph

9 Commits

Author SHA1 Message Date
Guy Harris
7906cae611 Use #defines rather than sizeof.
Use ForCES_HDRL, TLV_HDRL, and ILV_HDRL instead of various sizeof's, to
make it clearer what certain tests ensure are true (as, in other cases,
the #defines are subtracted from values that should be, at that point,
ensured not to be less than the #define in question).
2010-02-07 16:05:46 -08:00
Guy Harris
20194339f9 Constify a bunch of stuff. 2010-01-26 20:14:23 -08:00
Guy Harris
c404e37740 Get rid of some no-longer-necessary casts. 2010-01-26 18:45:58 -08:00
Guy Harris
12604e27a3 Use EXTRACT_16BITS and EXTRACT_32BITS to extract values from a packet.
There's no guarantee that those values are aligned on the appropriate
boundary, nor is there a guarantee that accessing misaligned values will
behave as desired.
2010-01-26 18:37:41 -08:00
Guy Harris
d033ee2f3e Squelch some int-vs-long errors. 2010-01-10 18:36:45 -08:00
Guy Harris
095439d48a Remove more non-C89 features.
No array initialization with [index] =, no // comments; some compilers
that might be used to compile tcpdump don't support them.
2010-01-10 18:23:11 -08:00
Guy Harris
64d92662c3 Don't use bitfields in on-the-wire structures.
C doesn't guarantee that bit fields will be in any particular order.
2010-01-10 17:56:49 -08:00
Guy Harris
832716b73d Fix a bunch of warnings in the ForCES printer.
Get rid of C++/C99-style comments while we're at it; some C compilers
reject them.
2010-01-10 14:16:41 -08:00
Michael Richardson
d0e01819c0 IETF FORCES protocol printer, from Jamal Hadi Salim <hadi at cyberus.ca. 2010-01-10 14:49:46 -05:00