1 #ifndef IPTRAF_NG_IPFRAG_H
2 #define IPTRAF_NG_IPFRAG_H
6 ipfrag.h - IP fragmentation hander definitions
10 static inline unsigned int ipv4_frag_offset(struct iphdr
*ip
)
12 return (ntohs(ip
->frag_off
) & 0x1fff) * 8;
15 static inline int ipv4_is_first_fragment(struct iphdr
*ip
)
17 return (ntohs(ip
->frag_off
) & 0x1fff) == 0;
20 static inline int ipv4_is_fragmented(struct iphdr
*ip
)
22 return (ntohs(ip
->frag_off
) & 0x3fff) != 0;
25 static inline int ipv4_more_fragments(struct iphdr
*ip
)
27 return (ntohs(ip
->frag_off
) & 0x2000) != 0;
30 void destroyfraglist(void);
31 unsigned int processfragment(struct iphdr
*packet
, in_port_t
*sport
,
32 in_port_t
*dport
, int *firstin
);
34 #endif /* IPTRAF_NG_IPFRAG_H */