A stack which works with or without an Mbed os library. Provides IPv4 or IPv6 with a full 1500 byte buffer.

Dependents:   oldheating gps motorhome heating

Committer:
andrewboyson
Date:
Tue Oct 30 22:11:22 2018 +0000
Revision:
75:603b10404183
Parent:
72:19457bba58d0
Child:
79:f50e02fb5c94
A lot of tidying up and prevented requests other than the first packet from doing anything.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewboyson 71:736a5747ade1 1 Names
andrewboyson 71:736a5747ade1 2 =====
andrewboyson 71:736a5747ade1 3 ISN == Initial Sequence Number
andrewboyson 71:736a5747ade1 4 SEQ num == Sequence Number is the sequence of the first byte of the sent data packet - unless a SYN in which case it is the ISN
andrewboyson 71:736a5747ade1 5 ACK num == Acknowledge Number is the next sequence number that the sender of the ACK is expecting
andrewboyson 71:736a5747ade1 6 TCB == Transmission Control Block
andrewboyson 71:736a5747ade1 7 RTO == Retransmission Time Out
andrewboyson 71:736a5747ade1 8
andrewboyson 75:603b10404183 9 Only received packets with a sequence of 1 (position == 0) is handled; any others are ignored. This works because we only handle the first line.
andrewboyson 75:603b10404183 10
andrewboyson 75:603b10404183 11 From RFC793
andrewboyson 75:603b10404183 12 Reset Processing
andrewboyson 71:736a5747ade1 13
andrewboyson 75:603b10404183 14 In all states except SYN-SENT, all reset (RST) segments are validated
andrewboyson 75:603b10404183 15 by checking their SEQ-fields. A reset is valid if its sequence number
andrewboyson 75:603b10404183 16 is in the window. In the SYN-SENT state (a RST received in response
andrewboyson 75:603b10404183 17 to an initial SYN), the RST is acceptable if the ACK field
andrewboyson 75:603b10404183 18 acknowledges the SYN.
andrewboyson 71:736a5747ade1 19
andrewboyson 75:603b10404183 20 The receiver of a RST first validates it, then changes state. If the
andrewboyson 75:603b10404183 21 receiver was in the LISTEN state, it ignores it. If the receiver was
andrewboyson 75:603b10404183 22 in SYN-RECEIVED state and had previously been in the LISTEN state,
andrewboyson 75:603b10404183 23 then the receiver returns to the LISTEN state, otherwise the receiver
andrewboyson 75:603b10404183 24 aborts the connection and goes to the CLOSED state. If the receiver
andrewboyson 75:603b10404183 25 was in any other state, it aborts the connection and advises the user
andrewboyson 75:603b10404183 26 and goes to the CLOSED state.