[IPX]: Trivial parts of endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Al Viro and committed by David S. Miller 4833ed09 10b1fbdb

+56 -56
+7 -7
include/linux/ipx.h
··· 7 8 struct sockaddr_ipx { 9 sa_family_t sipx_family; 10 - __u16 sipx_port; 11 - __u32 sipx_network; 12 unsigned char sipx_node[IPX_NODE_LEN]; 13 __u8 sipx_type; 14 unsigned char sipx_zero; /* 16 byte fill */ ··· 23 #define IPX_CRTITF 1 24 25 struct ipx_route_definition { 26 - __u32 ipx_network; 27 - __u32 ipx_router_network; 28 unsigned char ipx_router_node[IPX_NODE_LEN]; 29 }; 30 31 struct ipx_interface_definition { 32 - __u32 ipx_network; 33 unsigned char ipx_device[16]; 34 unsigned char ipx_dlink_type; 35 #define IPX_FRAME_NONE 0 ··· 55 */ 56 57 struct ipx_route_def { 58 - __u32 ipx_network; 59 - __u32 ipx_router_network; 60 #define IPX_ROUTE_NO_ROUTER 0 61 unsigned char ipx_router_node[IPX_NODE_LEN]; 62 unsigned char ipx_device[16];
··· 7 8 struct sockaddr_ipx { 9 sa_family_t sipx_family; 10 + __be16 sipx_port; 11 + __be32 sipx_network; 12 unsigned char sipx_node[IPX_NODE_LEN]; 13 __u8 sipx_type; 14 unsigned char sipx_zero; /* 16 byte fill */ ··· 23 #define IPX_CRTITF 1 24 25 struct ipx_route_definition { 26 + __be32 ipx_network; 27 + __be32 ipx_router_network; 28 unsigned char ipx_router_node[IPX_NODE_LEN]; 29 }; 30 31 struct ipx_interface_definition { 32 + __be32 ipx_network; 33 unsigned char ipx_device[16]; 34 unsigned char ipx_dlink_type; 35 #define IPX_FRAME_NONE 0 ··· 55 */ 56 57 struct ipx_route_def { 58 + __be32 ipx_network; 59 + __be32 ipx_router_network; 60 #define IPX_ROUTE_NO_ROUTER 0 61 unsigned char ipx_router_node[IPX_NODE_LEN]; 62 unsigned char ipx_device[16];
+11 -11
include/net/ipx.h
··· 15 #include <linux/list.h> 16 17 struct ipx_address { 18 - __u32 net; 19 __u8 node[IPX_NODE_LEN]; 20 - __u16 sock; 21 }; 22 23 #define ipx_broadcast_node "\377\377\377\377\377\377" ··· 28 struct ipxhdr { 29 __u16 ipx_checksum __attribute__ ((packed)); 30 #define IPX_NO_CHECKSUM 0xFFFF 31 - __u16 ipx_pktsize __attribute__ ((packed)); 32 __u8 ipx_tctrl; 33 __u8 ipx_type; 34 #define IPX_TYPE_UNKNOWN 0x00 ··· 48 49 struct ipx_interface { 50 /* IPX address */ 51 - __u32 if_netnum; 52 unsigned char if_node[IPX_NODE_LEN]; 53 atomic_t refcnt; 54 55 /* physical device info */ 56 struct net_device *if_dev; 57 struct datalink_proto *if_dlink; 58 - unsigned short if_dlink_type; 59 60 /* socket support */ 61 unsigned short if_sknum; ··· 71 }; 72 73 struct ipx_route { 74 - __u32 ir_net; 75 struct ipx_interface *ir_intrfc; 76 unsigned char ir_routed; 77 unsigned char ir_router_node[IPX_NODE_LEN]; ··· 82 #ifdef __KERNEL__ 83 struct ipx_cb { 84 u8 ipx_tctrl; 85 - u32 ipx_dest_net; 86 - u32 ipx_source_net; 87 struct { 88 - u32 netnum; 89 int index; 90 } last_hop; 91 }; ··· 97 struct sock sk; 98 struct ipx_address dest_addr; 99 struct ipx_interface *intrfc; 100 - unsigned short port; 101 #ifdef CONFIG_IPX_INTERN 102 unsigned char node[IPX_NODE_LEN]; 103 #endif ··· 132 extern int ipx_proc_init(void); 133 extern void ipx_proc_exit(void); 134 135 - extern const char *ipx_frame_name(unsigned short); 136 extern const char *ipx_device_name(struct ipx_interface *intrfc); 137 138 static __inline__ void ipxitf_hold(struct ipx_interface *intrfc)
··· 15 #include <linux/list.h> 16 17 struct ipx_address { 18 + __be32 net; 19 __u8 node[IPX_NODE_LEN]; 20 + __be16 sock; 21 }; 22 23 #define ipx_broadcast_node "\377\377\377\377\377\377" ··· 28 struct ipxhdr { 29 __u16 ipx_checksum __attribute__ ((packed)); 30 #define IPX_NO_CHECKSUM 0xFFFF 31 + __be16 ipx_pktsize __attribute__ ((packed)); 32 __u8 ipx_tctrl; 33 __u8 ipx_type; 34 #define IPX_TYPE_UNKNOWN 0x00 ··· 48 49 struct ipx_interface { 50 /* IPX address */ 51 + __be32 if_netnum; 52 unsigned char if_node[IPX_NODE_LEN]; 53 atomic_t refcnt; 54 55 /* physical device info */ 56 struct net_device *if_dev; 57 struct datalink_proto *if_dlink; 58 + __be16 if_dlink_type; 59 60 /* socket support */ 61 unsigned short if_sknum; ··· 71 }; 72 73 struct ipx_route { 74 + __be32 ir_net; 75 struct ipx_interface *ir_intrfc; 76 unsigned char ir_routed; 77 unsigned char ir_router_node[IPX_NODE_LEN]; ··· 82 #ifdef __KERNEL__ 83 struct ipx_cb { 84 u8 ipx_tctrl; 85 + __be32 ipx_dest_net; 86 + __be32 ipx_source_net; 87 struct { 88 + __be32 netnum; 89 int index; 90 } last_hop; 91 }; ··· 97 struct sock sk; 98 struct ipx_address dest_addr; 99 struct ipx_interface *intrfc; 100 + __be16 port; 101 #ifdef CONFIG_IPX_INTERN 102 unsigned char node[IPX_NODE_LEN]; 103 #endif ··· 132 extern int ipx_proc_init(void); 133 extern void ipx_proc_exit(void); 134 135 + extern const char *ipx_frame_name(__be16); 136 extern const char *ipx_device_name(struct ipx_interface *intrfc); 137 138 static __inline__ void ipxitf_hold(struct ipx_interface *intrfc)
+27 -27
net/ipx/af_ipx.c
··· 83 struct ipx_interface *ipx_primary_net; 84 struct ipx_interface *ipx_internal_net; 85 86 - extern int ipxrtr_add_route(__u32 network, struct ipx_interface *intrfc, 87 unsigned char *node); 88 extern void ipxrtr_del_routes(struct ipx_interface *intrfc); 89 extern int ipxrtr_route_packet(struct sock *sk, struct sockaddr_ipx *usipx, 90 struct iovec *iov, int len, int noblock); 91 extern int ipxrtr_route_skb(struct sk_buff *skb); 92 - extern struct ipx_route *ipxrtr_lookup(__u32 net); 93 extern int ipxrtr_ioctl(unsigned int cmd, void __user *arg); 94 95 #undef IPX_REFCNT_DEBUG ··· 177 } 178 179 static struct ipx_interface *__ipxitf_find_using_phys(struct net_device *dev, 180 - unsigned short datalink) 181 { 182 struct ipx_interface *i; 183 ··· 190 } 191 192 static struct ipx_interface *ipxitf_find_using_phys(struct net_device *dev, 193 - unsigned short datalink) 194 { 195 struct ipx_interface *i; 196 ··· 202 return i; 203 } 204 205 - struct ipx_interface *ipxitf_find_using_net(__u32 net) 206 { 207 struct ipx_interface *i; 208 ··· 237 238 /* caller must hold intrfc->if_sklist_lock */ 239 static struct sock *__ipxitf_find_socket(struct ipx_interface *intrfc, 240 - unsigned short port) 241 { 242 struct sock *s; 243 struct hlist_node *node; ··· 252 253 /* caller must hold a reference to intrfc */ 254 static struct sock *ipxitf_find_socket(struct ipx_interface *intrfc, 255 - unsigned short port) 256 { 257 struct sock *s; 258 ··· 268 #ifdef CONFIG_IPX_INTERN 269 static struct sock *ipxitf_find_internal_socket(struct ipx_interface *intrfc, 270 unsigned char *ipx_node, 271 - unsigned short port) 272 { 273 struct sock *s; 274 struct hlist_node *node; ··· 600 601 /* see if we need to include the netnum in the route list */ 602 if (IPX_SKB_CB(skb)->last_hop.index >= 0) { 603 - u32 *last_hop = (u32 *)(((u8 *) skb->data) + 604 sizeof(struct ipxhdr) + 605 IPX_SKB_CB(skb)->last_hop.index * 606 - sizeof(u32)); 607 *last_hop = IPX_SKB_CB(skb)->last_hop.netnum; 608 IPX_SKB_CB(skb)->last_hop.index = -1; 609 } ··· 772 } else { 773 printk(KERN_WARNING "IPX: Network number collision " 774 "%lx\n %s %s and %s %s\n", 775 - (unsigned long) htonl(cb->ipx_source_net), 776 ipx_device_name(i), 777 ipx_frame_name(i->if_dlink_type), 778 ipx_device_name(intrfc), ··· 812 int i, rc = -EINVAL; 813 struct ipx_interface *ifcs; 814 char *c; 815 - u32 *l; 816 817 /* Illegal packet - too many hops or too short */ 818 /* We decide to throw it away: no broadcasting, no local processing. ··· 833 goto out; 834 835 c = ((u8 *) ipx) + sizeof(struct ipxhdr); 836 - l = (u32 *) c; 837 838 /* Don't broadcast packet if already seen this net */ 839 for (i = 0; i < IPX_SKB_CB(skb)->ipx_tctrl; i++) ··· 855 /* That aren't in the list */ 856 if (ifcs == intrfc) 857 continue; 858 - l = (__u32 *) c; 859 /* don't consider the last entry in the packet list, 860 * it is our netnum, and it is not there yet */ 861 for (i = 0; i < IPX_SKB_CB(skb)->ipx_tctrl; i++) ··· 885 ipx_primary_net = intrfc; 886 } 887 888 - static struct ipx_interface *ipxitf_alloc(struct net_device *dev, __u32 netnum, 889 - unsigned short dlink_type, 890 struct datalink_proto *dlink, 891 unsigned char internal, 892 int ipx_offset) ··· 960 static int ipxitf_create(struct ipx_interface_definition *idef) 961 { 962 struct net_device *dev; 963 - unsigned short dlink_type = 0; 964 struct datalink_proto *datalink = NULL; 965 struct ipx_interface *intrfc; 966 int rc; ··· 1073 static int ipxitf_delete(struct ipx_interface_definition *idef) 1074 { 1075 struct net_device *dev = NULL; 1076 - unsigned short dlink_type = 0; 1077 struct ipx_interface *intrfc; 1078 int rc = 0; 1079 ··· 1110 } 1111 1112 static struct ipx_interface *ipxitf_auto_create(struct net_device *dev, 1113 - unsigned short dlink_type) 1114 { 1115 struct ipx_interface *intrfc = NULL; 1116 struct datalink_proto *datalink; ··· 1122 if (dev->addr_len > IPX_NODE_LEN) 1123 goto out; 1124 1125 - switch (htons(dlink_type)) { 1126 case ETH_P_IPX: datalink = pEII_datalink; break; 1127 case ETH_P_802_2: datalink = p8022_datalink; break; 1128 case ETH_P_SNAP: datalink = pSNAP_datalink; break; ··· 1266 return ~sum; 1267 } 1268 1269 - const char *ipx_frame_name(unsigned short frame) 1270 { 1271 char* rc = "None"; 1272 ··· 1401 1402 /* caller must hold a reference to intrfc */ 1403 1404 - static unsigned short ipx_first_free_socketnum(struct ipx_interface *intrfc) 1405 { 1406 unsigned short socketNum = intrfc->if_sknum; 1407 ··· 1410 if (socketNum < IPX_MIN_EPHEMERAL_SOCKET) 1411 socketNum = IPX_MIN_EPHEMERAL_SOCKET; 1412 1413 - while (__ipxitf_find_socket(intrfc, ntohs(socketNum))) 1414 if (socketNum > IPX_MAX_EPHEMERAL_SOCKET) 1415 socketNum = IPX_MIN_EPHEMERAL_SOCKET; 1416 else ··· 1419 spin_unlock_bh(&intrfc->if_sklist_lock); 1420 intrfc->if_sknum = socketNum; 1421 1422 - return ntohs(socketNum); 1423 } 1424 1425 static int ipx_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) ··· 1473 ipxs->port)) { 1474 SOCK_DEBUG(sk, 1475 "IPX: bind failed because port %X in use.\n", 1476 - ntohs((int)addr->sipx_port)); 1477 goto out_put; 1478 } 1479 } else { ··· 1488 if (ipxitf_find_socket(intrfc, addr->sipx_port)) { 1489 SOCK_DEBUG(sk, 1490 "IPX: bind failed because port %X in use.\n", 1491 - ntohs((int)addr->sipx_port)); 1492 goto out_put; 1493 } 1494 } ··· 1665 intrfc = ipxitf_find_using_phys(dev, pt->type); 1666 if (!intrfc) { 1667 if (ipxcfg_auto_create_interfaces && 1668 - ntohl(IPX_SKB_CB(skb)->ipx_dest_net)) { 1669 intrfc = ipxitf_auto_create(dev, pt->type); 1670 if (intrfc) 1671 ipxitf_hold(intrfc);
··· 83 struct ipx_interface *ipx_primary_net; 84 struct ipx_interface *ipx_internal_net; 85 86 + extern int ipxrtr_add_route(__be32 network, struct ipx_interface *intrfc, 87 unsigned char *node); 88 extern void ipxrtr_del_routes(struct ipx_interface *intrfc); 89 extern int ipxrtr_route_packet(struct sock *sk, struct sockaddr_ipx *usipx, 90 struct iovec *iov, int len, int noblock); 91 extern int ipxrtr_route_skb(struct sk_buff *skb); 92 + extern struct ipx_route *ipxrtr_lookup(__be32 net); 93 extern int ipxrtr_ioctl(unsigned int cmd, void __user *arg); 94 95 #undef IPX_REFCNT_DEBUG ··· 177 } 178 179 static struct ipx_interface *__ipxitf_find_using_phys(struct net_device *dev, 180 + __be16 datalink) 181 { 182 struct ipx_interface *i; 183 ··· 190 } 191 192 static struct ipx_interface *ipxitf_find_using_phys(struct net_device *dev, 193 + __be16 datalink) 194 { 195 struct ipx_interface *i; 196 ··· 202 return i; 203 } 204 205 + struct ipx_interface *ipxitf_find_using_net(__be32 net) 206 { 207 struct ipx_interface *i; 208 ··· 237 238 /* caller must hold intrfc->if_sklist_lock */ 239 static struct sock *__ipxitf_find_socket(struct ipx_interface *intrfc, 240 + __be16 port) 241 { 242 struct sock *s; 243 struct hlist_node *node; ··· 252 253 /* caller must hold a reference to intrfc */ 254 static struct sock *ipxitf_find_socket(struct ipx_interface *intrfc, 255 + __be16 port) 256 { 257 struct sock *s; 258 ··· 268 #ifdef CONFIG_IPX_INTERN 269 static struct sock *ipxitf_find_internal_socket(struct ipx_interface *intrfc, 270 unsigned char *ipx_node, 271 + __be16 port) 272 { 273 struct sock *s; 274 struct hlist_node *node; ··· 600 601 /* see if we need to include the netnum in the route list */ 602 if (IPX_SKB_CB(skb)->last_hop.index >= 0) { 603 + __be32 *last_hop = (__be32 *)(((u8 *) skb->data) + 604 sizeof(struct ipxhdr) + 605 IPX_SKB_CB(skb)->last_hop.index * 606 + sizeof(__be32)); 607 *last_hop = IPX_SKB_CB(skb)->last_hop.netnum; 608 IPX_SKB_CB(skb)->last_hop.index = -1; 609 } ··· 772 } else { 773 printk(KERN_WARNING "IPX: Network number collision " 774 "%lx\n %s %s and %s %s\n", 775 + (unsigned long) ntohl(cb->ipx_source_net), 776 ipx_device_name(i), 777 ipx_frame_name(i->if_dlink_type), 778 ipx_device_name(intrfc), ··· 812 int i, rc = -EINVAL; 813 struct ipx_interface *ifcs; 814 char *c; 815 + __be32 *l; 816 817 /* Illegal packet - too many hops or too short */ 818 /* We decide to throw it away: no broadcasting, no local processing. ··· 833 goto out; 834 835 c = ((u8 *) ipx) + sizeof(struct ipxhdr); 836 + l = (__be32 *) c; 837 838 /* Don't broadcast packet if already seen this net */ 839 for (i = 0; i < IPX_SKB_CB(skb)->ipx_tctrl; i++) ··· 855 /* That aren't in the list */ 856 if (ifcs == intrfc) 857 continue; 858 + l = (__be32 *) c; 859 /* don't consider the last entry in the packet list, 860 * it is our netnum, and it is not there yet */ 861 for (i = 0; i < IPX_SKB_CB(skb)->ipx_tctrl; i++) ··· 885 ipx_primary_net = intrfc; 886 } 887 888 + static struct ipx_interface *ipxitf_alloc(struct net_device *dev, __be32 netnum, 889 + __be16 dlink_type, 890 struct datalink_proto *dlink, 891 unsigned char internal, 892 int ipx_offset) ··· 960 static int ipxitf_create(struct ipx_interface_definition *idef) 961 { 962 struct net_device *dev; 963 + __be16 dlink_type = 0; 964 struct datalink_proto *datalink = NULL; 965 struct ipx_interface *intrfc; 966 int rc; ··· 1073 static int ipxitf_delete(struct ipx_interface_definition *idef) 1074 { 1075 struct net_device *dev = NULL; 1076 + __be16 dlink_type = 0; 1077 struct ipx_interface *intrfc; 1078 int rc = 0; 1079 ··· 1110 } 1111 1112 static struct ipx_interface *ipxitf_auto_create(struct net_device *dev, 1113 + __be16 dlink_type) 1114 { 1115 struct ipx_interface *intrfc = NULL; 1116 struct datalink_proto *datalink; ··· 1122 if (dev->addr_len > IPX_NODE_LEN) 1123 goto out; 1124 1125 + switch (ntohs(dlink_type)) { 1126 case ETH_P_IPX: datalink = pEII_datalink; break; 1127 case ETH_P_802_2: datalink = p8022_datalink; break; 1128 case ETH_P_SNAP: datalink = pSNAP_datalink; break; ··· 1266 return ~sum; 1267 } 1268 1269 + const char *ipx_frame_name(__be16 frame) 1270 { 1271 char* rc = "None"; 1272 ··· 1401 1402 /* caller must hold a reference to intrfc */ 1403 1404 + static __be16 ipx_first_free_socketnum(struct ipx_interface *intrfc) 1405 { 1406 unsigned short socketNum = intrfc->if_sknum; 1407 ··· 1410 if (socketNum < IPX_MIN_EPHEMERAL_SOCKET) 1411 socketNum = IPX_MIN_EPHEMERAL_SOCKET; 1412 1413 + while (__ipxitf_find_socket(intrfc, htons(socketNum))) 1414 if (socketNum > IPX_MAX_EPHEMERAL_SOCKET) 1415 socketNum = IPX_MIN_EPHEMERAL_SOCKET; 1416 else ··· 1419 spin_unlock_bh(&intrfc->if_sklist_lock); 1420 intrfc->if_sknum = socketNum; 1421 1422 + return htons(socketNum); 1423 } 1424 1425 static int ipx_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) ··· 1473 ipxs->port)) { 1474 SOCK_DEBUG(sk, 1475 "IPX: bind failed because port %X in use.\n", 1476 + ntohs(addr->sipx_port)); 1477 goto out_put; 1478 } 1479 } else { ··· 1488 if (ipxitf_find_socket(intrfc, addr->sipx_port)) { 1489 SOCK_DEBUG(sk, 1490 "IPX: bind failed because port %X in use.\n", 1491 + ntohs(addr->sipx_port)); 1492 goto out_put; 1493 } 1494 } ··· 1665 intrfc = ipxitf_find_using_phys(dev, pt->type); 1666 if (!intrfc) { 1667 if (ipxcfg_auto_create_interfaces && 1668 + IPX_SKB_CB(skb)->ipx_dest_net) { 1669 intrfc = ipxitf_auto_create(dev, pt->type); 1670 if (intrfc) 1671 ipxitf_hold(intrfc);
+6 -6
net/ipx/ipx_proc.c
··· 260 ipxs = ipx_sk(s); 261 #ifdef CONFIG_IPX_INTERN 262 seq_printf(seq, "%08lX:%02X%02X%02X%02X%02X%02X:%04X ", 263 - (unsigned long)htonl(ipxs->intrfc->if_netnum), 264 ipxs->node[0], ipxs->node[1], ipxs->node[2], ipxs->node[3], 265 - ipxs->node[4], ipxs->node[5], htons(ipxs->port)); 266 #else 267 - seq_printf(seq, "%08lX:%04X ", (unsigned long) htonl(ipxs->intrfc->if_netnum), 268 - htons(ipxs->port)); 269 #endif /* CONFIG_IPX_INTERN */ 270 if (s->sk_state != TCP_ESTABLISHED) 271 seq_printf(seq, "%-28s", "Not_Connected"); 272 else { 273 seq_printf(seq, "%08lX:%02X%02X%02X%02X%02X%02X:%04X ", 274 - (unsigned long)htonl(ipxs->dest_addr.net), 275 ipxs->dest_addr.node[0], ipxs->dest_addr.node[1], 276 ipxs->dest_addr.node[2], ipxs->dest_addr.node[3], 277 ipxs->dest_addr.node[4], ipxs->dest_addr.node[5], 278 - htons(ipxs->dest_addr.sock)); 279 } 280 281 seq_printf(seq, "%08X %08X %02X %03d\n",
··· 260 ipxs = ipx_sk(s); 261 #ifdef CONFIG_IPX_INTERN 262 seq_printf(seq, "%08lX:%02X%02X%02X%02X%02X%02X:%04X ", 263 + (unsigned long)ntohl(ipxs->intrfc->if_netnum), 264 ipxs->node[0], ipxs->node[1], ipxs->node[2], ipxs->node[3], 265 + ipxs->node[4], ipxs->node[5], ntohs(ipxs->port)); 266 #else 267 + seq_printf(seq, "%08lX:%04X ", (unsigned long) ntohl(ipxs->intrfc->if_netnum), 268 + ntohs(ipxs->port)); 269 #endif /* CONFIG_IPX_INTERN */ 270 if (s->sk_state != TCP_ESTABLISHED) 271 seq_printf(seq, "%-28s", "Not_Connected"); 272 else { 273 seq_printf(seq, "%08lX:%02X%02X%02X%02X%02X%02X:%04X ", 274 + (unsigned long)ntohl(ipxs->dest_addr.net), 275 ipxs->dest_addr.node[0], ipxs->dest_addr.node[1], 276 ipxs->dest_addr.node[2], ipxs->dest_addr.node[3], 277 ipxs->dest_addr.node[4], ipxs->dest_addr.node[5], 278 + ntohs(ipxs->dest_addr.sock)); 279 } 280 281 seq_printf(seq, "%08X %08X %02X %03d\n",
+5 -5
net/ipx/ipx_route.c
··· 20 extern struct ipx_interface *ipx_internal_net; 21 22 extern __u16 ipx_cksum(struct ipxhdr *packet, int length); 23 - extern struct ipx_interface *ipxitf_find_using_net(__u32 net); 24 extern int ipxitf_demux_socket(struct ipx_interface *intrfc, 25 struct sk_buff *skb, int copy); 26 extern int ipxitf_demux_socket(struct ipx_interface *intrfc, 27 struct sk_buff *skb, int copy); 28 extern int ipxitf_send(struct ipx_interface *intrfc, struct sk_buff *skb, 29 char *node); 30 - extern struct ipx_interface *ipxitf_find_using_net(__u32 net); 31 32 - struct ipx_route *ipxrtr_lookup(__u32 net) 33 { 34 struct ipx_route *r; 35 ··· 48 /* 49 * Caller must hold a reference to intrfc 50 */ 51 - int ipxrtr_add_route(__u32 network, struct ipx_interface *intrfc, 52 unsigned char *node) 53 { 54 struct ipx_route *rt; ··· 118 return rc; 119 } 120 121 - static int ipxrtr_delete(__u32 net) 122 { 123 struct ipx_route *r, *tmp; 124 int rc;
··· 20 extern struct ipx_interface *ipx_internal_net; 21 22 extern __u16 ipx_cksum(struct ipxhdr *packet, int length); 23 + extern struct ipx_interface *ipxitf_find_using_net(__be32 net); 24 extern int ipxitf_demux_socket(struct ipx_interface *intrfc, 25 struct sk_buff *skb, int copy); 26 extern int ipxitf_demux_socket(struct ipx_interface *intrfc, 27 struct sk_buff *skb, int copy); 28 extern int ipxitf_send(struct ipx_interface *intrfc, struct sk_buff *skb, 29 char *node); 30 + extern struct ipx_interface *ipxitf_find_using_net(__be32 net); 31 32 + struct ipx_route *ipxrtr_lookup(__be32 net) 33 { 34 struct ipx_route *r; 35 ··· 48 /* 49 * Caller must hold a reference to intrfc 50 */ 51 + int ipxrtr_add_route(__be32 network, struct ipx_interface *intrfc, 52 unsigned char *node) 53 { 54 struct ipx_route *rt; ··· 118 return rc; 119 } 120 121 + static int ipxrtr_delete(__be32 net) 122 { 123 struct ipx_route *r, *tmp; 124 int rc;