Blame sysdeps/unix/sysv/linux/netipx/ipx.h

Packit 6c4009
/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
#ifndef __NETIPX_IPX_H
Packit 6c4009
#define __NETIPX_IPX_H 1
Packit 6c4009
Packit 6c4009
#include <sys/types.h>
Packit 6c4009
#include <stdint.h>
Packit 6c4009
#include <bits/sockaddr.h>
Packit 6c4009
Packit 6c4009
__BEGIN_DECLS
Packit 6c4009
Packit 6c4009
#define SOL_IPX    256          /* sockopt level */
Packit 6c4009
Packit 6c4009
#define IPX_TYPE        1
Packit 6c4009
#define IPX_NODE_LEN	6
Packit 6c4009
#define IPX_MTU		576
Packit 6c4009
Packit 6c4009
struct sockaddr_ipx
Packit 6c4009
  {
Packit 6c4009
    sa_family_t sipx_family;
Packit 6c4009
    uint16_t sipx_port;
Packit 6c4009
    uint32_t sipx_network;
Packit 6c4009
    unsigned char sipx_node[IPX_NODE_LEN];
Packit 6c4009
    uint8_t sipx_type;
Packit 6c4009
    unsigned char sipx_zero;	/* 16 byte fill */
Packit 6c4009
  };
Packit 6c4009
Packit 6c4009
/*
Packit 6c4009
 *	So we can fit the extra info for SIOCSIFADDR into the address nicely
Packit 6c4009
 */
Packit 6c4009
Packit 6c4009
#define sipx_special	sipx_port
Packit 6c4009
#define sipx_action	sipx_zero
Packit 6c4009
#define IPX_DLTITF	0
Packit 6c4009
#define IPX_CRTITF	1
Packit 6c4009
Packit 6c4009
typedef struct ipx_route_definition
Packit 6c4009
  {
Packit 6c4009
    unsigned long ipx_network;
Packit 6c4009
    unsigned long ipx_router_network;
Packit 6c4009
    unsigned char ipx_router_node[IPX_NODE_LEN];
Packit 6c4009
  }
Packit 6c4009
ipx_route_definition;
Packit 6c4009
Packit 6c4009
typedef struct ipx_interface_definition
Packit 6c4009
  {
Packit 6c4009
    unsigned long ipx_network;
Packit 6c4009
    unsigned char ipx_device[16];
Packit 6c4009
    unsigned char ipx_dlink_type;
Packit 6c4009
#define IPX_FRAME_NONE		0
Packit 6c4009
#define IPX_FRAME_SNAP		1
Packit 6c4009
#define IPX_FRAME_8022		2
Packit 6c4009
#define IPX_FRAME_ETHERII	3
Packit 6c4009
#define IPX_FRAME_8023		4
Packit 6c4009
#define IPX_FRAME_TR_8022	5
Packit 6c4009
    unsigned char ipx_special;
Packit 6c4009
#define IPX_SPECIAL_NONE	0
Packit 6c4009
#define IPX_PRIMARY		1
Packit 6c4009
#define IPX_INTERNAL		2
Packit 6c4009
    unsigned char ipx_node[IPX_NODE_LEN];
Packit 6c4009
  }
Packit 6c4009
ipx_interface_definition;
Packit 6c4009
Packit 6c4009
typedef struct ipx_config_data
Packit 6c4009
  {
Packit 6c4009
    unsigned char ipxcfg_auto_select_primary;
Packit 6c4009
    unsigned char ipxcfg_auto_create_interfaces;
Packit 6c4009
  }
Packit 6c4009
ipx_config_data;
Packit 6c4009
Packit 6c4009
/*
Packit 6c4009
 * OLD Route Definition for backward compatibility.
Packit 6c4009
 */
Packit 6c4009
Packit 6c4009
struct ipx_route_def
Packit 6c4009
  {
Packit 6c4009
    unsigned long ipx_network;
Packit 6c4009
    unsigned long ipx_router_network;
Packit 6c4009
#define IPX_ROUTE_NO_ROUTER	0
Packit 6c4009
    unsigned char ipx_router_node[IPX_NODE_LEN];
Packit 6c4009
    unsigned char ipx_device[16];
Packit 6c4009
    unsigned short ipx_flags;
Packit 6c4009
#define IPX_RT_SNAP		8
Packit 6c4009
#define IPX_RT_8022		4
Packit 6c4009
#define IPX_RT_BLUEBOOK		2
Packit 6c4009
#define IPX_RT_ROUTED		1
Packit 6c4009
  };
Packit 6c4009
Packit 6c4009
#define SIOCAIPXITFCRT		(SIOCPROTOPRIVATE)
Packit 6c4009
#define SIOCAIPXPRISLT		(SIOCPROTOPRIVATE + 1)
Packit 6c4009
#define SIOCIPXCFGDATA		(SIOCPROTOPRIVATE + 2)
Packit 6c4009
#define SIOCIPXNCPCONN		(SIOCPROTOPRIVATE + 3)
Packit 6c4009
Packit 6c4009
__END_DECLS
Packit 6c4009
Packit 6c4009
#endif /* netipx/ipx.h */