14 #include <arpa/inet.h>
15 #include <netinet/in.h>
28 enum { IPv4_VERSION = 4, IPv6_VERSION = 6 };
41 struct in_addr cin_addr;
49 struct in6_addr cin_addr;
53 #define CIN_PORT(sa) (sa)->cin_port
54 #define CIN_FAMILY(sa) (sa)->cin_family
55 #define CIN_LEN(sa) (sa)->cin_len
56 #define CIN_ADDR(sa) (sa)->cin_addr
57 #define CIN_CADDR(sa) (sa)->cin_addr.s_addr
60 typedef struct ip_overlay_s {
67 } __attribute__((__packed__)) ip_overlay_t;
69 typedef unsigned int seq_t;
72 typedef struct udpip_s {
75 } __attribute__((__packed__)) udpip_t;
78 typedef struct tcpip_s {
81 } __attribute__((__packed__)) tcpip_t;
93 typedef struct pkt_hdr_s {
106 typedef struct ipv4_5tuple {
114 typedef struct l3_4route_s {
119 #define IBUF_SIZE 256
121 #define INET_MASK_STRLEN 4
122 #define IP4_ADDR_STRLEN (INET_ADDRSTRLEN + INET_MASK_STRLEN)