packet_injector

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Namespace = "Packet_Injection"
)

Variables

This section is empty.

Functions

func InjectPacket

func InjectPacket(pp *PacketParams, g *graph.Graph) error

Types

type PacketInjectorClient

type PacketInjectorClient struct {
	shttp.DefaultWSServerEventHandler
	WSServer *shttp.WSServer
	// contains filtered or unexported fields
}

func NewPacketInjectorClient

func NewPacketInjectorClient(w *shttp.WSServer) *PacketInjectorClient

func (*PacketInjectorClient) InjectPacket

func (pc *PacketInjectorClient) InjectPacket(host string, pp *PacketParams) error

func (*PacketInjectorClient) OnMessage

func (pc *PacketInjectorClient) OnMessage(c *shttp.WSClient, m shttp.WSMessage)

type PacketInjectorServer

type PacketInjectorServer struct {
	shttp.DefaultWSClientEventHandler
	WSAsyncClientPool *shttp.WSAsyncClientPool
	Graph             *graph.Graph
}

func NewServer

func NewServer(wspool *shttp.WSAsyncClientPool, graph *graph.Graph) *PacketInjectorServer

func (*PacketInjectorServer) OnMessage

func (pis *PacketInjectorServer) OnMessage(c *shttp.WSAsyncClient, msg shttp.WSMessage)

type PacketParams

type PacketParams struct {
	SrcNodeID graph.Identifier `valid:"nonzero"`
	SrcIP     string           `valid:"nonzero"`
	SrcMAC    string           `valid:"nonzero"`
	DstIP     string           `valid:"nonzero"`
	DstMAC    string           `valid:"nonzero"`
	Type      string           `valid:"nonzero"`
	Payload   string
	Count     int `valid:"nonzero"`
}

Jump to

Keyboard shortcuts

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