|
#define | tcp_mss(pcb) ((pcb)->mss) |
|
#define | tcp_sndbuf(pcb) ((pcb)->snd_buf) |
|
#define | TCP_PRIO_MIN 1 |
|
#define | TCP_PRIO_NORMAL 64 |
|
#define | TCP_PRIO_MAX 127 |
|
#define | TCP_SEQ_LT(a, b) ((s32_t)((a)-(b)) < 0) |
|
#define | TCP_SEQ_LEQ(a, b) ((s32_t)((a)-(b)) <= 0) |
|
#define | TCP_SEQ_GT(a, b) ((s32_t)((a)-(b)) > 0) |
|
#define | TCP_SEQ_GEQ(a, b) ((s32_t)((a)-(b)) >= 0) |
|
#define | TCP_SEQ_BETWEEN(a, b, c) (TCP_SEQ_GEQ(a,b) && TCP_SEQ_LEQ(a,c)) |
|
#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_HLEN 20 |
|
#define | TCP_TMR_INTERVAL |
|
#define | TCP_FAST_INTERVAL |
|
#define | TCP_SLOW_INTERVAL |
|
#define | TCP_FIN_WAIT_TIMEOUT 20000 /* milliseconds */ |
|
#define | TCP_SYN_RCVD_TIMEOUT 20000 /* milliseconds */ |
|
#define | TCP_OOSEQ_TIMEOUT 6 /* x RTO */ |
|
#define | TCP_MSL 60000 /* The maximum segment lifetime in microseconds */ |
|
#define | TCP_NODELAY 0x01 /* don't delay send to coalesce packets */ |
|
#define | TCP_KEEPALIVE 0x02 /* send KEEPALIVE probes when idle for pcb->keepalive miliseconds */ |
|
#define | TCP_KEEPDEFAULT 7200000 /* KEEPALIVE timer in miliseconds */ |
|
#define | TCP_KEEPINTVL 75000 /* Time between KEEPALIVE probes in miliseconds */ |
|
#define | TCP_KEEPCNT 9 /* Counter for KEEPALIVE probes */ |
|
#define | TCP_MAXIDLE TCP_KEEPCNT * TCP_KEEPINTVL /* Maximum KEEPALIVE probe time */ |
|
#define | TCPH_OFFSET(phdr) (ntohs((phdr)->_hdrlen_rsvd_flags) >> 8) |
|
#define | TCPH_HDRLEN(phdr) (ntohs((phdr)->_hdrlen_rsvd_flags) >> 12) |
|
#define | TCPH_FLAGS(phdr) (ntohs((phdr)->_hdrlen_rsvd_flags) & TCP_FLAGS) |
|
#define | TCPH_OFFSET_SET(phdr, offset) (phdr)->_hdrlen_rsvd_flags = htons(((offset) << 8) | TCPH_FLAGS(phdr)) |
|
#define | TCPH_HDRLEN_SET(phdr, len) (phdr)->_hdrlen_rsvd_flags = htons(((len) << 12) | TCPH_FLAGS(phdr)) |
|
#define | TCPH_FLAGS_SET(phdr, flags) (phdr)->_hdrlen_rsvd_flags = htons((ntohs((phdr)->_hdrlen_rsvd_flags) & ~TCP_FLAGS) | (flags)) |
|
#define | TCPH_SET_FLAG(phdr, flags) (phdr)->_hdrlen_rsvd_flags = htons(ntohs((phdr)->_hdrlen_rsvd_flags) | (flags)) |
|
#define | TCPH_UNSET_FLAG(phdr, flags) (phdr)->_hdrlen_rsvd_flags = htons(ntohs((phdr)->_hdrlen_rsvd_flags) | (TCPH_FLAGS(phdr) & ~(flags)) ) |
|
#define | TCP_TCPLEN(seg) |
|
#define | TF_ACK_DELAY (u8_t)0x01U /* Delayed ACK. */ |
|
#define | TF_ACK_NOW (u8_t)0x02U /* Immediate ACK. */ |
|
#define | TF_INFR (u8_t)0x04U /* In fast recovery. */ |
|
#define | TF_RESET (u8_t)0x08U /* Connection was reset. */ |
|
#define | TF_CLOSED (u8_t)0x10U /* Connection was sucessfully closed. */ |
|
#define | TF_GOT_FIN (u8_t)0x20U /* Connection was closed by the remote end. */ |
|
#define | TF_NODELAY (u8_t)0x40U /* Disable Nagle algorithm */ |
|
#define | TCP_EVENT_ACCEPT(pcb, err, ret) |
|
#define | TCP_EVENT_SENT(pcb, space, ret) |
|
#define | TCP_EVENT_RECV(pcb, p, err, ret) |
|
#define | TCP_EVENT_CONNECTED(pcb, err, ret) |
|
#define | TCP_EVENT_POLL(pcb, ret) |
|
#define | TCP_EVENT_ERR(errf, arg, err) |
|
#define | tcp_ack(pcb) |
|
#define | tcp_ack_now(pcb) |
|
#define | tcp_debug_print(tcphdr) |
|
#define | tcp_debug_print_flags(flags) |
|
#define | tcp_debug_print_state(s) |
|
#define | tcp_debug_print_pcbs() |
|
#define | tcp_pcbs_sane() 1 |
|
#define | TCP_REG(pcbs, npcb) |
|
#define | TCP_RMV(pcbs, npcb) |
|
|
void | tcp_init (void) |
|
void | tcp_tmr (void) |
|
struct tcp_pcb * | tcp_new (void) |
|
struct tcp_pcb * | tcp_alloc (u8_t prio) |
|
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, u16_t len)) |
|
void | tcp_poll (struct tcp_pcb *pcb, err_t(*poll)(void *arg, struct tcp_pcb *tpcb), u8_t interval) |
|
void | tcp_err (struct tcp_pcb *pcb, void(*err)(void *arg, err_t err)) |
|
void | tcp_recved (struct tcp_pcb *pcb, u16_t len) |
|
err_t | tcp_bind (struct tcp_pcb *pcb, struct ip_addr *ipaddr, u16_t port) |
|
err_t | tcp_connect (struct tcp_pcb *pcb, struct ip_addr *ipaddr, u16_t port, err_t(*connected)(void *arg, struct tcp_pcb *tpcb, err_t err)) |
|
struct 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, u16_t len, u8_t copy) |
|
void | tcp_setprio (struct tcp_pcb *pcb, u8_t prio) |
|
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) |
|
void | tcp_rexmit (struct tcp_pcb *pcb) |
|
void | tcp_rexmit_rto (struct tcp_pcb *pcb) |
|
struct 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) |
|
u8_t | tcp_segs_free (struct tcp_seg *seg) |
|
u8_t | tcp_seg_free (struct tcp_seg *seg) |
|
struct tcp_seg * | tcp_seg_copy (struct tcp_seg *seg) |
|
err_t | tcp_send_ctrl (struct tcp_pcb *pcb, u8_t flags) |
|
err_t | tcp_enqueue (struct tcp_pcb *pcb, void *dataptr, u16_t len, u8_t flags, u8_t copy, u8_t *optdata, u8_t optlen) |
|
void | tcp_rexmit_seg (struct tcp_pcb *pcb, struct tcp_seg *seg) |
|
void | tcp_rst (u32_t seqno, u32_t ackno, struct ip_addr *local_ip, struct ip_addr *remote_ip, u16_t local_port, u16_t remote_port) |
|
u32_t | tcp_next_iss (void) |
|
void | tcp_keepalive (struct tcp_pcb *pcb) |
|
void | tcp_timer_needed (void) |
|