Add userspace flow implementation (#3393)

This commit is contained in:
Viktor Liu
2025-02-28 11:08:35 +01:00
committed by GitHub
parent cccc615783
commit fa748a7ec2
27 changed files with 862 additions and 569 deletions
+37 -2
View File
@@ -7,17 +7,52 @@ import (
"github.com/google/uuid"
)
type Protocol uint8
const (
ProtocolUnknown = 0
ICMP = 1
TCP = 6
UDP = 17
)
func (p Protocol) String() string {
switch p {
case 1:
return "ICMP"
case 6:
return "TCP"
case 17:
return "UDP"
default:
return "unknown"
}
}
type Type int
const (
TypeStart = iota
TypeUnknown = iota
TypeStart
TypeEnd
)
type Direction int
func (d Direction) String() string {
switch d {
case Ingress:
return "ingress"
case Egress:
return "egress"
default:
return "unknown"
}
}
const (
Ingress = iota
DirectionUnknown = iota
Ingress
Egress
)