ipx.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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, see
  13. <http://www.gnu.org/licenses/>. */
  14. #ifndef __NETIPX_IPX_H
  15. #define __NETIPX_IPX_H 1
  16. #include <features.h>
  17. #include <sys/types.h>
  18. #include <bits/sockaddr.h>
  19. __BEGIN_DECLS
  20. #define SOL_IPX 256 /* sockopt level */
  21. #define IPX_TYPE 1
  22. #define IPX_NODE_LEN 6
  23. #define IPX_MTU 576
  24. struct sockaddr_ipx
  25. {
  26. sa_family_t sipx_family;
  27. u_int16_t sipx_port;
  28. u_int32_t sipx_network;
  29. unsigned char sipx_node[IPX_NODE_LEN];
  30. u_int8_t sipx_type;
  31. unsigned char sipx_zero; /* 16 byte fill */
  32. };
  33. /*
  34. * So we can fit the extra info for SIOCSIFADDR into the address nicely
  35. */
  36. #define sipx_special sipx_port
  37. #define sipx_action sipx_zero
  38. #define IPX_DLTITF 0
  39. #define IPX_CRTITF 1
  40. typedef struct ipx_route_definition
  41. {
  42. unsigned long ipx_network;
  43. unsigned long ipx_router_network;
  44. unsigned char ipx_router_node[IPX_NODE_LEN];
  45. }
  46. ipx_route_definition;
  47. typedef struct ipx_interface_definition
  48. {
  49. unsigned long ipx_network;
  50. unsigned char ipx_device[16];
  51. unsigned char ipx_dlink_type;
  52. #define IPX_FRAME_NONE 0
  53. #define IPX_FRAME_SNAP 1
  54. #define IPX_FRAME_8022 2
  55. #define IPX_FRAME_ETHERII 3
  56. #define IPX_FRAME_8023 4
  57. #define IPX_FRAME_TR_8022 5
  58. unsigned char ipx_special;
  59. #define IPX_SPECIAL_NONE 0
  60. #define IPX_PRIMARY 1
  61. #define IPX_INTERNAL 2
  62. unsigned char ipx_node[IPX_NODE_LEN];
  63. }
  64. ipx_interface_definition;
  65. typedef struct ipx_config_data
  66. {
  67. unsigned char ipxcfg_auto_select_primary;
  68. unsigned char ipxcfg_auto_create_interfaces;
  69. }
  70. ipx_config_data;
  71. /*
  72. * OLD Route Definition for backward compatibility.
  73. */
  74. struct ipx_route_def
  75. {
  76. unsigned long ipx_network;
  77. unsigned long ipx_router_network;
  78. #define IPX_ROUTE_NO_ROUTER 0
  79. unsigned char ipx_router_node[IPX_NODE_LEN];
  80. unsigned char ipx_device[16];
  81. unsigned short ipx_flags;
  82. #define IPX_RT_SNAP 8
  83. #define IPX_RT_8022 4
  84. #define IPX_RT_BLUEBOOK 2
  85. #define IPX_RT_ROUTED 1
  86. };
  87. #define SIOCAIPXITFCRT (SIOCPROTOPRIVATE)
  88. #define SIOCAIPXPRISLT (SIOCPROTOPRIVATE + 1)
  89. #define SIOCIPXCFGDATA (SIOCPROTOPRIVATE + 2)
  90. #define SIOCIPXNCPCONN (SIOCPROTOPRIVATE + 3)
  91. __END_DECLS
  92. #endif /* netipx/ipx.h */