publish

package
v1.65.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package publish is a generated protocol buffer package.

It is generated from these files:

publish/hep.proto

It has these top-level messages:

HEP

Index

Constants

View Source
const (
	Version   = 1  // Chunk 0x0001 IP protocol family (0x02=IPv4, 0x0a=IPv6)
	Protocol  = 2  // Chunk 0x0002 IP protocol ID (0x06=TCP, 0x11=UDP)
	IP4SrcIP  = 3  // Chunk 0x0003 IPv4 source address
	IP4DstIP  = 4  // Chunk 0x0004 IPv4 destination address
	IP6SrcIP  = 5  // Chunk 0x0005 IPv6 source address
	IP6DstIP  = 6  // Chunk 0x0006 IPv6 destination address
	SrcPort   = 7  // Chunk 0x0007 Protocol source port
	DstPort   = 8  // Chunk 0x0008 Protocol destination port
	Tsec      = 9  // Chunk 0x0009 Unix timestamp, seconds
	Tmsec     = 10 // Chunk 0x000a Unix timestamp, microseconds
	ProtoType = 11 // Chunk 0x000b Protocol type (DNS, LOG, RTCP, SIP)
	NodeID    = 12 // Chunk 0x000c Capture client ID
	NodePW    = 14 // Chunk 0x000e Authentication key (plain text / TLS connection)
	Payload   = 15 // Chunk 0x000f Captured packet payload
	CID       = 17 // Chunk 0x0011 Correlation ID
	Vlan      = 18 // Chunk 0x0012 VLAN
	NodeName  = 19 // Chunk 0x0013 NodeName
)

HEP chuncks

Variables

View Source
var (
	ErrInvalidLengthHep = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowHep   = fmt.Errorf("proto: integer overflow")
)

Functions

func EncodeHEP

func EncodeHEP(h *decoder.Packet) (hepMsg []byte, err error)

EncodeHEP creates the HEP Packet which will be send to wire

Types

type FileOutputer

type FileOutputer struct {
}

func NewFileOutputer

func NewFileOutputer() (*FileOutputer, error)

func (*FileOutputer) Output

func (fo *FileOutputer) Output(msg []byte)

type HEP

type HEP struct {
	Version   uint32 `protobuf:"varint,1,req,name=Version" json:"Version"`
	Protocol  uint32 `protobuf:"varint,2,req,name=Protocol" json:"Protocol"`
	SrcIP     string `protobuf:"bytes,3,req,name=SrcIP" json:"SrcIP"`
	DstIP     string `protobuf:"bytes,4,req,name=DstIP" json:"DstIP"`
	SrcPort   uint32 `protobuf:"varint,5,req,name=SrcPort" json:"SrcPort"`
	DstPort   uint32 `protobuf:"varint,6,req,name=DstPort" json:"DstPort"`
	Tsec      uint32 `protobuf:"varint,7,req,name=Tsec" json:"Tsec"`
	Tmsec     uint32 `protobuf:"varint,8,req,name=Tmsec" json:"Tmsec"`
	ProtoType uint32 `protobuf:"varint,9,req,name=ProtoType" json:"ProtoType"`
	NodeID    uint32 `protobuf:"varint,10,req,name=NodeID" json:"NodeID"`
	NodePW    string `protobuf:"bytes,11,req,name=NodePW" json:"NodePW"`
	Payload   string `protobuf:"bytes,12,req,name=Payload" json:"Payload"`
	CID       string `protobuf:"bytes,13,req,name=CID" json:"CID"`
	Vlan      uint32 `protobuf:"varint,14,req,name=Vlan" json:"Vlan"`
}

HEP represents HEP packet

func NewPopulatedHEP

func NewPopulatedHEP(r randyHep, easy bool) *HEP

func (*HEP) Descriptor

func (*HEP) Descriptor() ([]byte, []int)

func (*HEP) Equal

func (this *HEP) Equal(that interface{}) bool

func (*HEP) GetCID

func (m *HEP) GetCID() string

func (*HEP) GetDstIP

func (m *HEP) GetDstIP() string

func (*HEP) GetDstPort

func (m *HEP) GetDstPort() uint32

func (*HEP) GetNodeID

func (m *HEP) GetNodeID() uint32

func (*HEP) GetNodePW

func (m *HEP) GetNodePW() string

func (*HEP) GetPayload

func (m *HEP) GetPayload() string

func (*HEP) GetProtoType

func (m *HEP) GetProtoType() uint32

func (*HEP) GetProtocol

func (m *HEP) GetProtocol() uint32

func (*HEP) GetSrcIP

func (m *HEP) GetSrcIP() string

func (*HEP) GetSrcPort

func (m *HEP) GetSrcPort() uint32

func (*HEP) GetTmsec

func (m *HEP) GetTmsec() uint32

func (*HEP) GetTsec

func (m *HEP) GetTsec() uint32

func (*HEP) GetVersion

func (m *HEP) GetVersion() uint32

func (*HEP) GetVlan

func (m *HEP) GetVlan() uint32

func (*HEP) GoString

func (this *HEP) GoString() string

func (*HEP) Marshal

func (m *HEP) Marshal() (dAtA []byte, err error)

func (*HEP) MarshalTo

func (m *HEP) MarshalTo(dAtA []byte) (int, error)

func (*HEP) ProtoMessage

func (*HEP) ProtoMessage()

func (*HEP) Reset

func (m *HEP) Reset()

func (*HEP) Size

func (m *HEP) Size() (n int)

func (*HEP) String

func (this *HEP) String() string

func (*HEP) Unmarshal

func (m *HEP) Unmarshal(dAtA []byte) error

type HEPConn

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

type HEPOutputer

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

func NewHEPOutputer

func NewHEPOutputer(serverAddr string) (*HEPOutputer, error)

func (*HEPOutputer) Close

func (h *HEPOutputer) Close(n int)

func (*HEPOutputer) ConnectServer

func (h *HEPOutputer) ConnectServer(n int) (err error)

func (*HEPOutputer) Output

func (h *HEPOutputer) Output(msg []byte)

func (*HEPOutputer) ReConnect

func (h *HEPOutputer) ReConnect(n int) (err error)

func (*HEPOutputer) Send

func (h *HEPOutputer) Send(msg []byte)

func (*HEPOutputer) Start

func (h *HEPOutputer) Start()

type HepMsg

type HepMsg struct {
	Version   byte
	Protocol  byte
	SrcIP     net.IP
	DstIP     net.IP
	SrcPort   uint16
	DstPort   uint16
	Tsec      uint32
	Tmsec     uint32
	ProtoType byte
	NodeID    uint32
	NodePW    string
	Payload   []byte
	CID       []byte
	Vlan      uint16
	NodeName  string
}

HepMsg represents a parsed HEP packet

func DecodeHEP

func DecodeHEP(packet []byte) (*HepMsg, error)

DecodeHEP returns a parsed HEP message

func (*HepMsg) Marshal

func (h *HepMsg) Marshal() (dAtA []byte, err error)

func (*HepMsg) MarshalTo

func (h *HepMsg) MarshalTo(dAtA []byte) (int, error)

func (*HepMsg) Size

func (h *HepMsg) Size() (n int)

func (*HepMsg) String

func (h *HepMsg) String() string

type Outputer

type Outputer interface {
	Output(msg []byte)
}

type Publisher

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

func NewPublisher

func NewPublisher(out Outputer) *Publisher

func (*Publisher) Start

func (pub *Publisher) Start(pq chan *decoder.Packet)

Jump to

Keyboard shortcuts

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