X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=include%2Fnet%2Fipx.h;h=5c0cf33826c5fe7fce6bf7d480b5ec0a6855244b;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=064e5f7a41541a81d9e0cb9fd69a69c81289f352;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/include/net/ipx.h b/include/net/ipx.h index 064e5f7a4..5c0cf3382 100644 --- a/include/net/ipx.h +++ b/include/net/ipx.h @@ -90,7 +90,11 @@ struct ipx_cb { } last_hop; }; -struct ipx_opt { +#include + +struct ipx_sock { + /* struct sock has to be the first member of ipx_sock */ + struct sock sk; struct ipx_address dest_addr; struct ipx_interface *intrfc; unsigned short port; @@ -105,9 +109,14 @@ struct ipx_opt { unsigned short ipx_ncp_conn; }; -#define ipx_sk(__sk) ((struct ipx_opt *)(__sk)->sk_protinfo) +static inline struct ipx_sock *ipx_sk(struct sock *sk) +{ + return (struct ipx_sock *)sk; +} + #define IPX_SKB_CB(__skb) ((struct ipx_cb *)&((__skb)->cb[0])) #endif + #define IPX_MIN_EPHEMERAL_SOCKET 0x4000 #define IPX_MAX_EPHEMERAL_SOCKET 0x7fff @@ -139,14 +148,6 @@ static __inline__ void ipxitf_put(struct ipx_interface *intrfc) ipxitf_down(intrfc); } -extern void __ipxitf_down(struct ipx_interface *intrfc); - -static __inline__ void __ipxitf_put(struct ipx_interface *intrfc) -{ - if (atomic_dec_and_test(&intrfc->refcnt)) - __ipxitf_down(intrfc); -} - static __inline__ void ipxrtr_hold(struct ipx_route *rt) { atomic_inc(&rt->refcnt);