protocol

package
v0.0.0-...-36347d3 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckError

func CheckError(err error)

Types

type Client

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

Client holds the connection to the Redis database

func Connect

func Connect() (*Client, error)

Connect connects to the Redis database

func (Client) AddRawTrainPacket

func (client Client) AddRawTrainPacket(transport string, allowBlock bool, conn RawConnectionPackets)

AddRawTrainPacket adds a complete raw packet to the training data set. Eventually we will use this in lieu of AddTrainPacket, currently we use both.

func (Client) AddTrainPacket

func (client Client) AddTrainPacket(transport string, allowBlock bool, conn ConnectionPackets)

AddTrainPacket adds a packet to the training data set

type ConnectionPackets

type ConnectionPackets struct {
	Incoming gopacket.Packet
	Outgoing gopacket.Packet
}

ConnectionPackets holds an incoming packet and an outgoing packet

type RawConnectionPackets

type RawConnectionPackets struct {
	Incoming []gopacket.Packet
	Outgoing []gopacket.Packet
}

RawConnectionPackets holds a slice of incoming packets and a slice of outgoing packet

type RawPacket

type RawPacket struct {
	Connection string `gorethink:"connection"`
	IPPacket   []byte `gorethink:"ip_packet"`
	TCPPacket  []byte `gorethink:"tcp_packet"`
	Payload    []byte `gorethink:"payload"`
	Timestamp  int64  `gorethink:"timestamp"`
	AllowBlock bool   `gorethink:"allow_block"`
	InOut      bool   `gorethink:"in_out"`
	Handshake  bool   `gorethink:"handshake"`
}

Jump to

Keyboard shortcuts

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