Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(tio io.ReadWriteCloser) error
Types ¶
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
Dispatcher reads new encapsulated packets, classifies the packet by source ISD-AS -> source host Addr -> Sess Id and hands it off to the appropriate Worker, starting a new one if none currently exists.
func (*Dispatcher) Run ¶
func (d *Dispatcher) Run() error
type FrameBuf ¶
type FrameBuf struct {
// contains filtered or unexported fields
}
FrameBuf is a struct used to reassemble encapsulated packets spread over multiple SIG frames. It contains the raw bytes and metadata needed for reassembly.
func NewFrameBuf ¶
func NewFrameBuf() *FrameBuf
func (*FrameBuf) ProcessCompletePkts ¶
func (fb *FrameBuf) ProcessCompletePkts()
ProcessCompletePkts write all complete packets in the frame to the wire and sets the correct metadata in case there is a fragment at the end of the frame.
func (*FrameBuf) Processed ¶
Processed returns true if all fragments in the frame have been processed,
func (*FrameBuf) Release ¶
func (fb *FrameBuf) Release()
Release reset the FrameBuf and releases it back to the ringbuf (if set).
func (*FrameBuf) SetProcessed ¶
func (fb *FrameBuf) SetProcessed()
SetProcessed marks a frame as being processed.
type ReassemblyList ¶
type ReassemblyList struct {
// contains filtered or unexported fields
}
ReassemblyList is used to keep a doubly linked list of SIG frames that are outstanding for reassembly. The frames kept in the reassambly list sorted by their sequence numbers. There is always one reassembly list per epoch to ensure that sequence numbers are monotonically increasing.
func NewReassemblyList ¶
func NewReassemblyList(epoch int, capacity int, s sender) *ReassemblyList
NewReassemblyList returns a ReassemblyList object for the given epoch and with given maximum capacity.
func (*ReassemblyList) Insert ¶
func (l *ReassemblyList) Insert(frame *FrameBuf)
Insert inserts a frame into the reassembly list. After inserting the frame at the correct position, Insert tries to reassemble packets that involve the newly added frame. Completely processed frames get removed from the list and released to the pool of frame buffers.