diff options
author | Nathan Skrzypczak <nathan.skrzypczak@gmail.com> | 2022-04-27 18:39:03 +0200 |
---|---|---|
committer | Nathan Skrzypczak <nathan.skrzypczak@gmail.com> | 2022-05-30 18:49:13 +0200 |
commit | 4102c72bce694babd94a481b1201d33895a6f9c5 (patch) | |
tree | 1b11238ca4706008c88712f26942dd74ab9c14a6 /binapi/ip | |
parent | a4112fac7b86fe09650d2bb57969fe46404edd7d (diff) |
Update generated binapi to v22.02 & makefile changes
This patch does some small updates to the Makefile.
* `make gen-binapi-from-code` is removed, and moves to
`gen-binapi-local`
* `make build` is patched to build cmd & examples
* `make binapi-generator` to build the api-generator
without other binaries, as they typically require its
output to build.
* `make gen-binapi-local` runs the locally built binapi-generator
to update the local bindings. It expects ${VPP_DIR} to be set and
to point to a local vpp repository checked out with the right version
* `make gen-binapi-internal` runs the locally built binapi-generator
to update the bindings in `internal/testbinapi/binapi2001`
Regarding VPP, notable changes when moving to v22.02 are :
- ControlPing moved from vpe to memclnt
- CliInband went from vpe to vlib
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Change-Id: Ie5cd2d5ded7ecaffd9abc3ca675df40be272b1fa
Diffstat (limited to 'binapi/ip')
-rw-r--r-- | binapi/ip/ip.ba.go | 414 | ||||
-rw-r--r-- | binapi/ip/ip_rpc.ba.go | 110 |
2 files changed, 496 insertions, 28 deletions
diff --git a/binapi/ip/ip.ba.go b/binapi/ip/ip.ba.go index 9545f8a..6ac92e3 100644 --- a/binapi/ip/ip.ba.go +++ b/binapi/ip/ip.ba.go @@ -1,15 +1,15 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: // binapi-generator: v0.5.0-dev -// VPP: 21.06-release +// VPP: 22.02-release // source: /usr/share/vpp/api/core/ip.api.json // Package ip contains generated bindings for API file ip.api. // // Contents: // 2 enums -// 6 structs -// 81 messages +// 7 structs +// 87 messages // package ip @@ -33,8 +33,8 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "ip" - APIVersion = "3.1.0" - VersionCrc = 0x972432b4 + APIVersion = "3.2.0" + VersionCrc = 0x557b5866 ) // IPReassType defines enum 'ip_reass_type'. @@ -180,6 +180,165 @@ type PuntRedirect struct { Nh ip_types.Address `binapi:"address,name=nh" json:"nh,omitempty"` } +// PuntRedirectV2 defines type 'punt_redirect_v2'. +type PuntRedirectV2 struct { + RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index,default=4294967295" json:"rx_sw_if_index,omitempty"` + Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"` + NPaths uint32 `binapi:"u32,name=n_paths" json:"-"` + Paths []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"` +} + +// AddDelIPPuntRedirectV2 defines message 'add_del_ip_punt_redirect_v2'. +type AddDelIPPuntRedirectV2 struct { + IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` + Punt PuntRedirectV2 `binapi:"punt_redirect_v2,name=punt" json:"punt,omitempty"` +} + +func (m *AddDelIPPuntRedirectV2) Reset() { *m = AddDelIPPuntRedirectV2{} } +func (*AddDelIPPuntRedirectV2) GetMessageName() string { return "add_del_ip_punt_redirect_v2" } +func (*AddDelIPPuntRedirectV2) GetCrcString() string { return "9e804227" } +func (*AddDelIPPuntRedirectV2) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *AddDelIPPuntRedirectV2) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.IsAdd + size += 4 // m.Punt.RxSwIfIndex + size += 1 // m.Punt.Af + size += 4 // m.Punt.NPaths + for j2 := 0; j2 < len(m.Punt.Paths); j2++ { + var s2 fib_types.FibPath + _ = s2 + if j2 < len(m.Punt.Paths) { + s2 = m.Punt.Paths[j2] + } + size += 4 // s2.SwIfIndex + size += 4 // s2.TableID + size += 4 // s2.RpfID + size += 1 // s2.Weight + size += 1 // s2.Preference + size += 4 // s2.Type + size += 4 // s2.Flags + size += 4 // s2.Proto + size += 1 * 16 // s2.Nh.Address + size += 4 // s2.Nh.ViaLabel + size += 4 // s2.Nh.ObjID + size += 4 // s2.Nh.ClassifyTableIndex + size += 1 // s2.NLabels + for j3 := 0; j3 < 16; j3++ { + size += 1 // s2.LabelStack[j3].IsUniform + size += 4 // s2.LabelStack[j3].Label + size += 1 // s2.LabelStack[j3].TTL + size += 1 // s2.LabelStack[j3].Exp + } + } + return size +} +func (m *AddDelIPPuntRedirectV2) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.IsAdd) + buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex)) + buf.EncodeUint8(uint8(m.Punt.Af)) + buf.EncodeUint32(uint32(len(m.Punt.Paths))) + for j1 := 0; j1 < len(m.Punt.Paths); j1++ { + var v1 fib_types.FibPath // Paths + if j1 < len(m.Punt.Paths) { + v1 = m.Punt.Paths[j1] + } + buf.EncodeUint32(v1.SwIfIndex) + buf.EncodeUint32(v1.TableID) + buf.EncodeUint32(v1.RpfID) + buf.EncodeUint8(v1.Weight) + buf.EncodeUint8(v1.Preference) + buf.EncodeUint32(uint32(v1.Type)) + buf.EncodeUint32(uint32(v1.Flags)) + buf.EncodeUint32(uint32(v1.Proto)) + buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16) + buf.EncodeUint32(v1.Nh.ViaLabel) + buf.EncodeUint32(v1.Nh.ObjID) + buf.EncodeUint32(v1.Nh.ClassifyTableIndex) + buf.EncodeUint8(v1.NLabels) + for j2 := 0; j2 < 16; j2++ { + buf.EncodeUint8(v1.LabelStack[j2].IsUniform) + buf.EncodeUint32(v1.LabelStack[j2].Label) + buf.EncodeUint8(v1.LabelStack[j2].TTL) + buf.EncodeUint8(v1.LabelStack[j2].Exp) + } + } + return buf.Bytes(), nil +} +func (m *AddDelIPPuntRedirectV2) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsAdd = buf.DecodeBool() + m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.Punt.Af = ip_types.AddressFamily(buf.DecodeUint8()) + m.Punt.NPaths = buf.DecodeUint32() + m.Punt.Paths = make([]fib_types.FibPath, m.Punt.NPaths) + for j1 := 0; j1 < len(m.Punt.Paths); j1++ { + m.Punt.Paths[j1].SwIfIndex = buf.DecodeUint32() + m.Punt.Paths[j1].TableID = buf.DecodeUint32() + m.Punt.Paths[j1].RpfID = buf.DecodeUint32() + m.Punt.Paths[j1].Weight = buf.DecodeUint8() + m.Punt.Paths[j1].Preference = buf.DecodeUint8() + m.Punt.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32()) + m.Punt.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32()) + m.Punt.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) + copy(m.Punt.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Punt.Paths[j1].Nh.ViaLabel = buf.DecodeUint32() + m.Punt.Paths[j1].Nh.ObjID = buf.DecodeUint32() + m.Punt.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32() + m.Punt.Paths[j1].NLabels = buf.DecodeUint8() + for j2 := 0; j2 < 16; j2++ { + m.Punt.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8() + m.Punt.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32() + m.Punt.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8() + m.Punt.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8() + } + } + return nil +} + +// AddDelIPPuntRedirectV2Reply defines message 'add_del_ip_punt_redirect_v2_reply'. +type AddDelIPPuntRedirectV2Reply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *AddDelIPPuntRedirectV2Reply) Reset() { *m = AddDelIPPuntRedirectV2Reply{} } +func (*AddDelIPPuntRedirectV2Reply) GetMessageName() string { + return "add_del_ip_punt_redirect_v2_reply" +} +func (*AddDelIPPuntRedirectV2Reply) GetCrcString() string { return "e8d4e804" } +func (*AddDelIPPuntRedirectV2Reply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *AddDelIPPuntRedirectV2Reply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *AddDelIPPuntRedirectV2Reply) 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 *AddDelIPPuntRedirectV2Reply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + // IoamDisable defines message 'ioam_disable'. type IoamDisable struct { ID uint16 `binapi:"u16,name=id" json:"id,omitempty"` @@ -1438,6 +1597,7 @@ func (m *IPPuntPoliceReply) Unmarshal(b []byte) error { } // IPPuntRedirect defines message 'ip_punt_redirect'. +// Deprecated: the message will be removed in the future versions type IPPuntRedirect struct { Punt PuntRedirect `binapi:"punt_redirect,name=punt" json:"punt,omitempty"` IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -1563,6 +1723,7 @@ func (m *IPPuntRedirectDump) Unmarshal(b []byte) error { } // IPPuntRedirectReply defines message 'ip_punt_redirect_reply'. +// Deprecated: the message will be removed in the future versions type IPPuntRedirectReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -1595,6 +1756,155 @@ func (m *IPPuntRedirectReply) Unmarshal(b []byte) error { return nil } +// IPPuntRedirectV2Details defines message 'ip_punt_redirect_v2_details'. +type IPPuntRedirectV2Details struct { + Punt PuntRedirectV2 `binapi:"punt_redirect_v2,name=punt" json:"punt,omitempty"` +} + +func (m *IPPuntRedirectV2Details) Reset() { *m = IPPuntRedirectV2Details{} } +func (*IPPuntRedirectV2Details) GetMessageName() string { return "ip_punt_redirect_v2_details" } +func (*IPPuntRedirectV2Details) GetCrcString() string { return "7ba42e1d" } +func (*IPPuntRedirectV2Details) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPPuntRedirectV2Details) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Punt.RxSwIfIndex + size += 1 // m.Punt.Af + size += 4 // m.Punt.NPaths + for j2 := 0; j2 < len(m.Punt.Paths); j2++ { + var s2 fib_types.FibPath + _ = s2 + if j2 < len(m.Punt.Paths) { + s2 = m.Punt.Paths[j2] + } + size += 4 // s2.SwIfIndex + size += 4 // s2.TableID + size += 4 // s2.RpfID + size += 1 // s2.Weight + size += 1 // s2.Preference + size += 4 // s2.Type + size += 4 // s2.Flags + size += 4 // s2.Proto + size += 1 * 16 // s2.Nh.Address + size += 4 // s2.Nh.ViaLabel + size += 4 // s2.Nh.ObjID + size += 4 // s2.Nh.ClassifyTableIndex + size += 1 // s2.NLabels + for j3 := 0; j3 < 16; j3++ { + size += 1 // s2.LabelStack[j3].IsUniform + size += 4 // s2.LabelStack[j3].Label + size += 1 // s2.LabelStack[j3].TTL + size += 1 // s2.LabelStack[j3].Exp + } + } + return size +} +func (m *IPPuntRedirectV2Details) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(uint32(m.Punt.RxSwIfIndex)) + buf.EncodeUint8(uint8(m.Punt.Af)) + buf.EncodeUint32(uint32(len(m.Punt.Paths))) + for j1 := 0; j1 < len(m.Punt.Paths); j1++ { + var v1 fib_types.FibPath // Paths + if j1 < len(m.Punt.Paths) { + v1 = m.Punt.Paths[j1] + } + buf.EncodeUint32(v1.SwIfIndex) + buf.EncodeUint32(v1.TableID) + buf.EncodeUint32(v1.RpfID) + buf.EncodeUint8(v1.Weight) + buf.EncodeUint8(v1.Preference) + buf.EncodeUint32(uint32(v1.Type)) + buf.EncodeUint32(uint32(v1.Flags)) + buf.EncodeUint32(uint32(v1.Proto)) + buf.EncodeBytes(v1.Nh.Address.XXX_UnionData[:], 16) + buf.EncodeUint32(v1.Nh.ViaLabel) + buf.EncodeUint32(v1.Nh.ObjID) + buf.EncodeUint32(v1.Nh.ClassifyTableIndex) + buf.EncodeUint8(v1.NLabels) + for j2 := 0; j2 < 16; j2++ { + buf.EncodeUint8(v1.LabelStack[j2].IsUniform) + buf.EncodeUint32(v1.LabelStack[j2].Label) + buf.EncodeUint8(v1.LabelStack[j2].TTL) + buf.EncodeUint8(v1.LabelStack[j2].Exp) + } + } + return buf.Bytes(), nil +} +func (m *IPPuntRedirectV2Details) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Punt.RxSwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.Punt.Af = ip_types.AddressFamily(buf.DecodeUint8()) + m.Punt.NPaths = buf.DecodeUint32() + m.Punt.Paths = make([]fib_types.FibPath, m.Punt.NPaths) + for j1 := 0; j1 < len(m.Punt.Paths); j1++ { + m.Punt.Paths[j1].SwIfIndex = buf.DecodeUint32() + m.Punt.Paths[j1].TableID = buf.DecodeUint32() + m.Punt.Paths[j1].RpfID = buf.DecodeUint32() + m.Punt.Paths[j1].Weight = buf.DecodeUint8() + m.Punt.Paths[j1].Preference = buf.DecodeUint8() + m.Punt.Paths[j1].Type = fib_types.FibPathType(buf.DecodeUint32()) + m.Punt.Paths[j1].Flags = fib_types.FibPathFlags(buf.DecodeUint32()) + m.Punt.Paths[j1].Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) + copy(m.Punt.Paths[j1].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Punt.Paths[j1].Nh.ViaLabel = buf.DecodeUint32() + m.Punt.Paths[j1].Nh.ObjID = buf.DecodeUint32() + m.Punt.Paths[j1].Nh.ClassifyTableIndex = buf.DecodeUint32() + m.Punt.Paths[j1].NLabels = buf.DecodeUint8() + for j2 := 0; j2 < 16; j2++ { + m.Punt.Paths[j1].LabelStack[j2].IsUniform = buf.DecodeUint8() + m.Punt.Paths[j1].LabelStack[j2].Label = buf.DecodeUint32() + m.Punt.Paths[j1].LabelStack[j2].TTL = buf.DecodeUint8() + m.Punt.Paths[j1].LabelStack[j2].Exp = buf.DecodeUint8() + } + } + return nil +} + +// IPPuntRedirectV2Dump defines message 'ip_punt_redirect_v2_dump'. +type IPPuntRedirectV2Dump struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"` +} + +func (m *IPPuntRedirectV2Dump) Reset() { *m = IPPuntRedirectV2Dump{} } +func (*IPPuntRedirectV2Dump) GetMessageName() string { return "ip_punt_redirect_v2_dump" } +func (*IPPuntRedirectV2Dump) GetCrcString() string { return "d817a484" } +func (*IPPuntRedirectV2Dump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPPuntRedirectV2Dump) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.SwIfIndex + size += 1 // m.Af + return size +} +func (m *IPPuntRedirectV2Dump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeUint8(uint8(m.Af)) + return buf.Bytes(), nil +} +func (m *IPPuntRedirectV2Dump) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.Af = ip_types.AddressFamily(buf.DecodeUint8()) + return nil +} + // IPReassemblyEnableDisable defines message 'ip_reassembly_enable_disable'. type IPReassemblyEnableDisable struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -3150,6 +3460,88 @@ func (m *IPTableAddDelReply) Unmarshal(b []byte) error { return nil } +// IPTableAllocate defines message 'ip_table_allocate'. +type IPTableAllocate struct { + Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` +} + +func (m *IPTableAllocate) Reset() { *m = IPTableAllocate{} } +func (*IPTableAllocate) GetMessageName() string { return "ip_table_allocate" } +func (*IPTableAllocate) GetCrcString() string { return "b9d2e09e" } +func (*IPTableAllocate) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPTableAllocate) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Table.TableID + size += 1 // m.Table.IsIP6 + size += 64 // m.Table.Name + return size +} +func (m *IPTableAllocate) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.Table.TableID) + buf.EncodeBool(m.Table.IsIP6) + buf.EncodeString(m.Table.Name, 64) + return buf.Bytes(), nil +} +func (m *IPTableAllocate) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Table.TableID = buf.DecodeUint32() + m.Table.IsIP6 = buf.DecodeBool() + m.Table.Name = buf.DecodeString(64) + return nil +} + +// IPTableAllocateReply defines message 'ip_table_allocate_reply'. +type IPTableAllocateReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` +} + +func (m *IPTableAllocateReply) Reset() { *m = IPTableAllocateReply{} } +func (*IPTableAllocateReply) GetMessageName() string { return "ip_table_allocate_reply" } +func (*IPTableAllocateReply) GetCrcString() string { return "1728303a" } +func (*IPTableAllocateReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPTableAllocateReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 4 // m.Table.TableID + size += 1 // m.Table.IsIP6 + size += 64 // m.Table.Name + return size +} +func (m *IPTableAllocateReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(m.Table.TableID) + buf.EncodeBool(m.Table.IsIP6) + buf.EncodeString(m.Table.Name, 64) + return buf.Bytes(), nil +} +func (m *IPTableAllocateReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.Table.TableID = buf.DecodeUint32() + m.Table.IsIP6 = buf.DecodeBool() + m.Table.Name = buf.DecodeString(64) + return nil +} + // IPTableDetails defines message 'ip_table_details'. type IPTableDetails struct { Table IPTable `binapi:"ip_table,name=table" json:"table,omitempty"` @@ -4054,6 +4446,8 @@ func (m *SwInterfaceIP6SetLinkLocalAddressReply) Unmarshal(b []byte) error { func init() { file_ip_binapi_init() } func file_ip_binapi_init() { + api.RegisterMessage((*AddDelIPPuntRedirectV2)(nil), "add_del_ip_punt_redirect_v2_9e804227") + api.RegisterMessage((*AddDelIPPuntRedirectV2Reply)(nil), "add_del_ip_punt_redirect_v2_reply_e8d4e804") api.RegisterMessage((*IoamDisable)(nil), "ioam_disable_6b16a45e") api.RegisterMessage((*IoamDisableReply)(nil), "ioam_disable_reply_e8d4e804") api.RegisterMessage((*IoamEnable)(nil), "ioam_enable_51ccd868") @@ -4087,6 +4481,8 @@ func file_ip_binapi_init() { api.RegisterMessage((*IPPuntRedirectDetails)(nil), "ip_punt_redirect_details_2cef63e7") api.RegisterMessage((*IPPuntRedirectDump)(nil), "ip_punt_redirect_dump_2d033de4") api.RegisterMessage((*IPPuntRedirectReply)(nil), "ip_punt_redirect_reply_e8d4e804") + api.RegisterMessage((*IPPuntRedirectV2Details)(nil), "ip_punt_redirect_v2_details_7ba42e1d") + api.RegisterMessage((*IPPuntRedirectV2Dump)(nil), "ip_punt_redirect_v2_dump_d817a484") api.RegisterMessage((*IPReassemblyEnableDisable)(nil), "ip_reassembly_enable_disable_eb77968d") api.RegisterMessage((*IPReassemblyEnableDisableReply)(nil), "ip_reassembly_enable_disable_reply_e8d4e804") api.RegisterMessage((*IPReassemblyGet)(nil), "ip_reassembly_get_ea13ff63") @@ -4111,6 +4507,8 @@ func file_ip_binapi_init() { api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), "ip_source_and_port_range_check_interface_add_del_reply_e8d4e804") api.RegisterMessage((*IPTableAddDel)(nil), "ip_table_add_del_0ffdaec0") api.RegisterMessage((*IPTableAddDelReply)(nil), "ip_table_add_del_reply_e8d4e804") + api.RegisterMessage((*IPTableAllocate)(nil), "ip_table_allocate_b9d2e09e") + api.RegisterMessage((*IPTableAllocateReply)(nil), "ip_table_allocate_reply_1728303a") api.RegisterMessage((*IPTableDetails)(nil), "ip_table_details_c79fca0f") api.RegisterMessage((*IPTableDump)(nil), "ip_table_dump_51077d14") api.RegisterMessage((*IPTableFlush)(nil), "ip_table_flush_b9d2e09e") @@ -4140,6 +4538,8 @@ func file_ip_binapi_init() { // Messages returns list of all messages in this module. func AllMessages() []api.Message { return []api.Message{ + (*AddDelIPPuntRedirectV2)(nil), + (*AddDelIPPuntRedirectV2Reply)(nil), (*IoamDisable)(nil), (*IoamDisableReply)(nil), (*IoamEnable)(nil), @@ -4173,6 +4573,8 @@ func AllMessages() []api.Message { (*IPPuntRedirectDetails)(nil), (*IPPuntRedirectDump)(nil), (*IPPuntRedirectReply)(nil), + (*IPPuntRedirectV2Details)(nil), + (*IPPuntRedirectV2Dump)(nil), (*IPReassemblyEnableDisable)(nil), (*IPReassemblyEnableDisableReply)(nil), (*IPReassemblyGet)(nil), @@ -4197,6 +4599,8 @@ func AllMessages() []api.Message { (*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), (*IPTableAddDel)(nil), (*IPTableAddDelReply)(nil), + (*IPTableAllocate)(nil), + (*IPTableAllocateReply)(nil), (*IPTableDetails)(nil), (*IPTableDump)(nil), (*IPTableFlush)(nil), diff --git a/binapi/ip/ip_rpc.ba.go b/binapi/ip/ip_rpc.ba.go index d40089b..6e78673 100644 --- a/binapi/ip/ip_rpc.ba.go +++ b/binapi/ip/ip_rpc.ba.go @@ -8,11 +8,12 @@ import ( "io" api "git.fd.io/govpp.git/api" - vpe "git.fd.io/govpp.git/binapi/vpe" + memclnt "git.fd.io/govpp.git/binapi/memclnt" ) // RPCService defines RPC service ip. type RPCService interface { + AddDelIPPuntRedirectV2(ctx context.Context, in *AddDelIPPuntRedirectV2) (*AddDelIPPuntRedirectV2Reply, error) IoamDisable(ctx context.Context, in *IoamDisable) (*IoamDisableReply, error) IoamEnable(ctx context.Context, in *IoamEnable) (*IoamEnableReply, error) IPAddressDump(ctx context.Context, in *IPAddressDump) (RPCService_IPAddressDumpClient, error) @@ -29,6 +30,7 @@ type RPCService interface { IPPuntPolice(ctx context.Context, in *IPPuntPolice) (*IPPuntPoliceReply, error) IPPuntRedirect(ctx context.Context, in *IPPuntRedirect) (*IPPuntRedirectReply, error) IPPuntRedirectDump(ctx context.Context, in *IPPuntRedirectDump) (RPCService_IPPuntRedirectDumpClient, error) + IPPuntRedirectV2Dump(ctx context.Context, in *IPPuntRedirectV2Dump) (RPCService_IPPuntRedirectV2DumpClient, error) IPReassemblyEnableDisable(ctx context.Context, in *IPReassemblyEnableDisable) (*IPReassemblyEnableDisableReply, error) IPReassemblyGet(ctx context.Context, in *IPReassemblyGet) (*IPReassemblyGetReply, error) IPReassemblySet(ctx context.Context, in *IPReassemblySet) (*IPReassemblySetReply, error) @@ -41,6 +43,7 @@ type RPCService interface { IPSourceAndPortRangeCheckAddDel(ctx context.Context, in *IPSourceAndPortRangeCheckAddDel) (*IPSourceAndPortRangeCheckAddDelReply, error) IPSourceAndPortRangeCheckInterfaceAddDel(ctx context.Context, in *IPSourceAndPortRangeCheckInterfaceAddDel) (*IPSourceAndPortRangeCheckInterfaceAddDelReply, error) IPTableAddDel(ctx context.Context, in *IPTableAddDel) (*IPTableAddDelReply, error) + IPTableAllocate(ctx context.Context, in *IPTableAllocate) (*IPTableAllocateReply, error) IPTableDump(ctx context.Context, in *IPTableDump) (RPCService_IPTableDumpClient, error) IPTableFlush(ctx context.Context, in *IPTableFlush) (*IPTableFlushReply, error) IPTableReplaceBegin(ctx context.Context, in *IPTableReplaceBegin) (*IPTableReplaceBeginReply, error) @@ -63,6 +66,15 @@ func NewServiceClient(conn api.Connection) RPCService { return &serviceClient{conn} } +func (c *serviceClient) AddDelIPPuntRedirectV2(ctx context.Context, in *AddDelIPPuntRedirectV2) (*AddDelIPPuntRedirectV2Reply, error) { + out := new(AddDelIPPuntRedirectV2Reply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + func (c *serviceClient) IoamDisable(ctx context.Context, in *IoamDisable) (*IoamDisableReply, error) { out := new(IoamDisableReply) err := c.conn.Invoke(ctx, in, out) @@ -90,7 +102,7 @@ func (c *serviceClient) IPAddressDump(ctx context.Context, in *IPAddressDump) (R if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -113,7 +125,7 @@ func (c *serviceClient_IPAddressDumpClient) Recv() (*IPAddressDetails, error) { switch m := msg.(type) { case *IPAddressDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.ControlPingReply: err = c.Stream.Close() if err != nil { return nil, err @@ -142,7 +154,7 @@ func (c *serviceClient) IPContainerProxyDump(ctx context.Context, in *IPContaine if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -165,7 +177,7 @@ func (c *serviceClient_IPContainerProxyDumpClient) Recv() (*IPContainerProxyDeta switch m := msg.(type) { case *IPContainerProxyDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.ControlPingReply: err = c.Stream.Close() if err != nil { return nil, err @@ -185,7 +197,7 @@ func (c *serviceClient) IPDump(ctx context.Context, in *IPDump) (RPCService_IPDu if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -208,7 +220,7 @@ func (c *serviceClient_IPDumpClient) Recv() (*IPDetails, error) { switch m := msg.(type) { case *IPDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.ControlPingReply: err = c.Stream.Close() if err != nil { return nil, err @@ -237,7 +249,7 @@ func (c *serviceClient) IPMrouteDump(ctx context.Context, in *IPMrouteDump) (RPC if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -260,7 +272,7 @@ func (c *serviceClient_IPMrouteDumpClient) Recv() (*IPMrouteDetails, error) { switch m := msg.(type) { case *IPMrouteDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.ControlPingReply: err = c.Stream.Close() if err != nil { return nil, err @@ -280,7 +292,7 @@ func (c *serviceClient) IPMtableDump(ctx context.Context, in *IPMtableDump) (RPC if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -303,7 +315,7 @@ func (c *serviceClient_IPMtableDumpClient) Recv() (*IPMtableDetails, error) { switch m := msg.(type) { case *IPMtableDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.ControlPingReply: err = c.Stream.Close() if err != nil { return nil, err @@ -408,7 +420,7 @@ func (c *serviceClient) IPPuntRedirectDump(ctx context.Context, in *IPPuntRedire if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -431,7 +443,50 @@ func (c *serviceClient_IPPuntRedirectDumpClient) Recv() (*IPPuntRedirectDetails, switch m := msg.(type) { case *IPPuntRedirectDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.ControlPingReply: + err = c.Stream.Close() + if err != nil { + return nil, err + } + return nil, io.EOF + default: + return nil, fmt.Errorf("unexpected message: %T %v", m, m) + } +} + +func (c *serviceClient) IPPuntRedirectV2Dump(ctx context.Context, in *IPPuntRedirectV2Dump) (RPCService_IPPuntRedirectV2DumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_IPPuntRedirectV2DumpClient{stream} + if err := x.Stream.SendMsg(in); err != nil { + return nil, err + } + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { + return nil, err + } + return x, nil +} + +type RPCService_IPPuntRedirectV2DumpClient interface { + Recv() (*IPPuntRedirectV2Details, error) + api.Stream +} + +type serviceClient_IPPuntRedirectV2DumpClient struct { + api.Stream +} + +func (c *serviceClient_IPPuntRedirectV2DumpClient) Recv() (*IPPuntRedirectV2Details, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *IPPuntRedirectV2Details: + return m, nil + case *memclnt.ControlPingReply: err = c.Stream.Close() if err != nil { return nil, err @@ -496,7 +551,7 @@ func (c *serviceClient) IPRouteDump(ctx context.Context, in *IPRouteDump) (RPCSe if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -519,7 +574,7 @@ func (c *serviceClient_IPRouteDumpClient) Recv() (*IPRouteDetails, error) { switch m := msg.(type) { case *IPRouteDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.ControlPingReply: err = c.Stream.Close() if err != nil { return nil, err @@ -557,7 +612,7 @@ func (c *serviceClient) IPRouteV2Dump(ctx context.Context, in *IPRouteV2Dump) (R if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -580,7 +635,7 @@ func (c *serviceClient_IPRouteV2DumpClient) Recv() (*IPRouteV2Details, error) { switch m := msg.(type) { case *IPRouteV2Details: return m, nil - case *vpe.ControlPingReply: + case *memclnt.ControlPingReply: err = c.Stream.Close() if err != nil { return nil, err @@ -618,6 +673,15 @@ func (c *serviceClient) IPTableAddDel(ctx context.Context, in *IPTableAddDel) (* return out, api.RetvalToVPPApiError(out.Retval) } +func (c *serviceClient) IPTableAllocate(ctx context.Context, in *IPTableAllocate) (*IPTableAllocateReply, error) { + out := new(IPTableAllocateReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + func (c *serviceClient) IPTableDump(ctx context.Context, in *IPTableDump) (RPCService_IPTableDumpClient, error) { stream, err := c.conn.NewStream(ctx) if err != nil { @@ -627,7 +691,7 @@ func (c *serviceClient) IPTableDump(ctx context.Context, in *IPTableDump) (RPCSe if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -650,7 +714,7 @@ func (c *serviceClient_IPTableDumpClient) Recv() (*IPTableDetails, error) { switch m := msg.(type) { case *IPTableDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.ControlPingReply: err = c.Stream.Close() if err != nil { return nil, err @@ -697,7 +761,7 @@ func (c *serviceClient) IPUnnumberedDump(ctx context.Context, in *IPUnnumberedDu if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -720,7 +784,7 @@ func (c *serviceClient_IPUnnumberedDumpClient) Recv() (*IPUnnumberedDetails, err switch m := msg.(type) { case *IPUnnumberedDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.ControlPingReply: err = c.Stream.Close() if err != nil { return nil, err @@ -740,7 +804,7 @@ func (c *serviceClient) MfibSignalDump(ctx context.Context, in *MfibSignalDump) if err := x.Stream.SendMsg(in); err != nil { return nil, err } - if err = x.Stream.SendMsg(&vpe.ControlPing{}); err != nil { + if err = x.Stream.SendMsg(&memclnt.ControlPing{}); err != nil { return nil, err } return x, nil @@ -763,7 +827,7 @@ func (c *serviceClient_MfibSignalDumpClient) Recv() (*MfibSignalDetails, error) switch m := msg.(type) { case *MfibSignalDetails: return m, nil - case *vpe.ControlPingReply: + case *memclnt.ControlPingReply: err = c.Stream.Close() if err != nil { return nil, err |