AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
tcp_pcb Struct Reference

A connection (its control block, or PCB). More...

#include <tcp.h>

Data Fields

int state
uint32_t laddr
uint32_t raddr
uint16_t lport
uint16_t rport
struct tcp_pcb * next
struct hashmap_node * hnode
uint32_t iss
uint32_t snd_una
uint32_t snd_nxt
uint32_t snd_max
uint32_t snd_wnd
uint32_t snd_wl1
uint32_t snd_wl2
uint16_t mss
struct ringbuf * sndbuf
int fin_queued
uint32_t irs
uint32_t rcv_nxt
uint32_t rcv_adv
struct ringbuf * rcvbuf
struct netbuf * ooo
int fin_received
uint64_t srtt
uint64_t rttvar
uint64_t rto
int rtt_timing
uint32_t rtt_seq
uint64_t rtt_start
int retries
int persist
uint32_t cwnd
uint32_t ssthresh
int dupacks
int in_recovery
uint32_t recover
int ack_pending
int nodelay
int keepalive
int keep_probes
int reuseaddr
struct callout rexmt
struct callout dack
struct callout timer2
struct tcp_pcb * parent
struct tcp_pcb * accept_head
struct tcp_pcb * accept_tail
struct tcp_pcb * accept_next
int backlog
int qlen
int detached
int connected
int error
int shut_rd
uint64_t rcvtimeo
uint64_t sndtimeo
struct waitq wait

Detailed Description

A connection (its control block, or PCB).

It may outlive its socket, to send what is left, or in TIME_WAIT, and it has no socket until it is accepted.

Definition at line 66 of file tcp.h.

Field Documentation

◆ accept_head

struct tcp_pcb* tcp_pcb::accept_head

◆ accept_next

struct tcp_pcb * tcp_pcb::accept_next

Definition at line 119 of file tcp.h.

Referenced by tcp_established(), and unlink_parent().

◆ accept_tail

struct tcp_pcb * tcp_pcb::accept_tail

Definition at line 119 of file tcp.h.

Referenced by tcp_established(), and unlink_parent().

◆ ack_pending

int tcp_pcb::ack_pending

Definition at line 105 of file tcp.h.

Referenced by segment(), and tcp_dack().

◆ backlog

int tcp_pcb::backlog

Definition at line 120 of file tcp.h.

Referenced by listen_input(), and socket_tcp_listen().

◆ connected

int tcp_pcb::connected

◆ cwnd

uint32_t tcp_pcb::cwnd

Definition at line 100 of file tcp.h.

Referenced by ack_input(), retransmit_first(), rexmt_timeout(), tcp_established(), and tcp_output().

◆ dack

struct callout tcp_pcb::dack

Definition at line 112 of file tcp.h.

Referenced by segment(), tcp_closed(), tcp_dack(), and tcp_pcb_free().

◆ detached

int tcp_pcb::detached

Definition at line 122 of file tcp.h.

Referenced by segment_input(), socket_tcp_shutdown(), tcp_closed(), and tcp_fin_wait_2().

◆ dupacks

int tcp_pcb::dupacks

Definition at line 101 of file tcp.h.

Referenced by ack_input(), and rexmt_timeout().

◆ error

◆ fin_queued

int tcp_pcb::fin_queued

Definition at line 82 of file tcp.h.

Referenced by ack_input(), can_send(), send_fin(), and tcp_output().

◆ fin_received

int tcp_pcb::fin_received

Definition at line 89 of file tcp.h.

Referenced by fin_input(), socket_tcp_can_read(), and socket_tcp_recv().

◆ hnode

struct hashmap_node* tcp_pcb::hnode

Definition at line 74 of file tcp.h.

Referenced by tcp_closed(), tcp_insert(), and tcp_pcb_free().

◆ in_recovery

int tcp_pcb::in_recovery

Definition at line 102 of file tcp.h.

Referenced by ack_input(), and rexmt_timeout().

◆ irs

uint32_t tcp_pcb::irs

Definition at line 86 of file tcp.h.

Referenced by listen_input(), and syn_sent_input().

◆ iss

uint32_t tcp_pcb::iss

Definition at line 78 of file tcp.h.

Referenced by listen_input(), socket_tcp_connect(), syn_sent_input(), and tcp_send_syn().

◆ keep_probes

int tcp_pcb::keep_probes

Definition at line 108 of file tcp.h.

Referenced by keepalive_timeout(), and tcp_keepalive_reset().

◆ keepalive

int tcp_pcb::keepalive

◆ laddr

◆ lport

◆ mss

◆ next

struct tcp_pcb* tcp_pcb::next

