]>
Commit | Line | Data |
---|---|---|
6f52b16c | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
1da177e4 LT |
2 | #ifndef _IPX_H_ |
3 | #define _IPX_H_ | |
53dc65d4 | 4 | #include <linux/libc-compat.h> /* for compatibility with glibc netipx/ipx.h */ |
d6d20f54 | 5 | #include <linux/types.h> |
1da177e4 LT |
6 | #include <linux/sockios.h> |
7 | #include <linux/socket.h> | |
8 | #define IPX_NODE_LEN 6 | |
9 | #define IPX_MTU 576 | |
10 | ||
53dc65d4 | 11 | #if __UAPI_DEF_SOCKADDR_IPX |
1da177e4 | 12 | struct sockaddr_ipx { |
bcb949b8 | 13 | __kernel_sa_family_t sipx_family; |
4833ed09 AV |
14 | __be16 sipx_port; |
15 | __be32 sipx_network; | |
1da177e4 LT |
16 | unsigned char sipx_node[IPX_NODE_LEN]; |
17 | __u8 sipx_type; | |
18 | unsigned char sipx_zero; /* 16 byte fill */ | |
19 | }; | |
53dc65d4 | 20 | #endif /* __UAPI_DEF_SOCKADDR_IPX */ |
1da177e4 LT |
21 | |
22 | /* | |
23 | * So we can fit the extra info for SIOCSIFADDR into the address nicely | |
24 | */ | |
25 | #define sipx_special sipx_port | |
26 | #define sipx_action sipx_zero | |
27 | #define IPX_DLTITF 0 | |
28 | #define IPX_CRTITF 1 | |
29 | ||
53dc65d4 | 30 | #if __UAPI_DEF_IPX_ROUTE_DEFINITION |
1da177e4 | 31 | struct ipx_route_definition { |
4833ed09 AV |
32 | __be32 ipx_network; |
33 | __be32 ipx_router_network; | |
1da177e4 LT |
34 | unsigned char ipx_router_node[IPX_NODE_LEN]; |
35 | }; | |
53dc65d4 | 36 | #endif /* __UAPI_DEF_IPX_ROUTE_DEFINITION */ |
1da177e4 | 37 | |
53dc65d4 | 38 | #if __UAPI_DEF_IPX_INTERFACE_DEFINITION |
1da177e4 | 39 | struct ipx_interface_definition { |
4833ed09 | 40 | __be32 ipx_network; |
1da177e4 LT |
41 | unsigned char ipx_device[16]; |
42 | unsigned char ipx_dlink_type; | |
43 | #define IPX_FRAME_NONE 0 | |
44 | #define IPX_FRAME_SNAP 1 | |
45 | #define IPX_FRAME_8022 2 | |
46 | #define IPX_FRAME_ETHERII 3 | |
47 | #define IPX_FRAME_8023 4 | |
d0a24a35 | 48 | #define IPX_FRAME_TR_8022 5 /* obsolete */ |
1da177e4 LT |
49 | unsigned char ipx_special; |
50 | #define IPX_SPECIAL_NONE 0 | |
51 | #define IPX_PRIMARY 1 | |
52 | #define IPX_INTERNAL 2 | |
53 | unsigned char ipx_node[IPX_NODE_LEN]; | |
54 | }; | |
53dc65d4 MR |
55 | #endif /* __UAPI_DEF_IPX_INTERFACE_DEFINITION */ |
56 | ||
57 | #if __UAPI_DEF_IPX_CONFIG_DATA | |
1da177e4 LT |
58 | struct ipx_config_data { |
59 | unsigned char ipxcfg_auto_select_primary; | |
60 | unsigned char ipxcfg_auto_create_interfaces; | |
61 | }; | |
53dc65d4 | 62 | #endif /* __UAPI_DEF_IPX_CONFIG_DATA */ |
1da177e4 LT |
63 | |
64 | /* | |
65 | * OLD Route Definition for backward compatibility. | |
66 | */ | |
67 | ||
53dc65d4 | 68 | #if __UAPI_DEF_IPX_ROUTE_DEF |
1da177e4 | 69 | struct ipx_route_def { |
4833ed09 AV |
70 | __be32 ipx_network; |
71 | __be32 ipx_router_network; | |
1da177e4 LT |
72 | #define IPX_ROUTE_NO_ROUTER 0 |
73 | unsigned char ipx_router_node[IPX_NODE_LEN]; | |
74 | unsigned char ipx_device[16]; | |
75 | unsigned short ipx_flags; | |
76 | #define IPX_RT_SNAP 8 | |
77 | #define IPX_RT_8022 4 | |
78 | #define IPX_RT_BLUEBOOK 2 | |
79 | #define IPX_RT_ROUTED 1 | |
80 | }; | |
53dc65d4 | 81 | #endif /* __UAPI_DEF_IPX_ROUTE_DEF */ |
1da177e4 LT |
82 | |
83 | #define SIOCAIPXITFCRT (SIOCPROTOPRIVATE) | |
84 | #define SIOCAIPXPRISLT (SIOCPROTOPRIVATE + 1) | |
85 | #define SIOCIPXCFGDATA (SIOCPROTOPRIVATE + 2) | |
86 | #define SIOCIPXNCPCONN (SIOCPROTOPRIVATE + 3) | |
87 | #endif /* _IPX_H_ */ |