Skip to content

user

import "hyperion-xdp/src/user"

HYPERION CONTROLLER M5 (Telemetry + Flow Tracking)

--- COLORS & VISUALS ---

const (
ColorReset = "\033[0m"
ColorRed = "\033[31m"
ColorGreen = "\033[32m"
ColorYellow = "\033[33m"
ColorBlue = "\033[34m"
ColorPurple = "\033[35m"
ColorCyan = "\033[36m"
ColorWhite = "\033[37m"
)

const (
ConfigFile = "signatures.txt"
MaxRules = 2
)

Must match Kernel Struct (struct event_t)

type AlertEvent struct {
SrcIP uint32
DstIP uint32
SrcPort uint16 // FIXED: Added to match C
DstPort uint16 // FIXED: Added to match C
Action uint32 // FIXED: Renamed from RuleID (since C sends Action)
Snippet [8]byte
}

M5: New telemetry event structure (must match struct hyp_event)

type HypEvent struct {
EventType uint8 // 0=ACCEPT, 1=DROP, 2=SIG_MATCH
SrcIP uint32
DstIP uint32
SrcPort uint16
DstPort uint16
Protocol uint8
Timestamp uint64
Signature [8]byte
// contains filtered or unexported fields
}

Must match Kernel Struct (struct policy_t)

type Policy struct {
Signature [8]uint8
SigLen uint8
Active uint8
Pad [2]uint8 // FIXED: Aligns to 12 bytes
}

Generated by gomarkdoc