|
Data Structures |
struct | tcp_hdr |
struct | tcp_pcb |
struct | tcp_pcb_listen |
struct | tcp_seg |
Defines |
#define | tcp_sndbuf(pcb) ((pcb)->snd_buf) |
#define | TCP_SEQ_LT(a, b) ((Int32)((a)-(b)) < 0) |
#define | TCP_SEQ_LEQ(a, b) ((Int32)((a)-(b)) <= 0) |
#define | TCP_SEQ_GT(a, b) ((Int32)((a)-(b)) > 0) |
#define | TCP_SEQ_GEQ(a, b) ((Int32)((a)-(b)) >= 0) |
#define | TCP_FIN 0x01 |
#define | TCP_SYN 0x02 |
#define | TCP_RST 0x04 |
#define | TCP_PSH 0x08 |
#define | TCP_ACK 0x10 |
#define | TCP_URG 0x20 |
#define | TCP_HLEN 20 |
#define | TCP_TMR_INTERVAL 100 |
#define | TCP_FAST_INTERVAL 200 |
#define | TCP_SLOW_INTERVAL 500 |
#define | TCP_FIN_WAIT_TIMEOUT 20000 |
#define | TCP_SYN_RCVD_TIMEOUT 20000 |
#define | TCP_OOSEQ_TIMEOUT 6 |
#define | TCP_MSL 60000 |
#define | TCPH_OFFSET(hdr) (NTOHS((hdr)->_offset_flags) >> 8) |
#define | TCPH_FLAGS(hdr) (NTOHS((hdr)->_offset_flags) & 0xff) |
#define | TCPH_OFFSET_SET(hdr, offset) (hdr)->_offset_flags = HTONS(((offset) << 8) | TCPH_FLAGS(hdr)) |
#define | TCPH_FLAGS_SET(hdr, flags) (hdr)->_offset_flags = HTONS((TCPH_OFFSET(hdr) << 8) | (flags)) |
#define | TCP_TCPLEN(seg) |
#define | TF_ACK_DELAY 0x01 |
#define | TF_ACK_NOW 0x02 |
#define | TF_INFR 0x04 |
#define | TF_RESET 0x08 |
#define | TF_CLOSED 0x10 |
#define | TF_GOT_FIN 0x20 |
#define | tcp_ack(pcb) |
#define | tcp_ack_now(pcb) |
#define | tcp_pcbs_sane() 1 |
#define | TCP_REG(pcbs, npcb) |
#define | TCP_RMV(pcbs, npcb) |
Enumerations |
enum | tcp_state {
CLOSED = 0,
LISTEN = 1,
SYN_SENT = 2,
SYN_RCVD = 3,
ESTABLISHED = 4,
FIN_WAIT_1 = 5,
FIN_WAIT_2 = 6,
CLOSE_WAIT = 7,
CLOSING = 8,
LAST_ACK = 9,
TIME_WAIT = 10
} |
Functions |
void | tcp_init (void) |
void | tcp_tmr (void) |
tcp_pcb * | tcp_new (void) |
void | tcp_arg (struct tcp_pcb *pcb, void *arg) |
void | tcp_accept (struct tcp_pcb *pcb, err_t(*accept)(void *arg, struct tcp_pcb *newpcb, err_t err)) |
void | tcp_recv (struct tcp_pcb *pcb, err_t(*recv)(void *arg, struct tcp_pcb *tpcb, struct pbuf *p, err_t err)) |
void | tcp_sent (struct tcp_pcb *pcb, err_t(*sent)(void *arg, struct tcp_pcb *tpcb, uInt16 len)) |
void | tcp_poll (struct tcp_pcb *pcb, err_t(*poll)(void *arg, struct tcp_pcb *tpcb), uInt8 interval) |
void | tcp_err (struct tcp_pcb *pcb, void(*err)(void *arg, err_t err)) |
void | tcp_recved (struct tcp_pcb *pcb, uInt16 len) |
err_t | tcp_bind (struct tcp_pcb *pcb, struct ip_addr *ipaddr, uInt16 port) |
err_t | tcp_connect (struct tcp_pcb *pcb, struct ip_addr *ipaddr, uInt16 port, err_t(*connected)(void *arg, struct tcp_pcb *tpcb, err_t err)) |
tcp_pcb * | tcp_listen (struct tcp_pcb *pcb) |
void | tcp_abort (struct tcp_pcb *pcb) |
err_t | tcp_close (struct tcp_pcb *pcb) |
err_t | tcp_write (struct tcp_pcb *pcb, const void *dataptr, uInt16 len, uInt8 copy) |
void | tcp_slowtmr (void) |
void | tcp_fasttmr (void) |
void | tcp_input (struct pbuf *p, struct netif *inp) |
err_t | tcp_output (struct tcp_pcb *pcb) |
tcp_pcb * | tcp_pcb_copy (struct tcp_pcb *pcb) |
void | tcp_pcb_purge (struct tcp_pcb *pcb) |
void | tcp_pcb_remove (struct tcp_pcb **pcblist, struct tcp_pcb *pcb) |
uInt8 | tcp_segs_free (struct tcp_seg *seg) |
uInt8 | tcp_seg_free (struct tcp_seg *seg) |
tcp_seg * | tcp_seg_copy (struct tcp_seg *seg) |
err_t | tcp_send_ctrl (struct tcp_pcb *pcb, uInt8 flags) |
err_t | tcp_enqueue (struct tcp_pcb *pcb, void *dataptr, uInt16 len, uInt8 flags, uInt8 copy, uInt8 *optdata, uInt8 optlen) |
void | tcp_rexmit_seg (struct tcp_pcb *pcb, struct tcp_seg *seg) |
void | tcp_rst (uInt32 seqno, uInt32 ackno, struct ip_addr *local_ip, struct ip_addr *remote_ip, uInt16 local_port, uInt16 remote_port) |
uInt32 | tcp_next_iss (void) |
Variables |
tcp_hdr | PACK_STRUCT_STRUCT |
uInt32 | tcp_ticks |
tcp_pcb_listen * | tcp_listen_pcbs |
tcp_pcb * | tcp_active_pcbs |
tcp_pcb * | tcp_tw_pcbs |
tcp_pcb * | tcp_tmp_pcb |