go.ligato.io/vpp-agent/v3@v3.5.0/plugins/vpp/binapi/vpp2210/rd_cp/rd_cp.ba.go (about) 1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT. 2 3 // Package rd_cp contains generated bindings for API file rd_cp.api. 4 // 5 // Contents: 6 // - 2 messages 7 package rd_cp 8 9 import ( 10 api "go.fd.io/govpp/api" 11 codec "go.fd.io/govpp/codec" 12 interface_types "go.ligato.io/vpp-agent/v3/plugins/vpp/binapi/vpp2210/interface_types" 13 ) 14 15 // This is a compile-time assertion to ensure that this generated file 16 // is compatible with the GoVPP api package it is being compiled against. 17 // A compilation error at this line likely means your copy of the 18 // GoVPP api package needs to be updated. 19 const _ = api.GoVppAPIPackageIsVersion2 20 21 const ( 22 APIFile = "rd_cp" 23 APIVersion = "1.0.1" 24 VersionCrc = 0x871c3bee 25 ) 26 27 // IP6NdAddressAutoconfig defines message 'ip6_nd_address_autoconfig'. 28 type IP6NdAddressAutoconfig struct { 29 SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` 30 Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` 31 InstallDefaultRoutes bool `binapi:"bool,name=install_default_routes" json:"install_default_routes,omitempty"` 32 } 33 34 func (m *IP6NdAddressAutoconfig) Reset() { *m = IP6NdAddressAutoconfig{} } 35 func (*IP6NdAddressAutoconfig) GetMessageName() string { return "ip6_nd_address_autoconfig" } 36 func (*IP6NdAddressAutoconfig) GetCrcString() string { return "9e14a4a7" } 37 func (*IP6NdAddressAutoconfig) GetMessageType() api.MessageType { 38 return api.RequestMessage 39 } 40 41 func (m *IP6NdAddressAutoconfig) Size() (size int) { 42 if m == nil { 43 return 0 44 } 45 size += 4 // m.SwIfIndex 46 size += 1 // m.Enable 47 size += 1 // m.InstallDefaultRoutes 48 return size 49 } 50 func (m *IP6NdAddressAutoconfig) Marshal(b []byte) ([]byte, error) { 51 if b == nil { 52 b = make([]byte, m.Size()) 53 } 54 buf := codec.NewBuffer(b) 55 buf.EncodeUint32(uint32(m.SwIfIndex)) 56 buf.EncodeBool(m.Enable) 57 buf.EncodeBool(m.InstallDefaultRoutes) 58 return buf.Bytes(), nil 59 } 60 func (m *IP6NdAddressAutoconfig) Unmarshal(b []byte) error { 61 buf := codec.NewBuffer(b) 62 m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) 63 m.Enable = buf.DecodeBool() 64 m.InstallDefaultRoutes = buf.DecodeBool() 65 return nil 66 } 67 68 // IP6NdAddressAutoconfigReply defines message 'ip6_nd_address_autoconfig_reply'. 69 type IP6NdAddressAutoconfigReply struct { 70 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` 71 } 72 73 func (m *IP6NdAddressAutoconfigReply) Reset() { *m = IP6NdAddressAutoconfigReply{} } 74 func (*IP6NdAddressAutoconfigReply) GetMessageName() string { return "ip6_nd_address_autoconfig_reply" } 75 func (*IP6NdAddressAutoconfigReply) GetCrcString() string { return "e8d4e804" } 76 func (*IP6NdAddressAutoconfigReply) GetMessageType() api.MessageType { 77 return api.ReplyMessage 78 } 79 80 func (m *IP6NdAddressAutoconfigReply) Size() (size int) { 81 if m == nil { 82 return 0 83 } 84 size += 4 // m.Retval 85 return size 86 } 87 func (m *IP6NdAddressAutoconfigReply) Marshal(b []byte) ([]byte, error) { 88 if b == nil { 89 b = make([]byte, m.Size()) 90 } 91 buf := codec.NewBuffer(b) 92 buf.EncodeInt32(m.Retval) 93 return buf.Bytes(), nil 94 } 95 func (m *IP6NdAddressAutoconfigReply) Unmarshal(b []byte) error { 96 buf := codec.NewBuffer(b) 97 m.Retval = buf.DecodeInt32() 98 return nil 99 } 100 101 func init() { file_rd_cp_binapi_init() } 102 func file_rd_cp_binapi_init() { 103 api.RegisterMessage((*IP6NdAddressAutoconfig)(nil), "ip6_nd_address_autoconfig_9e14a4a7") 104 api.RegisterMessage((*IP6NdAddressAutoconfigReply)(nil), "ip6_nd_address_autoconfig_reply_e8d4e804") 105 } 106 107 // Messages returns list of all messages in this module. 108 func AllMessages() []api.Message { 109 return []api.Message{ 110 (*IP6NdAddressAutoconfig)(nil), 111 (*IP6NdAddressAutoconfigReply)(nil), 112 } 113 }