Import 2.3.1
[davej-history.git] / include / net / ipx.h
blob2152e388bc03744b526cf8754f1ae97f2f770d1a
1 /*
2 * The following information is in its entirety obtained from:
4 * Novell 'IPX Router Specification' Version 1.10
5 * Part No. 107-000029-001
7 * Which is available from ftp.novell.com
8 */
10 #ifndef _NET_INET_IPX_H_
11 #define _NET_INET_IPX_H_
13 #include <linux/netdevice.h>
14 #include <net/datalink.h>
15 #include <linux/ipx.h>
17 typedef struct
19 __u32 net;
20 __u8 node[IPX_NODE_LEN];
21 __u16 sock;
22 } ipx_address;
24 #define ipx_broadcast_node "\377\377\377\377\377\377"
25 #define ipx_this_node "\0\0\0\0\0\0"
27 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
35 #define IPX_TYPE_RIP 0x01 /* may also be 0 */
36 #define IPX_TYPE_SAP 0x04 /* may also be 0 */
37 #define IPX_TYPE_SPX 0x05 /* SPX protocol */
38 #define IPX_TYPE_NCP 0x11 /* $lots for docs on this (SPIT) */
39 #define IPX_TYPE_PPROP 0x14 /* complicated flood fill brdcast [Not supported] */
40 ipx_address ipx_dest __attribute__ ((packed));
41 ipx_address ipx_source __attribute__ ((packed));
44 #include <net/ipxcall.h>
46 typedef struct ipx_interface {
47 /* IPX address */
48 __u32 if_netnum;
49 unsigned char if_node[IPX_NODE_LEN];
51 /* physical device info */
52 struct device *if_dev;
53 struct datalink_proto *if_dlink;
54 unsigned short if_dlink_type;
56 /* socket support */
57 unsigned short if_sknum;
58 struct sock *if_sklist;
60 /* administrative overhead */
61 int if_ipx_offset;
62 unsigned char if_internal;
63 unsigned char if_primary;
65 struct ipx_interface *if_next;
66 } ipx_interface;
68 typedef struct ipx_route {
69 __u32 ir_net;
70 ipx_interface *ir_intrfc;
71 unsigned char ir_routed;
72 unsigned char ir_router_node[IPX_NODE_LEN];
73 struct ipx_route *ir_next;
74 } ipx_route;
76 #define IPX_MIN_EPHEMERAL_SOCKET 0x4000
77 #define IPX_MAX_EPHEMERAL_SOCKET 0x7fff
79 extern int ipx_register_spx(struct proto_ops **, struct net_proto_family *);
80 extern int ipx_unregister_spx(void);
82 #endif /* def _NET_INET_IPX_H_ */