mactime

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package mactime contains generated bindings for API file mactime.api.

Contents:

2 aliases
6 enums
2 structs
7 messages

Index

Constants

View Source
const (
	APIFile    = "mactime"
	APIVersion = "2.0.0"
	VersionCrc = 0xd32f01e0
)

Variables

View Source
var (
	IfStatusFlags_name = map[uint32]string{
		1: "IF_STATUS_API_FLAG_ADMIN_UP",
		2: "IF_STATUS_API_FLAG_LINK_UP",
	}
	IfStatusFlags_value = map[string]uint32{
		"IF_STATUS_API_FLAG_ADMIN_UP": 1,
		"IF_STATUS_API_FLAG_LINK_UP":  2,
	}
)
View Source
var (
	IfType_name = map[uint32]string{
		1: "IF_API_TYPE_HARDWARE",
		2: "IF_API_TYPE_SUB",
		3: "IF_API_TYPE_P2P",
		4: "IF_API_TYPE_PIPE",
	}
	IfType_value = map[string]uint32{
		"IF_API_TYPE_HARDWARE": 1,
		"IF_API_TYPE_SUB":      2,
		"IF_API_TYPE_P2P":      3,
		"IF_API_TYPE_PIPE":     4,
	}
)
View Source
var (
	LinkDuplex_name = map[uint32]string{
		0: "LINK_DUPLEX_API_UNKNOWN",
		1: "LINK_DUPLEX_API_HALF",
		2: "LINK_DUPLEX_API_FULL",
	}
	LinkDuplex_value = map[string]uint32{
		"LINK_DUPLEX_API_UNKNOWN": 0,
		"LINK_DUPLEX_API_HALF":    1,
		"LINK_DUPLEX_API_FULL":    2,
	}
)
View Source
var (
	MtuProto_name = map[uint32]string{
		1: "MTU_PROTO_API_L3",
		2: "MTU_PROTO_API_IP4",
		3: "MTU_PROTO_API_IP6",
		4: "MTU_PROTO_API_MPLS",
		5: "MTU_PROTO_API_N",
	}
	MtuProto_value = map[string]uint32{
		"MTU_PROTO_API_L3":   1,
		"MTU_PROTO_API_IP4":  2,
		"MTU_PROTO_API_IP6":  3,
		"MTU_PROTO_API_MPLS": 4,
		"MTU_PROTO_API_N":    5,
	}
)
View Source
var (
	RxMode_name = map[uint32]string{
		0: "RX_MODE_API_UNKNOWN",
		1: "RX_MODE_API_POLLING",
		2: "RX_MODE_API_INTERRUPT",
		3: "RX_MODE_API_ADAPTIVE",
		4: "RX_MODE_API_DEFAULT",
	}
	RxMode_value = map[string]uint32{
		"RX_MODE_API_UNKNOWN":   0,
		"RX_MODE_API_POLLING":   1,
		"RX_MODE_API_INTERRUPT": 2,
		"RX_MODE_API_ADAPTIVE":  3,
		"RX_MODE_API_DEFAULT":   4,
	}
)
View Source
var (
	SubIfFlags_name = map[uint32]string{
		1:   "SUB_IF_API_FLAG_NO_TAGS",
		2:   "SUB_IF_API_FLAG_ONE_TAG",
		4:   "SUB_IF_API_FLAG_TWO_TAGS",
		8:   "SUB_IF_API_FLAG_DOT1AD",
		16:  "SUB_IF_API_FLAG_EXACT_MATCH",
		32:  "SUB_IF_API_FLAG_DEFAULT",
		64:  "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
		128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
		254: "SUB_IF_API_FLAG_MASK_VNET",
		256: "SUB_IF_API_FLAG_DOT1AH",
	}
	SubIfFlags_value = map[string]uint32{
		"SUB_IF_API_FLAG_NO_TAGS":           1,
		"SUB_IF_API_FLAG_ONE_TAG":           2,
		"SUB_IF_API_FLAG_TWO_TAGS":          4,
		"SUB_IF_API_FLAG_DOT1AD":            8,
		"SUB_IF_API_FLAG_EXACT_MATCH":       16,
		"SUB_IF_API_FLAG_DEFAULT":           32,
		"SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
		"SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
		"SUB_IF_API_FLAG_MASK_VNET":         254,
		"SUB_IF_API_FLAG_DOT1AH":            256,
	}
)

Functions

func AllMessages

func AllMessages() []api.Message

