105 lines
2.9 KiB
C
105 lines
2.9 KiB
C
/*
|
|
******************************************************************************
|
|
* 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
|
|
****************************************************************************
|
|
*/
|