mirror of
https://github.com/soypat/lneto.git
synced 2026-09-02 04:49:02 +00:00
add ipv6 to xnet.StackAsync (#107)
* add ipv6 to xnet.StackAsync * dns improvements * improve DNS workings of StackAsync * add tentative ICMPv6 * work on prefixes and fix some small bugs, plan UDP/TCP6 * fix bugs in StackAsync and ipv4.Prefix.Contains * update arpsubtable * completely remove legacy internet.StackIP for StackIPv4/v6 * ipv4/ipv6 tcp/udp * add TCP6/UDP6 dialing APIs * add xnet.Stack6 interface * more ipv6 integration into StackAsync; various tweaks to lneto and documentation+TODOs * add stack6 tests * replace netip.Prefix with ipv4.Prefix where it makes sense
This commit is contained in:
+7
-7
@@ -175,6 +175,13 @@ func (tcb *ControlBlock) MakeChallengeACK() Segment {
|
||||
}
|
||||
}
|
||||
|
||||
// recvSpace contains Receive Sequence Space data. Its sequence numbers correspond to remote data.
|
||||
type recvSpace struct {
|
||||
IRS Value // initial receive sequence number, defined by remote in SYN segment received.
|
||||
NXT Value // receive next. seqs before this have been acked. this seq and up to NXT+WND-1 are allowed to be sent. Corresponds to remote data.
|
||||
WND Size // receive window defined by local. Permitted number of remote unacked octets in flight.
|
||||
}
|
||||
|
||||
// sendSpace contains Send Sequence Space data. Its sequence numbers correspond to local data.
|
||||
type sendSpace struct {
|
||||
ISS Value // initial send sequence number, defined locally on connection start
|
||||
@@ -201,13 +208,6 @@ func (snd *sendSpace) maxSend() Size {
|
||||
}
|
||||
}
|
||||
|
||||
// recvSpace contains Receive Sequence Space data. Its sequence numbers correspond to remote data.
|
||||
type recvSpace struct {
|
||||
IRS Value // initial receive sequence number, defined by remote in SYN segment received.
|
||||
NXT Value // receive next. seqs before this have been acked. this seq and up to NXT+WND-1 are allowed to be sent. Corresponds to remote data.
|
||||
WND Size // receive window defined by local. Permitted number of remote unacked octets in flight.
|
||||
}
|
||||
|
||||
// Open implements a passive opening of a connection (wait for incoming packets from an unknown remote port).
|
||||
// Upon success [ControlBlock] enters LISTEN state, such as that of a server.
|
||||
// To open an active connection use [ControlBlock.Send] with a segment generated with [ClientSynSegment].
|
||||
|
||||
@@ -135,7 +135,6 @@ func (listener *Listener) Encapsulate(carrierData []byte, offsetToIP, offsetToFr
|
||||
if listener.isClosed() {
|
||||
return 0, net.ErrClosed
|
||||
}
|
||||
//listener.trace("listener:encaps", slog.Uint64("port", uint64(listener.port)))
|
||||
// First try incoming connections (for handshake SYN-ACK).
|
||||
for i := range listener.incoming {
|
||||
conn := listener.incoming[i].conn
|
||||
|
||||
Reference in New Issue
Block a user