original files of m241
This commit is contained in:
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
* HEADER FILE
|
||||
*
|
||||
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: icmp6.h,v $ $Revision: 1.3 $
|
||||
* $Source: /home/interpeak/CVSRoot/ipxinc/include/netinet/icmp6.h,v $
|
||||
* $Author: lob $ $Date: 2006-04-10 11:03:29 $
|
||||
* $State: Exp $ $Locker: $
|
||||
*
|
||||
* INTERPEAK_COPYRIGHT_STRING
|
||||
* Design and implementation by Lennart Bang <lob@interpeak.se>
|
||||
******************************************************************************
|
||||
*/
|
||||
#ifndef IP_NETINET_ICMP6_H
|
||||
#define IP_NETINET_ICMP6_H
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 1 DESCRIPTION
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 2 CONFIGURATION
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#include "ipcom_config.h"
|
||||
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 3 INCLUDE FILES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#include "string.h"
|
||||
#include "sys/types.h"
|
||||
#include "netinet/in.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 4 DEFINES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#define ICMP6_DST_UNREACH 1
|
||||
#define ICMP6_PACKET_TOO_BIG 2
|
||||
#define ICMP6_TIME_EXCEEDED 3
|
||||
#define ICMP6_PARAM_PROB 4
|
||||
|
||||
#define ICMP6_ECHO_REQUEST 128
|
||||
#define ICMP6_ECHO_REPLY 129
|
||||
#define ICMP6_MEMBERSHIP_QUERY 130
|
||||
#define ICMP6_MEMBERSHIP_REPORT 131
|
||||
#define ICMP6_MEMBERSHIP_REDUCTION 132
|
||||
#define ND_ROUTER_SOLICIT 133
|
||||
#define ND_ROUTER_ADVERT 134
|
||||
#define ND_NEIGHBOR_SOLICIT 135
|
||||
#define ND_NEIGHBOR_ADVERT 136
|
||||
#define ND_REDIRECT 137
|
||||
|
||||
#define ND_OPT_SOURCE_LINKADDR 1
|
||||
#define ND_OPT_TARGET_LINKADDR 2
|
||||
#define ND_OPT_PREFIX_INFORMATION 3
|
||||
#define ND_OPT_REDIRECTED_HEADER 4
|
||||
#define ND_OPT_MTU 5
|
||||
|
||||
#define ND_RA_FLAG_MANAGED 0x80
|
||||
#define ND_RA_FLAG_OTHER 0x40
|
||||
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 5 TYPES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
struct icmp6_hdr
|
||||
{
|
||||
Ip_u8 icmp6_type; /* type field */
|
||||
Ip_u8 icmp6_code; /* code field */
|
||||
Ip_u16 icmp6_cksum; /* checksum field */
|
||||
union
|
||||
{
|
||||
Ip_u32 icmp6_un_data32[1]; /* type-specific field */
|
||||
Ip_u16 icmp6_un_data16[2]; /* type-specific field */
|
||||
Ip_u8 icmp6_un_data8[4]; /* type-specific field */
|
||||
} icmp6_dataun;
|
||||
};
|
||||
|
||||
#define icmp6_data32 icmp6_dataun.icmp6_un_data32
|
||||
#define icmp6_data16 icmp6_dataun.icmp6_un_data16
|
||||
#define icmp6_data8 icmp6_dataun.icmp6_un_data8
|
||||
#define icmp6_pptr icmp6_data32[0]
|
||||
#define icmp6_mtu icmp6_data32[0]
|
||||
#define icmp6_id icmp6_data16[0]
|
||||
#define icmp6_seq icmp6_data16[1]
|
||||
#define icmp6_maxdelay icmp6_data16[0]
|
||||
|
||||
struct nd_redirect
|
||||
{
|
||||
struct icmp6_hdr nd_rd_hdr;
|
||||
struct in6_addr nd_rd_target;
|
||||
struct in6_addr nd_rd_dst;
|
||||
/* options */
|
||||
};
|
||||
|
||||
struct nd_router_advert
|
||||
{
|
||||
struct icmp6_hdr nd_ra_hdr;
|
||||
Ip_u32 nd_ra_reachable;
|
||||
Ip_u32 nd_ra_retransmit;
|
||||
/* options */
|
||||
};
|
||||
|
||||
#define nd_ra_type nd_ra_hdr.icmp6_type
|
||||
#define nd_ra_code nd_ra_hdr.icmp6_code
|
||||
#define nd_ra_cksum nd_ra_hdr.icmp6_cksum
|
||||
#define nd_ra_curhoplimit nd_ra_hdr.icmp6_data8[0]
|
||||
#define nd_ra_flags_reserved nd_ra_hdr.icmp6_data8[1]
|
||||
#define nd_ra_flags_reserved nd_ra_hdr.icmp6_data8[1]
|
||||
#define ND_RA_FLAG_MANAGED 0x80
|
||||
#define ND_RA_FLAG_OTHER 0x40
|
||||
#define ND_RA_FLAG_HOME_AGENT 0x20
|
||||
#define nd_ra_router_lifetime nd_ra_hdr.icmp6_data16[1]
|
||||
|
||||
|
||||
struct nd_neighbor_advert
|
||||
{
|
||||
struct icmp6_hdr nd_na_hdr;
|
||||
struct in6_addr nd_na_target;
|
||||
/* options */
|
||||
};
|
||||
|
||||
struct nd_opt_hdr
|
||||
{
|
||||
Ip_u8 nd_opt_type;
|
||||
Ip_u8 nd_opt_len;
|
||||
Ip_u8 nd_opt_data[1];
|
||||
};
|
||||
|
||||
/* Prefix Extension Header Options */
|
||||
struct nd_opt_prefix_info
|
||||
{
|
||||
Ip_u8 nd_opt_pi_type;
|
||||
Ip_u8 nd_opt_pi_len;
|
||||
Ip_u8 nd_opt_pi_prefix_len;
|
||||
Ip_u8 nd_opt_pi_flags_reserved;
|
||||
Ip_u32 nd_opt_pi_valid_time;
|
||||
Ip_u32 nd_opt_pi_preferred_time;
|
||||
Ip_u32 nd_opt_pi_reserved2;
|
||||
struct Ip_in6_addr nd_opt_pi_prefix;
|
||||
};
|
||||
|
||||
|
||||
#define ND_OPT_PI_FLAG_ONLINK 0x80
|
||||
#define ND_OPT_PI_FLAG_AUTO 0x40
|
||||
#define ND_OPT_PI_FLAG_RADDR 0x20
|
||||
|
||||
struct icmp6_filter
|
||||
{
|
||||
Ip_u32 icmp6_filt[8]; /* 8*32 = 256 bits */
|
||||
};
|
||||
|
||||
|
||||
#define ICMP6_FILTER_SETBLOCKALL IP_ICMP6_FILTER_SETBLOCKALL
|
||||
#define ICMP6_FILTER_SETPASS IP_ICMP6_FILTER_SETPASS
|
||||
#define ICMP6_FILTER_SETPASS IP_ICMP6_FILTER_SETPASS
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 6 FUNCTIONS
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* END OF FILE
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
* HEADER FILE
|
||||
*
|
||||
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: if_ether.h,v $ $Revision: 1.1.1.1 $
|
||||
* $Source: /home/interpeak/CVSRoot/ipxinc/include/netinet/if_ether.h,v $
|
||||
* $Author: lob $ $Date: 2004-08-19 08:55:27 $
|
||||
* $State: Exp $ $Locker: $
|
||||
*
|
||||
* INTERPEAK_COPYRIGHT_STRING
|
||||
* Design and implementation by Lennart Bang <lob@interpeak.se>
|
||||
******************************************************************************
|
||||
*/
|
||||
#ifndef IP_NETINET_IF_ETHER_H
|
||||
#define IP_NETINET_IF_ETHER_H
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 1 DESCRIPTION
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 2 CONFIGURATION
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#include "ipcom_config.h"
|
||||
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 3 INCLUDE FILES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#include "sys/types.h"
|
||||
|
||||
#define IPCOM_USE_CLIB_PROTO
|
||||
#include "ipcom_netif.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 4 DEFINES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
*===========================================================================
|
||||
* x
|
||||
*===========================================================================
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 5 TYPES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 6 FUNCTIONS
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* END OF FILE
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,220 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
* 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
|
||||
****************************************************************************
|
||||
*/
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
* HEADER FILE
|
||||
*
|
||||
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: in_systm.h,v $ $Revision: 1.1.1.1 $
|
||||
* $Source: /home/interpeak/CVSRoot/ipxinc/include/netinet/in_systm.h,v $
|
||||
* $Author: lob $ $Date: 2004-08-19 08:55:27 $
|
||||
* $State: Exp $ $Locker: $
|
||||
*
|
||||
* INTERPEAK_COPYRIGHT_STRING
|
||||
* Design and implementation by Lennart Bang <lob@interpeak.se>
|
||||
******************************************************************************
|
||||
*/
|
||||
#ifndef IP_NETINET_IN_SYSTM_H
|
||||
#define IP_NETINET_IN_SYSTM_H
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 1 DESCRIPTION
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 2 CONFIGURATION
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#include "ipcom_config.h"
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 3 INCLUDE FILES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#include "sys/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 4 DEFINES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 5 TYPES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
typedef u_long n_time; /* ms since 00:00 GMT, byte rev */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* END OF FILE
|
||||
****************************************************************************
|
||||
*/
|
||||
@@ -0,0 +1,160 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
* HEADER FILE
|
||||
*
|
||||
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ip.h,v $ $Revision: 1.2 $
|
||||
* $Source: /home/interpeak/CVSRoot/ipxinc/include/netinet/ip.h,v $
|
||||
* $Author: lob $ $Date: 2004-08-24 11:42:34 $
|
||||
* $State: Exp $ $Locker: $
|
||||
*
|
||||
* INTERPEAK_COPYRIGHT_STRING
|
||||
* Design and implementation by Lennart Bang <lob@interpeak.se>
|
||||
******************************************************************************
|
||||
*/
|
||||
#ifndef IP_NETINET_IP_H
|
||||
#define IP_NETINET_IP_H
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 1 DESCRIPTION
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 2 CONFIGURATION
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#include "ipcom_config.h"
|
||||
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 3 INCLUDE FILES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#include "sys/types.h"
|
||||
#include "netinet/in.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 4 DEFINES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
*===========================================================================
|
||||
* IP options
|
||||
*===========================================================================
|
||||
*/
|
||||
|
||||
#define IPOPT_COPY 0x80
|
||||
#define IPOPT_CLASS_MASK 0x60
|
||||
#define IPOPT_NUMBER_MASK 0x1f
|
||||
|
||||
#define IPOPT_COPIED(o) ((o) & IPOPT_COPY)
|
||||
#define IPOPT_CLASS(o) ((o) & IPOPT_CLASS_MASK)
|
||||
#define IPOPT_NUMBER(o) ((o) & IPOPT_NUMBER_MASK)
|
||||
|
||||
#define IPOPT_CONTROL 0x00
|
||||
#define IPOPT_RESERVED1 0x20
|
||||
#define IPOPT_DEBMEAS 0x40
|
||||
#define IPOPT_MEASUREMENT IPOPT_DEBMEAS
|
||||
#define IPOPT_RESERVED2 0x60
|
||||
|
||||
#define IPOPT_EOL 0 /* end of option list */
|
||||
#define IPOPT_END IPOPT_EOL
|
||||
#define IPOPT_NOP 1 /* no operation */
|
||||
#define IPOPT_NOOP IPOPT_NOP
|
||||
|
||||
#define IPOPT_RR 7 /* record packet route */
|
||||
#define IPOPT_TS 68 /* timestamp */
|
||||
#define IPOPT_TIMESTAMP IPOPT_TS
|
||||
#define IPOPT_SECURITY 130 /* provide s,c,h,tcc */
|
||||
#define IPOPT_SEC IPOPT_SECURITY
|
||||
#define IPOPT_LSRR 131 /* loose source route */
|
||||
#define IPOPT_SATID 136 /* satnet id */
|
||||
#define IPOPT_SID IPOPT_SATID
|
||||
#define IPOPT_SSRR 137 /* strict source route */
|
||||
#define IPOPT_RA 148 /* router alert */
|
||||
|
||||
|
||||
/*
|
||||
*===========================================================================
|
||||
* misc
|
||||
*===========================================================================
|
||||
*/
|
||||
|
||||
#define MAXTTL 255
|
||||
#define IPDEFTTL 64
|
||||
#define IPFRAGTTL 60
|
||||
#define IPTTLDEC 1
|
||||
|
||||
#define IP_MSS 576
|
||||
|
||||
|
||||
#define IPVERSION 4
|
||||
#define IP_MAXPACKET 65535
|
||||
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 5 TYPES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
* Structure of an internet header, naked of options.
|
||||
*/
|
||||
struct ip
|
||||
{
|
||||
#ifdef IP_LITTLE_ENDIAN
|
||||
unsigned int ip_hl:4; /* header length */
|
||||
unsigned int ip_v:4; /* version */
|
||||
#elif defined(IP_BIG_ENDIAN)
|
||||
unsigned int ip_v:4; /* version */
|
||||
unsigned int ip_hl:4; /* header length */
|
||||
#else
|
||||
#error ENDIAN_NOT_DEFINED
|
||||
#endif
|
||||
u_int8_t ip_tos; /* type of service */
|
||||
unsigned short ip_len; /* total length */
|
||||
unsigned short ip_id; /* identification */
|
||||
unsigned short ip_off; /* fragment offset field */
|
||||
u_int8_t ip_ttl; /* time to live */
|
||||
u_int8_t ip_p; /* protocol */
|
||||
unsigned short ip_sum; /* checksum */
|
||||
struct in_addr ip_src, ip_dst; /* source and dest address */
|
||||
};
|
||||
|
||||
#define IP_RF 0x8000 /* reserved fragment flag */
|
||||
#define IP_DF 0x4000 /* dont fragment flag */
|
||||
#define IP_MF 0x2000 /* more fragments flag */
|
||||
#define IP_OFFMASK 0x1fff /* mask for fragmenting bits */
|
||||
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 6 FUNCTIONS
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* END OF FILE
|
||||
****************************************************************************
|
||||
*/
|
||||
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
* HEADER FILE
|
||||
*
|
||||
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: tcp.h,v $ $Revision: 1.1.1.1 $
|
||||
* $Source: /home/interpeak/CVSRoot/ipxinc/include/netinet/tcp.h,v $
|
||||
* $Author: lob $ $Date: 2004-08-19 08:55:27 $
|
||||
* $State: Exp $ $Locker: $
|
||||
*
|
||||
* Copyright Interpeak AB 2000-2003 <www.interpeak.se>. All rights reserved.
|
||||
* Design and implementation by Firstname Lastname <email@interpeak.se>
|
||||
******************************************************************************
|
||||
*/
|
||||
#ifndef IP_NETINET_TCP_H
|
||||
#define IP_NETINET_TCP_H
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 1 DESCRIPTION
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 2 CONFIGURATION
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#include "ipcom_config.h"
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 3 INCLUDE FILES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#include "sys/types.h"
|
||||
|
||||
#include "ipcom_sock.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 4 DEFINES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
* User-settable options (used with setsockopt).
|
||||
*/
|
||||
#define TCP_NODELAY IP_TCP_NODELAY /* don't delay send to coalesce packets */
|
||||
#define TCP_MAXSEG 0x02 /* NOT supported: set maximum segment size */
|
||||
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 5 TYPES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
typedef u_int32_t tcp_seq;
|
||||
|
||||
/* TCP Protocol Header [RFC793] */
|
||||
struct tcphdr
|
||||
{
|
||||
Ip_u16 th_sport; /* source port */
|
||||
Ip_u16 th_dport; /* destination port */
|
||||
tcp_seq th_seq; /* sequence number */
|
||||
tcp_seq th_ack; /* acknowledgement number */
|
||||
#ifdef IP_LITTLE_ENDIAN
|
||||
Ip_u32 th_x2:4, /* data offset */
|
||||
th_off:4; /* (unused) */
|
||||
#elif defined(IP_BIG_ENDIAN)
|
||||
Ip_u32 th_off:4, /* data offset */
|
||||
th_x2:4; /* (unused) */
|
||||
#else
|
||||
#error ENDIAN_NOT_DEFINED
|
||||
#endif
|
||||
Ip_u8 th_flags;
|
||||
#define TH_FIN 0x01
|
||||
#define TH_SYN 0x02
|
||||
#define TH_RST 0x04
|
||||
#define TH_PUSH 0x08
|
||||
#define TH_ACK 0x10
|
||||
#define TH_URG 0x20
|
||||
Ip_u16 th_win; /* window */
|
||||
Ip_u16 th_sum; /* checksum */
|
||||
Ip_u16 th_urp; /* urgent pointer */
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* END OF FILE
|
||||
****************************************************************************
|
||||
*/
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
* HEADER FILE
|
||||
*
|
||||
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: udp.h,v $ $Revision: 1.1.1.1 $
|
||||
* $Source: /home/interpeak/CVSRoot/ipxinc/include/netinet/udp.h,v $
|
||||
* $Author: lob $ $Date: 2004-08-19 08:55:27 $
|
||||
* $State: Exp $ $Locker: $
|
||||
*
|
||||
* INTERPEAK_COPYRIGHT_STRING
|
||||
* Design and implementation by Lennart Bang <lob@interpeak.se>
|
||||
******************************************************************************
|
||||
*/
|
||||
#ifndef IP_NETINET_UDP_H
|
||||
#define IP_NETINET_UDP_H
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 1 DESCRIPTION
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 2 CONFIGURATION
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#include "ipcom_config.h"
|
||||
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 3 INCLUDE FILES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#include "sys/types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 4 DEFINES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 5 TYPES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/* UDP Protocol Header [RFC768] */
|
||||
struct udphdr
|
||||
{
|
||||
Ip_u16 uh_sport; /* source port */
|
||||
Ip_u16 uh_dport; /* destination port */
|
||||
Ip_u16 uh_ulen; /* udp length */
|
||||
Ip_u16 uh_sum; /* udp checksum */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 6 FUNCTIONS
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* END OF FILE
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user