Messages returns list of all messages in this module.

Types

type IfStatusFlags

type IfStatusFlags uint32

IfStatusFlags defines enum 'if_status_flags'.

const (
	IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
	IF_STATUS_API_FLAG_LINK_UP  IfStatusFlags = 2
)

func (IfStatusFlags) String

func (x IfStatusFlags) String() string

type IfType

type IfType uint32

IfType defines enum 'if_type'.

const (
	IF_API_TYPE_HARDWARE IfType = 1
	IF_API_TYPE_SUB      IfType = 2
	IF_API_TYPE_P2P      IfType = 3
	IF_API_TYPE_PIPE     IfType = 4
)

func (IfType) String

func (x IfType) String() string

type InterfaceIndex

type InterfaceIndex uint32

InterfaceIndex defines alias 'interface_index'.

type LinkDuplex

type LinkDuplex uint32

LinkDuplex defines enum 'link_duplex'.

const (
	LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
	LINK_DUPLEX_API_HALF    LinkDuplex = 1
	LINK_DUPLEX_API_FULL    LinkDuplex = 2
)

func (LinkDuplex) String

func (x LinkDuplex) String() string

type MacAddress

type MacAddress [6]uint8

MacAddress defines alias 'mac_address'.

func ParseMacAddress

func ParseMacAddress(s string) (MacAddress, error)

func (*MacAddress) MarshalText

func (x *MacAddress) MarshalText() ([]byte, error)

func (MacAddress) String

func (x MacAddress) String() string

func (MacAddress) ToMAC

func (x MacAddress) ToMAC() net.HardwareAddr

func (*MacAddress) UnmarshalText

func (x *MacAddress) UnmarshalText(text []byte) error

type MactimeAddDelRange

type MactimeAddDelRange struct {
	IsAdd      bool        `binapi:"bool,name=is_add" json:"is_add,omitempty"`
	Drop       bool        `binapi:"bool,name=drop" json:"drop,omitempty"`
	Allow      bool        `binapi:"bool,name=allow" json:"allow,omitempty"`
	AllowQuota uint8       `binapi:"u8,name=allow_quota" json:"allow_quota,omitempty"`
	NoUDP10001 bool        `binapi:"bool,name=no_udp_10001" json:"no_udp_10001,omitempty"`
	DataQuota  uint64      `binapi:"u64,name=data_quota" json:"data_quota,omitempty"`
	MacAddress MacAddress  `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
	DeviceName string      `binapi:"string[64],name=device_name" json:"device_name,omitempty"`
	Count      uint32      `binapi:"u32,name=count" json:"-"`
	Ranges     []TimeRange `binapi:"time_range[count],name=ranges" json:"ranges,omitempty"`
}

MactimeAddDelRange defines message 'mactime_add_del_range'.

func (*MactimeAddDelRange) GetCrcString

func (*MactimeAddDelRange) GetCrcString() string

func (*MactimeAddDelRange) GetMessageName

func (*MactimeAddDelRange) GetMessageName() string

func (*MactimeAddDelRange) GetMessageType

func (*MactimeAddDelRange) GetMessageType() api.MessageType

func (*MactimeAddDelRange) Marshal

func (m *MactimeAddDelRange) Marshal(b []byte) ([]byte, error)

func (*MactimeAddDelRange) Reset

func (m *MactimeAddDelRange) Reset()

func (*MactimeAddDelRange) Size

func (m *MactimeAddDelRange) Size() (size int)

func (*MactimeAddDelRange) Unmarshal

func (m *MactimeAddDelRange) Unmarshal(b []byte) error

type MactimeAddDelRangeReply

type MactimeAddDelRangeReply struct {
	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}

MactimeAddDelRangeReply defines message 'mactime_add_del_range_reply'.

func (*MactimeAddDelRangeReply) GetCrcString

func (*MactimeAddDelRangeReply) GetCrcString() string

func (*MactimeAddDelRangeReply) GetMessageName

func (*MactimeAddDelRangeReply) GetMessageName() string

func (*MactimeAddDelRangeReply) GetMessageType

func (*MactimeAddDelRangeReply) GetMessageType() api.MessageType

func (*MactimeAddDelRangeReply) Marshal

func (m *MactimeAddDelRangeReply) Marshal(b []byte) ([]byte, error)

func (*MactimeAddDelRangeReply) Reset

func (m *MactimeAddDelRangeReply) Reset()

func (*MactimeAddDelRangeReply) Size

func (m *MactimeAddDelRangeReply) Size() (size int)

func (*MactimeAddDelRangeReply) Unmarshal

func (m *MactimeAddDelRangeReply) Unmarshal(b []byte) error

type MactimeDetails

type MactimeDetails struct {
	PoolIndex       uint32             `binapi:"u32,name=pool_index" json:"pool_index,omitempty"`
	MacAddress      MacAddress         `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"`
	DataQuota       uint64             `binapi:"u64,name=data_quota" json:"data_quota,omitempty"`
	DataUsedInRange uint64             `binapi:"u64,name=data_used_in_range" json:"data_used_in_range,omitempty"`
	Flags           uint32             `binapi:"u32,name=flags" json:"flags,omitempty"`
	DeviceName      string             `binapi:"string[64],name=device_name" json:"device_name,omitempty"`
	Nranges         uint32             `binapi:"u32,name=nranges" json:"-"`
	Ranges          []MactimeTimeRange `binapi:"mactime_time_range[nranges],name=ranges" json:"ranges,omitempty"`
}

