Documentation ¶
Overview ¶
Package protocol contains the types, lexer, and parser that implement the event server protocol.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { NodeID uint16 TimeStamp uint32 Size uint16 EventUUID UUID Payload map[string]string Protocol Protocol Submitter uint32 CheckSum uint32 PayloadBytes []byte IP netip.Addr }
Event is a server-emitted event.
func (*Event) MarshalBinary ¶
MarshalBinary implements the encoding.BinaryMarshaler interface.
This method marshals the entire Event object to its binary equivalent, including its CheckSum.
type Protocol ¶
type Protocol uint16
Protocol is a network protocol type
const ( // HTTP represents an event using the HTTP protocol HTTP Protocol = 0x0A // SMTP represents an event using the SMTP protocol SMTP Protocol = 0x11 // SSH represents an event using the SSH protocol SSH Protocol = 0x31 // TELNET represents an event using the Teletype Network protocol TELNET Protocol = 0x23 )
type UUID ¶
type UUID struct { TimeLow uint32 TimeMid uint16 TimeHiAndVersion uint16 ClockSeqHiAndRes byte ClockSeqLow byte Node [6]byte }
UUID is a 128-bit universally unique identifier using the format described at: https://en.wikipedia.org/wiki/Universally_unique_identifier#Format
I confirmed this is the expected format by taking a peek at the type in the emitter binary.
Click to show internal directories.
Click to hide internal directories.