vpctp

package
v0.0.0-...-a9890c3 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//IPPROTO IP protocol number (unassigned)
	IPPROTO = 172

	//IPHopLimit set packet TTL
	IPHopLimit = 64
)

Variables

This section is empty.

Functions

This section is empty.

Types

type VPCTP

type VPCTP struct {
	// contains filtered or unexported fields
}

VPCTP tunnel protocol raw socket handler

func NewHandler

func NewHandler() *VPCTP

NewHandler creates a new VxLAN handler

func (*VPCTP) Send

func (vtp *VPCTP) Send(ps []protocol.Packet, addr net.IP) (int, error)

Send sends a group of packets to the specified destination

func (*VPCTP) SetHandler

func (vtp *VPCTP) SetHandler(h protocol.HandlerFunc)

SetHandler sets the receiving handler callback func

func (*VPCTP) Start

func (vtp *VPCTP) Start() error

Start starts listening for remote packets coming in

func (*VPCTP) Stop

func (vtp *VPCTP) Stop() error

Stop stop the listening socket

Jump to

Keyboard shortcuts

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