Files
nebula/packet/outpacket.go
2025-11-13 12:02:25 -06:00

24 lines
440 B
Go

package packet
type OutPacket struct {
Segments [][]byte
//todo virtio header?
SegSize int
SegCounter int
Valid bool
wasSegmented bool
Scratch []byte
}
func NewOut() *OutPacket {
out := new(OutPacket)
const numSegments = 64
out.Segments = make([][]byte, numSegments)
for i := 0; i < numSegments; i++ { //todo this is dumb
out.Segments[i] = make([]byte, Size)
}
out.Scratch = make([]byte, Size)
return out
}