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