File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / igmpproxy / src / os-linux.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 17:00:29 2012 UTC (12 years, 4 months ago) by misho
Branches: igmpproxy, MAIN
CVS tags: v0_1p0, v0_1, HEAD
igmpproxy

    1: #define _LINUX_IN_H
    2: #include <linux/types.h>
    3: #include <linux/mroute.h>
    4: #include <netinet/ip.h>
    5: #include <netinet/igmp.h>
    6: 
    7: static inline u_short ip_data_len(const struct ip *ip)
    8: {
    9: 	return ntohs(ip->ip_len) - (ip->ip_hl << 2);
   10: }
   11: 
   12: static inline void ip_set_len(struct ip *ip, u_short len)
   13: {
   14: 	ip->ip_len = htons(len);
   15: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>