ipx.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /* Copyright (C) 1991, 92, 93, 95, 96, 97, 98 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. The GNU C Library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Lesser General Public
  5. License as published by the Free Software Foundation; either
  6. version 2.1 of the License, or (at your option) any later version.
  7. The GNU C Library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public
  12. License along with the GNU C Library; if not, write to the Free
  13. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  14. 02111-1307 USA. */
  15. #ifndef __NETIPX_IPX_H
  16. #define __NETIPX_IPX_H 1
  17. #include <features.h>
  18. #include <sys/types.h>
  19. #include <bits/sockaddr.h>
  20. __BEGIN_DECLS
  21. #define SOL_IPX 256 /* sockopt level */
  22. #define IPX_TYPE 1
  23. #define IPX_NODE_LEN 6
  24. #define IPX_MTU 576
  25. struct sockaddr_ipx
  26. {
  27. sa_family_t sipx_family;
  28. u_int16_t sipx_port;
  29. u_int32_t sipx_network;
  30. unsigned char sipx_node[IPX_NODE_LEN];
  31. u_int8_t sipx_type;
  32. unsigned char sipx_zero; /* 16 byte fill */
  33. };
  34. /*
  35. * So we can fit the extra info for SIOCSIFADDR into the address nicely
  36. */
  37. #define sipx_special sipx_port
  38. #define sipx_action sipx_zero
  39. #define IPX_DLTITF 0
  40. #define IPX_CRTITF 1
  41. typedef struct ipx_route_definition
  42. {
  43. unsigned long ipx_network;
  44. unsigned long ipx_router_network;
  45. unsigned char ipx_router_node[IPX_NODE_LEN];
  46. }
  47. ipx_route_definition;
  48. typedef struct ipx_interface_definition
  49. {
  50. unsigned long ipx_network;
  51. unsigned char ipx_device[16];
  52. unsigned char ipx_dlink_type;
  53. #define IPX_FRAME_NONE 0
  54. #define IPX_FRAME_SNAP 1
  55. #define IPX_FRAME_8022 2
  56. #define IPX_FRAME_ETHERII 3
  57. #define IPX_FRAME_8023 4
  58. #define IPX_FRAME_TR_8022 5
  59. unsigned char ipx_special;
  60. #define IPX_SPECIAL_NONE 0
  61. #define IPX_PRIMARY 1
  62. #define IPX_INTERNAL 2
  63. unsigned char ipx_node[IPX_NODE_LEN];
  64. }
  65. ipx_interface_definition;
  66. typedef struct ipx_config_data
  67. {
  68. unsigned char ipxcfg_auto_select_primary;
  69. unsigned char ipxcfg_auto_create_interfaces;
  70. }
  71. ipx_config_data;
  72. /*
  73. * OLD Route Definition for backward compatibility.
  74. */
  75. struct ipx_route_def
  76. {
  77. unsigned long ipx_network;
  78. unsigned long ipx_router_network;
  79. #define IPX_ROUTE_NO_ROUTER 0
  80. unsigned char ipx_router_node[IPX_NODE_LEN];
  81. unsigned char ipx_device[16];
  82. unsigned short ipx_flags;
  83. #define IPX_RT_SNAP 8
  84. #define IPX_RT_8022 4
  85. #define IPX_RT_BLUEBOOK 2
  86. #define IPX_RT_ROUTED 1
  87. };
  88. #define SIOCAIPXITFCRT (SIOCPROTOPRIVATE)
  89. #define SIOCAIPXPRISLT (SIOCPROTOPRIVATE + 1)
  90. #define SIOCIPXCFGDATA (SIOCPROTOPRIVATE + 2)
  91. #define SIOCIPXNCPCONN (SIOCPROTOPRIVATE + 3)
  92. __END_DECLS
  93. #endif /* netipx/ipx.h */