Various changes to header files for tcpdump.

This commit is contained in:
Philip Homburg
2005-11-09 15:43:39 +00:00
parent 6d02d10805
commit 4102a5db28
3 changed files with 16 additions and 3 deletions

View File

@@ -29,7 +29,9 @@ typedef uint8_t sa_family_t;
/* Protocols */
#define IPPROTO_IP 0 /* Dummy protocol */
#define IPPROTO_ICMP 1 /* ICMP */
#define IPPROTO_TCP 6 /* TCP */
#define IPPROTO_EGP 8 /* exterior gateway protocol */
#define IPPROTO_UDP 17 /* UDP */
/* setsockopt options at IP level */
@@ -57,4 +59,14 @@ struct ip_mreq
struct in_addr imr_interface;
};
/* Definitions that are not part of the Open Group Base Specifications */
#define IN_CLASSA(i) (((uint32_t)(i) & 0x80000000) == 0)
#define IN_CLASSA_NET 0xff000000
#define IN_CLASSB(i) (((uint32_t)(i) & 0xc0000000) == 0x80000000)
#define IN_CLASSB_NET 0xffff0000
#define IN_CLASSC(i) (((u_int32_t)(i) & 0xe0000000) == 0xc0000000)
#define IN_CLASSC_NET 0xffffff00
#endif /* _NETINET__IN_H */