// Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: // binapi-generator: v0.6.0-dev // VPP: 22.02-release // source: /usr/share/vpp/api/core/interface.api.json // Package interfaces contains generated bindings for API file interface.api. // // Contents: // 66 messages // package interfaces import ( api "go.fd.io/govpp/api" ethernet_types "go.fd.io/govpp/binapi/ethernet_types" interface_types "go.fd.io/govpp/binapi/interface_types" ip_types "go.fd.io/govpp/binapi/ip_types" codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the GoVPP api package it is being compiled against. // A compilation error at this line likely means your copy of the // GoVPP api package needs to be updated. const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "interface" APIVersion = "3.2.3" VersionCrc = 0x13ab947a ) // CollectDetailedInterfaceStats defines message 'collect_detailed_interface_stats'. type CollectDetailedInterfaceStats struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"` } func (m *CollectDetailedInterfaceStats) Reset() { *m = CollectDetailedInterfaceStats{} } func (*CollectDetailedInterfaceStats) GetMessageName() string { return "collect_detailed_interface_stats" } func (*CollectDetailedInterfaceStats) GetCrcString() string { return "5501adee" } func (*CollectDetailedInterfaceStats) GetMessageType() api.MessageType { return api.RequestMessage } func (m *CollectDetailedInterfaceStats) Size() (size int) { if m == nil { return 0 } size += 4 // m.SwIfIndex size += 1 // m.EnableDisable return size } func (m *CollectDetailedInterfaceStats) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeUint32(uint32(m.SwIfIndex)) buf.EncodeBool(m.EnableDisable) return buf.Bytes(), nil } func (m *CollectDetailedInterfaceStats) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) m.EnableDisable = buf.DecodeBool() return nil } // CollectDetailedInterfaceStatsReply defines message 'collect_detailed_interface_stats_reply'. type CollectDetailedInterfaceStatsReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } func (m *CollectDetailedInterfaceStatsReply) Reset() { *m = CollectDetailedInterfaceStatsReply{} } func (*CollectDetailedInterfaceStatsReply) GetMessageName() string { return "collect_detailed_interface_stats_reply" } func (*CollectDetailedInterfaceStatsReply) GetCrcString() string { return "e8d4e804" } func (*CollectDetailedInterfaceStatsReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *CollectDetailedInterfaceStatsReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval return size } func (m *CollectDetailedInterfaceStatsReply) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeInt32(m.Retval) return buf.Bytes(), nil } func (m *CollectDetailedInterfaceStatsReply) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.Retval = buf.DecodeInt32() return nil } // CreateLoopback defines message 'create_loopback'. type CreateLoopback struct { MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"` } func (m *CreateLoopback) Reset() { *m = CreateLoopback{} } func (*CreateLoopback) GetMessageName() string { return "create_loopback" } func (*CreateLoopback) GetCrcString() string { return "42bb5d22" } func (*CreateLoopback) GetMessageType() api.MessageType { return api.RequestMessage } func (m *CreateLoopback) Size() (size int) { if m == nil { return 0 } size += 1 * 6 // m.MacAddress return size } func (m *CreateLoopback) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeBytes(m.MacAddress[:], 6) return buf.Bytes(), nil } func (m *CreateLoopback) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) copy(m.MacAddress[:], buf.DecodeBytes(6)) return nil } // CreateLoopbackInstance defines message 'create_loopback_instance'. type CreateLoopbackInstance struct { MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"` IsSpecified bool `binapi:"bool,name=is_specified" json:"is_specified,omitempty"` UserInstance uint32 `binapi:"u32,name=user_instance" json:"user_instance,omitempty"` } func (m *CreateLoopbackInstance) Reset() { *m = CreateLoopbackInstance{} } func (*CreateLoopbackInstance) GetMessageName() string { return "create_loopback_instance" } func (*CreateLoopbackInstance) GetCrcString() string { return "d36a3ee2" } func (*CreateLoopbackInstance) GetMessageType() api.MessageType { return api.RequestMessage } func (m *CreateLoopbackInstance) Size() (size int) { if m == nil { return 0 } size += 1 * 6 // m.MacAddress size += 1 // m.IsSpecified size += 4 // m.UserInstance return size } func (m *CreateLoopbackInstance) Marshal(b []byte) ([]byte, error) { if b == nil { b = make([]byte, m.Size()) } buf := codec.NewBuffer(b) buf.EncodeBytes(m.MacAddress[:], 6) buf.EncodeBool(m.IsSpecified) buf.EncodeUint32(m.UserInstance) return buf.Bytes(), nil } func (m *CreateLoopbackInstance) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) copy(m.MacAddress[:], buf.DecodeBytes(6)) m.IsSpecified = buf.DecodeBool() m.UserInstance = buf.DecodeUint32() return nil } // CreateLoopbackInstanceReply defines message 'create_loopback_instance_reply'. type CreateLoopbackInstanceReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` } func (m *CreateLoopbackInstanceReply) Reset() { *m = CreateLoopbackInstanceReply{} } func (*CreateLoopbackInstanceReply) GetMessageName() string { return "create_loopback_instance_reply" } func (*CreateLoopbackInstanceReply) GetCrcString() string { return "5383d31f" } func (*CreateLoopbackInstanceReply) GetMessageType() api.MessageType { return api.ReplyMessage } func (m *CreateLoopbackInstanceReply) Size() (size int) { if m == nil { return 0 } size += 4 // m.Retval size += 4 // m.SwI
/*
* Copyright (c) 2015 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __included_ip6_hop_by_hop_packet_h__
#define __included_ip6_hop_by_hop_packet_h__
typedef struct
{
/* Protocol for next header */
u8 protocol;
/*
* Length of hop_by_hop header in 8 octet units,
* not including the first 8 octets
*/
u8 length;
} ip6_hop_by_hop_header_t;
typedef struct
{
/* Option Type */
#define HBH_OPTION_TYPE_SKIP_UNKNOWN (0x00)
#define HBH_OPTION_TYPE_DISCARD_UNKNOWN (0x40)
#define HBH_OPTION_TYPE_DISCARD_UNKNOWN_ICMP (0x80)
#define HBH_OPTION_TYPE_DISCARD_UNKNOWN_ICMP_NOT_MCAST (0xc0)
#define HBH_OPTION_TYPE_HIGH_ORDER_BITS (0xc0)
#define HBH_OPTION_TYPE_DATA_CHANGE_ENROUTE (1<<5)
u8 type;
/* Length in octets of the option data field */
u8 length;
} ip6_hop_by_hop_option_t;
/* $$$$ IANA banana constants */
#define HBH_OPTION_TYPE_IOAM_TRACE_DATA_LIST 59 /* Third highest bit set (change en-route) */
#define HBH_OPTION_TYPE_IOAM_PROOF_OF_TRANSIT 60 /* Third highest bit set (change en-route) */
#define HBH_OPTION_TYPE_IOAM_EDGE_TO_EDGE 29
#endif /* __included_ip6_hop_by_hop_packet_h__ */
/*
* fd.io coding-style-patch-verification: ON
*
* Local Variables:
* eval: (c-set-style "gnu")
* End:
*/