Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _IPX_H_ |
| 2 | #define _IPX_H_ |
Mikko Rapeli | 53dc65d | 2016-08-22 20:33:21 +0200 | [diff] [blame] | 3 | #include <linux/libc-compat.h> /* for compatibility with glibc netipx/ipx.h */ |
Jaswinder Singh Rajput | d6d20f5 | 2009-01-30 21:49:07 +0530 | [diff] [blame] | 4 | #include <linux/types.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | #include <linux/sockios.h> |
| 6 | #include <linux/socket.h> |
| 7 | #define IPX_NODE_LEN 6 |
| 8 | #define IPX_MTU 576 |
| 9 | |
Mikko Rapeli | 53dc65d | 2016-08-22 20:33:21 +0200 | [diff] [blame] | 10 | #if __UAPI_DEF_SOCKADDR_IPX |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | struct sockaddr_ipx { |
Ben Hutchings | bcb949b | 2011-08-24 18:43:55 +0000 | [diff] [blame] | 12 | __kernel_sa_family_t sipx_family; |
Al Viro | 4833ed0 | 2006-11-03 00:27:06 -0800 | [diff] [blame] | 13 | __be16 sipx_port; |
| 14 | __be32 sipx_network; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | unsigned char sipx_node[IPX_NODE_LEN]; |
| 16 | __u8 sipx_type; |
| 17 | unsigned char sipx_zero; /* 16 byte fill */ |
| 18 | }; |
Mikko Rapeli | 53dc65d | 2016-08-22 20:33:21 +0200 | [diff] [blame] | 19 | #endif /* __UAPI_DEF_SOCKADDR_IPX */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | |
| 21 | /* |
| 22 | * So we can fit the extra info for SIOCSIFADDR into the address nicely |
| 23 | */ |
| 24 | #define sipx_special sipx_port |
| 25 | #define sipx_action sipx_zero |
| 26 | #define IPX_DLTITF 0 |
| 27 | #define IPX_CRTITF 1 |
| 28 | |
Mikko Rapeli | 53dc65d | 2016-08-22 20:33:21 +0200 | [diff] [blame] | 29 | #if __UAPI_DEF_IPX_ROUTE_DEFINITION |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | struct ipx_route_definition { |
Al Viro | 4833ed0 | 2006-11-03 00:27:06 -0800 | [diff] [blame] | 31 | __be32 ipx_network; |
| 32 | __be32 ipx_router_network; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | unsigned char ipx_router_node[IPX_NODE_LEN]; |
| 34 | }; |
Mikko Rapeli | 53dc65d | 2016-08-22 20:33:21 +0200 | [diff] [blame] | 35 | #endif /* __UAPI_DEF_IPX_ROUTE_DEFINITION */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | |
Mikko Rapeli | 53dc65d | 2016-08-22 20:33:21 +0200 | [diff] [blame] | 37 | #if __UAPI_DEF_IPX_INTERFACE_DEFINITION |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 38 | struct ipx_interface_definition { |
Al Viro | 4833ed0 | 2006-11-03 00:27:06 -0800 | [diff] [blame] | 39 | __be32 ipx_network; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | unsigned char ipx_device[16]; |
| 41 | unsigned char ipx_dlink_type; |
| 42 | #define IPX_FRAME_NONE 0 |
| 43 | #define IPX_FRAME_SNAP 1 |
| 44 | #define IPX_FRAME_8022 2 |
| 45 | #define IPX_FRAME_ETHERII 3 |
| 46 | #define IPX_FRAME_8023 4 |
Paul Gortmaker | d0a24a3 | 2012-05-23 04:43:45 +0000 | [diff] [blame] | 47 | #define IPX_FRAME_TR_8022 5 /* obsolete */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 48 | unsigned char ipx_special; |
| 49 | #define IPX_SPECIAL_NONE 0 |
| 50 | #define IPX_PRIMARY 1 |
| 51 | #define IPX_INTERNAL 2 |
| 52 | unsigned char ipx_node[IPX_NODE_LEN]; |
| 53 | }; |
Mikko Rapeli | 53dc65d | 2016-08-22 20:33:21 +0200 | [diff] [blame] | 54 | #endif /* __UAPI_DEF_IPX_INTERFACE_DEFINITION */ |
| 55 | |
| 56 | #if __UAPI_DEF_IPX_CONFIG_DATA |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 57 | struct ipx_config_data { |
| 58 | unsigned char ipxcfg_auto_select_primary; |
| 59 | unsigned char ipxcfg_auto_create_interfaces; |
| 60 | }; |
Mikko Rapeli | 53dc65d | 2016-08-22 20:33:21 +0200 | [diff] [blame] | 61 | #endif /* __UAPI_DEF_IPX_CONFIG_DATA */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 62 | |
| 63 | /* |
| 64 | * OLD Route Definition for backward compatibility. |
| 65 | */ |
| 66 | |
Mikko Rapeli | 53dc65d | 2016-08-22 20:33:21 +0200 | [diff] [blame] | 67 | #if __UAPI_DEF_IPX_ROUTE_DEF |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 68 | struct ipx_route_def { |
Al Viro | 4833ed0 | 2006-11-03 00:27:06 -0800 | [diff] [blame] | 69 | __be32 ipx_network; |
| 70 | __be32 ipx_router_network; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 71 | #define IPX_ROUTE_NO_ROUTER 0 |
| 72 | unsigned char ipx_router_node[IPX_NODE_LEN]; |
| 73 | unsigned char ipx_device[16]; |
| 74 | unsigned short ipx_flags; |
| 75 | #define IPX_RT_SNAP 8 |
| 76 | #define IPX_RT_8022 4 |
| 77 | #define IPX_RT_BLUEBOOK 2 |
| 78 | #define IPX_RT_ROUTED 1 |
| 79 | }; |
Mikko Rapeli | 53dc65d | 2016-08-22 20:33:21 +0200 | [diff] [blame] | 80 | #endif /* __UAPI_DEF_IPX_ROUTE_DEF */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 81 | |
| 82 | #define SIOCAIPXITFCRT (SIOCPROTOPRIVATE) |
| 83 | #define SIOCAIPXPRISLT (SIOCPROTOPRIVATE + 1) |
| 84 | #define SIOCIPXCFGDATA (SIOCPROTOPRIVATE + 2) |
| 85 | #define SIOCIPXNCPCONN (SIOCPROTOPRIVATE + 3) |
| 86 | #endif /* _IPX_H_ */ |