sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
tcp.h File Reference
#include "lwip/arch.h"

Go to the source code of this file.

Classes

struct  tcp_hdr

Macros

#define TCP_HLEN   20
#define TCP_FIN   0x01U
#define TCP_SYN   0x02U
#define TCP_RST   0x04U
#define TCP_PSH   0x08U
#define TCP_ACK   0x10U
#define TCP_URG   0x20U
#define TCP_ECE   0x40U
#define TCP_CWR   0x80U
#define TCP_FLAGS   0x3fU
#define TCP_MAX_OPTION_BYTES   40
#define TCPH_HDRLEN(phdr)
#define TCPH_HDRLEN_BYTES(phdr)
#define TCPH_FLAGS(phdr)
#define TCPH_HDRLEN_SET(phdr, len)
#define TCPH_FLAGS_SET(phdr, flags)
#define TCPH_HDRLEN_FLAGS_SET(phdr, len, flags)
#define TCPH_SET_FLAG(phdr, flags)
#define TCPH_UNSET_FLAG(phdr, flags)

Variables

PACK_STRUCT_BEGIN struct tcp_hdr PACK_STRUCT_STRUCT

Detailed Description

TCP protocol definitions

Definition in file tcp.h.

Macro Definition Documentation

◆ TCP_ACK

#define TCP_ACK   0x10U

Definition at line 77 of file tcp.h.

◆ TCP_CWR

#define TCP_CWR   0x80U

Definition at line 80 of file tcp.h.

◆ TCP_ECE

#define TCP_ECE   0x40U

Definition at line 79 of file tcp.h.

◆ TCP_FIN

#define TCP_FIN   0x01U

Definition at line 73 of file tcp.h.

◆ TCP_FLAGS

#define TCP_FLAGS   0x3fU

Definition at line 82 of file tcp.h.

◆ TCP_HLEN

#define TCP_HLEN   20

Definition at line 48 of file tcp.h.

◆ TCP_MAX_OPTION_BYTES

#define TCP_MAX_OPTION_BYTES   40

Definition at line 84 of file tcp.h.

◆ TCP_PSH

#define TCP_PSH   0x08U

Definition at line 76 of file tcp.h.

◆ TCP_RST

#define TCP_RST   0x04U

Definition at line 75 of file tcp.h.

◆ TCP_SYN

#define TCP_SYN   0x02U

Definition at line 74 of file tcp.h.

◆ TCP_URG

#define TCP_URG   0x20U

Definition at line 78 of file tcp.h.

◆ TCPH_FLAGS

#define TCPH_FLAGS ( phdr)
Value:
((u8_t)((lwip_ntohs((phdr)->_hdrlen_rsvd_flags) & TCP_FLAGS)))

Definition at line 88 of file tcp.h.

◆ TCPH_FLAGS_SET

#define TCPH_FLAGS_SET ( phdr,
flags )
Value:
(phdr)->_hdrlen_rsvd_flags = (((phdr)->_hdrlen_rsvd_flags & PP_HTONS(~TCP_FLAGS)) | lwip_htons(flags))

Definition at line 91 of file tcp.h.

◆ TCPH_HDRLEN

#define TCPH_HDRLEN ( phdr)
Value:
((u16_t)(lwip_ntohs((phdr)->_hdrlen_rsvd_flags) >> 12))

Definition at line 86 of file tcp.h.

◆ TCPH_HDRLEN_BYTES

#define TCPH_HDRLEN_BYTES ( phdr)
Value:
((u8_t)(TCPH_HDRLEN(phdr) << 2))

Definition at line 87 of file tcp.h.

◆ TCPH_HDRLEN_FLAGS_SET

#define TCPH_HDRLEN_FLAGS_SET ( phdr,
len,
flags )
Value:
(phdr)->_hdrlen_rsvd_flags = (u16_t)(lwip_htons((u16_t)((len) << 12) | (flags)))

Definition at line 92 of file tcp.h.

◆ TCPH_HDRLEN_SET

#define TCPH_HDRLEN_SET ( phdr,
len )
Value:
(phdr)->_hdrlen_rsvd_flags = lwip_htons(((len) << 12) | TCPH_FLAGS(phdr))

Definition at line 90 of file tcp.h.

◆ TCPH_SET_FLAG

#define TCPH_SET_FLAG ( phdr,
flags )
Value:
(phdr)->_hdrlen_rsvd_flags = ((phdr)->_hdrlen_rsvd_flags | lwip_htons(flags))

Definition at line 94 of file tcp.h.

◆ TCPH_UNSET_FLAG

#define TCPH_UNSET_FLAG ( phdr,
flags )
Value:
(phdr)->_hdrlen_rsvd_flags = ((phdr)->_hdrlen_rsvd_flags & ~lwip_htons(flags))

Definition at line 95 of file tcp.h.