ipx.h 2.2 KB

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