Documentation
¶
Index ¶
- Constants
- Variables
- func Bind(id int, local EndPoint) psErr.E
- func Connect(id int, foreign EndPoint) psErr.E
- func Listen(id int, backlogSize int) psErr.E
- func Open() (int, psErr.E)
- func Receive(msg *mw.TcpRxMessage) psErr.E
- func Send(pcb *PCB, flag Flag, data []byte) psErr.E
- func Start(wg *sync.WaitGroup) psErr.E
- func Stop()
- type Backlog
- type EndPoint
- type Flag
- type Hdr
- type PCB
- type PseudoHdr
- type SegmentInfo
Constants ¶
View Source
const ( HdrLenMax = 60 // byte HdrLenMin = 20 )
Variables ¶
View Source
var PcbRepo *pcbRepo
Functions ¶
Types ¶
type Hdr ¶
type Hdr struct { Src uint16 // source port Dst uint16 // destination port Seq uint32 // sequence number Ack uint32 // acknowledgement number Offset uint8 // offset (4bits), reserved (3bits), ns (1bit) Flag Flag // cwr, ece, urg, ack, psh, rst, syn, fin Wnd uint16 // window size Checksum uint16 Urg uint16 // urgent pointer }
type PCB ¶
type PCB struct { ID int State int // tcp state Local EndPoint // local address/port Foreign EndPoint // foreign address/port MTU uint16 // maximum transmission unit MSS uint16 // maximum segment size SND struct { UNA uint32 // oldest unacknowledged sequence number NXT uint32 // next sequence number to be sent WND uint16 // window size UP uint16 // urgent pointer to be sent WL1 uint32 // segment sequence number at Last window update WL2 uint32 // segment acknowledgment number at Last window update } RCV struct { NXT uint32 // next sequence number to receive WND uint16 // window size UP uint16 // urgent pointer to receive } ISS uint32 IRS uint32 // initial receive sequence number // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.