1
2
3
4
5
6
7
8
9
10
11 #ifndef _NET_INET_IPX_H_
12 #define _NET_INET_IPX_H_
13
14 #include <linux/netdevice.h>
15 #include <linux/skbuff.h>
16 #include <net/datalink.h>
17 #include <linux/ipx.h>
18
19 typedef struct
20 {
21 unsigned long net;
22 unsigned char node[IPX_NODE_LEN];
23 unsigned short sock;
24 } ipx_address;
25
26 #define ipx_broadcast_node "\377\377\377\377\377\377"
27 #define ipx_this_node "\0\0\0\0\0\0"
28
29 typedef struct ipx_packet
30 {
31 unsigned short ipx_checksum;
32 #define IPX_NO_CHECKSUM 0xFFFF
33 unsigned short ipx_pktsize;
34 unsigned char ipx_tctrl;
35 unsigned char ipx_type;
36 #define IPX_TYPE_UNKNOWN 0x00
37 #define IPX_TYPE_RIP 0x01
38 #define IPX_TYPE_SAP 0x04
39 #define IPX_TYPE_SPX 0x05
40 #define IPX_TYPE_NCP 0x11
41 #define IPX_TYPE_PPROP 0x14
42 ipx_address ipx_dest __attribute__ ((packed));
43 ipx_address ipx_source __attribute__ ((packed));
44 } ipx_packet;
45
46
47 typedef struct sock ipx_socket;
48
49 #include <net/ipxcall.h>
50 extern int ipx_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *pt);
51 extern void ipxrtr_device_down(struct device *dev);
52
53 typedef struct ipx_interface {
54
55 unsigned long if_netnum;
56 unsigned char if_node[IPX_NODE_LEN];
57
58
59 struct device *if_dev;
60 struct datalink_proto *if_dlink;
61 unsigned short if_dlink_type;
62
63
64 unsigned short if_sknum;
65 ipx_socket *if_sklist;
66
67
68 int if_ipx_offset;
69 unsigned char if_internal;
70 unsigned char if_primary;
71
72 struct ipx_interface *if_next;
73 } ipx_interface;
74
75 typedef struct ipx_route {
76 unsigned long ir_net;
77 ipx_interface *ir_intrfc;
78 unsigned char ir_routed;
79 unsigned char ir_router_node[IPX_NODE_LEN];
80 struct ipx_route *ir_next;
81 } ipx_route;
82
83 #define IPX_MIN_EPHEMERAL_SOCKET 0x4000
84 #define IPX_MAX_EPHEMERAL_SOCKET 0x7fff
85
86 #endif