X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fudp.h;h=b60e0b4a25c41fd4cb91d333f0d001643c9cc424;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=facf661dd65a9b60876176d31f370e0f17ab6072;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/include/linux/udp.h b/include/linux/udp.h index facf661dd..b60e0b4a2 100644 --- a/include/linux/udp.h +++ b/include/linux/udp.h @@ -40,30 +40,22 @@ struct udphdr { #include #include -struct udp_opt { - int pending; /* Any pending frames ? */ - unsigned int corkflag; /* Cork is required */ - __u16 encap_type; /* Is this an Encapsulation socket? */ +struct udp_sock { + /* inet_sock has to be the first member */ + struct inet_sock inet; + int pending; /* Any pending frames ? */ + unsigned int corkflag; /* Cork is required */ + __u16 encap_type; /* Is this an Encapsulation socket? */ /* * Following member retains the infomation to create a UDP header * when the socket is uncorked. */ - __u16 len; /* total length of pending frames */ -}; - -/* WARNING: don't change the layout of the members in udp_sock! */ -struct udp_sock { - struct sock sk; -#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) - struct ipv6_pinfo *pinet6; -#endif - struct inet_opt inet; - struct udp_opt udp; + __u16 len; /* total length of pending frames */ }; -static inline struct udp_opt * udp_sk(const struct sock *__sk) +static inline struct udp_sock *udp_sk(const struct sock *sk) { - return &((struct udp_sock *)__sk)->udp; + return (struct udp_sock *)sk; } #endif