Back to index

glibc  2.9
ipx.h
Go to the documentation of this file.
00001 /* Copyright (C) 1991, 92, 93, 95, 96, 97, 98 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 #ifndef __NETIPX_IPX_H
00020 #define __NETIPX_IPX_H 1
00021 
00022 #include <features.h>
00023 
00024 #include <sys/types.h>
00025 #include <bits/sockaddr.h>
00026 
00027 __BEGIN_DECLS
00028 
00029 #define SOL_IPX    256          /* sockopt level */
00030 
00031 #define IPX_TYPE        1
00032 #define IPX_NODE_LEN 6
00033 #define IPX_MTU             576
00034 
00035 struct sockaddr_ipx
00036   {
00037     sa_family_t sipx_family;
00038     u_int16_t sipx_port;
00039     u_int32_t sipx_network;
00040     unsigned char sipx_node[IPX_NODE_LEN];
00041     u_int8_t sipx_type;
00042     unsigned char sipx_zero;       /* 16 byte fill */
00043   };
00044 
00045 /*
00046  *     So we can fit the extra info for SIOCSIFADDR into the address nicely
00047  */
00048 
00049 #define sipx_special sipx_port
00050 #define sipx_action  sipx_zero
00051 #define IPX_DLTITF   0
00052 #define IPX_CRTITF   1
00053 
00054 typedef struct ipx_route_definition
00055   {
00056     unsigned long ipx_network;
00057     unsigned long ipx_router_network;
00058     unsigned char ipx_router_node[IPX_NODE_LEN];
00059   }
00060 ipx_route_definition;
00061 
00062 typedef struct ipx_interface_definition
00063   {
00064     unsigned long ipx_network;
00065     unsigned char ipx_device[16];
00066     unsigned char ipx_dlink_type;
00067 #define IPX_FRAME_NONE             0
00068 #define IPX_FRAME_SNAP             1
00069 #define IPX_FRAME_8022             2
00070 #define IPX_FRAME_ETHERII   3
00071 #define IPX_FRAME_8023             4
00072 #define IPX_FRAME_TR_8022   5
00073     unsigned char ipx_special;
00074 #define IPX_SPECIAL_NONE    0
00075 #define IPX_PRIMARY         1
00076 #define IPX_INTERNAL        2
00077     unsigned char ipx_node[IPX_NODE_LEN];
00078   }
00079 ipx_interface_definition;
00080 
00081 typedef struct ipx_config_data
00082   {
00083     unsigned char ipxcfg_auto_select_primary;
00084     unsigned char ipxcfg_auto_create_interfaces;
00085   }
00086 ipx_config_data;
00087 
00088 /*
00089  * OLD Route Definition for backward compatibility.
00090  */
00091 
00092 struct ipx_route_def
00093   {
00094     unsigned long ipx_network;
00095     unsigned long ipx_router_network;
00096 #define IPX_ROUTE_NO_ROUTER 0
00097     unsigned char ipx_router_node[IPX_NODE_LEN];
00098     unsigned char ipx_device[16];
00099     unsigned short ipx_flags;
00100 #define IPX_RT_SNAP         8
00101 #define IPX_RT_8022         4
00102 #define IPX_RT_BLUEBOOK            2
00103 #define IPX_RT_ROUTED              1
00104   };
00105 
00106 #define SIOCAIPXITFCRT             (SIOCPROTOPRIVATE)
00107 #define SIOCAIPXPRISLT             (SIOCPROTOPRIVATE + 1)
00108 #define SIOCIPXCFGDATA             (SIOCPROTOPRIVATE + 2)
00109 #define SIOCIPXNCPCONN             (SIOCPROTOPRIVATE + 3)
00110 
00111 __END_DECLS
00112 
00113 #endif /* netipx/ipx.h */