MactimeDetails defines message 'mactime_details'.

func (*MactimeDetails) GetCrcString

func (*MactimeDetails) GetCrcString() string

func (*MactimeDetails) GetMessageName

func (*MactimeDetails) GetMessageName() string

func (*MactimeDetails) GetMessageType

func (*MactimeDetails) GetMessageType() api.MessageType

func (*MactimeDetails) Marshal

func (m *MactimeDetails) Marshal(b []byte) ([]byte, error)

func (*MactimeDetails) Reset

func (m *MactimeDetails) Reset()

func (*MactimeDetails) Size

func (m *MactimeDetails) Size() (size int)

func (*MactimeDetails) Unmarshal

func (m *MactimeDetails) Unmarshal(b []byte) error

type MactimeDump

type MactimeDump struct {
	MyTableEpoch uint32 `binapi:"u32,name=my_table_epoch" json:"my_table_epoch,omitempty"`
}

MactimeDump defines message 'mactime_dump'.

func (*MactimeDump) GetCrcString

func (*MactimeDump) GetCrcString() string

func (*MactimeDump) GetMessageName

func (*MactimeDump) GetMessageName() string

func (*MactimeDump) GetMessageType

func (*MactimeDump) GetMessageType() api.MessageType

func (*MactimeDump) Marshal

func (m *MactimeDump) Marshal(b []byte) ([]byte, error)

func (*MactimeDump) Reset

func (m *MactimeDump) Reset()

func (*MactimeDump) Size

func (m *MactimeDump) Size() (size int)

func (*MactimeDump) Unmarshal

func (m *MactimeDump) Unmarshal(b []byte) error

type MactimeDumpReply

type MactimeDumpReply struct {
	Retval     int32  `binapi:"i32,name=retval" json:"retval,omitempty"`
	TableEpoch uint32 `binapi:"u32,name=table_epoch" json:"table_epoch,omitempty"`
}

MactimeDumpReply defines message 'mactime_dump_reply'.

func (*MactimeDumpReply) GetCrcString

func (*MactimeDumpReply) GetCrcString() string

func (*MactimeDumpReply) GetMessageName

func (*MactimeDumpReply) GetMessageName() string

func (*MactimeDumpReply) GetMessageType

func (*MactimeDumpReply) GetMessageType() api.MessageType

func (*MactimeDumpReply) Marshal

func (m *MactimeDumpReply) Marshal(b []byte) ([]byte, error)

func (*MactimeDumpReply) Reset

func (m *MactimeDumpReply) Reset()

func (*MactimeDumpReply) Size

func (m *MactimeDumpReply) Size() (size int)

func (*MactimeDumpReply) Unmarshal

func (m *MactimeDumpReply) Unmarshal(b []byte) error

type MactimeEnableDisable

