crip/ripv2/types.go

32 lines
363 B
Go
Raw Normal View History

2024-04-10 13:59:01 +01:00
package ripv2
type Command uint8
type Version uint8
const (
ZERO Command = iota
REQUEST
RESPONSE
)
const (
RIPv1 Version = iota + 1
RIPv2
)
type Message struct {
Command Command
Version Version
Zero uint16
RIP [25]RIP
}
type RIP struct {
AFI uint16
RouteTag uint16
2024-04-10 16:33:33 +01:00
Addr uint32
Subnet uint32
Nexthop uint32
2024-04-10 13:59:01 +01:00
Metric uint32
}