202 lines
5.7 KiB
C
202 lines
5.7 KiB
C
/*
|
|
******************************************************************************
|
|
* HEADER FILE
|
|
*
|
|
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: if.h,v $ $Revision: 1.4 $
|
|
* $Source: /home/interpeak/CVSRoot/ipxinc/include/net/if.h,v $
|
|
* $Author: markus $ $Date: 2009-12-14 10:01:45 $
|
|
* $State: Exp $ $Locker: $
|
|
*
|
|
* INTERPEAK_COPYRIGHT_STRING
|
|
* Design and implementation by Lennart Bang <lob@interpeak.se>
|
|
******************************************************************************
|
|
*/
|
|
#ifndef IP_NET_IF_H
|
|
#define IP_NET_IF_H
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 1 DESCRIPTION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 2 CONFIGURATION
|
|
****************************************************************************
|
|
*/
|
|
|
|
#include "ipcom_config.h"
|
|
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 3 INCLUDE FILES
|
|
****************************************************************************
|
|
*/
|
|
|
|
#include "sys/ioctl.h"
|
|
|
|
#include "ipcom_type.h"
|
|
#include "ipcom_sock.h"
|
|
|
|
#ifdef IPNET
|
|
#include <ipnet_routesock.h>
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 4 DEFINES
|
|
****************************************************************************
|
|
*/
|
|
|
|
#define IFNAMSIZ IP_IFNAMSIZ
|
|
#define IFHWADDRLEN 6
|
|
|
|
/*
|
|
*===========================================================================
|
|
* IP_IFF_X
|
|
*===========================================================================
|
|
* Supported interface flags used with IP_SIOC<S|G>IFFLAGS ioctl().
|
|
*/
|
|
|
|
#define IFF_UP IP_IFF_UP
|
|
#define IFF_BROADCAST IP_IFF_BROADCAST
|
|
#define IFF_DEBUG IP_IFF_DEBUG /* Unsupported */
|
|
#define IFF_LOOPBACK IP_IFF_LOOPBACK
|
|
#define IFF_POINTOPOINT IP_IFF_POINTOPOINT
|
|
#define IFF_RUNNING IP_IFF_RUNNING
|
|
#define IFF_PROMISC IP_IFF_PROMISC
|
|
#define IFF_ALLMULTI IP_IFF_ALLMULTI /* Unsupported */
|
|
#define IFF_OACTIVE IP_IFF_OACTIVE /* Unsupported */
|
|
#define IFF_SIMPLEX IP_IFF_SIMPLEX
|
|
#define IFF_DHCPRUNNING IP_IFF_DHCPRUNNING
|
|
#define IFF_DHCPPRIMARY IP_IFF_DHCPPRIMARY
|
|
#define IFF_NOARP IP_IFF_NOARP
|
|
#define IFF_MULTICAST IP_IFF_MULTICAST
|
|
|
|
/* Unsupported, but definitions required */
|
|
#define IFF_MASTER 0x0
|
|
#define IFF_SLAVE 0x0
|
|
#define IFF_PORTSEL 0x0
|
|
#define IFF_AUTOMEDIA 0x0
|
|
#define IFF_DYNAMIC 0x0
|
|
#define IFF_LOWER_UP 0x0
|
|
#define IFF_DORMANT 0x0
|
|
#define IFF_NOTRAILERS 0x0
|
|
|
|
/*
|
|
*===========================================================================
|
|
* IF_OPER_X
|
|
*===========================================================================
|
|
* RFC 2863 operational status
|
|
*/
|
|
|
|
enum {
|
|
IF_OPER_UNKNOWN,
|
|
IF_OPER_NOTPRESENT,
|
|
IF_OPER_DOWN,
|
|
IF_OPER_LOWERLAYERDOWN,
|
|
IF_OPER_TESTING,
|
|
IF_OPER_DORMANT,
|
|
IF_OPER_UP,
|
|
};
|
|
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 5 TYPES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ifconf
|
|
*===========================================================================
|
|
*/
|
|
#define ifconf Ip_ifconf
|
|
|
|
#define ifc_buf ifc_ifcu.ifcu_buf
|
|
#define ifc_req ifc_ifcu.ifcu_req
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ifreq
|
|
*===========================================================================
|
|
*/
|
|
#define ifreq Ip_ifreq
|
|
|
|
#define ifr_addr ifr_ifru.ifru_addr
|
|
#define ifr_dstaddr ifr_ifru.ifru_dstaddr
|
|
#define ifr_broadaddr ifr_ifru.ifru_broadaddr
|
|
#define ifr_flags ifr_ifru.ifru_flags
|
|
#define ifr_metric ifr_ifru.ifru_metric
|
|
#define ifr_mtu ifr_ifru.ifru_mtu
|
|
#define ifr_data ifr_ifru.ifru_data
|
|
#define ifr_rtab ifr_ifru.ifru_rtab
|
|
#define ifr_hwaddr ifr_ifru.ifru_addr
|
|
#define ifr_ifindex ifr_ifru.ifru_ifindex
|
|
#define ifr_qlen ifr_ifru.ifru_ivalue
|
|
#define ifr_newname ifr_ifru.ifru_newname /* New name */
|
|
|
|
/*
|
|
*===========================================================================
|
|
* in6_ifreq
|
|
*===========================================================================
|
|
*/
|
|
|
|
#define in6_ifreq Ip_in6_ifreq
|
|
|
|
#define IN6_IFF_TENTATIVE IP_IN6_IFF_TENTATIVE
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* aliasreq
|
|
*===========================================================================
|
|
*/
|
|
|
|
#define ifaliasreq Ip_ifaliasreq
|
|
#define ifra_broadaddr ifra_dstaddr
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* IPNET
|
|
*===========================================================================
|
|
*/
|
|
|
|
#ifdef IPNET
|
|
#define rs_msghdr Ipnet_rs_msghdr
|
|
#define ifa_msghdr Ipnet_ifa_msghdr
|
|
|
|
#define if_data Ipnet_if_data
|
|
#define if_msghdr Ipnet_if_msghdr
|
|
#endif
|
|
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 6 FUNCTIONS
|
|
****************************************************************************
|
|
*/
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* END OF FILE
|
|
****************************************************************************
|
|
*/
|
|
|