diff options
Diffstat (limited to 'binapi/map')
-rw-r--r-- | binapi/map/map.ba.go | 101 | ||||
-rw-r--r-- | binapi/map/map_rpc.ba.go | 37 |
2 files changed, 125 insertions, 13 deletions
diff --git a/binapi/map/map.ba.go b/binapi/map/map.ba.go index aeb8cf7..7457841 100644 --- a/binapi/map/map.ba.go +++ b/binapi/map/map.ba.go @@ -1,13 +1,13 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0 -// VPP: 20.05.1-release +// binapi-generator: v0.3.5-56-gc0da1f2-dirty +// VPP: 21.06-release // source: /usr/share/vpp/api/plugins/map.api.json // Package maps contains generated bindings for API file map.api. // // Contents: -// 30 messages +// 32 messages // package maps @@ -26,8 +26,8 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "map" - APIVersion = "4.1.1" - VersionCrc = 0x82b79829 + APIVersion = "4.2.1" + VersionCrc = 0xd1f7f56c ) // MapAddDelRule defines message 'map_add_del_rule'. @@ -122,7 +122,7 @@ type MapAddDomain struct { func (m *MapAddDomain) Reset() { *m = MapAddDomain{} } func (*MapAddDomain) GetMessageName() string { return "map_add_domain" } -func (*MapAddDomain) GetCrcString() string { return "7a5a18c9" } +func (*MapAddDomain) GetCrcString() string { return "249f195c" } func (*MapAddDomain) GetMessageType() api.MessageType { return api.RequestMessage } @@ -297,7 +297,7 @@ type MapDomainDetails struct { func (m *MapDomainDetails) Reset() { *m = MapDomainDetails{} } func (*MapDomainDetails) GetMessageName() string { return "map_domain_details" } -func (*MapDomainDetails) GetCrcString() string { return "fc1859dd" } +func (*MapDomainDetails) GetCrcString() string { return "796edb50" } func (*MapDomainDetails) GetMessageType() api.MessageType { return api.ReplyMessage } @@ -360,6 +360,7 @@ func (m *MapDomainDetails) Unmarshal(b []byte) error { } // MapDomainDump defines message 'map_domain_dump'. +// Deprecated: the message will be removed in the future versions type MapDomainDump struct{} func (m *MapDomainDump) Reset() { *m = MapDomainDump{} } @@ -386,6 +387,76 @@ func (m *MapDomainDump) Unmarshal(b []byte) error { return nil } +// MapDomainsGet defines message 'map_domains_get'. +type MapDomainsGet struct { + Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` +} + +func (m *MapDomainsGet) Reset() { *m = MapDomainsGet{} } +func (*MapDomainsGet) GetMessageName() string { return "map_domains_get" } +func (*MapDomainsGet) GetCrcString() string { return "f75ba505" } +func (*MapDomainsGet) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *MapDomainsGet) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Cursor + return size +} +func (m *MapDomainsGet) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.Cursor) + return buf.Bytes(), nil +} +func (m *MapDomainsGet) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Cursor = buf.DecodeUint32() + return nil +} + +// MapDomainsGetReply defines message 'map_domains_get_reply'. +type MapDomainsGetReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` +} + +func (m *MapDomainsGetReply) Reset() { *m = MapDomainsGetReply{} } +func (*MapDomainsGetReply) GetMessageName() string { return "map_domains_get_reply" } +func (*MapDomainsGetReply) GetCrcString() string { return "53b48f5d" } +func (*MapDomainsGetReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *MapDomainsGetReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 4 // m.Cursor + return size +} +func (m *MapDomainsGetReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(m.Cursor) + return buf.Bytes(), nil +} +func (m *MapDomainsGetReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.Cursor = buf.DecodeUint32() + return nil +} + // MapIfEnableDisable defines message 'map_if_enable_disable'. type MapIfEnableDisable struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -469,7 +540,7 @@ type MapParamAddDelPreResolve struct { func (m *MapParamAddDelPreResolve) Reset() { *m = MapParamAddDelPreResolve{} } func (*MapParamAddDelPreResolve) GetMessageName() string { return "map_param_add_del_pre_resolve" } -func (*MapParamAddDelPreResolve) GetCrcString() string { return "17008c66" } +func (*MapParamAddDelPreResolve) GetCrcString() string { return "dae5af03" } func (*MapParamAddDelPreResolve) GetMessageType() api.MessageType { return api.RequestMessage } @@ -584,7 +655,7 @@ type MapParamGetReply struct { func (m *MapParamGetReply) Reset() { *m = MapParamGetReply{} } func (*MapParamGetReply) GetMessageName() string { return "map_param_get_reply" } -func (*MapParamGetReply) GetCrcString() string { return "28092156" } +func (*MapParamGetReply) GetCrcString() string { return "26272c90" } func (*MapParamGetReply) GetMessageType() api.MessageType { return api.ReplyMessage } @@ -1247,18 +1318,20 @@ func init() { file_maps_binapi_init() } func file_maps_binapi_init() { api.RegisterMessage((*MapAddDelRule)(nil), "map_add_del_rule_c65b32f7") api.RegisterMessage((*MapAddDelRuleReply)(nil), "map_add_del_rule_reply_e8d4e804") - api.RegisterMessage((*MapAddDomain)(nil), "map_add_domain_7a5a18c9") + api.RegisterMessage((*MapAddDomain)(nil), "map_add_domain_249f195c") api.RegisterMessage((*MapAddDomainReply)(nil), "map_add_domain_reply_3e6d4e2c") api.RegisterMessage((*MapDelDomain)(nil), "map_del_domain_8ac76db6") api.RegisterMessage((*MapDelDomainReply)(nil), "map_del_domain_reply_e8d4e804") - api.RegisterMessage((*MapDomainDetails)(nil), "map_domain_details_fc1859dd") + api.RegisterMessage((*MapDomainDetails)(nil), "map_domain_details_796edb50") api.RegisterMessage((*MapDomainDump)(nil), "map_domain_dump_51077d14") + api.RegisterMessage((*MapDomainsGet)(nil), "map_domains_get_f75ba505") + api.RegisterMessage((*MapDomainsGetReply)(nil), "map_domains_get_reply_53b48f5d") api.RegisterMessage((*MapIfEnableDisable)(nil), "map_if_enable_disable_59bb32f4") api.RegisterMessage((*MapIfEnableDisableReply)(nil), "map_if_enable_disable_reply_e8d4e804") - api.RegisterMessage((*MapParamAddDelPreResolve)(nil), "map_param_add_del_pre_resolve_17008c66") + api.RegisterMessage((*MapParamAddDelPreResolve)(nil), "map_param_add_del_pre_resolve_dae5af03") api.RegisterMessage((*MapParamAddDelPreResolveReply)(nil), "map_param_add_del_pre_resolve_reply_e8d4e804") api.RegisterMessage((*MapParamGet)(nil), "map_param_get_51077d14") - api.RegisterMessage((*MapParamGetReply)(nil), "map_param_get_reply_28092156") + api.RegisterMessage((*MapParamGetReply)(nil), "map_param_get_reply_26272c90") api.RegisterMessage((*MapParamSetFragmentation)(nil), "map_param_set_fragmentation_9ff54d90") api.RegisterMessage((*MapParamSetFragmentationReply)(nil), "map_param_set_fragmentation_reply_e8d4e804") api.RegisterMessage((*MapParamSetICMP)(nil), "map_param_set_icmp_58210cbf") @@ -1288,6 +1361,8 @@ func AllMessages() []api.Message { (*MapDelDomainReply)(nil), (*MapDomainDetails)(nil), (*MapDomainDump)(nil), + (*MapDomainsGet)(nil), + (*MapDomainsGetReply)(nil), (*MapIfEnableDisable)(nil), (*MapIfEnableDisableReply)(nil), (*MapParamAddDelPreResolve)(nil), diff --git a/binapi/map/map_rpc.ba.go b/binapi/map/map_rpc.ba.go index 8c20779..06bb1d8 100644 --- a/binapi/map/map_rpc.ba.go +++ b/binapi/map/map_rpc.ba.go @@ -17,6 +17,7 @@ type RPCService interface { MapAddDomain(ctx context.Context, in *MapAddDomain) (*MapAddDomainReply, error) MapDelDomain(ctx context.Context, in *MapDelDomain) (*MapDelDomainReply, error) MapDomainDump(ctx context.Context, in *MapDomainDump) (RPCService_MapDomainDumpClient, error) + MapDomainsGet(ctx context.Context, in *MapDomainsGet) (RPCService_MapDomainsGetClient, error) MapIfEnableDisable(ctx context.Context, in *MapIfEnableDisable) (*MapIfEnableDisableReply, error) MapParamAddDelPreResolve(ctx context.Context, in *MapParamAddDelPreResolve) (*MapParamAddDelPreResolveReply, error) MapParamGet(ctx context.Context, in *MapParamGet) (*MapParamGetReply, error) @@ -104,6 +105,42 @@ func (c *serviceClient_MapDomainDumpClient) Recv() (*MapDomainDetails, error) { } } +func (c *serviceClient) MapDomainsGet(ctx context.Context, in *MapDomainsGet) (RPCService_MapDomainsGetClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_MapDomainsGetClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_MapDomainsGetClient interface { + Recv() (*MapDomainDetails, error) + api.Stream +} + +type serviceClient_MapDomainsGetClient struct { + api.Stream +} + +func (c *serviceClient_MapDomainsGetClient) Recv() (*MapDomainDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *MapDomainDetails: + return m, nil + case *MapDomainsGetReply: + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + func (c *serviceClient) MapIfEnableDisable(ctx context.Context, in *MapIfEnableDisable) (*MapIfEnableDisableReply, error) { out := new(MapIfEnableDisableReply) err := c.conn.Invoke(ctx, in, out) |