type MactimeEnableDisable struct {
	EnableDisable bool           `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
	SwIfIndex     InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
}

MactimeEnableDisable defines message 'mactime_enable_disable'.

func (*MactimeEnableDisable) GetCrcString

func (*MactimeEnableDisable) GetCrcString() string

func (*MactimeEnableDisable) GetMessageName

func (*MactimeEnableDisable) GetMessageName() string

func (*MactimeEnableDisable) GetMessageType

func (*MactimeEnableDisable) GetMessageType() api.MessageType

func (*MactimeEnableDisable) Marshal

func (m *MactimeEnableDisable) Marshal(b []byte) ([]byte, error)

func (*MactimeEnableDisable) Reset

func (m *MactimeEnableDisable) Reset()

func (*MactimeEnableDisable) Size

func (m *MactimeEnableDisable) Size() (size int)

func (*MactimeEnableDisable) Unmarshal

func (m *MactimeEnableDisable) Unmarshal(b []byte) error

type MactimeEnableDisableReply

type MactimeEnableDisableReply struct {
	Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
}

MactimeEnableDisableReply defines message 'mactime_enable_disable_reply'.

func (*MactimeEnableDisableReply) GetCrcString

func (*MactimeEnableDisableReply) GetCrcString() string

func (*MactimeEnableDisableReply) GetMessageName

func (*MactimeEnableDisableReply) GetMessageName() string

func (*MactimeEnableDisableReply) GetMessageType

func (*MactimeEnableDisableReply) GetMessageType() api.MessageType

func (*MactimeEnableDisableReply) Marshal

func (m *MactimeEnableDisableReply) Marshal(b []byte) ([]byte, error)

func (*MactimeEnableDisableReply) Reset

func (m *MactimeEnableDisableReply) Reset()

func (*MactimeEnableDisableReply) Size

func (m *MactimeEnableDisableReply) Size() (size int)

func (*MactimeEnableDisableReply) Unmarshal

func (m *MactimeEnableDisableReply) Unmarshal(b []byte) error

type MactimeTimeRange

type MactimeTimeRange struct {
	Start float64 `binapi:"f64,name=start" json:"start,omitempty"`
	End   float64 `binapi:"f64,name=end" json:"end,omitempty"`
}

MactimeTimeRange defines type 'mactime_time_range'.

type MtuProto

type MtuProto uint32

MtuProto defines enum 'mtu_proto'.

const (
	MTU_PROTO_API_L3   MtuProto = 1
	MTU_PROTO_API_IP4  MtuProto = 2
	MTU_PROTO_API_IP6  MtuProto = 3
	MTU_PROTO_API_MPLS MtuProto = 4
	MTU_PROTO_API_N    MtuProto = 5
)

func (MtuProto) String

func (x MtuProto) String() string

type RPCService

type RPCService interface {
	MactimeAddDelRange(ctx context.Context, in *MactimeAddDelRange) (*MactimeAddDelRangeReply, error)
	MactimeDump(ctx context.Context, in *MactimeDump) (RPCService_MactimeDumpClient, error)
	MactimeEnableDisable(ctx context.Context, in *MactimeEnableDisable) (*MactimeEnableDisableReply, error)
}

RPCService defines RPC service mactime.

func NewServiceClient

func NewServiceClient(conn api.Connection) RPCService

type RPCService_MactimeDumpClient

type RPCService_MactimeDumpClient interface {
	Recv() (*MactimeDetails, error)
	api.Stream
}

type RxMode

type RxMode uint32

RxMode defines enum 'rx_mode'.

const (
	RX_MODE_API_UNKNOWN   RxMode = 0
	RX_MODE_API_POLLING   RxMode = 1
	RX_MODE_API_INTERRUPT RxMode = 2
	RX_MODE_API_ADAPTIVE  RxMode = 3
	RX_MODE_API_DEFAULT   RxMode = 4
)

func (RxMode) String

func (x RxMode) String() string

type SubIfFlags

type SubIfFlags uint32

SubIfFlags defines enum 'sub_if_flags'.

const (
	SUB_IF_API_FLAG_NO_TAGS           SubIfFlags = 1
	SUB_IF_API_FLAG_ONE_TAG           SubIfFlags = 2
	SUB_IF_API_FLAG_TWO_TAGS          SubIfFlags = 4
	SUB_IF_API_FLAG_DOT1AD            SubIfFlags = 8
	SUB_IF_API_FLAG_EXACT_MATCH       SubIfFlags = 16
	SUB_IF_API_FLAG_DEFAULT           SubIfFlags = 32
	SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
	SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
	SUB_IF_API_FLAG_MASK_VNET         SubIfFlags = 254
	SUB_IF_API_FLAG_DOT1AH            SubIfFlags = 256
)

func (SubIfFlags) String

func (x SubIfFlags) String() string

type TimeRange

type TimeRange struct {
	Start float64 `binapi:"f64,name=start" json:"start,omitempty"`
	End   float64 `binapi:"f64,name=end" json:"end,omitempty"`
}

TimeRange defines type 'time_range'.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL