packet_injector

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2017 License: Apache-2.0 Imports: 14 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
	WSAsyncClient *shttp.WSAsyncClient
	Graph         *graph.Graph
}

func NewServer

func NewServer(client *shttp.WSAsyncClient, graph *graph.Graph) *PacketInjectorServer

func (*PacketInjectorServer) OnMessage

func (pis *PacketInjectorServer) OnMessage(msg shttp.WSMessage)

type PacketParams

type PacketParams struct {
	SrcNode *graph.Node
	DstNode *graph.Node
	Type    string
	Payload string
	Count   int
}

Jump to

Keyboard shortcuts

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