Definition at line 73 of file tcp.h.

Referenced by bind_port(), port_used(), socket_tcp_shutdown(), tcp_listener(), tcp_pcb_free(), and tcp_pcb_new().

◆ nodelay

int tcp_pcb::nodelay

◆ ooo

struct netbuf* tcp_pcb::ooo

Definition at line 88 of file tcp.h.

Referenced by ooo_drain(), ooo_insert(), ooo_purge(), segment_input(), socket_tcp_shutdown(), and tcp_pcb_free().

◆ parent

struct tcp_pcb* tcp_pcb::parent

Definition at line 118 of file tcp.h.

Referenced by listen_input(), tcp_closed(), tcp_established(), and unlink_parent().

◆ persist

int tcp_pcb::persist

Definition at line 97 of file tcp.h.

Referenced by ack_input(), rexmt_timeout(), and tcp_output().

◆ qlen

int tcp_pcb::qlen

Definition at line 120 of file tcp.h.

Referenced by listen_input(), and unlink_parent().

◆ raddr

◆ rcv_adv

uint32_t tcp_pcb::rcv_adv

Definition at line 86 of file tcp.h.

Referenced by segment(), segment_input(), tcp_rcv_window(), and window_update().

◆ rcv_nxt

◆ rcvbuf

◆ rcvtimeo

uint64_t tcp_pcb::rcvtimeo

◆ recover

uint32_t tcp_pcb::recover

Definition at line 103 of file tcp.h.

Referenced by ack_input().

◆ retries

int tcp_pcb::retries

◆ reuseaddr

int tcp_pcb::reuseaddr

Definition at line 109 of file tcp.h.

Referenced by bind_port(), port_used(), socket_tcp_getsockopt(), and socket_tcp_setsockopt().

◆ rexmt

◆ rport

◆ rto

uint64_t tcp_pcb::rto

Definition at line 92 of file tcp.h.

Referenced by rexmt_timeout(), tcp_output(), tcp_pcb_new(), tcp_rexmt_start(), and tcp_rtt_update().

◆ rtt_seq

uint32_t tcp_pcb::rtt_seq

Definition at line 94 of file tcp.h.

Referenced by rtt_sample(), tcp_output(), and tcp_send_syn().

◆ rtt_start

uint64_t tcp_pcb::rtt_start

Definition at line 95 of file tcp.h.

Referenced by tcp_output(), and tcp_send_syn().

◆ rtt_timing

int tcp_pcb::rtt_timing

Definition at line 93 of file tcp.h.

Referenced by retransmit_first(), rexmt_timeout(), rtt_sample(), tcp_output(), and tcp_send_syn().

◆ rttvar

uint64_t tcp_pcb::rttvar

Definition at line 92 of file tcp.h.

Referenced by tcp_rtt_update().

◆ shut_rd

int tcp_pcb::shut_rd

Definition at line 125 of file tcp.h.

Referenced by socket_tcp_can_read(), socket_tcp_recv(), and socket_tcp_shut().

◆ snd_max

uint32_t tcp_pcb::snd_max

◆ snd_nxt

◆ snd_una

◆ snd_wl1

uint32_t tcp_pcb::snd_wl1

Definition at line 79 of file tcp.h.

Referenced by ack_input(), listen_input(), segment_input(), and syn_sent_input().

◆ snd_wl2

uint32_t tcp_pcb::snd_wl2

Definition at line 79 of file tcp.h.

Referenced by ack_input(), segment_input(), and syn_sent_input().

◆ snd_wnd

uint32_t tcp_pcb::snd_wnd

Definition at line 79 of file tcp.h.

Referenced by ack_input(), listen_input(), rexmt_timeout(), segment_input(), syn_sent_input(), and tcp_output().

◆ sndbuf

struct ringbuf* tcp_pcb::sndbuf

◆ sndtimeo

uint64_t tcp_pcb::sndtimeo

Definition at line 126 of file tcp.h.

Referenced by socket_tcp_getsockopt(), socket_tcp_send(), and socket_tcp_setsockopt().

◆ srtt

uint64_t tcp_pcb::srtt

Definition at line 92 of file tcp.h.

Referenced by tcp_rtt_update().

◆ ssthresh

uint32_t tcp_pcb::ssthresh

Definition at line 100 of file tcp.h.

Referenced by ack_input(), rexmt_timeout(), and tcp_pcb_new().

◆ state

◆ timer2

struct callout tcp_pcb::timer2

◆ wait

struct waitq tcp_pcb::wait

The documentation for this struct was generated from the following file:
  • kernel/include/net/tcp.h