ipx.h 1.8 KB

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