221 lines
6.9 KiB
C
221 lines
6.9 KiB
C
/*
|
|
******************************************************************************
|
|
* HEADER FILE
|
|
*
|
|
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: in.h,v $ $Revision: 1.6.42.1 $
|
|
* $Source: /home/interpeak/CVSRoot/ipxinc/include/netinet/in.h,v $
|
|
* $Author: svc-cmnet $ $Date: 2013-03-13 07:45:47 $
|
|
* $State: Exp $ $Locker: $
|
|
*
|
|
* INTERPEAK_COPYRIGHT_STRING
|
|
* Design and implementation by Lennart Bang <lob@interpeak.se>
|
|
******************************************************************************
|
|
*/
|
|
#ifndef IP_NETINET_IN_H
|
|
#define IP_NETINET_IN_H
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 1 DESCRIPTION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 2 CONFIGURATION
|
|
****************************************************************************
|
|
*/
|
|
|
|
#include "ipcom_config.h"
|
|
|
|
#ifdef IPNET
|
|
#include "ipnet_config.h"
|
|
#endif
|
|
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 3 INCLUDE
|
|
****************************************************************************
|
|
*/
|
|
|
|
#include "sys/types.h"
|
|
#include "sys/socket.h"
|
|
#include "netinet6/in6.h"
|
|
|
|
#include "ipcom_sock.h"
|
|
#include "ipcom_sock6.h"
|
|
#include "ipcom_sysctl.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 4 DEFINES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
*===========================================================================
|
|
* IP protocol values
|
|
*===========================================================================
|
|
*/
|
|
#define IPPROTO_IP IP_IPPROTO_IP
|
|
#define IPPROTO_ICMP IP_IPPROTO_ICMP
|
|
#define IPPROTO_IGMP IP_IPPROTO_IGMP
|
|
#define IPPROTO_IPIP IP_IPPROTO_IPIP
|
|
#define IPPROTO_IPV4 IP_IPPROTO_IPV4
|
|
#define IPPROTO_TCP IP_IPPROTO_TCP
|
|
#define IPPROTO_UDP IP_IPPROTO_UDP
|
|
#define IPPROTO_UDPLITE IP_IPPROTO_UDPLITE
|
|
#define IPPROTO_SCTP IP_IPPROTO_SCTP
|
|
#define IPPROTO_IPV6 IP_IPPROTO_IPV6
|
|
#define IPPROTO_RSVP IP_IPPROTO_RSVP
|
|
#define IPPROTO_GRE IP_IPPROTO_GRE
|
|
#define IPPROTO_ESP IP_IPPROTO_ESP
|
|
#define IPPROTO_AH IP_IPPROTO_AH
|
|
#define IPPROTO_ICMPV6 IP_IPPROTO_ICMPV6
|
|
#define IPPROTO_OSPFIGP IP_IPPROTO_OSPFIGP
|
|
#define IPPROTO_PIM IP_IPPROTO_PIM
|
|
#define IPPROTO_RAW IP_IPPROTO_RAW
|
|
#define IPPROTO_MAX IP_IPPROTO_MAX
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* IP socket options
|
|
*===========================================================================
|
|
* IP_IPPROTO_IP level socket options.
|
|
*/
|
|
|
|
#define IP_HDRINCL IP_IP_HDRINCL
|
|
#define IP_TOS IP_IP_TOS
|
|
#define IP_TTL IP_IP_TTL
|
|
#define IP_PKTINFO IP_IP_PKTINFO
|
|
#define IP_MULTICAST_IF IP_IP_MULTICAST_IF
|
|
#define IP_MULTICAST_TTL IP_IP_MULTICAST_TTL
|
|
#define IP_MULTICAST_LOOP IP_IP_MULTICAST_LOOP
|
|
#define IP_ADD_MEMBERSHIP IP_IP_ADD_MEMBERSHIP
|
|
#define IP_JOIN_GROUP IP_IP_JOIN_GROUP
|
|
#define IP_DROP_MEMBERSHIP IP_IP_DROP_MEMBERSHIP
|
|
#define IP_LEAVE_GROUP IP_IP_LEAVE_GROUP
|
|
#define IP_RECVIF IP_IP_RECVIF
|
|
#define IP_ROUTER_ALERT IP_IP_ROUTER_ALERT
|
|
#define IP_DONTFRAG IP_IP_DONTFRAG
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* Standard IP address macros.
|
|
*===========================================================================
|
|
*/
|
|
#define INADDR_ANY IP_INADDR_ANY
|
|
#define INADDR_DEFAULT IP_INADDR_DEFAULT
|
|
#define INADDR_LOOPBACK IP_INADDR_LOOPBACK
|
|
#define INADDR_BROADCAST IP_INADDR_BROADCAST
|
|
#define INADDR_NONE IP_INADDR_NONE
|
|
|
|
#define INADDR_UNSPEC_GROUP IP_INADDR_UNSPEC_GROUP
|
|
#define INADDR_ALLHOSTS_GROUP IP_INADDR_ALLHOSTS_GROUP
|
|
#define INADDR_ALLRTRS_GROUP IP_INADDR_ALLRTRS_GROUP
|
|
#define INADDR_MAX_LOCAL_GROUP IP_INADDR_MAX_LOCAL_GROUP
|
|
|
|
/*
|
|
*===========================================================================
|
|
* IN_CLASS
|
|
*===========================================================================
|
|
*/
|
|
|
|
#define IN_CLASSA(xxip) IP_IN_CLASSA(ip_ntohl(xxip))
|
|
#define IN_CLASSB(xxip) IP_IN_CLASSB(ip_ntohl(xxip))
|
|
#define IN_CLASSC(xxip) IP_IN_CLASSC(ip_ntohl(xxip))
|
|
#define IN_CLASSD(xxip) IP_IN_CLASSD(ip_ntohl(xxip))
|
|
#define IN_EXPERIMENTAL(xxip) IP_IN_EXPERIMENTAL(ip_ntohl(xxip))
|
|
#define IN_MULTICAST(xxip) IP_IN_CLASSD(ip_ntohl(xxip))
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* IPPORT_
|
|
*===========================================================================
|
|
*/
|
|
|
|
#define IPPORT_RESERVED 1024
|
|
#define IPPORT_ANONMIN 49152
|
|
#define IPPORT_ANONMAX 65535
|
|
#define IPPORT_RESERVEDMIN 600
|
|
#define IPPORT_RESERVEDMAX (IPPORT_RESERVED-1)
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* MISC
|
|
*===========================================================================
|
|
*/
|
|
|
|
#define IPCTL_FORWARDING IP_IPCTL_FORWARDING
|
|
#define INET_ADDRSTRLEN IP_INET_ADDRSTRLEN
|
|
#define INET6_ADDRSTRLEN IP_INET6_ADDRSTRLEN
|
|
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 5 TYPES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
*===========================================================================
|
|
* in_addr
|
|
*===========================================================================
|
|
*/
|
|
#ifdef s_addr
|
|
#undef s_addr
|
|
#endif
|
|
|
|
#define in_addr Ip_in_addr
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* IP types
|
|
*===========================================================================
|
|
*/
|
|
|
|
#define in_addr_t Ip_in_addr_t
|
|
#define in_port_t Ip_in_port_t
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* sockaddr_in
|
|
*===========================================================================
|
|
*/
|
|
|
|
#define sockaddr_in Ip_sockaddr_in
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ioctl
|
|
*===========================================================================
|
|
*/
|
|
#define ip_mreq Ip_ip_mreq
|
|
|
|
|
|
#define in6addr_any ip_in6addr_any
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* END OF FILE
|
|
****************************************************************************
|
|
*/
|