ingress

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

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

func (fb *FrameBuf) Processed() bool

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) Reset

func (fb *FrameBuf) Reset()

Reset resets the metadata of a FrameBuf.

func (*FrameBuf) SetProcessed

func (fb *FrameBuf) SetProcessed()

SetProcessed marks a frame as being processed.

func (*FrameBuf) String

func (fb *FrameBuf) String() string

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.

type Worker

type Worker struct {
	log.Logger
	Remote *snet.Addr
	SessId mgmt.SessionType
	Ring   *ringbuf.Ring
	// contains filtered or unexported fields
}

Worker handles decapsulation of SIG frames.

func NewWorker

func NewWorker(remote *snet.Addr, sessId mgmt.SessionType) *Worker

func (*Worker) Run

func (w *Worker) Run()

func (*Worker) Stop

func (w *Worker) Stop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL