crip/ripv2/types.go

39 lines
418 B
Go
Raw Normal View History

2024-04-10 13:59:01 +01:00
package ripv2
type Command uint8
2024-04-18 14:32:35 +01:00
type FIB uint8
2024-04-10 13:59:01 +01:00
type Version uint8
const (
ZERO Command = iota
REQUEST
RESPONSE
)
2024-04-18 14:32:35 +01:00
const (
NEW FIB = iota
TABLE
DELETE
)
2024-04-10 13:59:01 +01:00
const (
RIPv1 Version = iota + 1
RIPv2
)
type Message struct {
Command Command
Version Version
Zero uint16
2024-04-15 22:10:01 +01:00
RIP []RIP
2024-04-10 13:59:01 +01:00
}
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
}