Corrected IPH_TOS() macro: returns a byte, so doesn't need htons().

This commit is contained in:
softins 2004-07-27 14:46:24 +00:00
parent 1da6c35a6d
commit 42a6fa972d

View File

@ -128,7 +128,7 @@ PACK_STRUCT_END
#define IPH_V(hdr) (ntohs((hdr)->_v_hl_tos) >> 12)
#define IPH_HL(hdr) ((ntohs((hdr)->_v_hl_tos) >> 8) & 0x0f)
#define IPH_TOS(hdr) (htons((ntohs((hdr)->_v_hl_tos) & 0xff)))
#define IPH_TOS(hdr) (ntohs((hdr)->_v_hl_tos) & 0xff)
#define IPH_LEN(hdr) ((hdr)->_len)
#define IPH_ID(hdr) ((hdr)->_id)
#define IPH_OFFSET(hdr) ((hdr)->_offset)