go_sysutils/.net.UNFINISHED/gentypes.go

36 lines
893 B
Go

package main
type Port struct {
// The things I do.
// Number uint16 `csv:"-"`
CsvNum IanaNum `csv:"Port Number"`
// We need to map this ourselves.
// Protocol *protos.IPProto `csv:"-"`
Proto string `csv:"Transport Protocol"`
ServiceName string `csv:"Service Name"`
Description string `csv:"Description"`
// This too.
// Reserved bool `csv:"-"`
}
type Proto struct {
Name string `csv:"Keyword"`
Description string `csv:"Protocol"`
// We need to map this ourselves.
// Number uint8 `csv:"-"`
CsvNum IanaNum `csv:"Decimal"`
Reference string `csv:"Reference"`
// These too.
// Reserved bool `csv:"-"`
// IP6ExtensionHeader bool `csv:"-"`
Ip6ext Ip6ExtBool `csv:"IPv6 Extension Header"`
}
type ProtoSet []*Proto
type PortSet []*Port
type Ip6ExtBool bool
// Gorram it, IANA.
type IanaNum string