ipx.h 1.8 KB

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