diff --git a/Dockerfile b/Dockerfile index 5caac48f..95877fc4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ -ARG VPP_VERSION=e416893a597959509c7f667c140c271c0bb78c14 +ARG VPP_VERSION=1765f014bc7fcc3b924019ec96350eb50bef629f ARG UBUNTU_VERSION=20.04 -ARG GOVPP_VERSION=v0.3.5 +ARG GOVPP_VERSION=v0.8.0 FROM ubuntu:${UBUNTU_VERSION} as vppbuild ARG VPP_VERSION @@ -39,11 +39,11 @@ ENV GO111MODULE=on ENV CGO_ENABLED=0 ENV GOBIN=/bin ARG GOVPP_VERSION -RUN go install git.fd.io/govpp.git/cmd/binapi-generator@${GOVPP_VERSION} +RUN go install go.fd.io/govpp/cmd/binapi-generator@${GOVPP_VERSION} FROM alpine:3.18 as gen COPY --from=vpp /usr/share/vpp/api/ /usr/share/vpp/api/ COPY --from=binapi-generator /bin/binapi-generator /bin/binapi-generator COPY --from=vppbuild /vpp/VPP_VERSION /VPP_VERSION WORKDIR /gen -CMD VPP_VERSION=$(cat /VPP_VERSION) binapi-generator ${PKGPREFIX+-import-prefix ${PKGPREFIX}} +CMD VPP_VERSION=$(cat /VPP_VERSION) binapi-generator --input=/usr/share/vpp/api/ ${PKGPREFIX+--import-prefix ${PKGPREFIX}} diff --git a/binapi/abf/abf.ba.go b/binapi/abf/abf.ba.go index 99e8e76d..9587c3a3 100644 --- a/binapi/abf/abf.ba.go +++ b/binapi/abf/abf.ba.go @@ -1,23 +1,22 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/abf.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/abf.api.json // Package abf contains generated bindings for API file abf.api. // // Contents: -// -// 2 structs -// 10 messages +// - 2 structs +// - 10 messages package abf import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" fib_types "github.com/networkservicemesh/govpp/binapi/fib_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" _ "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -48,6 +47,7 @@ type AbfPolicy struct { Paths []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"` } +// Add or delete a policy attachment to an interface // AbfItfAttachAddDel defines message 'abf_itf_attach_add_del'. // InProgress: the message form may change in the future versions type AbfItfAttachAddDel struct { @@ -129,6 +129,7 @@ func (m *AbfItfAttachAddDelReply) Unmarshal(b []byte) error { return nil } +// Attachment details from a dump // AbfItfAttachDetails defines message 'abf_itf_attach_details'. // InProgress: the message form may change in the future versions type AbfItfAttachDetails struct { @@ -172,6 +173,7 @@ func (m *AbfItfAttachDetails) Unmarshal(b []byte) error { return nil } +// Dump all the policy attachments // AbfItfAttachDump defines message 'abf_itf_attach_dump'. // InProgress: the message form may change in the future versions type AbfItfAttachDump struct{} @@ -200,6 +202,7 @@ func (m *AbfItfAttachDump) Unmarshal(b []byte) error { return nil } +// Get the plugin version // AbfPluginGetVersion defines message 'abf_plugin_get_version'. // InProgress: the message form may change in the future versions type AbfPluginGetVersion struct{} @@ -228,6 +231,10 @@ func (m *AbfPluginGetVersion) Unmarshal(b []byte) error { return nil } +// Reply to get the plugin version +// - major - Incremented every time a known breaking behavior change is introduced +// - minor - Incremented with small changes, may be used to avoid buggy versions +// // AbfPluginGetVersionReply defines message 'abf_plugin_get_version_reply'. // InProgress: the message form may change in the future versions type AbfPluginGetVersionReply struct { @@ -266,6 +273,12 @@ func (m *AbfPluginGetVersionReply) Unmarshal(b []byte) error { return nil } +// A description of an ABF policy +// - is_add Is this the addition or removal of paths from the policy +// If the policy does not exist it is created. If the last path +// Is being removed, the policy is deleted +// - policy The policy +// // AbfPolicyAddDel defines message 'abf_policy_add_del'. // InProgress: the message form may change in the future versions type AbfPolicyAddDel struct { @@ -417,6 +430,7 @@ func (m *AbfPolicyAddDelReply) Unmarshal(b []byte) error { return nil } +// Policy description returned in the dump // AbfPolicyDetails defines message 'abf_policy_details'. // InProgress: the message form may change in the future versions type AbfPolicyDetails struct { @@ -530,6 +544,7 @@ func (m *AbfPolicyDetails) Unmarshal(b []byte) error { return nil } +// Dump all ABF policies // AbfPolicyDump defines message 'abf_policy_dump'. // InProgress: the message form may change in the future versions type AbfPolicyDump struct{} diff --git a/binapi/abf/abf_rpc.ba.go b/binapi/abf/abf_rpc.ba.go index 699cc2f7..cee830ea 100644 --- a/binapi/abf/abf_rpc.ba.go +++ b/binapi/abf/abf_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service abf. diff --git a/binapi/acl/acl.ba.go b/binapi/acl/acl.ba.go index 18eda56f..f68d3a95 100644 --- a/binapi/acl/acl.ba.go +++ b/binapi/acl/acl.ba.go @@ -1,23 +1,22 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/acl.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/acl.api.json // Package acl contains generated bindings for API file acl.api. // // Contents: -// -// 42 messages +// - 42 messages package acl import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" acl_types "github.com/networkservicemesh/govpp/binapi/acl_types" _ "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -32,6 +31,12 @@ const ( VersionCrc = 0x5133bba0 ) +// Replace an existing ACL in-place or create a new ACL +// - acl_index - an existing ACL entry (0..0xfffffffe) to replace, or 0xffffffff to make new ACL +// - tag - a string value stored along with the ACL, for descriptive purposes +// - count - number of ACL rules +// @r - Rules for this access-list +// // ACLAddReplace defines message 'acl_add_replace'. type ACLAddReplace struct { ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"` @@ -132,6 +137,10 @@ func (m *ACLAddReplace) Unmarshal(b []byte) error { return nil } +// Reply to add/replace ACL +// - acl_index - index of the updated or newly created ACL +// - retval 0 - no error +// // ACLAddReplaceReply defines message 'acl_add_replace_reply'. type ACLAddReplaceReply struct { ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"` @@ -169,6 +178,9 @@ func (m *ACLAddReplaceReply) Unmarshal(b []byte) error { return nil } +// Delete an ACL +// - acl_index - ACL index to delete +// // ACLDel defines message 'acl_del'. type ACLDel struct { ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"` @@ -235,6 +247,12 @@ func (m *ACLDelReply) Unmarshal(b []byte) error { return nil } +// Details about a single ACL contents +// - acl_index - ACL index whose contents are being sent in this message +// - tag - Descriptive tag value which was supplied at ACL creation +// - count - Number of rules in this ACL +// - r - Array of rules within this ACL +// // ACLDetails defines message 'acl_details'. type ACLDetails struct { ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"` @@ -335,6 +353,9 @@ func (m *ACLDetails) Unmarshal(b []byte) error { return nil } +// Dump the specific ACL contents or all of the ACLs' contents +// - acl_index - ACL index to dump, ~0 to dump all ACLs +// // ACLDump defines message 'acl_dump'. type ACLDump struct { ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"` @@ -368,6 +389,14 @@ func (m *ACLDump) Unmarshal(b []byte) error { return nil } +// Use acl_interface_set_acl_list instead +// +// Append/remove an ACL index to/from the list of ACLs checked for an interface +// - is_add - add or delete the ACL index from the list +// - is_input - check the ACL on input (1) or output (0) +// - sw_if_index - the interface to alter the list of ACLs on +// - acl_index - index of ACL for the operation +// // ACLInterfaceAddDel defines message 'acl_interface_add_del'. type ACLInterfaceAddDel struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -446,6 +475,12 @@ func (m *ACLInterfaceAddDelReply) Unmarshal(b []byte) error { return nil } +// Details about ethertype whitelist on a single interface +// - sw_if_index - interface for which the list of MACIP ACLs is applied +// - count - total number of whitelisted ethertypes in the vector +// - n_input - this many first elements correspond to input whitelisted ethertypes, the rest - output +// - whitelist - vector of whitelisted ethertypes +// // ACLInterfaceEtypeWhitelistDetails defines message 'acl_interface_etype_whitelist_details'. type ACLInterfaceEtypeWhitelistDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -502,6 +537,9 @@ func (m *ACLInterfaceEtypeWhitelistDetails) Unmarshal(b []byte) error { return nil } +// Dump the list(s) of Ethertype whitelists applied to specific or all interfaces +// - sw_if_index - interface to dump the ethertype whitelist for +// // ACLInterfaceEtypeWhitelistDump defines message 'acl_interface_etype_whitelist_dump'. type ACLInterfaceEtypeWhitelistDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -537,6 +575,12 @@ func (m *ACLInterfaceEtypeWhitelistDump) Unmarshal(b []byte) error { return nil } +// Details about a single ACL contents +// - sw_if_index - interface for which the list of ACLs is applied +// - count - total length of acl indices vector +// - n_input - this many of indices in the beginning are input ACLs, the rest - output +// - acls - the vector of ACL indices +// // ACLInterfaceListDetails defines message 'acl_interface_list_details'. type ACLInterfaceListDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -591,6 +635,9 @@ func (m *ACLInterfaceListDetails) Unmarshal(b []byte) error { return nil } +// Dump the list(s) of ACL applied to specific or all interfaces +// - sw_if_index - interface for which to dump the ACL list. Default: 0xffffffff (All interfaces) +// // ACLInterfaceListDump defines message 'acl_interface_list_dump'. type ACLInterfaceListDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` @@ -624,6 +671,12 @@ func (m *ACLInterfaceListDump) Unmarshal(b []byte) error { return nil } +// Set the vector of input/output ACLs checked for an interface +// - sw_if_index - the interface to alter the list of ACLs on +// - count - total number of ACL indices in the vector +// - n_input - this many first elements correspond to input ACLs, the rest - output +// - acls - vector of ACL indices +// // ACLInterfaceSetACLList defines message 'acl_interface_set_acl_list'. type ACLInterfaceSetACLList struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -713,6 +766,12 @@ func (m *ACLInterfaceSetACLListReply) Unmarshal(b []byte) error { return nil } +// Set the ethertype whitelists on an interface. Takes effect when applying ACLs on the interface, so must be given prior. +// - sw_if_index - the interface to alter the list of ACLs on +// - count - total number of whitelisted ethertypes in the vector +// - n_input - this many first elements correspond to input whitelisted ethertypes, the rest - output +// - whitelist - vector of whitelisted ethertypes +// // ACLInterfaceSetEtypeWhitelist defines message 'acl_interface_set_etype_whitelist'. type ACLInterfaceSetEtypeWhitelist struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -804,6 +863,7 @@ func (m *ACLInterfaceSetEtypeWhitelistReply) Unmarshal(b []byte) error { return nil } +// Control ping from client to api server request // ACLPluginControlPing defines message 'acl_plugin_control_ping'. type ACLPluginControlPing struct{} @@ -831,6 +891,10 @@ func (m *ACLPluginControlPing) Unmarshal(b []byte) error { return nil } +// Control ping from the client to the server response +// - retval - return code for the request +// - vpe_pid - the pid of the vpe, returned by the server +// // ACLPluginControlPingReply defines message 'acl_plugin_control_ping_reply'. type ACLPluginControlPingReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -872,6 +936,7 @@ func (m *ACLPluginControlPingReply) Unmarshal(b []byte) error { return nil } +// Get Connection table max entries // ACLPluginGetConnTableMaxEntries defines message 'acl_plugin_get_conn_table_max_entries'. type ACLPluginGetConnTableMaxEntries struct{} @@ -901,6 +966,9 @@ func (m *ACLPluginGetConnTableMaxEntries) Unmarshal(b []byte) error { return nil } +// Reply to get connection table max entries +// - conn_table_max_entries - the value of maximum entries of connection table +// // ACLPluginGetConnTableMaxEntriesReply defines message 'acl_plugin_get_conn_table_max_entries_reply'. type ACLPluginGetConnTableMaxEntriesReply struct { ConnTableMaxEntries uint64 `binapi:"u64,name=conn_table_max_entries" json:"conn_table_max_entries,omitempty"` @@ -936,6 +1004,7 @@ func (m *ACLPluginGetConnTableMaxEntriesReply) Unmarshal(b []byte) error { return nil } +// Get the plugin version // ACLPluginGetVersion defines message 'acl_plugin_get_version'. type ACLPluginGetVersion struct{} @@ -963,6 +1032,10 @@ func (m *ACLPluginGetVersion) Unmarshal(b []byte) error { return nil } +// Reply to get the plugin version +// - major - Incremented every time a known breaking behavior change is introduced +// - minor - Incremented with small changes, may be used to avoid buggy versions +// // ACLPluginGetVersionReply defines message 'acl_plugin_get_version_reply'. type ACLPluginGetVersionReply struct { Major uint32 `binapi:"u32,name=major" json:"major,omitempty"` @@ -1000,6 +1073,7 @@ func (m *ACLPluginGetVersionReply) Unmarshal(b []byte) error { return nil } +// Get if the hash-based ACL lookups are enabled (default) or not (use linear search) // ACLPluginUseHashLookupGet defines message 'acl_plugin_use_hash_lookup_get'. // InProgress: the message form may change in the future versions type ACLPluginUseHashLookupGet struct{} @@ -1028,6 +1102,9 @@ func (m *ACLPluginUseHashLookupGet) Unmarshal(b []byte) error { return nil } +// Reply with the previous state of the hash lookup +// - prev_enable - previous state of the hash lookup use +// // ACLPluginUseHashLookupGetReply defines message 'acl_plugin_use_hash_lookup_get_reply'. // InProgress: the message form may change in the future versions type ACLPluginUseHashLookupGetReply struct { @@ -1064,6 +1141,9 @@ func (m *ACLPluginUseHashLookupGetReply) Unmarshal(b []byte) error { return nil } +// Enable hash-based ACL lookups (default) or disable them (use linear search) +// - enable - whether to enable or disable the usage of hash lookup algorithm +// // ACLPluginUseHashLookupSet defines message 'acl_plugin_use_hash_lookup_set'. // InProgress: the message form may change in the future versions type ACLPluginUseHashLookupSet struct { @@ -1134,6 +1214,9 @@ func (m *ACLPluginUseHashLookupSetReply) Unmarshal(b []byte) error { return nil } +// Enable or disable incrementing ACL counters in stats segment by interface processing +// - enable - whether to enable or disable incrementing the counters +// // ACLStatsIntfCountersEnable defines message 'acl_stats_intf_counters_enable'. type ACLStatsIntfCountersEnable struct { Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` @@ -1202,6 +1285,11 @@ func (m *ACLStatsIntfCountersEnableReply) Unmarshal(b []byte) error { return nil } +// Add a MACIP ACL +// - tag - descriptive value for this MACIP ACL +// - count - number of rules in this MACIP ACL +// - r - vector of MACIP ACL rules +// // MacipACLAdd defines message 'macip_acl_add'. type MacipACLAdd struct { Tag string `binapi:"string[64],name=tag" json:"tag,omitempty"` @@ -1274,6 +1362,12 @@ func (m *MacipACLAdd) Unmarshal(b []byte) error { return nil } +// Add/Replace a MACIP ACL +// - acl_index - an existing MACIP ACL entry (0..0xfffffffe) to replace, or 0xffffffff to make new MACIP ACL Default: 0xffffffff +// - tag - descriptive value for this MACIP ACL +// - count - number of rules in this MACIP ACL +// - r - vector of MACIP ACL rules +// // MacipACLAddReplace defines message 'macip_acl_add_replace'. type MacipACLAddReplace struct { ACLIndex uint32 `binapi:"u32,name=acl_index,default=4294967295" json:"acl_index,omitempty"` @@ -1350,6 +1444,10 @@ func (m *MacipACLAddReplace) Unmarshal(b []byte) error { return nil } +// Reply to add/replace MACIP ACL +// - acl_index - index of the newly created MACIP ACL +// - retval 0 - no error +// // MacipACLAddReplaceReply defines message 'macip_acl_add_replace_reply'. type MacipACLAddReplaceReply struct { ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"` @@ -1387,6 +1485,10 @@ func (m *MacipACLAddReplaceReply) Unmarshal(b []byte) error { return nil } +// Reply to add MACIP ACL +// - acl_index - index of the newly created MACIP ACL +// - retval 0 - no error +// // MacipACLAddReply defines message 'macip_acl_add_reply'. type MacipACLAddReply struct { ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"` @@ -1424,6 +1526,9 @@ func (m *MacipACLAddReply) Unmarshal(b []byte) error { return nil } +// Delete a MACIP ACL +// - acl_index - MACIP ACL index to delete +// // MacipACLDel defines message 'macip_acl_del'. type MacipACLDel struct { ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"` @@ -1490,6 +1595,12 @@ func (m *MacipACLDelReply) Unmarshal(b []byte) error { return nil } +// Details about one MACIP ACL +// - acl_index - index of this MACIP ACL +// - tag - descriptive tag which was supplied during the creation +// - count - length of the vector of MACIP ACL rules +// - r - rules comprising this MACIP ACL +// // MacipACLDetails defines message 'macip_acl_details'. type MacipACLDetails struct { ACLIndex uint32 `binapi:"u32,name=acl_index" json:"acl_index,omitempty"` @@ -1566,6 +1677,9 @@ func (m *MacipACLDetails) Unmarshal(b []byte) error { return nil } +// Dump one or all defined MACIP ACLs +// - acl_index - MACIP ACL index or ~0 to dump all MACIP ACLs Default: 0xffffffff +// // MacipACLDump defines message 'macip_acl_dump'. type MacipACLDump struct { ACLIndex uint32 `binapi:"u32,name=acl_index,default=4294967295" json:"acl_index,omitempty"` @@ -1599,6 +1713,11 @@ func (m *MacipACLDump) Unmarshal(b []byte) error { return nil } +// Add or delete a MACIP ACL to/from interface +// - is_add - add (1) or delete (0) MACIP ACL from being used on an interface +// - sw_if_index - interface to apply the action to +// - acl_index - MACIP ACL index +// // MacipACLInterfaceAddDel defines message 'macip_acl_interface_add_del'. type MacipACLInterfaceAddDel struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -1675,6 +1794,7 @@ func (m *MacipACLInterfaceAddDelReply) Unmarshal(b []byte) error { return nil } +// Get the vector of MACIP ACL IDs applied to the interfaces // MacipACLInterfaceGet defines message 'macip_acl_interface_get'. type MacipACLInterfaceGet struct{} @@ -1702,6 +1822,10 @@ func (m *MacipACLInterfaceGet) Unmarshal(b []byte) error { return nil } +// Reply with the vector of MACIP ACLs by sw_if_index +// - count - total number of elements in the vector +// - acls - the vector of active MACIP ACL indices per sw_if_index +// // MacipACLInterfaceGetReply defines message 'macip_acl_interface_get_reply'. type MacipACLInterfaceGetReply struct { Count uint32 `binapi:"u32,name=count" json:"-"` @@ -1748,6 +1872,11 @@ func (m *MacipACLInterfaceGetReply) Unmarshal(b []byte) error { return nil } +// Details about a single MACIP ACL contents +// - sw_if_index - interface for which the list of MACIP ACLs is applied +// - count - total length of acl indices vector +// - acls - the vector of MACIP ACL indices +// // MacipACLInterfaceListDetails defines message 'macip_acl_interface_list_details'. type MacipACLInterfaceListDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1800,6 +1929,9 @@ func (m *MacipACLInterfaceListDetails) Unmarshal(b []byte) error { return nil } +// Dump the list(s) of MACIP ACLs applied to specific or all interfaces +// - sw_if_index - interface to dump the MACIP ACL list for +// // MacipACLInterfaceListDump defines message 'macip_acl_interface_list_dump'. type MacipACLInterfaceListDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/binapi/acl/acl_rpc.ba.go b/binapi/acl/acl_rpc.ba.go index 5f13e591..6dbddb61 100644 --- a/binapi/acl/acl_rpc.ba.go +++ b/binapi/acl/acl_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service acl. diff --git a/binapi/acl_types/acl_types.ba.go b/binapi/acl_types/acl_types.ba.go index d0d8dd42..a97d878b 100644 --- a/binapi/acl_types/acl_types.ba.go +++ b/binapi/acl_types/acl_types.ba.go @@ -1,23 +1,22 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/acl_types.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/acl_types.api.json // Package acl_types contains generated bindings for API file acl_types.api. // // Contents: -// -// 1 enum -// 2 structs +// - 1 enum +// - 2 structs package acl_types import ( "strconv" - api "git.fd.io/govpp.git/api" ethernet_types "github.com/networkservicemesh/govpp/binapi/ethernet_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" ) // This is a compile-time assertion to ensure that this generated file @@ -26,6 +25,12 @@ import ( // GoVPP api package needs to be updated. const _ = api.GoVppAPIPackageIsVersion2 +const ( + APIFile = "acl_types" + APIVersion = "1.0.0" + VersionCrc = 0x878da4fa +) + // ACLAction defines enum 'acl_action'. type ACLAction uint8 diff --git a/binapi/adl/adl.ba.go b/binapi/adl/adl.ba.go index 8e2efde1..8da7d3f4 100644 --- a/binapi/adl/adl.ba.go +++ b/binapi/adl/adl.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/adl.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/adl.api.json // Package adl contains generated bindings for API file adl.api. // // Contents: -// -// 4 messages +// - 4 messages package adl import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,8 +28,17 @@ const ( VersionCrc = 0xb752b7a2 ) +// adl: enable/disable allow list filtration features on an interface +// +// Note: the supplied fib_id must match in order to remove the feature! +// - sw_if_index - interface handle, physical interfaces only +// - fib_id - fib identifier for the allow/deny fib +// - ip4 - 1 => enable ip4 filtration, 0=> disable ip4 filtration +// - ip6 - 1 => enable ip6 filtration, 0=> disable ip6 filtration +// - default_adl - 1 => enable non-ip4, non-ip6 filtration +// 0 => disable it +// // AdlAllowlistEnableDisable defines message 'adl_allowlist_enable_disable'. -// InProgress: the message form may change in the future versions type AdlAllowlistEnableDisable struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` FibID uint32 `binapi:"u32,name=fib_id" json:"fib_id,omitempty"` @@ -80,7 +88,6 @@ func (m *AdlAllowlistEnableDisable) Unmarshal(b []byte) error { } // AdlAllowlistEnableDisableReply defines message 'adl_allowlist_enable_disable_reply'. -// InProgress: the message form may change in the future versions type AdlAllowlistEnableDisableReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -115,8 +122,11 @@ func (m *AdlAllowlistEnableDisableReply) Unmarshal(b []byte) error { return nil } +// adl: enable/disable filtration features on an interface +// - sw_if_inded - desired interface +// - enable_disable - 1 => enable, 0 => disable +// // AdlInterfaceEnableDisable defines message 'adl_interface_enable_disable'. -// InProgress: the message form may change in the future versions type AdlInterfaceEnableDisable 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"` @@ -154,7 +164,6 @@ func (m *AdlInterfaceEnableDisable) Unmarshal(b []byte) error { } // AdlInterfaceEnableDisableReply defines message 'adl_interface_enable_disable_reply'. -// InProgress: the message form may change in the future versions type AdlInterfaceEnableDisableReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } diff --git a/binapi/adl/adl_rpc.ba.go b/binapi/adl/adl_rpc.ba.go index 9a03cb5f..4ccc936d 100644 --- a/binapi/adl/adl_rpc.ba.go +++ b/binapi/adl/adl_rpc.ba.go @@ -5,7 +5,7 @@ package adl import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service adl. diff --git a/binapi/af_packet/af_packet.ba.go b/binapi/af_packet/af_packet.ba.go index 0480e95b..240487d5 100644 --- a/binapi/af_packet/af_packet.ba.go +++ b/binapi/af_packet/af_packet.ba.go @@ -1,24 +1,23 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/af_packet.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/af_packet.api.json // Package af_packet contains generated bindings for API file af_packet.api. // // Contents: -// -// 2 enums -// 12 messages +// - 2 enums +// - 12 messages package af_packet import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ethernet_types "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -109,7 +108,13 @@ func (x AfPacketMode) String() string { return "AfPacketMode(" + strconv.Itoa(int(x)) + ")" } +// Create host-interface +// - hw_addr - interface MAC +// - use_random_hw_addr - use random generated MAC +// - host_if_name - interface name +// // AfPacketCreate defines message 'af_packet_create'. +// Deprecated: the message will be removed in the future versions type AfPacketCreate struct { HwAddr ethernet_types.MacAddress `binapi:"mac_address,name=hw_addr" json:"hw_addr,omitempty"` UseRandomHwAddr bool `binapi:"bool,name=use_random_hw_addr" json:"use_random_hw_addr,omitempty"` @@ -150,7 +155,11 @@ func (m *AfPacketCreate) Unmarshal(b []byte) error { return nil } +// Create host-interface response +// - retval - return value for request +// // AfPacketCreateReply defines message 'af_packet_create_reply'. +// Deprecated: the message will be removed in the future versions type AfPacketCreateReply 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"` @@ -187,7 +196,19 @@ func (m *AfPacketCreateReply) Unmarshal(b []byte) error { return nil } +// Create host-interface +// - hw_addr - interface MAC +// - use_random_hw_addr - use random generated MAC +// - host_if_name - interface name +// - rx_frame_size - frame size for RX +// - tx_frame_size - frame size for TX +// - rx_frames_per_block - frames per block for RX +// - tx_frames_per_block - frames per block for TX +// - flags - flags for the af_packet interface creation +// - num_rx_queues - number of rx queues +// // AfPacketCreateV2 defines message 'af_packet_create_v2'. +// Deprecated: the message will be removed in the future versions type AfPacketCreateV2 struct { HwAddr ethernet_types.MacAddress `binapi:"mac_address,name=hw_addr" json:"hw_addr,omitempty"` UseRandomHwAddr bool `binapi:"bool,name=use_random_hw_addr" json:"use_random_hw_addr,omitempty"` @@ -252,7 +273,11 @@ func (m *AfPacketCreateV2) Unmarshal(b []byte) error { return nil } +// Create host-interface response +// - retval - return value for request +// // AfPacketCreateV2Reply defines message 'af_packet_create_v2_reply'. +// Deprecated: the message will be removed in the future versions type AfPacketCreateV2Reply 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"` @@ -289,6 +314,19 @@ func (m *AfPacketCreateV2Reply) Unmarshal(b []byte) error { return nil } +// Create host-interface +// - mode - 1 - Ethernet, 2 - IP +// - hw_addr - interface MAC +// - use_random_hw_addr - use random generated MAC +// - host_if_name - interface name +// - rx_frame_size - frame size for RX +// - tx_frame_size - frame size for TX +// - rx_frames_per_block - frames per block for RX +// - tx_frames_per_block - frames per block for TX +// - flags - flags for the af_packet interface creation +// - num_rx_queues - number of rx queues +// - num_tx_queues - number of tx queues +// // AfPacketCreateV3 defines message 'af_packet_create_v3'. type AfPacketCreateV3 struct { Mode AfPacketMode `binapi:"af_packet_mode,name=mode" json:"mode,omitempty"` @@ -362,6 +400,9 @@ func (m *AfPacketCreateV3) Unmarshal(b []byte) error { return nil } +// Create host-interface response +// - retval - return value for request +// // AfPacketCreateV3Reply defines message 'af_packet_create_v3_reply'. type AfPacketCreateV3Reply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -399,6 +440,9 @@ func (m *AfPacketCreateV3Reply) Unmarshal(b []byte) error { return nil } +// Delete host-interface +// - host_if_name - interface name +// // AfPacketDelete defines message 'af_packet_delete'. type AfPacketDelete struct { HostIfName string `binapi:"string[64],name=host_if_name" json:"host_if_name,omitempty"` @@ -465,6 +509,10 @@ func (m *AfPacketDeleteReply) Unmarshal(b []byte) error { return nil } +// Reply for af_packet dump request +// - sw_if_index - software index of af_packet interface +// - host_if_name - interface name +// // AfPacketDetails defines message 'af_packet_details'. type AfPacketDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -502,6 +550,7 @@ func (m *AfPacketDetails) Unmarshal(b []byte) error { return nil } +// Dump af_packet interfaces request // AfPacketDump defines message 'af_packet_dump'. type AfPacketDump struct{} @@ -529,6 +578,7 @@ func (m *AfPacketDump) Unmarshal(b []byte) error { return nil } +// Set l4 offload checksum calculation // AfPacketSetL4CksumOffload defines message 'af_packet_set_l4_cksum_offload'. type AfPacketSetL4CksumOffload struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/binapi/af_packet/af_packet_rpc.ba.go b/binapi/af_packet/af_packet_rpc.ba.go index 5f2bef9f..b20d8ec6 100644 --- a/binapi/af_packet/af_packet_rpc.ba.go +++ b/binapi/af_packet/af_packet_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service af_packet. diff --git a/binapi/af_xdp/af_xdp.ba.go b/binapi/af_xdp/af_xdp.ba.go index 75fd6b3b..0337d1bb 100644 --- a/binapi/af_xdp/af_xdp.ba.go +++ b/binapi/af_xdp/af_xdp.ba.go @@ -1,23 +1,22 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/af_xdp.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/af_xdp.api.json // Package af_xdp contains generated bindings for API file af_xdp.api. // // Contents: -// -// 2 enums -// 6 messages +// - 2 enums +// - 8 messages package af_xdp import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,7 +28,7 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "af_xdp" APIVersion = "1.0.0" - VersionCrc = 0x346626ce + VersionCrc = 0xd2949266 ) // AfXdpMode defines enum 'af_xdp_mode'. @@ -105,7 +104,18 @@ func (x AfXdpFlag) String() string { return s } +// - client_index - opaque cookie to identify the sender +// - host_if - Linux netdev interface name +// - name - new af_xdp interface name (optional) +// - rxq_num - number of receive queues. 65535 can be used as special value to request all available queues (optional) +// - rxq_size - receive queue size (optional) +// - txq_size - transmit queue size (optional) +// - mode - operation mode (optional) +// - flags - flags (optional) +// - prog - eBPF program path (optional) +// // AfXdpCreate defines message 'af_xdp_create'. +// Deprecated: the message will be removed in the future versions type AfXdpCreate struct { HostIf string `binapi:"string[64],name=host_if" json:"host_if,omitempty"` Name string `binapi:"string[64],name=name" json:"name,omitempty"` @@ -166,7 +176,12 @@ func (m *AfXdpCreate) Unmarshal(b []byte) error { return nil } +// - context - sender context, to match reply w/ request +// - retval - return value for request +// - sw_if_index - software index for the new af_xdp interface +// // AfXdpCreateReply defines message 'af_xdp_create_reply'. +// Deprecated: the message will be removed in the future versions type AfXdpCreateReply 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"` @@ -203,7 +218,19 @@ func (m *AfXdpCreateReply) Unmarshal(b []byte) error { return nil } +// - client_index - opaque cookie to identify the sender +// - host_if - Linux netdev interface name +// - name - new af_xdp interface name (optional) +// - rxq_num - number of receive queues. 65535 can be used as special value to request all available queues (optional) +// - rxq_size - receive queue size (optional) +// - txq_size - transmit queue size (optional) +// - mode - operation mode (optional) +// - flags - flags (optional) +// - prog - eBPF program path (optional) +// - namespace - netns of nic (optional) +// // AfXdpCreateV2 defines message 'af_xdp_create_v2'. +// Deprecated: the message will be removed in the future versions type AfXdpCreateV2 struct { HostIf string `binapi:"string[64],name=host_if" json:"host_if,omitempty"` Name string `binapi:"string[64],name=name" json:"name,omitempty"` @@ -268,7 +295,12 @@ func (m *AfXdpCreateV2) Unmarshal(b []byte) error { return nil } +// - context - sender context, to match reply w/ request +// - retval - return value for request +// - sw_if_index - software index for the new af_xdp interface +// // AfXdpCreateV2Reply defines message 'af_xdp_create_v2_reply'. +// Deprecated: the message will be removed in the future versions type AfXdpCreateV2Reply 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"` @@ -305,6 +337,123 @@ func (m *AfXdpCreateV2Reply) Unmarshal(b []byte) error { return nil } +// - client_index - opaque cookie to identify the sender +// - host_if - Linux netdev interface name +// - name - new af_xdp interface name (optional) +// - rxq_num - number of receive queues. 65535 can be used as special value to request all available queues (optional) +// - rxq_size - receive queue size (optional) +// - txq_size - transmit queue size (optional) +// - mode - operation mode (optional) +// - flags - flags (optional) +// - prog - eBPF program path (optional) +// - netns - netns of nic (optional) +// +// AfXdpCreateV3 defines message 'af_xdp_create_v3'. +type AfXdpCreateV3 struct { + HostIf string `binapi:"string[64],name=host_if" json:"host_if,omitempty"` + Name string `binapi:"string[64],name=name" json:"name,omitempty"` + RxqNum uint16 `binapi:"u16,name=rxq_num,default=1" json:"rxq_num,omitempty"` + RxqSize uint16 `binapi:"u16,name=rxq_size,default=0" json:"rxq_size,omitempty"` + TxqSize uint16 `binapi:"u16,name=txq_size,default=0" json:"txq_size,omitempty"` + Mode AfXdpMode `binapi:"af_xdp_mode,name=mode,default=0" json:"mode,omitempty"` + Flags AfXdpFlag `binapi:"af_xdp_flag,name=flags,default=0" json:"flags,omitempty"` + Prog string `binapi:"string[256],name=prog" json:"prog,omitempty"` + Netns string `binapi:"string[64],name=netns" json:"netns,omitempty"` +} + +func (m *AfXdpCreateV3) Reset() { *m = AfXdpCreateV3{} } +func (*AfXdpCreateV3) GetMessageName() string { return "af_xdp_create_v3" } +func (*AfXdpCreateV3) GetCrcString() string { return "cf4b1827" } +func (*AfXdpCreateV3) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *AfXdpCreateV3) Size() (size int) { + if m == nil { + return 0 + } + size += 64 // m.HostIf + size += 64 // m.Name + size += 2 // m.RxqNum + size += 2 // m.RxqSize + size += 2 // m.TxqSize + size += 4 // m.Mode + size += 1 // m.Flags + size += 256 // m.Prog + size += 64 // m.Netns + return size +} +func (m *AfXdpCreateV3) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeString(m.HostIf, 64) + buf.EncodeString(m.Name, 64) + buf.EncodeUint16(m.RxqNum) + buf.EncodeUint16(m.RxqSize) + buf.EncodeUint16(m.TxqSize) + buf.EncodeUint32(uint32(m.Mode)) + buf.EncodeUint8(uint8(m.Flags)) + buf.EncodeString(m.Prog, 256) + buf.EncodeString(m.Netns, 64) + return buf.Bytes(), nil +} +func (m *AfXdpCreateV3) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.HostIf = buf.DecodeString(64) + m.Name = buf.DecodeString(64) + m.RxqNum = buf.DecodeUint16() + m.RxqSize = buf.DecodeUint16() + m.TxqSize = buf.DecodeUint16() + m.Mode = AfXdpMode(buf.DecodeUint32()) + m.Flags = AfXdpFlag(buf.DecodeUint8()) + m.Prog = buf.DecodeString(256) + m.Netns = buf.DecodeString(64) + return nil +} + +// - context - sender context, to match reply w/ request +// - retval - return value for request +// - sw_if_index - software index for the new af_xdp interface +// +// AfXdpCreateV3Reply defines message 'af_xdp_create_v3_reply'. +type AfXdpCreateV3Reply 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 *AfXdpCreateV3Reply) Reset() { *m = AfXdpCreateV3Reply{} } +func (*AfXdpCreateV3Reply) GetMessageName() string { return "af_xdp_create_v3_reply" } +func (*AfXdpCreateV3Reply) GetCrcString() string { return "5383d31f" } +func (*AfXdpCreateV3Reply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *AfXdpCreateV3Reply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 4 // m.SwIfIndex + return size +} +func (m *AfXdpCreateV3Reply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *AfXdpCreateV3Reply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + return nil +} + // AfXdpDelete defines message 'af_xdp_delete'. type AfXdpDelete struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -377,6 +526,8 @@ func file_af_xdp_binapi_init() { api.RegisterMessage((*AfXdpCreateReply)(nil), "af_xdp_create_reply_5383d31f") api.RegisterMessage((*AfXdpCreateV2)(nil), "af_xdp_create_v2_e17ec2eb") api.RegisterMessage((*AfXdpCreateV2Reply)(nil), "af_xdp_create_v2_reply_5383d31f") + api.RegisterMessage((*AfXdpCreateV3)(nil), "af_xdp_create_v3_cf4b1827") + api.RegisterMessage((*AfXdpCreateV3Reply)(nil), "af_xdp_create_v3_reply_5383d31f") api.RegisterMessage((*AfXdpDelete)(nil), "af_xdp_delete_f9e6675e") api.RegisterMessage((*AfXdpDeleteReply)(nil), "af_xdp_delete_reply_e8d4e804") } @@ -388,6 +539,8 @@ func AllMessages() []api.Message { (*AfXdpCreateReply)(nil), (*AfXdpCreateV2)(nil), (*AfXdpCreateV2Reply)(nil), + (*AfXdpCreateV3)(nil), + (*AfXdpCreateV3Reply)(nil), (*AfXdpDelete)(nil), (*AfXdpDeleteReply)(nil), } diff --git a/binapi/af_xdp/af_xdp_rpc.ba.go b/binapi/af_xdp/af_xdp_rpc.ba.go index db784884..8c7e8459 100644 --- a/binapi/af_xdp/af_xdp_rpc.ba.go +++ b/binapi/af_xdp/af_xdp_rpc.ba.go @@ -5,13 +5,14 @@ package af_xdp import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service af_xdp. type RPCService interface { AfXdpCreate(ctx context.Context, in *AfXdpCreate) (*AfXdpCreateReply, error) AfXdpCreateV2(ctx context.Context, in *AfXdpCreateV2) (*AfXdpCreateV2Reply, error) + AfXdpCreateV3(ctx context.Context, in *AfXdpCreateV3) (*AfXdpCreateV3Reply, error) AfXdpDelete(ctx context.Context, in *AfXdpDelete) (*AfXdpDeleteReply, error) } @@ -41,6 +42,15 @@ func (c *serviceClient) AfXdpCreateV2(ctx context.Context, in *AfXdpCreateV2) (* return out, api.RetvalToVPPApiError(out.Retval) } +func (c *serviceClient) AfXdpCreateV3(ctx context.Context, in *AfXdpCreateV3) (*AfXdpCreateV3Reply, error) { + out := new(AfXdpCreateV3Reply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + func (c *serviceClient) AfXdpDelete(ctx context.Context, in *AfXdpDelete) (*AfXdpDeleteReply, error) { out := new(AfXdpDeleteReply) err := c.conn.Invoke(ctx, in, out) diff --git a/binapi/arp/arp.ba.go b/binapi/arp/arp.ba.go index 13dc654c..79878ac2 100644 --- a/binapi/arp/arp.ba.go +++ b/binapi/arp/arp.ba.go @@ -1,23 +1,22 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/arp.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/arp.api.json // Package arp contains generated bindings for API file arp.api. // // Contents: -// -// 1 struct -// 8 messages +// - 1 struct +// - 8 messages package arp import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" _ "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -39,6 +38,10 @@ type ProxyArp struct { Hi ip_types.IP4Address `binapi:"ip4_address,name=hi" json:"hi,omitempty"` } +// Proxy ARP add / del request +// - is_add - 1 if adding the Proxy ARP range, 0 if deleting +// - proxy - Proxy configuration +// // ProxyArpAddDel defines message 'proxy_arp_add_del'. type ProxyArpAddDel struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -115,6 +118,9 @@ func (m *ProxyArpAddDelReply) Unmarshal(b []byte) error { return nil } +// Proxy ARP dump details reply +// - - proxy - Same data as used to configure +// // ProxyArpDetails defines message 'proxy_arp_details'. type ProxyArpDetails struct { Proxy ProxyArp `binapi:"proxy_arp,name=proxy" json:"proxy,omitempty"` @@ -154,6 +160,7 @@ func (m *ProxyArpDetails) Unmarshal(b []byte) error { return nil } +// Proxy ARP dump request // ProxyArpDump defines message 'proxy_arp_dump'. type ProxyArpDump struct{} @@ -181,6 +188,9 @@ func (m *ProxyArpDump) Unmarshal(b []byte) error { return nil } +// Proxy ARP interface dump details reply +// - - sw_if_index The interface on which ARP proxy is enabled. +// // ProxyArpIntfcDetails defines message 'proxy_arp_intfc_details'. type ProxyArpIntfcDetails struct { SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -214,6 +224,7 @@ func (m *ProxyArpIntfcDetails) Unmarshal(b []byte) error { return nil } +// Proxy ARP interface dump request // ProxyArpIntfcDump defines message 'proxy_arp_intfc_dump'. type ProxyArpIntfcDump struct{} @@ -241,6 +252,10 @@ func (m *ProxyArpIntfcDump) Unmarshal(b []byte) error { return nil } +// Proxy ARP add / del interface request +// - sw_if_index - Which interface to enable / disable Proxy Arp on +// - enable - 1 to enable Proxy ARP on interface, 0 to disable +// // ProxyArpIntfcEnableDisable defines message 'proxy_arp_intfc_enable_disable'. type ProxyArpIntfcEnableDisable struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/binapi/arp/arp_rpc.ba.go b/binapi/arp/arp_rpc.ba.go index 044dcb40..b4393a39 100644 --- a/binapi/arp/arp_rpc.ba.go +++ b/binapi/arp/arp_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service arp. diff --git a/binapi/arping/arping.ba.go b/binapi/arping/arping.ba.go index 3afd9916..7905b2f6 100644 --- a/binapi/arping/arping.ba.go +++ b/binapi/arping/arping.ba.go @@ -1,21 +1,20 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/arping.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/arping.api.json // Package arping contains generated bindings for API file arping.api. // // Contents: -// -// 2 messages +// - 2 messages package arping import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -30,6 +29,13 @@ const ( VersionCrc = 0x666f91cc ) +// - client_index - opaque cookie to identify the sender +// - address - address to send arp request or gratuitous arp. +// - sw_if_index - interface to send +// - repeat - number of packets to send +// - interval - if more than 1 packet is sent, the delay between send +// - is_garp - is garp or arp request +// // Arping defines message 'arping'. type Arping struct { Address ip_types.Address `binapi:"address,name=address" json:"address,omitempty"` @@ -82,6 +88,10 @@ func (m *Arping) Unmarshal(b []byte) error { return nil } +// - context - sender context, to match reply w/ request +// - retval - return value for request +// @reply_count - return value for reply count +// // ArpingReply defines message 'arping_reply'. type ArpingReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` diff --git a/binapi/arping/arping_rpc.ba.go b/binapi/arping/arping_rpc.ba.go index be6f4fb0..feda4c1b 100644 --- a/binapi/arping/arping_rpc.ba.go +++ b/binapi/arping/arping_rpc.ba.go @@ -5,7 +5,7 @@ package arping import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service arping. diff --git a/binapi/avf/avf.ba.go b/binapi/avf/avf.ba.go index c66caaff..bafaa615 100644 --- a/binapi/avf/avf.ba.go +++ b/binapi/avf/avf.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/avf.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/avf.api.json // Package avf contains generated bindings for API file avf.api. // // Contents: -// -// 4 messages +// - 4 messages package avf import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,6 +28,14 @@ const ( VersionCrc = 0x9f5a6a20 ) +// - client_index - opaque cookie to identify the sender +// - pci_addr - pci address as unsigned 32bit integer: +// 0-15 domain, 16-23 bus, 24-28 slot, 29-31 function +// ddddddddddddddddbbbbbbbbsssssfff +// - rxq_num - number of receive queues +// - rxq_size - receive queue size +// - txq_size - transmit queue size +// // AvfCreate defines message 'avf_create'. type AvfCreate struct { PciAddr uint32 `binapi:"u32,name=pci_addr" json:"pci_addr,omitempty"` @@ -78,6 +85,10 @@ func (m *AvfCreate) Unmarshal(b []byte) error { return nil } +// - context - sender context, to match reply w/ request +// - retval - return value for request +// - sw_if_index - software index for the new avf interface +// // AvfCreateReply defines message 'avf_create_reply'. type AvfCreateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -115,6 +126,9 @@ func (m *AvfCreateReply) Unmarshal(b []byte) error { return nil } +// - client_index - opaque cookie to identify the sender +// - sw_if_index - interface index +// // AvfDelete defines message 'avf_delete'. type AvfDelete struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/binapi/avf/avf_rpc.ba.go b/binapi/avf/avf_rpc.ba.go index 57478342..3e87ffd6 100644 --- a/binapi/avf/avf_rpc.ba.go +++ b/binapi/avf/avf_rpc.ba.go @@ -5,7 +5,7 @@ package avf import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service avf. diff --git a/binapi/bfd/bfd.ba.go b/binapi/bfd/bfd.ba.go index 748f7c20..2e720b77 100644 --- a/binapi/bfd/bfd.ba.go +++ b/binapi/bfd/bfd.ba.go @@ -1,24 +1,23 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/bfd.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/bfd.api.json // Package bfd contains generated bindings for API file bfd.api. // // Contents: -// -// 1 enum -// 31 messages +// - 1 enum +// - 31 messages package bfd import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -66,6 +65,11 @@ func (x BfdState) String() string { return "BfdState(" + strconv.Itoa(int(x)) + ")" } +// BFD UDP - delete key from configuration +// - conf_key_id - key ID to add/replace/delete +// - key_len - length of key (must be non-zero) +// - key - key data +// // BfdAuthDelKey defines message 'bfd_auth_del_key'. type BfdAuthDelKey struct { ConfKeyID uint32 `binapi:"u32,name=conf_key_id" json:"conf_key_id,omitempty"` @@ -132,6 +136,11 @@ func (m *BfdAuthDelKeyReply) Unmarshal(b []byte) error { return nil } +// BFD authentication key details +// - conf_key_id - configured key ID +// - use_count - how many BFD sessions currently use this key +// - auth_type - authentication type (RFC 5880/4.1/Auth Type) +// // BfdAuthKeysDetails defines message 'bfd_auth_keys_details'. type BfdAuthKeysDetails struct { ConfKeyID uint32 `binapi:"u32,name=conf_key_id" json:"conf_key_id,omitempty"` @@ -173,6 +182,7 @@ func (m *BfdAuthKeysDetails) Unmarshal(b []byte) error { return nil } +// Get a list of configured authentication keys // BfdAuthKeysDump defines message 'bfd_auth_keys_dump'. type BfdAuthKeysDump struct{} @@ -200,6 +210,12 @@ func (m *BfdAuthKeysDump) Unmarshal(b []byte) error { return nil } +// BFD UDP - add/replace key to configuration +// - conf_key_id - key ID to add/replace/delete +// - key_len - length of key (must be non-zero) +// - auth_type - authentication type (RFC 5880/4.1/Auth Type) +// - key - key data +// // BfdAuthSetKey defines message 'bfd_auth_set_key'. type BfdAuthSetKey struct { ConfKeyID uint32 `binapi:"u32,name=conf_key_id" json:"conf_key_id,omitempty"` @@ -279,6 +295,18 @@ func (m *BfdAuthSetKeyReply) Unmarshal(b []byte) error { return nil } +// Add UDP BFD session on interface +// - sw_if_index - sw index of the interface +// - desired_min_tx - desired min transmit interval (microseconds) +// - required_min_rx - required min receive interval (microseconds) +// - local_addr - local address +// - peer_addr - peer address +// - is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4 +// - detect_mult - detect multiplier (# of packets missed before connection goes down) +// - is_authenticated - non-zero if authentication is required +// - bfd_key_id - key id sent out in BFD packets (if is_authenticated) +// - conf_key_id - id of already configured key (if is_authenticated) +// // BfdUDPAdd defines message 'bfd_udp_add'. type BfdUDPAdd struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -383,6 +411,15 @@ func (m *BfdUDPAddReply) Unmarshal(b []byte) error { return nil } +// BFD UDP - activate/change authentication +// - sw_if_index - sw index of the interface +// - local_addr - local address +// - peer_addr - peer address +// - is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4 +// - is_delayed - change is applied once peer applies the change (on first received packet with this auth) +// - bfd_key_id - key id sent out in BFD packets +// - conf_key_id - id of already configured key +// // BfdUDPAuthActivate defines message 'bfd_udp_auth_activate'. type BfdUDPAuthActivate struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -475,6 +512,13 @@ func (m *BfdUDPAuthActivateReply) Unmarshal(b []byte) error { return nil } +// BFD UDP - deactivate authentication +// - sw_if_index - sw index of the interface +// - local_addr - local address +// - peer_addr - peer address +// - is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4 +// - is_delayed - change is applied once peer applies the change (on first received non-authenticated packet) +// // BfdUDPAuthDeactivate defines message 'bfd_udp_auth_deactivate'. type BfdUDPAuthDeactivate struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -559,6 +603,12 @@ func (m *BfdUDPAuthDeactivateReply) Unmarshal(b []byte) error { return nil } +// Delete UDP BFD session on interface +// - sw_if_index - sw index of the interface +// - local_addr - local address +// - peer_addr - peer address +// - is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4 +// // BfdUDPDel defines message 'bfd_udp_del'. type BfdUDPDel struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -606,6 +656,7 @@ func (m *BfdUDPDel) Unmarshal(b []byte) error { return nil } +// Delete BFD echo source // BfdUDPDelEchoSource defines message 'bfd_udp_del_echo_source'. type BfdUDPDelEchoSource struct{} @@ -699,6 +750,7 @@ func (m *BfdUDPDelReply) Unmarshal(b []byte) error { return nil } +// Get BFD echo source // BfdUDPGetEchoSource defines message 'bfd_udp_get_echo_source'. type BfdUDPGetEchoSource struct{} @@ -726,6 +778,15 @@ func (m *BfdUDPGetEchoSource) Unmarshal(b []byte) error { return nil } +// Get BFD echo source reply +// - retval - return code +// - sw_if_index - interface to use as echo source +// - is_set - non-zero if set +// - have_usable_ip4 - non-zero if have usable IPv4 address +// - ip4_addr - IPv4 address +// - have_usable_ip6 - non-zero if have usable IPv6 address +// - ip6_addr - IPv6 address +// // BfdUDPGetEchoSourceReply defines message 'bfd_udp_get_echo_source_reply'. type BfdUDPGetEchoSourceReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -783,6 +844,15 @@ func (m *BfdUDPGetEchoSourceReply) Unmarshal(b []byte) error { return nil } +// Modify UDP BFD session on interface +// - sw_if_index - sw index of the interface +// - desired_min_tx - desired min transmit interval (microseconds) +// - required_min_rx - required min receive interval (microseconds) +// - local_addr - local address +// - peer_addr - peer address +// - is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4 +// - detect_mult - detect multiplier (# of packets missed before connection goes down) +// // BfdUDPMod defines message 'bfd_udp_mod'. type BfdUDPMod struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -875,6 +945,19 @@ func (m *BfdUDPModReply) Unmarshal(b []byte) error { return nil } +// BFD session details structure +// - sw_if_index - sw index of the interface +// - local_addr - local address +// - peer_addr - peer address +// - is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4 +// - state - session state +// - is_authenticated - non-zero if authentication in-use, zero otherwise +// - bfd_key_id - ID of key currently in-use if auth is on +// - conf_key_id - configured key ID for this session +// - required_min_rx - required min receive interval (microseconds) +// - desired_min_tx - desired min transmit interval (microseconds) +// - detect_mult - detect multiplier (# of packets missed before connection goes down) +// // BfdUDPSessionDetails defines message 'bfd_udp_session_details'. type BfdUDPSessionDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -950,6 +1033,7 @@ func (m *BfdUDPSessionDetails) Unmarshal(b []byte) error { return nil } +// Get all BFD sessions // BfdUDPSessionDump defines message 'bfd_udp_session_dump'. type BfdUDPSessionDump struct{} @@ -1056,6 +1140,13 @@ func (m *BfdUDPSessionEvent) Unmarshal(b []byte) error { return nil } +// Set flags of BFD UDP session +// - sw_if_index - sw index of the interface +// - local_addr - local address +// - peer_addr - peer address +// - is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4 +// - flags - set the admin state, 1 = up, 0 = down +// // BfdUDPSessionSetFlags defines message 'bfd_udp_session_set_flags'. type BfdUDPSessionSetFlags struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1140,6 +1231,9 @@ func (m *BfdUDPSessionSetFlagsReply) Unmarshal(b []byte) error { return nil } +// Set BFD echo source +// - sw_if_index - interface to use as echo source +// // BfdUDPSetEchoSource defines message 'bfd_udp_set_echo_source'. type BfdUDPSetEchoSource struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1314,6 +1408,10 @@ func (m *BfdUDPUpdReply) Unmarshal(b []byte) error { return nil } +// Register for BFD events +// - enable_disable - 1 => register for events, 0 => cancel registration +// - pid - sender's pid +// // WantBfdEvents defines message 'want_bfd_events'. type WantBfdEvents struct { EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"` diff --git a/binapi/bfd/bfd_rpc.ba.go b/binapi/bfd/bfd_rpc.ba.go index 1a00c640..5ebedcae 100644 --- a/binapi/bfd/bfd_rpc.ba.go +++ b/binapi/bfd/bfd_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service bfd. diff --git a/binapi/bier/bier.ba.go b/binapi/bier/bier.ba.go index 50d67c4c..55cd9ddb 100644 --- a/binapi/bier/bier.ba.go +++ b/binapi/bier/bier.ba.go @@ -1,22 +1,21 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/bier.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/bier.api.json // Package bier contains generated bindings for API file bier.api. // // Contents: -// -// 2 structs -// 22 messages +// - 2 structs +// - 22 messages package bier import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" fib_types "github.com/networkservicemesh/govpp/binapi/fib_types" _ "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -46,6 +45,16 @@ type BierTableID struct { BtHdrLenID uint8 `binapi:"u8,name=bt_hdr_len_id" json:"bt_hdr_len_id,omitempty"` } +// BIER Disposition Entry Add / del +// - bde_bp - The Bit-position value for the entry, i.e. the sender's +// Use 0 for the default (match any source) entry. +// - bde_tbl_id - The BIER disposition table-id the route is added in +// - bde_next_hop_sw_if_index - the next hop interface +// - bde_is_add - Is this a route add or delete +// - bde_payload_proto - The payload protocol for which the next-hop +// is added +// - bde_paths - The outgoing paths for the entry +// // BierDispEntryAddDel defines message 'bier_disp_entry_add_del'. type BierDispEntryAddDel struct { BdeBp uint16 `binapi:"u16,name=bde_bp" json:"bde_bp,omitempty"` @@ -358,6 +367,9 @@ func (m *BierDispEntryDump) Unmarshal(b []byte) error { return nil } +// BIER Disposition Table Add / del route +// - bt_tbl_id - The BIER Disposition table-id. +// // BierDispTableAddDel defines message 'bier_disp_table_add_del'. type BierDispTableAddDel struct { BdtTblID uint32 `binapi:"u32,name=bdt_tbl_id" json:"bdt_tbl_id,omitempty"` @@ -488,6 +500,14 @@ func (m *BierDispTableDump) Unmarshal(b []byte) error { return nil } +// BIER Imposition Add +// - bi_tbl_id - The BIER table-id used to forward post encap +// - bi_src - The source Bit-position in the encap. +// - bi_n_bytes - The number of bytes in the following bit-string. +// VPP only supports BSL of 1024 and less, so this is +// a u8 field. +// - bi_bytes - The bit-string represented as a byte array (MSB first) +// // BierImpAdd defines message 'bier_imp_add'. type BierImpAdd struct { BiTblID BierTableID `binapi:"bier_table_id,name=bi_tbl_id" json:"bi_tbl_id,omitempty"` @@ -540,6 +560,10 @@ func (m *BierImpAdd) Unmarshal(b []byte) error { return nil } +// Reply for BIER route add / del request +// - retval - return code +// - bi_index - The index of the created imposition object. +// // BierImpAddReply defines message 'bier_imp_add_reply'. type BierImpAddReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -577,6 +601,10 @@ func (m *BierImpAddReply) Unmarshal(b []byte) error { return nil } +// BIER Imposition Del +// - bi_index - The index of the imposition object (as returned +// from the ADD) +// // BierImpDel defines message 'bier_imp_del'. type BierImpDel struct { BiIndex uint32 `binapi:"u32,name=bi_index" json:"bi_index,omitempty"` @@ -722,6 +750,17 @@ func (m *BierImpDump) Unmarshal(b []byte) error { return nil } +// BIER Route Add / del route +// - br_bp - The Bit-position value +// - br_tbl_id - The BIER table-id the route is added in +// - br_is_add - Is this a route add or delete +// - br_is_replace - Are the paths specified replacing those already +// present or are they to be combined. +// is_replace = 1 and n_paths=0 implies delete the +// route and all paths; +// - br_n_paths - The number of paths +// - br_paths - The array of paths +// // BierRouteAddDel defines message 'bier_route_add_del'. type BierRouteAddDel struct { BrIsAdd bool `binapi:"bool,name=br_is_add" json:"br_is_add,omitempty"` @@ -1038,6 +1077,13 @@ func (m *BierRouteDump) Unmarshal(b []byte) error { return nil } +// BIER Table Add / del route +// - bt_tbl_id - The BIER table-id the route is added in +// - bt_label - The MPLS label for the table (0 or all ones means not set) +// If the label is not set, then it is assumed that non-MPLS +// encoding is used. +// - bt_is_add - Is this a route add or delete +// // BierTableAddDel defines message 'bier_table_add_del'. type BierTableAddDel struct { BtTblID BierTableID `binapi:"bier_table_id,name=bt_tbl_id" json:"bt_tbl_id,omitempty"` diff --git a/binapi/bier/bier_rpc.ba.go b/binapi/bier/bier_rpc.ba.go index 1012459f..34addfba 100644 --- a/binapi/bier/bier_rpc.ba.go +++ b/binapi/bier/bier_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service bier. diff --git a/binapi/bond/bond.ba.go b/binapi/bond/bond.ba.go index 70ab82a6..27abe608 100644 --- a/binapi/bond/bond.ba.go +++ b/binapi/bond/bond.ba.go @@ -1,24 +1,23 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/bond.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/bond.api.json // Package bond contains generated bindings for API file bond.api. // // Contents: -// -// 2 enums -// 24 messages +// - 2 enums +// - 24 messages package bond import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ethernet_types "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -108,6 +107,12 @@ func (x BondMode) String() string { return "BondMode(" + strconv.Itoa(int(x)) + ")" } +// Initialize a new bond interface with the given paramters +// - sw_if_index - member sw_if_index +// - bond_sw_if_index - bond sw_if_index +// - is_passive - interface does not initiate the lacp protocol, remote must be active speaker +// - is_long_timeout - 90 seconds vs default 3 seconds neighbor timeout +// // BondAddMember defines message 'bond_add_member'. type BondAddMember struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -153,6 +158,9 @@ func (m *BondAddMember) Unmarshal(b []byte) error { return nil } +// Reply for bond add_member reply +// - retval - return code +// // BondAddMemberReply defines message 'bond_add_member_reply'. type BondAddMemberReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -186,6 +194,14 @@ func (m *BondAddMemberReply) Unmarshal(b []byte) error { return nil } +// Initialize a new bond interface with the given paramters +// - id - if non-~0, specifies a custom interface ID +// - use_custom_mac - if set, mac_address is valid +// - mac_address - mac addr to assign to the interface if use_custom_mac is set +// - mode - mode, required (1=round-robin, 2=active-backup, 3=xor, 4=broadcast, 5=lacp) +// - lb - load balance, optional (0=l2, 1=l34, 2=l23) valid for xor and lacp modes. Otherwise ignored +// - numa_only - if numa_only is set, pkts will be transmitted by LAG members on local numa node only if have at least one, otherwise it works as usual. +// // BondCreate defines message 'bond_create'. // Deprecated: the message will be removed in the future versions type BondCreate struct { @@ -240,6 +256,15 @@ func (m *BondCreate) Unmarshal(b []byte) error { return nil } +// Initialize a new bond interface with the given paramters +// - mode - mode, required (1=round-robin, 2=active-backup, 3=xor, 4=broadcast, 5=lacp) +// - lb - load balance, optional (0=l2, 1=l34, 2=l23) valid for xor and lacp modes. Otherwise ignored (default=l2) +// - numa_only - if numa_only is set, pkts will be transmitted by LAG members on local numa node only if have at least one, otherwise it works as usual. +// - enable_gso - enable gso support (default 0) +// - use_custom_mac - if set, mac_address is valid +// - mac_address - mac addr to assign to the interface if use_custom_mac is set +// - id - if non-~0, specifies a custom interface ID (default=0xFFFFFFFF) +// // BondCreate2 defines message 'bond_create2'. type BondCreate2 struct { Mode BondMode `binapi:"bond_mode,name=mode" json:"mode,omitempty"` @@ -297,6 +322,10 @@ func (m *BondCreate2) Unmarshal(b []byte) error { return nil } +// Reply for bond create2 reply +// - retval - return code +// - sw_if_index - software index allocated for the new tap interface +// // BondCreate2Reply defines message 'bond_create2_reply'. type BondCreate2Reply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -334,6 +363,10 @@ func (m *BondCreate2Reply) Unmarshal(b []byte) error { return nil } +// Reply for bond create reply +// - retval - return code +// - sw_if_index - software index allocated for the new tap interface +// // BondCreateReply defines message 'bond_create_reply'. type BondCreateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -371,6 +404,9 @@ func (m *BondCreateReply) Unmarshal(b []byte) error { return nil } +// Delete bond interface +// - sw_if_index - interface index of member interface +// // BondDelete defines message 'bond_delete'. type BondDelete struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -437,6 +473,9 @@ func (m *BondDeleteReply) Unmarshal(b []byte) error { return nil } +// bond detach member +// - sw_if_index - interface index of member interface +// // BondDetachMember defines message 'bond_detach_member'. type BondDetachMember struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -503,6 +542,9 @@ func (m *BondDetachMemberReply) Unmarshal(b []byte) error { return nil } +// bond detach slave +// - sw_if_index - interface index of member interface +// // BondDetachSlave defines message 'bond_detach_slave'. // Deprecated: the message will be removed in the future versions type BondDetachSlave struct { @@ -571,6 +613,12 @@ func (m *BondDetachSlaveReply) Unmarshal(b []byte) error { return nil } +// Initialize a new bond interface with the given paramters +// - sw_if_index - slave sw_if_index +// - bond_sw_if_index - bond sw_if_index +// - is_passive - interface does not initiate the lacp protocol, remote must be active speaker +// - is_long_timeout - 90 seconds vs default 3 seconds neighbor timeout +// // BondEnslave defines message 'bond_enslave'. // Deprecated: the message will be removed in the future versions type BondEnslave struct { @@ -617,6 +665,9 @@ func (m *BondEnslave) Unmarshal(b []byte) error { return nil } +// Reply for bond enslave reply +// - retval - return code +// // BondEnslaveReply defines message 'bond_enslave_reply'. type BondEnslaveReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -650,6 +701,16 @@ func (m *BondEnslaveReply) Unmarshal(b []byte) error { return nil } +// Reply for bond dump request +// - sw_if_index - software index of bond interface +// - id - ID of interface +// - mode - bonding mode +// - lb - load balance algo +// - numa_only - enable local numa TX for lacp mode +// - active_members - active members count +// - members - config member count +// - interface_name - name of interface +// // SwBondInterfaceDetails defines message 'sw_bond_interface_details'. type SwBondInterfaceDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -711,6 +772,7 @@ func (m *SwBondInterfaceDetails) Unmarshal(b []byte) error { return nil } +// Dump bond interfaces request // SwBondInterfaceDump defines message 'sw_bond_interface_dump'. type SwBondInterfaceDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` @@ -744,6 +806,16 @@ func (m *SwBondInterfaceDump) Unmarshal(b []byte) error { return nil } +// Reply for bond dump request +// - sw_if_index - software index of bond interface +// - id - ID of interface +// - interface_name - name of interface +// - mode - bonding mode +// - lb - load balance algo +// - numa_only - enable local numa TX for lacp mode +// - active_slaves - active member count +// - slaves - config member count +// // SwInterfaceBondDetails defines message 'sw_interface_bond_details'. type SwInterfaceBondDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -805,6 +877,7 @@ func (m *SwInterfaceBondDetails) Unmarshal(b []byte) error { return nil } +// Dump bond interfaces request // SwInterfaceBondDump defines message 'sw_interface_bond_dump'. // Deprecated: the message will be removed in the future versions type SwInterfaceBondDump struct{} @@ -833,6 +906,10 @@ func (m *SwInterfaceBondDump) Unmarshal(b []byte) error { return nil } +// Interface set bond weight +// - sw_if_index - member interface for which to set the weight +// - weight - weight value to be set for the member interface +// // SwInterfaceSetBondWeight defines message 'sw_interface_set_bond_weight'. type SwInterfaceSetBondWeight struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -905,6 +982,14 @@ func (m *SwInterfaceSetBondWeightReply) Unmarshal(b []byte) error { return nil } +// Reply for slave dump request +// - sw_if_index - software index of slave interface +// - interface_name - name of interface +// - is_passve - interface does not initiate the lacp protocol, remote must be active speaker +// - is_long_timeout - 90 seconds vs default 3 seconds neighbor timeout +// - is_local_numa - the slave interface is local numa +// - weight - the weight for the slave interface (active-backup mode only) +// // SwInterfaceSlaveDetails defines message 'sw_interface_slave_details'. type SwInterfaceSlaveDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -958,6 +1043,9 @@ func (m *SwInterfaceSlaveDetails) Unmarshal(b []byte) error { return nil } +// bond slave dump +// - sw_if_index - interface index of bond interface +// // SwInterfaceSlaveDump defines message 'sw_interface_slave_dump'. // Deprecated: the message will be removed in the future versions type SwInterfaceSlaveDump struct { @@ -992,6 +1080,14 @@ func (m *SwInterfaceSlaveDump) Unmarshal(b []byte) error { return nil } +// Reply for member dump request +// - sw_if_index - software index of member interface +// - interface_name - name of interface +// - is_passve - interface does not initiate the lacp protocol, remote must be active speaker +// - is_long_timeout - 90 seconds vs default 3 seconds neighbor timeout +// - is_local_numa - the member interface is local numa +// - weight - the weight for the member interface (active-backup mode only) +// // SwMemberInterfaceDetails defines message 'sw_member_interface_details'. type SwMemberInterfaceDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1045,6 +1141,9 @@ func (m *SwMemberInterfaceDetails) Unmarshal(b []byte) error { return nil } +// bond member dump +// - sw_if_index - interface index of bond interface +// // SwMemberInterfaceDump defines message 'sw_member_interface_dump'. type SwMemberInterfaceDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/binapi/bond/bond_rpc.ba.go b/binapi/bond/bond_rpc.ba.go index 696c28c5..79dc17c1 100644 --- a/binapi/bond/bond_rpc.ba.go +++ b/binapi/bond/bond_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service bond. diff --git a/binapi/bpf_trace_filter/bpf_trace_filter.ba.go b/binapi/bpf_trace_filter/bpf_trace_filter.ba.go new file mode 100644 index 00000000..c2d7befc --- /dev/null +++ b/binapi/bpf_trace_filter/bpf_trace_filter.ba.go @@ -0,0 +1,128 @@ +// Code generated by GoVPP's binapi-generator. DO NOT EDIT. +// versions: +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/bpf_trace_filter.api.json + +// Package bpf_trace_filter contains generated bindings for API file bpf_trace_filter.api. +// +// Contents: +// - 2 messages +package bpf_trace_filter + +import ( + api "go.fd.io/govpp/api" + 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 = "bpf_trace_filter" + APIVersion = "0.1.0" + VersionCrc = 0x79160184 +) + +// /* +// - bpf_trace_filter.api - BPF Trace filter API +// * +// - Copyright (c) 2023 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. +// +// BpfTraceFilterSet defines message 'bpf_trace_filter_set'. +type BpfTraceFilterSet struct { + IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` + Filter string `binapi:"string[],name=filter" json:"filter,omitempty"` +} + +func (m *BpfTraceFilterSet) Reset() { *m = BpfTraceFilterSet{} } +func (*BpfTraceFilterSet) GetMessageName() string { return "bpf_trace_filter_set" } +func (*BpfTraceFilterSet) GetCrcString() string { return "3171346e" } +func (*BpfTraceFilterSet) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *BpfTraceFilterSet) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.IsAdd + size += 4 + len(m.Filter) // m.Filter + return size +} +func (m *BpfTraceFilterSet) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.IsAdd) + buf.EncodeString(m.Filter, 0) + return buf.Bytes(), nil +} +func (m *BpfTraceFilterSet) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsAdd = buf.DecodeBool() + m.Filter = buf.DecodeString(0) + return nil +} + +// BpfTraceFilterSetReply defines message 'bpf_trace_filter_set_reply'. +type BpfTraceFilterSetReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *BpfTraceFilterSetReply) Reset() { *m = BpfTraceFilterSetReply{} } +func (*BpfTraceFilterSetReply) GetMessageName() string { return "bpf_trace_filter_set_reply" } +func (*BpfTraceFilterSetReply) GetCrcString() string { return "e8d4e804" } +func (*BpfTraceFilterSetReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *BpfTraceFilterSetReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *BpfTraceFilterSetReply) 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 *BpfTraceFilterSetReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +func init() { file_bpf_trace_filter_binapi_init() } +func file_bpf_trace_filter_binapi_init() { + api.RegisterMessage((*BpfTraceFilterSet)(nil), "bpf_trace_filter_set_3171346e") + api.RegisterMessage((*BpfTraceFilterSetReply)(nil), "bpf_trace_filter_set_reply_e8d4e804") +} + +// Messages returns list of all messages in this module. +func AllMessages() []api.Message { + return []api.Message{ + (*BpfTraceFilterSet)(nil), + (*BpfTraceFilterSetReply)(nil), + } +} diff --git a/binapi/bpf_trace_filter/bpf_trace_filter_rpc.ba.go b/binapi/bpf_trace_filter/bpf_trace_filter_rpc.ba.go new file mode 100644 index 00000000..8d68e5b3 --- /dev/null +++ b/binapi/bpf_trace_filter/bpf_trace_filter_rpc.ba.go @@ -0,0 +1,31 @@ +// Code generated by GoVPP's binapi-generator. DO NOT EDIT. + +package bpf_trace_filter + +import ( + "context" + + api "go.fd.io/govpp/api" +) + +// RPCService defines RPC service bpf_trace_filter. +type RPCService interface { + BpfTraceFilterSet(ctx context.Context, in *BpfTraceFilterSet) (*BpfTraceFilterSetReply, error) +} + +type serviceClient struct { + conn api.Connection +} + +func NewServiceClient(conn api.Connection) RPCService { + return &serviceClient{conn} +} + +func (c *serviceClient) BpfTraceFilterSet(ctx context.Context, in *BpfTraceFilterSet) (*BpfTraceFilterSetReply, error) { + out := new(BpfTraceFilterSetReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} diff --git a/binapi/builtinurl/builtinurl.ba.go b/binapi/builtinurl/builtinurl.ba.go index 78024c6b..6e991198 100644 --- a/binapi/builtinurl/builtinurl.ba.go +++ b/binapi/builtinurl/builtinurl.ba.go @@ -1,19 +1,18 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/builtinurl.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/builtinurl.api.json // Package builtinurl contains generated bindings for API file builtinurl.api. // // Contents: -// -// 2 messages +// - 2 messages package builtinurl import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -28,6 +27,10 @@ const ( VersionCrc = 0x25045d63 ) +// @brief API to enable / disable builtinurl on an interface +// - enable_disable - 1 to enable, 0 to disable the feature +// - sw_if_index - interface handle +// // BuiltinurlEnable defines message 'builtinurl_enable'. type BuiltinurlEnable struct{} diff --git a/binapi/builtinurl/builtinurl_rpc.ba.go b/binapi/builtinurl/builtinurl_rpc.ba.go index f44e843a..6137bb95 100644 --- a/binapi/builtinurl/builtinurl_rpc.ba.go +++ b/binapi/builtinurl/builtinurl_rpc.ba.go @@ -5,7 +5,7 @@ package builtinurl import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service builtinurl. diff --git a/binapi/capo/capo.ba.go b/binapi/capo/capo.ba.go index d475f066..aba8feda 100644 --- a/binapi/capo/capo.ba.go +++ b/binapi/capo/capo.ba.go @@ -1,26 +1,25 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/capo.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/capo.api.json // Package capo contains generated bindings for API file capo.api. // // Contents: -// -// 4 enums -// 8 structs -// 2 unions -// 24 messages +// - 4 enums +// - 8 structs +// - 2 unions +// - 24 messages package capo import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" _ "github.com/networkservicemesh/govpp/binapi/fib_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -32,7 +31,7 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "capo" APIVersion = "0.1.0" - VersionCrc = 0xf7ab3600 + VersionCrc = 0x7ed1a7f5 ) // CapoEntryType defines enum 'capo_entry_type'. @@ -338,18 +337,18 @@ func (u *CapoIpsetMemberValUnion) GetTuple() (a CapoThreeTuple) { } // CapoConfigurePolicies defines message 'capo_configure_policies'. -// InProgress: the message form may change in the future versions type CapoConfigurePolicies struct { - SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"` - NumIngressPolicies uint32 `binapi:"u32,name=num_ingress_policies" json:"num_ingress_policies,omitempty"` - NumEgressPolicies uint32 `binapi:"u32,name=num_egress_policies" json:"num_egress_policies,omitempty"` - TotalIds uint32 `binapi:"u32,name=total_ids" json:"-"` - PolicyIds []uint32 `binapi:"u32[total_ids],name=policy_ids" json:"policy_ids,omitempty"` + SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"` + NumRxPolicies uint32 `binapi:"u32,name=num_rx_policies" json:"num_rx_policies,omitempty"` + NumTxPolicies uint32 `binapi:"u32,name=num_tx_policies" json:"num_tx_policies,omitempty"` + TotalIds uint32 `binapi:"u32,name=total_ids" json:"-"` + InvertRxTx uint8 `binapi:"u8,name=invert_rx_tx" json:"invert_rx_tx,omitempty"` + PolicyIds []uint32 `binapi:"u32[total_ids],name=policy_ids" json:"policy_ids,omitempty"` } func (m *CapoConfigurePolicies) Reset() { *m = CapoConfigurePolicies{} } func (*CapoConfigurePolicies) GetMessageName() string { return "capo_configure_policies" } -func (*CapoConfigurePolicies) GetCrcString() string { return "3ca1772c" } +func (*CapoConfigurePolicies) GetCrcString() string { return "743e3c30" } func (*CapoConfigurePolicies) GetMessageType() api.MessageType { return api.RequestMessage } @@ -359,9 +358,10 @@ func (m *CapoConfigurePolicies) Size() (size int) { return 0 } size += 4 // m.SwIfIndex - size += 4 // m.NumIngressPolicies - size += 4 // m.NumEgressPolicies + size += 4 // m.NumRxPolicies + size += 4 // m.NumTxPolicies size += 4 // m.TotalIds + size += 1 // m.InvertRxTx size += 4 * len(m.PolicyIds) // m.PolicyIds return size } @@ -371,9 +371,10 @@ func (m *CapoConfigurePolicies) Marshal(b []byte) ([]byte, error) { } buf := codec.NewBuffer(b) buf.EncodeUint32(m.SwIfIndex) - buf.EncodeUint32(m.NumIngressPolicies) - buf.EncodeUint32(m.NumEgressPolicies) + buf.EncodeUint32(m.NumRxPolicies) + buf.EncodeUint32(m.NumTxPolicies) buf.EncodeUint32(uint32(len(m.PolicyIds))) + buf.EncodeUint8(m.InvertRxTx) for i := 0; i < len(m.PolicyIds); i++ { var x uint32 if i < len(m.PolicyIds) { @@ -386,9 +387,10 @@ func (m *CapoConfigurePolicies) Marshal(b []byte) ([]byte, error) { func (m *CapoConfigurePolicies) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.SwIfIndex = buf.DecodeUint32() - m.NumIngressPolicies = buf.DecodeUint32() - m.NumEgressPolicies = buf.DecodeUint32() + m.NumRxPolicies = buf.DecodeUint32() + m.NumTxPolicies = buf.DecodeUint32() m.TotalIds = buf.DecodeUint32() + m.InvertRxTx = buf.DecodeUint8() m.PolicyIds = make([]uint32, m.TotalIds) for i := 0; i < len(m.PolicyIds); i++ { m.PolicyIds[i] = buf.DecodeUint32() @@ -397,7 +399,6 @@ func (m *CapoConfigurePolicies) Unmarshal(b []byte) error { } // CapoConfigurePoliciesReply defines message 'capo_configure_policies_reply'. -// InProgress: the message form may change in the future versions type CapoConfigurePoliciesReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -430,8 +431,8 @@ func (m *CapoConfigurePoliciesReply) Unmarshal(b []byte) error { return nil } +// Control ping from client to api server request // CapoControlPing defines message 'capo_control_ping'. -// InProgress: the message form may change in the future versions type CapoControlPing struct{} func (m *CapoControlPing) Reset() { *m = CapoControlPing{} } @@ -458,8 +459,11 @@ func (m *CapoControlPing) Unmarshal(b []byte) error { return nil } +// Control ping from the client to the server response +// - retval - return code for the request +// - vpe_pid - the pid of the vpe, returned by the server +// // CapoControlPingReply defines message 'capo_control_ping_reply'. -// InProgress: the message form may change in the future versions type CapoControlPingReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` ClientIndex uint32 `binapi:"u32,name=client_index" json:"client_index,omitempty"` @@ -500,8 +504,8 @@ func (m *CapoControlPingReply) Unmarshal(b []byte) error { return nil } +// Get the plugin version // CapoGetVersion defines message 'capo_get_version'. -// InProgress: the message form may change in the future versions type CapoGetVersion struct{} func (m *CapoGetVersion) Reset() { *m = CapoGetVersion{} } @@ -528,8 +532,11 @@ func (m *CapoGetVersion) Unmarshal(b []byte) error { return nil } +// Reply to get the plugin version +// - major - Incremented every time a known breaking behavior change is introduced +// - minor - Incremented with small changes, may be used to avoid buggy versions +// // CapoGetVersionReply defines message 'capo_get_version_reply'. -// InProgress: the message form may change in the future versions type CapoGetVersionReply struct { Major uint32 `binapi:"u32,name=major" json:"major,omitempty"` Minor uint32 `binapi:"u32,name=minor" json:"minor,omitempty"` @@ -567,7 +574,6 @@ func (m *CapoGetVersionReply) Unmarshal(b []byte) error { } // CapoIpsetAddDelMembers defines message 'capo_ipset_add_del_members'. -// InProgress: the message form may change in the future versions type CapoIpsetAddDelMembers struct { SetID uint32 `binapi:"u32,name=set_id" json:"set_id,omitempty"` IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -629,7 +635,6 @@ func (m *CapoIpsetAddDelMembers) Unmarshal(b []byte) error { } // CapoIpsetAddDelMembersReply defines message 'capo_ipset_add_del_members_reply'. -// InProgress: the message form may change in the future versions type CapoIpsetAddDelMembersReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -665,7 +670,6 @@ func (m *CapoIpsetAddDelMembersReply) Unmarshal(b []byte) error { } // CapoIpsetCreate defines message 'capo_ipset_create'. -// InProgress: the message form may change in the future versions type CapoIpsetCreate struct { Type CapoIpsetType `binapi:"capo_ipset_type,name=type" json:"type,omitempty"` } @@ -699,7 +703,6 @@ func (m *CapoIpsetCreate) Unmarshal(b []byte) error { } // CapoIpsetCreateReply defines message 'capo_ipset_create_reply'. -// InProgress: the message form may change in the future versions type CapoIpsetCreateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` SetID uint32 `binapi:"u32,name=set_id" json:"set_id,omitempty"` @@ -737,7 +740,6 @@ func (m *CapoIpsetCreateReply) Unmarshal(b []byte) error { } // CapoIpsetDelete defines message 'capo_ipset_delete'. -// InProgress: the message form may change in the future versions type CapoIpsetDelete struct { SetID uint32 `binapi:"u32,name=set_id" json:"set_id,omitempty"` } @@ -771,7 +773,6 @@ func (m *CapoIpsetDelete) Unmarshal(b []byte) error { } // CapoIpsetDeleteReply defines message 'capo_ipset_delete_reply'. -// InProgress: the message form may change in the future versions type CapoIpsetDeleteReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -805,7 +806,6 @@ func (m *CapoIpsetDeleteReply) Unmarshal(b []byte) error { } // CapoPolicyCreate defines message 'capo_policy_create'. -// InProgress: the message form may change in the future versions type CapoPolicyCreate struct { NumItems uint32 `binapi:"u32,name=num_items" json:"-"` Rules []CapoPolicyItem `binapi:"capo_policy_item[num_items],name=rules" json:"rules,omitempty"` @@ -862,7 +862,6 @@ func (m *CapoPolicyCreate) Unmarshal(b []byte) error { } // CapoPolicyCreateReply defines message 'capo_policy_create_reply'. -// InProgress: the message form may change in the future versions type CapoPolicyCreateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` PolicyID uint32 `binapi:"u32,name=policy_id" json:"policy_id,omitempty"` @@ -900,7 +899,6 @@ func (m *CapoPolicyCreateReply) Unmarshal(b []byte) error { } // CapoPolicyDelete defines message 'capo_policy_delete'. -// InProgress: the message form may change in the future versions type CapoPolicyDelete struct { PolicyID uint32 `binapi:"u32,name=policy_id" json:"policy_id,omitempty"` } @@ -934,7 +932,6 @@ func (m *CapoPolicyDelete) Unmarshal(b []byte) error { } // CapoPolicyDeleteReply defines message 'capo_policy_delete_reply'. -// InProgress: the message form may change in the future versions type CapoPolicyDeleteReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -968,7 +965,6 @@ func (m *CapoPolicyDeleteReply) Unmarshal(b []byte) error { } // CapoPolicyUpdate defines message 'capo_policy_update'. -// InProgress: the message form may change in the future versions type CapoPolicyUpdate struct { PolicyID uint32 `binapi:"u32,name=policy_id" json:"policy_id,omitempty"` NumItems uint32 `binapi:"u32,name=num_items" json:"-"` @@ -1029,7 +1025,6 @@ func (m *CapoPolicyUpdate) Unmarshal(b []byte) error { } // CapoPolicyUpdateReply defines message 'capo_policy_update_reply'. -// InProgress: the message form may change in the future versions type CapoPolicyUpdateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -1062,8 +1057,8 @@ func (m *CapoPolicyUpdateReply) Unmarshal(b []byte) error { return nil } +// // where the packet only needs to match one entry in either category // CapoRuleCreate defines message 'capo_rule_create'. -// InProgress: the message form may change in the future versions type CapoRuleCreate struct { Rule CapoRule `binapi:"capo_rule,name=rule" json:"rule,omitempty"` } @@ -1146,7 +1141,6 @@ func (m *CapoRuleCreate) Unmarshal(b []byte) error { } // CapoRuleCreateReply defines message 'capo_rule_create_reply'. -// InProgress: the message form may change in the future versions type CapoRuleCreateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` RuleID uint32 `binapi:"u32,name=rule_id" json:"rule_id,omitempty"` @@ -1184,7 +1178,6 @@ func (m *CapoRuleCreateReply) Unmarshal(b []byte) error { } // CapoRuleDelete defines message 'capo_rule_delete'. -// InProgress: the message form may change in the future versions type CapoRuleDelete struct { RuleID uint32 `binapi:"u32,name=rule_id" json:"rule_id,omitempty"` } @@ -1218,7 +1211,6 @@ func (m *CapoRuleDelete) Unmarshal(b []byte) error { } // CapoRuleDeleteReply defines message 'capo_rule_delete_reply'. -// InProgress: the message form may change in the future versions type CapoRuleDeleteReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -1252,7 +1244,6 @@ func (m *CapoRuleDeleteReply) Unmarshal(b []byte) error { } // CapoRuleUpdate defines message 'capo_rule_update'. -// InProgress: the message form may change in the future versions type CapoRuleUpdate struct { RuleID uint32 `binapi:"u32,name=rule_id" json:"rule_id,omitempty"` Rule CapoRule `binapi:"capo_rule,name=rule" json:"rule,omitempty"` @@ -1339,7 +1330,6 @@ func (m *CapoRuleUpdate) Unmarshal(b []byte) error { } // CapoRuleUpdateReply defines message 'capo_rule_update_reply'. -// InProgress: the message form may change in the future versions type CapoRuleUpdateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -1374,7 +1364,7 @@ func (m *CapoRuleUpdateReply) Unmarshal(b []byte) error { func init() { file_capo_binapi_init() } func file_capo_binapi_init() { - api.RegisterMessage((*CapoConfigurePolicies)(nil), "capo_configure_policies_3ca1772c") + api.RegisterMessage((*CapoConfigurePolicies)(nil), "capo_configure_policies_743e3c30") api.RegisterMessage((*CapoConfigurePoliciesReply)(nil), "capo_configure_policies_reply_e8d4e804") api.RegisterMessage((*CapoControlPing)(nil), "capo_control_ping_51077d14") api.RegisterMessage((*CapoControlPingReply)(nil), "capo_control_ping_reply_f6b0b8ca") diff --git a/binapi/capo/capo_rpc.ba.go b/binapi/capo/capo_rpc.ba.go index 6a3e5fd8..90e8084b 100644 --- a/binapi/capo/capo_rpc.ba.go +++ b/binapi/capo/capo_rpc.ba.go @@ -5,7 +5,7 @@ package capo import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service capo. diff --git a/binapi/cdp/cdp.ba.go b/binapi/cdp/cdp.ba.go index fc3aa98f..793ec0b1 100644 --- a/binapi/cdp/cdp.ba.go +++ b/binapi/cdp/cdp.ba.go @@ -1,19 +1,18 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/cdp.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/cdp.api.json // Package cdp contains generated bindings for API file cdp.api. // // Contents: -// -// 2 messages +// - 2 messages package cdp import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -28,6 +27,22 @@ const ( VersionCrc = 0x8cfa825e ) +// /* +// - Simple enable/disable API for the cdp protocol +// * +// - Copyright (c) 2011-2018 by 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. +// // CdpEnableDisable defines message 'cdp_enable_disable'. type CdpEnableDisable struct { EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"` diff --git a/binapi/cdp/cdp_rpc.ba.go b/binapi/cdp/cdp_rpc.ba.go index 8eac86c6..4f7b2910 100644 --- a/binapi/cdp/cdp_rpc.ba.go +++ b/binapi/cdp/cdp_rpc.ba.go @@ -5,7 +5,7 @@ package cdp import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service cdp. diff --git a/binapi/classify/classify.ba.go b/binapi/classify/classify.ba.go index b9e8f2f8..1b61e763 100644 --- a/binapi/classify/classify.ba.go +++ b/binapi/classify/classify.ba.go @@ -1,23 +1,22 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/classify.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/classify.api.json // Package classify contains generated bindings for API file classify.api. // // Contents: -// -// 3 enums -// 44 messages +// - 3 enums +// - 44 messages package classify import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -122,6 +121,35 @@ func (x PolicerClassifyTable) String() string { return "PolicerClassifyTable(" + strconv.Itoa(int(x)) + ")" } +// Classify add / del session request +// - is_add - add session if non-zero, else delete +// - table_index - index of the table to add/del the session, required +// - hit_next_index - for add, hit_next_index of new session, required +// - opaque_index - for add, opaque_index of new session +// - advance -for add, advance value for session +// - action - +// 0: no action (by default) +// metadata is not used. +// 1: Classified IP packets will be looked up from the +// specified ipv4 fib table (configured by metadata as VRF id). +// Only valid for L3 input ACL node +// 2: Classified IP packets will be looked up from the +// specified ipv6 fib table (configured by metadata as VRF id). +// Only valid for L3 input ACL node +// 3: Classified packet will be steered to source routing policy +// of given index (in metadata). +// This is only valid for IPv6 packets redirected to a source +// routing node. +// - metadata - valid only if action != 0 +// VRF id if action is 1 or 2. +// sr policy index if action is 3. +// - match_len - length of match, should be equal to skip_n_vectors plus match_n_vectors +// of target table times sizeof (u32x4) +// - match - for add, match value for session, required, +// needs to include bytes in front +// with length of skip_n_vectors of target table times sizeof (u32x4) +// (values of those bytes will be ignored) +// // ClassifyAddDelSession defines message 'classify_add_del_session'. type ClassifyAddDelSession struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -221,6 +249,29 @@ func (m *ClassifyAddDelSessionReply) Unmarshal(b []byte) error { return nil } +// Add/Delete classification table request +// - is_add- if non-zero add the table, else delete it +// - del_chain - if non-zero delete the whole chain of tables +// - table_index - if add, returns index of the created table, else specifies the table to delete +// - nbuckets - number of buckets when adding a table +// - memory_size - memory size when adding a table +// - match_n_vectors - number of match vectors +// - next_table_index - index of next table +// - miss_next_index - index of miss table +// - current_data_flag - option to use current node's packet payload +// as the starting point from where packets are classified, +// This option is only valid for L2/L3 input ACL for now. +// 0: by default, classify data from the buffer's start location +// 1: classify packets from VPP node’s current data pointer +// - current_data_offset - a signed value to shift the start location of +// the packet to be classified +// For example, if input IP ACL node is used, L2 header’s first byte +// can be accessible by configuring current_data_offset to -14 +// if there is no vlan tag. +// This is valid only if current_data_flag is set to 1. +// - mask_len - length of match mask, should be equal to match_n_vectors * sizeof (u32x4) +// - mask - match mask +// // ClassifyAddDelTable defines message 'classify_add_del_table'. type ClassifyAddDelTable struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -303,6 +354,12 @@ func (m *ClassifyAddDelTable) Unmarshal(b []byte) error { return nil } +// Add/Delete classification table response +// - retval - return code for the table add/del request +// - new_table_index - for add, returned index of the new table +// - skip_n_vectors - for add, returned value of skip_n_vectors in table +// - match_n_vectors -for add, returned value of match_n_vectors in table +// // ClassifyAddDelTableReply defines message 'classify_add_del_table_reply'. type ClassifyAddDelTableReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -348,6 +405,7 @@ func (m *ClassifyAddDelTableReply) Unmarshal(b []byte) error { return nil } +// Classify get the PCAP table indices for an interface // ClassifyPcapGetTables defines message 'classify_pcap_get_tables'. type ClassifyPcapGetTables struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -381,6 +439,11 @@ func (m *ClassifyPcapGetTables) Unmarshal(b []byte) error { return nil } +// Classify get a PCAP tables response +// - retval - return code for the request +// - count - number of ids returned in response +// - indices - array of classify table indices +// // ClassifyPcapGetTablesReply defines message 'classify_pcap_get_tables_reply'. type ClassifyPcapGetTablesReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -431,6 +494,13 @@ func (m *ClassifyPcapGetTablesReply) Unmarshal(b []byte) error { return nil } +// Find a compatible Classify table in a PCAP chain +// - sw_if_index - interface whose chain will be searched, 0==system-wide +// - skip_n_vectors - number of u32x4 skip vectors +// - match_n_vectors - number of u32x4 vectors, 1..5 +// - mask_len - length of mask, match_n_vectors * sizeof(u32x4) +// - mask - match mask +// // ClassifyPcapLookupTable defines message 'classify_pcap_lookup_table'. type ClassifyPcapLookupTable struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` @@ -481,6 +551,10 @@ func (m *ClassifyPcapLookupTable) Unmarshal(b []byte) error { return nil } +// Classify pcap table lookup response +// - retval - return code for the table lookup request +// - table_index - returned index of the found table, or ~0 +// // ClassifyPcapLookupTableReply defines message 'classify_pcap_lookup_table_reply'. type ClassifyPcapLookupTableReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -520,6 +594,11 @@ func (m *ClassifyPcapLookupTableReply) Unmarshal(b []byte) error { return nil } +// Add a Classify table into a PCAP chain on an interface +// - sw_if_index - interface whose chain will be searched, 0==system-wide +// - table_index - Classify table to be added +// - sort_masks - 1=sort masks into most-to-least specific order +// // ClassifyPcapSetTable defines message 'classify_pcap_set_table'. type ClassifyPcapSetTable struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -561,6 +640,10 @@ func (m *ClassifyPcapSetTable) Unmarshal(b []byte) error { return nil } +// Classify pcap table lookup response +// - retval - return code for the table lookup request +// - table_index - returned index of the sorted table chain +// // ClassifyPcapSetTableReply defines message 'classify_pcap_set_table_reply'. type ClassifyPcapSetTableReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -598,6 +681,14 @@ func (m *ClassifyPcapSetTableReply) Unmarshal(b []byte) error { return nil } +// Reply for classify table session dump request +// - count - number of ids returned in response +// - table_id - classify table index +// - hit_next_index - hit_next_index of session +// - opaque_index - for add, opaque_index of session +// - advance - advance value of session +// - match[] - match value for session +// // ClassifySessionDetails defines message 'classify_session_details'. type ClassifySessionDetails struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -656,6 +747,9 @@ func (m *ClassifySessionDetails) Unmarshal(b []byte) error { return nil } +// Classify sessions dump request +// - table_id - classify table index +// // ClassifySessionDump defines message 'classify_session_dump'. type ClassifySessionDump struct { TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` @@ -689,6 +783,11 @@ func (m *ClassifySessionDump) Unmarshal(b []byte) error { return nil } +// Set/unset the classification table for an interface request +// - is_ipv6 - ipv6 if non-zero, else ipv4 +// - sw_if_index - interface to associate with the table +// - table_index - index of the table, if ~0 unset the table +// // ClassifySetInterfaceIPTable defines message 'classify_set_interface_ip_table'. type ClassifySetInterfaceIPTable struct { IsIPv6 bool `binapi:"bool,name=is_ipv6" json:"is_ipv6,omitempty"` @@ -765,6 +864,12 @@ func (m *ClassifySetInterfaceIPTableReply) Unmarshal(b []byte) error { return nil } +// Set/unset l2 classification tables for an interface request +// - sw_if_index - interface to set/unset tables for +// - ip4_table_index - ip4 index, use ~0 for all 3 indexes to unset +// - ip6_table_index - ip6 index +// - other_table_index - other index +// // ClassifySetInterfaceL2Tables defines message 'classify_set_interface_l2_tables'. type ClassifySetInterfaceL2Tables struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -851,6 +956,9 @@ func (m *ClassifySetInterfaceL2TablesReply) Unmarshal(b []byte) error { return nil } +// Classify table ids by interface index request +// - sw_if_index - index of the interface +// // ClassifyTableByInterface defines message 'classify_table_by_interface'. type ClassifyTableByInterface struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -884,6 +992,13 @@ func (m *ClassifyTableByInterface) Unmarshal(b []byte) error { return nil } +// Reply for classify table id by interface index request +// - count - number of ids returned in response +// - sw_if_index - index of the interface +// - l2_table_id - l2 classify table index +// - ip4_table_id - ip4 classify table index +// - ip6_table_id - ip6 classify table index +// // ClassifyTableByInterfaceReply defines message 'classify_table_by_interface_reply'. type ClassifyTableByInterfaceReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -935,6 +1050,7 @@ func (m *ClassifyTableByInterfaceReply) Unmarshal(b []byte) error { return nil } +// Classify get table IDs request // ClassifyTableIds defines message 'classify_table_ids'. type ClassifyTableIds struct{} @@ -962,6 +1078,10 @@ func (m *ClassifyTableIds) Unmarshal(b []byte) error { return nil } +// Reply for classify get table IDs request +// - count - number of ids returned in response +// - ids - array of classify table ids +// // ClassifyTableIdsReply defines message 'classify_table_ids_reply'. type ClassifyTableIdsReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1012,6 +1132,9 @@ func (m *ClassifyTableIdsReply) Unmarshal(b []byte) error { return nil } +// Classify table info +// - table_id - classify table index +// // ClassifyTableInfo defines message 'classify_table_info'. type ClassifyTableInfo struct { TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` @@ -1045,6 +1168,17 @@ func (m *ClassifyTableInfo) Unmarshal(b []byte) error { return nil } +// Reply for classify table info request +// - count - number of ids returned in response +// - table_id - classify table index +// - nbuckets - number of buckets when adding a table +// - match_n_vectors - number of match vectors +// - skip_n_vectors - number of skip_n_vectors +// - active_sessions - number of sessions (active entries) +// - next_table_index - index of next table +// - miss_next_index - index of miss table +// - mask[] - match mask +// // ClassifyTableInfoReply defines message 'classify_table_info_reply'. type ClassifyTableInfoReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1115,6 +1249,7 @@ func (m *ClassifyTableInfoReply) Unmarshal(b []byte) error { return nil } +// Classify get the Trace table indices // ClassifyTraceGetTables defines message 'classify_trace_get_tables'. type ClassifyTraceGetTables struct{} @@ -1142,6 +1277,11 @@ func (m *ClassifyTraceGetTables) Unmarshal(b []byte) error { return nil } +// Classify get the Trace tables response +// - retval - return code for the request +// - count - number of ids returned in response +// - indices - array of classify table indices +// // ClassifyTraceGetTablesReply defines message 'classify_trace_get_tables_reply'. type ClassifyTraceGetTablesReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1192,6 +1332,12 @@ func (m *ClassifyTraceGetTablesReply) Unmarshal(b []byte) error { return nil } +// Find a mask-compatible Classify table in the Trace chain +// - skip_n_vectors - number of u32x4 skip vectors +// - match_n_vectors - number of u32x4 vectors, 1..5 +// - mask_len - length of mask, match_n_vectors * sizeof(u32x4) +// - mask - match mask +// // ClassifyTraceLookupTable defines message 'classify_trace_lookup_table'. type ClassifyTraceLookupTable struct { SkipNVectors uint32 `binapi:"u32,name=skip_n_vectors,default=0" json:"skip_n_vectors,omitempty"` @@ -1238,6 +1384,10 @@ func (m *ClassifyTraceLookupTable) Unmarshal(b []byte) error { return nil } +// Classify trace table lookup response +// - retval - return code for the table lookup request +// - table_index - returned index of the found table, or ~0 +// // ClassifyTraceLookupTableReply defines message 'classify_trace_lookup_table_reply'. type ClassifyTraceLookupTableReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1277,6 +1427,10 @@ func (m *ClassifyTraceLookupTableReply) Unmarshal(b []byte) error { return nil } +// Add a Classify table into the Trace chain +// - table_index - Classify table to be added +// - sort_masks - 1=sort masks into most-to-least specific order +// // ClassifyTraceSetTable defines message 'classify_trace_set_table'. type ClassifyTraceSetTable struct { TableIndex uint32 `binapi:"u32,name=table_index,default=4294967295" json:"table_index,omitempty"` @@ -1314,6 +1468,10 @@ func (m *ClassifyTraceSetTable) Unmarshal(b []byte) error { return nil } +// Classify Trace table lookup response +// - retval - return code for the table lookup request +// - table_index - returned index of the sorted table chain +// // ClassifyTraceSetTableReply defines message 'classify_trace_set_table_reply'. type ClassifyTraceSetTableReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1351,6 +1509,10 @@ func (m *ClassifyTraceSetTableReply) Unmarshal(b []byte) error { return nil } +// Flow classify operational state response. +// - sw_if_index - software interface index +// - table_index - classify table index +// // FlowClassifyDetails defines message 'flow_classify_details'. type FlowClassifyDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1388,6 +1550,10 @@ func (m *FlowClassifyDetails) Unmarshal(b []byte) error { return nil } +// Get list of flow classify interfaces and tables +// - type - flow classify table type +// - sw_if_index - filter on sw_if_index +// // FlowClassifyDump defines message 'flow_classify_dump'. type FlowClassifyDump struct { Type FlowClassifyTable `binapi:"flow_classify_table,name=type" json:"type,omitempty"` @@ -1425,6 +1591,15 @@ func (m *FlowClassifyDump) Unmarshal(b []byte) error { return nil } +// Set/unset flow classify interface +// - sw_if_index - interface to set/unset flow classify +// - ip4_table_index - ip4 classify table index (~0 for skip) +// - ip6_table_index - ip6 classify table index (~0 for skip) +// - l2_table_index - l2 classify table index (~0 for skip) +// - is_add - Set if non-zero, else unset +// Note: User is recommended to use just one valid table_index per call. +// (ip4_table_index, ip6_table_index, or l2_table_index) +// // FlowClassifySetInterface defines message 'flow_classify_set_interface'. type FlowClassifySetInterface struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1505,6 +1680,15 @@ func (m *FlowClassifySetInterfaceReply) Unmarshal(b []byte) error { return nil } +// Set/unset input ACL interface +// - sw_if_index - interface to set/unset input ACL +// - ip4_table_index - ip4 classify table index (~0 for skip) +// - ip6_table_index - ip6 classify table index (~0 for skip) +// - l2_table_index - l2 classify table index (~0 for skip) +// - is_add - Set input ACL if non-zero, else unset +// Note: User is recommended to use just one valid table_index per call. +// (ip4_table_index, ip6_table_index, or l2_table_index) +// // InputACLSetInterface defines message 'input_acl_set_interface'. type InputACLSetInterface struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1587,6 +1771,15 @@ func (m *InputACLSetInterfaceReply) Unmarshal(b []byte) error { return nil } +// Set/unset output ACL interface +// - sw_if_index - interface to set/unset output ACL +// - ip4_table_index - ip4 classify table index (~0 for skip) +// - ip6_table_index - ip6 classify table index (~0 for skip) +// - l2_table_index - l2 classify table index (~0 for skip) +// - is_add - Set output ACL if non-zero, else unset +// Note: User is recommended to use just one valid table_index per call. +// (ip4_table_index, ip6_table_index, or l2_table_index) +// // OutputACLSetInterface defines message 'output_acl_set_interface'. type OutputACLSetInterface struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1669,6 +1862,10 @@ func (m *OutputACLSetInterfaceReply) Unmarshal(b []byte) error { return nil } +// Policer classify operational state response. +// - sw_if_index - software interface index +// - table_index - classify table index +// // PolicerClassifyDetails defines message 'policer_classify_details'. type PolicerClassifyDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1706,6 +1903,10 @@ func (m *PolicerClassifyDetails) Unmarshal(b []byte) error { return nil } +// Get list of policer classify interfaces and tables +// - type - classify table type +// - sw_if_index - filter on sw_if_index +// // PolicerClassifyDump defines message 'policer_classify_dump'. type PolicerClassifyDump struct { Type PolicerClassifyTable `binapi:"policer_classify_table,name=type" json:"type,omitempty"` @@ -1743,6 +1944,15 @@ func (m *PolicerClassifyDump) Unmarshal(b []byte) error { return nil } +// Set/unset policer classify interface +// - sw_if_index - interface to set/unset policer classify +// - ip4_table_index - ip4 classify table index (~0 for skip) +// - ip6_table_index - ip6 classify table index (~0 for skip) +// - l2_table_index - l2 classify table index (~0 for skip) +// - is_add - Set if non-zero, else unset +// Note: User is recommended to use just one valid table_index per call. +// (ip4_table_index, ip6_table_index, or l2_table_index) +// // PolicerClassifySetInterface defines message 'policer_classify_set_interface'. type PolicerClassifySetInterface struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1827,6 +2037,11 @@ func (m *PolicerClassifySetInterfaceReply) Unmarshal(b []byte) error { return nil } +// Add/del punt ACL +// - ip4_table_index - ip4 punt classify table index (~0 for skip) +// - ip6_table_index - ip6 punt classify table index (~0 for skip) +// - is_add - add punt ACL if non-zero, else delete +// // PuntACLAddDel defines message 'punt_acl_add_del'. type PuntACLAddDel struct { IP4TableIndex uint32 `binapi:"u32,name=ip4_table_index,default=4294967295" json:"ip4_table_index,omitempty"` @@ -1901,6 +2116,7 @@ func (m *PuntACLAddDelReply) Unmarshal(b []byte) error { return nil } +// Get classify table ids configured for punt ACL // PuntACLGet defines message 'punt_acl_get'. type PuntACLGet struct{} @@ -1928,6 +2144,11 @@ func (m *PuntACLGet) Unmarshal(b []byte) error { return nil } +// Reply for punt_acl_get +// - retval - return value (0 for success) +// - ip4_table_index - ip4 punt classify table index (~0 for none) +// - ip6_table_index - ip6 punt classify table index (~0 for none) +// // PuntACLGetReply defines message 'punt_acl_get_reply'. type PuntACLGetReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` diff --git a/binapi/classify/classify_rpc.ba.go b/binapi/classify/classify_rpc.ba.go index d616b33b..a1c4aa27 100644 --- a/binapi/classify/classify_rpc.ba.go +++ b/binapi/classify/classify_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service classify. diff --git a/binapi/cnat/cnat.ba.go b/binapi/cnat/cnat.ba.go index b3e4fc0b..c770e492 100644 --- a/binapi/cnat/cnat.ba.go +++ b/binapi/cnat/cnat.ba.go @@ -1,26 +1,25 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/cnat.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/cnat.api.json // Package cnat contains generated bindings for API file cnat.api. // // Contents: -// -// 5 enums -// 4 structs -// 20 messages +// - 5 enums +// - 4 structs +// - 20 messages package cnat import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" _ "github.com/networkservicemesh/govpp/binapi/fib_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -32,7 +31,7 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "cnat" APIVersion = "0.2.0" - VersionCrc = 0xfd05573b + VersionCrc = 0xf00366a9 ) // CnatEndpointTupleFlags defines enum 'cnat_endpoint_tuple_flags'. @@ -142,6 +141,7 @@ const ( CNAT_POLICY_INCLUDE_V4 CnatSnatPolicyTable = 0 CNAT_POLICY_INCLUDE_V6 CnatSnatPolicyTable = 1 CNAT_POLICY_POD CnatSnatPolicyTable = 2 + CNAT_POLICY_HOST CnatSnatPolicyTable = 3 ) var ( @@ -149,11 +149,13 @@ var ( 0: "CNAT_POLICY_INCLUDE_V4", 1: "CNAT_POLICY_INCLUDE_V6", 2: "CNAT_POLICY_POD", + 3: "CNAT_POLICY_HOST", } CnatSnatPolicyTable_value = map[string]uint8{ "CNAT_POLICY_INCLUDE_V4": 0, "CNAT_POLICY_INCLUDE_V6": 1, "CNAT_POLICY_POD": 2, + "CNAT_POLICY_HOST": 3, } ) @@ -169,15 +171,18 @@ func (x CnatSnatPolicyTable) String() string { type CnatTranslationFlags uint8 const ( - CNAT_TRANSLATION_ALLOC_PORT CnatTranslationFlags = 1 + CNAT_TRANSLATION_ALLOC_PORT CnatTranslationFlags = 1 + CNAT_TRANSLATION_NO_RETURN_SESSION CnatTranslationFlags = 4 ) var ( CnatTranslationFlags_name = map[uint8]string{ 1: "CNAT_TRANSLATION_ALLOC_PORT", + 4: "CNAT_TRANSLATION_NO_RETURN_SESSION", } CnatTranslationFlags_value = map[string]uint8{ - "CNAT_TRANSLATION_ALLOC_PORT": 1, + "CNAT_TRANSLATION_ALLOC_PORT": 1, + "CNAT_TRANSLATION_NO_RETURN_SESSION": 4, } ) @@ -246,7 +251,6 @@ type CnatTranslation struct { } // CnatGetSnatAddresses defines message 'cnat_get_snat_addresses'. -// InProgress: the message form may change in the future versions type CnatGetSnatAddresses struct{} func (m *CnatGetSnatAddresses) Reset() { *m = CnatGetSnatAddresses{} } @@ -274,7 +278,6 @@ func (m *CnatGetSnatAddresses) Unmarshal(b []byte) error { } // CnatGetSnatAddressesReply defines message 'cnat_get_snat_addresses_reply'. -// InProgress: the message form may change in the future versions type CnatGetSnatAddressesReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` ID uint32 `binapi:"u32,name=id" json:"id,omitempty"` @@ -324,7 +327,6 @@ func (m *CnatGetSnatAddressesReply) Unmarshal(b []byte) error { } // CnatSessionDetails defines message 'cnat_session_details'. -// InProgress: the message form may change in the future versions type CnatSessionDetails struct { Session CnatSession `binapi:"cnat_session,name=session" json:"session,omitempty"` } @@ -409,7 +411,6 @@ func (m *CnatSessionDetails) Unmarshal(b []byte) error { } // CnatSessionDump defines message 'cnat_session_dump'. -// InProgress: the message form may change in the future versions type CnatSessionDump struct{} func (m *CnatSessionDump) Reset() { *m = CnatSessionDump{} } @@ -437,7 +438,6 @@ func (m *CnatSessionDump) Unmarshal(b []byte) error { } // CnatSessionPurge defines message 'cnat_session_purge'. -// InProgress: the message form may change in the future versions type CnatSessionPurge struct{} func (m *CnatSessionPurge) Reset() { *m = CnatSessionPurge{} } @@ -465,7 +465,6 @@ func (m *CnatSessionPurge) Unmarshal(b []byte) error { } // CnatSessionPurgeReply defines message 'cnat_session_purge_reply'. -// InProgress: the message form may change in the future versions type CnatSessionPurgeReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -499,7 +498,6 @@ func (m *CnatSessionPurgeReply) Unmarshal(b []byte) error { } // CnatSetSnatAddresses defines message 'cnat_set_snat_addresses'. -// InProgress: the message form may change in the future versions type CnatSetSnatAddresses struct { SnatIP4 ip_types.IP4Address `binapi:"ip4_address,name=snat_ip4" json:"snat_ip4,omitempty"` SnatIP6 ip_types.IP6Address `binapi:"ip6_address,name=snat_ip6" json:"snat_ip6,omitempty"` @@ -541,7 +539,6 @@ func (m *CnatSetSnatAddresses) Unmarshal(b []byte) error { } // CnatSetSnatAddressesReply defines message 'cnat_set_snat_addresses_reply'. -// InProgress: the message form may change in the future versions type CnatSetSnatAddressesReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -574,8 +571,8 @@ func (m *CnatSetSnatAddressesReply) Unmarshal(b []byte) error { return nil } +// /* A snat policy controls what traffic is srcNATed // CnatSetSnatPolicy defines message 'cnat_set_snat_policy'. -// InProgress: the message form may change in the future versions type CnatSetSnatPolicy struct { Policy CnatSnatPolicies `binapi:"cnat_snat_policies,name=policy" json:"policy,omitempty"` } @@ -609,7 +606,6 @@ func (m *CnatSetSnatPolicy) Unmarshal(b []byte) error { } // CnatSetSnatPolicyReply defines message 'cnat_set_snat_policy_reply'. -// InProgress: the message form may change in the future versions type CnatSetSnatPolicyReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -643,7 +639,6 @@ func (m *CnatSetSnatPolicyReply) Unmarshal(b []byte) error { } // CnatSnatPolicyAddDelExcludePfx defines message 'cnat_snat_policy_add_del_exclude_pfx'. -// InProgress: the message form may change in the future versions type CnatSnatPolicyAddDelExcludePfx struct { IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"` Prefix ip_types.Prefix `binapi:"prefix,name=prefix" json:"prefix,omitempty"` @@ -689,7 +684,6 @@ func (m *CnatSnatPolicyAddDelExcludePfx) Unmarshal(b []byte) error { } // CnatSnatPolicyAddDelExcludePfxReply defines message 'cnat_snat_policy_add_del_exclude_pfx_reply'. -// InProgress: the message form may change in the future versions type CnatSnatPolicyAddDelExcludePfxReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -725,7 +719,6 @@ func (m *CnatSnatPolicyAddDelExcludePfxReply) Unmarshal(b []byte) error { } // CnatSnatPolicyAddDelIf defines message 'cnat_snat_policy_add_del_if'. -// InProgress: the message form may change in the future versions type CnatSnatPolicyAddDelIf struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"` @@ -734,7 +727,7 @@ type CnatSnatPolicyAddDelIf struct { func (m *CnatSnatPolicyAddDelIf) Reset() { *m = CnatSnatPolicyAddDelIf{} } func (*CnatSnatPolicyAddDelIf) GetMessageName() string { return "cnat_snat_policy_add_del_if" } -func (*CnatSnatPolicyAddDelIf) GetCrcString() string { return "6828deca" } +func (*CnatSnatPolicyAddDelIf) GetCrcString() string { return "4ebb8d02" } func (*CnatSnatPolicyAddDelIf) GetMessageType() api.MessageType { return api.RequestMessage } @@ -767,7 +760,6 @@ func (m *CnatSnatPolicyAddDelIf) Unmarshal(b []byte) error { } // CnatSnatPolicyAddDelIfReply defines message 'cnat_snat_policy_add_del_if_reply'. -// InProgress: the message form may change in the future versions type CnatSnatPolicyAddDelIfReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -803,7 +795,6 @@ func (m *CnatSnatPolicyAddDelIfReply) Unmarshal(b []byte) error { } // CnatTranslationDel defines message 'cnat_translation_del'. -// InProgress: the message form may change in the future versions type CnatTranslationDel struct { ID uint32 `binapi:"u32,name=id" json:"id,omitempty"` } @@ -837,7 +828,6 @@ func (m *CnatTranslationDel) Unmarshal(b []byte) error { } // CnatTranslationDelReply defines message 'cnat_translation_del_reply'. -// InProgress: the message form may change in the future versions type CnatTranslationDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -871,7 +861,6 @@ func (m *CnatTranslationDelReply) Unmarshal(b []byte) error { } // CnatTranslationDetails defines message 'cnat_translation_details'. -// InProgress: the message form may change in the future versions type CnatTranslationDetails struct { Translation CnatTranslation `binapi:"cnat_translation,name=translation" json:"translation,omitempty"` } @@ -984,7 +973,6 @@ func (m *CnatTranslationDetails) Unmarshal(b []byte) error { } // CnatTranslationDump defines message 'cnat_translation_dump'. -// InProgress: the message form may change in the future versions type CnatTranslationDump struct{} func (m *CnatTranslationDump) Reset() { *m = CnatTranslationDump{} } @@ -1011,8 +999,11 @@ func (m *CnatTranslationDump) Unmarshal(b []byte) error { return nil } +// /* An enpoint is either +// - An IP & a port +// - An interface, an address familiy and a port +// // CnatTranslationUpdate defines message 'cnat_translation_update'. -// InProgress: the message form may change in the future versions type CnatTranslationUpdate struct { Translation CnatTranslation `binapi:"cnat_translation,name=translation" json:"translation,omitempty"` } @@ -1125,7 +1116,6 @@ func (m *CnatTranslationUpdate) Unmarshal(b []byte) error { } // CnatTranslationUpdateReply defines message 'cnat_translation_update_reply'. -// InProgress: the message form may change in the future versions type CnatTranslationUpdateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` ID uint32 `binapi:"u32,name=id" json:"id,omitempty"` @@ -1176,7 +1166,7 @@ func file_cnat_binapi_init() { api.RegisterMessage((*CnatSetSnatPolicyReply)(nil), "cnat_set_snat_policy_reply_e8d4e804") api.RegisterMessage((*CnatSnatPolicyAddDelExcludePfx)(nil), "cnat_snat_policy_add_del_exclude_pfx_e26dd79a") api.RegisterMessage((*CnatSnatPolicyAddDelExcludePfxReply)(nil), "cnat_snat_policy_add_del_exclude_pfx_reply_e8d4e804") - api.RegisterMessage((*CnatSnatPolicyAddDelIf)(nil), "cnat_snat_policy_add_del_if_6828deca") + api.RegisterMessage((*CnatSnatPolicyAddDelIf)(nil), "cnat_snat_policy_add_del_if_4ebb8d02") api.RegisterMessage((*CnatSnatPolicyAddDelIfReply)(nil), "cnat_snat_policy_add_del_if_reply_e8d4e804") api.RegisterMessage((*CnatTranslationDel)(nil), "cnat_translation_del_3a91bde5") api.RegisterMessage((*CnatTranslationDelReply)(nil), "cnat_translation_del_reply_e8d4e804") diff --git a/binapi/cnat/cnat_rpc.ba.go b/binapi/cnat/cnat_rpc.ba.go index cc2f2a97..8e128395 100644 --- a/binapi/cnat/cnat_rpc.ba.go +++ b/binapi/cnat/cnat_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service cnat. diff --git a/binapi/crypto/crypto.ba.go b/binapi/crypto/crypto.ba.go index 7ad2007a..959d6106 100644 --- a/binapi/crypto/crypto.ba.go +++ b/binapi/crypto/crypto.ba.go @@ -1,22 +1,21 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/crypto.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/crypto.api.json // Package crypto contains generated bindings for API file crypto.api. // // Contents: -// -// 2 enums -// 4 messages +// - 2 enums +// - 4 messages package crypto import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -88,7 +87,11 @@ func (x CryptoOpClassType) String() string { return "CryptoOpClassType(" + strconv.Itoa(int(x)) + ")" } +// crypto: use polling or interrupt dispatch +// - mode - dispatch mode +// // CryptoSetAsyncDispatch defines message 'crypto_set_async_dispatch'. +// Deprecated: the message will be removed in the future versions type CryptoSetAsyncDispatch struct { Mode CryptoDispatchMode `binapi:"crypto_dispatch_mode,name=mode" json:"mode,omitempty"` } @@ -122,6 +125,7 @@ func (m *CryptoSetAsyncDispatch) Unmarshal(b []byte) error { } // CryptoSetAsyncDispatchReply defines message 'crypto_set_async_dispatch_reply'. +// Deprecated: the message will be removed in the future versions type CryptoSetAsyncDispatchReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -154,6 +158,12 @@ func (m *CryptoSetAsyncDispatchReply) Unmarshal(b []byte) error { return nil } +// crypto: set crypto handler +// - alg_name - Name of the algorithm to add +// - engine - Name of the engine to add +// - oct - Operation class type (simple, chained, both) +// - is_async - Asynchronous or not +// // CryptoSetHandler defines message 'crypto_set_handler'. type CryptoSetHandler struct { AlgName string `binapi:"string[32],name=alg_name" json:"alg_name,omitempty"` diff --git a/binapi/crypto/crypto_rpc.ba.go b/binapi/crypto/crypto_rpc.ba.go index e247b332..471f49da 100644 --- a/binapi/crypto/crypto_rpc.ba.go +++ b/binapi/crypto/crypto_rpc.ba.go @@ -5,7 +5,7 @@ package crypto import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service crypto. diff --git a/binapi/crypto_sw_scheduler/crypto_sw_scheduler.ba.go b/binapi/crypto_sw_scheduler/crypto_sw_scheduler.ba.go index e8742acb..17ed2ceb 100644 --- a/binapi/crypto_sw_scheduler/crypto_sw_scheduler.ba.go +++ b/binapi/crypto_sw_scheduler/crypto_sw_scheduler.ba.go @@ -1,19 +1,18 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/crypto_sw_scheduler.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/crypto_sw_scheduler.api.json // Package crypto_sw_scheduler contains generated bindings for API file crypto_sw_scheduler.api. // // Contents: -// -// 2 messages +// - 2 messages package crypto_sw_scheduler import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -28,8 +27,11 @@ const ( VersionCrc = 0xf4b02951 ) +// crypto sw scheduler: Enable or disable workers +// - worker_index - Worker index to enable / disable +// - crypto_enable - On/Off +// // CryptoSwSchedulerSetWorker defines message 'crypto_sw_scheduler_set_worker'. -// InProgress: the message form may change in the future versions type CryptoSwSchedulerSetWorker struct { WorkerIndex uint32 `binapi:"u32,name=worker_index" json:"worker_index,omitempty"` CryptoEnable bool `binapi:"bool,name=crypto_enable" json:"crypto_enable,omitempty"` @@ -67,7 +69,6 @@ func (m *CryptoSwSchedulerSetWorker) Unmarshal(b []byte) error { } // CryptoSwSchedulerSetWorkerReply defines message 'crypto_sw_scheduler_set_worker_reply'. -// InProgress: the message form may change in the future versions type CryptoSwSchedulerSetWorkerReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } diff --git a/binapi/crypto_sw_scheduler/crypto_sw_scheduler_rpc.ba.go b/binapi/crypto_sw_scheduler/crypto_sw_scheduler_rpc.ba.go index c48c9c16..54dffd39 100644 --- a/binapi/crypto_sw_scheduler/crypto_sw_scheduler_rpc.ba.go +++ b/binapi/crypto_sw_scheduler/crypto_sw_scheduler_rpc.ba.go @@ -5,7 +5,7 @@ package crypto_sw_scheduler import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service crypto_sw_scheduler. diff --git a/binapi/ct6/ct6.ba.go b/binapi/ct6/ct6.ba.go index 5da08058..2576d45e 100644 --- a/binapi/ct6/ct6.ba.go +++ b/binapi/ct6/ct6.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/ct6.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/ct6.api.json // Package ct6 contains generated bindings for API file ct6.api. // // Contents: -// -// 2 messages +// - 2 messages package ct6 import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,6 +28,7 @@ const ( VersionCrc = 0x5c824a95 ) +// /* Define a simple enable-disable binary API to control the feature // Ct6EnableDisable defines message 'ct6_enable_disable'. type Ct6EnableDisable struct { EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"` diff --git a/binapi/ct6/ct6_rpc.ba.go b/binapi/ct6/ct6_rpc.ba.go index fcae22de..14fb816f 100644 --- a/binapi/ct6/ct6_rpc.ba.go +++ b/binapi/ct6/ct6_rpc.ba.go @@ -5,7 +5,7 @@ package ct6 import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service ct6. diff --git a/binapi/det44/det44.ba.go b/binapi/det44/det44.ba.go index f06ddedb..1af5f4a5 100644 --- a/binapi/det44/det44.ba.go +++ b/binapi/det44/det44.ba.go @@ -1,22 +1,21 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/det44.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/det44.api.json // Package det44 contains generated bindings for API file det44.api. // // Contents: -// -// 38 messages +// - 38 messages package det44 import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" _ "github.com/networkservicemesh/govpp/binapi/nat_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -31,6 +30,13 @@ const ( VersionCrc = 0x6d6e88dd ) +// Add/delete DET44 mapping +// - is_add - true if add, false if delete +// - in_addr - inside IPv4 address +// - in_plen - inside IPv4 address prefix length +// - out_addr - outside IPv4 address +// - out_plen - outside IPv4 address prefix length +// // Det44AddDelMap defines message 'det44_add_del_map'. type Det44AddDelMap struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -113,6 +119,12 @@ func (m *Det44AddDelMapReply) Unmarshal(b []byte) error { return nil } +// Close DET44 session by inside address and port +// - in_addr - inside IP address +// - in_port - inside port +// - ext_addr - external host IP address +// - ext_port - external host port +// // Det44CloseSessionIn defines message 'det44_close_session_in'. type Det44CloseSessionIn struct { InAddr ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"` @@ -191,6 +203,12 @@ func (m *Det44CloseSessionInReply) Unmarshal(b []byte) error { return nil } +// Close DET44 session by outside address and port +// - out_addr - outside IPv4 address +// - out_port - outside port +// - ext_addr - external host IPv4 address +// - ext_port - external host port +// // Det44CloseSessionOut defines message 'det44_close_session_out'. type Det44CloseSessionOut struct { OutAddr ip_types.IP4Address `binapi:"ip4_address,name=out_addr" json:"out_addr,omitempty"` @@ -269,6 +287,9 @@ func (m *Det44CloseSessionOutReply) Unmarshal(b []byte) error { return nil } +// Get outside address and port range from inside address +// - in_addr - inside IP address +// // Det44Forward defines message 'det44_forward'. type Det44Forward struct { InAddr ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"` @@ -302,6 +323,12 @@ func (m *Det44Forward) Unmarshal(b []byte) error { return nil } +// Get outside address and port range from inside address +// - retval - return code +// - out_port_lo - outside port range start +// - out_port_hi - outside port range end +// - out_addr - outside IPv4 address +// // Det44ForwardReply defines message 'det44_forward_reply'. type Det44ForwardReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -347,6 +374,7 @@ func (m *Det44ForwardReply) Unmarshal(b []byte) error { return nil } +// Get values of timeouts for DET44 sessions (seconds) // Det44GetTimeouts defines message 'det44_get_timeouts'. type Det44GetTimeouts struct{} @@ -374,6 +402,13 @@ func (m *Det44GetTimeouts) Unmarshal(b []byte) error { return nil } +// Get values of timeouts for DET44 sessions reply +// - retval - return code +// - udp - UDP timeout +// - tcp_established - TCP established timeout +// - tcp_transitory - TCP transitory timeout +// - icmp - ICMP timeout +// // Det44GetTimeoutsReply defines message 'det44_get_timeouts_reply'. // InProgress: the message form may change in the future versions type Det44GetTimeoutsReply struct { @@ -424,8 +459,12 @@ func (m *Det44GetTimeoutsReply) Unmarshal(b []byte) error { return nil } +// Enable/disable DET44 feature on the interface +// - is_add - true if add, false if delete +// - is_inside - true if interface is inside, false if outside +// - sw_if_index - software index of the interface +// // Det44InterfaceAddDelFeature defines message 'det44_interface_add_del_feature'. -// InProgress: the message form may change in the future versions type Det44InterfaceAddDelFeature struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` IsInside bool `binapi:"bool,name=is_inside" json:"is_inside,omitempty"` @@ -467,7 +506,6 @@ func (m *Det44InterfaceAddDelFeature) Unmarshal(b []byte) error { } // Det44InterfaceAddDelFeatureReply defines message 'det44_interface_add_del_feature_reply'. -// InProgress: the message form may change in the future versions type Det44InterfaceAddDelFeatureReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -502,8 +540,11 @@ func (m *Det44InterfaceAddDelFeatureReply) Unmarshal(b []byte) error { return nil } +// DET44 interface details response +// - is_inside - true if interface is inside, false if outside +// - sw_if_index - software index of the interface +// // Det44InterfaceDetails defines message 'det44_interface_details'. -// InProgress: the message form may change in the future versions type Det44InterfaceDetails struct { IsInside bool `binapi:"bool,name=is_inside" json:"is_inside,omitempty"` IsOutside bool `binapi:"bool,name=is_outside" json:"is_outside,omitempty"` @@ -544,8 +585,8 @@ func (m *Det44InterfaceDetails) Unmarshal(b []byte) error { return nil } +// Dump interfaces with DET44 feature // Det44InterfaceDump defines message 'det44_interface_dump'. -// InProgress: the message form may change in the future versions type Det44InterfaceDump struct{} func (m *Det44InterfaceDump) Reset() { *m = Det44InterfaceDump{} } @@ -572,6 +613,15 @@ func (m *Det44InterfaceDump) Unmarshal(b []byte) error { return nil } +// DET44 users response +// - in_addr - inside IPv4 address +// - in_plen - inside IPv4 address prefix length +// - out_addr - outside IPv4 address +// - out_plen - outside IPv4 address prefix length +// - sharing_ratio - outside to inside address sharing ratio +// - ports_per_host - number of ports available to a host +// - ses_num - number of sessions belonging to this mapping +// // Det44MapDetails defines message 'det44_map_details'. type Det44MapDetails struct { InAddr ip_types.IP4Address `binapi:"ip4_address,name=in_addr" json:"in_addr,omitempty"` @@ -629,6 +679,7 @@ func (m *Det44MapDetails) Unmarshal(b []byte) error { return nil } +// Dump DET44 mappings // Det44MapDump defines message 'det44_map_dump'. type Det44MapDump struct{} @@ -656,8 +707,12 @@ func (m *Det44MapDump) Unmarshal(b []byte) error { return nil } +// Enable/disable DET44 plugin +// - inside_vrf - inside VRF id +// - outside_vrf - outside VRF id +// - enable - true if enable, false if disable +// // Det44PluginEnableDisable defines message 'det44_plugin_enable_disable'. -// InProgress: the message form may change in the future versions type Det44PluginEnableDisable struct { InsideVrf uint32 `binapi:"u32,name=inside_vrf" json:"inside_vrf,omitempty"` OutsideVrf uint32 `binapi:"u32,name=outside_vrf" json:"outside_vrf,omitempty"` @@ -699,7 +754,6 @@ func (m *Det44PluginEnableDisable) Unmarshal(b []byte) error { } // Det44PluginEnableDisableReply defines message 'det44_plugin_enable_disable_reply'. -// InProgress: the message form may change in the future versions type Det44PluginEnableDisableReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -734,6 +788,10 @@ func (m *Det44PluginEnableDisableReply) Unmarshal(b []byte) error { return nil } +// Get inside address from outside address and port +// - out_port - outside port +// - out_addr - outside IPv4 address +// // Det44Reverse defines message 'det44_reverse'. type Det44Reverse struct { OutPort uint16 `binapi:"u16,name=out_port" json:"out_port,omitempty"` @@ -771,6 +829,10 @@ func (m *Det44Reverse) Unmarshal(b []byte) error { return nil } +// Get inside address from outside address and port reply +// - retval - return code +// - in_addr - inside IP address +// // Det44ReverseReply defines message 'det44_reverse_reply'. type Det44ReverseReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -808,6 +870,14 @@ func (m *Det44ReverseReply) Unmarshal(b []byte) error { return nil } +// DET44 sessions reply +// - in_port - inside port +// - ext_addr - external host IPv4 address +// - ext_port - external host port +// - out_port - outside port +// - state - session state +// - expire - session expiration timestamp +// // Det44SessionDetails defines message 'det44_session_details'. type Det44SessionDetails struct { InPort uint16 `binapi:"u16,name=in_port" json:"in_port,omitempty"` @@ -861,6 +931,9 @@ func (m *Det44SessionDetails) Unmarshal(b []byte) error { return nil } +// Dump DET44 sessions +// - user_addr - address of an inside user whose sessions to dump +// // Det44SessionDump defines message 'det44_session_dump'. type Det44SessionDump struct { UserAddr ip_types.IP4Address `binapi:"ip4_address,name=user_addr" json:"user_addr,omitempty"` @@ -894,6 +967,12 @@ func (m *Det44SessionDump) Unmarshal(b []byte) error { return nil } +// Set values of timeouts for DET44 sessions (seconds) +// - udp - UDP timeout (default 300sec) +// - tcp_established - TCP established timeout (default 7440sec) +// - tcp_transitory - TCP transitory timeout (default 240sec) +// - icmp - ICMP timeout (default 60sec) +// // Det44SetTimeouts defines message 'det44_set_timeouts'. // InProgress: the message form may change in the future versions type Det44SetTimeouts struct { @@ -974,6 +1053,13 @@ func (m *Det44SetTimeoutsReply) Unmarshal(b []byte) error { return nil } +// Add/delete NAT deterministic mapping +// - is_add - true if add, false if delete +// - in_addr - inside IPv4 address +// - in_plen - inside IPv4 address prefix length +// - out_addr - outside IPv4 address +// - out_plen - outside IPv4 address prefix length +// // NatDetAddDelMap defines message 'nat_det_add_del_map'. // Deprecated: the message will be removed in the future versions type NatDetAddDelMap struct { @@ -1058,6 +1144,12 @@ func (m *NatDetAddDelMapReply) Unmarshal(b []byte) error { return nil } +// Close deterministic NAT session by inside address and port +// - in_addr - inside IP address +// - in_port - inside port +// - ext_addr - external host IP address +// - ext_port - external host port +// // NatDetCloseSessionIn defines message 'nat_det_close_session_in'. // Deprecated: the message will be removed in the future versions type NatDetCloseSessionIn struct { @@ -1138,6 +1230,12 @@ func (m *NatDetCloseSessionInReply) Unmarshal(b []byte) error { return nil } +// Close deterministic NAT session by outside address and port +// - out_addr - outside IPv4 address +// - out_port - outside port +// - ext_addr - external host IPv4 address +// - ext_port - external host port +// // NatDetCloseSessionOut defines message 'nat_det_close_session_out'. // Deprecated: the message will be removed in the future versions type NatDetCloseSessionOut struct { @@ -1218,6 +1316,9 @@ func (m *NatDetCloseSessionOutReply) Unmarshal(b []byte) error { return nil } +// Get outside address and port range from inside address +// - in_addr - inside IP address +// // NatDetForward defines message 'nat_det_forward'. // Deprecated: the message will be removed in the future versions type NatDetForward struct { @@ -1252,6 +1353,12 @@ func (m *NatDetForward) Unmarshal(b []byte) error { return nil } +// Get outside address and port range from inside address +// - retval - return code +// - out_port_lo - outside port range start +// - out_port_hi - outside port range end +// - out_addr - outside IPv4 address +// // NatDetForwardReply defines message 'nat_det_forward_reply'. // Deprecated: the message will be removed in the future versions type NatDetForwardReply struct { @@ -1298,6 +1405,15 @@ func (m *NatDetForwardReply) Unmarshal(b []byte) error { return nil } +// NAT users response +// - in_addr - inside IPv4 address +// - in_plen - inside IPv4 address prefix length +// - out_addr - outside IPv4 address +// - out_plen - outside IPv4 address prefix length +// - sharing_ratio - outside to inside address sharing ratio +// - ports_per_host - number of ports available to a host +// - ses_num - number of sessions belonging to this mapping +// // NatDetMapDetails defines message 'nat_det_map_details'. // Deprecated: the message will be removed in the future versions type NatDetMapDetails struct { @@ -1356,6 +1472,7 @@ func (m *NatDetMapDetails) Unmarshal(b []byte) error { return nil } +// Dump NAT deterministic mappings // NatDetMapDump defines message 'nat_det_map_dump'. // Deprecated: the message will be removed in the future versions type NatDetMapDump struct{} @@ -1384,6 +1501,10 @@ func (m *NatDetMapDump) Unmarshal(b []byte) error { return nil } +// Get inside address from outside address and port +// - out_port - outside port +// - out_addr - outside IPv4 address +// // NatDetReverse defines message 'nat_det_reverse'. // Deprecated: the message will be removed in the future versions type NatDetReverse struct { @@ -1422,6 +1543,10 @@ func (m *NatDetReverse) Unmarshal(b []byte) error { return nil } +// Get inside address from outside address and port reply +// - retval - return code +// - in_addr - inside IP address +// // NatDetReverseReply defines message 'nat_det_reverse_reply'. // Deprecated: the message will be removed in the future versions type NatDetReverseReply struct { @@ -1460,6 +1585,14 @@ func (m *NatDetReverseReply) Unmarshal(b []byte) error { return nil } +// Deterministic NAT sessions reply +// - in_port - inside port +// - ext_addr - external host IPv4 address +// - ext_port - external host port +// - out_port - outside NAT port +// - state - session state +// - expire - session expiration timestamp +// // NatDetSessionDetails defines message 'nat_det_session_details'. // Deprecated: the message will be removed in the future versions type NatDetSessionDetails struct { @@ -1514,6 +1647,9 @@ func (m *NatDetSessionDetails) Unmarshal(b []byte) error { return nil } +// Dump determinstic NAT sessions +// - user_addr - address of an inside user whose sessions to dump +// // NatDetSessionDump defines message 'nat_det_session_dump'. // Deprecated: the message will be removed in the future versions type NatDetSessionDump struct { diff --git a/binapi/det44/det44_rpc.ba.go b/binapi/det44/det44_rpc.ba.go index e7a8abe2..b301f332 100644 --- a/binapi/det44/det44_rpc.ba.go +++ b/binapi/det44/det44_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service det44. diff --git a/binapi/dhcp/dhcp.ba.go b/binapi/dhcp/dhcp.ba.go index d748e3ea..b0f6a592 100644 --- a/binapi/dhcp/dhcp.ba.go +++ b/binapi/dhcp/dhcp.ba.go @@ -1,26 +1,25 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/dhcp.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/dhcp.api.json // Package dhcp contains generated bindings for API file dhcp.api. // // Contents: -// -// 3 enums -// 6 structs -// 29 messages +// - 3 enums +// - 6 structs +// - 29 messages package dhcp import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ethernet_types "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -208,6 +207,7 @@ type DomainServer struct { Address ip_types.Address `binapi:"address,name=address" json:"address,omitempty"` } +// Enable/disable listening on DHCPv6 client port // DHCP6ClientsEnableDisable defines message 'dhcp6_clients_enable_disable'. type DHCP6ClientsEnableDisable struct { Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` @@ -276,6 +276,9 @@ func (m *DHCP6ClientsEnableDisableReply) Unmarshal(b []byte) error { return nil } +// Set DHCPv6 DUID-LL +// - duid_ll - DUID-LL binary string +// // DHCP6DuidLlSet defines message 'dhcp6_duid_ll_set'. type DHCP6DuidLlSet struct { DuidLl []byte `binapi:"u8[10],name=duid_ll" json:"duid_ll,omitempty"` @@ -343,6 +346,20 @@ func (m *DHCP6DuidLlSetReply) Unmarshal(b []byte) error { return nil } +// Tell client about a DHCPv6 PD server reply event +// - pid - client pid registered to receive notification +// - sw_if_index - index of RX interface +// - server_index - used to dentify DHCPv6 server, +// unique for each DHCPv6 server on the link +// - msg_type - message type +// - T1 - value of T1 in IA_PD option +// - T2 - value of T2 in IA_PD option +// - inner_status_code - value of status code inside IA_PD option +// - status_code - value of the main status code of DHCPv6 message +// - preference - value of preference option in reply message +// - n_prefixes - number of prefixes in IA_PD option +// - prefixes - list of prefixes in IA_PD option +// // DHCP6PdReplyEvent defines message 'dhcp6_pd_reply_event'. type DHCP6PdReplyEvent struct { PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` @@ -441,6 +458,25 @@ func (m *DHCP6PdReplyEvent) Unmarshal(b []byte) error { return nil } +// Send DHCPv6 PD client message of specified type +// - sw_if_index - index of TX interface +// - server_index - used to dentify DHCPv6 server, +// unique for each DHCPv6 server on the link, +// value obrtained from dhcp6_pd_reply_event API message, +// use ~0 to send message to all DHCPv6 servers +// - irt - initial retransmission time +// - mrt - maximum retransmission time +// - mrc - maximum retransmission count +// - mrd - maximum retransmission duration +// for sending the message +// - stop - if non-zero then stop resending the message, +// otherwise start sending the message +// - msg_type - message type +// - T1 - value of T1 in IA_PD option +// - T2 - value of T2 in IA_PD option +// - n_prefixes - number of addresses in IA_PD option +// - prefixes - list of prefixes in IA_PD option +// // DHCP6PdSendClientMessage defines message 'dhcp6_pd_send_client_message'. type DHCP6PdSendClientMessage struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -578,6 +614,20 @@ func (m *DHCP6PdSendClientMessageReply) Unmarshal(b []byte) error { return nil } +// Tell client about a DHCPv6 server reply event +// - pid - client pid registered to receive notification +// - sw_if_index - index of RX interface, also identifies IAID +// - server_index - used to dentify DHCPv6 server, +// unique for each DHCPv6 server on the link +// - msg_type - message type +// - T1 - value of T1 in IA_NA option +// - T2 - value of T2 in IA_NA option +// - inner_status_code - value of status code inside IA_NA option +// - status_code - value of status code +// - preference - value of preference option in reply message +// - n_addresses - number of addresses in IA_NA option +// - addresses - list of addresses in IA_NA option +// // DHCP6ReplyEvent defines message 'dhcp6_reply_event'. type DHCP6ReplyEvent struct { PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` @@ -673,6 +723,25 @@ func (m *DHCP6ReplyEvent) Unmarshal(b []byte) error { return nil } +// Send DHCPv6 client message of specified type +// - sw_if_index - index of TX interface, also identifies IAID +// - server_index - used to dentify DHCPv6 server, +// unique for each DHCPv6 server on the link, +// value obrtained from dhcp6_reply_event API message, +// use ~0 to send message to all DHCPv6 servers +// - irt - initial retransmission time +// - mrt - maximum retransmission time +// - mrc - maximum retransmission count +// - mrd - maximum retransmission duration +// for sending the message +// - stop - if non-zero then stop resending the message, +// otherwise start sending the message +// - msg_type - message type +// - T1 - value of T1 in IA_NA option +// - T2 - value of T2 in IA_NA option +// - n_addresses - number of addresses in IA_NA option +// - addresses - list of addresses in IA_NA option +// // DHCP6SendClientMessage defines message 'dhcp6_send_client_message'. type DHCP6SendClientMessage struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -805,6 +874,10 @@ func (m *DHCP6SendClientMessageReply) Unmarshal(b []byte) error { return nil } +// DHCP Client config add / del request +// - is_add - add the config if non-zero, else delete +// - client - client configuration data +// // DHCPClientConfig defines message 'dhcp_client_config'. type DHCPClientConfig struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -894,6 +967,10 @@ func (m *DHCPClientConfigReply) Unmarshal(b []byte) error { return nil } +// DHCP Client details returned from dump +// - - client - The configured client +// - - lease - The learned lease data +// // DHCPClientDetails defines message 'dhcp_client_details'. type DHCPClientDetails struct { Client DHCPClient `binapi:"dhcp_client,name=client" json:"client,omitempty"` @@ -1002,6 +1079,7 @@ func (m *DHCPClientDetails) Unmarshal(b []byte) error { return nil } +// Dump the DHCP client configurations // DHCPClientDump defines message 'dhcp_client_dump'. type DHCPClientDump struct{} @@ -1029,6 +1107,10 @@ func (m *DHCPClientDump) Unmarshal(b []byte) error { return nil } +// Tell client about a DHCP completion event +// - pid - client pid registered to receive notification +// - lease - Data learned during the DHCP process; +// // DHCPComplEvent defines message 'dhcp_compl_event'. type DHCPComplEvent struct { PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` @@ -1118,6 +1200,7 @@ func (m *DHCPComplEvent) Unmarshal(b []byte) error { return nil } +// Control ping from client to api server request // DHCPPluginControlPing defines message 'dhcp_plugin_control_ping'. type DHCPPluginControlPing struct{} @@ -1145,6 +1228,10 @@ func (m *DHCPPluginControlPing) Unmarshal(b []byte) error { return nil } +// Control ping from the client to the server response +// - retval - return code for the request +// - vpe_pid - the pid of the vpe, returned by the server +// // DHCPPluginControlPingReply defines message 'dhcp_plugin_control_ping_reply'. type DHCPPluginControlPingReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1186,6 +1273,7 @@ func (m *DHCPPluginControlPingReply) Unmarshal(b []byte) error { return nil } +// Get the plugin version // DHCPPluginGetVersion defines message 'dhcp_plugin_get_version'. type DHCPPluginGetVersion struct{} @@ -1213,6 +1301,10 @@ func (m *DHCPPluginGetVersion) Unmarshal(b []byte) error { return nil } +// Reply to get the plugin version +// - major - Incremented every time a known breaking behavior change is introduced +// - minor - Incremented with small changes, may be used to avoid buggy versions +// // DHCPPluginGetVersionReply defines message 'dhcp_plugin_get_version_reply'. type DHCPPluginGetVersionReply struct { Major uint32 `binapi:"u32,name=major" json:"major,omitempty"` @@ -1250,6 +1342,14 @@ func (m *DHCPPluginGetVersionReply) Unmarshal(b []byte) error { return nil } +// DHCP Proxy config add / del request +// - rx_vrf_id - Rx/interface vrf id +// - server_vrf_id - server vrf id +// - is_add - add the config if non-zero, else delete +// - insert_circuit_id - option82 suboption 1 fib number +// - dhcp_server[] - server address +// - dhcp_src_address[] - sc address for packets sent to the server +// // DHCPProxyConfig defines message 'dhcp_proxy_config'. type DHCPProxyConfig struct { RxVrfID uint32 `binapi:"u32,name=rx_vrf_id" json:"rx_vrf_id,omitempty"` @@ -1338,6 +1438,7 @@ func (m *DHCPProxyConfigReply) Unmarshal(b []byte) error { return nil } +// Tell client about a DHCP completion event // DHCPProxyDetails defines message 'dhcp_proxy_details'. type DHCPProxyDetails struct { RxVrfID uint32 `binapi:"u32,name=rx_vrf_id" json:"rx_vrf_id,omitempty"` @@ -1428,6 +1529,9 @@ func (m *DHCPProxyDetails) Unmarshal(b []byte) error { return nil } +// Dump DHCP proxy table +// - True for IPv6 proxy table +// // DHCPProxyDump defines message 'dhcp_proxy_dump'. type DHCPProxyDump struct { IsIP6 bool `binapi:"bool,name=is_ip6" json:"is_ip6,omitempty"` @@ -1461,6 +1565,15 @@ func (m *DHCPProxyDump) Unmarshal(b []byte) error { return nil } +// DHCP Proxy set / unset vss request +// - tbl_id - table id +// @vss_type - 0: use ASCI vpn_id; 1: use oui/vpn_index; 255: global vpn +// @vpn_ascii - null terminated ASCII VPN ID up to 128 characters +// - oui - first part of rfc2685 vpn id, 3 bytes oui +// - vpn_index - second part of rfc2685 vpn id, 4 bytes vpn index +// - is_ipv6 - ip6 if non-zero, else ip4 +// - is_add - set vss if non-zero, else delete +// // DHCPProxySetVss defines message 'dhcp_proxy_set_vss'. type DHCPProxySetVss struct { TblID uint32 `binapi:"u32,name=tbl_id" json:"tbl_id,omitempty"` @@ -1551,6 +1664,10 @@ func (m *DHCPProxySetVssReply) Unmarshal(b []byte) error { return nil } +// Register for DHCPv6 PD reply events +// - enable_disable - 1 => register for events, 0 => cancel registration +// - pid - sender's pid +// // WantDHCP6PdReplyEvents defines message 'want_dhcp6_pd_reply_events'. type WantDHCP6PdReplyEvents struct { EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"` @@ -1623,6 +1740,10 @@ func (m *WantDHCP6PdReplyEventsReply) Unmarshal(b []byte) error { return nil } +// Register for DHCPv6 reply events +// - enable_disable - 1 => register for events, 0 => cancel registration +// - pid - sender's pid +// // WantDHCP6ReplyEvents defines message 'want_dhcp6_reply_events'. type WantDHCP6ReplyEvents struct { EnableDisable uint8 `binapi:"u8,name=enable_disable" json:"enable_disable,omitempty"` diff --git a/binapi/dhcp/dhcp_rpc.ba.go b/binapi/dhcp/dhcp_rpc.ba.go index 4ba9c95b..4f57a180 100644 --- a/binapi/dhcp/dhcp_rpc.ba.go +++ b/binapi/dhcp/dhcp_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service dhcp. diff --git a/binapi/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go b/binapi/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go index d65c7c57..c26ca380 100644 --- a/binapi/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go +++ b/binapi/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/dhcp6_ia_na_client_cp.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/dhcp6_ia_na_client_cp.api.json // Package dhcp6_ia_na_client_cp contains generated bindings for API file dhcp6_ia_na_client_cp.api. // // Contents: -// -// 2 messages +// - 2 messages package dhcp6_ia_na_client_cp import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,6 +28,10 @@ const ( VersionCrc = 0x6e8abdfb ) +// Enable/disable DHCPv6 client on interface +// - sw_if_index - interface to enable/disable client on +// - enable - 1 to enable, 0 to disable +// // DHCP6ClientEnableDisable defines message 'dhcp6_client_enable_disable'. type DHCP6ClientEnableDisable struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/binapi/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp_rpc.ba.go b/binapi/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp_rpc.ba.go index 3fbf2385..04cf458c 100644 --- a/binapi/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp_rpc.ba.go +++ b/binapi/dhcp6_ia_na_client_cp/dhcp6_ia_na_client_cp_rpc.ba.go @@ -5,7 +5,7 @@ package dhcp6_ia_na_client_cp import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service dhcp6_ia_na_client_cp. diff --git a/binapi/dhcp6_pd_client_cp/dhcp6_pd_client_cp.ba.go b/binapi/dhcp6_pd_client_cp/dhcp6_pd_client_cp.ba.go index b92ac89e..01bf6cca 100644 --- a/binapi/dhcp6_pd_client_cp/dhcp6_pd_client_cp.ba.go +++ b/binapi/dhcp6_pd_client_cp/dhcp6_pd_client_cp.ba.go @@ -1,21 +1,20 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/dhcp6_pd_client_cp.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/dhcp6_pd_client_cp.api.json // Package dhcp6_pd_client_cp contains generated bindings for API file dhcp6_pd_client_cp.api. // // Contents: -// -// 4 messages +// - 4 messages package dhcp6_pd_client_cp import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -30,6 +29,11 @@ const ( VersionCrc = 0xd4418668 ) +// Enable/disable DHCPv6 PD client on interface +// - sw_if_index - interface to enable/disable client on +// - prefix_group - name of prefix group (relevant when 'enable' is 1) +// - enable - 1 to enable, 0 to disable +// // DHCP6PdClientEnableDisable defines message 'dhcp6_pd_client_enable_disable'. type DHCP6PdClientEnableDisable struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -106,6 +110,16 @@ func (m *DHCP6PdClientEnableDisableReply) Unmarshal(b []byte) error { return nil } +// Add/delete IPv6 address optionally using available prefix +// - sw_if_index - software interface index of interface +// to add/delete address to/from +// - prefix_group - name of prefix group, +// prefix_group[0] == '\0' means no prefix should be used +// - address - address or suffix to be used with a prefix +// from selected group +// - prefix_length - subnet prefix for the address +// - is_add - 1 for add, 0 for remove +// // IP6AddDelAddressUsingPrefix defines message 'ip6_add_del_address_using_prefix'. type IP6AddDelAddressUsingPrefix struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/binapi/dhcp6_pd_client_cp/dhcp6_pd_client_cp_rpc.ba.go b/binapi/dhcp6_pd_client_cp/dhcp6_pd_client_cp_rpc.ba.go index f5314086..cd18f141 100644 --- a/binapi/dhcp6_pd_client_cp/dhcp6_pd_client_cp_rpc.ba.go +++ b/binapi/dhcp6_pd_client_cp/dhcp6_pd_client_cp_rpc.ba.go @@ -5,7 +5,7 @@ package dhcp6_pd_client_cp import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service dhcp6_pd_client_cp. diff --git a/binapi/dns/dns.ba.go b/binapi/dns/dns.ba.go index c61f6cc3..610b64ae 100644 --- a/binapi/dns/dns.ba.go +++ b/binapi/dns/dns.ba.go @@ -1,19 +1,18 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/dns.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/dns.api.json // Package dns contains generated bindings for API file dns.api. // // Contents: -// -// 8 messages +// - 8 messages package dns import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -28,6 +27,9 @@ const ( VersionCrc = 0x269575cd ) +// enable/disable name resolution +// - is_enable - 1 = enable, 0 = disable +// // DNSEnableDisable defines message 'dns_enable_disable'. type DNSEnableDisable struct { Enable uint8 `binapi:"u8,name=enable" json:"enable,omitempty"` @@ -94,6 +96,11 @@ func (m *DNSEnableDisableReply) Unmarshal(b []byte) error { return nil } +// add or delete an upstream name server +// - is_ip6 - an ip6 name server +// - is_add - add = 1, delete = 0 +// - server_address - server ip address +// // DNSNameServerAddDel defines message 'dns_name_server_add_del'. type DNSNameServerAddDel struct { IsIP6 uint8 `binapi:"u8,name=is_ip6" json:"is_ip6,omitempty"` @@ -169,6 +176,10 @@ func (m *DNSNameServerAddDelReply) Unmarshal(b []byte) error { return nil } +// DNS IP -> name resolution request +// - is_ip6 - set if the reverse-DNS request is an ip6 address +// - address - the address to map to a name +// // DNSResolveIP defines message 'dns_resolve_ip'. type DNSResolveIP struct { IsIP6 uint8 `binapi:"u8,name=is_ip6" json:"is_ip6,omitempty"` @@ -207,6 +218,10 @@ func (m *DNSResolveIP) Unmarshal(b []byte) error { return nil } +// DNS ip->name resolution reply +// - retval - return value, 0 => success +// - name - canonical name for the indicated IP address +// // DNSResolveIPReply defines message 'dns_resolve_ip_reply'. type DNSResolveIPReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -245,6 +260,9 @@ func (m *DNSResolveIPReply) Unmarshal(b []byte) error { return nil } +// DNS name resolution request +// - name - the name to resolve +// // DNSResolveName defines message 'dns_resolve_name'. type DNSResolveName struct { Name []byte `binapi:"u8[256],name=name" json:"name,omitempty"` @@ -279,6 +297,13 @@ func (m *DNSResolveName) Unmarshal(b []byte) error { return nil } +// DNS name resolution reply +// - retval - return value, 0 => success +// - ip4_set - indicates that the ip4 address is valid +// - ip6_set - indicates that the ip6 address is valid +// - ip4_address - the ip4 name resolution reply +// - ip6_address - the ip6 name resolution reply +// // DNSResolveNameReply defines message 'dns_resolve_name_reply'. type DNSResolveNameReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` diff --git a/binapi/dns/dns_rpc.ba.go b/binapi/dns/dns_rpc.ba.go index deb5be83..8b5c98f1 100644 --- a/binapi/dns/dns_rpc.ba.go +++ b/binapi/dns/dns_rpc.ba.go @@ -5,7 +5,7 @@ package dns import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service dns. diff --git a/binapi/dslite/dslite.ba.go b/binapi/dslite/dslite.ba.go index ad23611a..d6bcd36b 100644 --- a/binapi/dslite/dslite.ba.go +++ b/binapi/dslite/dslite.ba.go @@ -1,21 +1,20 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/dslite.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/dslite.api.json // Package dslite contains generated bindings for API file dslite.api. // // Contents: -// -// 12 messages +// - 12 messages package dslite import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" _ "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -30,6 +29,11 @@ const ( VersionCrc = 0x1afa049b ) +// Add/delete address range to DS-Lite pool +// - start_addr - start IPv4 address of the range +// - end_addr - end IPv4 address of the range +// - is_add - true if add, false if delete +// // DsliteAddDelPoolAddrRange defines message 'dslite_add_del_pool_addr_range'. type DsliteAddDelPoolAddrRange struct { StartAddr ip_types.IP4Address `binapi:"ip4_address,name=start_addr" json:"start_addr,omitempty"` @@ -106,6 +110,9 @@ func (m *DsliteAddDelPoolAddrRangeReply) Unmarshal(b []byte) error { return nil } +// DS-Lite address details response +// - ip_address - IPv4 address +// // DsliteAddressDetails defines message 'dslite_address_details'. type DsliteAddressDetails struct { IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` @@ -139,6 +146,7 @@ func (m *DsliteAddressDetails) Unmarshal(b []byte) error { return nil } +// Dump DS-Lite addresses // DsliteAddressDump defines message 'dslite_address_dump'. type DsliteAddressDump struct{} @@ -166,6 +174,7 @@ func (m *DsliteAddressDump) Unmarshal(b []byte) error { return nil } +// Get AFTR IPv6 and IPv4 addresses // DsliteGetAftrAddr defines message 'dslite_get_aftr_addr'. type DsliteGetAftrAddr struct{} @@ -193,6 +202,11 @@ func (m *DsliteGetAftrAddr) Unmarshal(b []byte) error { return nil } +// Response to get AFTR IPv6 and IPv4 addresses +// - retval - return code +// - ip4_addr - IPv4 address +// - ip6_addr - IPv6 address +// // DsliteGetAftrAddrReply defines message 'dslite_get_aftr_addr_reply'. type DsliteGetAftrAddrReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -234,6 +248,7 @@ func (m *DsliteGetAftrAddrReply) Unmarshal(b []byte) error { return nil } +// Get B4 IPv6 and IPv4 addresses // DsliteGetB4Addr defines message 'dslite_get_b4_addr'. type DsliteGetB4Addr struct{} @@ -261,6 +276,11 @@ func (m *DsliteGetB4Addr) Unmarshal(b []byte) error { return nil } +// Response to get B4 IPv6 and IPv4 addresses +// - retval - return code +// - ip4_addr - IPv4 address +// - ip6_addr - IPv6 address +// // DsliteGetB4AddrReply defines message 'dslite_get_b4_addr_reply'. type DsliteGetB4AddrReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -302,6 +322,10 @@ func (m *DsliteGetB4AddrReply) Unmarshal(b []byte) error { return nil } +// Set AFTR IPv6 and IPv4 addresses +// - ip4_addr - IPv4 address +// - ip6_addr - IPv6 address +// // DsliteSetAftrAddr defines message 'dslite_set_aftr_addr'. type DsliteSetAftrAddr struct { IP4Addr ip_types.IP4Address `binapi:"ip4_address,name=ip4_addr" json:"ip4_addr,omitempty"` @@ -372,6 +396,10 @@ func (m *DsliteSetAftrAddrReply) Unmarshal(b []byte) error { return nil } +// Set B4 IPv6 and IPv4 addresses +// - ip4_addr - IPv4 address +// - ip6_addr - IPv6 address +// // DsliteSetB4Addr defines message 'dslite_set_b4_addr'. type DsliteSetB4Addr struct { IP4Addr ip_types.IP4Address `binapi:"ip4_address,name=ip4_addr" json:"ip4_addr,omitempty"` diff --git a/binapi/dslite/dslite_rpc.ba.go b/binapi/dslite/dslite_rpc.ba.go index 2cc95594..4bdd2cd5 100644 --- a/binapi/dslite/dslite_rpc.ba.go +++ b/binapi/dslite/dslite_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service dslite. diff --git a/binapi/ethernet_types/ethernet_types.ba.go b/binapi/ethernet_types/ethernet_types.ba.go index a8f446c0..54eea2c4 100644 --- a/binapi/ethernet_types/ethernet_types.ba.go +++ b/binapi/ethernet_types/ethernet_types.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/ethernet_types.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/ethernet_types.api.json // Package ethernet_types contains generated bindings for API file ethernet_types.api. // // Contents: -// -// 1 alias +// - 1 alias package ethernet_types import ( "net" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // This is a compile-time assertion to ensure that this generated file @@ -23,9 +22,21 @@ import ( // GoVPP api package needs to be updated. const _ = api.GoVppAPIPackageIsVersion2 +const ( + APIFile = "ethernet_types" + APIVersion = "1.0.0" + VersionCrc = 0xf24103d6 +) + // MacAddress defines alias 'mac_address'. type MacAddress [6]uint8 +func NewMacAddress(mac net.HardwareAddr) MacAddress { + var macaddr MacAddress + copy(macaddr[:], mac[:]) + return macaddr +} + func ParseMacAddress(s string) (MacAddress, error) { var macaddr MacAddress mac, err := net.ParseMAC(s) @@ -35,15 +46,19 @@ func ParseMacAddress(s string) (MacAddress, error) { copy(macaddr[:], mac[:]) return macaddr, nil } + func (x MacAddress) ToMAC() net.HardwareAddr { return net.HardwareAddr(x[:]) } + func (x MacAddress) String() string { return x.ToMAC().String() } + func (x *MacAddress) MarshalText() ([]byte, error) { return []byte(x.String()), nil } + func (x *MacAddress) UnmarshalText(text []byte) error { mac, err := ParseMacAddress(string(text)) if err != nil { diff --git a/binapi/feature/feature.ba.go b/binapi/feature/feature.ba.go index 971dfc0b..9f844432 100644 --- a/binapi/feature/feature.ba.go +++ b/binapi/feature/feature.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/feature.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/feature.api.json // Package feature contains generated bindings for API file feature.api. // // Contents: -// -// 2 messages +// - 2 messages package feature import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,6 +28,10 @@ const ( VersionCrc = 0x8a6e6da1 ) +// Feature path enable/disable request +// - sw_if_index - the interface +// - enable - 1 = on, 0 = off +// // FeatureEnableDisable defines message 'feature_enable_disable'. type FeatureEnableDisable struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/binapi/feature/feature_rpc.ba.go b/binapi/feature/feature_rpc.ba.go index 811934b9..8f98139e 100644 --- a/binapi/feature/feature_rpc.ba.go +++ b/binapi/feature/feature_rpc.ba.go @@ -5,7 +5,7 @@ package feature import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service feature. diff --git a/binapi/fib/fib.ba.go b/binapi/fib/fib.ba.go index 80de2ead..95a51d9d 100644 --- a/binapi/fib/fib.ba.go +++ b/binapi/fib/fib.ba.go @@ -1,22 +1,21 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/fib.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/fib.api.json // Package fib contains generated bindings for API file fib.api. // // Contents: -// -// 1 struct -// 4 messages +// - 1 struct +// - 4 messages package fib import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" _ "github.com/networkservicemesh/govpp/binapi/fib_types" _ "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -38,6 +37,20 @@ type FibSource struct { Name string `binapi:"string[64],name=name" json:"name,omitempty"` } +// /* +// - Copyright (c) 2018 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. +// // FibSourceAdd defines message 'fib_source_add'. type FibSourceAdd struct { Src FibSource `binapi:"fib_source,name=src" json:"src,omitempty"` diff --git a/binapi/fib/fib_rpc.ba.go b/binapi/fib/fib_rpc.ba.go index 81b0dd49..1c1ff5bb 100644 --- a/binapi/fib/fib_rpc.ba.go +++ b/binapi/fib/fib_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service fib. diff --git a/binapi/fib_types/fib_types.ba.go b/binapi/fib_types/fib_types.ba.go index 5113f01a..5b108fe3 100644 --- a/binapi/fib_types/fib_types.ba.go +++ b/binapi/fib_types/fib_types.ba.go @@ -1,22 +1,21 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/fib_types.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/fib_types.api.json // Package fib_types contains generated bindings for API file fib_types.api. // // Contents: -// -// 3 enums -// 3 structs +// - 3 enums +// - 3 structs package fib_types import ( "strconv" - api "git.fd.io/govpp.git/api" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" ) // This is a compile-time assertion to ensure that this generated file @@ -25,6 +24,12 @@ import ( // GoVPP api package needs to be updated. const _ = api.GoVppAPIPackageIsVersion2 +const ( + APIFile = "fib_types" + APIVersion = "2.0.1" + VersionCrc = 0x21fd785b +) + // FibPathFlags defines enum 'fib_path_flags'. type FibPathFlags uint32 diff --git a/binapi/flow/flow.ba.go b/binapi/flow/flow.ba.go index 50f31e4c..6d787f66 100644 --- a/binapi/flow/flow.ba.go +++ b/binapi/flow/flow.ba.go @@ -1,23 +1,22 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/flow.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/flow.api.json // Package flow contains generated bindings for API file flow.api. // // Contents: -// -// 10 messages +// - 10 messages package flow import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" _ "github.com/networkservicemesh/govpp/binapi/ethernet_types" flow_types "github.com/networkservicemesh/govpp/binapi/flow_types" _ "github.com/networkservicemesh/govpp/binapi/interface_types" _ "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -32,8 +31,11 @@ const ( VersionCrc = 0xe17512 ) +// flow add request +// - flow - flow rule +// // FlowAdd defines message 'flow_add'. -// InProgress: the message form may change in the future versions +// Deprecated: the message will be removed in the future versions type FlowAdd struct { Flow flow_types.FlowRule `binapi:"flow_rule,name=flow" json:"flow,omitempty"` } @@ -90,8 +92,12 @@ func (m *FlowAdd) Unmarshal(b []byte) error { return nil } +// reply for adding flow +// - retval - return code +// - flow_index - flow index, can be used for flow del/enable/disable +// // FlowAddReply defines message 'flow_add_reply'. -// InProgress: the message form may change in the future versions +// Deprecated: the message will be removed in the future versions type FlowAddReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` FlowIndex uint32 `binapi:"u32,name=flow_index" json:"flow_index,omitempty"` @@ -128,8 +134,10 @@ func (m *FlowAddReply) Unmarshal(b []byte) error { return nil } +// flow add request v2 +// - flow - flow rule v2 +// // FlowAddV2 defines message 'flow_add_v2'. -// InProgress: the message form may change in the future versions type FlowAddV2 struct { Flow flow_types.FlowRuleV2 `binapi:"flow_rule_v2,name=flow" json:"flow,omitempty"` } @@ -198,8 +206,11 @@ func (m *FlowAddV2) Unmarshal(b []byte) error { return nil } +// reply for adding flow v2 +// - retval - return code +// - flow_index - flow index, can be used for flow del/enable/disable +// // FlowAddV2Reply defines message 'flow_add_v2_reply'. -// InProgress: the message form may change in the future versions type FlowAddV2Reply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` FlowIndex uint32 `binapi:"u32,name=flow_index" json:"flow_index,omitempty"` @@ -236,8 +247,10 @@ func (m *FlowAddV2Reply) Unmarshal(b []byte) error { return nil } +// flow del request +// - flow_index - flow index +// // FlowDel defines message 'flow_del'. -// InProgress: the message form may change in the future versions type FlowDel struct { FlowIndex uint32 `binapi:"u32,name=flow_index" json:"flow_index,omitempty"` } @@ -271,7 +284,6 @@ func (m *FlowDel) Unmarshal(b []byte) error { } // FlowDelReply defines message 'flow_del_reply'. -// InProgress: the message form may change in the future versions type FlowDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -304,8 +316,11 @@ func (m *FlowDelReply) Unmarshal(b []byte) error { return nil } +// flow disable request +// - flow_index - flow index +// - hw_if_index - hardware interface index +// // FlowDisable defines message 'flow_disable'. -// InProgress: the message form may change in the future versions type FlowDisable struct { FlowIndex uint32 `binapi:"u32,name=flow_index" json:"flow_index,omitempty"` HwIfIndex uint32 `binapi:"u32,name=hw_if_index" json:"hw_if_index,omitempty"` @@ -343,7 +358,6 @@ func (m *FlowDisable) Unmarshal(b []byte) error { } // FlowDisableReply defines message 'flow_disable_reply'. -// InProgress: the message form may change in the future versions type FlowDisableReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -376,8 +390,11 @@ func (m *FlowDisableReply) Unmarshal(b []byte) error { return nil } +// flow enable request +// - flow_index - flow index +// - hw_if_index - hardware interface index +// // FlowEnable defines message 'flow_enable'. -// InProgress: the message form may change in the future versions type FlowEnable struct { FlowIndex uint32 `binapi:"u32,name=flow_index" json:"flow_index,omitempty"` HwIfIndex uint32 `binapi:"u32,name=hw_if_index" json:"hw_if_index,omitempty"` @@ -415,7 +432,6 @@ func (m *FlowEnable) Unmarshal(b []byte) error { } // FlowEnableReply defines message 'flow_enable_reply'. -// InProgress: the message form may change in the future versions type FlowEnableReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } diff --git a/binapi/flow/flow_rpc.ba.go b/binapi/flow/flow_rpc.ba.go index 73f5aaf7..ec1d2fcd 100644 --- a/binapi/flow/flow_rpc.ba.go +++ b/binapi/flow/flow_rpc.ba.go @@ -5,7 +5,7 @@ package flow import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service flow. diff --git a/binapi/flow_types/flow_types.ba.go b/binapi/flow_types/flow_types.ba.go index 59c47411..688a081c 100644 --- a/binapi/flow_types/flow_types.ba.go +++ b/binapi/flow_types/flow_types.ba.go @@ -1,25 +1,24 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/flow_types.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/flow_types.api.json // Package flow_types contains generated bindings for API file flow_types.api. // // Contents: -// -// 5 enums -// 20 structs -// 2 unions +// - 5 enums +// - 20 structs +// - 2 unions package flow_types import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ethernet_types "github.com/networkservicemesh/govpp/binapi/ethernet_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -28,6 +27,12 @@ import ( // GoVPP api package needs to be updated. const _ = api.GoVppAPIPackageIsVersion2 +const ( + APIFile = "flow_types" + APIVersion = "0.0.4" + VersionCrc = 0x5657caac +) + // FlowAction defines enum 'flow_action'. type FlowAction uint32 diff --git a/binapi/flowprobe/flowprobe.ba.go b/binapi/flowprobe/flowprobe.ba.go index aa1eb53b..f01b70f1 100644 --- a/binapi/flowprobe/flowprobe.ba.go +++ b/binapi/flowprobe/flowprobe.ba.go @@ -1,23 +1,22 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/flowprobe.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/flowprobe.api.json // Package flowprobe contains generated bindings for API file flowprobe.api. // // Contents: -// -// 4 enums -// 12 messages +// - 4 enums +// - 12 messages package flowprobe import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -190,6 +189,7 @@ func (x FlowprobeWhichFlags) String() string { return s } +// Get IPFIX flow record generation parameters // FlowprobeGetParams defines message 'flowprobe_get_params'. // InProgress: the message form may change in the future versions type FlowprobeGetParams struct{} @@ -218,6 +218,14 @@ func (m *FlowprobeGetParams) Unmarshal(b []byte) error { return nil } +// Reply to get IPFIX flow record generation parameters +// - retval - error (0 is "no error") +// - record_flags - flags indicating what data to record +// - active_timer - time in seconds after which active flow records are +// to be exported (0 is "off") +// - passive_timer - time in seconds after which passive flow records are +// to be deleted (0 is "off") +// // FlowprobeGetParamsReply defines message 'flowprobe_get_params_reply'. // InProgress: the message form may change in the future versions type FlowprobeGetParamsReply struct { @@ -264,6 +272,12 @@ func (m *FlowprobeGetParamsReply) Unmarshal(b []byte) error { return nil } +// Enable or disable IPFIX flow record generation on an interface +// - is_add - add interface if non-zero, else delete +// - which - datapath on which to record flows +// - direction - direction of recorded flows +// - sw_if_index - index of the interface +// // FlowprobeInterfaceAddDel defines message 'flowprobe_interface_add_del'. // InProgress: the message form may change in the future versions type FlowprobeInterfaceAddDel struct { @@ -346,6 +360,11 @@ func (m *FlowprobeInterfaceAddDelReply) Unmarshal(b []byte) error { return nil } +// Details about IPFIX flow record generation enabled on interface +// - which - datapath on which to record flows +// - direction - direction of recorded flows +// - sw_if_index - index of the interface +// // FlowprobeInterfaceDetails defines message 'flowprobe_interface_details'. // InProgress: the message form may change in the future versions type FlowprobeInterfaceDetails struct { @@ -388,6 +407,9 @@ func (m *FlowprobeInterfaceDetails) Unmarshal(b []byte) error { return nil } +// Dump interfaces for which IPFIX flow record generation is enabled +// - sw_if_index - interface index to use as filter (0xffffffff is "all") +// // FlowprobeInterfaceDump defines message 'flowprobe_interface_dump'. // InProgress: the message form may change in the future versions type FlowprobeInterfaceDump struct { @@ -496,6 +518,13 @@ func (m *FlowprobeParamsReply) Unmarshal(b []byte) error { return nil } +// Set IPFIX flow record generation parameters +// - record_flags - flags indicating what data to record +// - active_timer - time in seconds after which active flow records are +// to be exported (0 is "off", 0xffffffff is "use default value") +// - passive_timer - time in seconds after which passive flow records are +// to be deleted (0 is "off", 0xffffffff is "use default value") +// // FlowprobeSetParams defines message 'flowprobe_set_params'. // InProgress: the message form may change in the future versions type FlowprobeSetParams struct { @@ -572,6 +601,11 @@ func (m *FlowprobeSetParamsReply) Unmarshal(b []byte) error { return nil } +// Enable / disable per-packet IPFIX recording on an interface +// - is_add - add address if non-zero, else delete +// - which - flags indicating forwarding path +// - sw_if_index - index of the interface +// // FlowprobeTxInterfaceAddDel defines message 'flowprobe_tx_interface_add_del'. type FlowprobeTxInterfaceAddDel struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` diff --git a/binapi/flowprobe/flowprobe_rpc.ba.go b/binapi/flowprobe/flowprobe_rpc.ba.go index 76909f1b..f2309161 100644 --- a/binapi/flowprobe/flowprobe_rpc.ba.go +++ b/binapi/flowprobe/flowprobe_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service flowprobe. diff --git a/binapi/geneve/geneve.ba.go b/binapi/geneve/geneve.ba.go index 211c67c2..095eea08 100644 --- a/binapi/geneve/geneve.ba.go +++ b/binapi/geneve/geneve.ba.go @@ -1,22 +1,21 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/geneve.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/geneve.api.json // Package geneve contains generated bindings for API file geneve.api. // // Contents: -// -// 8 messages +// - 8 messages package geneve import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" _ "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -31,6 +30,20 @@ const ( VersionCrc = 0xe3dbb8a3 ) +// /* +// - Copyright (c) 2017 SUSE LLC. +// - 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. +// // GeneveAddDelTunnel defines message 'geneve_add_del_tunnel'. // Deprecated: the message will be removed in the future versions type GeneveAddDelTunnel struct { @@ -332,6 +345,11 @@ func (m *GeneveTunnelDump) Unmarshal(b []byte) error { return nil } +// Interface set geneve-bypass request +// - sw_if_index - interface used to reach neighbor +// - is_ipv6 - if non-zero, enable ipv6-geneve-bypass, else ipv4-geneve-bypass +// - enable - if non-zero enable, else disable +// // SwInterfaceSetGeneveBypass defines message 'sw_interface_set_geneve_bypass'. type SwInterfaceSetGeneveBypass struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/binapi/geneve/geneve_rpc.ba.go b/binapi/geneve/geneve_rpc.ba.go index d7a09b41..6633ce50 100644 --- a/binapi/geneve/geneve_rpc.ba.go +++ b/binapi/geneve/geneve_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service geneve. diff --git a/binapi/gre/gre.ba.go b/binapi/gre/gre.ba.go index 824c19e7..0f8954b7 100644 --- a/binapi/gre/gre.ba.go +++ b/binapi/gre/gre.ba.go @@ -1,26 +1,25 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/gre.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/gre.api.json // Package gre contains generated bindings for API file gre.api. // // Contents: -// -// 1 enum -// 1 struct -// 4 messages +// - 1 enum +// - 1 struct +// - 4 messages package gre import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" tunnel_types "github.com/networkservicemesh/govpp/binapi/tunnel_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -78,6 +77,10 @@ type GreTunnel struct { Dst ip_types.Address `binapi:"address,name=dst" json:"dst,omitempty"` } +// Add or delete a single GRE tunnel. +// - is_add - add if true, delete if false. +// - tunnel - tunnel definition to add or delete. +// // GreTunnelAddDel defines message 'gre_tunnel_add_del'. type GreTunnelAddDel struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -145,6 +148,10 @@ func (m *GreTunnelAddDel) Unmarshal(b []byte) error { return nil } +// Add or delete a single GRE tunnel. +// - retval - return code for the request. +// - sw_if_index - the interface corresponding to the affected tunnel. +// // GreTunnelAddDelReply defines message 'gre_tunnel_add_del_reply'. type GreTunnelAddDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -182,6 +189,9 @@ func (m *GreTunnelAddDelReply) Unmarshal(b []byte) error { return nil } +// Details response for one of the requested GRE tunnels. +// - tunnel - definition of the dumped tunnel. +// // GreTunnelDetails defines message 'gre_tunnel_details'. type GreTunnelDetails struct { Tunnel GreTunnel `binapi:"gre_tunnel,name=tunnel" json:"tunnel,omitempty"` @@ -245,6 +255,9 @@ func (m *GreTunnelDetails) Unmarshal(b []byte) error { return nil } +// Dump details of all or just a single GRE tunnel. +// - sw_if_index - filter for tunnel of this interface index, ~0 for all. +// // GreTunnelDump defines message 'gre_tunnel_dump'. type GreTunnelDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/binapi/gre/gre_rpc.ba.go b/binapi/gre/gre_rpc.ba.go index 7c8c4cc8..63aee6d1 100644 --- a/binapi/gre/gre_rpc.ba.go +++ b/binapi/gre/gre_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service gre. diff --git a/binapi/gso/gso.ba.go b/binapi/gso/gso.ba.go index 103e5410..ade1a66a 100644 --- a/binapi/gso/gso.ba.go +++ b/binapi/gso/gso.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/gso.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/gso.api.json // Package gso contains generated bindings for API file gso.api. // // Contents: -// -// 2 messages +// - 2 messages package gso import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,6 +28,10 @@ const ( VersionCrc = 0x81a73026 ) +// Enable or disable interface feature gso arc +// - sw_if_index - The interface to enable/disable gso feature arc. +// - enable_disable - set to 1 to enable, 0 to disable gso feature arc +// // FeatureGsoEnableDisable defines message 'feature_gso_enable_disable'. type FeatureGsoEnableDisable struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/binapi/gso/gso_rpc.ba.go b/binapi/gso/gso_rpc.ba.go index 0d3ed102..f30f23f4 100644 --- a/binapi/gso/gso_rpc.ba.go +++ b/binapi/gso/gso_rpc.ba.go @@ -5,7 +5,7 @@ package gso import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service gso. diff --git a/binapi/gtpu/gtpu.ba.go b/binapi/gtpu/gtpu.ba.go index baeca8da..0dabe84e 100644 --- a/binapi/gtpu/gtpu.ba.go +++ b/binapi/gtpu/gtpu.ba.go @@ -1,21 +1,20 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/gtpu.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/gtpu.api.json // Package gtpu contains generated bindings for API file gtpu.api. // // Contents: -// -// 10 messages +// - 10 messages package gtpu import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -30,6 +29,16 @@ const ( VersionCrc = 0x1462473 ) +// Create or delete a GTPU tunnel +// - is_add - add address if non-zero, else delete +// - src_address - GTPU tunnel's source address. +// - dst_address - GTPU tunnel's destination address. +// - mcast_sw_if_index - version, O-bit and C-bit (see nsh_packet.h) +// - encap_vrf_id - fib identifier used for outgoing encapsulated packets +// - decap_next_index - the index of the next node if success +// - teid - Local (rx) Tunnel Endpoint Identifier +// - tteid - Remote (tx) Tunnel Endpoint Identifier +// // GtpuAddDelTunnel defines message 'gtpu_add_del_tunnel'. type GtpuAddDelTunnel struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -97,6 +106,10 @@ func (m *GtpuAddDelTunnel) Unmarshal(b []byte) error { return nil } +// reply for set or delete an GTPU tunnel +// - retval - return code +// - sw_if_index - software index of the interface +// // GtpuAddDelTunnelReply defines message 'gtpu_add_del_tunnel_reply'. type GtpuAddDelTunnelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -134,6 +147,11 @@ func (m *GtpuAddDelTunnelReply) Unmarshal(b []byte) error { return nil } +// Offload gtpu rx request +// - hw_if_index - rx hw interface +// - sw_if_index - gtpu interface to offload +// - enable - if non-zero enable, else disable +// // GtpuOffloadRx defines message 'gtpu_offload_rx'. type GtpuOffloadRx struct { HwIfIndex uint32 `binapi:"u32,name=hw_if_index" json:"hw_if_index,omitempty"` @@ -208,6 +226,16 @@ func (m *GtpuOffloadRxReply) Unmarshal(b []byte) error { return nil } +// dump details of an GTPU tunnel +// - sw_if_index - software index of the interface +// - src_address - GTPU tunnel's source address. +// - dst_address - GTPU tunnel's destination address. +// - mcast_sw_if_index - version, O-bit and C-bit (see nsh_packet.h) +// - encap_vrf_id - fib identifier used for outgoing encapsulated packets +// - decap_next_index - the index of the next node if success +// - teid - Local (rx) Tunnel Endpoint Identifier +// - tteid - Remote (tx) Tunnel Endpoint Identifier +// // GtpuTunnelDetails defines message 'gtpu_tunnel_details'. type GtpuTunnelDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -275,6 +303,9 @@ func (m *GtpuTunnelDetails) Unmarshal(b []byte) error { return nil } +// Dump GTPU tunnel +// - sw_if_index - software index of the interface +// // GtpuTunnelDump defines message 'gtpu_tunnel_dump'. type GtpuTunnelDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -308,6 +339,12 @@ func (m *GtpuTunnelDump) Unmarshal(b []byte) error { return nil } +// Update GTPU tunnel TX TEID +// - dst_address - GTPU tunnel's destination address. +// - encap_vrf_id - fib identifier used for outgoing encapsulated packets +// - teid - Local (rx) Tunnel Endpoint Identifier +// - tteid - remote (tx) Tunnel Endpoint Identifier +// // GtpuTunnelUpdateTteid defines message 'gtpu_tunnel_update_tteid'. type GtpuTunnelUpdateTteid struct { DstAddress ip_types.Address `binapi:"address,name=dst_address" json:"dst_address,omitempty"` @@ -389,6 +426,11 @@ func (m *GtpuTunnelUpdateTteidReply) Unmarshal(b []byte) error { return nil } +// Interface set gtpu-bypass request +// - sw_if_index - interface used to reach neighbor +// - is_ipv6 - if non-zero, enable ipv6-gtpu-bypass, else ipv4-gtpu-bypass +// - enable - if non-zero enable, else disable +// // SwInterfaceSetGtpuBypass defines message 'sw_interface_set_gtpu_bypass'. type SwInterfaceSetGtpuBypass struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/binapi/gtpu/gtpu_rpc.ba.go b/binapi/gtpu/gtpu_rpc.ba.go index 9161fec2..deed6c6f 100644 --- a/binapi/gtpu/gtpu_rpc.ba.go +++ b/binapi/gtpu/gtpu_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service gtpu. diff --git a/binapi/http_static/http_static.ba.go b/binapi/http_static/http_static.ba.go index f09db06f..64f71a05 100644 --- a/binapi/http_static/http_static.ba.go +++ b/binapi/http_static/http_static.ba.go @@ -1,19 +1,18 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/http_static.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/http_static.api.json // Package http_static contains generated bindings for API file http_static.api. // // Contents: -// -// 2 messages +// - 2 messages package http_static import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -28,6 +27,14 @@ const ( VersionCrc = 0xd29e72e9 ) +// Configure and enable the static http server +// - fifo_size - size (in bytes) of the session FIFOs +// - cache_size_limit - size (in bytes) of the in-memory file data cache +// - prealloc_fifos - number of preallocated fifos (usually 0) +// - private_segment_size - fifo segment size (usually 0) +// - www_root - html root path +// - uri - bind URI, defaults to "tcp://0.0.0.0/80" +// // HTTPStaticEnable defines message 'http_static_enable'. type HTTPStaticEnable struct { FifoSize uint32 `binapi:"u32,name=fifo_size" json:"fifo_size,omitempty"` diff --git a/binapi/http_static/http_static_rpc.ba.go b/binapi/http_static/http_static_rpc.ba.go index 12bd4c19..01f44eaf 100644 --- a/binapi/http_static/http_static_rpc.ba.go +++ b/binapi/http_static/http_static_rpc.ba.go @@ -5,7 +5,7 @@ package http_static import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service http_static. diff --git a/binapi/idpf/idpf.ba.go b/binapi/idpf/idpf.ba.go new file mode 100644 index 00000000..3bd85a01 --- /dev/null +++ b/binapi/idpf/idpf.ba.go @@ -0,0 +1,226 @@ +// Code generated by GoVPP's binapi-generator. DO NOT EDIT. +// versions: +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/idpf.api.json + +// Package idpf contains generated bindings for API file idpf.api. +// +// Contents: +// - 4 messages +package idpf + +import ( + interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + 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 = "idpf" + APIVersion = "1.0.0" + VersionCrc = 0x48384ea8 +) + +// - client_index - opaque cookie to identify the sender +// - pci_addr - pci address as unsigned 32bit integer: +// 0-15 domain, 16-23 bus, 24-28 slot, 29-31 function +// ddddddddddddddddbbbbbbbbsssssfff +// - rxq_num - number of receive queues +// - rxq_size - receive queue size +// - txq_size - transmit queue size +// +// IdpfCreate defines message 'idpf_create'. +type IdpfCreate struct { + PciAddr uint32 `binapi:"u32,name=pci_addr" json:"pci_addr,omitempty"` + RxqSingle uint16 `binapi:"u16,name=rxq_single" json:"rxq_single,omitempty"` + TxqSingle uint16 `binapi:"u16,name=txq_single" json:"txq_single,omitempty"` + RxqNum uint16 `binapi:"u16,name=rxq_num" json:"rxq_num,omitempty"` + TxqNum uint16 `binapi:"u16,name=txq_num" json:"txq_num,omitempty"` + RxqSize uint16 `binapi:"u16,name=rxq_size" json:"rxq_size,omitempty"` + TxqSize uint16 `binapi:"u16,name=txq_size" json:"txq_size,omitempty"` + ReqVportNb uint16 `binapi:"u16,name=req_vport_nb" json:"req_vport_nb,omitempty"` +} + +func (m *IdpfCreate) Reset() { *m = IdpfCreate{} } +func (*IdpfCreate) GetMessageName() string { return "idpf_create" } +func (*IdpfCreate) GetCrcString() string { return "2ba86d91" } +func (*IdpfCreate) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IdpfCreate) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.PciAddr + size += 2 // m.RxqSingle + size += 2 // m.TxqSingle + size += 2 // m.RxqNum + size += 2 // m.TxqNum + size += 2 // m.RxqSize + size += 2 // m.TxqSize + size += 2 // m.ReqVportNb + return size +} +func (m *IdpfCreate) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.PciAddr) + buf.EncodeUint16(m.RxqSingle) + buf.EncodeUint16(m.TxqSingle) + buf.EncodeUint16(m.RxqNum) + buf.EncodeUint16(m.TxqNum) + buf.EncodeUint16(m.RxqSize) + buf.EncodeUint16(m.TxqSize) + buf.EncodeUint16(m.ReqVportNb) + return buf.Bytes(), nil +} +func (m *IdpfCreate) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.PciAddr = buf.DecodeUint32() + m.RxqSingle = buf.DecodeUint16() + m.TxqSingle = buf.DecodeUint16() + m.RxqNum = buf.DecodeUint16() + m.TxqNum = buf.DecodeUint16() + m.RxqSize = buf.DecodeUint16() + m.TxqSize = buf.DecodeUint16() + m.ReqVportNb = buf.DecodeUint16() + return nil +} + +// - context - sender context, to match reply w/ request +// - retval - return value for request +// - sw_if_index - software index for the new idpf interface +// +// IdpfCreateReply defines message 'idpf_create_reply'. +type IdpfCreateReply 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 *IdpfCreateReply) Reset() { *m = IdpfCreateReply{} } +func (*IdpfCreateReply) GetMessageName() string { return "idpf_create_reply" } +func (*IdpfCreateReply) GetCrcString() string { return "5383d31f" } +func (*IdpfCreateReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IdpfCreateReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 4 // m.SwIfIndex + return size +} +func (m *IdpfCreateReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *IdpfCreateReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + return nil +} + +// - client_index - opaque cookie to identify the sender +// - sw_if_index - interface index +// +// IdpfDelete defines message 'idpf_delete'. +type IdpfDelete struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` +} + +func (m *IdpfDelete) Reset() { *m = IdpfDelete{} } +func (*IdpfDelete) GetMessageName() string { return "idpf_delete" } +func (*IdpfDelete) GetCrcString() string { return "f9e6675e" } +func (*IdpfDelete) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IdpfDelete) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.SwIfIndex + return size +} +func (m *IdpfDelete) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *IdpfDelete) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + return nil +} + +// IdpfDeleteReply defines message 'idpf_delete_reply'. +type IdpfDeleteReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *IdpfDeleteReply) Reset() { *m = IdpfDeleteReply{} } +func (*IdpfDeleteReply) GetMessageName() string { return "idpf_delete_reply" } +func (*IdpfDeleteReply) GetCrcString() string { return "e8d4e804" } +func (*IdpfDeleteReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IdpfDeleteReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *IdpfDeleteReply) 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 *IdpfDeleteReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +func init() { file_idpf_binapi_init() } +func file_idpf_binapi_init() { + api.RegisterMessage((*IdpfCreate)(nil), "idpf_create_2ba86d91") + api.RegisterMessage((*IdpfCreateReply)(nil), "idpf_create_reply_5383d31f") + api.RegisterMessage((*IdpfDelete)(nil), "idpf_delete_f9e6675e") + api.RegisterMessage((*IdpfDeleteReply)(nil), "idpf_delete_reply_e8d4e804") +} + +// Messages returns list of all messages in this module. +func AllMessages() []api.Message { + return []api.Message{ + (*IdpfCreate)(nil), + (*IdpfCreateReply)(nil), + (*IdpfDelete)(nil), + (*IdpfDeleteReply)(nil), + } +} diff --git a/binapi/idpf/idpf_rpc.ba.go b/binapi/idpf/idpf_rpc.ba.go new file mode 100644 index 00000000..7fb14c87 --- /dev/null +++ b/binapi/idpf/idpf_rpc.ba.go @@ -0,0 +1,41 @@ +// Code generated by GoVPP's binapi-generator. DO NOT EDIT. + +package idpf + +import ( + "context" + + api "go.fd.io/govpp/api" +) + +// RPCService defines RPC service idpf. +type RPCService interface { + IdpfCreate(ctx context.Context, in *IdpfCreate) (*IdpfCreateReply, error) + IdpfDelete(ctx context.Context, in *IdpfDelete) (*IdpfDeleteReply, error) +} + +type serviceClient struct { + conn api.Connection +} + +func NewServiceClient(conn api.Connection) RPCService { + return &serviceClient{conn} +} + +func (c *serviceClient) IdpfCreate(ctx context.Context, in *IdpfCreate) (*IdpfCreateReply, error) { + out := new(IdpfCreateReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + +func (c *serviceClient) IdpfDelete(ctx context.Context, in *IdpfDelete) (*IdpfDeleteReply, error) { + out := new(IdpfDeleteReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} diff --git a/binapi/igmp/igmp.ba.go b/binapi/igmp/igmp.ba.go index 0ff6a1e8..8b0f536f 100644 --- a/binapi/igmp/igmp.ba.go +++ b/binapi/igmp/igmp.ba.go @@ -1,25 +1,24 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/igmp.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/igmp.api.json // Package igmp contains generated bindings for API file igmp.api. // // Contents: -// -// 2 enums -// 2 structs -// 19 messages +// - 2 enums +// - 2 structs +// - 19 messages package igmp import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -103,6 +102,9 @@ type IgmpGroup struct { Saddrs []ip_types.IP4Address `binapi:"ip4_address[n_srcs],name=saddrs" json:"saddrs,omitempty"` } +// remove all (S,G)s from an interface +// - sw_if_index - interface sw index +// // IgmpClearInterface defines message 'igmp_clear_interface'. type IgmpClearInterface struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -169,6 +171,11 @@ func (m *IgmpClearInterfaceReply) Unmarshal(b []byte) error { return nil } +// * @brief igmp details +// - - sw_if_index - interface sw index +// - - saddr - source address +// - - gaddr - group address +// // IgmpDetails defines message 'igmp_details'. type IgmpDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -210,6 +217,9 @@ func (m *IgmpDetails) Unmarshal(b []byte) error { return nil } +// * @brief dump (S,G)s from interface +// - - sw_if_index - interface sw index (~0 for all) +// // IgmpDump defines message 'igmp_dump'. type IgmpDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -243,6 +253,14 @@ func (m *IgmpDump) Unmarshal(b []byte) error { return nil } +// * @brief +// - Used by a 'router' and 'host' to enable the reception of IGMP packets. +// - For hosts this must be called once before igmp_listen. +// * +// - - enable - if set, enable igmp messages on configuration +// - - mode - Host (1) or router (0) mode +// - - sw_if_index - interface sw index +// // IgmpEnableDisable defines message 'igmp_enable_disable'. type IgmpEnableDisable struct { Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` @@ -317,6 +335,12 @@ func (m *IgmpEnableDisableReply) Unmarshal(b []byte) error { return nil } +// * @brief igmp event details +// - - sw_if_index - interface sw index +// - - saddr - source address +// - - gaddr - group address +// *- filter - filter mode +// // IgmpEvent defines message 'igmp_event'. type IgmpEvent struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -431,6 +455,10 @@ func (m *IgmpGroupPrefixDump) Unmarshal(b []byte) error { return nil } +// * @brief Configure a prefix for SSM or ASM semantics +// - - address - Prefix address +// - - address_length - Prefix length +// // IgmpGroupPrefixSet defines message 'igmp_group_prefix_set'. type IgmpGroupPrefixSet struct { Gp GroupPrefix `binapi:"group_prefix,name=gp" json:"gp,omitempty"` @@ -506,6 +534,36 @@ func (m *IgmpGroupPrefixSetReply) Unmarshal(b []byte) error { return nil } +// * @brief +// - Used by a 'host' to enable the reception/listening of packets for a specific +// - multicast group +// * +// - For each socket on which IPMulticastListen has been invoked, the +// - system records the desired multicast reception state for that socket. +// - That state conceptually consists of a set of records of the form: +// * +// - (interface, multicast-address, filter-mode, source-list) +// * +// - The socket state evolves in response to each invocation of +// - IPMulticastListen on the socket, as follows: +// * +// - o If the requested filter mode is INCLUDE *and* the requested source +// - list is empty, then the entry corresponding to the requested +// - interface and multicast address is deleted if present. If no such +// - entry is present, the request is ignored. +// * +// - o If the requested filter mode is EXCLUDE *or* the requested source +// - list is non-empty, then the entry corresponding to the requested +// - interface and multicast address, if present, is changed to contain +// - the requested filter mode and source list. If no such entry is +// - present, a new entry is created, using the parameters specified in +// - the request. +// * +// - - sw_if_index - interface sw index +// - - filter - filter mode +// - - saddr - source address +// - - gaddr - group address +// // IgmpListen defines message 'igmp_listen'. type IgmpListen struct { Group IgmpGroup `binapi:"igmp_group,name=group" json:"group,omitempty"` @@ -600,6 +658,14 @@ func (m *IgmpListenReply) Unmarshal(b []byte) error { return nil } +// * @brief +// - Add/del proxy device on specified VRF. +// - Interface must be IGMP enabled in HOST mode. +// * +// - - add - add (1) del (0) +// - - vrf_id - VRF id +// - - sw_if_index - upstream interface sw index +// // IgmpProxyDeviceAddDel defines message 'igmp_proxy_device_add_del'. type IgmpProxyDeviceAddDel struct { Add uint8 `binapi:"u8,name=add" json:"add,omitempty"` @@ -641,6 +707,14 @@ func (m *IgmpProxyDeviceAddDel) Unmarshal(b []byte) error { return nil } +// * @brief +// - Add/del downstream interface to/from proxy device. +// - Interface must be IGMP enabled in ROUTER mode. +// * +// - - add - add (1) del (0) +// - - vrf_id - VRF id +// - - sw_if_index - downstream interface sw index +// // IgmpProxyDeviceAddDelInterface defines message 'igmp_proxy_device_add_del_interface'. type IgmpProxyDeviceAddDelInterface struct { Add bool `binapi:"bool,name=add" json:"add,omitempty"` @@ -752,6 +826,10 @@ func (m *IgmpProxyDeviceAddDelReply) Unmarshal(b []byte) error { return nil } +// * @brief register for igmp events +// - - pid - sender's pid +// - - enable - 1 enable, 0 disable igmp events +// // WantIgmpEvents defines message 'want_igmp_events'. type WantIgmpEvents struct { Enable uint32 `binapi:"u32,name=enable" json:"enable,omitempty"` diff --git a/binapi/igmp/igmp_rpc.ba.go b/binapi/igmp/igmp_rpc.ba.go index 68dd2661..1dd7935b 100644 --- a/binapi/igmp/igmp_rpc.ba.go +++ b/binapi/igmp/igmp_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service igmp. diff --git a/binapi/ikev2/ikev2.ba.go b/binapi/ikev2/ikev2.ba.go index 2838e32d..60dd9788 100644 --- a/binapi/ikev2/ikev2.ba.go +++ b/binapi/ikev2/ikev2.ba.go @@ -1,22 +1,21 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/ikev2.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/ikev2.api.json // Package ikev2 contains generated bindings for API file ikev2.api. // // Contents: -// -// 50 messages +// - 50 messages package ikev2 import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ikev2_types "github.com/networkservicemesh/govpp/binapi/ikev2_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -31,6 +30,10 @@ const ( VersionCrc = 0x8eb2437c ) +// Child SA details +// - retval - return code +// - child_sa - child SA data +// // Ikev2ChildSaDetails defines message 'ikev2_child_sa_details'. // InProgress: the message form may change in the future versions type Ikev2ChildSaDetails struct { @@ -181,6 +184,9 @@ func (m *Ikev2ChildSaDetails) Unmarshal(b []byte) error { return nil } +// Dump child SA of specific SA +// - sa_index - index of specific sa +// // Ikev2ChildSaDump defines message 'ikev2_child_sa_dump'. // InProgress: the message form may change in the future versions type Ikev2ChildSaDump struct { @@ -215,6 +221,9 @@ func (m *Ikev2ChildSaDump) Unmarshal(b []byte) error { return nil } +// IKEv2: Initiate the delete Child SA exchange +// - ispi - Child SA initiator SPI +// // Ikev2InitiateDelChildSa defines message 'ikev2_initiate_del_child_sa'. // InProgress: the message form may change in the future versions type Ikev2InitiateDelChildSa struct { @@ -285,6 +294,9 @@ func (m *Ikev2InitiateDelChildSaReply) Unmarshal(b []byte) error { return nil } +// IKEv2: Initiate the delete IKE SA exchange +// - ispi - IKE SA initiator SPI +// // Ikev2InitiateDelIkeSa defines message 'ikev2_initiate_del_ike_sa'. // InProgress: the message form may change in the future versions type Ikev2InitiateDelIkeSa struct { @@ -353,6 +365,9 @@ func (m *Ikev2InitiateDelIkeSaReply) Unmarshal(b []byte) error { return nil } +// IKEv2: Initiate the rekey Child SA exchange +// - ispi - Child SA initiator SPI +// // Ikev2InitiateRekeyChildSa defines message 'ikev2_initiate_rekey_child_sa'. // InProgress: the message form may change in the future versions type Ikev2InitiateRekeyChildSa struct { @@ -423,6 +438,9 @@ func (m *Ikev2InitiateRekeyChildSaReply) Unmarshal(b []byte) error { return nil } +// IKEv2: Initiate the SA_INIT exchange +// - name - IKEv2 profile name +// // Ikev2InitiateSaInit defines message 'ikev2_initiate_sa_init'. // InProgress: the message form may change in the future versions type Ikev2InitiateSaInit struct { @@ -491,6 +509,10 @@ func (m *Ikev2InitiateSaInitReply) Unmarshal(b []byte) error { return nil } +// get specific nonce +// - is_initiator - specify type initiator|responder of nonce +// - sa_index - index of specific sa +// // Ikev2NonceGet defines message 'ikev2_nonce_get'. // InProgress: the message form may change in the future versions type Ikev2NonceGet struct { @@ -529,6 +551,11 @@ func (m *Ikev2NonceGet) Unmarshal(b []byte) error { return nil } +// reply on specific nonce +// - retval - return code +// - data_len - nonce length +// - nonce - nonce data +// // Ikev2NonceGetReply defines message 'ikev2_nonce_get_reply'. // InProgress: the message form may change in the future versions type Ikev2NonceGetReply struct { @@ -572,6 +599,7 @@ func (m *Ikev2NonceGetReply) Unmarshal(b []byte) error { return nil } +// Get the plugin version // Ikev2PluginGetVersion defines message 'ikev2_plugin_get_version'. type Ikev2PluginGetVersion struct{} @@ -599,6 +627,10 @@ func (m *Ikev2PluginGetVersion) Unmarshal(b []byte) error { return nil } +// Reply to get the plugin version +// - major - Incremented every time a known breaking behavior change is introduced +// - minor - Incremented with small changes, may be used to avoid buggy versions +// // Ikev2PluginGetVersionReply defines message 'ikev2_plugin_get_version_reply'. type Ikev2PluginGetVersionReply struct { Major uint32 `binapi:"u32,name=major" json:"major,omitempty"` @@ -636,6 +668,10 @@ func (m *Ikev2PluginGetVersionReply) Unmarshal(b []byte) error { return nil } +// IKEv2: Add/delete profile +// - name - IKEv2 profile name +// - is_add - Add IKEv2 profile if non-zero, else delete +// // Ikev2ProfileAddDel defines message 'ikev2_profile_add_del'. // InProgress: the message form may change in the future versions type Ikev2ProfileAddDel struct { @@ -708,6 +744,9 @@ func (m *Ikev2ProfileAddDelReply) Unmarshal(b []byte) error { return nil } +// Details about all profiles +// - profile - profile element with encapsulated attributes +// // Ikev2ProfileDetails defines message 'ikev2_profile_details'. // InProgress: the message form may change in the future versions type Ikev2ProfileDetails struct { @@ -887,6 +926,9 @@ func (m *Ikev2ProfileDetails) Unmarshal(b []byte) error { return nil } +// IKEv2: Disable NAT traversal +// - name - IKEv2 profile name +// // Ikev2ProfileDisableNatt defines message 'ikev2_profile_disable_natt'. // InProgress: the message form may change in the future versions type Ikev2ProfileDisableNatt struct { @@ -957,6 +999,7 @@ func (m *Ikev2ProfileDisableNattReply) Unmarshal(b []byte) error { return nil } +// Dump all profiles // Ikev2ProfileDump defines message 'ikev2_profile_dump'. // InProgress: the message form may change in the future versions type Ikev2ProfileDump struct{} @@ -985,6 +1028,13 @@ func (m *Ikev2ProfileDump) Unmarshal(b []byte) error { return nil } +// IKEv2: Set IKEv2 profile authentication method +// - name - IKEv2 profile name +// - auth_method - IKEv2 authentication method (shared-key-mic/rsa-sig) +// - is_hex - Authentication data in hex format if non-zero, else string +// - data_len - Authentication data length +// - data - Authentication data (for rsa-sig cert file path) +// // Ikev2ProfileSetAuth defines message 'ikev2_profile_set_auth'. // InProgress: the message form may change in the future versions type Ikev2ProfileSetAuth struct { @@ -1070,6 +1120,13 @@ func (m *Ikev2ProfileSetAuthReply) Unmarshal(b []byte) error { return nil } +// IKEv2: Set IKEv2 profile local/remote identification +// - name - IKEv2 profile name +// - is_local - Identification is local if non-zero, else remote +// - id_type - Identification type +// - data_len - Identification data length +// - data - Identification data +// // Ikev2ProfileSetID defines message 'ikev2_profile_set_id'. // InProgress: the message form may change in the future versions type Ikev2ProfileSetID struct { @@ -1155,6 +1212,11 @@ func (m *Ikev2ProfileSetIDReply) Unmarshal(b []byte) error { return nil } +// IKEv2: Set/unset custom ipsec-over-udp port +// - is_set - whether set or unset custom port +// - port - port number +// - name - IKEv2 profile name +// // Ikev2ProfileSetIpsecUDPPort defines message 'ikev2_profile_set_ipsec_udp_port'. // InProgress: the message form may change in the future versions type Ikev2ProfileSetIpsecUDPPort struct { @@ -1235,6 +1297,10 @@ func (m *Ikev2ProfileSetIpsecUDPPortReply) Unmarshal(b []byte) error { return nil } +// IKEv2: Set liveness parameters +// - period - how often is liveness check performed +// - max_retries - max retries for liveness check +// // Ikev2ProfileSetLiveness defines message 'ikev2_profile_set_liveness'. // InProgress: the message form may change in the future versions type Ikev2ProfileSetLiveness struct { @@ -1309,6 +1375,10 @@ func (m *Ikev2ProfileSetLivenessReply) Unmarshal(b []byte) error { return nil } +// IKEv2: Set IKEv2 profile traffic selector parameters +// - name - IKEv2 profile name +// - ts - traffic selector data +// // Ikev2ProfileSetTs defines message 'ikev2_profile_set_ts'. // InProgress: the message form may change in the future versions type Ikev2ProfileSetTs struct { @@ -1408,6 +1478,9 @@ func (m *Ikev2ProfileSetTsReply) Unmarshal(b []byte) error { return nil } +// IKEv2: Set UDP encapsulation +// - name - IKEv2 profile name +// // Ikev2ProfileSetUDPEncap defines message 'ikev2_profile_set_udp_encap'. // InProgress: the message form may change in the future versions type Ikev2ProfileSetUDPEncap struct { @@ -1478,6 +1551,10 @@ func (m *Ikev2ProfileSetUDPEncapReply) Unmarshal(b []byte) error { return nil } +// Details about IKE SA +// - retval - return code +// - sa - SA data +// // Ikev2SaDetails defines message 'ikev2_sa_details'. // InProgress: the message form may change in the future versions type Ikev2SaDetails struct { @@ -1694,6 +1771,7 @@ func (m *Ikev2SaDetails) Unmarshal(b []byte) error { return nil } +// Dump all SAs // Ikev2SaDump defines message 'ikev2_sa_dump'. // InProgress: the message form may change in the future versions type Ikev2SaDump struct{} @@ -1722,6 +1800,10 @@ func (m *Ikev2SaDump) Unmarshal(b []byte) error { return nil } +// IKEv2: Set IKEv2 ESP transforms in SA_INIT proposal (RFC 7296) +// - name - IKEv2 profile name +// - tr - ESP transforms +// // Ikev2SetEspTransforms defines message 'ikev2_set_esp_transforms'. // InProgress: the message form may change in the future versions type Ikev2SetEspTransforms struct { @@ -1800,6 +1882,10 @@ func (m *Ikev2SetEspTransformsReply) Unmarshal(b []byte) error { return nil } +// IKEv2: Set IKEv2 IKE transforms in SA_INIT proposal (RFC 7296) +// - name - IKEv2 profile name +// - tr - IKE transforms +// // Ikev2SetIkeTransforms defines message 'ikev2_set_ike_transforms'. // InProgress: the message form may change in the future versions type Ikev2SetIkeTransforms struct { @@ -1881,6 +1967,9 @@ func (m *Ikev2SetIkeTransformsReply) Unmarshal(b []byte) error { return nil } +// IKEv2: Set IKEv2 local RSA private key +// - key_file - Key file absolute path +// // Ikev2SetLocalKey defines message 'ikev2_set_local_key'. // InProgress: the message form may change in the future versions type Ikev2SetLocalKey struct { @@ -1949,6 +2038,10 @@ func (m *Ikev2SetLocalKeyReply) Unmarshal(b []byte) error { return nil } +// IKEv2: Set IKEv2 responder interface and IP address +// - name - IKEv2 profile name +// - responder - responder data +// // Ikev2SetResponder defines message 'ikev2_set_responder'. // InProgress: the message form may change in the future versions type Ikev2SetResponder struct { @@ -2105,6 +2198,13 @@ func (m *Ikev2SetResponderReply) Unmarshal(b []byte) error { return nil } +// IKEv2: Set Child SA lifetime, limited by time and/or data +// - name - IKEv2 profile name +// - lifetime - SA maximum life time in seconds (0 to disable) +// - lifetime_jitter - Jitter added to prevent simultaneous rekeying +// - handover - Hand over time +// - lifetime_maxdata - SA maximum life time in bytes (0 to disable) +// // Ikev2SetSaLifetime defines message 'ikev2_set_sa_lifetime'. // InProgress: the message form may change in the future versions type Ikev2SetSaLifetime struct { @@ -2189,6 +2289,12 @@ func (m *Ikev2SetSaLifetimeReply) Unmarshal(b []byte) error { return nil } +// IKEv2: Set the tunnel interface which will be protected by IKE +// +// If this API is not called, a new tunnel will be created +// - name - IKEv2 profile name +// - sw_if_index - Of an existing tunnel +// // Ikev2SetTunnelInterface defines message 'ikev2_set_tunnel_interface'. // InProgress: the message form may change in the future versions type Ikev2SetTunnelInterface struct { @@ -2263,6 +2369,10 @@ func (m *Ikev2SetTunnelInterfaceReply) Unmarshal(b []byte) error { return nil } +// details on specific traffic selector +// - retval - return code +// - ts - traffic selector data +// // Ikev2TrafficSelectorDetails defines message 'ikev2_traffic_selector_details'. // InProgress: the message form may change in the future versions type Ikev2TrafficSelectorDetails struct { @@ -2328,6 +2438,11 @@ func (m *Ikev2TrafficSelectorDetails) Unmarshal(b []byte) error { return nil } +// dump traffic selectors +// - is_initiator - specify type initiator|responder of nonce +// - sa_index - index of specific sa +// - child_sa_index - index of specific sa child of specific sa +// // Ikev2TrafficSelectorDump defines message 'ikev2_traffic_selector_dump'. // InProgress: the message form may change in the future versions type Ikev2TrafficSelectorDump struct { diff --git a/binapi/ikev2/ikev2_rpc.ba.go b/binapi/ikev2/ikev2_rpc.ba.go index 56efe82b..f65315c6 100644 --- a/binapi/ikev2/ikev2_rpc.ba.go +++ b/binapi/ikev2/ikev2_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service ikev2. diff --git a/binapi/ikev2_types/ikev2_types.ba.go b/binapi/ikev2_types/ikev2_types.ba.go index 78ab059f..5544b37b 100644 --- a/binapi/ikev2_types/ikev2_types.ba.go +++ b/binapi/ikev2_types/ikev2_types.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/ikev2_types.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/ikev2_types.api.json // Package ikev2_types contains generated bindings for API file ikev2_types.api. // // Contents: -// -// 12 structs +// - 12 structs package ikev2_types import ( - api "git.fd.io/govpp.git/api" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" ) // This is a compile-time assertion to ensure that this generated file @@ -23,6 +22,12 @@ import ( // GoVPP api package needs to be updated. const _ = api.GoVppAPIPackageIsVersion2 +const ( + APIFile = "ikev2_types" + APIVersion = "1.0.0" + VersionCrc = 0xe7510e +) + // Ikev2Auth defines type 'ikev2_auth'. type Ikev2Auth struct { Method uint8 `binapi:"u8,name=method" json:"method,omitempty"` diff --git a/binapi/interface/interface.ba.go b/binapi/interface/interface.ba.go index 473d5391..466e3472 100644 --- a/binapi/interface/interface.ba.go +++ b/binapi/interface/interface.ba.go @@ -1,22 +1,21 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/interface.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/interface.api.json // Package interfaces contains generated bindings for API file interface.api. // // Contents: -// -// 68 messages +// - 74 messages package interfaces import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ethernet_types "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -28,9 +27,14 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "interface" APIVersion = "3.2.3" - VersionCrc = 0xddff3487 + VersionCrc = 0x446ae86d ) +// Enable or disable detailed interface stats +// - sw_if_index - The interface to collect detail stats on. ~0 implies +// all interfaces. +// - enable_disable - set to 1 to enable, 0 to disable detailed stats +// // 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"` @@ -105,6 +109,9 @@ func (m *CollectDetailedInterfaceStatsReply) Unmarshal(b []byte) error { return nil } +// Create loopback interface request +// - mac_address - mac addr to assign to the interface if none-zero +// // CreateLoopback defines message 'create_loopback'. type CreateLoopback struct { MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"` @@ -138,6 +145,11 @@ func (m *CreateLoopback) Unmarshal(b []byte) error { return nil } +// Create loopback interface instance request +// - mac_address - mac addr to assign to the interface if none-zero +// - is_specified - if non-0, a specific user_instance is being requested +// - user_instance - requested instance, ~0 => dynamically allocate +// // CreateLoopbackInstance defines message 'create_loopback_instance'. type CreateLoopbackInstance struct { MacAddress ethernet_types.MacAddress `binapi:"mac_address,name=mac_address" json:"mac_address,omitempty"` @@ -179,6 +191,10 @@ func (m *CreateLoopbackInstance) Unmarshal(b []byte) error { return nil } +// Create loopback interface instance response +// - sw_if_index - sw index of the interface that was created +// - retval - return code for the request +// // CreateLoopbackInstanceReply defines message 'create_loopback_instance_reply'. type CreateLoopbackInstanceReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -216,6 +232,10 @@ func (m *CreateLoopbackInstanceReply) Unmarshal(b []byte) error { return nil } +// Create loopback interface response +// - sw_if_index - sw index of the interface that was created +// - retval - return code for the request +// // CreateLoopbackReply defines message 'create_loopback_reply'. type CreateLoopbackReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -339,6 +359,10 @@ func (m *CreateSubifReply) Unmarshal(b []byte) error { return nil } +// Create a new subinterface with the given vlan id +// - sw_if_index - software index of the new vlan's parent interface +// - vlan_id - vlan tag of the new interface +// // CreateVlanSubif defines message 'create_vlan_subif'. type CreateVlanSubif struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -376,6 +400,10 @@ func (m *CreateVlanSubif) Unmarshal(b []byte) error { return nil } +// Reply for the vlan subinterface create request +// - retval - return code +// - sw_if_index - software index allocated for the new subinterface +// // CreateVlanSubifReply defines message 'create_vlan_subif_reply'. type CreateVlanSubifReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -413,6 +441,9 @@ func (m *CreateVlanSubifReply) Unmarshal(b []byte) error { return nil } +// Delete loopback interface request +// - sw_if_index - sw index of the interface that was created +// // DeleteLoopback defines message 'delete_loopback'. type DeleteLoopback struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -479,6 +510,9 @@ func (m *DeleteLoopbackReply) Unmarshal(b []byte) error { return nil } +// Delete sub interface request +// - sw_if_index - sw index of the interface that was created by create_subif +// // DeleteSubif defines message 'delete_subif'. type DeleteSubif struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -545,6 +579,9 @@ func (m *DeleteSubifReply) Unmarshal(b []byte) error { return nil } +// Get available, cached and used buffers +// - buffer_index - buffer stat index +// // GetBuffersStats defines message 'get_buffers_stats'. type GetBuffersStats struct { BufferIndex uint32 `binapi:"u32,name=buffer_index" json:"buffer_index,omitempty"` @@ -623,6 +660,10 @@ func (m *GetBuffersStatsReply) Unmarshal(b []byte) error { return nil } +// Set interface physical MTU +// - sw_if_index - index of the interface to set MTU on +// - mtu - MTU +// // HwInterfaceSetMtu defines message 'hw_interface_set_mtu'. type HwInterfaceSetMtu struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -693,6 +734,7 @@ func (m *HwInterfaceSetMtuReply) Unmarshal(b []byte) error { return nil } +// /* Gross kludge, DGMS // InterfaceNameRenumber defines message 'interface_name_renumber'. type InterfaceNameRenumber struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -763,6 +805,262 @@ func (m *InterfaceNameRenumberReply) Unmarshal(b []byte) error { return nil } +// pcap_set_filter_function +// - filter_function_name - the name of the filter function +// to set for pcap capture +// +// PcapSetFilterFunction defines message 'pcap_set_filter_function'. +type PcapSetFilterFunction struct { + FilterFunctionName string `binapi:"string[],name=filter_function_name" json:"filter_function_name,omitempty"` +} + +func (m *PcapSetFilterFunction) Reset() { *m = PcapSetFilterFunction{} } +func (*PcapSetFilterFunction) GetMessageName() string { return "pcap_set_filter_function" } +func (*PcapSetFilterFunction) GetCrcString() string { return "616abb92" } +func (*PcapSetFilterFunction) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *PcapSetFilterFunction) Size() (size int) { + if m == nil { + return 0 + } + size += 4 + len(m.FilterFunctionName) // m.FilterFunctionName + return size +} +func (m *PcapSetFilterFunction) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeString(m.FilterFunctionName, 0) + return buf.Bytes(), nil +} +func (m *PcapSetFilterFunction) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.FilterFunctionName = buf.DecodeString(0) + return nil +} + +// PcapSetFilterFunctionReply defines message 'pcap_set_filter_function_reply'. +type PcapSetFilterFunctionReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *PcapSetFilterFunctionReply) Reset() { *m = PcapSetFilterFunctionReply{} } +func (*PcapSetFilterFunctionReply) GetMessageName() string { return "pcap_set_filter_function_reply" } +func (*PcapSetFilterFunctionReply) GetCrcString() string { return "e8d4e804" } +func (*PcapSetFilterFunctionReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *PcapSetFilterFunctionReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *PcapSetFilterFunctionReply) 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 *PcapSetFilterFunctionReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// PcapTraceOff defines message 'pcap_trace_off'. +type PcapTraceOff struct{} + +func (m *PcapTraceOff) Reset() { *m = PcapTraceOff{} } +func (*PcapTraceOff) GetMessageName() string { return "pcap_trace_off" } +func (*PcapTraceOff) GetCrcString() string { return "51077d14" } +func (*PcapTraceOff) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *PcapTraceOff) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *PcapTraceOff) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *PcapTraceOff) Unmarshal(b []byte) error { + return nil +} + +// PcapTraceOffReply defines message 'pcap_trace_off_reply'. +type PcapTraceOffReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *PcapTraceOffReply) Reset() { *m = PcapTraceOffReply{} } +func (*PcapTraceOffReply) GetMessageName() string { return "pcap_trace_off_reply" } +func (*PcapTraceOffReply) GetCrcString() string { return "e8d4e804" } +func (*PcapTraceOffReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *PcapTraceOffReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *PcapTraceOffReply) 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 *PcapTraceOffReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// pcap_trace_on +// - capture_rx - capture received packets +// - capture_tx - capture transmitted packets +// - capture_drop - capture dropped packets +// - filter - is a filter is being used on this capture +// - preallocate_data - preallocate the data buffer +// - free_data - free the data buffer +// - max_packets - depth of local buffer +// - max_bytes_per_packet - maximum number of bytes to capture +// for each packet +// - sw_if_index - specify a given interface, or 0 for any +// - error - filter packets based on a specific error. +// - filename - output filename, will be placed in /tmp +// +// PcapTraceOn defines message 'pcap_trace_on'. +type PcapTraceOn struct { + CaptureRx bool `binapi:"bool,name=capture_rx" json:"capture_rx,omitempty"` + CaptureTx bool `binapi:"bool,name=capture_tx" json:"capture_tx,omitempty"` + CaptureDrop bool `binapi:"bool,name=capture_drop" json:"capture_drop,omitempty"` + Filter bool `binapi:"bool,name=filter" json:"filter,omitempty"` + PreallocateData bool `binapi:"bool,name=preallocate_data" json:"preallocate_data,omitempty"` + FreeData bool `binapi:"bool,name=free_data" json:"free_data,omitempty"` + MaxPackets uint32 `binapi:"u32,name=max_packets,default=1000" json:"max_packets,omitempty"` + MaxBytesPerPacket uint32 `binapi:"u32,name=max_bytes_per_packet,default=512" json:"max_bytes_per_packet,omitempty"` + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + Error string `binapi:"string[128],name=error" json:"error,omitempty"` + Filename string `binapi:"string[64],name=filename" json:"filename,omitempty"` +} + +func (m *PcapTraceOn) Reset() { *m = PcapTraceOn{} } +func (*PcapTraceOn) GetMessageName() string { return "pcap_trace_on" } +func (*PcapTraceOn) GetCrcString() string { return "cb39e968" } +func (*PcapTraceOn) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *PcapTraceOn) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.CaptureRx + size += 1 // m.CaptureTx + size += 1 // m.CaptureDrop + size += 1 // m.Filter + size += 1 // m.PreallocateData + size += 1 // m.FreeData + size += 4 // m.MaxPackets + size += 4 // m.MaxBytesPerPacket + size += 4 // m.SwIfIndex + size += 128 // m.Error + size += 64 // m.Filename + return size +} +func (m *PcapTraceOn) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBool(m.CaptureRx) + buf.EncodeBool(m.CaptureTx) + buf.EncodeBool(m.CaptureDrop) + buf.EncodeBool(m.Filter) + buf.EncodeBool(m.PreallocateData) + buf.EncodeBool(m.FreeData) + buf.EncodeUint32(m.MaxPackets) + buf.EncodeUint32(m.MaxBytesPerPacket) + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeString(m.Error, 128) + buf.EncodeString(m.Filename, 64) + return buf.Bytes(), nil +} +func (m *PcapTraceOn) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.CaptureRx = buf.DecodeBool() + m.CaptureTx = buf.DecodeBool() + m.CaptureDrop = buf.DecodeBool() + m.Filter = buf.DecodeBool() + m.PreallocateData = buf.DecodeBool() + m.FreeData = buf.DecodeBool() + m.MaxPackets = buf.DecodeUint32() + m.MaxBytesPerPacket = buf.DecodeUint32() + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.Error = buf.DecodeString(128) + m.Filename = buf.DecodeString(64) + return nil +} + +// PcapTraceOnReply defines message 'pcap_trace_on_reply'. +type PcapTraceOnReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *PcapTraceOnReply) Reset() { *m = PcapTraceOnReply{} } +func (*PcapTraceOnReply) GetMessageName() string { return "pcap_trace_on_reply" } +func (*PcapTraceOnReply) GetCrcString() string { return "e8d4e804" } +func (*PcapTraceOnReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *PcapTraceOnReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *PcapTraceOnReply) 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 *PcapTraceOnReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Set or delete one or all ip addresses on a specified interface +// - sw_if_index - index of the interface to add/del addresses +// - is_add - add address if non-zero, else delete +// - del_all - if non-zero delete all addresses on the interface +// - prefix - address + a prefix length for the implied connected route +// // SwInterfaceAddDelAddress defines message 'sw_interface_add_del_address'. type SwInterfaceAddDelAddress struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -849,6 +1147,11 @@ func (m *SwInterfaceAddDelAddressReply) Unmarshal(b []byte) error { return nil } +// Add or delete a secondary MAC address on an interface +// - sw_if_index - the interface whose MAC will be set +// - mac_addr - the new MAC address +// - is_add - 0 to delete, != 0 to add +// // SwInterfaceAddDelMacAddress defines message 'sw_interface_add_del_mac_address'. type SwInterfaceAddDelMacAddress struct { SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -927,6 +1230,21 @@ func (m *SwInterfaceAddDelMacAddressReply) Unmarshal(b []byte) error { return nil } +// IP interface address replace begin +// +// The use-case is that, for some unspecified reason, the control plane +// has a different set of interface addresses than VPP +// currently has. The CP would thus like to 'replace' VPP's set +// only by specifying what the new set shall be, i.e. it is not +// going to delete anything that already eixts, rather, is wants any +// unspecified interface addresses to be deleted implicitly. +// The CP declares the start of this procedure with this replace_begin +// API Call, and when it has populated all addresses it wants, it calls +// the below replace_end API. From this point on it is of course free +// to add and delete interface addresses as usual. +// The underlying mechanism by which VPP implements this replace is +// intentionally left unspecified. +// // SwInterfaceAddressReplaceBegin defines message 'sw_interface_address_replace_begin'. type SwInterfaceAddressReplaceBegin struct{} @@ -991,6 +1309,10 @@ func (m *SwInterfaceAddressReplaceBeginReply) Unmarshal(b []byte) error { return nil } +// IP interface address replace end +// +// see ip_interface_address_replace_begin description. +// // SwInterfaceAddressReplaceEnd defines message 'sw_interface_address_replace_end'. type SwInterfaceAddressReplaceEnd struct{} @@ -1055,6 +1377,9 @@ func (m *SwInterfaceAddressReplaceEndReply) Unmarshal(b []byte) error { return nil } +// Clear interface statistics +// - sw_if_index - index of the interface to clear statistics +// // SwInterfaceClearStats defines message 'sw_interface_clear_stats'. type SwInterfaceClearStats struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1121,6 +1446,33 @@ func (m *SwInterfaceClearStatsReply) Unmarshal(b []byte) error { return nil } +// Interface details structure (fix this) +// - sw_if_index - index of the interface +// - sup_sw_if_index - index of parent interface if any, else same as sw_if_index +// - l2_address - the interface's l2 address +// - flags - interface_status flags +// - type - interface type +// - link_duplex - 1 if half duplex, 2 if full duplex +// - link_speed - value in kbps +// - link_MTU - max. transmission unit +// - sub_id - A number 0-N to uniquely identify this subif on super if +// - sub_number_of_tags - Number of tags (0 - 2) +// - sub_outer_vlan_id +// - sub_inner_vlan_id +// - sub_if_flags - sub interface flags +// - vtr_op - vlan tag rewrite operation +// - vtr_push_dot1q +// - vtr_tag1 +// - vtr_tag2 +// - pbb_outer_tag - translate pbb s-tag +// - pbb_b_dmac[6] - B-tag remote mac address +// - pbb_b_smac[6] - B-tag local mac address +// - pbb_b_vlanid - B-tag vlanid +// - pbb_i_sid - I-tag service id +// - interface_name - name of the interface +// - interface_dev_type - device type of the interface +// - tag - an ascii tag +// // SwInterfaceDetails defines message 'sw_interface_details'. type SwInterfaceDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1263,6 +1615,13 @@ func (m *SwInterfaceDetails) Unmarshal(b []byte) error { return nil } +// Request all or filtered subset of sw_interface_details +// - sw_if_index - index of the interface to dump info on, 0 or ~0 if on all +// TODO: Support selecting only index==0 when CSIT is ready. +// - name_filter_valid - 1 if requesting a filtered subset of records else 0 +// if name filter is set as valid, sw_if_index value is ignored and all interfaces are examined +// - name_filter - interface name substring filter. Eg. loop1 returns [loop1, loop10] +// // SwInterfaceDump defines message 'sw_interface_dump'. type SwInterfaceDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` @@ -1304,6 +1663,12 @@ func (m *SwInterfaceDump) Unmarshal(b []byte) error { return nil } +// Interface Event generated by want_interface_events +// - pid - client pid registered to receive notification +// - sw_if_index - index of the interface of the event +// - flags - interface_status flags +// - deleted - interface was deleted +// // SwInterfaceEvent defines message 'sw_interface_event'. type SwInterfaceEvent struct { PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` @@ -1349,6 +1714,9 @@ func (m *SwInterfaceEvent) Unmarshal(b []byte) error { return nil } +// Get interface's MAC address +// - sw_if_index - the interface whose MAC will be returned +// // SwInterfaceGetMacAddress defines message 'sw_interface_get_mac_address'. type SwInterfaceGetMacAddress struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1382,6 +1750,10 @@ func (m *SwInterfaceGetMacAddress) Unmarshal(b []byte) error { return nil } +// Reply for get interface's MAC address request +// - retval - return code +// - mac_addr - returned interface's MAC address +// // SwInterfaceGetMacAddressReply defines message 'sw_interface_get_mac_address_reply'. type SwInterfaceGetMacAddressReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1421,6 +1793,9 @@ func (m *SwInterfaceGetMacAddressReply) Unmarshal(b []byte) error { return nil } +// Get VRF id assigned to interface +// - sw_if_index - index of the interface +// // SwInterfaceGetTable defines message 'sw_interface_get_table'. type SwInterfaceGetTable struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1458,6 +1833,9 @@ func (m *SwInterfaceGetTable) Unmarshal(b []byte) error { return nil } +// Reply to get_sw_interface_vrf +// - vrf_id - VRF id assigned to the interface +// // SwInterfaceGetTableReply defines message 'sw_interface_get_table_reply'. type SwInterfaceGetTableReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1495,6 +1873,20 @@ func (m *SwInterfaceGetTableReply) Unmarshal(b []byte) error { return nil } +// show the interface's queue - thread placement +// +// This api is used to display the interface and queue worker +// thread placement. One message per rx-queue per interface will +// be sent to client. +// Each message will contain information about rx-queue id of an +// interface, interface index, thread on which this rx-queue is +// placed and mode of rx-queue. +// - sw_if_index - the interface whose rx-placement will be dumped +// - queue_id - the queue id +// - worker_id - the worker id on which queue_id is placed, +// worker_id = 0 means main thread. +// - mode - polling=1, interrupt=2, adaptive=3 +// // SwInterfaceRxPlacementDetails defines message 'sw_interface_rx_placement_details'. type SwInterfaceRxPlacementDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1542,6 +1934,12 @@ func (m *SwInterfaceRxPlacementDetails) Unmarshal(b []byte) error { return nil } +// dump the rx queue placement of interface(s) +// - sw_if_index - optional interface index for which queue placement to +// be requested. sw_if_index = ~0 will dump placement information for all +// interfaces. It will not dump information related to sub-interfaces, p2p +// and pipe interfaces. +// // SwInterfaceRxPlacementDump defines message 'sw_interface_rx_placement_dump'. type SwInterfaceRxPlacementDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1575,6 +1973,11 @@ func (m *SwInterfaceRxPlacementDump) Unmarshal(b []byte) error { return nil } +// Set flags on the interface +// - sw_if_index - index of the interface to set flags on +// - flags - interface_status flags +// (only IF_STATUS_API_FLAG_ADMIN_UP used in config) +// // SwInterfaceSetFlags defines message 'sw_interface_set_flags'. type SwInterfaceSetFlags struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1645,6 +2048,13 @@ func (m *SwInterfaceSetFlagsReply) Unmarshal(b []byte) error { return nil } +// Set custom interface name +// +// Set custom interface name for the interface. +// - sw_if_index - the interface whose name will be set +// - name - the custom interface name to be set +// +// k // SwInterfaceSetInterfaceName defines message 'sw_interface_set_interface_name'. type SwInterfaceSetInterfaceName struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1717,6 +2127,13 @@ func (m *SwInterfaceSetInterfaceNameReply) Unmarshal(b []byte) error { return nil } +// Set IP4 directed broadcast +// +// The directed broadcast enabled a packet sent to the interface's +// subnet address will be broadcast on the interface +// - sw_if_index +// - enable +// // SwInterfaceSetIPDirectedBroadcast defines message 'sw_interface_set_ip_directed_broadcast'. type SwInterfaceSetIPDirectedBroadcast struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1793,6 +2210,10 @@ func (m *SwInterfaceSetIPDirectedBroadcastReply) Unmarshal(b []byte) error { return nil } +// Set an interface's MAC address +// - sw_if_index - the interface whose MAC will be set +// - mac_addr - the new MAC address +// // SwInterfaceSetMacAddress defines message 'sw_interface_set_mac_address'. type SwInterfaceSetMacAddress struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1865,6 +2286,7 @@ func (m *SwInterfaceSetMacAddressReply) Unmarshal(b []byte) error { return nil } +// Set interface L3 MTU // SwInterfaceSetMtu defines message 'sw_interface_set_mtu'. type SwInterfaceSetMtu struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1944,6 +2366,10 @@ func (m *SwInterfaceSetMtuReply) Unmarshal(b []byte) error { return nil } +// Set interface promiscuous mode +// - sw_if_index - index of the interface to set flags on +// - promisc_on - promiscuous mode is on ? +// // SwInterfaceSetPromisc defines message 'sw_interface_set_promisc'. type SwInterfaceSetPromisc struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2014,6 +2440,14 @@ func (m *SwInterfaceSetPromiscReply) Unmarshal(b []byte) error { return nil } +// Set an interface's rx-mode +// - sw_if_index - the interface whose rx-mode will be set +// - queue_id_valid - 1 = the queue_id field is valid. 0 means all +// queue_id's +// - queue_id - the queue number whose rx-mode will be set. Only valid +// if queue_id_valid is 1 +// - mode - polling=1, interrupt=2, adaptive=3 +// // SwInterfaceSetRxMode defines message 'sw_interface_set_rx_mode'. type SwInterfaceSetRxMode struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2092,6 +2526,16 @@ func (m *SwInterfaceSetRxModeReply) Unmarshal(b []byte) error { return nil } +// Set an interface's rx-placement +// +// Rx-Queue placement on specific thread is operational for only hardware +// interface. It will not set queue - thread placement for sub-interfaces, +// p2p and pipe interfaces. +// - sw_if_index - the interface whose rx-placement will be set +// - queue_id - the queue number whose rx-placement will be set. +// - worker_id - the worker number whom rx-placement will be at. +// - is_main - flag to set rx-placement to main thread +// // SwInterfaceSetRxPlacement defines message 'sw_interface_set_rx_placement'. type SwInterfaceSetRxPlacement struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2172,6 +2616,11 @@ func (m *SwInterfaceSetRxPlacementReply) Unmarshal(b []byte) error { return nil } +// Associate the specified interface with a fib table +// - sw_if_index - index of the interface +// - is_ipv6 - if non-zero ipv6, else ipv4 +// - vrf_id - fib table/vrf id to associate the interface with +// // SwInterfaceSetTable defines message 'sw_interface_set_table'. type SwInterfaceSetTable struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2246,17 +2695,28 @@ func (m *SwInterfaceSetTableReply) Unmarshal(b []byte) error { return nil } +// Set an interface's tx-placement +// +// Tx-Queue placement on specific thread is operational for only hardware +// interface. It will not set queue - thread placement for sub-interfaces, +// p2p and pipe interfaces. +// - sw_if_index - the interface whose tx-placement will be set +// - queue_id - the queue number whose tx-placement will be set. +// - array_size - the size of the thread indexes array +// - threads - the thread indexes of main and worker(s) threads +// whom tx-placement will be at. +// // SwInterfaceSetTxPlacement defines message 'sw_interface_set_tx_placement'. type SwInterfaceSetTxPlacement struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` QueueID uint32 `binapi:"u32,name=queue_id" json:"queue_id,omitempty"` - ArraySize uint32 `binapi:"u32,name=array_size" json:"-"` + ArraySize uint8 `binapi:"u8,name=array_size" json:"-"` Threads []uint32 `binapi:"u32[array_size],name=threads" json:"threads,omitempty"` } func (m *SwInterfaceSetTxPlacement) Reset() { *m = SwInterfaceSetTxPlacement{} } func (*SwInterfaceSetTxPlacement) GetMessageName() string { return "sw_interface_set_tx_placement" } -func (*SwInterfaceSetTxPlacement) GetCrcString() string { return "4e0cd5ff" } +func (*SwInterfaceSetTxPlacement) GetCrcString() string { return "0b855b40" } func (*SwInterfaceSetTxPlacement) GetMessageType() api.MessageType { return api.RequestMessage } @@ -2267,7 +2727,7 @@ func (m *SwInterfaceSetTxPlacement) Size() (size int) { } size += 4 // m.SwIfIndex size += 4 // m.QueueID - size += 4 // m.ArraySize + size += 1 // m.ArraySize size += 4 * len(m.Threads) // m.Threads return size } @@ -2278,7 +2738,7 @@ func (m *SwInterfaceSetTxPlacement) Marshal(b []byte) ([]byte, error) { buf := codec.NewBuffer(b) buf.EncodeUint32(uint32(m.SwIfIndex)) buf.EncodeUint32(m.QueueID) - buf.EncodeUint32(uint32(len(m.Threads))) + buf.EncodeUint8(uint8(len(m.Threads))) for i := 0; i < len(m.Threads); i++ { var x uint32 if i < len(m.Threads) { @@ -2292,7 +2752,7 @@ func (m *SwInterfaceSetTxPlacement) Unmarshal(b []byte) error { buf := codec.NewBuffer(b) m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) m.QueueID = buf.DecodeUint32() - m.ArraySize = buf.DecodeUint32() + m.ArraySize = buf.DecodeUint8() m.Threads = make([]uint32, m.ArraySize) for i := 0; i < len(m.Threads); i++ { m.Threads[i] = buf.DecodeUint32() @@ -2335,6 +2795,11 @@ func (m *SwInterfaceSetTxPlacementReply) Unmarshal(b []byte) error { return nil } +// Set unnumbered interface add / del request +// - sw_if_index - interface with an IP address +// - unnumbered_sw_if_index - interface which will use the address +// - is_add - if non-zero set the association, else unset it +// // SwInterfaceSetUnnumbered defines message 'sw_interface_set_unnumbered'. type SwInterfaceSetUnnumbered struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2411,6 +2876,11 @@ func (m *SwInterfaceSetUnnumberedReply) Unmarshal(b []byte) error { return nil } +// Set / clear software interface tag +// - sw_if_index - the interface +// - add_del - 1 = add, 0 = delete +// - tag - an ascii tag +// // SwInterfaceTagAddDel defines message 'sw_interface_tag_add_del'. type SwInterfaceTagAddDel struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -2485,6 +2955,20 @@ func (m *SwInterfaceTagAddDelReply) Unmarshal(b []byte) error { return nil } +// show the interface's queue - thread placement +// +// This api is used to display the interface and queue worker +// thread placement. One message per tx-queue per interface will +// be sent to client. +// Each message will contain information about tx-queue id of an +// interface, interface index, thread on which this tx-queue is +// placed and mode of tx-queue. +// - sw_if_index - the interface whose tx-placement will be dumped +// - queue_id - the queue id +// - shared - the queue is shared on other threads +// - array_size - the size of the threads array +// - threads - the main and worker(s) thread index(es) whom tx-placement are at. +// // SwInterfaceTxPlacementDetails defines message 'sw_interface_tx_placement_details'. type SwInterfaceTxPlacementDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2545,6 +3029,13 @@ func (m *SwInterfaceTxPlacementDetails) Unmarshal(b []byte) error { return nil } +// get the tx queue placement of interface(s) +// - cursor - optional, it allows client to continue a dump +// - sw_if_index - optional interface index for which queue placement to +// be requested. sw_if_index = ~0 will get the placement information for all +// interfaces. It will not get information related to sub-interfaces, p2p +// and pipe interfaces. +// // SwInterfaceTxPlacementGet defines message 'sw_interface_tx_placement_get'. type SwInterfaceTxPlacementGet struct { Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` @@ -2621,6 +3112,10 @@ func (m *SwInterfaceTxPlacementGetReply) Unmarshal(b []byte) error { return nil } +// Register for interface events +// - enable_disable - 1 => register for events, 0 => cancel registration +// - pid - sender's pid +// // WantInterfaceEvents defines message 'want_interface_events'. type WantInterfaceEvents struct { EnableDisable uint32 `binapi:"u32,name=enable_disable" json:"enable_disable,omitempty"` @@ -2713,6 +3208,12 @@ func file_interfaces_binapi_init() { api.RegisterMessage((*HwInterfaceSetMtuReply)(nil), "hw_interface_set_mtu_reply_e8d4e804") api.RegisterMessage((*InterfaceNameRenumber)(nil), "interface_name_renumber_2b8858b8") api.RegisterMessage((*InterfaceNameRenumberReply)(nil), "interface_name_renumber_reply_e8d4e804") + api.RegisterMessage((*PcapSetFilterFunction)(nil), "pcap_set_filter_function_616abb92") + api.RegisterMessage((*PcapSetFilterFunctionReply)(nil), "pcap_set_filter_function_reply_e8d4e804") + api.RegisterMessage((*PcapTraceOff)(nil), "pcap_trace_off_51077d14") + api.RegisterMessage((*PcapTraceOffReply)(nil), "pcap_trace_off_reply_e8d4e804") + api.RegisterMessage((*PcapTraceOn)(nil), "pcap_trace_on_cb39e968") + api.RegisterMessage((*PcapTraceOnReply)(nil), "pcap_trace_on_reply_e8d4e804") api.RegisterMessage((*SwInterfaceAddDelAddress)(nil), "sw_interface_add_del_address_5463d73b") api.RegisterMessage((*SwInterfaceAddDelAddressReply)(nil), "sw_interface_add_del_address_reply_e8d4e804") api.RegisterMessage((*SwInterfaceAddDelMacAddress)(nil), "sw_interface_add_del_mac_address_638bb9f4") @@ -2750,7 +3251,7 @@ func file_interfaces_binapi_init() { api.RegisterMessage((*SwInterfaceSetRxPlacementReply)(nil), "sw_interface_set_rx_placement_reply_e8d4e804") api.RegisterMessage((*SwInterfaceSetTable)(nil), "sw_interface_set_table_df42a577") api.RegisterMessage((*SwInterfaceSetTableReply)(nil), "sw_interface_set_table_reply_e8d4e804") - api.RegisterMessage((*SwInterfaceSetTxPlacement)(nil), "sw_interface_set_tx_placement_4e0cd5ff") + api.RegisterMessage((*SwInterfaceSetTxPlacement)(nil), "sw_interface_set_tx_placement_0b855b40") api.RegisterMessage((*SwInterfaceSetTxPlacementReply)(nil), "sw_interface_set_tx_placement_reply_e8d4e804") api.RegisterMessage((*SwInterfaceSetUnnumbered)(nil), "sw_interface_set_unnumbered_154a6439") api.RegisterMessage((*SwInterfaceSetUnnumberedReply)(nil), "sw_interface_set_unnumbered_reply_e8d4e804") @@ -2786,6 +3287,12 @@ func AllMessages() []api.Message { (*HwInterfaceSetMtuReply)(nil), (*InterfaceNameRenumber)(nil), (*InterfaceNameRenumberReply)(nil), + (*PcapSetFilterFunction)(nil), + (*PcapSetFilterFunctionReply)(nil), + (*PcapTraceOff)(nil), + (*PcapTraceOffReply)(nil), + (*PcapTraceOn)(nil), + (*PcapTraceOnReply)(nil), (*SwInterfaceAddDelAddress)(nil), (*SwInterfaceAddDelAddressReply)(nil), (*SwInterfaceAddDelMacAddress)(nil), diff --git a/binapi/interface/interface_rpc.ba.go b/binapi/interface/interface_rpc.ba.go index f51316fa..28f27996 100644 --- a/binapi/interface/interface_rpc.ba.go +++ b/binapi/interface/interface_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service interface. @@ -23,6 +23,9 @@ type RPCService interface { GetBuffersStats(ctx context.Context, in *GetBuffersStats) (*GetBuffersStatsReply, error) HwInterfaceSetMtu(ctx context.Context, in *HwInterfaceSetMtu) (*HwInterfaceSetMtuReply, error) InterfaceNameRenumber(ctx context.Context, in *InterfaceNameRenumber) (*InterfaceNameRenumberReply, error) + PcapSetFilterFunction(ctx context.Context, in *PcapSetFilterFunction) (*PcapSetFilterFunctionReply, error) + PcapTraceOff(ctx context.Context, in *PcapTraceOff) (*PcapTraceOffReply, error) + PcapTraceOn(ctx context.Context, in *PcapTraceOn) (*PcapTraceOnReply, error) SwInterfaceAddDelAddress(ctx context.Context, in *SwInterfaceAddDelAddress) (*SwInterfaceAddDelAddressReply, error) SwInterfaceAddDelMacAddress(ctx context.Context, in *SwInterfaceAddDelMacAddress) (*SwInterfaceAddDelMacAddressReply, error) SwInterfaceAddressReplaceBegin(ctx context.Context, in *SwInterfaceAddressReplaceBegin) (*SwInterfaceAddressReplaceBeginReply, error) @@ -146,6 +149,33 @@ func (c *serviceClient) InterfaceNameRenumber(ctx context.Context, in *Interface return out, api.RetvalToVPPApiError(out.Retval) } +func (c *serviceClient) PcapSetFilterFunction(ctx context.Context, in *PcapSetFilterFunction) (*PcapSetFilterFunctionReply, error) { + out := new(PcapSetFilterFunctionReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + +func (c *serviceClient) PcapTraceOff(ctx context.Context, in *PcapTraceOff) (*PcapTraceOffReply, error) { + out := new(PcapTraceOffReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + +func (c *serviceClient) PcapTraceOn(ctx context.Context, in *PcapTraceOn) (*PcapTraceOnReply, error) { + out := new(PcapTraceOnReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + func (c *serviceClient) SwInterfaceAddDelAddress(ctx context.Context, in *SwInterfaceAddDelAddress) (*SwInterfaceAddDelAddressReply, error) { out := new(SwInterfaceAddDelAddressReply) err := c.conn.Invoke(ctx, in, out) @@ -416,7 +446,7 @@ func (c *serviceClient) SwInterfaceTxPlacementGet(ctx context.Context, in *SwInt } type RPCService_SwInterfaceTxPlacementGetClient interface { - Recv() (*SwInterfaceTxPlacementDetails, error) + Recv() (*SwInterfaceTxPlacementDetails, *SwInterfaceTxPlacementGetReply, error) api.Stream } @@ -424,22 +454,26 @@ type serviceClient_SwInterfaceTxPlacementGetClient struct { api.Stream } -func (c *serviceClient_SwInterfaceTxPlacementGetClient) Recv() (*SwInterfaceTxPlacementDetails, error) { +func (c *serviceClient_SwInterfaceTxPlacementGetClient) Recv() (*SwInterfaceTxPlacementDetails, *SwInterfaceTxPlacementGetReply, error) { msg, err := c.Stream.RecvMsg() if err != nil { - return nil, err + return nil, nil, err } switch m := msg.(type) { case *SwInterfaceTxPlacementDetails: - return m, nil + return m, nil, nil case *SwInterfaceTxPlacementGetReply: + if err := api.RetvalToVPPApiError(m.Retval); err != nil { + c.Stream.Close() + return nil, m, err + } err = c.Stream.Close() if err != nil { - return nil, err + return nil, m, err } - return nil, io.EOF + return nil, m, io.EOF default: - return nil, fmt.Errorf("unexpected message: %T %v", m, m) + return nil, nil, fmt.Errorf("unexpected message: %T %v", m, m) } } diff --git a/binapi/interface_types/interface_types.ba.go b/binapi/interface_types/interface_types.ba.go index 11019194..16dd47c0 100644 --- a/binapi/interface_types/interface_types.ba.go +++ b/binapi/interface_types/interface_types.ba.go @@ -1,21 +1,20 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/interface_types.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/interface_types.api.json // Package interface_types contains generated bindings for API file interface_types.api. // // Contents: -// -// 1 alias -// 7 enums +// - 1 alias +// - 7 enums package interface_types import ( "strconv" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // This is a compile-time assertion to ensure that this generated file @@ -24,6 +23,12 @@ import ( // GoVPP api package needs to be updated. const _ = api.GoVppAPIPackageIsVersion2 +const ( + APIFile = "interface_types" + APIVersion = "1.0.0" + VersionCrc = 0x7f2ba79a +) + // Direction defines enum 'direction'. type Direction uint8 diff --git a/binapi/ioam_cache/ioam_cache.ba.go b/binapi/ioam_cache/ioam_cache.ba.go index 8aac1ee0..e006989d 100644 --- a/binapi/ioam_cache/ioam_cache.ba.go +++ b/binapi/ioam_cache/ioam_cache.ba.go @@ -1,19 +1,18 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/ioam_cache.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/ioam_cache.api.json // Package ioam_cache contains generated bindings for API file ioam_cache.api. // // Contents: -// -// 2 messages +// - 2 messages package ioam_cache import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -28,6 +27,7 @@ const ( VersionCrc = 0xd0a0cf20 ) +// /* API to control ioam caching // IoamCacheIP6EnableDisable defines message 'ioam_cache_ip6_enable_disable'. type IoamCacheIP6EnableDisable struct { IsDisable bool `binapi:"bool,name=is_disable" json:"is_disable,omitempty"` diff --git a/binapi/ioam_cache/ioam_cache_rpc.ba.go b/binapi/ioam_cache/ioam_cache_rpc.ba.go index 98473650..619181ac 100644 --- a/binapi/ioam_cache/ioam_cache_rpc.ba.go +++ b/binapi/ioam_cache/ioam_cache_rpc.ba.go @@ -5,7 +5,7 @@ package ioam_cache import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service ioam_cache. diff --git a/binapi/ioam_export/ioam_export.ba.go b/binapi/ioam_export/ioam_export.ba.go index 2918abfa..70b0727a 100644 --- a/binapi/ioam_export/ioam_export.ba.go +++ b/binapi/ioam_export/ioam_export.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/ioam_export.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/ioam_export.api.json // Package ioam_export contains generated bindings for API file ioam_export.api. // // Contents: -// -// 2 messages +// - 2 messages package ioam_export import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,6 +28,7 @@ const ( VersionCrc = 0x26bebf64 ) +// /* Define a simple binary API to control the feature // IoamExportIP6EnableDisable defines message 'ioam_export_ip6_enable_disable'. type IoamExportIP6EnableDisable struct { IsDisable bool `binapi:"bool,name=is_disable" json:"is_disable,omitempty"` diff --git a/binapi/ioam_export/ioam_export_rpc.ba.go b/binapi/ioam_export/ioam_export_rpc.ba.go index 0e0da2e1..32170e8d 100644 --- a/binapi/ioam_export/ioam_export_rpc.ba.go +++ b/binapi/ioam_export/ioam_export_rpc.ba.go @@ -5,7 +5,7 @@ package ioam_export import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service ioam_export. diff --git a/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go b/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go index 43243a70..23f23ece 100644 --- a/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go +++ b/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/ioam_vxlan_gpe.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/ioam_vxlan_gpe.api.json // Package ioam_vxlan_gpe contains generated bindings for API file ioam_vxlan_gpe.api. // // Contents: -// -// 12 messages +// - 12 messages package ioam_vxlan_gpe import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,6 +28,9 @@ const ( VersionCrc = 0xb49eb0b9 ) +// iOAM for VxLAN-GPE disable +// - id - profile id +// // VxlanGpeIoamDisable defines message 'vxlan_gpe_ioam_disable'. type VxlanGpeIoamDisable struct { ID uint16 `binapi:"u16,name=id" json:"id,omitempty"` @@ -95,6 +97,12 @@ func (m *VxlanGpeIoamDisableReply) Unmarshal(b []byte) error { return nil } +// iOAM Over VxLAN-GPE - Set iOAM transport for VxLAN-GPE +// - id - profile id +// - trace_ppc - Trace PPC (none/encap/decap) +// - pow_enable - Proof of Work enabled or not flag +// - trace_enable - iOAM Trace enabled or not flag +// // VxlanGpeIoamEnable defines message 'vxlan_gpe_ioam_enable'. type VxlanGpeIoamEnable struct { ID uint16 `binapi:"u16,name=id" json:"id,omitempty"` @@ -173,6 +181,10 @@ func (m *VxlanGpeIoamEnableReply) Unmarshal(b []byte) error { return nil } +// Disable iOAM for VXLAN-GPE transit +// - dst_addr - IPv4/6 Address of the local VTEP +// - outer_fib_index- FIB index +// // VxlanGpeIoamTransitDisable defines message 'vxlan_gpe_ioam_transit_disable'. type VxlanGpeIoamTransitDisable struct { OuterFibIndex uint32 `binapi:"u32,name=outer_fib_index" json:"outer_fib_index,omitempty"` @@ -248,6 +260,10 @@ func (m *VxlanGpeIoamTransitDisableReply) Unmarshal(b []byte) error { return nil } +// Enable iOAM for a VXLAN-GPE transit +// - dst_addr - IPv4/6 Address of the local VTEP +// - outer_fib_index- FIB index +// // VxlanGpeIoamTransitEnable defines message 'vxlan_gpe_ioam_transit_enable'. type VxlanGpeIoamTransitEnable struct { OuterFibIndex uint32 `binapi:"u32,name=outer_fib_index" json:"outer_fib_index,omitempty"` @@ -323,6 +339,11 @@ func (m *VxlanGpeIoamTransitEnableReply) Unmarshal(b []byte) error { return nil } +// Disable iOAM for a VNI (VXLAN-GPE) +// - vni - VXLAN-GPE VNI +// - local - IPv4/6 Address of the local VTEP +// - remote - IPv4/6 Address of the remote VTEP +// // VxlanGpeIoamVniDisable defines message 'vxlan_gpe_ioam_vni_disable'. type VxlanGpeIoamVniDisable struct { Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` @@ -405,6 +426,11 @@ func (m *VxlanGpeIoamVniDisableReply) Unmarshal(b []byte) error { return nil } +// Enable iOAM for a VNI (VXLAN-GPE) +// - vni - VXLAN-GPE VNI +// - local - IPv4/6 Address of the local VTEP +// - remote - IPv4/6 Address of the remote VTEP +// // VxlanGpeIoamVniEnable defines message 'vxlan_gpe_ioam_vni_enable'. type VxlanGpeIoamVniEnable struct { Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` diff --git a/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe_rpc.ba.go b/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe_rpc.ba.go index 19bdbb2a..eec10c7d 100644 --- a/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe_rpc.ba.go +++ b/binapi/ioam_vxlan_gpe/ioam_vxlan_gpe_rpc.ba.go @@ -5,7 +5,7 @@ package ioam_vxlan_gpe import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service ioam_vxlan_gpe. diff --git a/binapi/ip/ip.ba.go b/binapi/ip/ip.ba.go index c9789aae..b0aad40a 100644 --- a/binapi/ip/ip.ba.go +++ b/binapi/ip/ip.ba.go @@ -1,28 +1,27 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/ip.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/ip.api.json // Package ip contains generated bindings for API file ip.api. // // Contents: -// -// 2 enums -// 7 structs -// 91 messages +// - 3 enums +// - 7 structs +// - 93 messages package ip import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" _ "github.com/networkservicemesh/govpp/binapi/ethernet_types" fib_types "github.com/networkservicemesh/govpp/binapi/fib_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" mfib_types "github.com/networkservicemesh/govpp/binapi/mfib_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -34,7 +33,7 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "ip" APIVersion = "3.2.0" - VersionCrc = 0x41299705 + VersionCrc = 0xbd2f873b ) // IPReassType defines enum 'ip_reass_type'. @@ -128,6 +127,73 @@ func (x IPFlowHashConfig) String() string { return s } +// IPFlowHashConfigV2 defines enum 'ip_flow_hash_config_v2'. +type IPFlowHashConfigV2 uint32 + +const ( + IP_API_V2_FLOW_HASH_SRC_IP IPFlowHashConfigV2 = 1 + IP_API_V2_FLOW_HASH_DST_IP IPFlowHashConfigV2 = 2 + IP_API_V2_FLOW_HASH_SRC_PORT IPFlowHashConfigV2 = 4 + IP_API_V2_FLOW_HASH_DST_PORT IPFlowHashConfigV2 = 8 + IP_API_V2_FLOW_HASH_PROTO IPFlowHashConfigV2 = 16 + IP_API_V2_FLOW_HASH_REVERSE IPFlowHashConfigV2 = 32 + IP_API_V2_FLOW_HASH_SYMETRIC IPFlowHashConfigV2 = 64 + IP_API_V2_FLOW_HASH_FLOW_LABEL IPFlowHashConfigV2 = 128 + IP_API_V2_FLOW_HASH_GTPV1_TEID IPFlowHashConfigV2 = 256 +) + +var ( + IPFlowHashConfigV2_name = map[uint32]string{ + 1: "IP_API_V2_FLOW_HASH_SRC_IP", + 2: "IP_API_V2_FLOW_HASH_DST_IP", + 4: "IP_API_V2_FLOW_HASH_SRC_PORT", + 8: "IP_API_V2_FLOW_HASH_DST_PORT", + 16: "IP_API_V2_FLOW_HASH_PROTO", + 32: "IP_API_V2_FLOW_HASH_REVERSE", + 64: "IP_API_V2_FLOW_HASH_SYMETRIC", + 128: "IP_API_V2_FLOW_HASH_FLOW_LABEL", + 256: "IP_API_V2_FLOW_HASH_GTPV1_TEID", + } + IPFlowHashConfigV2_value = map[string]uint32{ + "IP_API_V2_FLOW_HASH_SRC_IP": 1, + "IP_API_V2_FLOW_HASH_DST_IP": 2, + "IP_API_V2_FLOW_HASH_SRC_PORT": 4, + "IP_API_V2_FLOW_HASH_DST_PORT": 8, + "IP_API_V2_FLOW_HASH_PROTO": 16, + "IP_API_V2_FLOW_HASH_REVERSE": 32, + "IP_API_V2_FLOW_HASH_SYMETRIC": 64, + "IP_API_V2_FLOW_HASH_FLOW_LABEL": 128, + "IP_API_V2_FLOW_HASH_GTPV1_TEID": 256, + } +) + +func (x IPFlowHashConfigV2) String() string { + s, ok := IPFlowHashConfigV2_name[uint32(x)] + if ok { + return s + } + str := func(n uint32) string { + s, ok := IPFlowHashConfigV2_name[uint32(n)] + if ok { + return s + } + return "IPFlowHashConfigV2(" + strconv.Itoa(int(n)) + ")" + } + for i := uint32(0); i <= 32; i++ { + val := uint32(x) + if val&(1< register for events, 0 => cancel registration +// - pid - sender's pid +// // WantIP6RaEvents defines message 'want_ip6_ra_events'. type WantIP6RaEvents struct { Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` @@ -750,6 +1104,8 @@ func file_ip6_nd_binapi_init() { api.RegisterMessage((*IP6ndSendRouterSolicitationReply)(nil), "ip6nd_send_router_solicitation_reply_e8d4e804") api.RegisterMessage((*SwInterfaceIP6ndRaConfig)(nil), "sw_interface_ip6nd_ra_config_3eb00b1c") api.RegisterMessage((*SwInterfaceIP6ndRaConfigReply)(nil), "sw_interface_ip6nd_ra_config_reply_e8d4e804") + api.RegisterMessage((*SwInterfaceIP6ndRaDetails)(nil), "sw_interface_ip6nd_ra_details_d3198de5") + api.RegisterMessage((*SwInterfaceIP6ndRaDump)(nil), "sw_interface_ip6nd_ra_dump_f9e6675e") api.RegisterMessage((*SwInterfaceIP6ndRaPrefix)(nil), "sw_interface_ip6nd_ra_prefix_82cc1b28") api.RegisterMessage((*SwInterfaceIP6ndRaPrefixReply)(nil), "sw_interface_ip6nd_ra_prefix_reply_e8d4e804") api.RegisterMessage((*WantIP6RaEvents)(nil), "want_ip6_ra_events_3ec6d6c2") @@ -770,6 +1126,8 @@ func AllMessages() []api.Message { (*IP6ndSendRouterSolicitationReply)(nil), (*SwInterfaceIP6ndRaConfig)(nil), (*SwInterfaceIP6ndRaConfigReply)(nil), + (*SwInterfaceIP6ndRaDetails)(nil), + (*SwInterfaceIP6ndRaDump)(nil), (*SwInterfaceIP6ndRaPrefix)(nil), (*SwInterfaceIP6ndRaPrefixReply)(nil), (*WantIP6RaEvents)(nil), diff --git a/binapi/ip6_nd/ip6_nd_rpc.ba.go b/binapi/ip6_nd/ip6_nd_rpc.ba.go index 625ab34d..ff3a8192 100644 --- a/binapi/ip6_nd/ip6_nd_rpc.ba.go +++ b/binapi/ip6_nd/ip6_nd_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service ip6_nd. @@ -18,6 +18,7 @@ type RPCService interface { IP6ndProxyEnableDisable(ctx context.Context, in *IP6ndProxyEnableDisable) (*IP6ndProxyEnableDisableReply, error) IP6ndSendRouterSolicitation(ctx context.Context, in *IP6ndSendRouterSolicitation) (*IP6ndSendRouterSolicitationReply, error) SwInterfaceIP6ndRaConfig(ctx context.Context, in *SwInterfaceIP6ndRaConfig) (*SwInterfaceIP6ndRaConfigReply, error) + SwInterfaceIP6ndRaDump(ctx context.Context, in *SwInterfaceIP6ndRaDump) (RPCService_SwInterfaceIP6ndRaDumpClient, error) SwInterfaceIP6ndRaPrefix(ctx context.Context, in *SwInterfaceIP6ndRaPrefix) (*SwInterfaceIP6ndRaPrefixReply, error) WantIP6RaEvents(ctx context.Context, in *WantIP6RaEvents) (*WantIP6RaEventsReply, error) } @@ -109,6 +110,49 @@ func (c *serviceClient) SwInterfaceIP6ndRaConfig(ctx context.Context, in *SwInte return out, api.RetvalToVPPApiError(out.Retval) } +func (c *serviceClient) SwInterfaceIP6ndRaDump(ctx context.Context, in *SwInterfaceIP6ndRaDump) (RPCService_SwInterfaceIP6ndRaDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_SwInterfaceIP6ndRaDumpClient{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_SwInterfaceIP6ndRaDumpClient interface { + Recv() (*SwInterfaceIP6ndRaDetails, error) + api.Stream +} + +type serviceClient_SwInterfaceIP6ndRaDumpClient struct { + api.Stream +} + +func (c *serviceClient_SwInterfaceIP6ndRaDumpClient) Recv() (*SwInterfaceIP6ndRaDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *SwInterfaceIP6ndRaDetails: + return m, nil + 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) SwInterfaceIP6ndRaPrefix(ctx context.Context, in *SwInterfaceIP6ndRaPrefix) (*SwInterfaceIP6ndRaPrefixReply, error) { out := new(SwInterfaceIP6ndRaPrefixReply) err := c.conn.Invoke(ctx, in, out) diff --git a/binapi/ip_neighbor/ip_neighbor.ba.go b/binapi/ip_neighbor/ip_neighbor.ba.go index 5d40d1b7..645667bf 100644 --- a/binapi/ip_neighbor/ip_neighbor.ba.go +++ b/binapi/ip_neighbor/ip_neighbor.ba.go @@ -1,26 +1,25 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/ip_neighbor.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/ip_neighbor.api.json // Package ip_neighbor contains generated bindings for API file ip_neighbor.api. // // Contents: -// -// 2 enums -// 1 struct -// 18 messages +// - 2 enums +// - 1 struct +// - 20 messages package ip_neighbor import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ethernet_types "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -31,8 +30,8 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "ip_neighbor" - APIVersion = "1.0.0" - VersionCrc = 0xfde4a69a + APIVersion = "1.0.1" + VersionCrc = 0x36db39bd ) // IPNeighborEventFlags defines enum 'ip_neighbor_event_flags'. @@ -138,6 +137,10 @@ type IPNeighbor struct { IPAddress ip_types.Address `binapi:"address,name=ip_address" json:"ip_address,omitempty"` } +// IP neighbor add / del request +// - is_add - 1 to add neighbor, 0 to delete +// - neighbor - the neighbor to add/remove +// // IPNeighborAddDel defines message 'ip_neighbor_add_del'. type IPNeighborAddDel struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -187,6 +190,10 @@ func (m *IPNeighborAddDel) Unmarshal(b []byte) error { return nil } +// IP neighbor add / del reply +// - retval - return value +// - stats_index - the index to use for this neighbor in the stats segment +// // IPNeighborAddDelReply defines message 'ip_neighbor_add_del_reply'. type IPNeighborAddDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -224,6 +231,16 @@ func (m *IPNeighborAddDelReply) Unmarshal(b []byte) error { return nil } +// Enable/disable periodic IP neighbor scan +// - af - Address family v4/v6 +// - max_number - The maximum number of neighbours that will be created. +// default 50k +// - max_age - The maximum age (in seconds) before an inactive neighbour +// is flushed +// default 0 => never +// - recycle - If max_number of neighbours is reached and new ones need +// to be created should the oldest neighbour be 'recycled'. +// // IPNeighborConfig defines message 'ip_neighbor_config'. type IPNeighborConfig struct { Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"` @@ -269,6 +286,102 @@ func (m *IPNeighborConfig) Unmarshal(b []byte) error { return nil } +// Get neighbor database configuration per AF +// - af - Address family (v4/v6) +// +// IPNeighborConfigGet defines message 'ip_neighbor_config_get'. +// InProgress: the message form may change in the future versions +type IPNeighborConfigGet struct { + Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"` +} + +func (m *IPNeighborConfigGet) Reset() { *m = IPNeighborConfigGet{} } +func (*IPNeighborConfigGet) GetMessageName() string { return "ip_neighbor_config_get" } +func (*IPNeighborConfigGet) GetCrcString() string { return "a5db7bf7" } +func (*IPNeighborConfigGet) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPNeighborConfigGet) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.Af + return size +} +func (m *IPNeighborConfigGet) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint8(uint8(m.Af)) + return buf.Bytes(), nil +} +func (m *IPNeighborConfigGet) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Af = ip_types.AddressFamily(buf.DecodeUint8()) + return nil +} + +// Neighbor database configuration reply +// - retval - error (0 is "no error") +// - af - Address family (v4/v6) +// - max_number - The maximum number of neighbours that will be created +// - max_age - The maximum age (in seconds) before an inactive neighbour +// is flushed +// - recycle - If max_number of neighbours is reached and new ones need +// to be created, should the oldest neighbour be 'recycled' +// +// IPNeighborConfigGetReply defines message 'ip_neighbor_config_get_reply'. +// InProgress: the message form may change in the future versions +type IPNeighborConfigGetReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"` + MaxNumber uint32 `binapi:"u32,name=max_number" json:"max_number,omitempty"` + MaxAge uint32 `binapi:"u32,name=max_age" json:"max_age,omitempty"` + Recycle bool `binapi:"bool,name=recycle" json:"recycle,omitempty"` +} + +func (m *IPNeighborConfigGetReply) Reset() { *m = IPNeighborConfigGetReply{} } +func (*IPNeighborConfigGetReply) GetMessageName() string { return "ip_neighbor_config_get_reply" } +func (*IPNeighborConfigGetReply) GetCrcString() string { return "798e6fdd" } +func (*IPNeighborConfigGetReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPNeighborConfigGetReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 1 // m.Af + size += 4 // m.MaxNumber + size += 4 // m.MaxAge + size += 1 // m.Recycle + return size +} +func (m *IPNeighborConfigGetReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint8(uint8(m.Af)) + buf.EncodeUint32(m.MaxNumber) + buf.EncodeUint32(m.MaxAge) + buf.EncodeBool(m.Recycle) + return buf.Bytes(), nil +} +func (m *IPNeighborConfigGetReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.Af = ip_types.AddressFamily(buf.DecodeUint8()) + m.MaxNumber = buf.DecodeUint32() + m.MaxAge = buf.DecodeUint32() + m.Recycle = buf.DecodeBool() + return nil +} + // IPNeighborConfigReply defines message 'ip_neighbor_config_reply'. type IPNeighborConfigReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -302,6 +415,10 @@ func (m *IPNeighborConfigReply) Unmarshal(b []byte) error { return nil } +// IP neighbors dump response +// - age - time between last update and sending this message, in seconds +// - neighbour - the neighbor +// // IPNeighborDetails defines message 'ip_neighbor_details'. type IPNeighborDetails struct { Age float64 `binapi:"f64,name=age" json:"age,omitempty"` @@ -351,6 +468,10 @@ func (m *IPNeighborDetails) Unmarshal(b []byte) error { return nil } +// Dump IP neighbors +// - sw_if_index - the interface to dump neighbors, ~0 == all +// - af - address family is ipv[6|4] +// // IPNeighborDump defines message 'ip_neighbor_dump'. type IPNeighborDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` @@ -388,6 +509,12 @@ func (m *IPNeighborDump) Unmarshal(b []byte) error { return nil } +// Tell client about an IP4 ARP resolution event or +// +// MAC/IP info from ARP requests in L2 BDs +// - pid - client pid registered to receive notification +// - neighbor - new neighbor created +// // IPNeighborEvent defines message 'ip_neighbor_event'. // Deprecated: the message will be removed in the future versions type IPNeighborEvent struct { @@ -438,6 +565,13 @@ func (m *IPNeighborEvent) Unmarshal(b []byte) error { return nil } +// Tell client about an IP4 ARP resolution event or +// +// MAC/IP info from ARP requests in L2 BDs +// - pid - client pid registered to receive notification +// - flags - Flags +// - neighbor - neighbor +// // IPNeighborEventV2 defines message 'ip_neighbor_event_v2'. type IPNeighborEventV2 struct { PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` @@ -491,6 +625,12 @@ func (m *IPNeighborEventV2) Unmarshal(b []byte) error { return nil } +// IP neighbor flush request - removes *all* neighbours. +// +// dynamic and static from API/CLI and dynamic from data-plane. +// - af - Flush neighbours of this address family +// - sw_if_index - Flush on this interface (~0 => all interfaces) +// // IPNeighborFlush defines message 'ip_neighbor_flush'. type IPNeighborFlush struct { Af ip_types.AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"` @@ -561,6 +701,21 @@ func (m *IPNeighborFlushReply) Unmarshal(b []byte) error { return nil } +// IP neighbour replace begin +// +// The use-case is that, for some unspecified reason, the control plane +// has a different set of neighbours it than VPP +// currently has. The CP would thus like to 'replace' VPP's set +// only by specifying what the new set shall be, i.e. it is not +// going to delete anything that already exists, rather, it wants any +// unspecified neighbors deleted implicitly. +// The CP declares the start of this procedure with this replace_begin +// API Call, and when it has populated all neighbours it wants, it calls +// the below replace_end API. From this point on it is of course free +// to add and delete neighbours as usual. +// The underlying mechanism by which VPP implements this replace is +// intentionally left unspecified. +// // IPNeighborReplaceBegin defines message 'ip_neighbor_replace_begin'. type IPNeighborReplaceBegin struct{} @@ -621,6 +776,10 @@ func (m *IPNeighborReplaceBeginReply) Unmarshal(b []byte) error { return nil } +// IP neighbour replace end +// +// see ip_neighbor_replace_begin description. +// // IPNeighborReplaceEnd defines message 'ip_neighbor_replace_end'. type IPNeighborReplaceEnd struct{} @@ -681,6 +840,12 @@ func (m *IPNeighborReplaceEndReply) Unmarshal(b []byte) error { return nil } +// Register for IP neighbour events creation +// - enable - 1 => register for events, 0 => cancel registration +// - pid - sender's pid +// - ip - exact IP address of interested neighbor resolution event +// - sw_if_index - interface on which the IP address is present. +// // WantIPNeighborEvents defines message 'want_ip_neighbor_events'. // Deprecated: the message will be removed in the future versions type WantIPNeighborEvents struct { @@ -764,6 +929,12 @@ func (m *WantIPNeighborEventsReply) Unmarshal(b []byte) error { return nil } +// Register for IP neighbour events (creation or deletion) +// - enable - 1 => register for events, 0 => cancel registration +// - pid - sender's pid +// - ip - exact IP address of interested neighbor resolution event +// - sw_if_index - interface on which the IP address is present. +// // WantIPNeighborEventsV2 defines message 'want_ip_neighbor_events_v2'. type WantIPNeighborEventsV2 struct { Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` @@ -852,6 +1023,8 @@ func file_ip_neighbor_binapi_init() { api.RegisterMessage((*IPNeighborAddDel)(nil), "ip_neighbor_add_del_0607c257") api.RegisterMessage((*IPNeighborAddDelReply)(nil), "ip_neighbor_add_del_reply_1992deab") api.RegisterMessage((*IPNeighborConfig)(nil), "ip_neighbor_config_f4a5cf44") + api.RegisterMessage((*IPNeighborConfigGet)(nil), "ip_neighbor_config_get_a5db7bf7") + api.RegisterMessage((*IPNeighborConfigGetReply)(nil), "ip_neighbor_config_get_reply_798e6fdd") api.RegisterMessage((*IPNeighborConfigReply)(nil), "ip_neighbor_config_reply_e8d4e804") api.RegisterMessage((*IPNeighborDetails)(nil), "ip_neighbor_details_e29d79f0") api.RegisterMessage((*IPNeighborDump)(nil), "ip_neighbor_dump_d817a484") @@ -875,6 +1048,8 @@ func AllMessages() []api.Message { (*IPNeighborAddDel)(nil), (*IPNeighborAddDelReply)(nil), (*IPNeighborConfig)(nil), + (*IPNeighborConfigGet)(nil), + (*IPNeighborConfigGetReply)(nil), (*IPNeighborConfigReply)(nil), (*IPNeighborDetails)(nil), (*IPNeighborDump)(nil), diff --git a/binapi/ip_neighbor/ip_neighbor_rpc.ba.go b/binapi/ip_neighbor/ip_neighbor_rpc.ba.go index ec1fb4ee..902b3612 100644 --- a/binapi/ip_neighbor/ip_neighbor_rpc.ba.go +++ b/binapi/ip_neighbor/ip_neighbor_rpc.ba.go @@ -7,14 +7,15 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service ip_neighbor. type RPCService interface { IPNeighborAddDel(ctx context.Context, in *IPNeighborAddDel) (*IPNeighborAddDelReply, error) IPNeighborConfig(ctx context.Context, in *IPNeighborConfig) (*IPNeighborConfigReply, error) + IPNeighborConfigGet(ctx context.Context, in *IPNeighborConfigGet) (*IPNeighborConfigGetReply, error) IPNeighborDump(ctx context.Context, in *IPNeighborDump) (RPCService_IPNeighborDumpClient, error) IPNeighborFlush(ctx context.Context, in *IPNeighborFlush) (*IPNeighborFlushReply, error) IPNeighborReplaceBegin(ctx context.Context, in *IPNeighborReplaceBegin) (*IPNeighborReplaceBeginReply, error) @@ -49,6 +50,15 @@ func (c *serviceClient) IPNeighborConfig(ctx context.Context, in *IPNeighborConf return out, api.RetvalToVPPApiError(out.Retval) } +func (c *serviceClient) IPNeighborConfigGet(ctx context.Context, in *IPNeighborConfigGet) (*IPNeighborConfigGetReply, error) { + out := new(IPNeighborConfigGetReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + func (c *serviceClient) IPNeighborDump(ctx context.Context, in *IPNeighborDump) (RPCService_IPNeighborDumpClient, error) { stream, err := c.conn.NewStream(ctx) if err != nil { diff --git a/binapi/ip_session_redirect/ip_session_redirect.ba.go b/binapi/ip_session_redirect/ip_session_redirect.ba.go new file mode 100644 index 00000000..0de71f64 --- /dev/null +++ b/binapi/ip_session_redirect/ip_session_redirect.ba.go @@ -0,0 +1,486 @@ +// Code generated by GoVPP's binapi-generator. DO NOT EDIT. +// versions: +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/ip_session_redirect.api.json + +// Package ip_session_redirect contains generated bindings for API file ip_session_redirect.api. +// +// Contents: +// - 6 messages +package ip_session_redirect + +import ( + fib_types "github.com/networkservicemesh/govpp/binapi/fib_types" + _ "github.com/networkservicemesh/govpp/binapi/interface_types" + _ "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + 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 = "ip_session_redirect" + APIVersion = "0.3.0" + VersionCrc = 0xf174f8ba +) + +// Add or update a session redirection +// - table_index - classifier table index +// - opaque_index - classifier session opaque index +// - match_len - classifier session match length in bytes (max is 80-bytes) +// - match - classifier session match +// - is_punt - true = punted traffic, false = forwarded traffic +// - n_paths - number of paths +// - paths - the paths of the redirect +// +// IPSessionRedirectAdd defines message 'ip_session_redirect_add'. +// Deprecated: the message will be removed in the future versions +type IPSessionRedirectAdd struct { + TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"` + MatchLen uint8 `binapi:"u8,name=match_len" json:"match_len,omitempty"` + Match []byte `binapi:"u8[80],name=match" json:"match,omitempty"` + OpaqueIndex uint32 `binapi:"u32,name=opaque_index,default=4294967295" json:"opaque_index,omitempty"` + IsPunt bool `binapi:"bool,name=is_punt" json:"is_punt,omitempty"` + NPaths uint8 `binapi:"u8,name=n_paths" json:"-"` + Paths []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"` +} + +func (m *IPSessionRedirectAdd) Reset() { *m = IPSessionRedirectAdd{} } +func (*IPSessionRedirectAdd) GetMessageName() string { return "ip_session_redirect_add" } +func (*IPSessionRedirectAdd) GetCrcString() string { return "2f78ffda" } +func (*IPSessionRedirectAdd) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPSessionRedirectAdd) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.TableIndex + size += 1 // m.MatchLen + size += 1 * 80 // m.Match + size += 4 // m.OpaqueIndex + size += 1 // m.IsPunt + size += 1 // m.NPaths + for j1 := 0; j1 < len(m.Paths); j1++ { + var s1 fib_types.FibPath + _ = s1 + if j1 < len(m.Paths) { + s1 = m.Paths[j1] + } + size += 4 // s1.SwIfIndex + size += 4 // s1.TableID + size += 4 // s1.RpfID + size += 1 // s1.Weight + size += 1 // s1.Preference + size += 4 // s1.Type + size += 4 // s1.Flags + size += 4 // s1.Proto + size += 1 * 16 // s1.Nh.Address + size += 4 // s1.Nh.ViaLabel + size += 4 // s1.Nh.ObjID + size += 4 // s1.Nh.ClassifyTableIndex + size += 1 // s1.NLabels + for j2 := 0; j2 < 16; j2++ { + size += 1 // s1.LabelStack[j2].IsUniform + size += 4 // s1.LabelStack[j2].Label + size += 1 // s1.LabelStack[j2].TTL + size += 1 // s1.LabelStack[j2].Exp + } + } + return size +} +func (m *IPSessionRedirectAdd) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.TableIndex) + buf.EncodeUint8(m.MatchLen) + buf.EncodeBytes(m.Match, 80) + buf.EncodeUint32(m.OpaqueIndex) + buf.EncodeBool(m.IsPunt) + buf.EncodeUint8(uint8(len(m.Paths))) + for j0 := 0; j0 < len(m.Paths); j0++ { + var v0 fib_types.FibPath // Paths + if j0 < len(m.Paths) { + v0 = m.Paths[j0] + } + buf.EncodeUint32(v0.SwIfIndex) + buf.EncodeUint32(v0.TableID) + buf.EncodeUint32(v0.RpfID) + buf.EncodeUint8(v0.Weight) + buf.EncodeUint8(v0.Preference) + buf.EncodeUint32(uint32(v0.Type)) + buf.EncodeUint32(uint32(v0.Flags)) + buf.EncodeUint32(uint32(v0.Proto)) + buf.EncodeBytes(v0.Nh.Address.XXX_UnionData[:], 16) + buf.EncodeUint32(v0.Nh.ViaLabel) + buf.EncodeUint32(v0.Nh.ObjID) + buf.EncodeUint32(v0.Nh.ClassifyTableIndex) + buf.EncodeUint8(v0.NLabels) + for j1 := 0; j1 < 16; j1++ { + buf.EncodeUint8(v0.LabelStack[j1].IsUniform) + buf.EncodeUint32(v0.LabelStack[j1].Label) + buf.EncodeUint8(v0.LabelStack[j1].TTL) + buf.EncodeUint8(v0.LabelStack[j1].Exp) + } + } + return buf.Bytes(), nil +} +func (m *IPSessionRedirectAdd) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.TableIndex = buf.DecodeUint32() + m.MatchLen = buf.DecodeUint8() + m.Match = make([]byte, 80) + copy(m.Match, buf.DecodeBytes(len(m.Match))) + m.OpaqueIndex = buf.DecodeUint32() + m.IsPunt = buf.DecodeBool() + m.NPaths = buf.DecodeUint8() + m.Paths = make([]fib_types.FibPath, m.NPaths) + for j0 := 0; j0 < len(m.Paths); j0++ { + m.Paths[j0].SwIfIndex = buf.DecodeUint32() + m.Paths[j0].TableID = buf.DecodeUint32() + m.Paths[j0].RpfID = buf.DecodeUint32() + m.Paths[j0].Weight = buf.DecodeUint8() + m.Paths[j0].Preference = buf.DecodeUint8() + m.Paths[j0].Type = fib_types.FibPathType(buf.DecodeUint32()) + m.Paths[j0].Flags = fib_types.FibPathFlags(buf.DecodeUint32()) + m.Paths[j0].Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) + copy(m.Paths[j0].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Paths[j0].Nh.ViaLabel = buf.DecodeUint32() + m.Paths[j0].Nh.ObjID = buf.DecodeUint32() + m.Paths[j0].Nh.ClassifyTableIndex = buf.DecodeUint32() + m.Paths[j0].NLabels = buf.DecodeUint8() + for j1 := 0; j1 < 16; j1++ { + m.Paths[j0].LabelStack[j1].IsUniform = buf.DecodeUint8() + m.Paths[j0].LabelStack[j1].Label = buf.DecodeUint32() + m.Paths[j0].LabelStack[j1].TTL = buf.DecodeUint8() + m.Paths[j0].LabelStack[j1].Exp = buf.DecodeUint8() + } + } + return nil +} + +// IPSessionRedirectAddReply defines message 'ip_session_redirect_add_reply'. +// Deprecated: the message will be removed in the future versions +type IPSessionRedirectAddReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *IPSessionRedirectAddReply) Reset() { *m = IPSessionRedirectAddReply{} } +func (*IPSessionRedirectAddReply) GetMessageName() string { return "ip_session_redirect_add_reply" } +func (*IPSessionRedirectAddReply) GetCrcString() string { return "e8d4e804" } +func (*IPSessionRedirectAddReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPSessionRedirectAddReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *IPSessionRedirectAddReply) 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 *IPSessionRedirectAddReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Add or update a session redirection - version 2 +// - table_index - classifier table index +// - opaque_index - classifier session opaque index +// - proto - protocol of forwarded packets (default autodetect from path nh) +// - is_punt - true = punted traffic, false = forwarded traffic +// - match_len - classifier session match length in bytes (max is 80-bytes) +// - match - classifier session match +// - n_paths - number of paths +// - paths - the paths of the redirect +// +// IPSessionRedirectAddV2 defines message 'ip_session_redirect_add_v2'. +// InProgress: the message form may change in the future versions +type IPSessionRedirectAddV2 struct { + TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"` + OpaqueIndex uint32 `binapi:"u32,name=opaque_index,default=4294967295" json:"opaque_index,omitempty"` + Proto fib_types.FibPathNhProto `binapi:"fib_path_nh_proto,name=proto,default=4294967295" json:"proto,omitempty"` + IsPunt bool `binapi:"bool,name=is_punt" json:"is_punt,omitempty"` + MatchLen uint8 `binapi:"u8,name=match_len" json:"match_len,omitempty"` + Match []byte `binapi:"u8[80],name=match" json:"match,omitempty"` + NPaths uint8 `binapi:"u8,name=n_paths" json:"-"` + Paths []fib_types.FibPath `binapi:"fib_path[n_paths],name=paths" json:"paths,omitempty"` +} + +func (m *IPSessionRedirectAddV2) Reset() { *m = IPSessionRedirectAddV2{} } +func (*IPSessionRedirectAddV2) GetMessageName() string { return "ip_session_redirect_add_v2" } +func (*IPSessionRedirectAddV2) GetCrcString() string { return "0765f51f" } +func (*IPSessionRedirectAddV2) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPSessionRedirectAddV2) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.TableIndex + size += 4 // m.OpaqueIndex + size += 4 // m.Proto + size += 1 // m.IsPunt + size += 1 // m.MatchLen + size += 1 * 80 // m.Match + size += 1 // m.NPaths + for j1 := 0; j1 < len(m.Paths); j1++ { + var s1 fib_types.FibPath + _ = s1 + if j1 < len(m.Paths) { + s1 = m.Paths[j1] + } + size += 4 // s1.SwIfIndex + size += 4 // s1.TableID + size += 4 // s1.RpfID + size += 1 // s1.Weight + size += 1 // s1.Preference + size += 4 // s1.Type + size += 4 // s1.Flags + size += 4 // s1.Proto + size += 1 * 16 // s1.Nh.Address + size += 4 // s1.Nh.ViaLabel + size += 4 // s1.Nh.ObjID + size += 4 // s1.Nh.ClassifyTableIndex + size += 1 // s1.NLabels + for j2 := 0; j2 < 16; j2++ { + size += 1 // s1.LabelStack[j2].IsUniform + size += 4 // s1.LabelStack[j2].Label + size += 1 // s1.LabelStack[j2].TTL + size += 1 // s1.LabelStack[j2].Exp + } + } + return size +} +func (m *IPSessionRedirectAddV2) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.TableIndex) + buf.EncodeUint32(m.OpaqueIndex) + buf.EncodeUint32(uint32(m.Proto)) + buf.EncodeBool(m.IsPunt) + buf.EncodeUint8(m.MatchLen) + buf.EncodeBytes(m.Match, 80) + buf.EncodeUint8(uint8(len(m.Paths))) + for j0 := 0; j0 < len(m.Paths); j0++ { + var v0 fib_types.FibPath // Paths + if j0 < len(m.Paths) { + v0 = m.Paths[j0] + } + buf.EncodeUint32(v0.SwIfIndex) + buf.EncodeUint32(v0.TableID) + buf.EncodeUint32(v0.RpfID) + buf.EncodeUint8(v0.Weight) + buf.EncodeUint8(v0.Preference) + buf.EncodeUint32(uint32(v0.Type)) + buf.EncodeUint32(uint32(v0.Flags)) + buf.EncodeUint32(uint32(v0.Proto)) + buf.EncodeBytes(v0.Nh.Address.XXX_UnionData[:], 16) + buf.EncodeUint32(v0.Nh.ViaLabel) + buf.EncodeUint32(v0.Nh.ObjID) + buf.EncodeUint32(v0.Nh.ClassifyTableIndex) + buf.EncodeUint8(v0.NLabels) + for j1 := 0; j1 < 16; j1++ { + buf.EncodeUint8(v0.LabelStack[j1].IsUniform) + buf.EncodeUint32(v0.LabelStack[j1].Label) + buf.EncodeUint8(v0.LabelStack[j1].TTL) + buf.EncodeUint8(v0.LabelStack[j1].Exp) + } + } + return buf.Bytes(), nil +} +func (m *IPSessionRedirectAddV2) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.TableIndex = buf.DecodeUint32() + m.OpaqueIndex = buf.DecodeUint32() + m.Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) + m.IsPunt = buf.DecodeBool() + m.MatchLen = buf.DecodeUint8() + m.Match = make([]byte, 80) + copy(m.Match, buf.DecodeBytes(len(m.Match))) + m.NPaths = buf.DecodeUint8() + m.Paths = make([]fib_types.FibPath, m.NPaths) + for j0 := 0; j0 < len(m.Paths); j0++ { + m.Paths[j0].SwIfIndex = buf.DecodeUint32() + m.Paths[j0].TableID = buf.DecodeUint32() + m.Paths[j0].RpfID = buf.DecodeUint32() + m.Paths[j0].Weight = buf.DecodeUint8() + m.Paths[j0].Preference = buf.DecodeUint8() + m.Paths[j0].Type = fib_types.FibPathType(buf.DecodeUint32()) + m.Paths[j0].Flags = fib_types.FibPathFlags(buf.DecodeUint32()) + m.Paths[j0].Proto = fib_types.FibPathNhProto(buf.DecodeUint32()) + copy(m.Paths[j0].Nh.Address.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Paths[j0].Nh.ViaLabel = buf.DecodeUint32() + m.Paths[j0].Nh.ObjID = buf.DecodeUint32() + m.Paths[j0].Nh.ClassifyTableIndex = buf.DecodeUint32() + m.Paths[j0].NLabels = buf.DecodeUint8() + for j1 := 0; j1 < 16; j1++ { + m.Paths[j0].LabelStack[j1].IsUniform = buf.DecodeUint8() + m.Paths[j0].LabelStack[j1].Label = buf.DecodeUint32() + m.Paths[j0].LabelStack[j1].TTL = buf.DecodeUint8() + m.Paths[j0].LabelStack[j1].Exp = buf.DecodeUint8() + } + } + return nil +} + +// IPSessionRedirectAddV2Reply defines message 'ip_session_redirect_add_v2_reply'. +// InProgress: the message form may change in the future versions +type IPSessionRedirectAddV2Reply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *IPSessionRedirectAddV2Reply) Reset() { *m = IPSessionRedirectAddV2Reply{} } +func (*IPSessionRedirectAddV2Reply) GetMessageName() string { + return "ip_session_redirect_add_v2_reply" +} +func (*IPSessionRedirectAddV2Reply) GetCrcString() string { return "e8d4e804" } +func (*IPSessionRedirectAddV2Reply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPSessionRedirectAddV2Reply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *IPSessionRedirectAddV2Reply) 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 *IPSessionRedirectAddV2Reply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Delete a session redirection +// - table_index - classifier table index +// - match_len - classifier session match length in bytes (max is 80-bytes) +// - match - classifier session match +// +// IPSessionRedirectDel defines message 'ip_session_redirect_del'. +// InProgress: the message form may change in the future versions +type IPSessionRedirectDel struct { + TableIndex uint32 `binapi:"u32,name=table_index" json:"table_index,omitempty"` + MatchLen uint8 `binapi:"u8,name=match_len" json:"-"` + Match []byte `binapi:"u8[match_len],name=match" json:"match,omitempty"` +} + +func (m *IPSessionRedirectDel) Reset() { *m = IPSessionRedirectDel{} } +func (*IPSessionRedirectDel) GetMessageName() string { return "ip_session_redirect_del" } +func (*IPSessionRedirectDel) GetCrcString() string { return "fb643388" } +func (*IPSessionRedirectDel) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IPSessionRedirectDel) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.TableIndex + size += 1 // m.MatchLen + size += 1 * len(m.Match) // m.Match + return size +} +func (m *IPSessionRedirectDel) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.TableIndex) + buf.EncodeUint8(uint8(len(m.Match))) + buf.EncodeBytes(m.Match, 0) + return buf.Bytes(), nil +} +func (m *IPSessionRedirectDel) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.TableIndex = buf.DecodeUint32() + m.MatchLen = buf.DecodeUint8() + m.Match = make([]byte, m.MatchLen) + copy(m.Match, buf.DecodeBytes(len(m.Match))) + return nil +} + +// IPSessionRedirectDelReply defines message 'ip_session_redirect_del_reply'. +// InProgress: the message form may change in the future versions +type IPSessionRedirectDelReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *IPSessionRedirectDelReply) Reset() { *m = IPSessionRedirectDelReply{} } +func (*IPSessionRedirectDelReply) GetMessageName() string { return "ip_session_redirect_del_reply" } +func (*IPSessionRedirectDelReply) GetCrcString() string { return "e8d4e804" } +func (*IPSessionRedirectDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IPSessionRedirectDelReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *IPSessionRedirectDelReply) 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 *IPSessionRedirectDelReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +func init() { file_ip_session_redirect_binapi_init() } +func file_ip_session_redirect_binapi_init() { + api.RegisterMessage((*IPSessionRedirectAdd)(nil), "ip_session_redirect_add_2f78ffda") + api.RegisterMessage((*IPSessionRedirectAddReply)(nil), "ip_session_redirect_add_reply_e8d4e804") + api.RegisterMessage((*IPSessionRedirectAddV2)(nil), "ip_session_redirect_add_v2_0765f51f") + api.RegisterMessage((*IPSessionRedirectAddV2Reply)(nil), "ip_session_redirect_add_v2_reply_e8d4e804") + api.RegisterMessage((*IPSessionRedirectDel)(nil), "ip_session_redirect_del_fb643388") + api.RegisterMessage((*IPSessionRedirectDelReply)(nil), "ip_session_redirect_del_reply_e8d4e804") +} + +// Messages returns list of all messages in this module. +func AllMessages() []api.Message { + return []api.Message{ + (*IPSessionRedirectAdd)(nil), + (*IPSessionRedirectAddReply)(nil), + (*IPSessionRedirectAddV2)(nil), + (*IPSessionRedirectAddV2Reply)(nil), + (*IPSessionRedirectDel)(nil), + (*IPSessionRedirectDelReply)(nil), + } +} diff --git a/binapi/ip_session_redirect/ip_session_redirect_rpc.ba.go b/binapi/ip_session_redirect/ip_session_redirect_rpc.ba.go new file mode 100644 index 00000000..9c58288d --- /dev/null +++ b/binapi/ip_session_redirect/ip_session_redirect_rpc.ba.go @@ -0,0 +1,51 @@ +// Code generated by GoVPP's binapi-generator. DO NOT EDIT. + +package ip_session_redirect + +import ( + "context" + + api "go.fd.io/govpp/api" +) + +// RPCService defines RPC service ip_session_redirect. +type RPCService interface { + IPSessionRedirectAdd(ctx context.Context, in *IPSessionRedirectAdd) (*IPSessionRedirectAddReply, error) + IPSessionRedirectAddV2(ctx context.Context, in *IPSessionRedirectAddV2) (*IPSessionRedirectAddV2Reply, error) + IPSessionRedirectDel(ctx context.Context, in *IPSessionRedirectDel) (*IPSessionRedirectDelReply, error) +} + +type serviceClient struct { + conn api.Connection +} + +func NewServiceClient(conn api.Connection) RPCService { + return &serviceClient{conn} +} + +func (c *serviceClient) IPSessionRedirectAdd(ctx context.Context, in *IPSessionRedirectAdd) (*IPSessionRedirectAddReply, error) { + out := new(IPSessionRedirectAddReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + +func (c *serviceClient) IPSessionRedirectAddV2(ctx context.Context, in *IPSessionRedirectAddV2) (*IPSessionRedirectAddV2Reply, error) { + out := new(IPSessionRedirectAddV2Reply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + +func (c *serviceClient) IPSessionRedirectDel(ctx context.Context, in *IPSessionRedirectDel) (*IPSessionRedirectDelReply, error) { + out := new(IPSessionRedirectDelReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} diff --git a/binapi/ip_types/ip_types.ba.go b/binapi/ip_types/ip_types.ba.go index c97c890f..f4887208 100644 --- a/binapi/ip_types/ip_types.ba.go +++ b/binapi/ip_types/ip_types.ba.go @@ -1,17 +1,16 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/ip_types.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/ip_types.api.json // Package ip_types contains generated bindings for API file ip_types.api. // // Contents: -// -// 5 aliases -// 5 enums -// 8 structs -// 1 union +// - 5 aliases +// - 5 enums +// - 8 structs +// - 1 union package ip_types import ( @@ -20,8 +19,8 @@ import ( "strconv" "strings" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -30,6 +29,12 @@ import ( // GoVPP api package needs to be updated. const _ = api.GoVppAPIPackageIsVersion2 +const ( + APIFile = "ip_types" + APIVersion = "3.0.0" + VersionCrc = 0xfee023ed +) + // AddressFamily defines enum 'address_family'. type AddressFamily uint8 @@ -273,6 +278,11 @@ func (x IPProto) String() string { // AddressWithPrefix defines alias 'address_with_prefix'. type AddressWithPrefix Prefix +func NewAddressWithPrefix(network net.IPNet) AddressWithPrefix { + prefix := NewPrefix(network) + return AddressWithPrefix(prefix) +} + func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) { prefix, err := ParsePrefix(s) if err != nil { @@ -280,12 +290,19 @@ func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) { } return AddressWithPrefix(prefix), nil } + +func (x AddressWithPrefix) ToIPNet() *net.IPNet { + return Prefix(x).ToIPNet() +} + func (x AddressWithPrefix) String() string { return Prefix(x).String() } + func (x *AddressWithPrefix) MarshalText() ([]byte, error) { return []byte(x.String()), nil } + func (x *AddressWithPrefix) UnmarshalText(text []byte) error { prefix, err := ParseAddressWithPrefix(string(text)) if err != nil { @@ -298,10 +315,16 @@ func (x *AddressWithPrefix) UnmarshalText(text []byte) error { // IP4Address defines alias 'ip4_address'. type IP4Address [4]uint8 +func NewIP4Address(ip net.IP) IP4Address { + var ipaddr IP4Address + copy(ipaddr[:], ip.To4()) + return ipaddr +} + func ParseIP4Address(s string) (IP4Address, error) { ip := net.ParseIP(s).To4() if ip == nil { - return IP4Address{}, fmt.Errorf("invalid IP address: %s", s) + return IP4Address{}, fmt.Errorf("invalid IP4 address: %s", s) } var ipaddr IP4Address copy(ipaddr[:], ip.To4()) @@ -311,12 +334,15 @@ func ParseIP4Address(s string) (IP4Address, error) { func (x IP4Address) ToIP() net.IP { return net.IP(x[:]).To4() } + func (x IP4Address) String() string { return x.ToIP().String() } + func (x *IP4Address) MarshalText() ([]byte, error) { return []byte(x.String()), nil } + func (x *IP4Address) UnmarshalText(text []byte) error { ipaddr, err := ParseIP4Address(string(text)) if err != nil { @@ -332,10 +358,16 @@ type IP4AddressWithPrefix IP4Prefix // IP6Address defines alias 'ip6_address'. type IP6Address [16]uint8 +func NewIP6Address(ip net.IP) IP6Address { + var ipaddr IP6Address + copy(ipaddr[:], ip.To16()) + return ipaddr +} + func ParseIP6Address(s string) (IP6Address, error) { ip := net.ParseIP(s).To16() if ip == nil { - return IP6Address{}, fmt.Errorf("invalid IP address: %s", s) + return IP6Address{}, fmt.Errorf("invalid IP6 address: %s", s) } var ipaddr IP6Address copy(ipaddr[:], ip.To16()) @@ -345,12 +377,15 @@ func ParseIP6Address(s string) (IP6Address, error) { func (x IP6Address) ToIP() net.IP { return net.IP(x[:]).To16() } + func (x IP6Address) String() string { return x.ToIP().String() } + func (x *IP6Address) MarshalText() ([]byte, error) { return []byte(x.String()), nil } + func (x *IP6Address) UnmarshalText(text []byte) error { ipaddr, err := ParseIP6Address(string(text)) if err != nil { @@ -369,11 +404,7 @@ type Address struct { Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"` } -func ParseAddress(s string) (Address, error) { - ip := net.ParseIP(s) - if ip == nil { - return Address{}, fmt.Errorf("invalid address: %s", s) - } +func NewAddress(ip net.IP) Address { var addr Address if ip.To4() == nil { addr.Af = ADDRESS_IP6 @@ -386,8 +417,17 @@ func ParseAddress(s string) (Address, error) { copy(ip4[:], ip.To4()) addr.Un.SetIP4(ip4) } - return addr, nil + return addr } + +func ParseAddress(s string) (Address, error) { + ip := net.ParseIP(s) + if ip == nil { + return Address{}, fmt.Errorf("invalid IP address: %s", s) + } + return NewAddress(ip), nil +} + func (x Address) ToIP() net.IP { if x.Af == ADDRESS_IP6 { ip6 := x.Un.GetIP6() @@ -397,12 +437,15 @@ func (x Address) ToIP() net.IP { return net.IP(ip4[:]).To4() } } + func (x Address) String() string { return x.ToIP().String() } + func (x *Address) MarshalText() ([]byte, error) { return []byte(x.String()), nil } + func (x *Address) UnmarshalText(text []byte) error { addr, err := ParseAddress(string(text)) if err != nil { @@ -424,18 +467,26 @@ type IP4Prefix struct { Len uint8 `binapi:"u8,name=len" json:"len,omitempty"` } +func NewIP4Prefix(network net.IPNet) IP4Prefix { + var prefix IP4Prefix + maskSize, _ := network.Mask.Size() + prefix.Len = byte(maskSize) + prefix.Address = NewIP4Address(network.IP) + return prefix +} + func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) { hasPrefix := strings.Contains(s, "/") if hasPrefix { ip, network, err := net.ParseCIDR(s) if err != nil { - return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP4Prefix{}, fmt.Errorf("invalid IP4 %s: %s", s, err) } maskSize, _ := network.Mask.Size() prefix.Len = byte(maskSize) prefix.Address, err = ParseIP4Address(ip.String()) if err != nil { - return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP4Prefix{}, fmt.Errorf("invalid IP4 %s: %s", s, err) } } else { ip := net.ParseIP(s) @@ -446,23 +497,27 @@ func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) { prefix.Len = byte(defaultMaskSize) prefix.Address, err = ParseIP4Address(ip.String()) if err != nil { - return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP4Prefix{}, fmt.Errorf("invalid IP4 %s: %s", s, err) } } return prefix, nil } + func (x IP4Prefix) ToIPNet() *net.IPNet { mask := net.CIDRMask(int(x.Len), 32) ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask} return ipnet } + func (x IP4Prefix) String() string { ip := x.Address.String() return ip + "/" + strconv.Itoa(int(x.Len)) } + func (x *IP4Prefix) MarshalText() ([]byte, error) { return []byte(x.String()), nil } + func (x *IP4Prefix) UnmarshalText(text []byte) error { prefix, err := ParseIP4Prefix(string(text)) if err != nil { @@ -484,18 +539,26 @@ type IP6Prefix struct { Len uint8 `binapi:"u8,name=len" json:"len,omitempty"` } +func NewIP6Prefix(network net.IPNet) IP6Prefix { + var prefix IP6Prefix + maskSize, _ := network.Mask.Size() + prefix.Len = byte(maskSize) + prefix.Address = NewIP6Address(network.IP) + return prefix +} + func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) { hasPrefix := strings.Contains(s, "/") if hasPrefix { ip, network, err := net.ParseCIDR(s) if err != nil { - return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP6Prefix{}, fmt.Errorf("invalid IP6 %s: %s", s, err) } maskSize, _ := network.Mask.Size() prefix.Len = byte(maskSize) prefix.Address, err = ParseIP6Address(ip.String()) if err != nil { - return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP6Prefix{}, fmt.Errorf("invalid IP6 %s: %s", s, err) } } else { ip := net.ParseIP(s) @@ -506,23 +569,27 @@ func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) { prefix.Len = byte(defaultMaskSize) prefix.Address, err = ParseIP6Address(ip.String()) if err != nil { - return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err) + return IP6Prefix{}, fmt.Errorf("invalid IP6 %s: %s", s, err) } } return prefix, nil } + func (x IP6Prefix) ToIPNet() *net.IPNet { mask := net.CIDRMask(int(x.Len), 128) ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask} return ipnet } + func (x IP6Prefix) String() string { ip := x.Address.String() return ip + "/" + strconv.Itoa(int(x.Len)) } + func (x *IP6Prefix) MarshalText() ([]byte, error) { return []byte(x.String()), nil } + func (x *IP6Prefix) UnmarshalText(text []byte) error { prefix, err := ParseIP6Prefix(string(text)) if err != nil { @@ -546,6 +613,14 @@ type Prefix struct { Len uint8 `binapi:"u8,name=len" json:"len,omitempty"` } +func NewPrefix(network net.IPNet) Prefix { + var prefix Prefix + maskSize, _ := network.Mask.Size() + prefix.Len = byte(maskSize) + prefix.Address = NewAddress(network.IP) + return prefix +} + func ParsePrefix(ip string) (prefix Prefix, err error) { hasPrefix := strings.Contains(ip, "/") if hasPrefix { @@ -573,6 +648,7 @@ func ParsePrefix(ip string) (prefix Prefix, err error) { } return prefix, nil } + func (x Prefix) ToIPNet() *net.IPNet { var mask net.IPMask if x.Address.Af == ADDRESS_IP4 { @@ -583,13 +659,16 @@ func (x Prefix) ToIPNet() *net.IPNet { ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask} return ipnet } + func (x Prefix) String() string { ip := x.Address.String() return ip + "/" + strconv.Itoa(int(x.Len)) } + func (x *Prefix) MarshalText() ([]byte, error) { return []byte(x.String()), nil } + func (x *Prefix) UnmarshalText(text []byte) error { prefix, err := ParsePrefix(string(text)) if err != nil { diff --git a/binapi/ipfix_export/ipfix_export.ba.go b/binapi/ipfix_export/ipfix_export.ba.go index e27290d4..dcdec17c 100644 --- a/binapi/ipfix_export/ipfix_export.ba.go +++ b/binapi/ipfix_export/ipfix_export.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/ipfix_export.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/ipfix_export.api.json // Package ipfix_export contains generated bindings for API file ipfix_export.api. // // Contents: -// -// 19 messages +// - 19 messages package ipfix_export import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,6 +28,9 @@ const ( VersionCrc = 0x63e0810a ) +// Ipfix meter details in response to the get_meters command +// - name The name of the ipfix meter +// // IpfixAllExporterDetails defines message 'ipfix_all_exporter_details'. type IpfixAllExporterDetails struct { CollectorAddress ip_types.Address `binapi:"address,name=collector_address" json:"collector_address,omitempty"` @@ -162,6 +164,10 @@ func (m *IpfixAllExporterGetReply) Unmarshal(b []byte) error { return nil } +// Reply to IPFIX classify stream dump request +// - domain_id - domain ID reported in IPFIX messages for classify stream +// - src_port - source port of UDP session for classify stream +// // IpfixClassifyStreamDetails defines message 'ipfix_classify_stream_details'. type IpfixClassifyStreamDetails struct { DomainID uint32 `binapi:"u32,name=domain_id" json:"domain_id,omitempty"` @@ -199,6 +205,7 @@ func (m *IpfixClassifyStreamDetails) Unmarshal(b []byte) error { return nil } +// IPFIX classify stream dump request // IpfixClassifyStreamDump defines message 'ipfix_classify_stream_dump'. type IpfixClassifyStreamDump struct{} @@ -226,6 +233,11 @@ func (m *IpfixClassifyStreamDump) Unmarshal(b []byte) error { return nil } +// IPFIX add or delete classifier table request +// - table_id - classifier table ID +// - ip_version - version of IP used in the classifier table +// - transport_protocol - transport protocol used in the classifier table or 255 for unspecified +// // IpfixClassifyTableAddDel defines message 'ipfix_classify_table_add_del'. type IpfixClassifyTableAddDel struct { TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` @@ -306,6 +318,11 @@ func (m *IpfixClassifyTableAddDelReply) Unmarshal(b []byte) error { return nil } +// Reply to IPFIX classify tables dump request +// - table_id - classifier table ID +// - ip_version - version of IP used in the classifier table +// - transport_protocol - transport protocol used in the classifier table or 255 for unspecified +// // IpfixClassifyTableDetails defines message 'ipfix_classify_table_details'. type IpfixClassifyTableDetails struct { TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` @@ -347,6 +364,7 @@ func (m *IpfixClassifyTableDetails) Unmarshal(b []byte) error { return nil } +// IPFIX classify tables dump request // IpfixClassifyTableDump defines message 'ipfix_classify_table_dump'. type IpfixClassifyTableDump struct{} @@ -374,6 +392,23 @@ func (m *IpfixClassifyTableDump) Unmarshal(b []byte) error { return nil } +// Configure IPFIX exporter within the exporting process. +// +// The exporting process can contain multiple independent exporters, +// each of which have their own state. The collector_address is the key +// field that identifies a unique exporter. The already existing API +// 'set_ipfix_exporter' is used to modify a single exporter (which will +// always have stat index 0). If more than one exporter is required then +// they can be created and deleted using this API. +// - is_create - True for create, False for delete +// - collector_address - address of IPFIX collector +// - collector_port - port of IPFIX collector +// - src_address - address of IPFIX exporter +// - vrf_id - VRF / fib table ID +// - path_mtu - Path MTU between exporter and collector +// - template_interval - number of seconds after which to resend template +// - udp_checksum - UDP checksum calculation enable flag +// // IpfixExporterCreateDelete defines message 'ipfix_exporter_create_delete'. type IpfixExporterCreateDelete struct { IsCreate bool `binapi:"bool,name=is_create" json:"is_create,omitempty"` @@ -480,6 +515,15 @@ func (m *IpfixExporterCreateDeleteReply) Unmarshal(b []byte) error { return nil } +// Reply to IPFIX exporter dump request +// - collector_address - address of IPFIX collector +// - collector_port - port of IPFIX collector +// - src_address - address of IPFIX exporter +// - fib_index - fib table index +// - path_mtu - Path MTU between exporter and collector +// - template_interval - number of seconds after which to resend template +// - udp_checksum - UDP checksum calculation enable flag +// // IpfixExporterDetails defines message 'ipfix_exporter_details'. type IpfixExporterDetails struct { CollectorAddress ip_types.Address `binapi:"address,name=collector_address" json:"collector_address,omitempty"` @@ -543,6 +587,7 @@ func (m *IpfixExporterDetails) Unmarshal(b []byte) error { return nil } +// IPFIX exporter dump request // IpfixExporterDump defines message 'ipfix_exporter_dump'. type IpfixExporterDump struct{} @@ -630,6 +675,10 @@ func (m *IpfixFlushReply) Unmarshal(b []byte) error { return nil } +// IPFIX classify stream configure request +// - domain_id - domain ID reported in IPFIX messages for classify stream +// - src_port - source port of UDP session for classify stream +// // SetIpfixClassifyStream defines message 'set_ipfix_classify_stream'. type SetIpfixClassifyStream struct { DomainID uint32 `binapi:"u32,name=domain_id" json:"domain_id,omitempty"` @@ -700,6 +749,15 @@ func (m *SetIpfixClassifyStreamReply) Unmarshal(b []byte) error { return nil } +// Configure IPFIX exporter process request +// - collector_address - address of IPFIX collector +// - collector_port - port of IPFIX collector +// - src_address - address of IPFIX exporter +// - vrf_id - VRF / fib table ID +// - path_mtu - Path MTU between exporter and collector +// - template_interval - number of seconds after which to resend template +// - udp_checksum - UDP checksum calculation enable flag +// // SetIpfixExporter defines message 'set_ipfix_exporter'. type SetIpfixExporter struct { CollectorAddress ip_types.Address `binapi:"address,name=collector_address" json:"collector_address,omitempty"` diff --git a/binapi/ipfix_export/ipfix_export_rpc.ba.go b/binapi/ipfix_export/ipfix_export_rpc.ba.go index 50902afb..85d8e307 100644 --- a/binapi/ipfix_export/ipfix_export_rpc.ba.go +++ b/binapi/ipfix_export/ipfix_export_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service ipfix_export. @@ -45,7 +45,7 @@ func (c *serviceClient) IpfixAllExporterGet(ctx context.Context, in *IpfixAllExp } type RPCService_IpfixAllExporterGetClient interface { - Recv() (*IpfixAllExporterDetails, error) + Recv() (*IpfixAllExporterDetails, *IpfixAllExporterGetReply, error) api.Stream } @@ -53,22 +53,26 @@ type serviceClient_IpfixAllExporterGetClient struct { api.Stream } -func (c *serviceClient_IpfixAllExporterGetClient) Recv() (*IpfixAllExporterDetails, error) { +func (c *serviceClient_IpfixAllExporterGetClient) Recv() (*IpfixAllExporterDetails, *IpfixAllExporterGetReply, error) { msg, err := c.Stream.RecvMsg() if err != nil { - return nil, err + return nil, nil, err } switch m := msg.(type) { case *IpfixAllExporterDetails: - return m, nil + return m, nil, nil case *IpfixAllExporterGetReply: + if err := api.RetvalToVPPApiError(m.Retval); err != nil { + c.Stream.Close() + return nil, m, err + } err = c.Stream.Close() if err != nil { - return nil, err + return nil, m, err } - return nil, io.EOF + return nil, m, io.EOF default: - return nil, fmt.Errorf("unexpected message: %T %v", m, m) + return nil, nil, fmt.Errorf("unexpected message: %T %v", m, m) } } diff --git a/binapi/ipip/ipip.ba.go b/binapi/ipip/ipip.ba.go index 3a8aa67a..fce142d3 100644 --- a/binapi/ipip/ipip.ba.go +++ b/binapi/ipip/ipip.ba.go @@ -1,23 +1,22 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/ipip.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/ipip.api.json // Package ipip contains generated bindings for API file ipip.api. // // Contents: -// -// 1 struct -// 10 messages +// - 1 struct +// - 10 messages package ipip import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" tunnel_types "github.com/networkservicemesh/govpp/binapi/tunnel_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -44,6 +43,7 @@ type IpipTunnel struct { Dscp ip_types.IPDscp `binapi:"ip_dscp,name=dscp" json:"dscp,omitempty"` } +// * Create an IPv4 over IPv6 automatic tunnel (6RD) // Ipip6rdAddTunnel defines message 'ipip_6rd_add_tunnel'. type Ipip6rdAddTunnel struct { IP6TableID uint32 `binapi:"u32,name=ip6_table_id" json:"ip6_table_id,omitempty"` @@ -144,6 +144,7 @@ func (m *Ipip6rdAddTunnelReply) Unmarshal(b []byte) error { return nil } +// * Delete an IPv4 over IPv6 automatic tunnel (6RD) // Ipip6rdDelTunnel defines message 'ipip_6rd_del_tunnel'. type Ipip6rdDelTunnel struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -210,6 +211,7 @@ func (m *Ipip6rdDelTunnelReply) Unmarshal(b []byte) error { return nil } +// * Create an IP{v4,v6} over IP{v4,v6} tunnel. // IpipAddTunnel defines message 'ipip_add_tunnel'. type IpipAddTunnel struct { Tunnel IpipTunnel `binapi:"ipip_tunnel,name=tunnel" json:"tunnel,omitempty"` @@ -307,6 +309,7 @@ func (m *IpipAddTunnelReply) Unmarshal(b []byte) error { return nil } +// * Delete an IP{v4,v6} over IP{v4,v6} tunnel. // IpipDelTunnel defines message 'ipip_del_tunnel'. type IpipDelTunnel struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -433,6 +436,7 @@ func (m *IpipTunnelDetails) Unmarshal(b []byte) error { return nil } +// * List all IPIP tunnels // IpipTunnelDump defines message 'ipip_tunnel_dump'. type IpipTunnelDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/binapi/ipip/ipip_rpc.ba.go b/binapi/ipip/ipip_rpc.ba.go index 6ffa1a50..74bfcc68 100644 --- a/binapi/ipip/ipip_rpc.ba.go +++ b/binapi/ipip/ipip_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service ipip. diff --git a/binapi/ipsec/ipsec.ba.go b/binapi/ipsec/ipsec.ba.go index 01465808..9cfd9550 100644 --- a/binapi/ipsec/ipsec.ba.go +++ b/binapi/ipsec/ipsec.ba.go @@ -1,24 +1,23 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/ipsec.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/ipsec.api.json // Package ipsec contains generated bindings for API file ipsec.api. // // Contents: -// -// 2 structs -// 48 messages +// - 2 structs +// - 56 messages package ipsec import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" ipsec_types "github.com/networkservicemesh/govpp/binapi/ipsec_types" tunnel_types "github.com/networkservicemesh/govpp/binapi/tunnel_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -30,7 +29,7 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "ipsec" APIVersion = "5.0.2" - VersionCrc = 0xd8d93805 + VersionCrc = 0x1b4ba2ec ) // IpsecItf defines type 'ipsec_itf'. @@ -49,6 +48,12 @@ type IpsecTunnelProtect struct { SaIn []uint32 `binapi:"u32[n_sa_in],name=sa_in" json:"sa_in,omitempty"` } +// IPsec backend details +// - name - name of the backend +// - protocol - IPsec protocol (value from ipsec_protocol_t) +// - index - backend index +// - active - set to 1 if the backend is active, otherwise 0 +// // IpsecBackendDetails defines message 'ipsec_backend_details'. type IpsecBackendDetails struct { Name string `binapi:"string[128],name=name" json:"name,omitempty"` @@ -94,6 +99,7 @@ func (m *IpsecBackendDetails) Unmarshal(b []byte) error { return nil } +// Dump IPsec backends // IpsecBackendDump defines message 'ipsec_backend_dump'. type IpsecBackendDump struct{} @@ -121,6 +127,11 @@ func (m *IpsecBackendDump) Unmarshal(b []byte) error { return nil } +// IPsec: Add/delete SPD from interface +// - is_add - add security mode if non-zero, else delete +// - sw_if_index - index of the interface +// - spd_id - SPD instance id to use for lookups +// // IpsecInterfaceAddDelSpd defines message 'ipsec_interface_add_del_spd'. type IpsecInterfaceAddDelSpd struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -197,6 +208,7 @@ func (m *IpsecInterfaceAddDelSpdReply) Unmarshal(b []byte) error { return nil } +// Create an IPSec interface // IpsecItfCreate defines message 'ipsec_itf_create'. type IpsecItfCreate struct { Itf IpsecItf `binapi:"ipsec_itf,name=itf" json:"itf,omitempty"` @@ -236,6 +248,10 @@ func (m *IpsecItfCreate) Unmarshal(b []byte) error { return nil } +// Add IPsec interface interface response +// - retval - return status +// - sw_if_index - sw_if_index of new interface (for successful add) +// // IpsecItfCreateReply defines message 'ipsec_itf_create_reply'. type IpsecItfCreateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -411,6 +427,17 @@ func (m *IpsecItfDump) Unmarshal(b []byte) error { return nil } +// IPsec security association database response +// - entry - The SA details +// - sw_if_index - sw_if_index of tunnel interface, policy-based SAs = ~0 +// - salt - 4 byte salt +// - seq - current sequence number for outbound +// - seq_hi - high 32 bits of ESN for outbound +// - last_seq - highest sequence number received inbound +// - last_seq_hi - high 32 bits of highest ESN received inbound +// - replay_window - bit map of seq nums received relative to last_seq if using anti-replay +// - stat_index - index for the SA in the stats segment @ /net/ipsec/sa +// // IpsecSaDetails defines message 'ipsec_sa_details'. // Deprecated: the message will be removed in the future versions type IpsecSaDetails struct { @@ -522,6 +549,9 @@ func (m *IpsecSaDetails) Unmarshal(b []byte) error { return nil } +// Dump IPsec security association +// - sa_id - optional ID of an SA to dump, if ~0 dump all SAs in SAD +// // IpsecSaDump defines message 'ipsec_sa_dump'. // Deprecated: the message will be removed in the future versions type IpsecSaDump struct { @@ -557,6 +587,7 @@ func (m *IpsecSaDump) Unmarshal(b []byte) error { } // IpsecSaV2Details defines message 'ipsec_sa_v2_details'. +// Deprecated: the message will be removed in the future versions type IpsecSaV2Details struct { Entry ipsec_types.IpsecSadEntryV2 `binapi:"ipsec_sad_entry_v2,name=entry" json:"entry,omitempty"` SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -673,6 +704,7 @@ func (m *IpsecSaV2Details) Unmarshal(b []byte) error { } // IpsecSaV2Dump defines message 'ipsec_sa_v2_dump'. +// Deprecated: the message will be removed in the future versions type IpsecSaV2Dump struct { SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"` } @@ -865,6 +897,244 @@ func (m *IpsecSaV3Dump) Unmarshal(b []byte) error { return nil } +// IpsecSaV4Details defines message 'ipsec_sa_v4_details'. +type IpsecSaV4Details struct { + Entry ipsec_types.IpsecSadEntryV3 `binapi:"ipsec_sad_entry_v3,name=entry" json:"entry,omitempty"` + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + SeqOutbound uint64 `binapi:"u64,name=seq_outbound" json:"seq_outbound,omitempty"` + LastSeqInbound uint64 `binapi:"u64,name=last_seq_inbound" json:"last_seq_inbound,omitempty"` + ReplayWindow uint64 `binapi:"u64,name=replay_window" json:"replay_window,omitempty"` + ThreadIndex uint32 `binapi:"u32,name=thread_index" json:"thread_index,omitempty"` + StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"` +} + +func (m *IpsecSaV4Details) Reset() { *m = IpsecSaV4Details{} } +func (*IpsecSaV4Details) GetMessageName() string { return "ipsec_sa_v4_details" } +func (*IpsecSaV4Details) GetCrcString() string { return "87a322d7" } +func (*IpsecSaV4Details) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IpsecSaV4Details) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Entry.SadID + size += 4 // m.Entry.Spi + size += 4 // m.Entry.Protocol + size += 4 // m.Entry.CryptoAlgorithm + size += 1 // m.Entry.CryptoKey.Length + size += 1 * 128 // m.Entry.CryptoKey.Data + size += 4 // m.Entry.IntegrityAlgorithm + size += 1 // m.Entry.IntegrityKey.Length + size += 1 * 128 // m.Entry.IntegrityKey.Data + size += 4 // m.Entry.Flags + size += 4 // m.Entry.Tunnel.Instance + size += 1 // m.Entry.Tunnel.Src.Af + size += 1 * 16 // m.Entry.Tunnel.Src.Un + size += 1 // m.Entry.Tunnel.Dst.Af + size += 1 * 16 // m.Entry.Tunnel.Dst.Un + size += 4 // m.Entry.Tunnel.SwIfIndex + size += 4 // m.Entry.Tunnel.TableID + size += 1 // m.Entry.Tunnel.EncapDecapFlags + size += 1 // m.Entry.Tunnel.Mode + size += 1 // m.Entry.Tunnel.Flags + size += 1 // m.Entry.Tunnel.Dscp + size += 1 // m.Entry.Tunnel.HopLimit + size += 4 // m.Entry.Salt + size += 2 // m.Entry.UDPSrcPort + size += 2 // m.Entry.UDPDstPort + size += 4 // m.SwIfIndex + size += 8 // m.SeqOutbound + size += 8 // m.LastSeqInbound + size += 8 // m.ReplayWindow + size += 4 // m.ThreadIndex + size += 4 // m.StatIndex + return size +} +func (m *IpsecSaV4Details) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.Entry.SadID) + buf.EncodeUint32(m.Entry.Spi) + buf.EncodeUint32(uint32(m.Entry.Protocol)) + buf.EncodeUint32(uint32(m.Entry.CryptoAlgorithm)) + buf.EncodeUint8(m.Entry.CryptoKey.Length) + buf.EncodeBytes(m.Entry.CryptoKey.Data, 128) + buf.EncodeUint32(uint32(m.Entry.IntegrityAlgorithm)) + buf.EncodeUint8(m.Entry.IntegrityKey.Length) + buf.EncodeBytes(m.Entry.IntegrityKey.Data, 128) + buf.EncodeUint32(uint32(m.Entry.Flags)) + buf.EncodeUint32(m.Entry.Tunnel.Instance) + buf.EncodeUint8(uint8(m.Entry.Tunnel.Src.Af)) + buf.EncodeBytes(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], 16) + buf.EncodeUint8(uint8(m.Entry.Tunnel.Dst.Af)) + buf.EncodeBytes(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], 16) + buf.EncodeUint32(uint32(m.Entry.Tunnel.SwIfIndex)) + buf.EncodeUint32(m.Entry.Tunnel.TableID) + buf.EncodeUint8(uint8(m.Entry.Tunnel.EncapDecapFlags)) + buf.EncodeUint8(uint8(m.Entry.Tunnel.Mode)) + buf.EncodeUint8(uint8(m.Entry.Tunnel.Flags)) + buf.EncodeUint8(uint8(m.Entry.Tunnel.Dscp)) + buf.EncodeUint8(m.Entry.Tunnel.HopLimit) + buf.EncodeUint32(m.Entry.Salt) + buf.EncodeUint16(m.Entry.UDPSrcPort) + buf.EncodeUint16(m.Entry.UDPDstPort) + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeUint64(m.SeqOutbound) + buf.EncodeUint64(m.LastSeqInbound) + buf.EncodeUint64(m.ReplayWindow) + buf.EncodeUint32(m.ThreadIndex) + buf.EncodeUint32(m.StatIndex) + return buf.Bytes(), nil +} +func (m *IpsecSaV4Details) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Entry.SadID = buf.DecodeUint32() + m.Entry.Spi = buf.DecodeUint32() + m.Entry.Protocol = ipsec_types.IpsecProto(buf.DecodeUint32()) + m.Entry.CryptoAlgorithm = ipsec_types.IpsecCryptoAlg(buf.DecodeUint32()) + m.Entry.CryptoKey.Length = buf.DecodeUint8() + m.Entry.CryptoKey.Data = make([]byte, 128) + copy(m.Entry.CryptoKey.Data, buf.DecodeBytes(len(m.Entry.CryptoKey.Data))) + m.Entry.IntegrityAlgorithm = ipsec_types.IpsecIntegAlg(buf.DecodeUint32()) + m.Entry.IntegrityKey.Length = buf.DecodeUint8() + m.Entry.IntegrityKey.Data = make([]byte, 128) + copy(m.Entry.IntegrityKey.Data, buf.DecodeBytes(len(m.Entry.IntegrityKey.Data))) + m.Entry.Flags = ipsec_types.IpsecSadFlags(buf.DecodeUint32()) + m.Entry.Tunnel.Instance = buf.DecodeUint32() + m.Entry.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Entry.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Entry.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Entry.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Entry.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.Entry.Tunnel.TableID = buf.DecodeUint32() + m.Entry.Tunnel.EncapDecapFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8()) + m.Entry.Tunnel.Mode = tunnel_types.TunnelMode(buf.DecodeUint8()) + m.Entry.Tunnel.Flags = tunnel_types.TunnelFlags(buf.DecodeUint8()) + m.Entry.Tunnel.Dscp = ip_types.IPDscp(buf.DecodeUint8()) + m.Entry.Tunnel.HopLimit = buf.DecodeUint8() + m.Entry.Salt = buf.DecodeUint32() + m.Entry.UDPSrcPort = buf.DecodeUint16() + m.Entry.UDPDstPort = buf.DecodeUint16() + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.SeqOutbound = buf.DecodeUint64() + m.LastSeqInbound = buf.DecodeUint64() + m.ReplayWindow = buf.DecodeUint64() + m.ThreadIndex = buf.DecodeUint32() + m.StatIndex = buf.DecodeUint32() + return nil +} + +// IpsecSaV4Dump defines message 'ipsec_sa_v4_dump'. +type IpsecSaV4Dump struct { + SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"` +} + +func (m *IpsecSaV4Dump) Reset() { *m = IpsecSaV4Dump{} } +func (*IpsecSaV4Dump) GetMessageName() string { return "ipsec_sa_v4_dump" } +func (*IpsecSaV4Dump) GetCrcString() string { return "2076c2f4" } +func (*IpsecSaV4Dump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IpsecSaV4Dump) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.SaID + return size +} +func (m *IpsecSaV4Dump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.SaID) + return buf.Bytes(), nil +} +func (m *IpsecSaV4Dump) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SaID = buf.DecodeUint32() + return nil +} + +// An API to bind an SAD entry to a specific worker +// - sa_id - the id of the SA to bind +// - worker - the worker's index to which the SA will be bound to +// +// IpsecSadBind defines message 'ipsec_sad_bind'. +type IpsecSadBind struct { + SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"` + Worker uint32 `binapi:"u32,name=worker" json:"worker,omitempty"` +} + +func (m *IpsecSadBind) Reset() { *m = IpsecSadBind{} } +func (*IpsecSadBind) GetMessageName() string { return "ipsec_sad_bind" } +func (*IpsecSadBind) GetCrcString() string { return "0649c0d9" } +func (*IpsecSadBind) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IpsecSadBind) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.SaID + size += 4 // m.Worker + return size +} +func (m *IpsecSadBind) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.SaID) + buf.EncodeUint32(m.Worker) + return buf.Bytes(), nil +} +func (m *IpsecSadBind) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SaID = buf.DecodeUint32() + m.Worker = buf.DecodeUint32() + return nil +} + +// IpsecSadBindReply defines message 'ipsec_sad_bind_reply'. +type IpsecSadBindReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *IpsecSadBindReply) Reset() { *m = IpsecSadBindReply{} } +func (*IpsecSadBindReply) GetMessageName() string { return "ipsec_sad_bind_reply" } +func (*IpsecSadBindReply) GetCrcString() string { return "e8d4e804" } +func (*IpsecSadBindReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IpsecSadBindReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *IpsecSadBindReply) 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 *IpsecSadBindReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + // IpsecSadEntryAdd defines message 'ipsec_sad_entry_add'. type IpsecSadEntryAdd struct { Entry ipsec_types.IpsecSadEntryV3 `binapi:"ipsec_sad_entry_v3,name=entry" json:"entry,omitempty"` @@ -972,6 +1242,9 @@ func (m *IpsecSadEntryAdd) Unmarshal(b []byte) error { return nil } +// IPsec: Add/delete Security Association Database entry +// - entry - Entry to add or delete +// // IpsecSadEntryAddDel defines message 'ipsec_sad_entry_add_del'. // Deprecated: the message will be removed in the future versions type IpsecSadEntryAddDel struct { @@ -1102,6 +1375,7 @@ func (m *IpsecSadEntryAddDelReply) Unmarshal(b []byte) error { } // IpsecSadEntryAddDelV2 defines message 'ipsec_sad_entry_add_del_v2'. +// Deprecated: the message will be removed in the future versions type IpsecSadEntryAddDelV2 struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` Entry ipsec_types.IpsecSadEntryV2 `binapi:"ipsec_sad_entry_v2,name=entry" json:"entry,omitempty"` @@ -1198,6 +1472,7 @@ func (m *IpsecSadEntryAddDelV2) Unmarshal(b []byte) error { } // IpsecSadEntryAddDelV2Reply defines message 'ipsec_sad_entry_add_del_v2_reply'. +// Deprecated: the message will be removed in the future versions type IpsecSadEntryAddDelV2Reply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` StatIndex uint32 `binapi:"u32,name=stat_index" json:"stat_index,omitempty"` @@ -1485,6 +1760,200 @@ func (m *IpsecSadEntryDelReply) Unmarshal(b []byte) error { return nil } +// An API to update the tunnel parameters and the ports associated with an SA +// +// Used in the NAT-T case when the NAT data changes +// - sa_id - the id of the SA to update +// - is_tun - update the tunnel if non-zero, else update only the ports +// - tunnel - sender context, to match reply w/ request +// - udp_src_port - new src port for NAT-T. Used if different from 0xffff +// - udp_dst_port - new dst port for NAT-T. Used if different from 0xffff +// +// IpsecSadEntryUpdate defines message 'ipsec_sad_entry_update'. +type IpsecSadEntryUpdate struct { + SadID uint32 `binapi:"u32,name=sad_id" json:"sad_id,omitempty"` + IsTun bool `binapi:"bool,name=is_tun" json:"is_tun,omitempty"` + Tunnel tunnel_types.Tunnel `binapi:"tunnel,name=tunnel" json:"tunnel,omitempty"` + UDPSrcPort uint16 `binapi:"u16,name=udp_src_port,default=65535" json:"udp_src_port,omitempty"` + UDPDstPort uint16 `binapi:"u16,name=udp_dst_port,default=65535" json:"udp_dst_port,omitempty"` +} + +func (m *IpsecSadEntryUpdate) Reset() { *m = IpsecSadEntryUpdate{} } +func (*IpsecSadEntryUpdate) GetMessageName() string { return "ipsec_sad_entry_update" } +func (*IpsecSadEntryUpdate) GetCrcString() string { return "1412af86" } +func (*IpsecSadEntryUpdate) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IpsecSadEntryUpdate) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.SadID + size += 1 // m.IsTun + size += 4 // m.Tunnel.Instance + size += 1 // m.Tunnel.Src.Af + size += 1 * 16 // m.Tunnel.Src.Un + size += 1 // m.Tunnel.Dst.Af + size += 1 * 16 // m.Tunnel.Dst.Un + size += 4 // m.Tunnel.SwIfIndex + size += 4 // m.Tunnel.TableID + size += 1 // m.Tunnel.EncapDecapFlags + size += 1 // m.Tunnel.Mode + size += 1 // m.Tunnel.Flags + size += 1 // m.Tunnel.Dscp + size += 1 // m.Tunnel.HopLimit + size += 2 // m.UDPSrcPort + size += 2 // m.UDPDstPort + return size +} +func (m *IpsecSadEntryUpdate) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.SadID) + buf.EncodeBool(m.IsTun) + buf.EncodeUint32(m.Tunnel.Instance) + buf.EncodeUint8(uint8(m.Tunnel.Src.Af)) + buf.EncodeBytes(m.Tunnel.Src.Un.XXX_UnionData[:], 16) + buf.EncodeUint8(uint8(m.Tunnel.Dst.Af)) + buf.EncodeBytes(m.Tunnel.Dst.Un.XXX_UnionData[:], 16) + buf.EncodeUint32(uint32(m.Tunnel.SwIfIndex)) + buf.EncodeUint32(m.Tunnel.TableID) + buf.EncodeUint8(uint8(m.Tunnel.EncapDecapFlags)) + buf.EncodeUint8(uint8(m.Tunnel.Mode)) + buf.EncodeUint8(uint8(m.Tunnel.Flags)) + buf.EncodeUint8(uint8(m.Tunnel.Dscp)) + buf.EncodeUint8(m.Tunnel.HopLimit) + buf.EncodeUint16(m.UDPSrcPort) + buf.EncodeUint16(m.UDPDstPort) + return buf.Bytes(), nil +} +func (m *IpsecSadEntryUpdate) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SadID = buf.DecodeUint32() + m.IsTun = buf.DecodeBool() + m.Tunnel.Instance = buf.DecodeUint32() + m.Tunnel.Src.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Tunnel.Src.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Tunnel.Dst.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Tunnel.Dst.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Tunnel.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.Tunnel.TableID = buf.DecodeUint32() + m.Tunnel.EncapDecapFlags = tunnel_types.TunnelEncapDecapFlags(buf.DecodeUint8()) + m.Tunnel.Mode = tunnel_types.TunnelMode(buf.DecodeUint8()) + m.Tunnel.Flags = tunnel_types.TunnelFlags(buf.DecodeUint8()) + m.Tunnel.Dscp = ip_types.IPDscp(buf.DecodeUint8()) + m.Tunnel.HopLimit = buf.DecodeUint8() + m.UDPSrcPort = buf.DecodeUint16() + m.UDPDstPort = buf.DecodeUint16() + return nil +} + +// IpsecSadEntryUpdateReply defines message 'ipsec_sad_entry_update_reply'. +type IpsecSadEntryUpdateReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *IpsecSadEntryUpdateReply) Reset() { *m = IpsecSadEntryUpdateReply{} } +func (*IpsecSadEntryUpdateReply) GetMessageName() string { return "ipsec_sad_entry_update_reply" } +func (*IpsecSadEntryUpdateReply) GetCrcString() string { return "e8d4e804" } +func (*IpsecSadEntryUpdateReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IpsecSadEntryUpdateReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *IpsecSadEntryUpdateReply) 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 *IpsecSadEntryUpdateReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// IpsecSadUnbind defines message 'ipsec_sad_unbind'. +type IpsecSadUnbind struct { + SaID uint32 `binapi:"u32,name=sa_id" json:"sa_id,omitempty"` +} + +func (m *IpsecSadUnbind) Reset() { *m = IpsecSadUnbind{} } +func (*IpsecSadUnbind) GetMessageName() string { return "ipsec_sad_unbind" } +func (*IpsecSadUnbind) GetCrcString() string { return "2076c2f4" } +func (*IpsecSadUnbind) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *IpsecSadUnbind) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.SaID + return size +} +func (m *IpsecSadUnbind) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.SaID) + return buf.Bytes(), nil +} +func (m *IpsecSadUnbind) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SaID = buf.DecodeUint32() + return nil +} + +// IpsecSadUnbindReply defines message 'ipsec_sad_unbind_reply'. +type IpsecSadUnbindReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *IpsecSadUnbindReply) Reset() { *m = IpsecSadUnbindReply{} } +func (*IpsecSadUnbindReply) GetMessageName() string { return "ipsec_sad_unbind_reply" } +func (*IpsecSadUnbindReply) GetCrcString() string { return "e8d4e804" } +func (*IpsecSadUnbindReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *IpsecSadUnbindReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *IpsecSadUnbindReply) 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 *IpsecSadUnbindReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Select IPsec backend +// - protocol - IPsec protocol (value from ipsec_protocol_t) +// - index - backend index +// // IpsecSelectBackend defines message 'ipsec_select_backend'. type IpsecSelectBackend struct { Protocol ipsec_types.IpsecProto `binapi:"ipsec_proto,name=protocol" json:"protocol,omitempty"` @@ -1555,6 +2024,9 @@ func (m *IpsecSelectBackendReply) Unmarshal(b []byte) error { return nil } +// IPsec Set Async mode +// - async_enable - ipsec async mode on or off +// // IpsecSetAsyncMode defines message 'ipsec_set_async_mode'. type IpsecSetAsyncMode struct { AsyncEnable bool `binapi:"bool,name=async_enable" json:"async_enable,omitempty"` @@ -1621,6 +2093,10 @@ func (m *IpsecSetAsyncModeReply) Unmarshal(b []byte) error { return nil } +// IPsec: Add/delete Security Policy Database +// - is_add - add SPD if non-zero, else delete +// - spd_id - SPD instance id (control plane allocated) +// // IpsecSpdAddDel defines message 'ipsec_spd_add_del'. type IpsecSpdAddDel struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -1691,6 +2167,12 @@ func (m *IpsecSpdAddDelReply) Unmarshal(b []byte) error { return nil } +// IPsec policy database response +// +// €param entry - The SPD entry. +// - bytes - byte count of packets matching this policy +// - packets - count of packets matching this policy +// // IpsecSpdDetails defines message 'ipsec_spd_details'. type IpsecSpdDetails struct { Entry ipsec_types.IpsecSpdEntry `binapi:"ipsec_spd_entry,name=entry" json:"entry,omitempty"` @@ -1775,6 +2257,10 @@ func (m *IpsecSpdDetails) Unmarshal(b []byte) error { return nil } +// Dump ipsec policy database data +// - spd_id - SPD instance id +// - sa_id - SA id, optional, set to ~0 to see all policies in SPD +// // IpsecSpdDump defines message 'ipsec_spd_dump'. type IpsecSpdDump struct { SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"` @@ -1812,6 +2298,10 @@ func (m *IpsecSpdDump) Unmarshal(b []byte) error { return nil } +// IPsec: Add/delete Security Policy Database entry +// - is_add - add SPD if non-zero, else delete +// - entry - Description of the entry to add/dell +// // IpsecSpdEntryAddDel defines message 'ipsec_spd_entry_add_del'. // Deprecated: the message will be removed in the future versions type IpsecSpdEntryAddDel struct { @@ -1901,6 +2391,10 @@ func (m *IpsecSpdEntryAddDel) Unmarshal(b []byte) error { return nil } +// IPsec: Reply Add/delete Security Policy Database entry +// - retval - success/fail rutrun code +// - stat_index - An index for the policy in the stats segment @ /net/ipec/policy +// // IpsecSpdEntryAddDelReply defines message 'ipsec_spd_entry_add_del_reply'. // Deprecated: the message will be removed in the future versions type IpsecSpdEntryAddDelReply struct { @@ -1939,6 +2433,10 @@ func (m *IpsecSpdEntryAddDelReply) Unmarshal(b []byte) error { return nil } +// IPsec: Add/delete Security Policy Database entry v2 +// - is_add - add SPD if non-zero, else delete +// - entry - Description of the entry to add/dell +// // IpsecSpdEntryAddDelV2 defines message 'ipsec_spd_entry_add_del_v2'. type IpsecSpdEntryAddDelV2 struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -2027,6 +2525,10 @@ func (m *IpsecSpdEntryAddDelV2) Unmarshal(b []byte) error { return nil } +// IPsec: Reply Add/delete Security Policy Database entry v2 +// - retval - success/fail rutrun code +// - stat_index - An index for the policy in the stats segment @ /net/ipec/policy +// // IpsecSpdEntryAddDelV2Reply defines message 'ipsec_spd_entry_add_del_v2_reply'. type IpsecSpdEntryAddDelV2Reply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -2064,6 +2566,10 @@ func (m *IpsecSpdEntryAddDelV2Reply) Unmarshal(b []byte) error { return nil } +// IPsec: SPD interface response +// - spd_index - SPD index +// - sw_if_index - index of the interface +// // IpsecSpdInterfaceDetails defines message 'ipsec_spd_interface_details'. type IpsecSpdInterfaceDetails struct { SpdIndex uint32 `binapi:"u32,name=spd_index" json:"spd_index,omitempty"` @@ -2101,6 +2607,11 @@ func (m *IpsecSpdInterfaceDetails) Unmarshal(b []byte) error { return nil } +// IPsec: Get SPD interfaces +// - spd_index - SPD index +// - spd_index_valid - if 1 spd_index is used to filter +// spd_index's, if 0 no filtering is done +// // IpsecSpdInterfaceDump defines message 'ipsec_spd_interface_dump'. type IpsecSpdInterfaceDump struct { SpdIndex uint32 `binapi:"u32,name=spd_index" json:"spd_index,omitempty"` @@ -2138,6 +2649,10 @@ func (m *IpsecSpdInterfaceDump) Unmarshal(b []byte) error { return nil } +// Dump IPsec all SPD IDs response +// - spd_id - SPD instance id (control plane allocated) +// - npolicies - number of policies in SPD +// // IpsecSpdsDetails defines message 'ipsec_spds_details'. type IpsecSpdsDetails struct { SpdID uint32 `binapi:"u32,name=spd_id" json:"spd_id,omitempty"` @@ -2175,6 +2690,7 @@ func (m *IpsecSpdsDetails) Unmarshal(b []byte) error { return nil } +// Dump IPsec all SPD IDs // IpsecSpdsDump defines message 'ipsec_spds_dump'. type IpsecSpdsDump struct{} @@ -2332,6 +2848,7 @@ func (m *IpsecTunnelProtectDetails) Unmarshal(b []byte) error { return nil } +// * @brief Dump all tunnel protections // IpsecTunnelProtectDump defines message 'ipsec_tunnel_protect_dump'. type IpsecTunnelProtectDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2365,6 +2882,43 @@ func (m *IpsecTunnelProtectDump) Unmarshal(b []byte) error { return nil } +// Add or Update Protection for a tunnel with IPSEC +// +// Tunnel protection directly associates an SA with all packets +// ingress and egress on the tunnel. This could also be achieved by +// assigning an SPD to the tunnel, but that would incur an unnessccary +// SPD entry lookup. +// For tunnels the ESP acts on the post-encapsulated packet. So if this +// packet: +// +---------+------+ +// | Payload | O-IP | +// +---------+------+ +// where O-IP is the overlay IP addrees that was routed into the tunnel, +// the resulting encapsulated packet will be: +// +---------+------+------+ +// | Payload | O-IP | T-IP | +// +---------+------+------+ +// where T-IP is the tunnel's src.dst IP addresses. +// If the SAs used for protection are in transport mode then the ESP is +// inserted before T-IP, i.e.: +// +---------+------+-----+------+ +// | Payload | O-IP | ESP | T-IP | +// +---------+------+-----+------+ +// If the SAs used for protection are in tunnel mode then another +// encapsulation occurs, i.e.: +// +---------+------+------+-----+------+ +// | Payload | O-IP | T-IP | ESP | C-IP | +// +---------+------+------+-----+------+ +// where C-IP are the crypto endpoint IP addresses defined as the tunnel +// endpoints in the SA. +// The mode for the inbound and outbound SA must be the same. +// - sw_id_index - Tunnel interface to protect +// - nh - The peer/next-hop on the tunnel to which the traffic +// should be protected. For a P2P interface set this to the +// all 0s address. +// - sa_in - The ID [set] of inbound SAs +// - sa_out - The ID of outbound SA +// // IpsecTunnelProtectUpdate defines message 'ipsec_tunnel_protect_update'. type IpsecTunnelProtectUpdate struct { Tunnel IpsecTunnelProtect `binapi:"ipsec_tunnel_protect,name=tunnel" json:"tunnel,omitempty"` @@ -2475,6 +3029,10 @@ func file_ipsec_binapi_init() { api.RegisterMessage((*IpsecSaV2Dump)(nil), "ipsec_sa_v2_dump_2076c2f4") api.RegisterMessage((*IpsecSaV3Details)(nil), "ipsec_sa_v3_details_2fc991ee") api.RegisterMessage((*IpsecSaV3Dump)(nil), "ipsec_sa_v3_dump_2076c2f4") + api.RegisterMessage((*IpsecSaV4Details)(nil), "ipsec_sa_v4_details_87a322d7") + api.RegisterMessage((*IpsecSaV4Dump)(nil), "ipsec_sa_v4_dump_2076c2f4") + api.RegisterMessage((*IpsecSadBind)(nil), "ipsec_sad_bind_0649c0d9") + api.RegisterMessage((*IpsecSadBindReply)(nil), "ipsec_sad_bind_reply_e8d4e804") api.RegisterMessage((*IpsecSadEntryAdd)(nil), "ipsec_sad_entry_add_50229353") api.RegisterMessage((*IpsecSadEntryAddDel)(nil), "ipsec_sad_entry_add_del_ab64b5c6") api.RegisterMessage((*IpsecSadEntryAddDelReply)(nil), "ipsec_sad_entry_add_del_reply_9ffac24b") @@ -2485,6 +3043,10 @@ func file_ipsec_binapi_init() { api.RegisterMessage((*IpsecSadEntryAddReply)(nil), "ipsec_sad_entry_add_reply_9ffac24b") api.RegisterMessage((*IpsecSadEntryDel)(nil), "ipsec_sad_entry_del_3a91bde5") api.RegisterMessage((*IpsecSadEntryDelReply)(nil), "ipsec_sad_entry_del_reply_e8d4e804") + api.RegisterMessage((*IpsecSadEntryUpdate)(nil), "ipsec_sad_entry_update_1412af86") + api.RegisterMessage((*IpsecSadEntryUpdateReply)(nil), "ipsec_sad_entry_update_reply_e8d4e804") + api.RegisterMessage((*IpsecSadUnbind)(nil), "ipsec_sad_unbind_2076c2f4") + api.RegisterMessage((*IpsecSadUnbindReply)(nil), "ipsec_sad_unbind_reply_e8d4e804") api.RegisterMessage((*IpsecSelectBackend)(nil), "ipsec_select_backend_5bcfd3b7") api.RegisterMessage((*IpsecSelectBackendReply)(nil), "ipsec_select_backend_reply_e8d4e804") api.RegisterMessage((*IpsecSetAsyncMode)(nil), "ipsec_set_async_mode_a6465f7c") @@ -2528,6 +3090,10 @@ func AllMessages() []api.Message { (*IpsecSaV2Dump)(nil), (*IpsecSaV3Details)(nil), (*IpsecSaV3Dump)(nil), + (*IpsecSaV4Details)(nil), + (*IpsecSaV4Dump)(nil), + (*IpsecSadBind)(nil), + (*IpsecSadBindReply)(nil), (*IpsecSadEntryAdd)(nil), (*IpsecSadEntryAddDel)(nil), (*IpsecSadEntryAddDelReply)(nil), @@ -2538,6 +3104,10 @@ func AllMessages() []api.Message { (*IpsecSadEntryAddReply)(nil), (*IpsecSadEntryDel)(nil), (*IpsecSadEntryDelReply)(nil), + (*IpsecSadEntryUpdate)(nil), + (*IpsecSadEntryUpdateReply)(nil), + (*IpsecSadUnbind)(nil), + (*IpsecSadUnbindReply)(nil), (*IpsecSelectBackend)(nil), (*IpsecSelectBackendReply)(nil), (*IpsecSetAsyncMode)(nil), diff --git a/binapi/ipsec/ipsec_rpc.ba.go b/binapi/ipsec/ipsec_rpc.ba.go index edc038ce..12731c43 100644 --- a/binapi/ipsec/ipsec_rpc.ba.go +++ b/binapi/ipsec/ipsec_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service ipsec. @@ -21,11 +21,15 @@ type RPCService interface { IpsecSaDump(ctx context.Context, in *IpsecSaDump) (RPCService_IpsecSaDumpClient, error) IpsecSaV2Dump(ctx context.Context, in *IpsecSaV2Dump) (RPCService_IpsecSaV2DumpClient, error) IpsecSaV3Dump(ctx context.Context, in *IpsecSaV3Dump) (RPCService_IpsecSaV3DumpClient, error) + IpsecSaV4Dump(ctx context.Context, in *IpsecSaV4Dump) (RPCService_IpsecSaV4DumpClient, error) + IpsecSadBind(ctx context.Context, in *IpsecSadBind) (*IpsecSadBindReply, error) IpsecSadEntryAdd(ctx context.Context, in *IpsecSadEntryAdd) (*IpsecSadEntryAddReply, error) IpsecSadEntryAddDel(ctx context.Context, in *IpsecSadEntryAddDel) (*IpsecSadEntryAddDelReply, error) IpsecSadEntryAddDelV2(ctx context.Context, in *IpsecSadEntryAddDelV2) (*IpsecSadEntryAddDelV2Reply, error) IpsecSadEntryAddDelV3(ctx context.Context, in *IpsecSadEntryAddDelV3) (*IpsecSadEntryAddDelV3Reply, error) IpsecSadEntryDel(ctx context.Context, in *IpsecSadEntryDel) (*IpsecSadEntryDelReply, error) + IpsecSadEntryUpdate(ctx context.Context, in *IpsecSadEntryUpdate) (*IpsecSadEntryUpdateReply, error) + IpsecSadUnbind(ctx context.Context, in *IpsecSadUnbind) (*IpsecSadUnbindReply, error) IpsecSelectBackend(ctx context.Context, in *IpsecSelectBackend) (*IpsecSelectBackendReply, error) IpsecSetAsyncMode(ctx context.Context, in *IpsecSetAsyncMode) (*IpsecSetAsyncModeReply, error) IpsecSpdAddDel(ctx context.Context, in *IpsecSpdAddDel) (*IpsecSpdAddDelReply, error) @@ -289,6 +293,58 @@ func (c *serviceClient_IpsecSaV3DumpClient) Recv() (*IpsecSaV3Details, error) { } } +func (c *serviceClient) IpsecSaV4Dump(ctx context.Context, in *IpsecSaV4Dump) (RPCService_IpsecSaV4DumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_IpsecSaV4DumpClient{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_IpsecSaV4DumpClient interface { + Recv() (*IpsecSaV4Details, error) + api.Stream +} + +type serviceClient_IpsecSaV4DumpClient struct { + api.Stream +} + +func (c *serviceClient_IpsecSaV4DumpClient) Recv() (*IpsecSaV4Details, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *IpsecSaV4Details: + return m, nil + 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) IpsecSadBind(ctx context.Context, in *IpsecSadBind) (*IpsecSadBindReply, error) { + out := new(IpsecSadBindReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + func (c *serviceClient) IpsecSadEntryAdd(ctx context.Context, in *IpsecSadEntryAdd) (*IpsecSadEntryAddReply, error) { out := new(IpsecSadEntryAddReply) err := c.conn.Invoke(ctx, in, out) @@ -334,6 +390,24 @@ func (c *serviceClient) IpsecSadEntryDel(ctx context.Context, in *IpsecSadEntryD return out, api.RetvalToVPPApiError(out.Retval) } +func (c *serviceClient) IpsecSadEntryUpdate(ctx context.Context, in *IpsecSadEntryUpdate) (*IpsecSadEntryUpdateReply, error) { + out := new(IpsecSadEntryUpdateReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + +func (c *serviceClient) IpsecSadUnbind(ctx context.Context, in *IpsecSadUnbind) (*IpsecSadUnbindReply, error) { + out := new(IpsecSadUnbindReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + func (c *serviceClient) IpsecSelectBackend(ctx context.Context, in *IpsecSelectBackend) (*IpsecSelectBackendReply, error) { out := new(IpsecSelectBackendReply) err := c.conn.Invoke(ctx, in, out) diff --git a/binapi/ipsec_types/ipsec_types.ba.go b/binapi/ipsec_types/ipsec_types.ba.go index 483c1442..0090d4f4 100644 --- a/binapi/ipsec_types/ipsec_types.ba.go +++ b/binapi/ipsec_types/ipsec_types.ba.go @@ -1,24 +1,23 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/ipsec_types.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/ipsec_types.api.json // Package ipsec_types contains generated bindings for API file ipsec_types.api. // // Contents: -// -// 5 enums -// 6 structs +// - 5 enums +// - 6 structs package ipsec_types import ( "strconv" - api "git.fd.io/govpp.git/api" _ "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" tunnel_types "github.com/networkservicemesh/govpp/binapi/tunnel_types" + api "go.fd.io/govpp/api" ) // This is a compile-time assertion to ensure that this generated file @@ -27,6 +26,12 @@ import ( // GoVPP api package needs to be updated. const _ = api.GoVppAPIPackageIsVersion2 +const ( + APIFile = "ipsec_types" + APIVersion = "3.0.1" + VersionCrc = 0x7892423b +) + // IpsecCryptoAlg defines enum 'ipsec_crypto_alg'. type IpsecCryptoAlg uint32 @@ -44,6 +49,9 @@ const ( IPSEC_API_CRYPTO_ALG_DES_CBC IpsecCryptoAlg = 10 IPSEC_API_CRYPTO_ALG_3DES_CBC IpsecCryptoAlg = 11 IPSEC_API_CRYPTO_ALG_CHACHA20_POLY1305 IpsecCryptoAlg = 12 + IPSEC_API_CRYPTO_ALG_AES_NULL_GMAC_128 IpsecCryptoAlg = 13 + IPSEC_API_CRYPTO_ALG_AES_NULL_GMAC_192 IpsecCryptoAlg = 14 + IPSEC_API_CRYPTO_ALG_AES_NULL_GMAC_256 IpsecCryptoAlg = 15 ) var ( @@ -61,6 +69,9 @@ var ( 10: "IPSEC_API_CRYPTO_ALG_DES_CBC", 11: "IPSEC_API_CRYPTO_ALG_3DES_CBC", 12: "IPSEC_API_CRYPTO_ALG_CHACHA20_POLY1305", + 13: "IPSEC_API_CRYPTO_ALG_AES_NULL_GMAC_128", + 14: "IPSEC_API_CRYPTO_ALG_AES_NULL_GMAC_192", + 15: "IPSEC_API_CRYPTO_ALG_AES_NULL_GMAC_256", } IpsecCryptoAlg_value = map[string]uint32{ "IPSEC_API_CRYPTO_ALG_NONE": 0, @@ -76,6 +87,9 @@ var ( "IPSEC_API_CRYPTO_ALG_DES_CBC": 10, "IPSEC_API_CRYPTO_ALG_3DES_CBC": 11, "IPSEC_API_CRYPTO_ALG_CHACHA20_POLY1305": 12, + "IPSEC_API_CRYPTO_ALG_AES_NULL_GMAC_128": 13, + "IPSEC_API_CRYPTO_ALG_AES_NULL_GMAC_192": 14, + "IPSEC_API_CRYPTO_ALG_AES_NULL_GMAC_256": 15, } ) diff --git a/binapi/l2/l2.ba.go b/binapi/l2/l2.ba.go index d89c4602..d776918d 100644 --- a/binapi/l2/l2.ba.go +++ b/binapi/l2/l2.ba.go @@ -1,26 +1,25 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/l2.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/l2.api.json // Package l2 contains generated bindings for API file l2.api. // // Contents: -// -// 3 enums -// 3 structs -// 64 messages +// - 3 enums +// - 3 structs +// - 64 messages package l2 import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ethernet_types "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -178,6 +177,12 @@ type MacEntry struct { Flags uint8 `binapi:"u8,name=flags" json:"flags,omitempty"` } +// Set bridge domain ip to mac entry request +// - bd_id - the bridge domain to set the flags for +// - is_add - if non-zero, add the entry, else clear it +// - ip - ipv4 or ipv6 address +// - mac - MAC address +// // BdIPMacAddDel defines message 'bd_ip_mac_add_del'. type BdIPMacAddDel struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -257,6 +262,12 @@ func (m *BdIPMacAddDelReply) Unmarshal(b []byte) error { return nil } +// bridge domain IP to MAC entry details structure +// - bd_id - bridge domain table id +// - is_ipv6 - if non-zero, ipv6 address, else ipv4 address +// - ip_address - ipv4 or ipv6 address +// - mac_address - MAC address +// // BdIPMacDetails defines message 'bd_ip_mac_details'. type BdIPMacDetails struct { Entry BdIPMac `binapi:"bd_ip_mac,name=entry" json:"entry,omitempty"` @@ -299,6 +310,9 @@ func (m *BdIPMacDetails) Unmarshal(b []byte) error { return nil } +// Dump bridge domain IP to MAC entries +// - bd_id - bridge domain identifier +// // BdIPMacDump defines message 'bd_ip_mac_dump'. type BdIPMacDump struct { BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` @@ -332,6 +346,9 @@ func (m *BdIPMacDump) Unmarshal(b []byte) error { return nil } +// Flush bridge domain IP to MAC entries +// - bd_id - bridge domain identifier +// // BdIPMacFlush defines message 'bd_ip_mac_flush'. type BdIPMacFlush struct { BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` @@ -398,6 +415,17 @@ func (m *BdIPMacFlushReply) Unmarshal(b []byte) error { return nil } +// L2 bridge domain add or delete request - will be deprecated +// - bd_id - the bridge domain to create +// - flood - enable/disable bcast/mcast flooding in the bd +// - uu_flood - enable/disable unknown unicast flood in the bd +// - forward - enable/disable forwarding on all interfaces in the bd +// - learn - enable/disable learning on all interfaces in the bd +// - arp_term - enable/disable arp termination in the bd +// - arp_ufwd - enable/disable arp unicast forwarding in the bd +// - mac_age - mac aging time in min, 0 for disabled +// - is_add - add or delete flag +// // BridgeDomainAddDel defines message 'bridge_domain_add_del'. // Deprecated: the message will be removed in the future versions type BridgeDomainAddDel struct { @@ -502,6 +530,18 @@ func (m *BridgeDomainAddDelReply) Unmarshal(b []byte) error { return nil } +// L2 bridge domain add delete request version 2 +// - bd_id - if the id == ~0 creates a bridge domain with an unused id +// if the id != ~0 the id of the bridge domain to create/delete +// - flood - enable/disable bcast/mcast flooding in the bd +// - uu_flood - enable/disable unknown unicast flood in the bd +// - forward - enable/disable forwarding on all interfaces in the bd +// - learn - enable/disable learning on all interfaces in the bd +// - arp_term - enable/disable arp termination in the bd +// - arp_ufwd - enable/disable arp unicast forwarding in the bd +// - mac_age - mac aging time in min, 0 for disabled +// - is_add - add or delete flag +// // BridgeDomainAddDelV2 defines message 'bridge_domain_add_del_v2'. type BridgeDomainAddDelV2 struct { BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` @@ -571,6 +611,10 @@ func (m *BridgeDomainAddDelV2) Unmarshal(b []byte) error { return nil } +// L2 bridge domain add delete version 2 response +// - retval - return code for the set bridge flags request +// - resulting_id - the id for the new bridge domain +// // BridgeDomainAddDelV2Reply defines message 'bridge_domain_add_del_v2_reply'. type BridgeDomainAddDelV2Reply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -608,6 +652,18 @@ func (m *BridgeDomainAddDelV2Reply) Unmarshal(b []byte) error { return nil } +// L2 bridge domain operational state response +// - bd_id - the bridge domain id +// - flood - bcast/mcast flooding state on all interfaces in the bd +// - uu_flood - unknown unicast flooding state on all interfaces in the bd +// - forward - forwarding state on all interfaces in the bd +// - learn - learning state on all interfaces in the bd +// - arp_term - arp termination state on all interfaces in the bd +// - arp_ufwd - arp unicast forwarding state on all interfaces in the bd +// - mac_age - mac aging time in min, 0 for disabled +// - bd_tag - optional textual tag for the bridge domain +// - n_sw_ifs - number of sw_if_index's in the domain +// // BridgeDomainDetails defines message 'bridge_domain_details'. type BridgeDomainDetails struct { BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` @@ -711,6 +767,10 @@ func (m *BridgeDomainDetails) Unmarshal(b []byte) error { return nil } +// L2 bridge domain request operational state details +// - bd_id - the bridge domain id desired or ~0 to request all bds +// - sw_if_index - filter by sw_if_index UNIMPLEMENTED +// // BridgeDomainDump defines message 'bridge_domain_dump'. type BridgeDomainDump struct { BdID uint32 `binapi:"u32,name=bd_id,default=4294967295" json:"bd_id,omitempty"` @@ -748,6 +808,9 @@ func (m *BridgeDomainDump) Unmarshal(b []byte) error { return nil } +// L2 bridge domain set default learn limit +// - learn limit - maximum number of entries by default for bridge domains +// // BridgeDomainSetDefaultLearnLimit defines message 'bridge_domain_set_default_learn_limit'. type BridgeDomainSetDefaultLearnLimit struct { LearnLimit uint32 `binapi:"u32,name=learn_limit" json:"learn_limit,omitempty"` @@ -818,6 +881,10 @@ func (m *BridgeDomainSetDefaultLearnLimitReply) Unmarshal(b []byte) error { return nil } +// L2 bridge domain set learn limit +// - bd_id - the bridge domain idenntifier +// - learn limit - maximum number of entries for this bd +// // BridgeDomainSetLearnLimit defines message 'bridge_domain_set_learn_limit'. type BridgeDomainSetLearnLimit struct { BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` @@ -890,6 +957,10 @@ func (m *BridgeDomainSetLearnLimitReply) Unmarshal(b []byte) error { return nil } +// L2 bridge domain set mac age +// - bd_id - the bridge domain to create +// - mac_age - mac aging time in min, 0 for disabled +// // BridgeDomainSetMacAge defines message 'bridge_domain_set_mac_age'. type BridgeDomainSetMacAge struct { BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` @@ -960,6 +1031,11 @@ func (m *BridgeDomainSetMacAgeReply) Unmarshal(b []byte) error { return nil } +// Set bridge flags request +// - bd_id - the bridge domain to set the flags for +// - is_set - if non-zero, set the flags, else clear them +// - flags - flags that are non-zero to set or clear +// // BridgeFlags defines message 'bridge_flags'. type BridgeFlags struct { BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` @@ -1001,6 +1077,10 @@ func (m *BridgeFlags) Unmarshal(b []byte) error { return nil } +// Set bridge flags response +// - retval - return code for the set bridge flags request +// - resulting_feature_bitmap - the internal L2 feature bitmap after the request is implemented +// // BridgeFlagsReply defines message 'bridge_flags_reply'. type BridgeFlagsReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1038,6 +1118,10 @@ func (m *BridgeFlagsReply) Unmarshal(b []byte) error { return nil } +// Create BVI interface instance request +// - mac_address - mac addr to assign to the interface if none-zero +// - user_instance - requested instance, ~0 => dynamically allocate +// // BviCreate defines message 'bvi_create'. type BviCreate struct { Mac ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"` @@ -1075,6 +1159,10 @@ func (m *BviCreate) Unmarshal(b []byte) error { return nil } +// Create BVI interface instance response +// - sw_if_index - sw index of the interface that was created +// - retval - return code for the request +// // BviCreateReply defines message 'bvi_create_reply'. type BviCreateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1112,6 +1200,9 @@ func (m *BviCreateReply) Unmarshal(b []byte) error { return nil } +// Delete BVI interface request +// - sw_if_index - sw index of the interface that was created +// // BviDelete defines message 'bvi_delete'. type BviDelete struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1178,6 +1269,14 @@ func (m *BviDeleteReply) Unmarshal(b []byte) error { return nil } +// Tell client about an IP4 ARP resolution event or +// +// MAC/IP info from ARP requests in L2 BDs +// - pid - client pid registered to receive notification +// - ip - IP address of new ARP term entry +// - sw_if_index - interface of new ARP term entry +// - mac - MAC address of new ARP term entry +// // L2ArpTermEvent defines message 'l2_arp_term_event'. type L2ArpTermEvent struct { PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` @@ -1226,6 +1325,7 @@ func (m *L2ArpTermEvent) Unmarshal(b []byte) error { return nil } +// L2 fib clear table request, clear all mac entries in the l2 fib // L2FibClearTable defines message 'l2_fib_clear_table'. type L2FibClearTable struct{} @@ -1286,6 +1386,14 @@ func (m *L2FibClearTableReply) Unmarshal(b []byte) error { return nil } +// l2 fib table details structure +// - bd_id - the l2 fib / bridge domain table id +// - mac - the entry's mac address +// - sw_if_index - index of the interface +// - static_mac - the entry is statically configured. +// - filter_mac - the entry is a mac filter entry. +// - bvi_mac - the mac address is a bridge virtual interface +// // L2FibTableDetails defines message 'l2_fib_table_details'. type L2FibTableDetails struct { BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` @@ -1339,6 +1447,9 @@ func (m *L2FibTableDetails) Unmarshal(b []byte) error { return nil } +// Dump l2 fib (aka bridge domain) table +// - bd_id - the l2 fib / bridge domain table identifier +// // L2FibTableDump defines message 'l2_fib_table_dump'. type L2FibTableDump struct { BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` @@ -1372,6 +1483,16 @@ func (m *L2FibTableDump) Unmarshal(b []byte) error { return nil } +// Set interface L2 flags (such as L2_LEARN, L2_FWD, +// +// L2_FLOOD, L2_UU_FLOOD, or L2_ARP_TERM bits). This can be used +// to disable one or more of the features represented by the +// flag bits on an interface to override what is set as default +// for all interfaces in the bridge domain +// - sw_if_index - interface +// - is_set - if non-zero, set the bits, else clear them +// - feature_bitmap - non-zero bits (as above) to set or clear +// // L2Flags defines message 'l2_flags'. type L2Flags struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1413,6 +1534,10 @@ func (m *L2Flags) Unmarshal(b []byte) error { return nil } +// Set interface L2 flags response +// - retval - return code for the set l2 bits request +// - resulting_feature_bitmap - the internal l2 feature bitmap after the request is implemented +// // L2FlagsReply defines message 'l2_flags_reply'. type L2FlagsReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1450,6 +1575,10 @@ func (m *L2FlagsReply) Unmarshal(b []byte) error { return nil } +// L2 interface ethernet flow point filtering enable/disable request +// - sw_if_index - interface to enable/disable filtering on +// - enable_disable - if non-zero enable filtering, else disable +// // L2InterfaceEfpFilter defines message 'l2_interface_efp_filter'. type L2InterfaceEfpFilter struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1520,6 +1649,16 @@ func (m *L2InterfaceEfpFilterReply) Unmarshal(b []byte) error { return nil } +// L2 interface pbb tag rewrite configure request +// - sw_if_index - interface the operation is applied to +// - vtr_op - Choose from l2_vtr_op_t enum values +// - inner_tag - needed for translate_qinq vtr op only +// - outer_tag - needed for translate_qinq vtr op only +// - b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op +// - b_smac - B-tag local mac address, needed for any push or translate qinq vtr op +// - b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op +// - i_sid - I-tag service id, needed for any push or translate qinq vtr op +// // L2InterfacePbbTagRewrite defines message 'l2_interface_pbb_tag_rewrite'. type L2InterfacePbbTagRewrite struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1612,6 +1751,13 @@ func (m *L2InterfacePbbTagRewriteReply) Unmarshal(b []byte) error { return nil } +// L2 interface vlan tag rewrite configure request +// - sw_if_index - interface the operation is applied to +// - vtr_op - Choose from l2_vtr_op_t enum values +// - push_dot1q - first pushed flag dot1q id set, else dot1ad +// - tag1 - Needed for any push or translate vtr op +// - tag2 - Needed for any push 2 or translate x-2 vtr ops +// // L2InterfaceVlanTagRewrite defines message 'l2_interface_vlan_tag_rewrite'. type L2InterfaceVlanTagRewrite struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1696,6 +1842,11 @@ func (m *L2InterfaceVlanTagRewriteReply) Unmarshal(b []byte) error { return nil } +// L2 MAC event for a list of learned or aged MACs +// - pid - client pid registered to receive notification +// - n_macs - number of learned/aged MAC entries +// - mac - array of learned/aged MAC entries +// // L2MacsEvent defines message 'l2_macs_event'. type L2MacsEvent struct { PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` @@ -1762,6 +1913,11 @@ func (m *L2MacsEvent) Unmarshal(b []byte) error { return nil } +// L2 interface patch add / del request +// - rx_sw_if_index - receive side interface +// - tx_sw_if_index - transmit side interface +// - is_add - if non-zero set up the interface patch, else remove it +// // L2PatchAddDel defines message 'l2_patch_add_del'. type L2PatchAddDel struct { RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"` @@ -1836,6 +1992,10 @@ func (m *L2PatchAddDelReply) Unmarshal(b []byte) error { return nil } +// Reply to l2_xconnect_dump +// - rx_sw_if_index - Receive interface index +// - tx_sw_if_index - Transmit interface index +// // L2XconnectDetails defines message 'l2_xconnect_details'. type L2XconnectDetails struct { RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"` @@ -1873,6 +2033,7 @@ func (m *L2XconnectDetails) Unmarshal(b []byte) error { return nil } +// Dump L2 XConnects // L2XconnectDump defines message 'l2_xconnect_dump'. type L2XconnectDump struct{} @@ -1900,6 +2061,15 @@ func (m *L2XconnectDump) Unmarshal(b []byte) error { return nil } +// L2 FIB add entry request +// - mac - the entry's mac address +// - bd_id - the entry's bridge domain id +// - sw_if_index - the interface +// - is_add - If non zero add the entry, else delete it +// - static_mac - +// - filter_mac - +// - bvi_mac - +// // L2fibAddDel defines message 'l2fib_add_del'. type L2fibAddDel struct { Mac ethernet_types.MacAddress `binapi:"mac_address,name=mac" json:"mac,omitempty"` @@ -1990,6 +2160,7 @@ func (m *L2fibAddDelReply) Unmarshal(b []byte) error { return nil } +// L2 FIB flush all entries // L2fibFlushAll defines message 'l2fib_flush_all'. type L2fibFlushAll struct{} @@ -2050,6 +2221,9 @@ func (m *L2fibFlushAllReply) Unmarshal(b []byte) error { return nil } +// L2 FIB flush bridge domain entries +// - bd_id - the entry's bridge domain id +// // L2fibFlushBd defines message 'l2fib_flush_bd'. type L2fibFlushBd struct { BdID uint32 `binapi:"u32,name=bd_id" json:"bd_id,omitempty"` @@ -2116,6 +2290,9 @@ func (m *L2fibFlushBdReply) Unmarshal(b []byte) error { return nil } +// L2 FIB flush interface entries +// - bd_id - the entry's bridge domain id +// // L2fibFlushInt defines message 'l2fib_flush_int'. type L2fibFlushInt struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2182,6 +2359,9 @@ func (m *L2fibFlushIntReply) Unmarshal(b []byte) error { return nil } +// set l2 table scan delay +// - scan_delay - event scan delay in 10 msec unit +// // L2fibSetScanDelay defines message 'l2fib_set_scan_delay'. type L2fibSetScanDelay struct { ScanDelay uint16 `binapi:"u16,name=scan_delay,default=10" json:"scan_delay,omitempty"` @@ -2248,6 +2428,13 @@ func (m *L2fibSetScanDelayReply) Unmarshal(b []byte) error { return nil } +// Interface bridge mode request +// - rx_sw_if_index - the interface +// - bd_id - bridge domain id +// - port_type - port_mode, see #l2_port_type +// - shg - Split horizon group, for bridge mode only +// - enable - Enable beige mode if not 0, else set to L3 mode +// // SwInterfaceSetL2Bridge defines message 'sw_interface_set_l2_bridge'. type SwInterfaceSetL2Bridge struct { RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"` @@ -2332,6 +2519,11 @@ func (m *SwInterfaceSetL2BridgeReply) Unmarshal(b []byte) error { return nil } +// Set L2 XConnect between two interfaces request +// - rx_sw_if_index - Receive interface index +// - tx_sw_if_index - Transmit interface index +// - enable - enable xconnect if not 0, else set to L3 mode +// // SwInterfaceSetL2Xconnect defines message 'sw_interface_set_l2_xconnect'. type SwInterfaceSetL2Xconnect struct { RxSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=rx_sw_if_index" json:"rx_sw_if_index,omitempty"` @@ -2408,6 +2600,10 @@ func (m *SwInterfaceSetL2XconnectReply) Unmarshal(b []byte) error { return nil } +// Interface set vpath request +// - sw_if_index - interface used to reach neighbor +// - enable - if non-zero enable, else disable +// // SwInterfaceSetVpath defines message 'sw_interface_set_vpath'. type SwInterfaceSetVpath struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -2478,6 +2674,12 @@ func (m *SwInterfaceSetVpathReply) Unmarshal(b []byte) error { return nil } +// Register for IP4 ARP resolution event on receiving ARP reply or +// +// MAC/IP info from ARP requests in L2 BDs +// - enable - 1 => register for events, 0 => cancel registration +// - pid - sender's pid +// // WantL2ArpTermEvents defines message 'want_l2_arp_term_events'. type WantL2ArpTermEvents struct { Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` @@ -2548,6 +2750,13 @@ func (m *WantL2ArpTermEventsReply) Unmarshal(b []byte) error { return nil } +// Register to receive L2 MAC events for learned and aged MAC +// - learn_limit - MAC learn limit +// - scan_delay - event scan delay in 10 msec unit +// - max_macs_in_event - in units of 10 mac entries +// - enable_disable - 1 => register for MAC events, 0 => cancel registration +// - pid - sender's pid +// // WantL2MacsEvents defines message 'want_l2_macs_events'. // Deprecated: the message will be removed in the future versions type WantL2MacsEvents struct { @@ -2598,6 +2807,11 @@ func (m *WantL2MacsEvents) Unmarshal(b []byte) error { return nil } +// Register to receive L2 MAC events for learned and aged MAC +// - max_macs_in_event - in units of 10 mac entries +// - enable_disable - 1 => register for MAC events, 0 => cancel registration +// - pid - sender's pid +// // WantL2MacsEvents2 defines message 'want_l2_macs_events2'. type WantL2MacsEvents2 struct { MaxMacsInEvent uint8 `binapi:"u8,name=max_macs_in_event,default=10" json:"max_macs_in_event,omitempty"` diff --git a/binapi/l2/l2_rpc.ba.go b/binapi/l2/l2_rpc.ba.go index 700aae41..0f91ce0d 100644 --- a/binapi/l2/l2_rpc.ba.go +++ b/binapi/l2/l2_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service l2. diff --git a/binapi/l2tp/l2tp.ba.go b/binapi/l2tp/l2tp.ba.go index a05fb080..4cb2c7ca 100644 --- a/binapi/l2tp/l2tp.ba.go +++ b/binapi/l2tp/l2tp.ba.go @@ -1,25 +1,24 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/l2tp.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/l2tp.api.json // Package l2tp contains generated bindings for API file l2tp.api. // // Contents: -// -// 1 enum -// 10 messages +// - 1 enum +// - 10 messages package l2tp import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" _ "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -64,6 +63,16 @@ func (x L2tLookupKey) String() string { return "L2tLookupKey(" + strconv.Itoa(int(x)) + ")" } +// l2tpv3 tunnel interface create request +// - client_address - remote client tunnel ip address +// - client_address - local tunnel ip address +// - is_ipv6 - ipv6 if non-zero, else ipv4 +// - local_session_id - local tunnel session id +// - remote_session_id - remote tunnel session id +// - local_cookie - local tunnel cookie +// - l2_sublayer_present - l2 sublayer is present in packets if non-zero +// - encap_vrf_id - fib identifier used for outgoing encapsulated packets +// // L2tpv3CreateTunnel defines message 'l2tpv3_create_tunnel'. type L2tpv3CreateTunnel struct { ClientAddress ip_types.Address `binapi:"address,name=client_address" json:"client_address,omitempty"` @@ -131,6 +140,10 @@ func (m *L2tpv3CreateTunnel) Unmarshal(b []byte) error { return nil } +// l2tpv3 tunnel interface create response +// - retval - return code for the request +// - sw_if_index - index of the new tunnel interface +// // L2tpv3CreateTunnelReply defines message 'l2tpv3_create_tunnel_reply'. type L2tpv3CreateTunnelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` diff --git a/binapi/l2tp/l2tp_rpc.ba.go b/binapi/l2tp/l2tp_rpc.ba.go index c008ae38..947bb441 100644 --- a/binapi/l2tp/l2tp_rpc.ba.go +++ b/binapi/l2tp/l2tp_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service l2tp. diff --git a/binapi/l3xc/l3xc.ba.go b/binapi/l3xc/l3xc.ba.go index f68a3a47..d6247c0a 100644 --- a/binapi/l3xc/l3xc.ba.go +++ b/binapi/l3xc/l3xc.ba.go @@ -1,23 +1,22 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/l3xc.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/l3xc.api.json // Package l3xc contains generated bindings for API file l3xc.api. // // Contents: -// -// 1 struct -// 8 messages +// - 1 struct +// - 8 messages package l3xc import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" fib_types "github.com/networkservicemesh/govpp/binapi/fib_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" _ "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -110,6 +109,7 @@ func (m *L3xcDelReply) Unmarshal(b []byte) error { return nil } +// description returned in the dump // L3xcDetails defines message 'l3xc_details'. type L3xcDetails struct { L3xc L3xc `binapi:"l3xc,name=l3xc" json:"l3xc,omitempty"` @@ -222,6 +222,7 @@ func (m *L3xcDetails) Unmarshal(b []byte) error { return nil } +// Dump all L3XC policies // L3xcDump defines message 'l3xc_dump'. type L3xcDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -255,6 +256,7 @@ func (m *L3xcDump) Unmarshal(b []byte) error { return nil } +// Get the plugin version // L3xcPluginGetVersion defines message 'l3xc_plugin_get_version'. type L3xcPluginGetVersion struct{} @@ -282,6 +284,10 @@ func (m *L3xcPluginGetVersion) Unmarshal(b []byte) error { return nil } +// Reply to get the plugin version +// - major - Incremented every time a known breaking behavior change is introduced +// - minor - Incremented with small changes, may be used to avoid buggy versions +// // L3xcPluginGetVersionReply defines message 'l3xc_plugin_get_version_reply'. type L3xcPluginGetVersionReply struct { Major uint32 `binapi:"u32,name=major" json:"major,omitempty"` @@ -319,6 +325,11 @@ func (m *L3xcPluginGetVersionReply) Unmarshal(b []byte) error { return nil } +// A description of an L3XC policy +// - input interface of the x-connect +// - n_paths Number of paths +// - paths The set of forwarding paths. +// // L3xcUpdate defines message 'l3xc_update'. type L3xcUpdate struct { L3xc L3xc `binapi:"l3xc,name=l3xc" json:"l3xc,omitempty"` diff --git a/binapi/l3xc/l3xc_rpc.ba.go b/binapi/l3xc/l3xc_rpc.ba.go index 77f2bcfe..381a2622 100644 --- a/binapi/l3xc/l3xc_rpc.ba.go +++ b/binapi/l3xc/l3xc_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service l3xc. diff --git a/binapi/lacp/lacp.ba.go b/binapi/lacp/lacp.ba.go index c9306b9f..f2ea8f07 100644 --- a/binapi/lacp/lacp.ba.go +++ b/binapi/lacp/lacp.ba.go @@ -1,21 +1,20 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/lacp.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/lacp.api.json // Package lacp contains generated bindings for API file lacp.api. // // Contents: -// -// 2 messages +// - 2 messages package lacp import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ethernet_types "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -30,6 +29,27 @@ const ( VersionCrc = 0xe1609dab ) +// Reply for lacp dump request +// - sw_if_index - software index of member interface +// - interface_name - name of member interface +// - rx_state - rx machine state +// - tx_state - tx machine state +// - mux_state - mux machine state +// - ptx_state - ptx machine state +// - bond_interface_name - name of bond interface +// - actor_system_priority - actor system priority +// - actor_system - actor system +// - actor_key - actor key +// - actor_port_priority - actor port priority +// - actor_port_number - actor port number +// - actor_state - actor state +// - partner_system_priority - partner system priority +// - partner_system - partner system +// - partner_key - partner key +// - partner_port_priority - partner port priority +// - partner_port_number - partner port number +// - partner_state - partner state +// // SwInterfaceLacpDetails defines message 'sw_interface_lacp_details'. type SwInterfaceLacpDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -135,6 +155,7 @@ func (m *SwInterfaceLacpDetails) Unmarshal(b []byte) error { return nil } +// Dump lacp interfaces request // SwInterfaceLacpDump defines message 'sw_interface_lacp_dump'. type SwInterfaceLacpDump struct{} diff --git a/binapi/lacp/lacp_rpc.ba.go b/binapi/lacp/lacp_rpc.ba.go index a426fc34..a6d71275 100644 --- a/binapi/lacp/lacp_rpc.ba.go +++ b/binapi/lacp/lacp_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service lacp. diff --git a/binapi/lb/lb.ba.go b/binapi/lb/lb.ba.go index 29aae74b..842f6e71 100644 --- a/binapi/lb/lb.ba.go +++ b/binapi/lb/lb.ba.go @@ -1,22 +1,21 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/lb.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/lb.api.json // Package lb contains generated bindings for API file lb.api. // // Contents: -// -// 16 messages +// - 18 messages package lb import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" lb_types "github.com/networkservicemesh/govpp/binapi/lb_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -27,10 +26,18 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "lb" - APIVersion = "1.0.0" - VersionCrc = 0x50c0a6c9 + APIVersion = "1.1.0" + VersionCrc = 0x49e3c1c1 ) +// Add an application server for a given VIP +// - pfx - ip prefix and length +// - protocol - tcp or udp. +// - port - destination port. +// - as_address - The application server address (IPv4 in lower order 32 bits). +// - is_del - The AS should be removed. +// - is_flush - The sessions related to this AS should be flushed. +// // LbAddDelAs defines message 'lb_add_del_as'. type LbAddDelAs struct { Pfx ip_types.AddressWithPrefix `binapi:"address_with_prefix,name=pfx" json:"pfx,omitempty"` @@ -126,6 +133,10 @@ func (m *LbAddDelAsReply) Unmarshal(b []byte) error { return nil } +// Enable/disable NAT4 feature on the interface +// - is_add - true if add, false if delete +// - sw_if_index - software index of the interface +// // LbAddDelIntfNat4 defines message 'lb_add_del_intf_nat4'. type LbAddDelIntfNat4 struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -196,6 +207,10 @@ func (m *LbAddDelIntfNat4Reply) Unmarshal(b []byte) error { return nil } +// Enable/disable NAT6 feature on the interface +// - is_add - true if add, false if delete +// - sw_if_index - software index of the interface +// // LbAddDelIntfNat6 defines message 'lb_add_del_intf_nat6'. type LbAddDelIntfNat6 struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -266,6 +281,19 @@ func (m *LbAddDelIntfNat6Reply) Unmarshal(b []byte) error { return nil } +// Add a virtual address (or prefix) +// - pfx - ip prefix and length +// - protocol - tcp or udp. +// - port - destination port. (0) means 'all-port VIP' +// - encap - Encap is ip4 GRE(0) or ip6 GRE(1) or L3DSR(2) or NAT4(3) or NAT6(4). +// - dscp - DSCP bit corresponding to VIP(applicable in L3DSR mode only). +// - type - service type(applicable in NAT4/NAT6 mode only). +// - target_port - Pod's port corresponding to specific service(applicable in NAT4/NAT6 mode only). +// - node_port - Node's port(applicable in NAT4/NAT6 mode only). +// - new_flows_table_length - Size of the new connections flow table used +// for this VIP (must be power of 2). +// - is_del - The VIP should be removed. +// // LbAddDelVip defines message 'lb_add_del_vip'. type LbAddDelVip struct { Pfx ip_types.AddressWithPrefix `binapi:"address_with_prefix,name=pfx" json:"pfx,omitempty"` @@ -374,6 +402,135 @@ func (m *LbAddDelVipReply) Unmarshal(b []byte) error { return nil } +// Add a virtual address (or prefix) +// - pfx - ip prefix and length +// - protocol - tcp or udp. +// - port - destination port. (0) means 'all-port VIP' +// - encap - Encap is ip4 GRE(0) or ip6 GRE(1) or L3DSR(2) or NAT4(3) or NAT6(4). +// - dscp - DSCP bit corresponding to VIP(applicable in L3DSR mode only). +// - type - service type(applicable in NAT4/NAT6 mode only). +// - target_port - Pod's port corresponding to specific service(applicable in NAT4/NAT6 mode only). +// - node_port - Node's port(applicable in NAT4/NAT6 mode only). +// - new_flows_table_length - Size of the new connections flow table used +// for this VIP (must be power of 2). +// - src_ip_sticky - source ip based sticky session. +// - is_del - The VIP should be removed. +// +// LbAddDelVipV2 defines message 'lb_add_del_vip_v2'. +type LbAddDelVipV2 struct { + Pfx ip_types.AddressWithPrefix `binapi:"address_with_prefix,name=pfx" json:"pfx,omitempty"` + Protocol uint8 `binapi:"u8,name=protocol,default=255" json:"protocol,omitempty"` + Port uint16 `binapi:"u16,name=port" json:"port,omitempty"` + Encap lb_types.LbEncapType `binapi:"lb_encap_type,name=encap" json:"encap,omitempty"` + Dscp uint8 `binapi:"u8,name=dscp" json:"dscp,omitempty"` + Type lb_types.LbSrvType `binapi:"lb_srv_type,name=type" json:"type,omitempty"` + TargetPort uint16 `binapi:"u16,name=target_port" json:"target_port,omitempty"` + NodePort uint16 `binapi:"u16,name=node_port" json:"node_port,omitempty"` + NewFlowsTableLength uint32 `binapi:"u32,name=new_flows_table_length,default=1024" json:"new_flows_table_length,omitempty"` + SrcIPSticky bool `binapi:"bool,name=src_ip_sticky" json:"src_ip_sticky,omitempty"` + IsDel bool `binapi:"bool,name=is_del" json:"is_del,omitempty"` +} + +func (m *LbAddDelVipV2) Reset() { *m = LbAddDelVipV2{} } +func (*LbAddDelVipV2) GetMessageName() string { return "lb_add_del_vip_v2" } +func (*LbAddDelVipV2) GetCrcString() string { return "7c520e0f" } +func (*LbAddDelVipV2) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *LbAddDelVipV2) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.Pfx.Address.Af + size += 1 * 16 // m.Pfx.Address.Un + size += 1 // m.Pfx.Len + size += 1 // m.Protocol + size += 2 // m.Port + size += 4 // m.Encap + size += 1 // m.Dscp + size += 4 // m.Type + size += 2 // m.TargetPort + size += 2 // m.NodePort + size += 4 // m.NewFlowsTableLength + size += 1 // m.SrcIPSticky + size += 1 // m.IsDel + return size +} +func (m *LbAddDelVipV2) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint8(uint8(m.Pfx.Address.Af)) + buf.EncodeBytes(m.Pfx.Address.Un.XXX_UnionData[:], 16) + buf.EncodeUint8(m.Pfx.Len) + buf.EncodeUint8(m.Protocol) + buf.EncodeUint16(m.Port) + buf.EncodeUint32(uint32(m.Encap)) + buf.EncodeUint8(m.Dscp) + buf.EncodeUint32(uint32(m.Type)) + buf.EncodeUint16(m.TargetPort) + buf.EncodeUint16(m.NodePort) + buf.EncodeUint32(m.NewFlowsTableLength) + buf.EncodeBool(m.SrcIPSticky) + buf.EncodeBool(m.IsDel) + return buf.Bytes(), nil +} +func (m *LbAddDelVipV2) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Pfx.Address.Af = ip_types.AddressFamily(buf.DecodeUint8()) + copy(m.Pfx.Address.Un.XXX_UnionData[:], buf.DecodeBytes(16)) + m.Pfx.Len = buf.DecodeUint8() + m.Protocol = buf.DecodeUint8() + m.Port = buf.DecodeUint16() + m.Encap = lb_types.LbEncapType(buf.DecodeUint32()) + m.Dscp = buf.DecodeUint8() + m.Type = lb_types.LbSrvType(buf.DecodeUint32()) + m.TargetPort = buf.DecodeUint16() + m.NodePort = buf.DecodeUint16() + m.NewFlowsTableLength = buf.DecodeUint32() + m.SrcIPSticky = buf.DecodeBool() + m.IsDel = buf.DecodeBool() + return nil +} + +// LbAddDelVipV2Reply defines message 'lb_add_del_vip_v2_reply'. +type LbAddDelVipV2Reply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *LbAddDelVipV2Reply) Reset() { *m = LbAddDelVipV2Reply{} } +func (*LbAddDelVipV2Reply) GetMessageName() string { return "lb_add_del_vip_v2_reply" } +func (*LbAddDelVipV2Reply) GetCrcString() string { return "e8d4e804" } +func (*LbAddDelVipV2Reply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *LbAddDelVipV2Reply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *LbAddDelVipV2Reply) 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 *LbAddDelVipV2Reply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// lb_as_details +// - as - AS detail record +// // LbAsDetails defines message 'lb_as_details'. type LbAsDetails struct { Vip lb_types.LbVip `binapi:"lb_vip,name=vip" json:"vip,omitempty"` @@ -434,6 +591,11 @@ func (m *LbAsDetails) Unmarshal(b []byte) error { return nil } +// dump AS list per VIP or all ASs for all VIPs +// - pfx - ip prefix and length. +// - protocol - tcp or udp. +// - port - destination port. +// // LbAsDump defines message 'lb_as_dump'. type LbAsDump struct { Pfx ip_types.AddressWithPrefix `binapi:"address_with_prefix,name=pfx" json:"pfx,omitempty"` @@ -481,6 +643,14 @@ func (m *LbAsDump) Unmarshal(b []byte) error { return nil } +// Configure Load-Balancer global parameters (unlike the CLI, both ip4_src_address and ip6_src_address need to be specified. +// - ip4_src_address - IPv4 address to be used as source for IPv4 traffic(applicable in GRE4/GRE6/NAT4/NAT6 mode only). +// - ip6_src_address - IPv6 address to be used as source for IPv6 traffic(applicable in GRE4/GRE6/NAT4/NAT6 mode only). +// - sticky_buckets_per_core - Number of buckets *per worker thread* in the +// established flow table (must be power of 2). +// - flow_timeout - Time in seconds after which, if no packet is received +// for a given flow, the flow is removed from the established flow table. +// // LbConf defines message 'lb_conf'. type LbConf struct { IP4SrcAddress ip_types.IP4Address `binapi:"ip4_address,name=ip4_src_address" json:"ip4_src_address,omitempty"` @@ -559,6 +729,11 @@ func (m *LbConfReply) Unmarshal(b []byte) error { return nil } +// Flush a given vip +// - pfx - ip prefix and length +// - protocol - tcp or udp. +// - port - destination port. +// // LbFlushVip defines message 'lb_flush_vip'. type LbFlushVip struct { Pfx ip_types.AddressWithPrefix `binapi:"address_with_prefix,name=pfx" json:"pfx,omitempty"` @@ -639,6 +814,9 @@ func (m *LbFlushVipReply) Unmarshal(b []byte) error { return nil } +// Reply all configured vip +// - vip - all vip addrs. +// // LbVipDetails defines message 'lb_vip_details'. type LbVipDetails struct { Vip lb_types.LbVip `binapi:"lb_vip,name=vip" json:"vip,omitempty"` @@ -704,6 +882,7 @@ func (m *LbVipDetails) Unmarshal(b []byte) error { return nil } +// Dump all vips // LbVipDump defines message 'lb_vip_dump'. type LbVipDump struct { Pfx ip_types.AddressWithPrefix `binapi:"address_with_prefix,name=pfx" json:"pfx,omitempty"` @@ -768,6 +947,8 @@ func file_lb_binapi_init() { api.RegisterMessage((*LbAddDelIntfNat6Reply)(nil), "lb_add_del_intf_nat6_reply_e8d4e804") api.RegisterMessage((*LbAddDelVip)(nil), "lb_add_del_vip_6fa569c7") api.RegisterMessage((*LbAddDelVipReply)(nil), "lb_add_del_vip_reply_e8d4e804") + api.RegisterMessage((*LbAddDelVipV2)(nil), "lb_add_del_vip_v2_7c520e0f") + api.RegisterMessage((*LbAddDelVipV2Reply)(nil), "lb_add_del_vip_v2_reply_e8d4e804") api.RegisterMessage((*LbAsDetails)(nil), "lb_as_details_8d24c29e") api.RegisterMessage((*LbAsDump)(nil), "lb_as_dump_1063f819") api.RegisterMessage((*LbConf)(nil), "lb_conf_56cd3261") @@ -789,6 +970,8 @@ func AllMessages() []api.Message { (*LbAddDelIntfNat6Reply)(nil), (*LbAddDelVip)(nil), (*LbAddDelVipReply)(nil), + (*LbAddDelVipV2)(nil), + (*LbAddDelVipV2Reply)(nil), (*LbAsDetails)(nil), (*LbAsDump)(nil), (*LbConf)(nil), diff --git a/binapi/lb/lb_rpc.ba.go b/binapi/lb/lb_rpc.ba.go index e56040d3..5f8579d0 100644 --- a/binapi/lb/lb_rpc.ba.go +++ b/binapi/lb/lb_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service lb. @@ -17,6 +17,7 @@ type RPCService interface { LbAddDelIntfNat4(ctx context.Context, in *LbAddDelIntfNat4) (*LbAddDelIntfNat4Reply, error) LbAddDelIntfNat6(ctx context.Context, in *LbAddDelIntfNat6) (*LbAddDelIntfNat6Reply, error) LbAddDelVip(ctx context.Context, in *LbAddDelVip) (*LbAddDelVipReply, error) + LbAddDelVipV2(ctx context.Context, in *LbAddDelVipV2) (*LbAddDelVipV2Reply, error) LbAsDump(ctx context.Context, in *LbAsDump) (RPCService_LbAsDumpClient, error) LbConf(ctx context.Context, in *LbConf) (*LbConfReply, error) LbFlushVip(ctx context.Context, in *LbFlushVip) (*LbFlushVipReply, error) @@ -67,6 +68,15 @@ func (c *serviceClient) LbAddDelVip(ctx context.Context, in *LbAddDelVip) (*LbAd return out, api.RetvalToVPPApiError(out.Retval) } +func (c *serviceClient) LbAddDelVipV2(ctx context.Context, in *LbAddDelVipV2) (*LbAddDelVipV2Reply, error) { + out := new(LbAddDelVipV2Reply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + func (c *serviceClient) LbAsDump(ctx context.Context, in *LbAsDump) (RPCService_LbAsDumpClient, error) { stream, err := c.conn.NewStream(ctx) if err != nil { diff --git a/binapi/lb_types/lb_types.ba.go b/binapi/lb_types/lb_types.ba.go index 0310f361..74260e82 100644 --- a/binapi/lb_types/lb_types.ba.go +++ b/binapi/lb_types/lb_types.ba.go @@ -1,22 +1,21 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/lb_types.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/lb_types.api.json // Package lb_types contains generated bindings for API file lb_types.api. // // Contents: -// -// 5 enums -// 1 struct +// - 5 enums +// - 1 struct package lb_types import ( "strconv" - api "git.fd.io/govpp.git/api" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" ) // This is a compile-time assertion to ensure that this generated file @@ -25,6 +24,12 @@ import ( // GoVPP api package needs to be updated. const _ = api.GoVppAPIPackageIsVersion2 +const ( + APIFile = "lb_types" + APIVersion = "1.0.0" + VersionCrc = 0xba19340c +) + // LbEncapType defines enum 'lb_encap_type'. type LbEncapType uint32 diff --git a/binapi/lcp/lcp.ba.go b/binapi/lcp/lcp.ba.go index 6a0ccd5a..524a471e 100644 --- a/binapi/lcp/lcp.ba.go +++ b/binapi/lcp/lcp.ba.go @@ -1,23 +1,22 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/lcp.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/lcp.api.json // Package lcp contains generated bindings for API file lcp.api. // // Contents: -// -// 1 enum -// 15 messages +// - 1 enum +// - 15 messages package lcp import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -59,6 +58,7 @@ func (x LcpItfHostType) String() string { return "LcpItfHostType(" + strconv.Itoa(int(x)) + ")" } +// get the default Linux Control Plane netns // LcpDefaultNsGet defines message 'lcp_default_ns_get'. type LcpDefaultNsGet struct{} @@ -86,6 +86,9 @@ func (m *LcpDefaultNsGet) Unmarshal(b []byte) error { return nil } +// get the default Linux Control Plane netns +// - netns - the default netns; netns[0] == 0 if none +// // LcpDefaultNsGetReply defines message 'lcp_default_ns_get_reply'. // InProgress: the message form may change in the future versions type LcpDefaultNsGetReply struct { @@ -120,6 +123,9 @@ func (m *LcpDefaultNsGetReply) Unmarshal(b []byte) error { return nil } +// Set the default Linux Control Plane netns +// - netns - the new default netns; netns[0] == 0 if none +// // LcpDefaultNsSet defines message 'lcp_default_ns_set'. // InProgress: the message form may change in the future versions type LcpDefaultNsSet struct { @@ -188,8 +194,15 @@ func (m *LcpDefaultNsSetReply) Unmarshal(b []byte) error { return nil } +// Add or delete a Linux Conrol Plane interface pair +// - is_add - 0 if deleting, != 0 if adding +// - sw_if_index - index of VPP PHY SW interface +// - host_if_name - host tap interface name +// - host_if_type - the type of host interface to create (tun, tap) +// - netns - optional tap netns; netns[0] == 0 if none +// // LcpItfPairAddDel defines message 'lcp_itf_pair_add_del'. -// InProgress: the message form may change in the future versions +// Deprecated: the message will be removed in the future versions type LcpItfPairAddDel struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -239,7 +252,7 @@ func (m *LcpItfPairAddDel) Unmarshal(b []byte) error { } // LcpItfPairAddDelReply defines message 'lcp_itf_pair_add_del_reply'. -// InProgress: the message form may change in the future versions +// Deprecated: the message will be removed in the future versions type LcpItfPairAddDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -323,6 +336,7 @@ func (m *LcpItfPairAddDelV2) Unmarshal(b []byte) error { } // LcpItfPairAddDelV2Reply defines message 'lcp_itf_pair_add_del_v2_reply'. +// InProgress: the message form may change in the future versions type LcpItfPairAddDelV2Reply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` HostSwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=host_sw_if_index" json:"host_sw_if_index,omitempty"` @@ -359,6 +373,14 @@ func (m *LcpItfPairAddDelV2Reply) Unmarshal(b []byte) error { return nil } +// Linux Control Plane interface pair dump response +// - phy_sw_if_index - VPP's sw_if_index for the PHY +// - host_sw_if_index - VPP's sw_if_index for the host tap +// - vif_index - tap linux index +// - host_if_name - host interface name +// - host_if_type - host interface type (tun, tap) +// - netns - host interface netns +// // LcpItfPairDetails defines message 'lcp_itf_pair_details'. // InProgress: the message form may change in the future versions type LcpItfPairDetails struct { @@ -413,6 +435,9 @@ func (m *LcpItfPairDetails) Unmarshal(b []byte) error { return nil } +// Dump Linux Control Plane interface pair data +// - sw_if_index - interface to use as filter (~0 == "all") +// // LcpItfPairGet defines message 'lcp_itf_pair_get'. type LcpItfPairGet struct { Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` @@ -483,6 +508,7 @@ func (m *LcpItfPairGetReply) Unmarshal(b []byte) error { return nil } +// Replace end/begin // LcpItfPairReplaceBegin defines message 'lcp_itf_pair_replace_begin'. type LcpItfPairReplaceBegin struct{} diff --git a/binapi/lcp/lcp_rpc.ba.go b/binapi/lcp/lcp_rpc.ba.go index 40154107..cabaa55c 100644 --- a/binapi/lcp/lcp_rpc.ba.go +++ b/binapi/lcp/lcp_rpc.ba.go @@ -7,7 +7,7 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service lcp. @@ -78,7 +78,7 @@ func (c *serviceClient) LcpItfPairGet(ctx context.Context, in *LcpItfPairGet) (R } type RPCService_LcpItfPairGetClient interface { - Recv() (*LcpItfPairDetails, error) + Recv() (*LcpItfPairDetails, *LcpItfPairGetReply, error) api.Stream } @@ -86,22 +86,26 @@ type serviceClient_LcpItfPairGetClient struct { api.Stream } -func (c *serviceClient_LcpItfPairGetClient) Recv() (*LcpItfPairDetails, error) { +func (c *serviceClient_LcpItfPairGetClient) Recv() (*LcpItfPairDetails, *LcpItfPairGetReply, error) { msg, err := c.Stream.RecvMsg() if err != nil { - return nil, err + return nil, nil, err } switch m := msg.(type) { case *LcpItfPairDetails: - return m, nil + return m, nil, nil case *LcpItfPairGetReply: + if err := api.RetvalToVPPApiError(m.Retval); err != nil { + c.Stream.Close() + return nil, m, err + } err = c.Stream.Close() if err != nil { - return nil, err + return nil, m, err } - return nil, io.EOF + return nil, m, io.EOF default: - return nil, fmt.Errorf("unexpected message: %T %v", m, m) + return nil, nil, fmt.Errorf("unexpected message: %T %v", m, m) } } diff --git a/binapi/lisp/lisp.ba.go b/binapi/lisp/lisp.ba.go index 0888b87c..99ee66af 100644 --- a/binapi/lisp/lisp.ba.go +++ b/binapi/lisp/lisp.ba.go @@ -1,27 +1,26 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/lisp.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/lisp.api.json // Package lisp contains generated bindings for API file lisp.api. // // Contents: -// -// 1 enum -// 1 struct -// 60 messages +// - 1 enum +// - 1 struct +// - 60 messages package lisp import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" _ "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" lisp_types "github.com/networkservicemesh/govpp/binapi/lisp_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -72,6 +71,12 @@ type LispAdjacency struct { Leid lisp_types.Eid `binapi:"eid,name=leid" json:"leid,omitempty"` } +// add or delete LISP adjacency adjacency +// - is_add - add address if non-zero, else delete +// - vni - virtual network instance +// - reid - remote EID +// - leid - local EID +// // LispAddDelAdjacency defines message 'lisp_add_del_adjacency'. type LispAddDelAdjacency struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -156,6 +161,13 @@ func (m *LispAddDelAdjacencyReply) Unmarshal(b []byte) error { return nil } +// add or delete lisp eid-table +// - is_add - add address if non-zero, else delete +// - eid - endpoint identifier +// - locator_set_name - name of locator_set to add/del eid-table +// - vni - virtual network instance +// - key - secret key +// // LispAddDelLocalEid defines message 'lisp_add_del_local_eid'. type LispAddDelLocalEid struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -245,6 +257,13 @@ func (m *LispAddDelLocalEidReply) Unmarshal(b []byte) error { return nil } +// add or delete locator for locator_set +// - is_add - add address if non-zero, else delete +// - locator_set_name - name of locator_set to add/del locator +// - sw_if_index - index of the interface +// - priority - priority of the lisp locator +// - weight - weight of the lisp locator +// // LispAddDelLocator defines message 'lisp_add_del_locator'. type LispAddDelLocator struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -327,6 +346,12 @@ func (m *LispAddDelLocatorReply) Unmarshal(b []byte) error { return nil } +// add or delete locator_set +// - is_add - add address if non-zero, else delete +// - locator_set_name - locator name +// - locator_num - number of locators +// - locators - LISP locator records +// // LispAddDelLocatorSet defines message 'lisp_add_del_locator_set'. type LispAddDelLocatorSet struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -394,6 +419,10 @@ func (m *LispAddDelLocatorSet) Unmarshal(b []byte) error { return nil } +// Reply for locator_set add/del +// - retval - return code +// - ls_index - locator set index +// // LispAddDelLocatorSetReply defines message 'lisp_add_del_locator_set_reply'. type LispAddDelLocatorSetReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -431,6 +460,10 @@ func (m *LispAddDelLocatorSetReply) Unmarshal(b []byte) error { return nil } +// add or delete map request itr rlocs +// - is_add - add address if non-zero, else delete +// - locator_set_name - locator set name +// // LispAddDelMapRequestItrRlocs defines message 'lisp_add_del_map_request_itr_rlocs'. type LispAddDelMapRequestItrRlocs struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -505,6 +538,10 @@ func (m *LispAddDelMapRequestItrRlocsReply) Unmarshal(b []byte) error { return nil } +// add or delete map-resolver +// - is_add - add address if non-zero, else delete +// - ip_address - ip address +// // LispAddDelMapResolver defines message 'lisp_add_del_map_resolver'. type LispAddDelMapResolver struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -578,6 +615,10 @@ func (m *LispAddDelMapResolverReply) Unmarshal(b []byte) error { return nil } +// Add/delete map server +// - is_add - add address if non-zero; delete otherwise +// - ip_address - map server IP address +// // LispAddDelMapServer defines message 'lisp_add_del_map_server'. type LispAddDelMapServer struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -651,6 +692,17 @@ func (m *LispAddDelMapServerReply) Unmarshal(b []byte) error { return nil } +// add or delete remote static mapping +// - is_add - add address if non-zero, else delete +// - is_src_dst - flag indicating src/dst based routing policy +// - del_all - if set, delete all remote mappings +// - vni - virtual network instance +// - action - negative map-reply action +// - deid - dst EID +// - seid - src EID, valid only if is_src_dst is enabled +// - rloc_num - number of remote locators +// - rlocs - remote locator records +// // LispAddDelRemoteMapping defines message 'lisp_add_del_remote_mapping'. type LispAddDelRemoteMapping struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -782,6 +834,9 @@ func (m *LispAddDelRemoteMappingReply) Unmarshal(b []byte) error { return nil } +// Request for LISP adjacencies +// - vni - filter adjacencies by VNI +// // LispAdjacenciesGet defines message 'lisp_adjacencies_get'. type LispAdjacenciesGet struct { Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` @@ -815,6 +870,10 @@ func (m *LispAdjacenciesGet) Unmarshal(b []byte) error { return nil } +// LISP adjacency reply +// - count - number of adjacencies +// - adjacencies - array of adjacencies +// // LispAdjacenciesGetReply defines message 'lisp_adjacencies_get_reply'. type LispAdjacenciesGetReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -881,6 +940,11 @@ func (m *LispAdjacenciesGetReply) Unmarshal(b []byte) error { return nil } +// map/unmap vni/bd_index to vrf +// - is_add - add or delete mapping +// - dp_table - virtual network id/bridge domain index +// - vrf - vrf +// // LispEidTableAddDelMap defines message 'lisp_eid_table_add_del_map'. type LispEidTableAddDelMap struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -959,6 +1023,23 @@ func (m *LispEidTableAddDelMapReply) Unmarshal(b []byte) error { return nil } +// Dump lisp eid-table +// - locator_set_index - index of locator_set, if ~0 then the mapping +// is negative +// - action - negative map request action +// - is_local - local if non-zero, else remote +// - is_src_dst - EID is type of source/destination +// - deid - dst EID +// - seid - src EID +// - vni - virtual network instance +// - ttl - time to live +// - authoritative - authoritative +// - key_id +// HMAC_NO_KEY 0 +// HMAC_SHA_1_96 1 +// HMAC_SHA_256_128 2 +// - key - secret key +// // LispEidTableDetails defines message 'lisp_eid_table_details'. type LispEidTableDetails struct { LocatorSetIndex uint32 `binapi:"u32,name=locator_set_index" json:"locator_set_index,omitempty"` @@ -1038,6 +1119,18 @@ func (m *LispEidTableDetails) Unmarshal(b []byte) error { return nil } +// Request for eid table summary status +// - eid_set - if non-zero request info about specific mapping +// - vni - virtual network instance; valid only if eid_set != 0 +// - prefix_length - prefix length if EID is IP address; +// valid only if eid_set != 0 +// - eid - endpoint identifier +// - filter - filter type; +// Support values: +// 0: all eid +// 1: local eid +// 2: remote eid +// // LispEidTableDump defines message 'lisp_eid_table_dump'. type LispEidTableDump struct { EidSet uint8 `binapi:"u8,name=eid_set" json:"eid_set,omitempty"` @@ -1090,6 +1183,10 @@ func (m *LispEidTableDump) Unmarshal(b []byte) error { return nil } +// Shows relationship between vni and vrf/bd +// - dp_table - VRF index or bridge domain index +// - vni - virtual network instance +// // LispEidTableMapDetails defines message 'lisp_eid_table_map_details'. type LispEidTableMapDetails struct { Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` @@ -1127,6 +1224,9 @@ func (m *LispEidTableMapDetails) Unmarshal(b []byte) error { return nil } +// Request for lisp_eid_table_map_details +// - is_l2 - if set dump vni/bd mappings else vni/vrf +// // LispEidTableMapDump defines message 'lisp_eid_table_map_dump'. type LispEidTableMapDump struct { IsL2 bool `binapi:"bool,name=is_l2" json:"is_l2,omitempty"` @@ -1160,6 +1260,9 @@ func (m *LispEidTableMapDump) Unmarshal(b []byte) error { return nil } +// reply to lisp_eid_table_vni_dump +// - vni - virtual network instance +// // LispEidTableVniDetails defines message 'lisp_eid_table_vni_details'. type LispEidTableVniDetails struct { Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` @@ -1193,6 +1296,7 @@ func (m *LispEidTableVniDetails) Unmarshal(b []byte) error { return nil } +// Dumps all VNIs used in mappings // LispEidTableVniDump defines message 'lisp_eid_table_vni_dump'. type LispEidTableVniDump struct{} @@ -1220,6 +1324,9 @@ func (m *LispEidTableVniDump) Unmarshal(b []byte) error { return nil } +// enable or disable LISP feature +// - is_en - enable protocol if non-zero, else disable +// // LispEnableDisable defines message 'lisp_enable_disable'. type LispEnableDisable struct { IsEnable bool `binapi:"bool,name=is_enable,default=true" json:"is_enable,omitempty"` @@ -1286,6 +1393,9 @@ func (m *LispEnableDisableReply) Unmarshal(b []byte) error { return nil } +// Get LISP map request itr rlocs status +// - locator_set_name - name of the locator_set +// // LispGetMapRequestItrRlocs defines message 'lisp_get_map_request_itr_rlocs'. type LispGetMapRequestItrRlocs struct{} @@ -1313,6 +1423,7 @@ func (m *LispGetMapRequestItrRlocs) Unmarshal(b []byte) error { return nil } +// Request for map request itr rlocs summary status // LispGetMapRequestItrRlocsReply defines message 'lisp_get_map_request_itr_rlocs_reply'. type LispGetMapRequestItrRlocsReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1352,6 +1463,14 @@ func (m *LispGetMapRequestItrRlocsReply) Unmarshal(b []byte) error { return nil } +// LISP locator_set status +// - local - if is set, then locator is local +// - locator_set_name - name of the locator_set +// - sw_if_index - sw_if_index of the locator +// - ip_address - ip address +// - priority - locator priority +// - weight - locator weight +// // LispLocatorDetails defines message 'lisp_locator_details'. type LispLocatorDetails struct { Local uint8 `binapi:"u8,name=local" json:"local,omitempty"` @@ -1404,6 +1523,11 @@ func (m *LispLocatorDetails) Unmarshal(b []byte) error { return nil } +// Request for map lisp locator status +// - locator_set_index - index of locator_set +// - ls_name - locator set name +// - is_index_set - flag indicating whether ls_name or ls_index is set +// // LispLocatorDump defines message 'lisp_locator_dump'. type LispLocatorDump struct { LsIndex uint32 `binapi:"u32,name=ls_index" json:"ls_index,omitempty"` @@ -1445,6 +1569,10 @@ func (m *LispLocatorDump) Unmarshal(b []byte) error { return nil } +// LISP locator_set status +// - ls_index - locator set index +// - ls_name - name of the locator set +// // LispLocatorSetDetails defines message 'lisp_locator_set_details'. type LispLocatorSetDetails struct { LsIndex uint32 `binapi:"u32,name=ls_index" json:"ls_index,omitempty"` @@ -1482,6 +1610,9 @@ func (m *LispLocatorSetDetails) Unmarshal(b []byte) error { return nil } +// Request for locator_set summary status +// - filter - filter type +// // LispLocatorSetDump defines message 'lisp_locator_set_dump'. type LispLocatorSetDump struct { Filter LispLocatorSetFilter `binapi:"lisp_locator_set_filter,name=filter" json:"filter,omitempty"` @@ -1515,6 +1646,9 @@ func (m *LispLocatorSetDump) Unmarshal(b []byte) error { return nil } +// enable/disable LISP map-register +// - is_enable - enable if non-zero; disable otherwise +// // LispMapRegisterEnableDisable defines message 'lisp_map_register_enable_disable'. type LispMapRegisterEnableDisable struct { IsEnable bool `binapi:"bool,name=is_enable,default=true" json:"is_enable,omitempty"` @@ -1585,6 +1719,11 @@ func (m *LispMapRegisterEnableDisableReply) Unmarshal(b []byte) error { return nil } +// set LISP map-request mode. Based on configuration VPP will send +// +// src/dest or just normal destination map requests. +// - is_src_dst - if non-zero source/destination else destination only +// // LispMapRequestMode defines message 'lisp_map_request_mode'. type LispMapRequestMode struct { IsSrcDst bool `binapi:"bool,name=is_src_dst" json:"is_src_dst,omitempty"` @@ -1651,6 +1790,9 @@ func (m *LispMapRequestModeReply) Unmarshal(b []byte) error { return nil } +// LISP map resolver status +// - ip_address - array of address bytes +// // LispMapResolverDetails defines message 'lisp_map_resolver_details'. type LispMapResolverDetails struct { IPAddress ip_types.Address `binapi:"address,name=ip_address" json:"ip_address,omitempty"` @@ -1687,6 +1829,7 @@ func (m *LispMapResolverDetails) Unmarshal(b []byte) error { return nil } +// Request for map resolver summary status // LispMapResolverDump defines message 'lisp_map_resolver_dump'. type LispMapResolverDump struct{} @@ -1714,6 +1857,9 @@ func (m *LispMapResolverDump) Unmarshal(b []byte) error { return nil } +// LISP map server details +// - ip_address - array of address bytes +// // LispMapServerDetails defines message 'lisp_map_server_details'. type LispMapServerDetails struct { IPAddress ip_types.Address `binapi:"address,name=ip_address" json:"ip_address,omitempty"` @@ -1750,6 +1896,7 @@ func (m *LispMapServerDetails) Unmarshal(b []byte) error { return nil } +// Request for map server summary status // LispMapServerDump defines message 'lisp_map_server_dump'. type LispMapServerDump struct{} @@ -1777,6 +1924,10 @@ func (m *LispMapServerDump) Unmarshal(b []byte) error { return nil } +// configure or disable LISP PITR node +// - ls_name - locator set name +// - is_add - add locator set if non-zero, else disable pitr +// // LispPitrSetLocatorSet defines message 'lisp_pitr_set_locator_set'. type LispPitrSetLocatorSet struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -1847,6 +1998,9 @@ func (m *LispPitrSetLocatorSetReply) Unmarshal(b []byte) error { return nil } +// enable/disable LISP RLOC probing +// - is_enable - enable if non-zero; disable otherwise +// // LispRlocProbeEnableDisable defines message 'lisp_rloc_probe_enable_disable'. type LispRlocProbeEnableDisable struct { IsEnable bool `binapi:"bool,name=is_enable,default=true" json:"is_enable,omitempty"` @@ -1915,6 +2069,10 @@ func (m *LispRlocProbeEnableDisableReply) Unmarshal(b []byte) error { return nil } +// configure or disable use of PETR +// - ip_address - PETR IP address +// - is_add - add locator set if non-zero, else disable pitr +// // LispUsePetr defines message 'lisp_use_petr'. type LispUsePetr struct { IPAddress ip_types.Address `binapi:"address,name=ip_address" json:"ip_address,omitempty"` @@ -1988,6 +2146,7 @@ func (m *LispUsePetrReply) Unmarshal(b []byte) error { return nil } +// Get state of LISP map-register // ShowLispMapRegisterState defines message 'show_lisp_map_register_state'. type ShowLispMapRegisterState struct{} @@ -2015,6 +2174,9 @@ func (m *ShowLispMapRegisterState) Unmarshal(b []byte) error { return nil } +// Reply for show_lisp_map_register_state +// - retval - return code +// // ShowLispMapRegisterStateReply defines message 'show_lisp_map_register_state_reply'. type ShowLispMapRegisterStateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -2054,6 +2216,7 @@ func (m *ShowLispMapRegisterStateReply) Unmarshal(b []byte) error { return nil } +// Request for LISP map-request mode // ShowLispMapRequestMode defines message 'show_lisp_map_request_mode'. type ShowLispMapRequestMode struct{} @@ -2081,6 +2244,10 @@ func (m *ShowLispMapRequestMode) Unmarshal(b []byte) error { return nil } +// Reply for show_lisp_map_request_mode +// - retval - return code +// - is_src_dst - if non-zero source/destination else destination only +// // ShowLispMapRequestModeReply defines message 'show_lisp_map_request_mode_reply'. type ShowLispMapRequestModeReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -2120,6 +2287,7 @@ func (m *ShowLispMapRequestModeReply) Unmarshal(b []byte) error { return nil } +// Request for lisp pitr status // ShowLispPitr defines message 'show_lisp_pitr'. type ShowLispPitr struct{} @@ -2147,6 +2315,10 @@ func (m *ShowLispPitr) Unmarshal(b []byte) error { return nil } +// Status of lisp pitr, enable or disable +// - status - lisp pitr enable if non-zero, else disable +// - locator_set_name - name of the locator_set +// // ShowLispPitrReply defines message 'show_lisp_pitr_reply'. type ShowLispPitrReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -2188,6 +2360,7 @@ func (m *ShowLispPitrReply) Unmarshal(b []byte) error { return nil } +// Get state of LISP RLOC probing // ShowLispRlocProbeState defines message 'show_lisp_rloc_probe_state'. type ShowLispRlocProbeState struct{} @@ -2215,6 +2388,10 @@ func (m *ShowLispRlocProbeState) Unmarshal(b []byte) error { return nil } +// Reply for show_lisp_rloc_probe_state +// - retval - return code +// - is_enabled - state of RLOC probing +// // ShowLispRlocProbeStateReply defines message 'show_lisp_rloc_probe_state_reply'. type ShowLispRlocProbeStateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -2254,6 +2431,7 @@ func (m *ShowLispRlocProbeStateReply) Unmarshal(b []byte) error { return nil } +// Request for lisp-gpe protocol status // ShowLispStatus defines message 'show_lisp_status'. type ShowLispStatus struct{} @@ -2281,6 +2459,10 @@ func (m *ShowLispStatus) Unmarshal(b []byte) error { return nil } +// Status of lisp, enable or disable +// - feature_status - lisp enable if non-zero, else disable +// - gpe_status - lisp enable if non-zero, else disable +// // ShowLispStatusReply defines message 'show_lisp_status_reply'. type ShowLispStatusReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -2322,6 +2504,7 @@ func (m *ShowLispStatusReply) Unmarshal(b []byte) error { return nil } +// Request for LISP PETR status // ShowLispUsePetr defines message 'show_lisp_use_petr'. type ShowLispUsePetr struct{} @@ -2349,6 +2532,10 @@ func (m *ShowLispUsePetr) Unmarshal(b []byte) error { return nil } +// LISP PETR status, enable or disable +// - status - LISP PETR enable if non-zero, else disable +// - address - PETR IP address +// // ShowLispUsePetrReply defines message 'show_lisp_use_petr_reply'. type ShowLispUsePetrReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` diff --git a/binapi/lisp/lisp_rpc.ba.go b/binapi/lisp/lisp_rpc.ba.go index 18ef66da..ba736b62 100644 --- a/binapi/lisp/lisp_rpc.ba.go +++ b/binapi/lisp/lisp_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service lisp. diff --git a/binapi/lisp_gpe/lisp_gpe.ba.go b/binapi/lisp_gpe/lisp_gpe.ba.go index 82f9363a..d695d148 100644 --- a/binapi/lisp_gpe/lisp_gpe.ba.go +++ b/binapi/lisp_gpe/lisp_gpe.ba.go @@ -1,24 +1,23 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/lisp_gpe.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/lisp_gpe.api.json // Package lisp_gpe contains generated bindings for API file lisp_gpe.api. // // Contents: -// -// 3 structs -// 20 messages +// - 3 structs +// - 20 messages package lisp_gpe import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" _ "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" lisp_types "github.com/networkservicemesh/govpp/binapi/lisp_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -56,6 +55,16 @@ type GpeNativeFwdRpath struct { NhAddr ip_types.Address `binapi:"address,name=nh_addr" json:"nh_addr,omitempty"` } +// add or delete GPE tunnel +// - is_add - add address if non-zero, else delete +// - rmt_eid - remote eid +// - lcl_eid - local eid +// - vni - virtual network identifier +// - dp_table - vrf/bridge domain id +// - action - negative action when 0 locators configured +// - loc_num - number of locators +// - locs - array of remote locators +// // GpeAddDelFwdEntry defines message 'gpe_add_del_fwd_entry'. type GpeAddDelFwdEntry struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -182,6 +191,9 @@ func (m *GpeAddDelFwdEntryReply) Unmarshal(b []byte) error { return nil } +// add or delete gpe_iface +// - is_add - add address if non-zero, else delete +// // GpeAddDelIface defines message 'gpe_add_del_iface'. type GpeAddDelIface struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -260,6 +272,14 @@ func (m *GpeAddDelIfaceReply) Unmarshal(b []byte) error { return nil } +// Add native fwd rpath +// - retval - return code +// - is_add - flag to indicate add or del +// - table_id - table id for route path +// - nh_sw_if_index - next-hop sw_if_index (~0 if not set) +// - is_ip4 - flag to indicate if nh is ip4 +// - nh_addr - next hop ip address +// // GpeAddDelNativeFwdRpath defines message 'gpe_add_del_native_fwd_rpath'. type GpeAddDelNativeFwdRpath struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -343,6 +363,9 @@ func (m *GpeAddDelNativeFwdRpathReply) Unmarshal(b []byte) error { return nil } +// enable or disable gpe protocol +// - is_enable [default=true] - enable protocol if non-zero, else disable +// // GpeEnableDisable defines message 'gpe_enable_disable'. type GpeEnableDisable struct { IsEnable bool `binapi:"bool,name=is_enable,default=true" json:"is_enable,omitempty"` @@ -679,6 +702,9 @@ func (m *GpeFwdEntryVnisGetReply) Unmarshal(b []byte) error { return nil } +// get GPE encapsulation mode +// - mode - LISP (value 0) or VXLAN (value 1) +// // GpeGetEncapMode defines message 'gpe_get_encap_mode'. type GpeGetEncapMode struct{} @@ -706,6 +732,10 @@ func (m *GpeGetEncapMode) Unmarshal(b []byte) error { return nil } +// Reply for set_encap_mode +// - retval - return code +// - encap_mode - GPE encapsulation mode +// // GpeGetEncapModeReply defines message 'gpe_get_encap_mode_reply'. type GpeGetEncapModeReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -743,6 +773,7 @@ func (m *GpeGetEncapModeReply) Unmarshal(b []byte) error { return nil } +// get GPE native fwd rpath // GpeNativeFwdRpathsGet defines message 'gpe_native_fwd_rpaths_get'. type GpeNativeFwdRpathsGet struct { IsIP4 bool `binapi:"bool,name=is_ip4" json:"is_ip4,omitempty"` @@ -776,6 +807,12 @@ func (m *GpeNativeFwdRpathsGet) Unmarshal(b []byte) error { return nil } +// Reply for get native fwd rpath +// - retval - return code +// - table_id - table id for route path +// - nh_sw_if_index - next-hop sw_if_index (~0 if not set) +// - nh_addr - next hop address +// // GpeNativeFwdRpathsGetReply defines message 'gpe_native_fwd_rpaths_get_reply'. type GpeNativeFwdRpathsGetReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -842,6 +879,9 @@ func (m *GpeNativeFwdRpathsGetReply) Unmarshal(b []byte) error { return nil } +// Set GPE encapsulation mode +// - mode - LISP (value 0) or VXLAN (value 1) +// // GpeSetEncapMode defines message 'gpe_set_encap_mode'. type GpeSetEncapMode struct { IsVxlan bool `binapi:"bool,name=is_vxlan" json:"is_vxlan,omitempty"` diff --git a/binapi/lisp_gpe/lisp_gpe_rpc.ba.go b/binapi/lisp_gpe/lisp_gpe_rpc.ba.go index 88f2eb35..8620968e 100644 --- a/binapi/lisp_gpe/lisp_gpe_rpc.ba.go +++ b/binapi/lisp_gpe/lisp_gpe_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service lisp_gpe. diff --git a/binapi/lisp_types/lisp_types.ba.go b/binapi/lisp_types/lisp_types.ba.go index 36ad4355..4471a4a7 100644 --- a/binapi/lisp_types/lisp_types.ba.go +++ b/binapi/lisp_types/lisp_types.ba.go @@ -1,26 +1,25 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/lisp_types.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/lisp_types.api.json // Package lisp_types contains generated bindings for API file lisp_types.api. // // Contents: -// -// 2 enums -// 5 structs -// 1 union +// - 2 enums +// - 5 structs +// - 1 union package lisp_types import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ethernet_types "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,6 +28,12 @@ import ( // GoVPP api package needs to be updated. const _ = api.GoVppAPIPackageIsVersion2 +const ( + APIFile = "lisp_types" + APIVersion = "1.0.0" + VersionCrc = 0xf05d92a6 +) + // EidType defines enum 'eid_type'. type EidType uint8 diff --git a/binapi/lldp/lldp.ba.go b/binapi/lldp/lldp.ba.go index ba7575b3..51279db4 100644 --- a/binapi/lldp/lldp.ba.go +++ b/binapi/lldp/lldp.ba.go @@ -1,21 +1,20 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/lldp.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/lldp.api.json // Package lldp contains generated bindings for API file lldp.api. // // Contents: -// -// 4 messages +// - 4 messages package lldp import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -30,6 +29,12 @@ const ( VersionCrc = 0x8a7e7049 ) +// configure global parameter for LLDP +// - system_name - VPP system name +// - tx_hold - multiplier for tx_interval when setting time-to-live (TTL) +// value in the LLDP packets +// - tx_interval - time interval, in seconds, between each LLDP frames +// // LldpConfig defines message 'lldp_config'. type LldpConfig struct { TxHold uint32 `binapi:"u32,name=tx_hold" json:"tx_hold,omitempty"` @@ -104,6 +109,14 @@ func (m *LldpConfigReply) Unmarshal(b []byte) error { return nil } +// Interface set LLDP request +// - sw_if_index - interface for which to enable/disable LLDP +// - mgmt_ip4_addr - management ip4 address of the interface +// - mgmt_ip6_addr - management ip6 address of the interface +// - mgmt_oid - OID(Object Identifier) of the interface +// - enable - if non-zero enable, else disable +// - port_desc - local port description +// // SwInterfaceSetLldp defines message 'sw_interface_set_lldp'. type SwInterfaceSetLldp struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/binapi/lldp/lldp_rpc.ba.go b/binapi/lldp/lldp_rpc.ba.go index d9fdbc5d..bf32fcf5 100644 --- a/binapi/lldp/lldp_rpc.ba.go +++ b/binapi/lldp/lldp_rpc.ba.go @@ -5,7 +5,7 @@ package lldp import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service lldp. diff --git a/binapi/mactime/mactime.ba.go b/binapi/mactime/mactime.ba.go index 421e013e..e578bd0f 100644 --- a/binapi/mactime/mactime.ba.go +++ b/binapi/mactime/mactime.ba.go @@ -1,22 +1,21 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/mactime.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/mactime.api.json // Package mactime contains generated bindings for API file mactime.api. // // Contents: -// -// 2 structs -// 7 messages +// - 2 structs +// - 7 messages package mactime import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ethernet_types "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -43,6 +42,37 @@ type TimeRange struct { End float64 `binapi:"f64,name=end" json:"end,omitempty"` } +// @brief configure per src-mac time ranges +// +// * +// * Usage: +// * to create a static allow entry: +// * set mac_address, device_name, is_add=1, and allow=1. +// * +// * to create a static drop entry: +// * set mac_address, device_name, is_add=1, and drop=1. +// * +// * to create a (time-range-based) dynamic allow entry: +// * set mac_address, device_name, is_add=1, set allow=1. +// * set count = number of ranges +// * set each range start/end in seconds since Sunday began +// * As in: start/end >= 0.0 && start/end < 7.0 *86400.0 +// * +// * to create a (time-range-based) dynamic allow entry with quota: +// * Outside of stated time ranges, such entries revert to allow with no quota. +// * previous setup, s/allow=1/allow_quota=1/ +// * +// * to create a (time-range-based) dynamic drop entry: +// * Same procedure to create a dynamic allow entry, +// * set drop=1 instead of allow=1 +// * +// * to delete a per src-mac entry (of any kind) +// * set mac_address, is_add=0 +// * note: deletes all ranges. +// * +// * See mactime_test.c:api_mactime_add_del_range(...) for +// * a working example. +// // MactimeAddDelRange defines message 'mactime_add_del_range'. type MactimeAddDelRange struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -164,6 +194,7 @@ func (m *MactimeAddDelRangeReply) Unmarshal(b []byte) error { return nil } +// @brief mactime table entry details // MactimeDetails defines message 'mactime_details'. type MactimeDetails struct { PoolIndex uint32 `binapi:"u32,name=pool_index" json:"pool_index,omitempty"` @@ -244,6 +275,16 @@ func (m *MactimeDetails) Unmarshal(b []byte) error { return nil } +// @brief dump mactime table +// +// * +// * Request a mactime client pool dump +// * Sequence: +// * client send vl_api_mactime_dump to vpp +// * vpp replies with zero or more vl_api_mactime_entry_t's +// * vpp replies with a vl_api_mactime_dump_reply_t +// * - my_table_epoch dump table only if update needed, 0 => full dump +// // MactimeDump defines message 'mactime_dump'. type MactimeDump struct { MyTableEpoch uint32 `binapi:"u32,name=my_table_epoch" json:"my_table_epoch,omitempty"` @@ -277,6 +318,9 @@ func (m *MactimeDump) Unmarshal(b []byte) error { return nil } +// @brief dump mactime table reply +// - Includes the vpp table epoch, needed to optimize API traffic +// // MactimeDumpReply defines message 'mactime_dump_reply'. type MactimeDumpReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -314,6 +358,10 @@ func (m *MactimeDumpReply) Unmarshal(b []byte) error { return nil } +// @brief api to enable or disable the time-based src mac filter on +// +// an interface +// // MactimeEnableDisable defines message 'mactime_enable_disable'. type MactimeEnableDisable struct { EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"` diff --git a/binapi/mactime/mactime_rpc.ba.go b/binapi/mactime/mactime_rpc.ba.go index 09493538..7393a595 100644 --- a/binapi/mactime/mactime_rpc.ba.go +++ b/binapi/mactime/mactime_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service mactime. diff --git a/binapi/map/map.ba.go b/binapi/map/map.ba.go index c434470f..99a353e5 100644 --- a/binapi/map/map.ba.go +++ b/binapi/map/map.ba.go @@ -1,21 +1,20 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/map.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/map.api.json // Package maps contains generated bindings for API file map.api. // // Contents: -// -// 32 messages +// - 32 messages package maps import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -30,6 +29,12 @@ const ( VersionCrc = 0xd1f7f56c ) +// Add or Delete MAP rule from a domain (Only used for shared IPv4 per subscriber) +// - index - MAP Domain index +// - is_add - If 1 add rule, if 0 delete rule +// - ip6_dst - MAP CE IPv6 address +// - psid - Rule PSID +// // MapAddDelRule defines message 'map_add_del_rule'. type MapAddDelRule struct { Index uint32 `binapi:"u32,name=index" json:"index,omitempty"` @@ -108,6 +113,16 @@ func (m *MapAddDelRuleReply) Unmarshal(b []byte) error { return nil } +// Add MAP domains +// - ip6_prefix - Rule IPv6 prefix +// - ip4_prefix - Rule IPv4 prefix +// - ip6_src - MAP domain IPv6 BR address / Tunnel source +// - ea_bits_len - Embedded Address bits length +// - psid_offset - Port Set Identifier (PSID) offset +// - psid_length - PSID length +// - mtu - MTU. default 1280 +// - tag - A user field stored with the MAP +// // MapAddDomain defines message 'map_add_domain'. type MapAddDomain struct { IP6Prefix ip_types.IP6Prefix `binapi:"ip6_prefix,name=ip6_prefix" json:"ip6_prefix,omitempty"` @@ -178,6 +193,10 @@ func (m *MapAddDomain) Unmarshal(b []byte) error { return nil } +// Reply for MAP domain add +// - index - MAP domain index +// - retval - return code +// // MapAddDomainReply defines message 'map_add_domain_reply'. type MapAddDomainReply struct { Index uint32 `binapi:"u32,name=index" json:"index,omitempty"` @@ -215,6 +234,9 @@ func (m *MapAddDomainReply) Unmarshal(b []byte) error { return nil } +// Delete MAP domain +// - index - MAP Domain index +// // MapDelDomain defines message 'map_del_domain'. type MapDelDomain struct { Index uint32 `binapi:"u32,name=index" json:"index,omitempty"` @@ -281,6 +303,18 @@ func (m *MapDelDomainReply) Unmarshal(b []byte) error { return nil } +// Details about a single MAP domain +// - domain_index - MAP domain index +// - ip6_prefix - Rule IPv6 prefix +// - ip4_prefix - Rule IPv4 prefix +// - ip6_src - MAP domain IPv6 BR address / Tunnel source +// - ea_bits_len - Embedded Address bits length +// - psid_offset - Port Set Identifier (PSID) offset +// - psid_length - PSID length +// - flags - +// - mtu - MTU +// - tag - The user field stored with the MAP at creation time +// // MapDomainDetails defines message 'map_domain_details'. type MapDomainDetails struct { DomainIndex uint32 `binapi:"u32,name=domain_index" json:"domain_index,omitempty"` @@ -387,6 +421,7 @@ func (m *MapDomainDump) Unmarshal(b []byte) error { return nil } +// Get list of map domains // MapDomainsGet defines message 'map_domains_get'. type MapDomainsGet struct { Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` @@ -457,6 +492,11 @@ func (m *MapDomainsGetReply) Unmarshal(b []byte) error { return nil } +// Enable or disable a MAP interface +// - sw_if_index - +// - is_enable - 0=disable, 1=enable interface +// - is_translation - 0=encapsulation, 1=translation +// // 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"` @@ -531,6 +571,11 @@ func (m *MapIfEnableDisableReply) Unmarshal(b []byte) error { return nil } +// Add/delete MAP pre-resolve IP addresses parameters +// - is_add - 1 = Add non-zero IP addresses, 0 = delete +// - ip4_nh_address - direct IP4 next-hop address +// - ip6_nh_address - direct IP6 next-hop address +// // MapParamAddDelPreResolve defines message 'map_param_add_del_pre_resolve'. type MapParamAddDelPreResolve struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -607,6 +652,7 @@ func (m *MapParamAddDelPreResolveReply) Unmarshal(b []byte) error { return nil } +// Request for a single block of MAP parameters // MapParamGet defines message 'map_param_get'. type MapParamGet struct{} @@ -634,6 +680,19 @@ func (m *MapParamGet) Unmarshal(b []byte) error { return nil } +// Reply for map_param_get request +// - retval - return code for request +// - inner - 1=frag inner packet, 0=frag tunnel packets, ~0=untouched +// - ignore_df - 1=IP4 fragm despite DF bit, 0=honor DF, ~0=untouched +// - icmp_ip4_err_relay_src - IPv4 ICMP err relay src address +// - icmp6_enable_unreachable - 1 = send ICMP unreachable err msgs +// - ip4_nh_address - direct IP4 next-hop address +// - ip6_nh_address - direct IP6 next-hop address +// - sec_check_enable - 1=enable security check on first inbound packet +// - sec_check_fragments - 1=enable check on (subsequent) fragments too +// - tc_copy - 1 = copy packet class/TOS field, 0 = use class instead +// - tc_class - class field value when copy == 0 +// // MapParamGetReply defines message 'map_param_get_reply'. type MapParamGetReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -723,6 +782,10 @@ func (m *MapParamGetReply) Unmarshal(b []byte) error { return nil } +// Set MAP fragmentation parameters +// - inner - 1=frag inner packet, 0=frag tunnel packets +// - ignore_df - 1=IP4 fragment despite DF bit, 0=honor DF +// // MapParamSetFragmentation defines message 'map_param_set_fragmentation'. type MapParamSetFragmentation struct { Inner bool `binapi:"bool,name=inner" json:"inner,omitempty"` @@ -795,6 +858,9 @@ func (m *MapParamSetFragmentationReply) Unmarshal(b []byte) error { return nil } +// Set MAP ICMP parameters +// - icmp4_err_relay_src - IPv4 ICMP err relay src address +// // MapParamSetICMP defines message 'map_param_set_icmp'. type MapParamSetICMP struct { IP4ErrRelaySrc ip_types.IP4Address `binapi:"ip4_address,name=ip4_err_relay_src" json:"ip4_err_relay_src,omitempty"` @@ -828,6 +894,9 @@ func (m *MapParamSetICMP) Unmarshal(b []byte) error { return nil } +// Set MAP ICMP6 parameters +// - enable_unreachable - 1 = send ICMP unreachable err msgs +// // MapParamSetICMP6 defines message 'map_param_set_icmp6'. type MapParamSetICMP6 struct { EnableUnreachable bool `binapi:"bool,name=enable_unreachable" json:"enable_unreachable,omitempty"` @@ -927,6 +996,10 @@ func (m *MapParamSetICMPReply) Unmarshal(b []byte) error { return nil } +// Set MAP security-check parameters +// - enable - 1=enable security check on first inbound packet +// - fragments - 1=enable check on (subsequent) fragments too +// // MapParamSetSecurityCheck defines message 'map_param_set_security_check'. type MapParamSetSecurityCheck struct { Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` @@ -999,6 +1072,10 @@ func (m *MapParamSetSecurityCheckReply) Unmarshal(b []byte) error { return nil } +// Set MAP TCP parameters +// +// @parma tcp_mss - TCP MSS clamping value +// // MapParamSetTCP defines message 'map_param_set_tcp'. type MapParamSetTCP struct { TCPMss uint16 `binapi:"u16,name=tcp_mss" json:"tcp_mss,omitempty"` @@ -1065,6 +1142,10 @@ func (m *MapParamSetTCPReply) Unmarshal(b []byte) error { return nil } +// Set MAP traffic class parameters +// - copy - 1 = copy packet class/TOS field, 0 = use tc_class instead +// - tc_class - class field value when copy == 0 +// // MapParamSetTrafficClass defines message 'map_param_set_traffic_class'. type MapParamSetTrafficClass struct { Copy bool `binapi:"bool,name=copy" json:"copy,omitempty"` @@ -1207,6 +1288,7 @@ func (m *MapRuleDump) Unmarshal(b []byte) error { return nil } +// Request for a single block of summary stats // MapSummaryStats defines message 'map_summary_stats'. type MapSummaryStats struct{} @@ -1234,6 +1316,13 @@ func (m *MapSummaryStats) Unmarshal(b []byte) error { return nil } +// Reply for map_summary_stats request +// - retval - return code for request +// - total_bindings - +// - total_pkts - +// - total_ip4_fragments - +// - total_security_check - +// // MapSummaryStatsReply defines message 'map_summary_stats_reply'. type MapSummaryStatsReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` diff --git a/binapi/map/map_rpc.ba.go b/binapi/map/map_rpc.ba.go index 18a0513d..6d7a3a36 100644 --- a/binapi/map/map_rpc.ba.go +++ b/binapi/map/map_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service map. @@ -122,7 +122,7 @@ func (c *serviceClient) MapDomainsGet(ctx context.Context, in *MapDomainsGet) (R } type RPCService_MapDomainsGetClient interface { - Recv() (*MapDomainDetails, error) + Recv() (*MapDomainDetails, *MapDomainsGetReply, error) api.Stream } @@ -130,22 +130,26 @@ type serviceClient_MapDomainsGetClient struct { api.Stream } -func (c *serviceClient_MapDomainsGetClient) Recv() (*MapDomainDetails, error) { +func (c *serviceClient_MapDomainsGetClient) Recv() (*MapDomainDetails, *MapDomainsGetReply, error) { msg, err := c.Stream.RecvMsg() if err != nil { - return nil, err + return nil, nil, err } switch m := msg.(type) { case *MapDomainDetails: - return m, nil + return m, nil, nil case *MapDomainsGetReply: + if err := api.RetvalToVPPApiError(m.Retval); err != nil { + c.Stream.Close() + return nil, m, err + } err = c.Stream.Close() if err != nil { - return nil, err + return nil, m, err } - return nil, io.EOF + return nil, m, io.EOF default: - return nil, fmt.Errorf("unexpected message: %T %v", m, m) + return nil, nil, fmt.Errorf("unexpected message: %T %v", m, m) } } diff --git a/binapi/mdata/mdata.ba.go b/binapi/mdata/mdata.ba.go index af123bbf..9f0fb8d2 100644 --- a/binapi/mdata/mdata.ba.go +++ b/binapi/mdata/mdata.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/mdata.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/mdata.api.json // Package mdata contains generated bindings for API file mdata.api. // // Contents: -// -// 2 messages +// - 2 messages package mdata import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" _ "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,8 +28,10 @@ const ( VersionCrc = 0x5bd69477 ) +// @brief API to enable / disable mdata on an interface +// - enable_disable - 1 to enable, 0 to disable the feature +// // MdataEnableDisable defines message 'mdata_enable_disable'. -// InProgress: the message form may change in the future versions type MdataEnableDisable struct { EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"` } @@ -64,7 +65,6 @@ func (m *MdataEnableDisable) Unmarshal(b []byte) error { } // MdataEnableDisableReply defines message 'mdata_enable_disable_reply'. -// InProgress: the message form may change in the future versions type MdataEnableDisableReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } diff --git a/binapi/mdata/mdata_rpc.ba.go b/binapi/mdata/mdata_rpc.ba.go index 8ae8748c..717d5c78 100644 --- a/binapi/mdata/mdata_rpc.ba.go +++ b/binapi/mdata/mdata_rpc.ba.go @@ -5,7 +5,7 @@ package mdata import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service mdata. diff --git a/binapi/memclnt/memclnt.ba.go b/binapi/memclnt/memclnt.ba.go index 80001f4a..d467db37 100644 --- a/binapi/memclnt/memclnt.ba.go +++ b/binapi/memclnt/memclnt.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/memclnt.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/memclnt.api.json // Package memclnt contains generated bindings for API file memclnt.api. // // Contents: -// -// 2 structs -// 26 messages +// - 2 structs +// - 26 messages package memclnt import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -43,6 +42,9 @@ type ModuleVersion struct { Name string `binapi:"string[64],name=name" json:"name,omitempty"` } +// /* +// - Get API version table (includes built-in and plugins) +// // APIVersions defines message 'api_versions'. type APIVersions struct{} @@ -136,6 +138,7 @@ func (m *APIVersionsReply) Unmarshal(b []byte) error { return nil } +// Control ping from client to api server request // ControlPing defines message 'control_ping'. type ControlPing struct{} @@ -163,6 +166,10 @@ func (m *ControlPing) Unmarshal(b []byte) error { return nil } +// Control ping from the client to the server response +// - retval - return code for the request +// - vpe_pid - the pid of the vpe, returned by the server +// // ControlPingReply defines message 'control_ping_reply'. type ControlPingReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -204,6 +211,9 @@ func (m *ControlPingReply) Unmarshal(b []byte) error { return nil } +// /* +// - Lookup message-ID base by name +// // GetFirstMsgID defines message 'get_first_msg_id'. type GetFirstMsgID struct { Name string `binapi:"string[64],name=name" json:"name,omitempty"` @@ -274,7 +284,11 @@ func (m *GetFirstMsgIDReply) Unmarshal(b []byte) error { return nil } +// /* +// - Create a client registration +// // MemclntCreate defines message 'memclnt_create'. +// Deprecated: the message will be removed in the future versions type MemclntCreate struct { CtxQuota int32 `binapi:"i32,name=ctx_quota" json:"ctx_quota,omitempty"` InputQueue uint64 `binapi:"u64,name=input_queue" json:"input_queue,omitempty"` @@ -329,6 +343,7 @@ func (m *MemclntCreate) Unmarshal(b []byte) error { } // MemclntCreateReply defines message 'memclnt_create_reply'. +// Deprecated: the message will be removed in the future versions type MemclntCreateReply struct { Response int32 `binapi:"i32,name=response" json:"response,omitempty"` Handle uint64 `binapi:"u64,name=handle" json:"handle,omitempty"` @@ -476,6 +491,9 @@ func (m *MemclntCreateV2Reply) Unmarshal(b []byte) error { return nil } +// /* +// - Delete a client registration +// // MemclntDelete defines message 'memclnt_delete'. type MemclntDelete struct { Index uint32 `binapi:"u32,name=index" json:"index,omitempty"` @@ -554,6 +572,10 @@ func (m *MemclntDeleteReply) Unmarshal(b []byte) error { return nil } +// /* +// - Memory client ping / response +// - Only sent on inactive connections +// // MemclntKeepalive defines message 'memclnt_keepalive'. type MemclntKeepalive struct{} @@ -614,6 +636,9 @@ func (m *MemclntKeepaliveReply) Unmarshal(b []byte) error { return nil } +// /* +// - Client read timeout +// // MemclntReadTimeout defines message 'memclnt_read_timeout'. type MemclntReadTimeout struct { Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"` @@ -647,6 +672,9 @@ func (m *MemclntReadTimeout) Unmarshal(b []byte) error { return nil } +// /* +// - Client RX thread suspend +// // MemclntRxThreadSuspend defines message 'memclnt_rx_thread_suspend'. type MemclntRxThreadSuspend struct { Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"` @@ -680,6 +708,9 @@ func (m *MemclntRxThreadSuspend) Unmarshal(b []byte) error { return nil } +// /* +// - RPC +// // RPCCall defines message 'rpc_call'. type RPCCall struct { Function uint64 `binapi:"u64,name=function" json:"function,omitempty"` @@ -767,6 +798,9 @@ func (m *RPCCallReply) Unmarshal(b []byte) error { return nil } +// /* +// - Client RX thread exit +// // RxThreadExit defines message 'rx_thread_exit'. type RxThreadExit struct { Dummy uint8 `binapi:"u8,name=dummy" json:"dummy,omitempty"` @@ -800,6 +834,9 @@ func (m *RxThreadExit) Unmarshal(b []byte) error { return nil } +// /* +// - Initialize shm api over socket api +// // SockInitShm defines message 'sock_init_shm'. type SockInitShm struct { RequestedSize uint32 `binapi:"u32,name=requested_size" json:"requested_size,omitempty"` @@ -883,6 +920,9 @@ func (m *SockInitShmReply) Unmarshal(b []byte) error { return nil } +// /* +// - Create a socket client registration. +// // SockclntCreate defines message 'sockclnt_create'. type SockclntCreate struct { Name string `binapi:"string[64],name=name" json:"name,omitempty"` @@ -980,6 +1020,9 @@ func (m *SockclntCreateReply) Unmarshal(b []byte) error { return nil } +// /* +// - Delete a client registration +// // SockclntDelete defines message 'sockclnt_delete'. type SockclntDelete struct { Index uint32 `binapi:"u32,name=index" json:"index,omitempty"` @@ -1046,6 +1089,11 @@ func (m *SockclntDeleteReply) Unmarshal(b []byte) error { return nil } +// /* +// - Trace the plugin message-id allocator +// - so we stand a chance of dealing with different sets of plugins +// - at api trace replay time +// // TracePluginMsgIds defines message 'trace_plugin_msg_ids'. type TracePluginMsgIds struct { PluginName string `binapi:"string[128],name=plugin_name" json:"plugin_name,omitempty"` diff --git a/binapi/memclnt/memclnt_rpc.ba.go b/binapi/memclnt/memclnt_rpc.ba.go index 5caff8ac..c8efe37e 100644 --- a/binapi/memclnt/memclnt_rpc.ba.go +++ b/binapi/memclnt/memclnt_rpc.ba.go @@ -5,7 +5,7 @@ package memclnt import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service memclnt. diff --git a/binapi/memif/memif.ba.go b/binapi/memif/memif.ba.go index 928dad3b..5ef5c1a0 100644 --- a/binapi/memif/memif.ba.go +++ b/binapi/memif/memif.ba.go @@ -1,24 +1,23 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/memif.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/memif.api.json // Package memif contains generated bindings for API file memif.api. // // Contents: -// -// 2 enums -// 12 messages +// - 2 enums +// - 14 messages package memif import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ethernet_types "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,8 +28,8 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "memif" - APIVersion = "3.0.0" - VersionCrc = 0x9ec8c1e7 + APIVersion = "3.1.0" + VersionCrc = 0xd48ac702 ) // MemifMode defines enum 'memif_mode'. @@ -90,7 +89,23 @@ func (x MemifRole) String() string { return "MemifRole(" + strconv.Itoa(int(x)) + ")" } +// Create memory interface +// - role - role of the interface in the connection (master/slave) +// - mode - interface mode +// - rx_queues - number of rx queues (only valid for slave) +// - tx_queues - number of tx queues (only valid for slave) +// - id - 32bit integer used to authenticate and match opposite sides +// of the connection +// - socket_id - socket filename id to be used for connection +// establishment +// - ring_size - the number of entries of RX/TX rings +// - buffer_size - size of the buffer allocated for each ring entry +// - no_zero_copy - if true, disable zero copy +// - hw_addr - interface MAC address +// - secret - optional, default is "", max length 24 +// // MemifCreate defines message 'memif_create'. +// Deprecated: the message will be removed in the future versions type MemifCreate struct { Role MemifRole `binapi:"memif_role,name=role" json:"role,omitempty"` Mode MemifMode `binapi:"memif_mode,name=mode" json:"mode,omitempty"` @@ -163,7 +178,12 @@ func (m *MemifCreate) Unmarshal(b []byte) error { return nil } +// Create memory interface response +// - retval - return value for request +// - sw_if_index - software index of the newly created interface +// // MemifCreateReply defines message 'memif_create_reply'. +// Deprecated: the message will be removed in the future versions type MemifCreateReply 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"` @@ -200,6 +220,143 @@ func (m *MemifCreateReply) Unmarshal(b []byte) error { return nil } +// Create memory interface +// - role - role of the interface in the connection (master/slave) +// - mode - interface mode +// - rx_queues - number of rx queues (only valid for slave) +// - tx_queues - number of tx queues (only valid for slave) +// - id - 32bit integer used to authenticate and match opposite sides +// of the connection +// - socket_id - socket filename id to be used for connection +// establishment +// - ring_size - the number of entries of RX/TX rings +// - buffer_size - size of the buffer allocated for each ring entry +// - no_zero_copy - if true, disable zero copy +// - use_dma - if true, use dma accelerate memory copy +// - hw_addr - interface MAC address +// - secret - optional, default is "", max length 24 +// +// MemifCreateV2 defines message 'memif_create_v2'. +type MemifCreateV2 struct { + Role MemifRole `binapi:"memif_role,name=role" json:"role,omitempty"` + Mode MemifMode `binapi:"memif_mode,name=mode" json:"mode,omitempty"` + RxQueues uint8 `binapi:"u8,name=rx_queues" json:"rx_queues,omitempty"` + TxQueues uint8 `binapi:"u8,name=tx_queues" json:"tx_queues,omitempty"` + ID uint32 `binapi:"u32,name=id" json:"id,omitempty"` + SocketID uint32 `binapi:"u32,name=socket_id" json:"socket_id,omitempty"` + RingSize uint32 `binapi:"u32,name=ring_size" json:"ring_size,omitempty"` + BufferSize uint16 `binapi:"u16,name=buffer_size" json:"buffer_size,omitempty"` + NoZeroCopy bool `binapi:"bool,name=no_zero_copy" json:"no_zero_copy,omitempty"` + UseDma bool `binapi:"bool,name=use_dma" json:"use_dma,omitempty"` + HwAddr ethernet_types.MacAddress `binapi:"mac_address,name=hw_addr" json:"hw_addr,omitempty"` + Secret string `binapi:"string[24],name=secret" json:"secret,omitempty"` +} + +func (m *MemifCreateV2) Reset() { *m = MemifCreateV2{} } +func (*MemifCreateV2) GetMessageName() string { return "memif_create_v2" } +func (*MemifCreateV2) GetCrcString() string { return "8c7de5f7" } +func (*MemifCreateV2) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *MemifCreateV2) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Role + size += 4 // m.Mode + size += 1 // m.RxQueues + size += 1 // m.TxQueues + size += 4 // m.ID + size += 4 // m.SocketID + size += 4 // m.RingSize + size += 2 // m.BufferSize + size += 1 // m.NoZeroCopy + size += 1 // m.UseDma + size += 1 * 6 // m.HwAddr + size += 24 // m.Secret + return size +} +func (m *MemifCreateV2) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(uint32(m.Role)) + buf.EncodeUint32(uint32(m.Mode)) + buf.EncodeUint8(m.RxQueues) + buf.EncodeUint8(m.TxQueues) + buf.EncodeUint32(m.ID) + buf.EncodeUint32(m.SocketID) + buf.EncodeUint32(m.RingSize) + buf.EncodeUint16(m.BufferSize) + buf.EncodeBool(m.NoZeroCopy) + buf.EncodeBool(m.UseDma) + buf.EncodeBytes(m.HwAddr[:], 6) + buf.EncodeString(m.Secret, 24) + return buf.Bytes(), nil +} +func (m *MemifCreateV2) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Role = MemifRole(buf.DecodeUint32()) + m.Mode = MemifMode(buf.DecodeUint32()) + m.RxQueues = buf.DecodeUint8() + m.TxQueues = buf.DecodeUint8() + m.ID = buf.DecodeUint32() + m.SocketID = buf.DecodeUint32() + m.RingSize = buf.DecodeUint32() + m.BufferSize = buf.DecodeUint16() + m.NoZeroCopy = buf.DecodeBool() + m.UseDma = buf.DecodeBool() + copy(m.HwAddr[:], buf.DecodeBytes(6)) + m.Secret = buf.DecodeString(24) + return nil +} + +// Create memory interface response +// - retval - return value for request +// - sw_if_index - software index of the newly created interface +// +// MemifCreateV2Reply defines message 'memif_create_v2_reply'. +type MemifCreateV2Reply 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 *MemifCreateV2Reply) Reset() { *m = MemifCreateV2Reply{} } +func (*MemifCreateV2Reply) GetMessageName() string { return "memif_create_v2_reply" } +func (*MemifCreateV2Reply) GetCrcString() string { return "5383d31f" } +func (*MemifCreateV2Reply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *MemifCreateV2Reply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 4 // m.SwIfIndex + return size +} +func (m *MemifCreateV2Reply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *MemifCreateV2Reply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + return nil +} + +// Delete memory interface +// - sw_if_index - software index of the interface to delete +// // MemifDelete defines message 'memif_delete'. type MemifDelete struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -266,6 +423,20 @@ func (m *MemifDeleteReply) Unmarshal(b []byte) error { return nil } +// Memory interface details structure +// - sw_if_index - index of the interface +// - hw_addr - interface MAC address +// - id - id associated with the interface +// - role - role of the interface in the connection (master/slave) +// - mode - interface mode +// - zero_copy - zero copy flag present +// - socket_id - id of the socket filename used by this interface +// to establish new connections +// - ring_size - the number of entries of RX/TX rings +// - buffer_size - size of the buffer allocated for each ring entry +// - flags - interface_status flags +// - if_name - name of the interface +// // MemifDetails defines message 'memif_details'. type MemifDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -339,6 +510,7 @@ func (m *MemifDetails) Unmarshal(b []byte) error { return nil } +// Dump all memory interfaces // MemifDump defines message 'memif_dump'. type MemifDump struct{} @@ -366,7 +538,15 @@ func (m *MemifDump) Unmarshal(b []byte) error { return nil } +// Create or remove named socket file for memif interfaces +// - is_add - 0 = remove, 1 = add association +// - socket_id - non-0 32-bit integer used to identify a socket file +// - socket_filename - filename of the socket to be used for connection +// establishment; id 0 always maps to default "/var/vpp/memif.sock"; +// no socket filename needed when is_add == 0. +// // MemifSocketFilenameAddDel defines message 'memif_socket_filename_add_del'. +// Deprecated: the message will be removed in the future versions type MemifSocketFilenameAddDel struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` SocketID uint32 `binapi:"u32,name=socket_id" json:"socket_id,omitempty"` @@ -408,6 +588,7 @@ func (m *MemifSocketFilenameAddDel) Unmarshal(b []byte) error { } // MemifSocketFilenameAddDelReply defines message 'memif_socket_filename_add_del_reply'. +// Deprecated: the message will be removed in the future versions type MemifSocketFilenameAddDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -442,6 +623,16 @@ func (m *MemifSocketFilenameAddDelReply) Unmarshal(b []byte) error { return nil } +// Create or remove named socket file for memif interfaces +// - is_add - 0 = remove, 1 = add association +// - socket_id - non-0 32-bit integer used to identify a socket file +// ~0 means autogenerate +// - socket_filename - filename of the socket to be used for connection +// establishment; id 0 always maps to default "/var/vpp/memif.sock"; +// no socket filename needed when is_add == 0. +// socket_filename starting with '@' will create an abstract socket +// in the given namespace +// // MemifSocketFilenameAddDelV2 defines message 'memif_socket_filename_add_del_v2'. type MemifSocketFilenameAddDelV2 struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -485,6 +676,10 @@ func (m *MemifSocketFilenameAddDelV2) Unmarshal(b []byte) error { return nil } +// Create memory interface socket file response +// - retval - return value for request +// - socket_id - non-0 32-bit integer used to identify a socket file +// // MemifSocketFilenameAddDelV2Reply defines message 'memif_socket_filename_add_del_v2_reply'. type MemifSocketFilenameAddDelV2Reply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -524,6 +719,10 @@ func (m *MemifSocketFilenameAddDelV2Reply) Unmarshal(b []byte) error { return nil } +// Memory interface details structure +// - socket_id - u32 used to identify the given socket filename +// - socket_filename - corresponding NUL terminated socket filename +// // MemifSocketFilenameDetails defines message 'memif_socket_filename_details'. type MemifSocketFilenameDetails struct { SocketID uint32 `binapi:"u32,name=socket_id" json:"socket_id,omitempty"` @@ -561,6 +760,7 @@ func (m *MemifSocketFilenameDetails) Unmarshal(b []byte) error { return nil } +// Dump the table of socket ids and corresponding filenames // MemifSocketFilenameDump defines message 'memif_socket_filename_dump'. type MemifSocketFilenameDump struct{} @@ -592,6 +792,8 @@ func init() { file_memif_binapi_init() } func file_memif_binapi_init() { api.RegisterMessage((*MemifCreate)(nil), "memif_create_b1b25061") api.RegisterMessage((*MemifCreateReply)(nil), "memif_create_reply_5383d31f") + api.RegisterMessage((*MemifCreateV2)(nil), "memif_create_v2_8c7de5f7") + api.RegisterMessage((*MemifCreateV2Reply)(nil), "memif_create_v2_reply_5383d31f") api.RegisterMessage((*MemifDelete)(nil), "memif_delete_f9e6675e") api.RegisterMessage((*MemifDeleteReply)(nil), "memif_delete_reply_e8d4e804") api.RegisterMessage((*MemifDetails)(nil), "memif_details_da34feb9") @@ -609,6 +811,8 @@ func AllMessages() []api.Message { return []api.Message{ (*MemifCreate)(nil), (*MemifCreateReply)(nil), + (*MemifCreateV2)(nil), + (*MemifCreateV2Reply)(nil), (*MemifDelete)(nil), (*MemifDeleteReply)(nil), (*MemifDetails)(nil), diff --git a/binapi/memif/memif_rpc.ba.go b/binapi/memif/memif_rpc.ba.go index 3e7f68a5..2a65a35b 100644 --- a/binapi/memif/memif_rpc.ba.go +++ b/binapi/memif/memif_rpc.ba.go @@ -7,13 +7,14 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service memif. type RPCService interface { MemifCreate(ctx context.Context, in *MemifCreate) (*MemifCreateReply, error) + MemifCreateV2(ctx context.Context, in *MemifCreateV2) (*MemifCreateV2Reply, error) MemifDelete(ctx context.Context, in *MemifDelete) (*MemifDeleteReply, error) MemifDump(ctx context.Context, in *MemifDump) (RPCService_MemifDumpClient, error) MemifSocketFilenameAddDel(ctx context.Context, in *MemifSocketFilenameAddDel) (*MemifSocketFilenameAddDelReply, error) @@ -38,6 +39,15 @@ func (c *serviceClient) MemifCreate(ctx context.Context, in *MemifCreate) (*Memi return out, api.RetvalToVPPApiError(out.Retval) } +func (c *serviceClient) MemifCreateV2(ctx context.Context, in *MemifCreateV2) (*MemifCreateV2Reply, error) { + out := new(MemifCreateV2Reply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + func (c *serviceClient) MemifDelete(ctx context.Context, in *MemifDelete) (*MemifDeleteReply, error) { out := new(MemifDeleteReply) err := c.conn.Invoke(ctx, in, out) diff --git a/binapi/mfib_types/mfib_types.ba.go b/binapi/mfib_types/mfib_types.ba.go index be543ba7..298c2189 100644 --- a/binapi/mfib_types/mfib_types.ba.go +++ b/binapi/mfib_types/mfib_types.ba.go @@ -1,23 +1,22 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/mfib_types.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/mfib_types.api.json // Package mfib_types contains generated bindings for API file mfib_types.api. // // Contents: -// -// 2 enums -// 1 struct +// - 2 enums +// - 1 struct package mfib_types import ( "strconv" - api "git.fd.io/govpp.git/api" fib_types "github.com/networkservicemesh/govpp/binapi/fib_types" _ "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" ) // This is a compile-time assertion to ensure that this generated file @@ -26,6 +25,12 @@ import ( // GoVPP api package needs to be updated. const _ = api.GoVppAPIPackageIsVersion2 +const ( + APIFile = "mfib_types" + APIVersion = "1.0.0" + VersionCrc = 0xd2b57aaf +) + // MfibEntryFlags defines enum 'mfib_entry_flags'. type MfibEntryFlags uint32 diff --git a/binapi/mpls/mpls.ba.go b/binapi/mpls/mpls.ba.go index bb424351..5ae3f7d0 100644 --- a/binapi/mpls/mpls.ba.go +++ b/binapi/mpls/mpls.ba.go @@ -1,23 +1,22 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/mpls.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/mpls.api.json // Package mpls contains generated bindings for API file mpls.api. // // Contents: -// -// 3 structs -// 16 messages +// - 3 structs +// - 18 messages package mpls import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" fib_types "github.com/networkservicemesh/govpp/binapi/fib_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,7 +28,7 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "mpls" APIVersion = "1.1.1" - VersionCrc = 0x46824f02 + VersionCrc = 0xdf2aeee2 ) // MplsRoute defines type 'mpls_route'. @@ -60,6 +59,87 @@ type MplsTunnel struct { MtPaths []fib_types.FibPath `binapi:"fib_path[mt_n_paths],name=mt_paths" json:"mt_paths,omitempty"` } +// mpls enabled interface details +// MplsInterfaceDetails defines message 'mpls_interface_details'. +type MplsInterfaceDetails struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` +} + +func (m *MplsInterfaceDetails) Reset() { *m = MplsInterfaceDetails{} } +func (*MplsInterfaceDetails) GetMessageName() string { return "mpls_interface_details" } +func (*MplsInterfaceDetails) GetCrcString() string { return "0b45011c" } +func (*MplsInterfaceDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *MplsInterfaceDetails) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.SwIfIndex + return size +} +func (m *MplsInterfaceDetails) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *MplsInterfaceDetails) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + return nil +} + +// Dump mpls enabled interface(s) +// - sw_if_index - sw_if_index of a specific interface, or -1 (default) +// to return all MPLS enabled interfaces +// +// MplsInterfaceDump defines message 'mpls_interface_dump'. +type MplsInterfaceDump struct { + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` +} + +func (m *MplsInterfaceDump) Reset() { *m = MplsInterfaceDump{} } +func (*MplsInterfaceDump) GetMessageName() string { return "mpls_interface_dump" } +func (*MplsInterfaceDump) GetCrcString() string { return "f9e6675e" } +func (*MplsInterfaceDump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *MplsInterfaceDump) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.SwIfIndex + return size +} +func (m *MplsInterfaceDump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(uint32(m.SwIfIndex)) + return buf.Bytes(), nil +} +func (m *MplsInterfaceDump) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + return nil +} + +// Bind/Unbind an MPLS local label to an IP prefix. i.e. create +// +// a per-prefix label entry. +// - mb_mpls_table_id - The MPLS table-id the MPLS entry will be added in +// - mb_label - The MPLS label value to bind +// - mb_ip_table_id - The IP table-id of the IP prefix to bind to. +// - mb_is_bind - Bind or unbind +// - mb_is_ip4 - The prefix to bind to is IPv4 +// - mb_prefix - IP prefix +// // MplsIPBindUnbind defines message 'mpls_ip_bind_unbind'. type MplsIPBindUnbind struct { MbMplsTableID uint32 `binapi:"u32,name=mb_mpls_table_id" json:"mb_mpls_table_id,omitempty"` @@ -148,6 +228,13 @@ func (m *MplsIPBindUnbindReply) Unmarshal(b []byte) error { return nil } +// MPLS Route Add / del route +// - mr_table_id - The MPLS table-id the route is added in +// - mr_is_add - Is this a route add or delete +// - mr_is_multipath - Is this route update a multipath - i.e. is this +// a path addition to an existing route +// - mr_route - The Route +// // MplsRouteAddDel defines message 'mpls_route_add_del'. type MplsRouteAddDel struct { MrIsAdd bool `binapi:"bool,name=mr_is_add" json:"mr_is_add,omitempty"` @@ -314,6 +401,13 @@ func (m *MplsRouteAddDelReply) Unmarshal(b []byte) error { return nil } +// mpls FIB table response +// - table_id - MPLS fib table id +// - s_bit - End-of-stack bit +// - label - MPLS label value +// - count - the number of fib_path in path +// - path - array of of fib_path structures +// // MplsRouteDetails defines message 'mpls_route_details'. type MplsRouteDetails struct { MrRoute MplsRoute `binapi:"mpls_route,name=mr_route" json:"mr_route,omitempty"` @@ -435,6 +529,7 @@ func (m *MplsRouteDetails) Unmarshal(b []byte) error { return nil } +// Dump MPLS fib table // MplsRouteDump defines message 'mpls_route_dump'. type MplsRouteDump struct { Table MplsTable `binapi:"mpls_table,name=table" json:"table,omitempty"` @@ -471,6 +566,13 @@ func (m *MplsRouteDump) Unmarshal(b []byte) error { return nil } +// MPLS Route Add / del route +// - mt_table_id - The MPLS table-id the route is added in +// - mt_is_add - Is this a route add or delete +// - mt_name - A client provided name/tag for the table. If this +// is not set by the client, then VPP will generate +// something meaningful. +// // MplsTableAddDel defines message 'mpls_table_add_del'. type MplsTableAddDel struct { MtIsAdd bool `binapi:"bool,name=mt_is_add,default=true" json:"mt_is_add,omitempty"` @@ -580,6 +682,7 @@ func (m *MplsTableDetails) Unmarshal(b []byte) error { return nil } +// Dump MPLS fib table // MplsTableDump defines message 'mpls_table_dump'. type MplsTableDump struct{} @@ -732,6 +835,10 @@ func (m *MplsTunnelAddDel) Unmarshal(b []byte) error { return nil } +// Reply for MPLS tunnel add / del request +// - retval - return code +// - sw_if_index - SW interface index of the tunnel created +// // MplsTunnelAddDelReply defines message 'mpls_tunnel_add_del_reply'. type MplsTunnelAddDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -773,6 +880,7 @@ func (m *MplsTunnelAddDelReply) Unmarshal(b []byte) error { return nil } +// mpls tunnel details // MplsTunnelDetails defines message 'mpls_tunnel_details'. type MplsTunnelDetails struct { MtTunnel MplsTunnel `binapi:"mpls_tunnel,name=mt_tunnel" json:"mt_tunnel,omitempty"` @@ -894,6 +1002,10 @@ func (m *MplsTunnelDetails) Unmarshal(b []byte) error { return nil } +// Dump mpls eth tunnel table +// - sw_if_index - sw_if_index of the MPLS tunnel +// (as returned from the create) +// // MplsTunnelDump defines message 'mpls_tunnel_dump'. type MplsTunnelDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` @@ -927,6 +1039,10 @@ func (m *MplsTunnelDump) Unmarshal(b []byte) error { return nil } +// Enable or Disable MPLS on and interface +// - sw_if_index - index of the interface +// - enable - if non-zero enable, else disable +// // SwInterfaceSetMplsEnable defines message 'sw_interface_set_mpls_enable'. type SwInterfaceSetMplsEnable struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1001,6 +1117,8 @@ func (m *SwInterfaceSetMplsEnableReply) Unmarshal(b []byte) error { func init() { file_mpls_binapi_init() } func file_mpls_binapi_init() { + api.RegisterMessage((*MplsInterfaceDetails)(nil), "mpls_interface_details_0b45011c") + api.RegisterMessage((*MplsInterfaceDump)(nil), "mpls_interface_dump_f9e6675e") api.RegisterMessage((*MplsIPBindUnbind)(nil), "mpls_ip_bind_unbind_c7533b32") api.RegisterMessage((*MplsIPBindUnbindReply)(nil), "mpls_ip_bind_unbind_reply_e8d4e804") api.RegisterMessage((*MplsRouteAddDel)(nil), "mpls_route_add_del_8e1d1e07") @@ -1022,6 +1140,8 @@ func file_mpls_binapi_init() { // Messages returns list of all messages in this module. func AllMessages() []api.Message { return []api.Message{ + (*MplsInterfaceDetails)(nil), + (*MplsInterfaceDump)(nil), (*MplsIPBindUnbind)(nil), (*MplsIPBindUnbindReply)(nil), (*MplsRouteAddDel)(nil), diff --git a/binapi/mpls/mpls_rpc.ba.go b/binapi/mpls/mpls_rpc.ba.go index 49f260b2..ab741a03 100644 --- a/binapi/mpls/mpls_rpc.ba.go +++ b/binapi/mpls/mpls_rpc.ba.go @@ -7,12 +7,13 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service mpls. type RPCService interface { + MplsInterfaceDump(ctx context.Context, in *MplsInterfaceDump) (RPCService_MplsInterfaceDumpClient, error) MplsIPBindUnbind(ctx context.Context, in *MplsIPBindUnbind) (*MplsIPBindUnbindReply, error) MplsRouteAddDel(ctx context.Context, in *MplsRouteAddDel) (*MplsRouteAddDelReply, error) MplsRouteDump(ctx context.Context, in *MplsRouteDump) (RPCService_MplsRouteDumpClient, error) @@ -31,6 +32,49 @@ func NewServiceClient(conn api.Connection) RPCService { return &serviceClient{conn} } +func (c *serviceClient) MplsInterfaceDump(ctx context.Context, in *MplsInterfaceDump) (RPCService_MplsInterfaceDumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_MplsInterfaceDumpClient{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_MplsInterfaceDumpClient interface { + Recv() (*MplsInterfaceDetails, error) + api.Stream +} + +type serviceClient_MplsInterfaceDumpClient struct { + api.Stream +} + +func (c *serviceClient_MplsInterfaceDumpClient) Recv() (*MplsInterfaceDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *MplsInterfaceDetails: + return m, nil + 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) MplsIPBindUnbind(ctx context.Context, in *MplsIPBindUnbind) (*MplsIPBindUnbindReply, error) { out := new(MplsIPBindUnbindReply) err := c.conn.Invoke(ctx, in, out) diff --git a/binapi/mss_clamp/mss_clamp.ba.go b/binapi/mss_clamp/mss_clamp.ba.go index 2c204608..a1bfe29d 100644 --- a/binapi/mss_clamp/mss_clamp.ba.go +++ b/binapi/mss_clamp/mss_clamp.ba.go @@ -1,23 +1,22 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/mss_clamp.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/mss_clamp.api.json // Package mss_clamp contains generated bindings for API file mss_clamp.api. // // Contents: -// -// 1 enum -// 5 messages +// - 1 enum +// - 5 messages package mss_clamp import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -81,6 +80,13 @@ func (x MssClampDir) String() string { return s } +// Configured MSS values on an interface +// - sw_if_index - interface index on which clamping is applied +// - ipv4_mss - Maximum Segment Size for IPv4/TCP +// - ipv6_mss - Maximum Segment Size for IPv6/TCP +// - ipv4_direction - Direction clamping is enabled on (IPv4/TCP) +// - ipv6_direction - Direction clamping is enabled on (IPv6/TCP) +// // MssClampDetails defines message 'mss_clamp_details'. type MssClampDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -130,6 +136,13 @@ func (m *MssClampDetails) Unmarshal(b []byte) error { return nil } +// Enable/Disable TCP MSS Clamping feature on an interface +// - sw_if_index - interface index on which clamping will be applied +// - ipv4_mss - Maximum Segment Size for IPv4/TCP +// - ipv6_mss - Maximum Segment Size for IPv6/TCP +// - ipv4_direction - Direction clamping is enabled on (IPv4/TCP) +// - ipv6_direction - Direction clamping is enabled on (IPv6/TCP) +// // MssClampEnableDisable defines message 'mss_clamp_enable_disable'. type MssClampEnableDisable struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -212,6 +225,11 @@ func (m *MssClampEnableDisableReply) Unmarshal(b []byte) error { return nil } +// Get the TCP MSS Clamping feature settings +// - cursor - cursor to continue when there is more to read +// - sw_if_index - interface index to filter the result, +// ~0 means no filter +// // MssClampGet defines message 'mss_clamp_get'. type MssClampGet struct { Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` @@ -249,6 +267,10 @@ func (m *MssClampGet) Unmarshal(b []byte) error { return nil } +// Reply for get TCP MSS Clamping feature settings request +// - retval - return code +// - cursor - cursor to continue when there is more to read +// // MssClampGetReply defines message 'mss_clamp_get_reply'. type MssClampGetReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` diff --git a/binapi/mss_clamp/mss_clamp_rpc.ba.go b/binapi/mss_clamp/mss_clamp_rpc.ba.go index 5ec6a240..ede4f1f8 100644 --- a/binapi/mss_clamp/mss_clamp_rpc.ba.go +++ b/binapi/mss_clamp/mss_clamp_rpc.ba.go @@ -7,7 +7,7 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service mss_clamp. @@ -46,7 +46,7 @@ func (c *serviceClient) MssClampGet(ctx context.Context, in *MssClampGet) (RPCSe } type RPCService_MssClampGetClient interface { - Recv() (*MssClampDetails, error) + Recv() (*MssClampDetails, *MssClampGetReply, error) api.Stream } @@ -54,21 +54,25 @@ type serviceClient_MssClampGetClient struct { api.Stream } -func (c *serviceClient_MssClampGetClient) Recv() (*MssClampDetails, error) { +func (c *serviceClient_MssClampGetClient) Recv() (*MssClampDetails, *MssClampGetReply, error) { msg, err := c.Stream.RecvMsg() if err != nil { - return nil, err + return nil, nil, err } switch m := msg.(type) { case *MssClampDetails: - return m, nil + return m, nil, nil case *MssClampGetReply: + if err := api.RetvalToVPPApiError(m.Retval); err != nil { + c.Stream.Close() + return nil, m, err + } err = c.Stream.Close() if err != nil { - return nil, err + return nil, m, err } - return nil, io.EOF + return nil, m, io.EOF default: - return nil, fmt.Errorf("unexpected message: %T %v", m, m) + return nil, nil, fmt.Errorf("unexpected message: %T %v", m, m) } } diff --git a/binapi/nat44_ed/nat44_ed.ba.go b/binapi/nat44_ed/nat44_ed.ba.go index 730d0ec9..3a4b078b 100644 --- a/binapi/nat44_ed/nat44_ed.ba.go +++ b/binapi/nat44_ed/nat44_ed.ba.go @@ -1,26 +1,25 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/nat44_ed.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/nat44_ed.api.json // Package nat44_ed contains generated bindings for API file nat44_ed.api. // // Contents: -// -// 1 enum -// 1 struct -// 73 messages +// - 1 enum +// - 1 struct +// - 75 messages package nat44_ed import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" nat_types "github.com/networkservicemesh/govpp/binapi/nat_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -32,7 +31,7 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "nat44_ed" APIVersion = "5.5.0" - VersionCrc = 0x354f61c0 + VersionCrc = 0x6f9bc302 ) // Nat44ConfigFlags defines enum 'nat44_config_flags'. @@ -98,6 +97,13 @@ type Nat44LbAddrPort struct { VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` } +// Add/del NAT44 address range +// - first_ip_address - first IPv4 address +// - last_ip_address - last IPv4 address +// - vrf_id - VRF id of tenant, ~0 means independent of VRF +// - is_add - true if add, false if delete +// - flags - flag NAT_IS_TWICE_NAT if NAT address range for external hosts +// // Nat44AddDelAddressRange defines message 'nat44_add_del_address_range'. type Nat44AddDelAddressRange struct { FirstIPAddress ip_types.IP4Address `binapi:"ip4_address,name=first_ip_address" json:"first_ip_address,omitempty"` @@ -182,6 +188,17 @@ func (m *Nat44AddDelAddressRangeReply) Unmarshal(b []byte) error { return nil } +// Add/delete NAT44 identity mapping +// - is_add - true if add, false if delete +// - flags - flag NAT_ADDR_ONLY if address only mapping +// - ip_address - IPv4 address +// - protocol - IP protocol +// - port - port number +// - sw_if_index - interface (if set ip_address is ignored, ~0 means not +// used) +// - vfr_id - VRF ID (if ~0 use default VRF) +// - tag - opaque string tag +// // Nat44AddDelIdentityMapping defines message 'nat44_add_del_identity_mapping'. type Nat44AddDelIdentityMapping struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -278,6 +295,11 @@ func (m *Nat44AddDelIdentityMappingReply) Unmarshal(b []byte) error { return nil } +// Add/delete NAT44 pool address from specific interfce +// - is_add - true if add, false if delete +// - sw_if_index - software index of the interface +// - flags - flag NAT_TWICE_NAT if NAT address range for external hosts +// // Nat44AddDelInterfaceAddr defines message 'nat44_add_del_interface_addr'. type Nat44AddDelInterfaceAddr struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -354,6 +376,22 @@ func (m *Nat44AddDelInterfaceAddrReply) Unmarshal(b []byte) error { return nil } +// Add/delete NAT44 load-balancing static mapping rule +// - is_add - true if add, false if delete +// - flags - flag NAT_TWICE_NAT if NAT address range for external hosts, +// flag NAT_SELF_TWICE_NAT if translate external host address +// and port whenever external host address equals local +// address of internal host, +// flag NAT_OUT2IN_ONLY if rule match only out2in direction +// - external_addr - external IPv4 address of the service +// - external_port - external L4 port number of the service +// - protocol - IP protocol number of the service +// - affinity - if 0 disabled, otherwise client IP affinity sticky time +// in seconds +// - local_num - number of local network nodes +// - locals - local network nodes +// - tag - opaque string tag +// // Nat44AddDelLbStaticMapping defines message 'nat44_add_del_lb_static_mapping'. type Nat44AddDelLbStaticMapping struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -479,7 +517,27 @@ func (m *Nat44AddDelLbStaticMappingReply) Unmarshal(b []byte) error { return nil } +// Add/delete NAT44 static mapping +// - is_add - true if add, false if delete +// - flags - flag NAT_IS_ADDR_ONLY if address only mapping, +// flag nat_is_twice_nat if nat address range for external hosts, +// flag NAT_IS_SELF_TWICE_NAT if translate external host address +// and port whenever external host address equals local +// address of internal host, +// flag NAT_IS_OUT2IN_ONLY if rule match only out2in direction +// - local_ip_address - local IPv4 address +// - external_ip_address - external IPv4 address +// - protocol - IP protocol, used only if addr_only=0 +// - local_port - local port number, used only if addr_only=0 +// - external_port - external port number, used only if addr_only=0 +// - external_sw_if_index - external interface (if set +// external_ip_address is ignored, ~0 means not +// used) +// - vfr_id - VRF ID +// - tag - opaque string tag +// // Nat44AddDelStaticMapping defines message 'nat44_add_del_static_mapping'. +// Deprecated: the message will be removed in the future versions type Nat44AddDelStaticMapping struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` @@ -549,6 +607,7 @@ func (m *Nat44AddDelStaticMapping) Unmarshal(b []byte) error { } // Nat44AddDelStaticMappingReply defines message 'nat44_add_del_static_mapping_reply'. +// Deprecated: the message will be removed in the future versions type Nat44AddDelStaticMappingReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -583,6 +642,27 @@ func (m *Nat44AddDelStaticMappingReply) Unmarshal(b []byte) error { return nil } +// Add/delete NAT44 static mapping +// - is_add - true if add, false if delete +// - match_pool - true if use specific pool_ip_address +// - flags - flag NAT_IS_ADDR_ONLY if address only mapping, +// flag nat_is_twice_nat if nat address range for external hosts, +// flag NAT_IS_SELF_TWICE_NAT if translate external host address +// and port whenever external host address equals local +// address of internal host, +// flag NAT_IS_OUT2IN_ONLY if rule match only out2in direction +// - pool_ip_address - pool IPv4 address to match with pool +// - local_ip_address - local IPv4 address +// - external_ip_address - external IPv4 address +// - protocol - IP protocol, used only if addr_only=0 +// - local_port - local port number, used only if addr_only=0 +// - external_port - external port number, used only if addr_only=0 +// - external_sw_if_index - external interface (if set +// external_ip_address is ignored, ~0 means not +// used) +// - vfr_id - VRF ID +// - tag - opaque string tag +// // Nat44AddDelStaticMappingV2 defines message 'nat44_add_del_static_mapping_v2'. type Nat44AddDelStaticMappingV2 struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -695,6 +775,11 @@ func (m *Nat44AddDelStaticMappingV2Reply) Unmarshal(b []byte) error { return nil } +// NAT44 address details response +// - ip_address - IPv4 address +// - flags - flag NAT_IS_TWICE_NAT if NAT address range for external hosts +// - vrf_id - VRF id of tenant, ~0 means independent of VRF +// // Nat44AddressDetails defines message 'nat44_address_details'. type Nat44AddressDetails struct { IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` @@ -736,6 +821,7 @@ func (m *Nat44AddressDetails) Unmarshal(b []byte) error { return nil } +// Dump NAT44 addresses // Nat44AddressDump defines message 'nat44_address_dump'. type Nat44AddressDump struct{} @@ -763,6 +849,18 @@ func (m *Nat44AddressDump) Unmarshal(b []byte) error { return nil } +// Delete NAT44 session +// - ip_address - IPv4 address +// - protocol - IP protocol +// - port - port number +// - vfr_id - VRF ID +// - flags - flag NAT_IS_INSIDE if interface is inside or +// interface is outside, +// flag NAT_IS_EXT_HOST_VALID if external host address and +// port are valid +// - ext_host_address - external host IPv4 address +// - ext_host_port - external host port +// // Nat44DelSession defines message 'nat44_del_session'. type Nat44DelSession struct { Address ip_types.IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"` @@ -853,6 +951,12 @@ func (m *Nat44DelSessionReply) Unmarshal(b []byte) error { return nil } +// add/del NAT output interface (postrouting +// +// in2out translation) +// - is_add - true if add, false if delete +// - sw_if_index - software index of the interface +// // Nat44EdAddDelOutputInterface defines message 'nat44_ed_add_del_output_interface'. type Nat44EdAddDelOutputInterface struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -927,6 +1031,11 @@ func (m *Nat44EdAddDelOutputInterfaceReply) Unmarshal(b []byte) error { return nil } +// Add/del inter VRF NAT44-ED route record +// - table_vrf_id - id of the VRF NAT routing table +// - vrf_id - id of resolving destination (tx) VRF table +// - is_add - if true add else del +// // Nat44EdAddDelVrfRoute defines message 'nat44_ed_add_del_vrf_route'. type Nat44EdAddDelVrfRoute struct { TableVrfID uint32 `binapi:"u32,name=table_vrf_id" json:"table_vrf_id,omitempty"` @@ -1001,6 +1110,12 @@ func (m *Nat44EdAddDelVrfRouteReply) Unmarshal(b []byte) error { return nil } +// Add/delete inter VRF NAT44-ED routing table +// - table_vrf_id - id of (rx) VRF used for resolving +// destination (tx) VRF during dynamic +// session creation +// - is_add - if true add else del +// // Nat44EdAddDelVrfTable defines message 'nat44_ed_add_del_vrf_table'. type Nat44EdAddDelVrfTable struct { TableVrfID uint32 `binapi:"u32,name=table_vrf_id" json:"table_vrf_id,omitempty"` @@ -1178,6 +1293,15 @@ func (m *Nat44EdOutputInterfaceGetReply) Unmarshal(b []byte) error { return nil } +// Enable/disable NAT44ED plugin +// - inside_vrf - inside vrf id +// - outside_vrf - outside vrf id +// - sessions - maximum number of sessions per thread +// - session_memory - overwrite hash allocation parameter +// - enable - true if enable, false if disable +// - flags - flag NAT44_IS_STATIC_MAPPING_ONLY, +// NAT44_IS_CONNECTION_TRACKING +// // Nat44EdPluginEnableDisable defines message 'nat44_ed_plugin_enable_disable'. type Nat44EdPluginEnableDisable struct { InsideVrf uint32 `binapi:"u32,name=inside_vrf" json:"inside_vrf,omitempty"` @@ -1266,6 +1390,9 @@ func (m *Nat44EdPluginEnableDisableReply) Unmarshal(b []byte) error { return nil } +// Set NAT handoff frame queue options +// - frame_queue_nelts - number of worker handoff frame queue elements +// // Nat44EdSetFqOptions defines message 'nat44_ed_set_fq_options'. type Nat44EdSetFqOptions struct { FrameQueueNelts uint32 `binapi:"u32,name=frame_queue_nelts" json:"frame_queue_nelts,omitempty"` @@ -1332,6 +1459,7 @@ func (m *Nat44EdSetFqOptionsReply) Unmarshal(b []byte) error { return nil } +// Show NAT handoff frame queue options // Nat44EdShowFqOptions defines message 'nat44_ed_show_fq_options'. type Nat44EdShowFqOptions struct{} @@ -1359,6 +1487,10 @@ func (m *Nat44EdShowFqOptions) Unmarshal(b []byte) error { return nil } +// Show NAT handoff frame queue options reply +// - retval - return code for the request +// - frame_queue_nelts - number of worker handoff frame queue elements +// // Nat44EdShowFqOptionsReply defines message 'nat44_ed_show_fq_options_reply'. type Nat44EdShowFqOptionsReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1396,7 +1528,13 @@ func (m *Nat44EdShowFqOptionsReply) Unmarshal(b []byte) error { return nil } +// NAT44-ED inter VRF NAT routing table details response +// - table_vrf_id - id of the VRF NAT routing table +// - n_vrf_ids - number of vrf_ids +// - vrf_ids - ids of resolving destination (tx) VRFs +// // Nat44EdVrfTablesDetails defines message 'nat44_ed_vrf_tables_details'. +// Deprecated: the message will be removed in the future versions type Nat44EdVrfTablesDetails struct { TableVrfID uint32 `binapi:"u32,name=table_vrf_id" json:"table_vrf_id,omitempty"` NVrfIds uint32 `binapi:"u32,name=n_vrf_ids" json:"-"` @@ -1446,7 +1584,9 @@ func (m *Nat44EdVrfTablesDetails) Unmarshal(b []byte) error { return nil } +// Dump NAT44-ED inter VRF NAT routing tables // Nat44EdVrfTablesDump defines message 'nat44_ed_vrf_tables_dump'. +// Deprecated: the message will be removed in the future versions type Nat44EdVrfTablesDump struct{} func (m *Nat44EdVrfTablesDump) Reset() { *m = Nat44EdVrfTablesDump{} } @@ -1473,6 +1613,97 @@ func (m *Nat44EdVrfTablesDump) Unmarshal(b []byte) error { return nil } +// NAT44-ED inter VRF NAT routing table details response +// - table_vrf_id - id of the VRF NAT routing table +// - n_vrf_ids - number of vrf_ids +// - vrf_ids - ids of resolving destination (tx) VRFs +// +// Nat44EdVrfTablesV2Details defines message 'nat44_ed_vrf_tables_v2_details'. +// InProgress: the message form may change in the future versions +type Nat44EdVrfTablesV2Details struct { + TableVrfID uint32 `binapi:"u32,name=table_vrf_id" json:"table_vrf_id,omitempty"` + NVrfIds uint32 `binapi:"u32,name=n_vrf_ids" json:"-"` + VrfIds []uint32 `binapi:"u32[n_vrf_ids],name=vrf_ids" json:"vrf_ids,omitempty"` +} + +func (m *Nat44EdVrfTablesV2Details) Reset() { *m = Nat44EdVrfTablesV2Details{} } +func (*Nat44EdVrfTablesV2Details) GetMessageName() string { return "nat44_ed_vrf_tables_v2_details" } +func (*Nat44EdVrfTablesV2Details) GetCrcString() string { return "7b264e4f" } +func (*Nat44EdVrfTablesV2Details) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Nat44EdVrfTablesV2Details) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.TableVrfID + size += 4 // m.NVrfIds + size += 4 * len(m.VrfIds) // m.VrfIds + return size +} +func (m *Nat44EdVrfTablesV2Details) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.TableVrfID) + buf.EncodeUint32(uint32(len(m.VrfIds))) + for i := 0; i < len(m.VrfIds); i++ { + var x uint32 + if i < len(m.VrfIds) { + x = uint32(m.VrfIds[i]) + } + buf.EncodeUint32(x) + } + return buf.Bytes(), nil +} +func (m *Nat44EdVrfTablesV2Details) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.TableVrfID = buf.DecodeUint32() + m.NVrfIds = buf.DecodeUint32() + m.VrfIds = make([]uint32, m.NVrfIds) + for i := 0; i < len(m.VrfIds); i++ { + m.VrfIds[i] = buf.DecodeUint32() + } + return nil +} + +// Dump NAT44-ED inter VRF NAT routing tables +// Nat44EdVrfTablesV2Dump defines message 'nat44_ed_vrf_tables_v2_dump'. +// InProgress: the message form may change in the future versions +type Nat44EdVrfTablesV2Dump struct{} + +func (m *Nat44EdVrfTablesV2Dump) Reset() { *m = Nat44EdVrfTablesV2Dump{} } +func (*Nat44EdVrfTablesV2Dump) GetMessageName() string { return "nat44_ed_vrf_tables_v2_dump" } +func (*Nat44EdVrfTablesV2Dump) GetCrcString() string { return "51077d14" } +func (*Nat44EdVrfTablesV2Dump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Nat44EdVrfTablesV2Dump) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *Nat44EdVrfTablesV2Dump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *Nat44EdVrfTablesV2Dump) Unmarshal(b []byte) error { + return nil +} + +// Enable/disable forwarding for NAT44 +// +// Forward packets which don't match existing translation +// or static mapping instead of dropping them. +// - enable - true for enable, false for disable +// // Nat44ForwardingEnableDisable defines message 'nat44_forwarding_enable_disable'. // Deprecated: the message will be removed in the future versions type Nat44ForwardingEnableDisable struct { @@ -1545,6 +1776,15 @@ func (m *Nat44ForwardingEnableDisableReply) Unmarshal(b []byte) error { return nil } +// NAT44 identity mapping details response +// - flags - flag NAT_ADDR_ONLY if address only mapping +// - ip_address - IPv4 address +// - protocol - IP protocol +// - port - port number +// - sw_if_index - interface +// - vfr_id - VRF ID +// - tag - opaque string tag +// // Nat44IdentityMappingDetails defines message 'nat44_identity_mapping_details'. type Nat44IdentityMappingDetails struct { Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` @@ -1602,6 +1842,7 @@ func (m *Nat44IdentityMappingDetails) Unmarshal(b []byte) error { return nil } +// Dump NAT44 identity mappings // Nat44IdentityMappingDump defines message 'nat44_identity_mapping_dump'. type Nat44IdentityMappingDump struct{} @@ -1629,6 +1870,12 @@ func (m *Nat44IdentityMappingDump) Unmarshal(b []byte) error { return nil } +// Enable/disable NAT44 feature on the interface +// - is_add - true if add, false if delete +// - flags - flag NAT_IS_INSIDE if interface is inside else +// interface is outside +// - sw_if_index - software index of the interface +// // Nat44InterfaceAddDelFeature defines message 'nat44_interface_add_del_feature'. type Nat44InterfaceAddDelFeature struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -1705,6 +1952,10 @@ func (m *Nat44InterfaceAddDelFeatureReply) Unmarshal(b []byte) error { return nil } +// NAT44 pool addresses interfaces details response +// - sw_if_index - software index of the interface +// - flags - flag NAT_TWICE_NAT if NAT address range for external hosts +// // Nat44InterfaceAddrDetails defines message 'nat44_interface_addr_details'. type Nat44InterfaceAddrDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1742,6 +1993,7 @@ func (m *Nat44InterfaceAddrDetails) Unmarshal(b []byte) error { return nil } +// Dump NAT44 pool addresses interfaces // Nat44InterfaceAddrDump defines message 'nat44_interface_addr_dump'. type Nat44InterfaceAddrDump struct{} @@ -1769,6 +2021,13 @@ func (m *Nat44InterfaceAddrDump) Unmarshal(b []byte) error { return nil } +// NAT44 interface details response +// - sw_if_index - software index of the interface +// - flags - flag NAT_IS_INSIDE if interface is inside, +// flag NAT_IS_OUTSIDE if interface is outside +// and if both flags are set the interface is +// both inside and outside +// // Nat44InterfaceDetails defines message 'nat44_interface_details'. type Nat44InterfaceDetails struct { Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` @@ -1806,6 +2065,7 @@ func (m *Nat44InterfaceDetails) Unmarshal(b []byte) error { return nil } +// Dump interfaces with NAT44 feature // Nat44InterfaceDump defines message 'nat44_interface_dump'. type Nat44InterfaceDump struct{} @@ -1833,6 +2093,13 @@ func (m *Nat44InterfaceDump) Unmarshal(b []byte) error { return nil } +// Add/delete NAT44 load-balancing static mapping rule backend +// - is_add - true if add, false if delete +// - external_addr - external IPv4 address of the service +// - external_port - external L4 port number of the service +// - protocol - IP protocol number of the service +// - local - local network node +// // Nat44LbStaticMappingAddDelLocal defines message 'nat44_lb_static_mapping_add_del_local'. type Nat44LbStaticMappingAddDelLocal struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -1928,6 +2195,21 @@ func (m *Nat44LbStaticMappingAddDelLocalReply) Unmarshal(b []byte) error { return nil } +// NAT44 load-balancing static mapping rule details response +// - external_addr - external IPv4 address of the service +// - external_port - external L4 port number of the service +// - protocol - IP protocol number of the service +// - flags - flag NAT_TWICE_NAT if NAT address range for external hosts, +// flag NAT_SELF_TWICE_NAT if translate external host address +// and port whenever external host address equals local +// address of internal host, +// flag NAT_OUT2IN_ONLY if rule match only out2in direction +// - affinity - if 0 disabled, otherwise client IP affinity sticky time +// in seconds +// - local_num - number of local network nodes +// - locals - local network nodes +// - tag - opaque string tag +// // Nat44LbStaticMappingDetails defines message 'nat44_lb_static_mapping_details'. type Nat44LbStaticMappingDetails struct { ExternalAddr ip_types.IP4Address `binapi:"ip4_address,name=external_addr" json:"external_addr,omitempty"` @@ -2014,6 +2296,7 @@ func (m *Nat44LbStaticMappingDetails) Unmarshal(b []byte) error { return nil } +// Dump NAT44 load-balancing static mapping rules // Nat44LbStaticMappingDump defines message 'nat44_lb_static_mapping_dump'. type Nat44LbStaticMappingDump struct{} @@ -2041,6 +2324,10 @@ func (m *Nat44LbStaticMappingDump) Unmarshal(b []byte) error { return nil } +// NAT44 set session limit +// - session_limit - session limit +// - vrf_id - vrf id +// // Nat44SetSessionLimit defines message 'nat44_set_session_limit'. type Nat44SetSessionLimit struct { SessionLimit uint32 `binapi:"u32,name=session_limit" json:"session_limit,omitempty"` @@ -2111,6 +2398,7 @@ func (m *Nat44SetSessionLimitReply) Unmarshal(b []byte) error { return nil } +// Show NAT44 plugin running config // Nat44ShowRunningConfig defines message 'nat44_show_running_config'. type Nat44ShowRunningConfig struct{} @@ -2138,6 +2426,24 @@ func (m *Nat44ShowRunningConfig) Unmarshal(b []byte) error { return nil } +// Show NAT44 plugin running config reply +// - retval - return code for the request +// - inside_vrf - default inside VRF id +// - outside_vrf - outside VRF id +// - users - maximum number of users per worker thread +// (NAT44_IS_ENDPOINT_INDEPENDENT) +// - sessions - maximum number of sessions per worker thread +// - user_sessions - maximum number of sessions per user +// (NAT44_IS_ENDPOINT_INDEPENDENT) +// - user_buckets - number of user hash buckets +// (NAT44_IS_ENDPOINT_INDEPENDENT) +// - translation_buckets - number of translation hash buckets +// - flags - flag NAT44_IS_ENDPOINT_INDEPENDENT, +// NAT44_IS_ENDPOINT_DEPENDENT, +// NAT44_IS_STATIC_MAPPING_ONLY, +// NAT44_IS_CONNECTION_TRACKING, +// NAT44_IS_OUT2IN_DPO +// // Nat44ShowRunningConfigReply defines message 'nat44_show_running_config_reply'. type Nat44ShowRunningConfigReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -2228,6 +2534,22 @@ func (m *Nat44ShowRunningConfigReply) Unmarshal(b []byte) error { return nil } +// NAT44 static mapping details response +// - flags - flag NAT_ADDR_ONLY if address only mapping, +// flag NAT_TWICE_NAT if NAT address range for external hosts, +// flag NAT_SELF_TWICE_NAT if translate external host address +// and port whenever external host address equals local +// address of internal host, +// flag NAT_OUT2IN_ONLY if rule match only out2in direction +// - local_ip_address - local IPv4 address +// - external_ip_address - external IPv4 address +// - protocol - IP protocol, valid only if no NAT_ADDR_ONLY flag +// - local_port - local port number, valid only if no NAT_ADDR_ONLY flag +// - external_port - external port number, valid only if no NAT_ADDR_ONLY flag +// - external_sw_if_index - external interface +// - vfr_id - VRF ID +// - tag - opaque string tag +// // Nat44StaticMappingDetails defines message 'nat44_static_mapping_details'. type Nat44StaticMappingDetails struct { Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` @@ -2293,6 +2615,7 @@ func (m *Nat44StaticMappingDetails) Unmarshal(b []byte) error { return nil } +// Dump NAT44 static mappings // Nat44StaticMappingDump defines message 'nat44_static_mapping_dump'. type Nat44StaticMappingDump struct{} @@ -2320,6 +2643,13 @@ func (m *Nat44StaticMappingDump) Unmarshal(b []byte) error { return nil } +// NAT44 users response +// +// @vrf_id - VRF ID +// - ip_address - IPv4 address +// - nsessions - number of dynamic sessions +// - nstaticsessions - number of static sessions +// // Nat44UserDetails defines message 'nat44_user_details'. type Nat44UserDetails struct { VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` @@ -2365,6 +2695,7 @@ func (m *Nat44UserDetails) Unmarshal(b []byte) error { return nil } +// Dump NAT44 users // Nat44UserDump defines message 'nat44_user_dump'. type Nat44UserDump struct{} @@ -2392,7 +2723,28 @@ func (m *Nat44UserDump) Unmarshal(b []byte) error { return nil } +// NAT44 user's sessions response +// - outside_ip_address - outside IPv4 address +// - outside_port - outside port +// - inside_ip_address - inside IPv4 address +// - inside_port - inside port +// - protocol - protocol +// - flags - flag NAT_IS_STATIC if session is static, +// flag NAT_IS_TWICE_NAT if session is twice-nat, +// flag NAT_IS_EXT_HOST_VALID if external host address +// and port are valid +// - last_heard - last heard timer +// - total_bytes - count of bytes sent through session +// - total_pkts - count of pakets sent through session +// - ext_host_address - external host IPv4 address +// - ext_host_port - external host port +// - ext_host_nat_address - post-NAT external host IPv4 address (valid +// only if twice-nat session) +// - ext_host_nat_port - post-NAT external host port (valid only if +// twice-nat session) +// // Nat44UserSessionDetails defines message 'nat44_user_session_details'. +// Deprecated: the message will be removed in the future versions type Nat44UserSessionDetails struct { OutsideIPAddress ip_types.IP4Address `binapi:"ip4_address,name=outside_ip_address" json:"outside_ip_address,omitempty"` OutsidePort uint16 `binapi:"u16,name=outside_port" json:"outside_port,omitempty"` @@ -2473,7 +2825,12 @@ func (m *Nat44UserSessionDetails) Unmarshal(b []byte) error { return nil } +// NAT44 user's sessions +// - ip_address - IPv4 address of the user to dump +// - vrf_id - VRF_ID +// // Nat44UserSessionDump defines message 'nat44_user_session_dump'. +// Deprecated: the message will be removed in the future versions type Nat44UserSessionDump struct { IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` @@ -2510,7 +2867,30 @@ func (m *Nat44UserSessionDump) Unmarshal(b []byte) error { return nil } +// NAT44 user's sessions response +// - outside_ip_address - outside IPv4 address +// - outside_port - outside port +// - inside_ip_address - inside IPv4 address +// - inside_port - inside port +// - protocol - protocol +// - flags - flag NAT_IS_STATIC if session is static, +// flag NAT_IS_TWICE_NAT if session is twice-nat, +// flag NAT_IS_EXT_HOST_VALID if external host address +// and port are valid +// - last_heard - last heard timer +// - total_bytes - count of bytes sent through session +// - total_pkts - count of pakets sent through session +// - ext_host_address - external host IPv4 address +// - ext_host_port - external host port +// - ext_host_nat_address - post-NAT external host IPv4 address (valid +// only if twice-nat session) +// - ext_host_nat_port - post-NAT external host port (valid only if +// twice-nat session) +// - is_timed_out - true, if session is timed out, and false, if session +// is active +// // Nat44UserSessionV2Details defines message 'nat44_user_session_v2_details'. +// Deprecated: the message will be removed in the future versions type Nat44UserSessionV2Details struct { OutsideIPAddress ip_types.IP4Address `binapi:"ip4_address,name=outside_ip_address" json:"outside_ip_address,omitempty"` OutsidePort uint16 `binapi:"u16,name=outside_port" json:"outside_port,omitempty"` @@ -2595,7 +2975,12 @@ func (m *Nat44UserSessionV2Details) Unmarshal(b []byte) error { return nil } +// NAT44 user's sessions +// - ip_address - IPv4 address of the user to dump +// - vrf_id - VRF_ID +// // Nat44UserSessionV2Dump defines message 'nat44_user_session_v2_dump'. +// Deprecated: the message will be removed in the future versions type Nat44UserSessionV2Dump struct { IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` @@ -2632,6 +3017,29 @@ func (m *Nat44UserSessionV2Dump) Unmarshal(b []byte) error { return nil } +// NAT44 user's sessions response +// - outside_ip_address - outside IPv4 address +// - outside_port - outside port +// - inside_ip_address - inside IPv4 address +// - inside_port - inside port +// - protocol - protocol +// - flags - flag NAT_IS_STATIC if session is static, +// flag NAT_IS_TWICE_NAT if session is twice-nat, +// flag NAT_IS_EXT_HOST_VALID if external host address +// and port are valid +// - last_heard - last heard timer since VPP start +// - time_since_last_heard - difference between current vpp time and last_heard value +// - total_bytes - count of bytes sent through session +// - total_pkts - count of pakets sent through session +// - ext_host_address - external host IPv4 address +// - ext_host_port - external host port +// - ext_host_nat_address - post-NAT external host IPv4 address (valid +// only if twice-nat session) +// - ext_host_nat_port - post-NAT external host port (valid only if +// twice-nat session) +// - is_timed_out - true, if session is timed out, and false, if session +// is active +// // Nat44UserSessionV3Details defines message 'nat44_user_session_v3_details'. type Nat44UserSessionV3Details struct { OutsideIPAddress ip_types.IP4Address `binapi:"ip4_address,name=outside_ip_address" json:"outside_ip_address,omitempty"` @@ -2721,6 +3129,10 @@ func (m *Nat44UserSessionV3Details) Unmarshal(b []byte) error { return nil } +// NAT44 user's sessions +// - ip_address - IPv4 address of the user to dump +// - vrf_id - VRF_ID +// // Nat44UserSessionV3Dump defines message 'nat44_user_session_v3_dump'. type Nat44UserSessionV3Dump struct { IPAddress ip_types.IP4Address `binapi:"ip4_address,name=ip_address" json:"ip_address,omitempty"` @@ -2758,6 +3170,7 @@ func (m *Nat44UserSessionV3Dump) Unmarshal(b []byte) error { return nil } +// Get TCP MSS rewriting configuration // NatGetMssClamping defines message 'nat_get_mss_clamping'. type NatGetMssClamping struct{} @@ -2785,6 +3198,11 @@ func (m *NatGetMssClamping) Unmarshal(b []byte) error { return nil } +// Get TCP MSS rewriting configuration reply +// - retval - return code +// - mss_value - MSS value to be used for MSS rewriting +// - enable - if true enable MSS rewriting feature else disable +// // NatGetMssClampingReply defines message 'nat_get_mss_clamping_reply'. type NatGetMssClampingReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -2826,6 +3244,11 @@ func (m *NatGetMssClampingReply) Unmarshal(b []byte) error { return nil } +// Enable/disable NAT IPFIX logging +// - domain_id - observation domain ID +// - src_port - source port number +// - enable - true if enable, false if disable +// // NatIpfixEnableDisable defines message 'nat_ipfix_enable_disable'. // Deprecated: the message will be removed in the future versions type NatIpfixEnableDisable struct { @@ -2902,6 +3325,10 @@ func (m *NatIpfixEnableDisableReply) Unmarshal(b []byte) error { return nil } +// Set TCP MSS rewriting configuration +// - mss_value - MSS value to be used for MSS rewriting +// - enable - if true enable MSS rewriting feature else disable +// // NatSetMssClamping defines message 'nat_set_mss_clamping'. type NatSetMssClamping struct { MssValue uint16 `binapi:"u16,name=mss_value" json:"mss_value,omitempty"` @@ -2972,6 +3399,12 @@ func (m *NatSetMssClampingReply) Unmarshal(b []byte) error { return nil } +// Set values of timeouts for NAT sessions (seconds) +// - udp - UDP timeout (default 300sec) +// - tcp_established - TCP established timeout (default 7440sec) +// - tcp_transitory - TCP transitory timeout (default 240sec) +// - icmp - ICMP timeout (default 60sec) +// // NatSetTimeouts defines message 'nat_set_timeouts'. // Deprecated: the message will be removed in the future versions type NatSetTimeouts struct { @@ -3052,6 +3485,9 @@ func (m *NatSetTimeoutsReply) Unmarshal(b []byte) error { return nil } +// Set NAT workers +// - worker_mask - NAT workers mask +// // NatSetWorkers defines message 'nat_set_workers'. type NatSetWorkers struct { WorkerMask uint64 `binapi:"u64,name=worker_mask" json:"worker_mask,omitempty"` @@ -3118,6 +3554,11 @@ func (m *NatSetWorkersReply) Unmarshal(b []byte) error { return nil } +// NAT workers details response +// - worker_index - worker index +// - lcore_id - lcore ID +// - name - worker name +// // NatWorkerDetails defines message 'nat_worker_details'. type NatWorkerDetails struct { WorkerIndex uint32 `binapi:"u32,name=worker_index" json:"worker_index,omitempty"` @@ -3159,6 +3600,7 @@ func (m *NatWorkerDetails) Unmarshal(b []byte) error { return nil } +// Dump NAT workers // NatWorkerDump defines message 'nat_worker_dump'. type NatWorkerDump struct{} @@ -3221,6 +3663,8 @@ func file_nat44_ed_binapi_init() { api.RegisterMessage((*Nat44EdShowFqOptionsReply)(nil), "nat44_ed_show_fq_options_reply_7213b545") api.RegisterMessage((*Nat44EdVrfTablesDetails)(nil), "nat44_ed_vrf_tables_details_7b264e4f") api.RegisterMessage((*Nat44EdVrfTablesDump)(nil), "nat44_ed_vrf_tables_dump_51077d14") + api.RegisterMessage((*Nat44EdVrfTablesV2Details)(nil), "nat44_ed_vrf_tables_v2_details_7b264e4f") + api.RegisterMessage((*Nat44EdVrfTablesV2Dump)(nil), "nat44_ed_vrf_tables_v2_dump_51077d14") api.RegisterMessage((*Nat44ForwardingEnableDisable)(nil), "nat44_forwarding_enable_disable_b3e225d2") api.RegisterMessage((*Nat44ForwardingEnableDisableReply)(nil), "nat44_forwarding_enable_disable_reply_e8d4e804") api.RegisterMessage((*Nat44IdentityMappingDetails)(nil), "nat44_identity_mapping_details_2a52a030") @@ -3299,6 +3743,8 @@ func AllMessages() []api.Message { (*Nat44EdShowFqOptionsReply)(nil), (*Nat44EdVrfTablesDetails)(nil), (*Nat44EdVrfTablesDump)(nil), + (*Nat44EdVrfTablesV2Details)(nil), + (*Nat44EdVrfTablesV2Dump)(nil), (*Nat44ForwardingEnableDisable)(nil), (*Nat44ForwardingEnableDisableReply)(nil), (*Nat44IdentityMappingDetails)(nil), diff --git a/binapi/nat44_ed/nat44_ed_rpc.ba.go b/binapi/nat44_ed/nat44_ed_rpc.ba.go index aee74b58..9059b417 100644 --- a/binapi/nat44_ed/nat44_ed_rpc.ba.go +++ b/binapi/nat44_ed/nat44_ed_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service nat44_ed. @@ -29,6 +29,7 @@ type RPCService interface { Nat44EdSetFqOptions(ctx context.Context, in *Nat44EdSetFqOptions) (*Nat44EdSetFqOptionsReply, error) Nat44EdShowFqOptions(ctx context.Context, in *Nat44EdShowFqOptions) (*Nat44EdShowFqOptionsReply, error) Nat44EdVrfTablesDump(ctx context.Context, in *Nat44EdVrfTablesDump) (RPCService_Nat44EdVrfTablesDumpClient, error) + Nat44EdVrfTablesV2Dump(ctx context.Context, in *Nat44EdVrfTablesV2Dump) (RPCService_Nat44EdVrfTablesV2DumpClient, error) Nat44ForwardingEnableDisable(ctx context.Context, in *Nat44ForwardingEnableDisable) (*Nat44ForwardingEnableDisableReply, error) Nat44IdentityMappingDump(ctx context.Context, in *Nat44IdentityMappingDump) (RPCService_Nat44IdentityMappingDumpClient, error) Nat44InterfaceAddDelFeature(ctx context.Context, in *Nat44InterfaceAddDelFeature) (*Nat44InterfaceAddDelFeatureReply, error) @@ -205,7 +206,7 @@ func (c *serviceClient) Nat44EdOutputInterfaceGet(ctx context.Context, in *Nat44 } type RPCService_Nat44EdOutputInterfaceGetClient interface { - Recv() (*Nat44EdOutputInterfaceDetails, error) + Recv() (*Nat44EdOutputInterfaceDetails, *Nat44EdOutputInterfaceGetReply, error) api.Stream } @@ -213,22 +214,26 @@ type serviceClient_Nat44EdOutputInterfaceGetClient struct { api.Stream } -func (c *serviceClient_Nat44EdOutputInterfaceGetClient) Recv() (*Nat44EdOutputInterfaceDetails, error) { +func (c *serviceClient_Nat44EdOutputInterfaceGetClient) Recv() (*Nat44EdOutputInterfaceDetails, *Nat44EdOutputInterfaceGetReply, error) { msg, err := c.Stream.RecvMsg() if err != nil { - return nil, err + return nil, nil, err } switch m := msg.(type) { case *Nat44EdOutputInterfaceDetails: - return m, nil + return m, nil, nil case *Nat44EdOutputInterfaceGetReply: + if err := api.RetvalToVPPApiError(m.Retval); err != nil { + c.Stream.Close() + return nil, m, err + } err = c.Stream.Close() if err != nil { - return nil, err + return nil, m, err } - return nil, io.EOF + return nil, m, io.EOF default: - return nil, fmt.Errorf("unexpected message: %T %v", m, m) + return nil, nil, fmt.Errorf("unexpected message: %T %v", m, m) } } @@ -302,6 +307,49 @@ func (c *serviceClient_Nat44EdVrfTablesDumpClient) Recv() (*Nat44EdVrfTablesDeta } } +func (c *serviceClient) Nat44EdVrfTablesV2Dump(ctx context.Context, in *Nat44EdVrfTablesV2Dump) (RPCService_Nat44EdVrfTablesV2DumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_Nat44EdVrfTablesV2DumpClient{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_Nat44EdVrfTablesV2DumpClient interface { + Recv() (*Nat44EdVrfTablesV2Details, error) + api.Stream +} + +type serviceClient_Nat44EdVrfTablesV2DumpClient struct { + api.Stream +} + +func (c *serviceClient_Nat44EdVrfTablesV2DumpClient) Recv() (*Nat44EdVrfTablesV2Details, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *Nat44EdVrfTablesV2Details: + return m, nil + 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) Nat44ForwardingEnableDisable(ctx context.Context, in *Nat44ForwardingEnableDisable) (*Nat44ForwardingEnableDisableReply, error) { out := new(Nat44ForwardingEnableDisableReply) err := c.conn.Invoke(ctx, in, out) diff --git a/binapi/nat44_ei/nat44_ei.ba.go b/binapi/nat44_ei/nat44_ei.ba.go index a878a568..a7952643 100644 --- a/binapi/nat44_ei/nat44_ei.ba.go +++ b/binapi/nat44_ei/nat44_ei.ba.go @@ -1,25 +1,24 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/nat44_ei.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/nat44_ei.api.json // Package nat44_ei contains generated bindings for API file nat44_ei.api. // // Contents: -// -// 1 enum -// 80 messages +// - 1 enum +// - 80 messages package nat44_ei import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" nat_types "github.com/networkservicemesh/govpp/binapi/nat_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -98,6 +97,12 @@ func (x Nat44EiConfigFlags) String() string { return s } +// Add/del NAT44 address range +// - first_ip_address - first IPv4 address +// - last_ip_address - last IPv4 address +// - vrf_id - VRF id of tenant, ~0 means independent of VRF +// - is_add - true if add, false if delete +// // Nat44EiAddDelAddressRange defines message 'nat44_ei_add_del_address_range'. // InProgress: the message form may change in the future versions type Nat44EiAddDelAddressRange struct { @@ -180,6 +185,17 @@ func (m *Nat44EiAddDelAddressRangeReply) Unmarshal(b []byte) error { return nil } +// Add/delete NAT44 identity mapping +// - is_add - true if add, false if delete +// - flags - flag NAT44_EI_IS_ADDR_ONLY if address only mapping +// - ip_address - IPv4 address +// - protocol - IP protocol +// - port - port number +// - sw_if_index - interface (if set ip_address is ignored, ~0 means not +// used) +// - vfr_id - VRF ID (if ~0 use default VRF) +// - tag - opaque string tag +// // Nat44EiAddDelIdentityMapping defines message 'nat44_ei_add_del_identity_mapping'. // Deprecated: the message will be removed in the future versions type Nat44EiAddDelIdentityMapping struct { @@ -280,6 +296,11 @@ func (m *Nat44EiAddDelIdentityMappingReply) Unmarshal(b []byte) error { return nil } +// Add/delete NAT44 pool address from specific interfce +// - is_add - true if add, false if delete +// - sw_if_index - software index of the interface +// - flags - flag NAT_TWICE_NAT if NAT address range for external hosts +// // Nat44EiAddDelInterfaceAddr defines message 'nat44_ei_add_del_interface_addr'. // Deprecated: the message will be removed in the future versions type Nat44EiAddDelInterfaceAddr struct { @@ -358,6 +379,12 @@ func (m *Nat44EiAddDelInterfaceAddrReply) Unmarshal(b []byte) error { return nil } +// add/del NAT output interface (postrouting +// +// in2out translation) +// - is_add - true if add, false if delete +// - sw_if_index - software index of the interface +// // Nat44EiAddDelOutputInterface defines message 'nat44_ei_add_del_output_interface'. type Nat44EiAddDelOutputInterface struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -432,6 +459,20 @@ func (m *Nat44EiAddDelOutputInterfaceReply) Unmarshal(b []byte) error { return nil } +// Add/delete NAT44 static mapping +// - is_add - true if add, false if delete +// - flags - flag NAT44_EI_IS_ADDR_ONLY if address only mapping +// - local_ip_address - local IPv4 address +// - external_ip_address - external IPv4 address +// - protocol - IP protocol, used only if addr_only=0 +// - local_port - local port number, used only if addr_only=0 +// - external_port - external port number, used only if addr_only=0 +// - external_sw_if_index - external interface (if set +// external_ip_address is ignored, ~0 means not +// used) +// - vfr_id - VRF ID +// - tag - opaque string tag +// // Nat44EiAddDelStaticMapping defines message 'nat44_ei_add_del_static_mapping'. // InProgress: the message form may change in the future versions type Nat44EiAddDelStaticMapping struct { @@ -538,6 +579,10 @@ func (m *Nat44EiAddDelStaticMappingReply) Unmarshal(b []byte) error { return nil } +// NAT44 address details response +// - ip_address - IPv4 address +// - vrf_id - VRF id of tenant, ~0 means independent of VRF +// // Nat44EiAddressDetails defines message 'nat44_ei_address_details'. // InProgress: the message form may change in the future versions type Nat44EiAddressDetails struct { @@ -576,6 +621,7 @@ func (m *Nat44EiAddressDetails) Unmarshal(b []byte) error { return nil } +// Dump NAT44 addresses // Nat44EiAddressDump defines message 'nat44_ei_address_dump'. // InProgress: the message form may change in the future versions type Nat44EiAddressDump struct{} @@ -604,6 +650,18 @@ func (m *Nat44EiAddressDump) Unmarshal(b []byte) error { return nil } +// Delete NAT44 session +// - ip_address - IPv4 address +// - protocol - IP protocol +// - port - port number +// - vfr_id - VRF ID +// - flags - flag NAT_IS_INSIDE if interface is inside or +// interface is outside, +// flag NAT_IS_EXT_HOST_VALID if external host address and +// port are valid +// - ext_host_address - external host IPv4 address +// - ext_host_port - external host port +// // Nat44EiDelSession defines message 'nat44_ei_del_session'. // InProgress: the message form may change in the future versions type Nat44EiDelSession struct { @@ -696,6 +754,10 @@ func (m *Nat44EiDelSessionReply) Unmarshal(b []byte) error { return nil } +// Del NAT44 user +// - ip_address - IPv4 address +// - fib_index - FIB index +// // Nat44EiDelUser defines message 'nat44_ei_del_user'. // InProgress: the message form may change in the future versions type Nat44EiDelUser struct { @@ -768,6 +830,12 @@ func (m *Nat44EiDelUserReply) Unmarshal(b []byte) error { return nil } +// Enable/disable forwarding for NAT44 +// +// Forward packets which don't match existing translation +// or static mapping instead of dropping them. +// - enable - true for enable, false for disable +// // Nat44EiForwardingEnableDisable defines message 'nat44_ei_forwarding_enable_disable'. // InProgress: the message form may change in the future versions type Nat44EiForwardingEnableDisable struct { @@ -840,6 +908,7 @@ func (m *Nat44EiForwardingEnableDisableReply) Unmarshal(b []byte) error { return nil } +// Get address and port assignment algorithm // Nat44EiGetAddrAndPortAllocAlg defines message 'nat44_ei_get_addr_and_port_alloc_alg'. // Deprecated: the message will be removed in the future versions type Nat44EiGetAddrAndPortAllocAlg struct{} @@ -870,6 +939,17 @@ func (m *Nat44EiGetAddrAndPortAllocAlg) Unmarshal(b []byte) error { return nil } +// Get address and port assignment algorithm reply +// - retval - return code +// - alg - address and port assignment algorithm: +// 0 - default, 1 - MAP-E, 2 - port range +// (see nat44_ei_addr_and_port_alloc_alg_t in nat.h) +// - psid_offset - number of offset bits (valid only for MAP-E alg) +// - psid_length - length of PSID (valid only for MAP-E alg) +// - psid - Port Set Identifier (PSID) value (valid only for MAP-E alg) +// - start_port - beginning of the port range +// - end_port - end of the port range +// // Nat44EiGetAddrAndPortAllocAlgReply defines message 'nat44_ei_get_addr_and_port_alloc_alg_reply'. // Deprecated: the message will be removed in the future versions type Nat44EiGetAddrAndPortAllocAlgReply struct { @@ -930,6 +1010,7 @@ func (m *Nat44EiGetAddrAndPortAllocAlgReply) Unmarshal(b []byte) error { return nil } +// Get TCP MSS rewriting configuration // Nat44EiGetMssClamping defines message 'nat44_ei_get_mss_clamping'. // Deprecated: the message will be removed in the future versions type Nat44EiGetMssClamping struct{} @@ -958,6 +1039,11 @@ func (m *Nat44EiGetMssClamping) Unmarshal(b []byte) error { return nil } +// Get TCP MSS rewriting configuration reply +// - retval - return code +// - mss_value - MSS value to be used for MSS rewriting +// - enable - if true enable MSS rewriting feature else disable +// // Nat44EiGetMssClampingReply defines message 'nat44_ei_get_mss_clamping_reply'. // Deprecated: the message will be removed in the future versions type Nat44EiGetMssClampingReply struct { @@ -1000,6 +1086,7 @@ func (m *Nat44EiGetMssClampingReply) Unmarshal(b []byte) error { return nil } +// Flush the current HA data (for testing) // Nat44EiHaFlush defines message 'nat44_ei_ha_flush'. // InProgress: the message form may change in the future versions type Nat44EiHaFlush struct{} @@ -1062,6 +1149,7 @@ func (m *Nat44EiHaFlushReply) Unmarshal(b []byte) error { return nil } +// Get HA failover/remote settings // Nat44EiHaGetFailover defines message 'nat44_ei_ha_get_failover'. // Deprecated: the message will be removed in the future versions type Nat44EiHaGetFailover struct{} @@ -1090,6 +1178,13 @@ func (m *Nat44EiHaGetFailover) Unmarshal(b []byte) error { return nil } +// Get HA failover/remote settings reply +// - retval - return code +// - ip_address - failover IP4 address +// - port - failvoer UDP port number +// - session_refresh_interval - number of seconds after which to send +// session counters refresh +// // Nat44EiHaGetFailoverReply defines message 'nat44_ei_ha_get_failover_reply'. // Deprecated: the message will be removed in the future versions type Nat44EiHaGetFailoverReply struct { @@ -1136,6 +1231,7 @@ func (m *Nat44EiHaGetFailoverReply) Unmarshal(b []byte) error { return nil } +// Get HA listener/local configuration // Nat44EiHaGetListener defines message 'nat44_ei_ha_get_listener'. // Deprecated: the message will be removed in the future versions type Nat44EiHaGetListener struct{} @@ -1164,6 +1260,12 @@ func (m *Nat44EiHaGetListener) Unmarshal(b []byte) error { return nil } +// Get HA listener/local configuration reply +// - retval - return code +// - ip_address - local IP4 address +// - port - local UDP port number +// - path_mtu - Path MTU between local and failover +// // Nat44EiHaGetListenerReply defines message 'nat44_ei_ha_get_listener_reply'. // Deprecated: the message will be removed in the future versions type Nat44EiHaGetListenerReply struct { @@ -1210,6 +1312,12 @@ func (m *Nat44EiHaGetListenerReply) Unmarshal(b []byte) error { return nil } +// Resync HA (resend existing sessions to new failover) +// - want_resync_event - resync completed event sent to the sender via +// nat44_ei_ha_resync_completed_event API message if +// non-zero +// - pid - sender's pid +// // Nat44EiHaResync defines message 'nat44_ei_ha_resync'. // InProgress: the message form may change in the future versions type Nat44EiHaResync struct { @@ -1248,6 +1356,10 @@ func (m *Nat44EiHaResync) Unmarshal(b []byte) error { return nil } +// Tell client about a HA resync completion event +// - pid - client pid registered to receive notification +// - missed_count - number of missed (not ACKed) messages +// // Nat44EiHaResyncCompletedEvent defines message 'nat44_ei_ha_resync_completed_event'. // InProgress: the message form may change in the future versions type Nat44EiHaResyncCompletedEvent struct { @@ -1322,6 +1434,12 @@ func (m *Nat44EiHaResyncReply) Unmarshal(b []byte) error { return nil } +// Set HA failover (remote settings) +// - ip_address - failover IP4 address +// - port - failvoer UDP port number +// - session_refresh_interval - number of seconds after which to send +// session counters refresh +// // Nat44EiHaSetFailover defines message 'nat44_ei_ha_set_failover'. // InProgress: the message form may change in the future versions type Nat44EiHaSetFailover struct { @@ -1398,6 +1516,11 @@ func (m *Nat44EiHaSetFailoverReply) Unmarshal(b []byte) error { return nil } +// Set HA listener (local settings) +// - ip_address - local IP4 address +// - port - local UDP port number +// - path_mtu - path MTU between local and failover +// // Nat44EiHaSetListener defines message 'nat44_ei_ha_set_listener'. // InProgress: the message form may change in the future versions type Nat44EiHaSetListener struct { @@ -1474,6 +1597,15 @@ func (m *Nat44EiHaSetListenerReply) Unmarshal(b []byte) error { return nil } +// NAT44 identity mapping details response +// - flags - flag NAT44_EI_ADDR_ONLY if address only mapping +// - ip_address - IPv4 address +// - protocol - IP protocol +// - port - port number +// - sw_if_index - interface +// - vfr_id - VRF ID +// - tag - opaque string tag +// // Nat44EiIdentityMappingDetails defines message 'nat44_ei_identity_mapping_details'. // Deprecated: the message will be removed in the future versions type Nat44EiIdentityMappingDetails struct { @@ -1534,6 +1666,7 @@ func (m *Nat44EiIdentityMappingDetails) Unmarshal(b []byte) error { return nil } +// Dump NAT44 identity mappings // Nat44EiIdentityMappingDump defines message 'nat44_ei_identity_mapping_dump'. // Deprecated: the message will be removed in the future versions type Nat44EiIdentityMappingDump struct{} @@ -1562,6 +1695,12 @@ func (m *Nat44EiIdentityMappingDump) Unmarshal(b []byte) error { return nil } +// Enable/disable NAT44 feature on the interface +// - is_add - true if add, false if delete +// - flags - flag NAT_IS_INSIDE if interface is inside else +// interface is outside +// - sw_if_index - software index of the interface +// // Nat44EiInterfaceAddDelFeature defines message 'nat44_ei_interface_add_del_feature'. // InProgress: the message form may change in the future versions type Nat44EiInterfaceAddDelFeature struct { @@ -1642,6 +1781,14 @@ func (m *Nat44EiInterfaceAddDelFeatureReply) Unmarshal(b []byte) error { return nil } +// Enable/disbale NAT44 as an interface output feature (postrouting +// +// in2out translation) +// - is_add - true if add, false if delete +// - flags - flag NAT_IS_INSIDE if interface is inside else +// interface is outside +// - sw_if_index - software index of the interface +// // Nat44EiInterfaceAddDelOutputFeature defines message 'nat44_ei_interface_add_del_output_feature'. // Deprecated: the message will be removed in the future versions type Nat44EiInterfaceAddDelOutputFeature struct { @@ -1724,6 +1871,9 @@ func (m *Nat44EiInterfaceAddDelOutputFeatureReply) Unmarshal(b []byte) error { return nil } +// NAT44 pool addresses interfaces details response +// - sw_if_index - software index of the interface +// // Nat44EiInterfaceAddrDetails defines message 'nat44_ei_interface_addr_details'. // Deprecated: the message will be removed in the future versions type Nat44EiInterfaceAddrDetails struct { @@ -1758,6 +1908,7 @@ func (m *Nat44EiInterfaceAddrDetails) Unmarshal(b []byte) error { return nil } +// Dump NAT44 pool addresses interfaces // Nat44EiInterfaceAddrDump defines message 'nat44_ei_interface_addr_dump'. // Deprecated: the message will be removed in the future versions type Nat44EiInterfaceAddrDump struct{} @@ -1786,6 +1937,13 @@ func (m *Nat44EiInterfaceAddrDump) Unmarshal(b []byte) error { return nil } +// NAT44 interface details response +// - sw_if_index - software index of the interface +// - flags - flag NAT_IS_INSIDE if interface is inside, +// flag NAT_IS_OUTSIDE if interface is outside +// and if both flags are set the interface is +// both inside and outside +// // Nat44EiInterfaceDetails defines message 'nat44_ei_interface_details'. // InProgress: the message form may change in the future versions type Nat44EiInterfaceDetails struct { @@ -1824,6 +1982,7 @@ func (m *Nat44EiInterfaceDetails) Unmarshal(b []byte) error { return nil } +// Dump interfaces with NAT44 feature // Nat44EiInterfaceDump defines message 'nat44_ei_interface_dump'. // InProgress: the message form may change in the future versions type Nat44EiInterfaceDump struct{} @@ -1852,6 +2011,11 @@ func (m *Nat44EiInterfaceDump) Unmarshal(b []byte) error { return nil } +// NAT44 interface with output feature details response +// - flags - flag NAT_IS_INSIDE if interface is inside else +// interface is outside +// - sw_if_index - software index of the interface +// // Nat44EiInterfaceOutputFeatureDetails defines message 'nat44_ei_interface_output_feature_details'. // Deprecated: the message will be removed in the future versions type Nat44EiInterfaceOutputFeatureDetails struct { @@ -1892,6 +2056,7 @@ func (m *Nat44EiInterfaceOutputFeatureDetails) Unmarshal(b []byte) error { return nil } +// Dump interfaces with NAT44 output feature // Nat44EiInterfaceOutputFeatureDump defines message 'nat44_ei_interface_output_feature_dump'. // Deprecated: the message will be removed in the future versions type Nat44EiInterfaceOutputFeatureDump struct{} @@ -1922,6 +2087,11 @@ func (m *Nat44EiInterfaceOutputFeatureDump) Unmarshal(b []byte) error { return nil } +// Enable/disable NAT IPFIX logging +// - domain_id - observation domain ID +// - src_port - source port number +// - enable - true if enable, false if disable +// // Nat44EiIpfixEnableDisable defines message 'nat44_ei_ipfix_enable_disable'. // InProgress: the message form may change in the future versions type Nat44EiIpfixEnableDisable struct { @@ -2107,6 +2277,19 @@ func (m *Nat44EiOutputInterfaceGetReply) Unmarshal(b []byte) error { return nil } +// Enable/disable NAT44 plugin +// - inside_vrf - inside vrf id +// - outside_vrf - outside vrf id +// - users - maximum number of users per thread +// - user_memory - overwrite hash allocation parameter +// - sessions - maximum number of sessions per thread +// - session_memory - overwrite hash allocation parameter +// - user_sessions - maximum number of sessions per user +// - enable - true if enable, false if disable +// - flags - flag NAT44_EI_IS_STATIC_MAPPING_ONLY, +// NAT44_EI_IS_CONNECTION_TRACKING, +// NAT44_EI_IS_OUT2IN_DPO +// // Nat44EiPluginEnableDisable defines message 'nat44_ei_plugin_enable_disable'. // InProgress: the message form may change in the future versions type Nat44EiPluginEnableDisable struct { @@ -2209,6 +2392,16 @@ func (m *Nat44EiPluginEnableDisableReply) Unmarshal(b []byte) error { return nil } +// Set address and port assignment algorithm +// - alg - address and port assignment algorithm: +// 0 - default, 1 - MAP-E, 2 - port range +// (see nat44_ei_addr_and_port_alloc_alg_t in nat.h) +// - psid_offset - number of offset bits (valid only for MAP-E alg) +// - psid_length - length of PSID (valid only for MAP-E alg) +// - psid - Port Set Identifier (PSID) value (valid only for MAP-E alg) +// - start_port - beginning of the port range +// - end_port - end of the port range +// // Nat44EiSetAddrAndPortAllocAlg defines message 'nat44_ei_set_addr_and_port_alloc_alg'. // InProgress: the message form may change in the future versions type Nat44EiSetAddrAndPortAllocAlg struct { @@ -2301,6 +2494,9 @@ func (m *Nat44EiSetAddrAndPortAllocAlgReply) Unmarshal(b []byte) error { return nil } +// Set NAT handoff frame queue options +// - frame_queue_nelts - number of worker handoff frame queue elements +// // Nat44EiSetFqOptions defines message 'nat44_ei_set_fq_options'. // InProgress: the message form may change in the future versions type Nat44EiSetFqOptions struct { @@ -2369,6 +2565,9 @@ func (m *Nat44EiSetFqOptionsReply) Unmarshal(b []byte) error { return nil } +// Set NAT44 logging level +// - log_level - logging level +// // Nat44EiSetLogLevel defines message 'nat44_ei_set_log_level'. // Deprecated: the message will be removed in the future versions type Nat44EiSetLogLevel struct { @@ -2437,6 +2636,10 @@ func (m *Nat44EiSetLogLevelReply) Unmarshal(b []byte) error { return nil } +// Set TCP MSS rewriting configuration +// - mss_value - MSS value to be used for MSS rewriting +// - enable - if true enable MSS rewriting feature else disable +// // Nat44EiSetMssClamping defines message 'nat44_ei_set_mss_clamping'. // InProgress: the message form may change in the future versions type Nat44EiSetMssClamping struct { @@ -2509,6 +2712,12 @@ func (m *Nat44EiSetMssClampingReply) Unmarshal(b []byte) error { return nil } +// Set values of timeouts for NAT sessions (seconds) +// - udp - UDP timeout (default 300sec) +// - tcp_established - TCP established timeout (default 7440sec) +// - tcp_transitory - TCP transitory timeout (default 240sec) +// - icmp - ICMP timeout (default 60sec) +// // Nat44EiSetTimeouts defines message 'nat44_ei_set_timeouts'. // InProgress: the message form may change in the future versions type Nat44EiSetTimeouts struct { @@ -2589,6 +2798,9 @@ func (m *Nat44EiSetTimeoutsReply) Unmarshal(b []byte) error { return nil } +// Set NAT workers +// - worker_mask - NAT workers mask +// // Nat44EiSetWorkers defines message 'nat44_ei_set_workers'. // InProgress: the message form may change in the future versions type Nat44EiSetWorkers struct { @@ -2657,6 +2869,7 @@ func (m *Nat44EiSetWorkersReply) Unmarshal(b []byte) error { return nil } +// Show NAT handoff frame queue options // Nat44EiShowFqOptions defines message 'nat44_ei_show_fq_options'. // InProgress: the message form may change in the future versions type Nat44EiShowFqOptions struct{} @@ -2685,6 +2898,10 @@ func (m *Nat44EiShowFqOptions) Unmarshal(b []byte) error { return nil } +// Show NAT handoff frame queue options reply +// - retval - return code for the request +// - frame_queue_nelts - number of worker handoff frame queue elements +// // Nat44EiShowFqOptionsReply defines message 'nat44_ei_show_fq_options_reply'. // InProgress: the message form may change in the future versions type Nat44EiShowFqOptionsReply struct { @@ -2723,6 +2940,7 @@ func (m *Nat44EiShowFqOptionsReply) Unmarshal(b []byte) error { return nil } +// Show NAT44 plugin running config // Nat44EiShowRunningConfig defines message 'nat44_ei_show_running_config'. // InProgress: the message form may change in the future versions type Nat44EiShowRunningConfig struct{} @@ -2751,6 +2969,19 @@ func (m *Nat44EiShowRunningConfig) Unmarshal(b []byte) error { return nil } +// Show NAT44 plugin running config reply +// - retval - return code for the request +// - inside_vrf - default inside VRF id +// - outside_vrf - outside VRF id +// - users - maximum number of users per worker thread +// - sessions - maximum number of sessions per worker thread +// - user_sessions - maximum number of sessions per user +// - user_buckets - number of user hash buckets +// - translation_buckets - number of translation hash buckets +// - flags - flag NAT44_EI_IS_STATIC_MAPPING_ONLY, +// NAT44_EI_IS_CONNECTION_TRACKING, +// NAT44_EI_IS_OUT2IN_DPO +// // Nat44EiShowRunningConfigReply defines message 'nat44_ei_show_running_config_reply'. // InProgress: the message form may change in the future versions type Nat44EiShowRunningConfigReply struct { @@ -2844,6 +3075,17 @@ func (m *Nat44EiShowRunningConfigReply) Unmarshal(b []byte) error { return nil } +// NAT44 static mapping details response +// - flags - flag NAT44_EI_IS_ADDR_ONLY if address only mapping, +// - local_ip_address - local IPv4 address +// - external_ip_address - external IPv4 address +// - protocol - IP protocol, valid only if no NAT_ADDR_ONLY flag +// - local_port - local port number, valid only if no NAT_ADDR_ONLY flag +// - external_port - external port number, valid only if no NAT_ADDR_ONLY flag +// - external_sw_if_index - external interface +// - vfr_id - VRF ID +// - tag - opaque string tag +// // Nat44EiStaticMappingDetails defines message 'nat44_ei_static_mapping_details'. // InProgress: the message form may change in the future versions type Nat44EiStaticMappingDetails struct { @@ -2910,6 +3152,7 @@ func (m *Nat44EiStaticMappingDetails) Unmarshal(b []byte) error { return nil } +// Dump NAT44 static mappings // Nat44EiStaticMappingDump defines message 'nat44_ei_static_mapping_dump'. // InProgress: the message form may change in the future versions type Nat44EiStaticMappingDump struct{} @@ -2938,6 +3181,13 @@ func (m *Nat44EiStaticMappingDump) Unmarshal(b []byte) error { return nil } +// NAT44 users response +// +// @vrf_id - VRF ID +// - ip_address - IPv4 address +// - nsessions - number of dynamic sessions +// - nstaticsessions - number of static sessions +// // Nat44EiUserDetails defines message 'nat44_ei_user_details'. // InProgress: the message form may change in the future versions type Nat44EiUserDetails struct { @@ -2984,6 +3234,7 @@ func (m *Nat44EiUserDetails) Unmarshal(b []byte) error { return nil } +// Dump NAT44 users // Nat44EiUserDump defines message 'nat44_ei_user_dump'. // InProgress: the message form may change in the future versions type Nat44EiUserDump struct{} @@ -3012,6 +3263,19 @@ func (m *Nat44EiUserDump) Unmarshal(b []byte) error { return nil } +// NAT44 user's sessions response +// - outside_ip_address - outside IPv4 address +// - outside_port - outside port +// - inside_ip_address - inside IPv4 address +// - inside_port - inside port +// - protocol - protocol +// - flags - flag NAT_IS_STATIC if session is static +// - last_heard - last heard timer +// - total_bytes - count of bytes sent through session +// - total_pkts - count of pakets sent through session +// - ext_host_address - external host IPv4 address +// - ext_host_port - external host port +// // Nat44EiUserSessionDetails defines message 'nat44_ei_user_session_details'. // InProgress: the message form may change in the future versions type Nat44EiUserSessionDetails struct { @@ -3086,6 +3350,10 @@ func (m *Nat44EiUserSessionDetails) Unmarshal(b []byte) error { return nil } +// NAT44 user's sessions +// - ip_address - IPv4 address of the user to dump +// - vrf_id - VRF_ID +// // Nat44EiUserSessionDump defines message 'nat44_ei_user_session_dump'. // InProgress: the message form may change in the future versions type Nat44EiUserSessionDump struct { @@ -3124,6 +3392,20 @@ func (m *Nat44EiUserSessionDump) Unmarshal(b []byte) error { return nil } +// NAT44 user's sessions response +// - outside_ip_address - outside IPv4 address +// - outside_port - outside port +// - inside_ip_address - inside IPv4 address +// - inside_port - inside port +// - protocol - protocol +// - flags - flag NAT_IS_STATIC if session is static +// - last_heard - last heard timer since VPP start +// - time_since_last_heard - difference between current vpp time and last_heard value +// - total_bytes - count of bytes sent through session +// - total_pkts - count of pakets sent through session +// - ext_host_address - external host IPv4 address +// - ext_host_port - external host port +// // Nat44EiUserSessionV2Details defines message 'nat44_ei_user_session_v2_details'. // InProgress: the message form may change in the future versions type Nat44EiUserSessionV2Details struct { @@ -3204,6 +3486,10 @@ func (m *Nat44EiUserSessionV2Details) Unmarshal(b []byte) error { return nil } +// NAT44 user's sessions +// - ip_address - IPv4 address of the user to dump +// - vrf_id - VRF_ID +// // Nat44EiUserSessionV2Dump defines message 'nat44_ei_user_session_v2_dump'. // InProgress: the message form may change in the future versions type Nat44EiUserSessionV2Dump struct { @@ -3242,6 +3528,11 @@ func (m *Nat44EiUserSessionV2Dump) Unmarshal(b []byte) error { return nil } +// NAT workers details response +// - worker_index - worker index +// - lcore_id - lcore ID +// - name - worker name +// // Nat44EiWorkerDetails defines message 'nat44_ei_worker_details'. // InProgress: the message form may change in the future versions type Nat44EiWorkerDetails struct { @@ -3284,6 +3575,7 @@ func (m *Nat44EiWorkerDetails) Unmarshal(b []byte) error { return nil } +// Dump NAT workers // Nat44EiWorkerDump defines message 'nat44_ei_worker_dump'. // InProgress: the message form may change in the future versions type Nat44EiWorkerDump struct{} diff --git a/binapi/nat44_ei/nat44_ei_rpc.ba.go b/binapi/nat44_ei/nat44_ei_rpc.ba.go index 9bf1ccd1..73834326 100644 --- a/binapi/nat44_ei/nat44_ei_rpc.ba.go +++ b/binapi/nat44_ei/nat44_ei_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service nat44_ei. @@ -461,7 +461,7 @@ func (c *serviceClient) Nat44EiOutputInterfaceGet(ctx context.Context, in *Nat44 } type RPCService_Nat44EiOutputInterfaceGetClient interface { - Recv() (*Nat44EiOutputInterfaceDetails, error) + Recv() (*Nat44EiOutputInterfaceDetails, *Nat44EiOutputInterfaceGetReply, error) api.Stream } @@ -469,22 +469,26 @@ type serviceClient_Nat44EiOutputInterfaceGetClient struct { api.Stream } -func (c *serviceClient_Nat44EiOutputInterfaceGetClient) Recv() (*Nat44EiOutputInterfaceDetails, error) { +func (c *serviceClient_Nat44EiOutputInterfaceGetClient) Recv() (*Nat44EiOutputInterfaceDetails, *Nat44EiOutputInterfaceGetReply, error) { msg, err := c.Stream.RecvMsg() if err != nil { - return nil, err + return nil, nil, err } switch m := msg.(type) { case *Nat44EiOutputInterfaceDetails: - return m, nil + return m, nil, nil case *Nat44EiOutputInterfaceGetReply: + if err := api.RetvalToVPPApiError(m.Retval); err != nil { + c.Stream.Close() + return nil, m, err + } err = c.Stream.Close() if err != nil { - return nil, err + return nil, m, err } - return nil, io.EOF + return nil, m, io.EOF default: - return nil, fmt.Errorf("unexpected message: %T %v", m, m) + return nil, nil, fmt.Errorf("unexpected message: %T %v", m, m) } } diff --git a/binapi/nat64/nat64.ba.go b/binapi/nat64/nat64.ba.go index c23527c9..4b0c1857 100644 --- a/binapi/nat64/nat64.ba.go +++ b/binapi/nat64/nat64.ba.go @@ -1,22 +1,21 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/nat64.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/nat64.api.json // Package nat64 contains generated bindings for API file nat64.api. // // Contents: -// -// 26 messages +// - 26 messages package nat64 import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" nat_types "github.com/networkservicemesh/govpp/binapi/nat_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -31,6 +30,12 @@ const ( VersionCrc = 0xfbd06e33 ) +// Enable/disable NAT64 feature on the interface +// - is_add - true if add, false if delete +// - flags - flag NAT_IS_INSIDE if interface is inside else +// interface is outside +// - sw_if_index - index of the interface +// // Nat64AddDelInterface defines message 'nat64_add_del_interface'. type Nat64AddDelInterface struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -72,6 +77,10 @@ func (m *Nat64AddDelInterface) Unmarshal(b []byte) error { return nil } +// Add/delete NAT64 pool address from specific interfce +// - is_add - true if add, false if delete +// - sw_if_index - software index of the interface +// // Nat64AddDelInterfaceAddr defines message 'nat64_add_del_interface_addr'. type Nat64AddDelInterfaceAddr struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -177,6 +186,12 @@ func (m *Nat64AddDelInterfaceReply) Unmarshal(b []byte) error { return nil } +// Add/delete address range to NAT64 pool +// - start_addr - start IPv4 address of the range +// - end_addr - end IPv4 address of the range +// - vrf_id - VRF id of tenant, ~0 means independent of VRF +// - is_add - true if add, false if delete +// // Nat64AddDelPoolAddrRange defines message 'nat64_add_del_pool_addr_range'. type Nat64AddDelPoolAddrRange struct { StartAddr ip_types.IP4Address `binapi:"ip4_address,name=start_addr" json:"start_addr,omitempty"` @@ -257,6 +272,11 @@ func (m *Nat64AddDelPoolAddrRangeReply) Unmarshal(b []byte) error { return nil } +// Add/del NAT64 prefix +// - prefix - NAT64 prefix +// - vrf_id - VRF id of tenant +// - is_add - true if add, false if delete +// // Nat64AddDelPrefix defines message 'nat64_add_del_prefix'. type Nat64AddDelPrefix struct { Prefix ip_types.IP6Prefix `binapi:"ip6_prefix,name=prefix" json:"prefix,omitempty"` @@ -334,6 +354,15 @@ func (m *Nat64AddDelPrefixReply) Unmarshal(b []byte) error { return nil } +// Add/delete NAT64 static BIB entry +// - i_addr - inside IPv6 address +// - o_addr - outside IPv4 address +// - i_port - inside port number +// - o_port - outside port number +// - vrf_id - VRF id of tenant +// - proto - protocol number +// - is_add - true if add, false if delete +// // Nat64AddDelStaticBib defines message 'nat64_add_del_static_bib'. type Nat64AddDelStaticBib struct { IAddr ip_types.IP6Address `binapi:"ip6_address,name=i_addr" json:"i_addr,omitempty"` @@ -424,6 +453,17 @@ func (m *Nat64AddDelStaticBibReply) Unmarshal(b []byte) error { return nil } +// NAT64 BIB details response +// - i_addr - inside IPv6 address +// - o_addr - outside IPv4 address +// - i_port - inside port number +// - o_port - outside port number +// - vrf_id - VRF id of tenant +// - proto - protocol number +// - flags - flag NAT_IS_STATIC if BIB entry is static +// or BIB entry is dynamic +// - ses_num - number of sessions associated with the BIB entry +// // Nat64BibDetails defines message 'nat64_bib_details'. type Nat64BibDetails struct { IAddr ip_types.IP6Address `binapi:"ip6_address,name=i_addr" json:"i_addr,omitempty"` @@ -485,6 +525,13 @@ func (m *Nat64BibDetails) Unmarshal(b []byte) error { return nil } +// Dump NAT64 BIB +// - proto - protocol of the BIB: 255 - all BIBs +// 6 - TCP BIB +// 17 - UDP BIB +// 1/58 - ICMP BIB +// otherwise - "unknown" protocol BIB +// // Nat64BibDump defines message 'nat64_bib_dump'. type Nat64BibDump struct { Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"` @@ -518,6 +565,7 @@ func (m *Nat64BibDump) Unmarshal(b []byte) error { return nil } +// Get values of timeouts for NAT64 sessions (seconds) // Nat64GetTimeouts defines message 'nat64_get_timeouts'. type Nat64GetTimeouts struct{} @@ -545,6 +593,13 @@ func (m *Nat64GetTimeouts) Unmarshal(b []byte) error { return nil } +// Get values of timeouts for NAT64 sessions reply +// - retval - return code +// - udp - UDP timeout +// - tcp_established - TCP established timeout +// - tcp_transitory - TCP transitory timeout +// - icmp - ICMP timeout +// // Nat64GetTimeoutsReply defines message 'nat64_get_timeouts_reply'. type Nat64GetTimeoutsReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -594,6 +649,13 @@ func (m *Nat64GetTimeoutsReply) Unmarshal(b []byte) error { return nil } +// NAT64 interface details response +// - flags - flag NAT_IS_INSIDE if interface is inside, +// flag NAT_IS_OUTSIDE if interface is outside +// and if both flags are set the interface is +// both inside and outside +// - sw_if_index - index of the interface +// // Nat64InterfaceDetails defines message 'nat64_interface_details'. type Nat64InterfaceDetails struct { Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` @@ -631,6 +693,7 @@ func (m *Nat64InterfaceDetails) Unmarshal(b []byte) error { return nil } +// Dump interfaces with NAT64 feature // Nat64InterfaceDump defines message 'nat64_interface_dump'. type Nat64InterfaceDump struct{} @@ -658,6 +721,13 @@ func (m *Nat64InterfaceDump) Unmarshal(b []byte) error { return nil } +// Enable/disable NAT64 plugin +// - bib_buckets - Number of BIB hash buckets +// - bib_memory_size - Memory size of BIB hash +// - st_buckets - Number of session table hash buckets +// - st_memory_size - Memory size of session table hash +// - enable - true if enable, false if disable +// // Nat64PluginEnableDisable defines message 'nat64_plugin_enable_disable'. // InProgress: the message form may change in the future versions type Nat64PluginEnableDisable struct { @@ -744,6 +814,10 @@ func (m *Nat64PluginEnableDisableReply) Unmarshal(b []byte) error { return nil } +// NAT64 pool address details response +// - address - IPv4 address +// - vfr_id - VRF id of tenant, ~0 means independent of VRF +// // Nat64PoolAddrDetails defines message 'nat64_pool_addr_details'. type Nat64PoolAddrDetails struct { Address ip_types.IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"` @@ -781,6 +855,7 @@ func (m *Nat64PoolAddrDetails) Unmarshal(b []byte) error { return nil } +// Dump NAT64 pool addresses // Nat64PoolAddrDump defines message 'nat64_pool_addr_dump'. type Nat64PoolAddrDump struct{} @@ -808,6 +883,10 @@ func (m *Nat64PoolAddrDump) Unmarshal(b []byte) error { return nil } +// Dump NAT64 prefix details response +// - prefix - NAT64 prefix +// - vrf_id - VRF id of tenant +// // Nat64PrefixDetails defines message 'nat64_prefix_details'. type Nat64PrefixDetails struct { Prefix ip_types.IP6Prefix `binapi:"ip6_prefix,name=prefix" json:"prefix,omitempty"` @@ -848,6 +927,7 @@ func (m *Nat64PrefixDetails) Unmarshal(b []byte) error { return nil } +// Dump NAT64 prefix // Nat64PrefixDump defines message 'nat64_prefix_dump'. type Nat64PrefixDump struct{} @@ -875,6 +955,12 @@ func (m *Nat64PrefixDump) Unmarshal(b []byte) error { return nil } +// Set values of timeouts for NAT64 sessions (seconds) +// - udp - UDP timeout (default 300sec) +// - tcp_established - TCP established timeout (default 7440sec) +// - tcp_transitory - TCP transitory timeout (default 240sec) +// - icmp - ICMP timeout (default 60sec) +// // Nat64SetTimeouts defines message 'nat64_set_timeouts'. type Nat64SetTimeouts struct { UDP uint32 `binapi:"u32,name=udp" json:"udp,omitempty"` @@ -953,6 +1039,17 @@ func (m *Nat64SetTimeoutsReply) Unmarshal(b []byte) error { return nil } +// NAT64 session table details response +// - il_addr - inside IPv6 address of the local host +// - ol_addr - outside IPv4 address of the local host +// - il_port - inside port number id of the local host/inside ICMP id +// - ol_port - outside port number of the local host/outside ICMP id +// - ir_addr - inside IPv6 address of the remote host +// - or_addr - outside IPv4 address of the remote host +// - r_port - port number of the remote host (not used for ICMP) +// - vrf_id - VRF id of tenant +// - proto - protocol number +// // Nat64StDetails defines message 'nat64_st_details'. type Nat64StDetails struct { IlAddr ip_types.IP6Address `binapi:"ip6_address,name=il_addr" json:"il_addr,omitempty"` @@ -1018,6 +1115,13 @@ func (m *Nat64StDetails) Unmarshal(b []byte) error { return nil } +// Dump NAT64 session table +// - proto - protocol of the session table: 255 - all STs +// 6 - TCP ST +// 17 - UDP ST +// 1/58 - ICMP ST +// otherwise - "unknown" proto ST +// // Nat64StDump defines message 'nat64_st_dump'. type Nat64StDump struct { Proto uint8 `binapi:"u8,name=proto" json:"proto,omitempty"` diff --git a/binapi/nat64/nat64_rpc.ba.go b/binapi/nat64/nat64_rpc.ba.go index ee35a377..7815436e 100644 --- a/binapi/nat64/nat64_rpc.ba.go +++ b/binapi/nat64/nat64_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service nat64. diff --git a/binapi/nat66/nat66.ba.go b/binapi/nat66/nat66.ba.go index a49f1f95..cb2900f2 100644 --- a/binapi/nat66/nat66.ba.go +++ b/binapi/nat66/nat66.ba.go @@ -1,22 +1,21 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/nat66.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/nat66.api.json // Package nat66 contains generated bindings for API file nat66.api. // // Contents: -// -// 10 messages +// - 10 messages package nat66 import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" nat_types "github.com/networkservicemesh/govpp/binapi/nat_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -31,6 +30,12 @@ const ( VersionCrc = 0xa6343f71 ) +// Enable/disable NAT66 feature on the interface +// - is_add - true if add, false if delete +// - flags - flag NAT_IS_INSIDE if interface is inside or +// interface is outside, +// - sw_if_index - software index of the interface +// // Nat66AddDelInterface defines message 'nat66_add_del_interface'. type Nat66AddDelInterface struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -105,6 +110,12 @@ func (m *Nat66AddDelInterfaceReply) Unmarshal(b []byte) error { return nil } +// Add/delete 1:1 NAT66 +// - is_add - true if add, false if delete +// - local_ip_address - local IPv6 address +// - external_ip_address - external IPv6 address +// - vrf_id - VRF id of tenant +// // Nat66AddDelStaticMapping defines message 'nat66_add_del_static_mapping'. type Nat66AddDelStaticMapping struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -185,6 +196,11 @@ func (m *Nat66AddDelStaticMappingReply) Unmarshal(b []byte) error { return nil } +// NAT66 interface details response +// - flags - flag NAT_IS_INSIDE if interface is inside or +// interface is outside, +// - sw_if_index - software index of the interface +// // Nat66InterfaceDetails defines message 'nat66_interface_details'. type Nat66InterfaceDetails struct { Flags nat_types.NatConfigFlags `binapi:"nat_config_flags,name=flags" json:"flags,omitempty"` @@ -222,6 +238,7 @@ func (m *Nat66InterfaceDetails) Unmarshal(b []byte) error { return nil } +// Dump interfaces with NAT66 feature // Nat66InterfaceDump defines message 'nat66_interface_dump'. type Nat66InterfaceDump struct{} @@ -249,6 +266,10 @@ func (m *Nat66InterfaceDump) Unmarshal(b []byte) error { return nil } +// Enable/disable NAT66 plugin +// - outside_vrf - outside vrf id +// - enable - true if enable, false if disable +// // Nat66PluginEnableDisable defines message 'nat66_plugin_enable_disable'. type Nat66PluginEnableDisable struct { OutsideVrf uint32 `binapi:"u32,name=outside_vrf" json:"outside_vrf,omitempty"` @@ -321,6 +342,13 @@ func (m *Nat66PluginEnableDisableReply) Unmarshal(b []byte) error { return nil } +// NAT66 static mapping details response +// - local_ip_address - local IPv6 address +// - external_ip_address - external IPv6 address +// - vrf_id - VRF id of tenant +// - total_bytes - count of bytes sent through static mapping +// - total_pkts - count of pakets sent through static mapping +// // Nat66StaticMappingDetails defines message 'nat66_static_mapping_details'. type Nat66StaticMappingDetails struct { LocalIPAddress ip_types.IP6Address `binapi:"ip6_address,name=local_ip_address" json:"local_ip_address,omitempty"` @@ -370,6 +398,7 @@ func (m *Nat66StaticMappingDetails) Unmarshal(b []byte) error { return nil } +// Dump NAT66 static mappings // Nat66StaticMappingDump defines message 'nat66_static_mapping_dump'. type Nat66StaticMappingDump struct{} diff --git a/binapi/nat66/nat66_rpc.ba.go b/binapi/nat66/nat66_rpc.ba.go index 59ef60bd..409c445d 100644 --- a/binapi/nat66/nat66_rpc.ba.go +++ b/binapi/nat66/nat66_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service nat66. diff --git a/binapi/nat_types/nat_types.ba.go b/binapi/nat_types/nat_types.ba.go index f62308fb..1e55ecde 100644 --- a/binapi/nat_types/nat_types.ba.go +++ b/binapi/nat_types/nat_types.ba.go @@ -1,21 +1,20 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/nat_types.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/nat_types.api.json // Package nat_types contains generated bindings for API file nat_types.api. // // Contents: -// -// 2 enums -// 1 struct +// - 2 enums +// - 1 struct package nat_types import ( "strconv" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // This is a compile-time assertion to ensure that this generated file @@ -24,6 +23,12 @@ import ( // GoVPP api package needs to be updated. const _ = api.GoVppAPIPackageIsVersion2 +const ( + APIFile = "nat_types" + APIVersion = "0.0.1" + VersionCrc = 0x2ca9110f +) + // NatConfigFlags defines enum 'nat_config_flags'. type NatConfigFlags uint8 diff --git a/binapi/npt66/npt66.ba.go b/binapi/npt66/npt66.ba.go new file mode 100644 index 00000000..7fb05c13 --- /dev/null +++ b/binapi/npt66/npt66.ba.go @@ -0,0 +1,129 @@ +// Code generated by GoVPP's binapi-generator. DO NOT EDIT. +// versions: +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/npt66.api.json + +// Package npt66 contains generated bindings for API file npt66.api. +// +// Contents: +// - 2 messages +package npt66 + +import ( + interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + 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 = "npt66" + APIVersion = "0.0.1" + VersionCrc = 0x4e353b99 +) + +// // Copyright(c) 2023 Cisco Systems, Inc. +// Npt66BindingAddDel defines message 'npt66_binding_add_del'. +type Npt66BindingAddDel struct { + IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + Internal ip_types.IP6Prefix `binapi:"ip6_prefix,name=internal" json:"internal,omitempty"` + External ip_types.IP6Prefix `binapi:"ip6_prefix,name=external" json:"external,omitempty"` +} + +func (m *Npt66BindingAddDel) Reset() { *m = Npt66BindingAddDel{} } +func (*Npt66BindingAddDel) GetMessageName() string { return "npt66_binding_add_del" } +func (*Npt66BindingAddDel) GetCrcString() string { return "8aa10a52" } +func (*Npt66BindingAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *Npt66BindingAddDel) Size() (size int) { + if m == nil { + return 0 + } + size += 1 // m.IsAdd + size += 4 // m.SwIfIndex + size += 1 * 16 // m.Internal.Address + size += 1 // m.Internal.Len + size += 1 * 16 // m.External.Address + size += 1 // m.External.Len + return size +} +func (m *Npt66BindingAddDel) 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.SwIfIndex)) + buf.EncodeBytes(m.Internal.Address[:], 16) + buf.EncodeUint8(m.Internal.Len) + buf.EncodeBytes(m.External.Address[:], 16) + buf.EncodeUint8(m.External.Len) + return buf.Bytes(), nil +} +func (m *Npt66BindingAddDel) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.IsAdd = buf.DecodeBool() + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + copy(m.Internal.Address[:], buf.DecodeBytes(16)) + m.Internal.Len = buf.DecodeUint8() + copy(m.External.Address[:], buf.DecodeBytes(16)) + m.External.Len = buf.DecodeUint8() + return nil +} + +// Npt66BindingAddDelReply defines message 'npt66_binding_add_del_reply'. +type Npt66BindingAddDelReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *Npt66BindingAddDelReply) Reset() { *m = Npt66BindingAddDelReply{} } +func (*Npt66BindingAddDelReply) GetMessageName() string { return "npt66_binding_add_del_reply" } +func (*Npt66BindingAddDelReply) GetCrcString() string { return "e8d4e804" } +func (*Npt66BindingAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *Npt66BindingAddDelReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *Npt66BindingAddDelReply) 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 *Npt66BindingAddDelReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +func init() { file_npt66_binapi_init() } +func file_npt66_binapi_init() { + api.RegisterMessage((*Npt66BindingAddDel)(nil), "npt66_binding_add_del_8aa10a52") + api.RegisterMessage((*Npt66BindingAddDelReply)(nil), "npt66_binding_add_del_reply_e8d4e804") +} + +// Messages returns list of all messages in this module. +func AllMessages() []api.Message { + return []api.Message{ + (*Npt66BindingAddDel)(nil), + (*Npt66BindingAddDelReply)(nil), + } +} diff --git a/binapi/npt66/npt66_rpc.ba.go b/binapi/npt66/npt66_rpc.ba.go new file mode 100644 index 00000000..ed4816f6 --- /dev/null +++ b/binapi/npt66/npt66_rpc.ba.go @@ -0,0 +1,31 @@ +// Code generated by GoVPP's binapi-generator. DO NOT EDIT. + +package npt66 + +import ( + "context" + + api "go.fd.io/govpp/api" +) + +// RPCService defines RPC service npt66. +type RPCService interface { + Npt66BindingAddDel(ctx context.Context, in *Npt66BindingAddDel) (*Npt66BindingAddDelReply, error) +} + +type serviceClient struct { + conn api.Connection +} + +func NewServiceClient(conn api.Connection) RPCService { + return &serviceClient{conn} +} + +func (c *serviceClient) Npt66BindingAddDel(ctx context.Context, in *Npt66BindingAddDel) (*Npt66BindingAddDelReply, error) { + out := new(Npt66BindingAddDelReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} diff --git a/binapi/nsh/nsh.ba.go b/binapi/nsh/nsh.ba.go index d2e58a9e..e19ee0ac 100644 --- a/binapi/nsh/nsh.ba.go +++ b/binapi/nsh/nsh.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/nsh.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/nsh.api.json // Package nsh contains generated bindings for API file nsh.api. // // Contents: -// -// 8 messages +// - 8 messages package nsh import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,6 +28,20 @@ const ( VersionCrc = 0xc2f3127d ) +// /** Set or delete an NSH header entry keyed by NSP/NSI +// - is_add - add address if non-zero, else delete +// - nsp_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI +// - md_type - metadata type [1|2] - only MDType1 supported today +// - ver_o_c - version, O-bit and C-bit (see nsh_packet.h) +// - ttl - indicates the maximum SFF hops for an SFP +// - length - header length in n x 32bits, should be 6 for MDtype1 +// - next_protocol - next protocol encapsulated behind NSH header: 1=Ethernet, 2=IP4, 3=IP6 +// - c1 - 32bit Metadata type1 field (context1) +// - c2 - 32bit Metadata type1 field (context2) +// - c3 - 32bit Metadata type1 field (context3) +// - c4 - 32bit Metadata type1 field (context4) +// - tlvs - Metadata Type 2 only, Type Length Value metadata. +// // NshAddDelEntry defines message 'nsh_add_del_entry'. type NshAddDelEntry struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -111,6 +124,9 @@ func (m *NshAddDelEntry) Unmarshal(b []byte) error { return nil } +// Reply from adding NSH entry (nsh_add_del_entry) +// - retval - 0 means all ok +// // NshAddDelEntryReply defines message 'nsh_add_del_entry_reply'. type NshAddDelEntryReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -148,6 +164,19 @@ func (m *NshAddDelEntryReply) Unmarshal(b []byte) error { return nil } +// Set or delete a mapping from one NSH header to another and its egress (decap to inner packet, encap NSH with outer header) +// - is_add - add address if non-zero, else delete +// - nsh_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI +// - mapped_nsp_nsi - Key for nsh_header_t entry to map to. : 24bit NSP 8bit NSI this may be ~0 +// if next action is to decap to NSH next protocol +// Note the following heuristic: +// - if nsp_nsi == mapped_nsp_nsi then use-case is like SFC SFF +// - if nsp_nsi != mapped_nsp_nsi then use-case is like SFC SF +// Note: these are heuristics. Rules about NSI decrement are out of scope +// - sw_if_index - index number of outer encap for NSH egress +// - next_node - explicitly which node to send to +// Note the above parameters are instantiated by "encap-gre-intf " means sw_if_index x, next_node gre-input +// // NshAddDelMap defines message 'nsh_add_del_map'. type NshAddDelMap struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -205,6 +234,9 @@ func (m *NshAddDelMap) Unmarshal(b []byte) error { return nil } +// Reply from adding NSH map (nsh_add_del_map) +// - retval - 0 means all ok +// // NshAddDelMapReply defines message 'nsh_add_del_map_reply'. type NshAddDelMapReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` diff --git a/binapi/nsh/nsh_rpc.ba.go b/binapi/nsh/nsh_rpc.ba.go index 8d1d44fb..a31f6800 100644 --- a/binapi/nsh/nsh_rpc.ba.go +++ b/binapi/nsh/nsh_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service nsh. diff --git a/binapi/nsim/nsim.ba.go b/binapi/nsim/nsim.ba.go index e37258a8..8346bb82 100644 --- a/binapi/nsim/nsim.ba.go +++ b/binapi/nsim/nsim.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/nsim.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/nsim.api.json // Package nsim contains generated bindings for API file nsim.api. // // Contents: -// -// 8 messages +// - 8 messages package nsim import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,6 +28,11 @@ const ( VersionCrc = 0x3b179b8f ) +// configure the network delay simulation cross-connect +// - delay_in_usec - microseconds of link delay to simulate +// - average_packet_size - average packet size for wheel sizing +// - bandwidth_in_bits_per_second - bps for wheel sizing +// // NsimConfigure defines message 'nsim_configure'. // Deprecated: the message will be removed in the future versions type NsimConfigure struct { @@ -75,6 +79,11 @@ func (m *NsimConfigure) Unmarshal(b []byte) error { return nil } +// configure the network delay simulation cross-connect +// - delay_in_usec - microseconds of link delay to simulate +// - average_packet_size - average packet size for wheel sizing +// - bandwidth_in_bits_per_second - bps for wheel sizing +// // NsimConfigure2 defines message 'nsim_configure2'. type NsimConfigure2 struct { DelayInUsec uint32 `binapi:"u32,name=delay_in_usec" json:"delay_in_usec,omitempty"` @@ -191,6 +200,11 @@ func (m *NsimConfigureReply) Unmarshal(b []byte) error { return nil } +// enable / disable the network delay simulation cross-connect +// - enable_disable - enable or disable the feature +// - sw_if_index0 - one interface to cross-connect +// - sw_if_index1 - the other interface to cross-connect +// // NsimCrossConnectEnableDisable defines message 'nsim_cross_connect_enable_disable'. type NsimCrossConnectEnableDisable struct { EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"` @@ -269,6 +283,10 @@ func (m *NsimCrossConnectEnableDisableReply) Unmarshal(b []byte) error { return nil } +// enable / disable the network delay simulation output feature +// - enable_disable - enable or disable the feature +// - sw_if_index0 - interface +// // NsimOutputFeatureEnableDisable defines message 'nsim_output_feature_enable_disable'. type NsimOutputFeatureEnableDisable struct { EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"` diff --git a/binapi/nsim/nsim_rpc.ba.go b/binapi/nsim/nsim_rpc.ba.go index 80ecdd9f..a7c3d881 100644 --- a/binapi/nsim/nsim_rpc.ba.go +++ b/binapi/nsim/nsim_rpc.ba.go @@ -5,7 +5,7 @@ package nsim import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service nsim. diff --git a/binapi/one/one.ba.go b/binapi/one/one.ba.go index 10a12238..f70eb2bb 100644 --- a/binapi/one/one.ba.go +++ b/binapi/one/one.ba.go @@ -1,28 +1,26 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/one.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/one.api.json // Package one contains generated bindings for API file one.api. // // Contents: -// -// 2 enums -// 3 structs -// -// 108 messages +// - 2 enums +// - 3 structs +// - 108 messages package one import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ethernet_types "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" lisp_types "github.com/networkservicemesh/govpp/binapi/lisp_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -112,6 +110,12 @@ type OneNdpEntry struct { IP6 ip_types.IP6Address `binapi:"ip6_address,name=ip6" json:"ip6,omitempty"` } +// add or delete ONE adjacency adjacency +// - is_add - add address if non-zero, else delete +// - vni - virtual network instance +// - reid - remote EID +// - leid - local EID +// // OneAddDelAdjacency defines message 'one_add_del_adjacency'. type OneAddDelAdjacency struct { IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"` @@ -196,6 +200,11 @@ func (m *OneAddDelAdjacencyReply) Unmarshal(b []byte) error { return nil } +// Add/delete L2 ARP entries +// - is_add - add if non-zero; delete otherwise +// - bd - bridge domain +// - entry - ARP entry +// // OneAddDelL2ArpEntry defines message 'one_add_del_l2_arp_entry'. type OneAddDelL2ArpEntry struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -273,6 +282,13 @@ func (m *OneAddDelL2ArpEntryReply) Unmarshal(b []byte) error { return nil } +// add or delete ONE eid-table +// - is_add - add address if non-zero, else delete +// - eid - endpoint identifier +// - locator_set_name - name of locator_set to add/del eid-table +// - vni - virtual network instance +// - key - secret key +// // OneAddDelLocalEid defines message 'one_add_del_local_eid'. type OneAddDelLocalEid struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -362,6 +378,13 @@ func (m *OneAddDelLocalEidReply) Unmarshal(b []byte) error { return nil } +// add or delete locator for locator set +// - is_add - add address if non-zero, else delete +// - locator_set_name - name of locator_set to add/del locator +// - sw_if_index - index of the interface +// - priority - priority of the locator +// - weight - weight of the locator +// // OneAddDelLocator defines message 'one_add_del_locator'. type OneAddDelLocator struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -444,6 +467,12 @@ func (m *OneAddDelLocatorReply) Unmarshal(b []byte) error { return nil } +// add or delete locator_set +// - is_add - add address if non-zero, else delete +// - locator_set_name - locator name +// - locator_num - number of locators +// - locators - locator records +// // OneAddDelLocatorSet defines message 'one_add_del_locator_set'. type OneAddDelLocatorSet struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -511,6 +540,10 @@ func (m *OneAddDelLocatorSet) Unmarshal(b []byte) error { return nil } +// Reply for locator_set add/del +// - retval - return code +// - ls_index - locator set index +// // OneAddDelLocatorSetReply defines message 'one_add_del_locator_set_reply'. type OneAddDelLocatorSetReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -548,6 +581,10 @@ func (m *OneAddDelLocatorSetReply) Unmarshal(b []byte) error { return nil } +// add or delete map request itr rlocs +// - is_add - add address if non-zero, else delete +// - locator_set_name - locator set name +// // OneAddDelMapRequestItrRlocs defines message 'one_add_del_map_request_itr_rlocs'. type OneAddDelMapRequestItrRlocs struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -622,6 +659,11 @@ func (m *OneAddDelMapRequestItrRlocsReply) Unmarshal(b []byte) error { return nil } +// add or delete map-resolver +// - is_add - add address if non-zero, else delete +// - is_ipv6 - if non-zero the address is ipv6, else ipv4 +// - ip_address - array of address bytes +// // OneAddDelMapResolver defines message 'one_add_del_map_resolver'. type OneAddDelMapResolver struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -695,6 +737,11 @@ func (m *OneAddDelMapResolverReply) Unmarshal(b []byte) error { return nil } +// Add/delete map server +// - is_add - add address if non-zero; delete otherwise +// - is_ipv6 - if non-zero the address is ipv6, else ipv4 +// - ip_address - map server IP address +// // OneAddDelMapServer defines message 'one_add_del_map_server'. type OneAddDelMapServer struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -845,6 +892,17 @@ func (m *OneAddDelNdpEntryReply) Unmarshal(b []byte) error { return nil } +// add or delete remote static mapping +// - is_add - add address if non-zero, else delete +// - is_src_dst - flag indicating src/dst based routing policy +// - del_all - if set, delete all remote mappings +// - vni - virtual network instance +// - action - negative map-reply action +// - deid - dst EID +// - seid - src EID, valid only if is_src_dst is enabled +// - rloc_num - number of remote locators +// - rlocs - remote locator records +// // OneAddDelRemoteMapping defines message 'one_add_del_remote_mapping'. type OneAddDelRemoteMapping struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -976,6 +1034,9 @@ func (m *OneAddDelRemoteMappingReply) Unmarshal(b []byte) error { return nil } +// Request for ONE adjacencies +// - vni - filter adjacencies by VNI +// // OneAdjacenciesGet defines message 'one_adjacencies_get'. type OneAdjacenciesGet struct { Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` @@ -1009,6 +1070,10 @@ func (m *OneAdjacenciesGet) Unmarshal(b []byte) error { return nil } +// ONE adjacency reply +// - count - number of adjacencies +// - adjacencies - array of adjacencies +// // OneAdjacenciesGetReply defines message 'one_adjacencies_get_reply'. type OneAdjacenciesGetReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1075,6 +1140,12 @@ func (m *OneAdjacenciesGetReply) Unmarshal(b []byte) error { return nil } +// map/unmap vni/bd_index to vrf +// - is_add - add or delete mapping +// - dp_table - virtual network id/bridge domain index +// - vrf - vrf +// - is_l2 - is l2 +// // OneEidTableAddDelMap defines message 'one_eid_table_add_del_map'. type OneEidTableAddDelMap struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -1153,6 +1224,7 @@ func (m *OneEidTableAddDelMapReply) Unmarshal(b []byte) error { return nil } +// // FIXME: action, authoritative // OneEidTableDetails defines message 'one_eid_table_details'. type OneEidTableDetails struct { LocatorSetIndex uint32 `binapi:"u32,name=locator_set_index" json:"locator_set_index,omitempty"` @@ -1232,6 +1304,16 @@ func (m *OneEidTableDetails) Unmarshal(b []byte) error { return nil } +// Request for eid table summary status +// - eid_set - if non-zero request info about specific mapping +// - vni - virtual network instance; valid only if eid_set != 0 +// - eid - endpoint identifier +// - filter - filter type; +// Support values: +// 0: all eid +// 1: local eid +// 2: remote eid +// // OneEidTableDump defines message 'one_eid_table_dump'. type OneEidTableDump struct { EidSet bool `binapi:"bool,name=eid_set" json:"eid_set,omitempty"` @@ -1280,6 +1362,10 @@ func (m *OneEidTableDump) Unmarshal(b []byte) error { return nil } +// Shows relationship between vni and vrf/bd +// - dp_table - VRF index or bridge domain index +// - vni - virtual network instance +// // OneEidTableMapDetails defines message 'one_eid_table_map_details'. type OneEidTableMapDetails struct { Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` @@ -1317,6 +1403,9 @@ func (m *OneEidTableMapDetails) Unmarshal(b []byte) error { return nil } +// Request for one_eid_table_map_details +// - is_l2 - if set dump vni/bd mappings else vni/vrf +// // OneEidTableMapDump defines message 'one_eid_table_map_dump'. type OneEidTableMapDump struct { IsL2 bool `binapi:"bool,name=is_l2" json:"is_l2,omitempty"` @@ -1350,6 +1439,9 @@ func (m *OneEidTableMapDump) Unmarshal(b []byte) error { return nil } +// reply to one_eid_table_vni_dump +// - vni - virtual network instance +// // OneEidTableVniDetails defines message 'one_eid_table_vni_details'. type OneEidTableVniDetails struct { Vni uint32 `binapi:"u32,name=vni" json:"vni,omitempty"` @@ -1383,6 +1475,7 @@ func (m *OneEidTableVniDetails) Unmarshal(b []byte) error { return nil } +// Dumps all VNIs used in mappings // OneEidTableVniDump defines message 'one_eid_table_vni_dump'. type OneEidTableVniDump struct{} @@ -1410,6 +1503,9 @@ func (m *OneEidTableVniDump) Unmarshal(b []byte) error { return nil } +// enable or disable ONE feature +// - is_enable - enable protocol if non-zero, else disable +// // OneEnableDisable defines message 'one_enable_disable'. type OneEnableDisable struct { IsEnable bool `binapi:"bool,name=is_enable,default=true" json:"is_enable,omitempty"` @@ -1680,6 +1776,9 @@ func (m *OneEnableDisableXtrModeReply) Unmarshal(b []byte) error { return nil } +// Get ONE map request itr rlocs status +// - locator_set_name - name of the locator_set +// // OneGetMapRequestItrRlocs defines message 'one_get_map_request_itr_rlocs'. type OneGetMapRequestItrRlocs struct{} @@ -1707,6 +1806,7 @@ func (m *OneGetMapRequestItrRlocs) Unmarshal(b []byte) error { return nil } +// Request for map request itr rlocs summary status // OneGetMapRequestItrRlocsReply defines message 'one_get_map_request_itr_rlocs_reply'. type OneGetMapRequestItrRlocsReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1812,6 +1912,7 @@ func (m *OneGetTransportProtocolReply) Unmarshal(b []byte) error { return nil } +// Request for list of bridge domains used by L2 ARP table // OneL2ArpBdGet defines message 'one_l2_arp_bd_get'. type OneL2ArpBdGet struct{} @@ -1839,6 +1940,10 @@ func (m *OneL2ArpBdGet) Unmarshal(b []byte) error { return nil } +// Reply with list of bridge domains used by L2 ARP table +// - count - number of elements in the list +// - bridge_domains - list of BDs +// // OneL2ArpBdGetReply defines message 'one_l2_arp_bd_get_reply'. type OneL2ArpBdGetReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1889,6 +1994,9 @@ func (m *OneL2ArpBdGetReply) Unmarshal(b []byte) error { return nil } +// Request for L2 ARP entries from specified bridge domain +// - bd - bridge domain +// // OneL2ArpEntriesGet defines message 'one_l2_arp_entries_get'. type OneL2ArpEntriesGet struct { Bd uint32 `binapi:"u32,name=bd" json:"bd,omitempty"` @@ -1922,6 +2030,11 @@ func (m *OneL2ArpEntriesGet) Unmarshal(b []byte) error { return nil } +// Reply with L2 ARP entries from specified bridge domain +// - retval - error code +// - count - number of elements in the list +// - vl_api_one_arp_entry_t - list of entries +// // OneL2ArpEntriesGetReply defines message 'one_l2_arp_entries_get_reply'. type OneL2ArpEntriesGetReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1982,6 +2095,13 @@ func (m *OneL2ArpEntriesGetReply) Unmarshal(b []byte) error { return nil } +// ONE locator_set status +// - local - if is set, then locator is local +// - locator_set_name - name of the locator_set +// - sw_if_index - sw_if_index of the locator +// - priority - locator priority +// - weight - locator weight +// // OneLocatorDetails defines message 'one_locator_details'. type OneLocatorDetails struct { Local uint8 `binapi:"u8,name=local" json:"local,omitempty"` @@ -2034,6 +2154,11 @@ func (m *OneLocatorDetails) Unmarshal(b []byte) error { return nil } +// Request for map one locator status +// - locator_set_index - index of locator_set +// - ls_name - locator set name +// - is_index_set - flag indicating whether ls_name or ls_index is set +// // OneLocatorDump defines message 'one_locator_dump'. type OneLocatorDump struct { LsIndex uint32 `binapi:"u32,name=ls_index" json:"ls_index,omitempty"` @@ -2075,6 +2200,10 @@ func (m *OneLocatorDump) Unmarshal(b []byte) error { return nil } +// ONE locator_set status +// - ls_index - locator set index +// - ls_name - name of the locator set +// // OneLocatorSetDetails defines message 'one_locator_set_details'. type OneLocatorSetDetails struct { LsIndex uint32 `binapi:"u32,name=ls_index" json:"ls_index,omitempty"` @@ -2112,6 +2241,13 @@ func (m *OneLocatorSetDetails) Unmarshal(b []byte) error { return nil } +// Request for locator_set summary status +// - filter - filter type +// Supported values: +// 0: all locator sets +// 1: local locator sets +// 2: remote locator sets +// // OneLocatorSetDump defines message 'one_locator_set_dump'. type OneLocatorSetDump struct { Filter OneFilter `binapi:"one_filter,name=filter" json:"filter,omitempty"` @@ -2145,6 +2281,9 @@ func (m *OneLocatorSetDump) Unmarshal(b []byte) error { return nil } +// enable/disable ONE map-register +// - is_enable - enable if non-zero; disable otherwise +// // OneMapRegisterEnableDisable defines message 'one_map_register_enable_disable'. type OneMapRegisterEnableDisable struct { IsEnable bool `binapi:"bool,name=is_enable,default=true" json:"is_enable,omitempty"` @@ -2283,6 +2422,9 @@ func (m *OneMapRegisterFallbackThresholdReply) Unmarshal(b []byte) error { return nil } +// Set TTL for map register messages +// - ttl - time to live +// // OneMapRegisterSetTTL defines message 'one_map_register_set_ttl'. type OneMapRegisterSetTTL struct { TTL uint32 `binapi:"u32,name=ttl" json:"ttl,omitempty"` @@ -2349,6 +2491,13 @@ func (m *OneMapRegisterSetTTLReply) Unmarshal(b []byte) error { return nil } +// set ONE map-request mode. Based on configuration VPP will send +// +// src/dest or just normal destination map requests. +// - mode - new map-request mode. Supported values are: +// 0 - destination only +// 1 - source/destination +// // OneMapRequestMode defines message 'one_map_request_mode'. type OneMapRequestMode struct { Mode OneMapMode `binapi:"one_map_mode,name=mode" json:"mode,omitempty"` @@ -2415,6 +2564,10 @@ func (m *OneMapRequestModeReply) Unmarshal(b []byte) error { return nil } +// ONE map resolver status +// - is_ipv6 - if non-zero the address is ipv6, else ipv4 +// - ip_address - array of address bytes +// // OneMapResolverDetails defines message 'one_map_resolver_details'. type OneMapResolverDetails struct { IPAddress ip_types.Address `binapi:"address,name=ip_address" json:"ip_address,omitempty"` @@ -2451,6 +2604,7 @@ func (m *OneMapResolverDetails) Unmarshal(b []byte) error { return nil } +// Request for map resolver summary status // OneMapResolverDump defines message 'one_map_resolver_dump'. type OneMapResolverDump struct{} @@ -2478,6 +2632,10 @@ func (m *OneMapResolverDump) Unmarshal(b []byte) error { return nil } +// ONE map server details +// - is_ipv6 - if non-zero the address is ipv6, else ipv4 +// - ip_address - array of address bytes +// // OneMapServerDetails defines message 'one_map_server_details'. type OneMapServerDetails struct { IPAddress ip_types.Address `binapi:"address,name=ip_address" json:"ip_address,omitempty"` @@ -2514,6 +2672,7 @@ func (m *OneMapServerDetails) Unmarshal(b []byte) error { return nil } +// Request for map server summary status // OneMapServerDump defines message 'one_map_server_dump'. type OneMapServerDump struct{} @@ -2541,6 +2700,7 @@ func (m *OneMapServerDump) Unmarshal(b []byte) error { return nil } +// Request for list of bridge domains used by neighbor discovery // OneNdpBdGet defines message 'one_ndp_bd_get'. type OneNdpBdGet struct{} @@ -2568,6 +2728,10 @@ func (m *OneNdpBdGet) Unmarshal(b []byte) error { return nil } +// Reply with list of bridge domains used by neighbor discovery +// - count - number of elements in the list +// - bridge_domains - list of BDs +// // OneNdpBdGetReply defines message 'one_ndp_bd_get_reply'. type OneNdpBdGetReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -2711,6 +2875,10 @@ func (m *OneNdpEntriesGetReply) Unmarshal(b []byte) error { return nil } +// configure or delete ONE NSH mapping +// - ls_name - locator set name +// - is_add - add locator set if non-zero; delete otherwise +// // OneNshSetLocatorSet defines message 'one_nsh_set_locator_set'. type OneNshSetLocatorSet struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -2781,6 +2949,10 @@ func (m *OneNshSetLocatorSetReply) Unmarshal(b []byte) error { return nil } +// configure or disable ONE PITR node +// - ls_name - locator set name +// - is_add - add locator set if non-zero, else disable pitr +// // OnePitrSetLocatorSet defines message 'one_pitr_set_locator_set'. type OnePitrSetLocatorSet struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -2851,6 +3023,9 @@ func (m *OnePitrSetLocatorSetReply) Unmarshal(b []byte) error { return nil } +// enable/disable ONE RLOC probing +// - is_enable - enable if non-zero; disable otherwise +// // OneRlocProbeEnableDisable defines message 'one_rloc_probe_enable_disable'. type OneRlocProbeEnableDisable struct { IsEnable bool `binapi:"bool,name=is_enable,default=true" json:"is_enable,omitempty"` @@ -2919,6 +3094,11 @@ func (m *OneRlocProbeEnableDisableReply) Unmarshal(b []byte) error { return nil } +// Set ONE transport protocol +// - protocol - supported values: +// 1: UDP based LISP (default) +// 2: binary API +// // OneSetTransportProtocol defines message 'one_set_transport_protocol'. type OneSetTransportProtocol struct { Protocol uint8 `binapi:"u8,name=protocol" json:"protocol,omitempty"` @@ -3401,6 +3581,11 @@ func (m *OneStatsFlushReply) Unmarshal(b []byte) error { return nil } +// configure or disable use of PETR +// - is_ip4 - Address is IPv4 if set and IPv6 otherwise +// - address - PETR IP address +// - is_add - add locator set if non-zero, else disable PETR +// // OneUsePetr defines message 'one_use_petr'. type OneUsePetr struct { IPAddress ip_types.Address `binapi:"address,name=ip_address" json:"ip_address,omitempty"` @@ -3544,6 +3729,7 @@ func (m *ShowOneMapRegisterFallbackThresholdReply) Unmarshal(b []byte) error { return nil } +// Get state of ONE map-register // ShowOneMapRegisterState defines message 'show_one_map_register_state'. type ShowOneMapRegisterState struct{} @@ -3571,6 +3757,9 @@ func (m *ShowOneMapRegisterState) Unmarshal(b []byte) error { return nil } +// Reply for show_one_map_register_state +// - retval - return code +// // ShowOneMapRegisterStateReply defines message 'show_one_map_register_state_reply'. type ShowOneMapRegisterStateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -3610,6 +3799,7 @@ func (m *ShowOneMapRegisterStateReply) Unmarshal(b []byte) error { return nil } +// Get TTL for map register messages // ShowOneMapRegisterTTL defines message 'show_one_map_register_ttl'. type ShowOneMapRegisterTTL struct{} @@ -3637,6 +3827,10 @@ func (m *ShowOneMapRegisterTTL) Unmarshal(b []byte) error { return nil } +// Contains current TTL for map register messages +// - retval - return code +// - ttl - time to live +// // ShowOneMapRegisterTTLReply defines message 'show_one_map_register_ttl_reply'. type ShowOneMapRegisterTTLReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -3674,6 +3868,7 @@ func (m *ShowOneMapRegisterTTLReply) Unmarshal(b []byte) error { return nil } +// Request for ONE map-request mode // ShowOneMapRequestMode defines message 'show_one_map_request_mode'. type ShowOneMapRequestMode struct{} @@ -3701,6 +3896,10 @@ func (m *ShowOneMapRequestMode) Unmarshal(b []byte) error { return nil } +// Reply for show_one_map_request_mode +// - retval - return code +// - mode - map-request mode +// // ShowOneMapRequestModeReply defines message 'show_one_map_request_mode_reply'. type ShowOneMapRequestModeReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -3738,6 +3937,7 @@ func (m *ShowOneMapRequestModeReply) Unmarshal(b []byte) error { return nil } +// Request for ONE NSH mapping // ShowOneNshMapping defines message 'show_one_nsh_mapping'. type ShowOneNshMapping struct{} @@ -3765,6 +3965,10 @@ func (m *ShowOneNshMapping) Unmarshal(b []byte) error { return nil } +// Reply for ONE NSH mapping +// - is_set - is ONE NSH mapping set +// - locator_set_name - name of the locator_set if NSH mapping is set +// // ShowOneNshMappingReply defines message 'show_one_nsh_mapping_reply'. type ShowOneNshMappingReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -3806,6 +4010,7 @@ func (m *ShowOneNshMappingReply) Unmarshal(b []byte) error { return nil } +// Request for ONE PITR status // ShowOnePitr defines message 'show_one_pitr'. type ShowOnePitr struct{} @@ -3833,6 +4038,10 @@ func (m *ShowOnePitr) Unmarshal(b []byte) error { return nil } +// Status of ONE PITR, enable or disable +// - status - ONE PITR enable if non-zero, else disable +// - locator_set_name - name of the locator_set +// // ShowOnePitrReply defines message 'show_one_pitr_reply'. type ShowOnePitrReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -3874,6 +4083,7 @@ func (m *ShowOnePitrReply) Unmarshal(b []byte) error { return nil } +// Get state of ONE RLOC probing // ShowOneRlocProbeState defines message 'show_one_rloc_probe_state'. type ShowOneRlocProbeState struct{} @@ -3901,6 +4111,10 @@ func (m *ShowOneRlocProbeState) Unmarshal(b []byte) error { return nil } +// Reply for show_one_rloc_probe_state +// - retval - return code +// - is_enable - state of RLOC probing +// // ShowOneRlocProbeStateReply defines message 'show_one_rloc_probe_state_reply'. type ShowOneRlocProbeStateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -4004,6 +4218,7 @@ func (m *ShowOneStatsEnableDisableReply) Unmarshal(b []byte) error { return nil } +// Request for ONE status // ShowOneStatus defines message 'show_one_status'. type ShowOneStatus struct{} @@ -4031,6 +4246,10 @@ func (m *ShowOneStatus) Unmarshal(b []byte) error { return nil } +// ONE status +// - feature_status - enabled if non-zero, else disabled +// - gpe_status - enabled if non-zero, else disabled +// // ShowOneStatusReply defines message 'show_one_status_reply'. type ShowOneStatusReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -4072,6 +4291,7 @@ func (m *ShowOneStatusReply) Unmarshal(b []byte) error { return nil } +// Request for ONE PETR status // ShowOneUsePetr defines message 'show_one_use_petr'. type ShowOneUsePetr struct{} @@ -4099,6 +4319,11 @@ func (m *ShowOneUsePetr) Unmarshal(b []byte) error { return nil } +// ONE PETR status, enable or disable +// - enable - ONE PETR enable if non-zero, else disable +// - is_ip4 - Address is IPv4 if non-zero, else IPv6 +// - address - PETR IP address +// // ShowOneUsePetrReply defines message 'show_one_use_petr_reply'. type ShowOneUsePetrReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` diff --git a/binapi/one/one_rpc.ba.go b/binapi/one/one_rpc.ba.go index 6efd783c..4cd6bb18 100644 --- a/binapi/one/one_rpc.ba.go +++ b/binapi/one/one_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service one. diff --git a/binapi/p2p_ethernet/p2p_ethernet.ba.go b/binapi/p2p_ethernet/p2p_ethernet.ba.go index 5e37950c..583a6ac3 100644 --- a/binapi/p2p_ethernet/p2p_ethernet.ba.go +++ b/binapi/p2p_ethernet/p2p_ethernet.ba.go @@ -1,21 +1,20 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/p2p_ethernet.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/p2p_ethernet.api.json // Package p2p_ethernet contains generated bindings for API file p2p_ethernet.api. // // Contents: -// -// 4 messages +// - 4 messages package p2p_ethernet import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ethernet_types "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -30,6 +29,16 @@ const ( VersionCrc = 0x3cfe55da ) +// Create a point-to-point (p2p) Ethernet sub-interface +// - parent_if_index - index of the parent interface +// - subif_id - subinterface index identifier +// - remote_mac - client MAC address +// @retval VNET_API_ERROR_INVALID_SW_IF_INDEX on invalid parent_if_index +// @retval VNET_API_ERROR_INVALID_SW_IF_INDEX_2 on invalid subif_id +// @retval VNET_API_ERROR_BOND_SLAVE_NOT_ALLOWED +// @retval VNET_API_ERROR_SUBIF_ALREADY_EXISTS +// @retval VNET_API_ERROR_SUBIF_CREATE_FAILED +// // P2pEthernetAdd defines message 'p2p_ethernet_add'. type P2pEthernetAdd struct { ParentIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=parent_if_index" json:"parent_if_index,omitempty"` @@ -108,6 +117,11 @@ func (m *P2pEthernetAddReply) Unmarshal(b []byte) error { return nil } +// Delete a point-to-point (p2p) Ethernet sub-interface +// - parent_if_index - index of the parent interface +// - remote_mac - client MAC address +// @retval VNET_API_ERROR_SUBIF_DOESNT_EXIST +// // P2pEthernetDel defines message 'p2p_ethernet_del'. type P2pEthernetDel struct { ParentIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=parent_if_index" json:"parent_if_index,omitempty"` diff --git a/binapi/p2p_ethernet/p2p_ethernet_rpc.ba.go b/binapi/p2p_ethernet/p2p_ethernet_rpc.ba.go index c96d6a5d..7e1573d1 100644 --- a/binapi/p2p_ethernet/p2p_ethernet_rpc.ba.go +++ b/binapi/p2p_ethernet/p2p_ethernet_rpc.ba.go @@ -5,7 +5,7 @@ package p2p_ethernet import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service p2p_ethernet. diff --git a/binapi/pbl/pbl.ba.go b/binapi/pbl/pbl.ba.go index 4c14cfa6..72349de0 100644 --- a/binapi/pbl/pbl.ba.go +++ b/binapi/pbl/pbl.ba.go @@ -1,26 +1,25 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/pbl.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/pbl.api.json // Package pbl contains generated bindings for API file pbl.api. // // Contents: -// -// 1 enum -// 2 structs -// 6 messages +// - 1 enum +// - 2 structs +// - 6 messages package pbl import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" fib_types "github.com/networkservicemesh/govpp/binapi/fib_types" _ "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -97,7 +96,6 @@ type PblPortRange struct { } // PblClientDel defines message 'pbl_client_del'. -// InProgress: the message form may change in the future versions type PblClientDel struct { ID uint32 `binapi:"u32,name=id" json:"id,omitempty"` } @@ -131,7 +129,6 @@ func (m *PblClientDel) Unmarshal(b []byte) error { } // PblClientDelReply defines message 'pbl_client_del_reply'. -// InProgress: the message form may change in the future versions type PblClientDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -165,7 +162,6 @@ func (m *PblClientDelReply) Unmarshal(b []byte) error { } // PblClientDetails defines message 'pbl_client_details'. -// InProgress: the message form may change in the future versions type PblClientDetails struct { Client PblClient `binapi:"pbl_client,name=client" json:"client,omitempty"` } @@ -296,7 +292,6 @@ func (m *PblClientDetails) Unmarshal(b []byte) error { } // PblClientDump defines message 'pbl_client_dump'. -// InProgress: the message form may change in the future versions type PblClientDump struct{} func (m *PblClientDump) Reset() { *m = PblClientDump{} } @@ -323,8 +318,12 @@ func (m *PblClientDump) Unmarshal(b []byte) error { return nil } +// \file +// +// This file defines the vpp control-plane API messages +// used to control the PBL plugin +// // PblClientUpdate defines message 'pbl_client_update'. -// InProgress: the message form may change in the future versions type PblClientUpdate struct { Client PblClient `binapi:"pbl_client,name=client" json:"client,omitempty"` } @@ -455,7 +454,6 @@ func (m *PblClientUpdate) Unmarshal(b []byte) error { } // PblClientUpdateReply defines message 'pbl_client_update_reply'. -// InProgress: the message form may change in the future versions type PblClientUpdateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` ID uint32 `binapi:"u32,name=id" json:"id,omitempty"` diff --git a/binapi/pbl/pbl_rpc.ba.go b/binapi/pbl/pbl_rpc.ba.go index 584f638a..7dbc51a6 100644 --- a/binapi/pbl/pbl_rpc.ba.go +++ b/binapi/pbl/pbl_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service pbl. diff --git a/binapi/pci_types/pci_types.ba.go b/binapi/pci_types/pci_types.ba.go index a8c6a644..e177b2a8 100644 --- a/binapi/pci_types/pci_types.ba.go +++ b/binapi/pci_types/pci_types.ba.go @@ -1,18 +1,17 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/pci_types.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/pci_types.api.json // Package pci_types contains generated bindings for API file pci_types.api. // // Contents: -// -// 1 struct +// - 1 struct package pci_types import ( - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // This is a compile-time assertion to ensure that this generated file @@ -21,6 +20,12 @@ import ( // GoVPP api package needs to be updated. const _ = api.GoVppAPIPackageIsVersion2 +const ( + APIFile = "pci_types" + APIVersion = "1.0.0" + VersionCrc = 0x5d418665 +) + // PciAddress defines type 'pci_address'. type PciAddress struct { Domain uint16 `binapi:"u16,name=domain" json:"domain,omitempty"` diff --git a/binapi/pg/pg.ba.go b/binapi/pg/pg.ba.go index 6c082d17..b780bec6 100644 --- a/binapi/pg/pg.ba.go +++ b/binapi/pg/pg.ba.go @@ -1,23 +1,22 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/pg.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/pg.api.json // Package pg contains generated bindings for API file pg.api. // // Contents: -// -// 1 enum -// 10 messages +// - 1 enum +// - 10 messages package pg import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -62,6 +61,12 @@ func (x PgInterfaceMode) String() string { return "PgInterfaceMode(" + strconv.Itoa(int(x)) + ")" } +// PacketGenerator capture packets on given interface request +// - interface_id - pg interface index +// - is_enabled - 1 if enabling streams, 0 if disabling +// - count - number of packets to be captured +// - pcap_file_name - pacp file name to store captured packets +// // PgCapture defines message 'pg_capture'. type PgCapture struct { InterfaceID interface_types.InterfaceIndex `binapi:"interface_index,name=interface_id" json:"interface_id,omitempty"` @@ -140,7 +145,13 @@ func (m *PgCaptureReply) Unmarshal(b []byte) error { return nil } +// PacketGenerator create interface request +// - interface_id - interface index +// - gso_enabled - enable gso on this interface +// - gso_size - gso size on this interface +// // PgCreateInterface defines message 'pg_create_interface'. +// Deprecated: the message will be removed in the future versions type PgCreateInterface struct { InterfaceID interface_types.InterfaceIndex `binapi:"interface_index,name=interface_id" json:"interface_id,omitempty"` GsoEnabled bool `binapi:"bool,name=gso_enabled" json:"gso_enabled,omitempty"` @@ -181,7 +192,11 @@ func (m *PgCreateInterface) Unmarshal(b []byte) error { return nil } +// PacketGenerator create interface response +// - retval - return value for request +// // PgCreateInterfaceReply defines message 'pg_create_interface_reply'. +// Deprecated: the message will be removed in the future versions type PgCreateInterfaceReply 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"` @@ -300,6 +315,10 @@ func (m *PgCreateInterfaceV2Reply) Unmarshal(b []byte) error { return nil } +// Enable / disable packet generator request +// - is_enabled - 1 if enabling streams, 0 if disabling +// - stream_name - stream name to be enable/disabled, if not specified handle all streams +// // PgEnableDisable defines message 'pg_enable_disable'. type PgEnableDisable struct { IsEnabled bool `binapi:"bool,name=is_enabled,default=true" json:"is_enabled,omitempty"` @@ -370,6 +389,10 @@ func (m *PgEnableDisableReply) Unmarshal(b []byte) error { return nil } +// PacketGenerator interface enable/disable packet coalesce +// - interface_id - interface index +// - coalesce_enabled - enable/disable packet coalesce on this interface +// // PgInterfaceEnableDisableCoalesce defines message 'pg_interface_enable_disable_coalesce'. // InProgress: the message form may change in the future versions type PgInterfaceEnableDisableCoalesce struct { diff --git a/binapi/pg/pg_rpc.ba.go b/binapi/pg/pg_rpc.ba.go index 967958ad..9b1366c1 100644 --- a/binapi/pg/pg_rpc.ba.go +++ b/binapi/pg/pg_rpc.ba.go @@ -5,7 +5,7 @@ package pg import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service pg. diff --git a/binapi/pipe/pipe.ba.go b/binapi/pipe/pipe.ba.go index 3b3c102d..f119903b 100644 --- a/binapi/pipe/pipe.ba.go +++ b/binapi/pipe/pipe.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/pipe.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/pipe.api.json // Package pipe contains generated bindings for API file pipe.api. // // Contents: -// -// 6 messages +// - 6 messages package pipe import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,6 +28,10 @@ const ( VersionCrc = 0xc159134a ) +// Initialize a new pipe interface with the given parameters +// - is_specified - if non-0, a specific user_instance is being requested +// - user_instance - requested instance, ~0 => dynamically allocate +// // PipeCreate defines message 'pipe_create'. type PipeCreate struct { IsSpecified bool `binapi:"bool,name=is_specified" json:"is_specified,omitempty"` @@ -66,6 +69,12 @@ func (m *PipeCreate) Unmarshal(b []byte) error { return nil } +// Reply for pipe create reply +// - retval - return code +// - sw_if_index - software index allocated for the new pipe parent interface +// Use the parent interface for link up/down and to delete +// - pipe_sw_if_index - the two SW indicies that form the ends of the pipe. +// // PipeCreateReply defines message 'pipe_create_reply'. type PipeCreateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -113,6 +122,9 @@ func (m *PipeCreateReply) Unmarshal(b []byte) error { return nil } +// Delete pipe interface +// - sw_if_index - interface index of existing parent pipe interface +// // PipeDelete defines message 'pipe_delete'. type PipeDelete struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -179,6 +191,12 @@ func (m *PipeDeleteReply) Unmarshal(b []byte) error { return nil } +// Reply for pipe dump request +// - sw_if_index - software index of pipe interface +// - sw_if_index - software index allocated for the pipe parent interface +// - pipe_sw_if_index - the two SW indicies that form the ends of the pipe. +// - instance - instance allocated +// // PipeDetails defines message 'pipe_details'. type PipeDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -226,6 +244,7 @@ func (m *PipeDetails) Unmarshal(b []byte) error { return nil } +// Dump pipe interfaces request // PipeDump defines message 'pipe_dump'. type PipeDump struct{} diff --git a/binapi/pipe/pipe_rpc.ba.go b/binapi/pipe/pipe_rpc.ba.go index ead846fc..17579a26 100644 --- a/binapi/pipe/pipe_rpc.ba.go +++ b/binapi/pipe/pipe_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service pipe. diff --git a/binapi/pnat/pnat.ba.go b/binapi/pnat/pnat.ba.go index 513adb25..5e70c94d 100644 --- a/binapi/pnat/pnat.ba.go +++ b/binapi/pnat/pnat.ba.go @@ -1,25 +1,24 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/pnat.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/pnat.api.json // Package pnat contains generated bindings for API file pnat.api. // // Contents: -// -// 2 enums -// 2 structs -// 16 messages +// - 2 enums +// - 2 structs +// - 16 messages package pnat import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -128,8 +127,21 @@ type PnatRewriteTuple struct { ClearOffset uint8 `binapi:"u8,name=clear_offset" json:"clear_offset,omitempty"` } +// /* +// - Copyright (c) 2021 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. +// // PnatBindingAdd defines message 'pnat_binding_add'. -// InProgress: the message form may change in the future versions type PnatBindingAdd struct { Match PnatMatchTuple `binapi:"pnat_match_tuple,name=match" json:"match,omitempty"` Rewrite PnatRewriteTuple `binapi:"pnat_rewrite_tuple,name=rewrite" json:"rewrite,omitempty"` @@ -203,7 +215,6 @@ func (m *PnatBindingAdd) Unmarshal(b []byte) error { } // PnatBindingAddReply defines message 'pnat_binding_add_reply'. -// InProgress: the message form may change in the future versions type PnatBindingAddReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` BindingIndex uint32 `binapi:"u32,name=binding_index" json:"binding_index,omitempty"` @@ -241,7 +252,6 @@ func (m *PnatBindingAddReply) Unmarshal(b []byte) error { } // PnatBindingAddV2 defines message 'pnat_binding_add_v2'. -// InProgress: the message form may change in the future versions type PnatBindingAddV2 struct { Match PnatMatchTuple `binapi:"pnat_match_tuple,name=match" json:"match,omitempty"` Rewrite PnatRewriteTuple `binapi:"pnat_rewrite_tuple,name=rewrite" json:"rewrite,omitempty"` @@ -315,7 +325,6 @@ func (m *PnatBindingAddV2) Unmarshal(b []byte) error { } // PnatBindingAddV2Reply defines message 'pnat_binding_add_v2_reply'. -// InProgress: the message form may change in the future versions type PnatBindingAddV2Reply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` BindingIndex uint32 `binapi:"u32,name=binding_index" json:"binding_index,omitempty"` @@ -353,7 +362,6 @@ func (m *PnatBindingAddV2Reply) Unmarshal(b []byte) error { } // PnatBindingAttach defines message 'pnat_binding_attach'. -// InProgress: the message form may change in the future versions type PnatBindingAttach struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` Attachment PnatAttachmentPoint `binapi:"pnat_attachment_point,name=attachment" json:"attachment,omitempty"` @@ -395,7 +403,6 @@ func (m *PnatBindingAttach) Unmarshal(b []byte) error { } // PnatBindingAttachReply defines message 'pnat_binding_attach_reply'. -// InProgress: the message form may change in the future versions type PnatBindingAttachReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -429,7 +436,6 @@ func (m *PnatBindingAttachReply) Unmarshal(b []byte) error { } // PnatBindingDel defines message 'pnat_binding_del'. -// InProgress: the message form may change in the future versions type PnatBindingDel struct { BindingIndex uint32 `binapi:"u32,name=binding_index" json:"binding_index,omitempty"` } @@ -463,7 +469,6 @@ func (m *PnatBindingDel) Unmarshal(b []byte) error { } // PnatBindingDelReply defines message 'pnat_binding_del_reply'. -// InProgress: the message form may change in the future versions type PnatBindingDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -497,7 +502,6 @@ func (m *PnatBindingDelReply) Unmarshal(b []byte) error { } // PnatBindingDetach defines message 'pnat_binding_detach'. -// InProgress: the message form may change in the future versions type PnatBindingDetach struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` Attachment PnatAttachmentPoint `binapi:"pnat_attachment_point,name=attachment" json:"attachment,omitempty"` @@ -539,7 +543,6 @@ func (m *PnatBindingDetach) Unmarshal(b []byte) error { } // PnatBindingDetachReply defines message 'pnat_binding_detach_reply'. -// InProgress: the message form may change in the future versions type PnatBindingDetachReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -573,7 +576,6 @@ func (m *PnatBindingDetachReply) Unmarshal(b []byte) error { } // PnatBindingsDetails defines message 'pnat_bindings_details'. -// InProgress: the message form may change in the future versions type PnatBindingsDetails struct { Match PnatMatchTuple `binapi:"pnat_match_tuple,name=match" json:"match,omitempty"` Rewrite PnatRewriteTuple `binapi:"pnat_rewrite_tuple,name=rewrite" json:"rewrite,omitempty"` @@ -647,7 +649,6 @@ func (m *PnatBindingsDetails) Unmarshal(b []byte) error { } // PnatBindingsGet defines message 'pnat_bindings_get'. -// InProgress: the message form may change in the future versions type PnatBindingsGet struct { Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` } @@ -681,7 +682,6 @@ func (m *PnatBindingsGet) Unmarshal(b []byte) error { } // PnatBindingsGetReply defines message 'pnat_bindings_get_reply'. -// InProgress: the message form may change in the future versions type PnatBindingsGetReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` @@ -719,7 +719,6 @@ func (m *PnatBindingsGetReply) Unmarshal(b []byte) error { } // PnatInterfacesDetails defines message 'pnat_interfaces_details'. -// InProgress: the message form may change in the future versions type PnatInterfacesDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` Enabled []bool `binapi:"bool[2],name=enabled" json:"enabled,omitempty"` @@ -776,7 +775,6 @@ func (m *PnatInterfacesDetails) Unmarshal(b []byte) error { } // PnatInterfacesGet defines message 'pnat_interfaces_get'. -// InProgress: the message form may change in the future versions type PnatInterfacesGet struct { Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` } @@ -810,7 +808,6 @@ func (m *PnatInterfacesGet) Unmarshal(b []byte) error { } // PnatInterfacesGetReply defines message 'pnat_interfaces_get_reply'. -// InProgress: the message form may change in the future versions type PnatInterfacesGetReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` Cursor uint32 `binapi:"u32,name=cursor" json:"cursor,omitempty"` diff --git a/binapi/pnat/pnat_rpc.ba.go b/binapi/pnat/pnat_rpc.ba.go index b60dde65..2df7b6f6 100644 --- a/binapi/pnat/pnat_rpc.ba.go +++ b/binapi/pnat/pnat_rpc.ba.go @@ -7,7 +7,7 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service pnat. @@ -87,7 +87,7 @@ func (c *serviceClient) PnatBindingsGet(ctx context.Context, in *PnatBindingsGet } type RPCService_PnatBindingsGetClient interface { - Recv() (*PnatBindingsDetails, error) + Recv() (*PnatBindingsDetails, *PnatBindingsGetReply, error) api.Stream } @@ -95,22 +95,26 @@ type serviceClient_PnatBindingsGetClient struct { api.Stream } -func (c *serviceClient_PnatBindingsGetClient) Recv() (*PnatBindingsDetails, error) { +func (c *serviceClient_PnatBindingsGetClient) Recv() (*PnatBindingsDetails, *PnatBindingsGetReply, error) { msg, err := c.Stream.RecvMsg() if err != nil { - return nil, err + return nil, nil, err } switch m := msg.(type) { case *PnatBindingsDetails: - return m, nil + return m, nil, nil case *PnatBindingsGetReply: + if err := api.RetvalToVPPApiError(m.Retval); err != nil { + c.Stream.Close() + return nil, m, err + } err = c.Stream.Close() if err != nil { - return nil, err + return nil, m, err } - return nil, io.EOF + return nil, m, io.EOF default: - return nil, fmt.Errorf("unexpected message: %T %v", m, m) + return nil, nil, fmt.Errorf("unexpected message: %T %v", m, m) } } @@ -127,7 +131,7 @@ func (c *serviceClient) PnatInterfacesGet(ctx context.Context, in *PnatInterface } type RPCService_PnatInterfacesGetClient interface { - Recv() (*PnatInterfacesDetails, error) + Recv() (*PnatInterfacesDetails, *PnatInterfacesGetReply, error) api.Stream } @@ -135,21 +139,25 @@ type serviceClient_PnatInterfacesGetClient struct { api.Stream } -func (c *serviceClient_PnatInterfacesGetClient) Recv() (*PnatInterfacesDetails, error) { +func (c *serviceClient_PnatInterfacesGetClient) Recv() (*PnatInterfacesDetails, *PnatInterfacesGetReply, error) { msg, err := c.Stream.RecvMsg() if err != nil { - return nil, err + return nil, nil, err } switch m := msg.(type) { case *PnatInterfacesDetails: - return m, nil + return m, nil, nil case *PnatInterfacesGetReply: + if err := api.RetvalToVPPApiError(m.Retval); err != nil { + c.Stream.Close() + return nil, m, err + } err = c.Stream.Close() if err != nil { - return nil, err + return nil, m, err } - return nil, io.EOF + return nil, m, io.EOF default: - return nil, fmt.Errorf("unexpected message: %T %v", m, m) + return nil, nil, fmt.Errorf("unexpected message: %T %v", m, m) } } diff --git a/binapi/policer/policer.ba.go b/binapi/policer/policer.ba.go index ca7fdee6..6aedb724 100644 --- a/binapi/policer/policer.ba.go +++ b/binapi/policer/policer.ba.go @@ -1,21 +1,20 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/policer.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/policer.api.json // Package policer contains generated bindings for API file policer.api. // // Contents: -// -// 10 messages +// - 25 messages package policer import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" policer_types "github.com/networkservicemesh/govpp/binapi/policer_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -26,10 +25,101 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "policer" - APIVersion = "2.0.0" - VersionCrc = 0xd11df44e + APIVersion = "3.0.0" + VersionCrc = 0x341163a6 ) +// PolicerAdd defines message 'policer_add'. +type PolicerAdd struct { + Name string `binapi:"string[64],name=name" json:"name,omitempty"` + Infos policer_types.PolicerConfig `binapi:"policer_config,name=infos" json:"infos,omitempty"` +} + +func (m *PolicerAdd) Reset() { *m = PolicerAdd{} } +func (*PolicerAdd) GetMessageName() string { return "policer_add" } +func (*PolicerAdd) GetCrcString() string { return "4d949e35" } +func (*PolicerAdd) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *PolicerAdd) Size() (size int) { + if m == nil { + return 0 + } + size += 64 // m.Name + size += 4 // m.Infos.Cir + size += 4 // m.Infos.Eir + size += 8 // m.Infos.Cb + size += 8 // m.Infos.Eb + size += 1 // m.Infos.RateType + size += 1 // m.Infos.RoundType + size += 1 // m.Infos.Type + size += 1 // m.Infos.ColorAware + size += 1 // m.Infos.ConformAction.Type + size += 1 // m.Infos.ConformAction.Dscp + size += 1 // m.Infos.ExceedAction.Type + size += 1 // m.Infos.ExceedAction.Dscp + size += 1 // m.Infos.ViolateAction.Type + size += 1 // m.Infos.ViolateAction.Dscp + return size +} +func (m *PolicerAdd) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeString(m.Name, 64) + buf.EncodeUint32(m.Infos.Cir) + buf.EncodeUint32(m.Infos.Eir) + buf.EncodeUint64(m.Infos.Cb) + buf.EncodeUint64(m.Infos.Eb) + buf.EncodeUint8(uint8(m.Infos.RateType)) + buf.EncodeUint8(uint8(m.Infos.RoundType)) + buf.EncodeUint8(uint8(m.Infos.Type)) + buf.EncodeBool(m.Infos.ColorAware) + buf.EncodeUint8(uint8(m.Infos.ConformAction.Type)) + buf.EncodeUint8(m.Infos.ConformAction.Dscp) + buf.EncodeUint8(uint8(m.Infos.ExceedAction.Type)) + buf.EncodeUint8(m.Infos.ExceedAction.Dscp) + buf.EncodeUint8(uint8(m.Infos.ViolateAction.Type)) + buf.EncodeUint8(m.Infos.ViolateAction.Dscp) + return buf.Bytes(), nil +} +func (m *PolicerAdd) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Name = buf.DecodeString(64) + m.Infos.Cir = buf.DecodeUint32() + m.Infos.Eir = buf.DecodeUint32() + m.Infos.Cb = buf.DecodeUint64() + m.Infos.Eb = buf.DecodeUint64() + m.Infos.RateType = policer_types.Sse2QosRateType(buf.DecodeUint8()) + m.Infos.RoundType = policer_types.Sse2QosRoundType(buf.DecodeUint8()) + m.Infos.Type = policer_types.Sse2QosPolicerType(buf.DecodeUint8()) + m.Infos.ColorAware = buf.DecodeBool() + m.Infos.ConformAction.Type = policer_types.Sse2QosActionType(buf.DecodeUint8()) + m.Infos.ConformAction.Dscp = buf.DecodeUint8() + m.Infos.ExceedAction.Type = policer_types.Sse2QosActionType(buf.DecodeUint8()) + m.Infos.ExceedAction.Dscp = buf.DecodeUint8() + m.Infos.ViolateAction.Type = policer_types.Sse2QosActionType(buf.DecodeUint8()) + m.Infos.ViolateAction.Dscp = buf.DecodeUint8() + return nil +} + +// Add/del policer +// - is_add - add policer if non-zero, else delete +// - name - policer name +// - cir - CIR +// - eir - EIR +// - cb - Committed Burst +// - eb - Excess or Peak Burst +// - rate_type - rate type +// - round_type - rounding type +// - type - policer algorithm +// - color_aware - 0=color-blind, 1=color-aware +// - conform_action - conform action +// - exceed_action - exceed action type +// - violate_action - violate action type +// // PolicerAddDel defines message 'policer_add_del'. type PolicerAddDel struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -120,6 +210,10 @@ func (m *PolicerAddDel) Unmarshal(b []byte) error { return nil } +// Add/del policer response +// - retval - return value for request +// - policer_index - for add, returned index of the new policer +// // PolicerAddDelReply defines message 'policer_add_del_reply'. type PolicerAddDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -157,6 +251,48 @@ func (m *PolicerAddDelReply) Unmarshal(b []byte) error { return nil } +// PolicerAddReply defines message 'policer_add_reply'. +type PolicerAddReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"` +} + +func (m *PolicerAddReply) Reset() { *m = PolicerAddReply{} } +func (*PolicerAddReply) GetMessageName() string { return "policer_add_reply" } +func (*PolicerAddReply) GetCrcString() string { return "a177cef2" } +func (*PolicerAddReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *PolicerAddReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 4 // m.PolicerIndex + return size +} +func (m *PolicerAddReply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(m.PolicerIndex) + return buf.Bytes(), nil +} +func (m *PolicerAddReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.PolicerIndex = buf.DecodeUint32() + return nil +} + +// policer bind: Associate/disassociate a policer with a worker thread. +// - name - policer name to bind +// - worker_index - the worker thread to bind to +// - bind_enable - Associate/disassociate +// // PolicerBind defines message 'policer_bind'. type PolicerBind struct { Name string `binapi:"string[64],name=name" json:"name,omitempty"` @@ -231,6 +367,169 @@ func (m *PolicerBindReply) Unmarshal(b []byte) error { return nil } +// PolicerBindV2 defines message 'policer_bind_v2'. +type PolicerBindV2 struct { + PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"` + WorkerIndex uint32 `binapi:"u32,name=worker_index" json:"worker_index,omitempty"` + BindEnable bool `binapi:"bool,name=bind_enable" json:"bind_enable,omitempty"` +} + +func (m *PolicerBindV2) Reset() { *m = PolicerBindV2{} } +func (*PolicerBindV2) GetMessageName() string { return "policer_bind_v2" } +func (*PolicerBindV2) GetCrcString() string { return "f87bd3c0" } +func (*PolicerBindV2) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *PolicerBindV2) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.PolicerIndex + size += 4 // m.WorkerIndex + size += 1 // m.BindEnable + return size +} +func (m *PolicerBindV2) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.PolicerIndex) + buf.EncodeUint32(m.WorkerIndex) + buf.EncodeBool(m.BindEnable) + return buf.Bytes(), nil +} +func (m *PolicerBindV2) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.PolicerIndex = buf.DecodeUint32() + m.WorkerIndex = buf.DecodeUint32() + m.BindEnable = buf.DecodeBool() + return nil +} + +// PolicerBindV2Reply defines message 'policer_bind_v2_reply'. +type PolicerBindV2Reply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *PolicerBindV2Reply) Reset() { *m = PolicerBindV2Reply{} } +func (*PolicerBindV2Reply) GetMessageName() string { return "policer_bind_v2_reply" } +func (*PolicerBindV2Reply) GetCrcString() string { return "e8d4e804" } +func (*PolicerBindV2Reply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *PolicerBindV2Reply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *PolicerBindV2Reply) 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 *PolicerBindV2Reply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// PolicerDel defines message 'policer_del'. +type PolicerDel struct { + PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"` +} + +func (m *PolicerDel) Reset() { *m = PolicerDel{} } +func (*PolicerDel) GetMessageName() string { return "policer_del" } +func (*PolicerDel) GetCrcString() string { return "7ff7912e" } +func (*PolicerDel) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *PolicerDel) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.PolicerIndex + return size +} +func (m *PolicerDel) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.PolicerIndex) + return buf.Bytes(), nil +} +func (m *PolicerDel) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.PolicerIndex = buf.DecodeUint32() + return nil +} + +// PolicerDelReply defines message 'policer_del_reply'. +type PolicerDelReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *PolicerDelReply) Reset() { *m = PolicerDelReply{} } +func (*PolicerDelReply) GetMessageName() string { return "policer_del_reply" } +func (*PolicerDelReply) GetCrcString() string { return "e8d4e804" } +func (*PolicerDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *PolicerDelReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *PolicerDelReply) 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 *PolicerDelReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// Policer operational state response. +// - name - policer name +// - cir - CIR +// - eir - EIR +// - cb - Committed Burst +// - eb - Excess or Peak Burst +// - rate_type - rate type +// - round_type - rounding type +// - type - policer algorithm +// - conform_action - conform action +// - exceed_action - exceed action +// - violate_action - violate action +// - single_rate - 1 = single rate policer, 0 = two rate policer +// - color_aware - for hierarchical policing +// - scale - power-of-2 shift amount for lower rates +// - cir_tokens_per_period - number of tokens for each period +// - pir_tokens_per_period - number of tokens for each period for 2-rate policer +// - current_limit - current limit +// - current_bucket - current bucket +// - extended_limit - extended limit +// - extended_bucket - extended bucket +// - last_update_time - last update time +// // PolicerDetails defines message 'policer_details'. type PolicerDetails struct { Name string `binapi:"string[64],name=name" json:"name,omitempty"` @@ -353,6 +652,10 @@ func (m *PolicerDetails) Unmarshal(b []byte) error { return nil } +// Get list of policers +// - match_name_valid - if 0 request all policers otherwise use match_name +// - match_name - policer name +// // PolicerDump defines message 'policer_dump'. type PolicerDump struct { MatchNameValid bool `binapi:"bool,name=match_name_valid" json:"match_name_valid,omitempty"` @@ -390,6 +693,47 @@ func (m *PolicerDump) Unmarshal(b []byte) error { return nil } +// Get list of policers +// - policer_index - index of policer in the pool, ~0 to request all +// +// PolicerDumpV2 defines message 'policer_dump_v2'. +type PolicerDumpV2 struct { + PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"` +} + +func (m *PolicerDumpV2) Reset() { *m = PolicerDumpV2{} } +func (*PolicerDumpV2) GetMessageName() string { return "policer_dump_v2" } +func (*PolicerDumpV2) GetCrcString() string { return "7ff7912e" } +func (*PolicerDumpV2) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *PolicerDumpV2) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.PolicerIndex + return size +} +func (m *PolicerDumpV2) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.PolicerIndex) + return buf.Bytes(), nil +} +func (m *PolicerDumpV2) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.PolicerIndex = buf.DecodeUint32() + return nil +} + +// policer input: Apply policer as an input feature. +// - name - policer name +// - sw_if_index - interface to apply the policer +// - apply - Apply/remove +// // PolicerInput defines message 'policer_input'. type PolicerInput struct { Name string `binapi:"string[64],name=name" json:"name,omitempty"` @@ -464,6 +808,85 @@ func (m *PolicerInputReply) Unmarshal(b []byte) error { return nil } +// PolicerInputV2 defines message 'policer_input_v2'. +type PolicerInputV2 struct { + PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"` + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + Apply bool `binapi:"bool,name=apply" json:"apply,omitempty"` +} + +func (m *PolicerInputV2) Reset() { *m = PolicerInputV2{} } +func (*PolicerInputV2) GetMessageName() string { return "policer_input_v2" } +func (*PolicerInputV2) GetCrcString() string { return "8388eb84" } +func (*PolicerInputV2) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *PolicerInputV2) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.PolicerIndex + size += 4 // m.SwIfIndex + size += 1 // m.Apply + return size +} +func (m *PolicerInputV2) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.PolicerIndex) + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeBool(m.Apply) + return buf.Bytes(), nil +} +func (m *PolicerInputV2) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.PolicerIndex = buf.DecodeUint32() + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.Apply = buf.DecodeBool() + return nil +} + +// PolicerInputV2Reply defines message 'policer_input_v2_reply'. +type PolicerInputV2Reply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *PolicerInputV2Reply) Reset() { *m = PolicerInputV2Reply{} } +func (*PolicerInputV2Reply) GetMessageName() string { return "policer_input_v2_reply" } +func (*PolicerInputV2Reply) GetCrcString() string { return "e8d4e804" } +func (*PolicerInputV2Reply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *PolicerInputV2Reply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *PolicerInputV2Reply) 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 *PolicerInputV2Reply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// policer output: Apply policer as an output feature. +// - name - policer name +// - sw_if_index - interface to apply the policer +// - apply - Apply/remove +// // PolicerOutput defines message 'policer_output'. type PolicerOutput struct { Name string `binapi:"string[64],name=name" json:"name,omitempty"` @@ -538,32 +961,311 @@ func (m *PolicerOutputReply) Unmarshal(b []byte) error { return nil } +// PolicerOutputV2 defines message 'policer_output_v2'. +type PolicerOutputV2 struct { + PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"` + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` + Apply bool `binapi:"bool,name=apply" json:"apply,omitempty"` +} + +func (m *PolicerOutputV2) Reset() { *m = PolicerOutputV2{} } +func (*PolicerOutputV2) GetMessageName() string { return "policer_output_v2" } +func (*PolicerOutputV2) GetCrcString() string { return "8388eb84" } +func (*PolicerOutputV2) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *PolicerOutputV2) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.PolicerIndex + size += 4 // m.SwIfIndex + size += 1 // m.Apply + return size +} +func (m *PolicerOutputV2) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.PolicerIndex) + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeBool(m.Apply) + return buf.Bytes(), nil +} +func (m *PolicerOutputV2) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.PolicerIndex = buf.DecodeUint32() + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.Apply = buf.DecodeBool() + return nil +} + +// PolicerOutputV2Reply defines message 'policer_output_v2_reply'. +type PolicerOutputV2Reply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *PolicerOutputV2Reply) Reset() { *m = PolicerOutputV2Reply{} } +func (*PolicerOutputV2Reply) GetMessageName() string { return "policer_output_v2_reply" } +func (*PolicerOutputV2Reply) GetCrcString() string { return "e8d4e804" } +func (*PolicerOutputV2Reply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *PolicerOutputV2Reply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *PolicerOutputV2Reply) 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 *PolicerOutputV2Reply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// PolicerReset defines message 'policer_reset'. +type PolicerReset struct { + PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"` +} + +func (m *PolicerReset) Reset() { *m = PolicerReset{} } +func (*PolicerReset) GetMessageName() string { return "policer_reset" } +func (*PolicerReset) GetCrcString() string { return "7ff7912e" } +func (*PolicerReset) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *PolicerReset) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.PolicerIndex + return size +} +func (m *PolicerReset) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.PolicerIndex) + return buf.Bytes(), nil +} +func (m *PolicerReset) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.PolicerIndex = buf.DecodeUint32() + return nil +} + +// PolicerResetReply defines message 'policer_reset_reply'. +type PolicerResetReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *PolicerResetReply) Reset() { *m = PolicerResetReply{} } +func (*PolicerResetReply) GetMessageName() string { return "policer_reset_reply" } +func (*PolicerResetReply) GetCrcString() string { return "e8d4e804" } +func (*PolicerResetReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *PolicerResetReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *PolicerResetReply) 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 *PolicerResetReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// PolicerUpdate defines message 'policer_update'. +type PolicerUpdate struct { + PolicerIndex uint32 `binapi:"u32,name=policer_index" json:"policer_index,omitempty"` + Infos policer_types.PolicerConfig `binapi:"policer_config,name=infos" json:"infos,omitempty"` +} + +func (m *PolicerUpdate) Reset() { *m = PolicerUpdate{} } +func (*PolicerUpdate) GetMessageName() string { return "policer_update" } +func (*PolicerUpdate) GetCrcString() string { return "fd039ef0" } +func (*PolicerUpdate) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *PolicerUpdate) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.PolicerIndex + size += 4 // m.Infos.Cir + size += 4 // m.Infos.Eir + size += 8 // m.Infos.Cb + size += 8 // m.Infos.Eb + size += 1 // m.Infos.RateType + size += 1 // m.Infos.RoundType + size += 1 // m.Infos.Type + size += 1 // m.Infos.ColorAware + size += 1 // m.Infos.ConformAction.Type + size += 1 // m.Infos.ConformAction.Dscp + size += 1 // m.Infos.ExceedAction.Type + size += 1 // m.Infos.ExceedAction.Dscp + size += 1 // m.Infos.ViolateAction.Type + size += 1 // m.Infos.ViolateAction.Dscp + return size +} +func (m *PolicerUpdate) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint32(m.PolicerIndex) + buf.EncodeUint32(m.Infos.Cir) + buf.EncodeUint32(m.Infos.Eir) + buf.EncodeUint64(m.Infos.Cb) + buf.EncodeUint64(m.Infos.Eb) + buf.EncodeUint8(uint8(m.Infos.RateType)) + buf.EncodeUint8(uint8(m.Infos.RoundType)) + buf.EncodeUint8(uint8(m.Infos.Type)) + buf.EncodeBool(m.Infos.ColorAware) + buf.EncodeUint8(uint8(m.Infos.ConformAction.Type)) + buf.EncodeUint8(m.Infos.ConformAction.Dscp) + buf.EncodeUint8(uint8(m.Infos.ExceedAction.Type)) + buf.EncodeUint8(m.Infos.ExceedAction.Dscp) + buf.EncodeUint8(uint8(m.Infos.ViolateAction.Type)) + buf.EncodeUint8(m.Infos.ViolateAction.Dscp) + return buf.Bytes(), nil +} +func (m *PolicerUpdate) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.PolicerIndex = buf.DecodeUint32() + m.Infos.Cir = buf.DecodeUint32() + m.Infos.Eir = buf.DecodeUint32() + m.Infos.Cb = buf.DecodeUint64() + m.Infos.Eb = buf.DecodeUint64() + m.Infos.RateType = policer_types.Sse2QosRateType(buf.DecodeUint8()) + m.Infos.RoundType = policer_types.Sse2QosRoundType(buf.DecodeUint8()) + m.Infos.Type = policer_types.Sse2QosPolicerType(buf.DecodeUint8()) + m.Infos.ColorAware = buf.DecodeBool() + m.Infos.ConformAction.Type = policer_types.Sse2QosActionType(buf.DecodeUint8()) + m.Infos.ConformAction.Dscp = buf.DecodeUint8() + m.Infos.ExceedAction.Type = policer_types.Sse2QosActionType(buf.DecodeUint8()) + m.Infos.ExceedAction.Dscp = buf.DecodeUint8() + m.Infos.ViolateAction.Type = policer_types.Sse2QosActionType(buf.DecodeUint8()) + m.Infos.ViolateAction.Dscp = buf.DecodeUint8() + return nil +} + +// PolicerUpdateReply defines message 'policer_update_reply'. +type PolicerUpdateReply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *PolicerUpdateReply) Reset() { *m = PolicerUpdateReply{} } +func (*PolicerUpdateReply) GetMessageName() string { return "policer_update_reply" } +func (*PolicerUpdateReply) GetCrcString() string { return "e8d4e804" } +func (*PolicerUpdateReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *PolicerUpdateReply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *PolicerUpdateReply) 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 *PolicerUpdateReply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + func init() { file_policer_binapi_init() } func file_policer_binapi_init() { + api.RegisterMessage((*PolicerAdd)(nil), "policer_add_4d949e35") api.RegisterMessage((*PolicerAddDel)(nil), "policer_add_del_2b31dd38") api.RegisterMessage((*PolicerAddDelReply)(nil), "policer_add_del_reply_a177cef2") + api.RegisterMessage((*PolicerAddReply)(nil), "policer_add_reply_a177cef2") api.RegisterMessage((*PolicerBind)(nil), "policer_bind_dcf516f9") api.RegisterMessage((*PolicerBindReply)(nil), "policer_bind_reply_e8d4e804") + api.RegisterMessage((*PolicerBindV2)(nil), "policer_bind_v2_f87bd3c0") + api.RegisterMessage((*PolicerBindV2Reply)(nil), "policer_bind_v2_reply_e8d4e804") + api.RegisterMessage((*PolicerDel)(nil), "policer_del_7ff7912e") + api.RegisterMessage((*PolicerDelReply)(nil), "policer_del_reply_e8d4e804") api.RegisterMessage((*PolicerDetails)(nil), "policer_details_72d0e248") api.RegisterMessage((*PolicerDump)(nil), "policer_dump_35f1ae0f") + api.RegisterMessage((*PolicerDumpV2)(nil), "policer_dump_v2_7ff7912e") api.RegisterMessage((*PolicerInput)(nil), "policer_input_233f0ef5") api.RegisterMessage((*PolicerInputReply)(nil), "policer_input_reply_e8d4e804") + api.RegisterMessage((*PolicerInputV2)(nil), "policer_input_v2_8388eb84") + api.RegisterMessage((*PolicerInputV2Reply)(nil), "policer_input_v2_reply_e8d4e804") api.RegisterMessage((*PolicerOutput)(nil), "policer_output_233f0ef5") api.RegisterMessage((*PolicerOutputReply)(nil), "policer_output_reply_e8d4e804") + api.RegisterMessage((*PolicerOutputV2)(nil), "policer_output_v2_8388eb84") + api.RegisterMessage((*PolicerOutputV2Reply)(nil), "policer_output_v2_reply_e8d4e804") + api.RegisterMessage((*PolicerReset)(nil), "policer_reset_7ff7912e") + api.RegisterMessage((*PolicerResetReply)(nil), "policer_reset_reply_e8d4e804") + api.RegisterMessage((*PolicerUpdate)(nil), "policer_update_fd039ef0") + api.RegisterMessage((*PolicerUpdateReply)(nil), "policer_update_reply_e8d4e804") } // Messages returns list of all messages in this module. func AllMessages() []api.Message { return []api.Message{ + (*PolicerAdd)(nil), (*PolicerAddDel)(nil), (*PolicerAddDelReply)(nil), + (*PolicerAddReply)(nil), (*PolicerBind)(nil), (*PolicerBindReply)(nil), + (*PolicerBindV2)(nil), + (*PolicerBindV2Reply)(nil), + (*PolicerDel)(nil), + (*PolicerDelReply)(nil), (*PolicerDetails)(nil), (*PolicerDump)(nil), + (*PolicerDumpV2)(nil), (*PolicerInput)(nil), (*PolicerInputReply)(nil), + (*PolicerInputV2)(nil), + (*PolicerInputV2Reply)(nil), (*PolicerOutput)(nil), (*PolicerOutputReply)(nil), + (*PolicerOutputV2)(nil), + (*PolicerOutputV2Reply)(nil), + (*PolicerReset)(nil), + (*PolicerResetReply)(nil), + (*PolicerUpdate)(nil), + (*PolicerUpdateReply)(nil), } } diff --git a/binapi/policer/policer_rpc.ba.go b/binapi/policer/policer_rpc.ba.go index d1737091..bb09fc6f 100644 --- a/binapi/policer/policer_rpc.ba.go +++ b/binapi/policer/policer_rpc.ba.go @@ -7,17 +7,25 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service policer. type RPCService interface { + PolicerAdd(ctx context.Context, in *PolicerAdd) (*PolicerAddReply, error) PolicerAddDel(ctx context.Context, in *PolicerAddDel) (*PolicerAddDelReply, error) PolicerBind(ctx context.Context, in *PolicerBind) (*PolicerBindReply, error) + PolicerBindV2(ctx context.Context, in *PolicerBindV2) (*PolicerBindV2Reply, error) + PolicerDel(ctx context.Context, in *PolicerDel) (*PolicerDelReply, error) PolicerDump(ctx context.Context, in *PolicerDump) (RPCService_PolicerDumpClient, error) + PolicerDumpV2(ctx context.Context, in *PolicerDumpV2) (RPCService_PolicerDumpV2Client, error) PolicerInput(ctx context.Context, in *PolicerInput) (*PolicerInputReply, error) + PolicerInputV2(ctx context.Context, in *PolicerInputV2) (*PolicerInputV2Reply, error) PolicerOutput(ctx context.Context, in *PolicerOutput) (*PolicerOutputReply, error) + PolicerOutputV2(ctx context.Context, in *PolicerOutputV2) (*PolicerOutputV2Reply, error) + PolicerReset(ctx context.Context, in *PolicerReset) (*PolicerResetReply, error) + PolicerUpdate(ctx context.Context, in *PolicerUpdate) (*PolicerUpdateReply, error) } type serviceClient struct { @@ -28,6 +36,15 @@ func NewServiceClient(conn api.Connection) RPCService { return &serviceClient{conn} } +func (c *serviceClient) PolicerAdd(ctx context.Context, in *PolicerAdd) (*PolicerAddReply, error) { + out := new(PolicerAddReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + func (c *serviceClient) PolicerAddDel(ctx context.Context, in *PolicerAddDel) (*PolicerAddDelReply, error) { out := new(PolicerAddDelReply) err := c.conn.Invoke(ctx, in, out) @@ -46,6 +63,24 @@ func (c *serviceClient) PolicerBind(ctx context.Context, in *PolicerBind) (*Poli return out, api.RetvalToVPPApiError(out.Retval) } +func (c *serviceClient) PolicerBindV2(ctx context.Context, in *PolicerBindV2) (*PolicerBindV2Reply, error) { + out := new(PolicerBindV2Reply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + +func (c *serviceClient) PolicerDel(ctx context.Context, in *PolicerDel) (*PolicerDelReply, error) { + out := new(PolicerDelReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + func (c *serviceClient) PolicerDump(ctx context.Context, in *PolicerDump) (RPCService_PolicerDumpClient, error) { stream, err := c.conn.NewStream(ctx) if err != nil { @@ -89,6 +124,49 @@ func (c *serviceClient_PolicerDumpClient) Recv() (*PolicerDetails, error) { } } +func (c *serviceClient) PolicerDumpV2(ctx context.Context, in *PolicerDumpV2) (RPCService_PolicerDumpV2Client, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_PolicerDumpV2Client{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_PolicerDumpV2Client interface { + Recv() (*PolicerDetails, error) + api.Stream +} + +type serviceClient_PolicerDumpV2Client struct { + api.Stream +} + +func (c *serviceClient_PolicerDumpV2Client) Recv() (*PolicerDetails, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *PolicerDetails: + return m, nil + 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) PolicerInput(ctx context.Context, in *PolicerInput) (*PolicerInputReply, error) { out := new(PolicerInputReply) err := c.conn.Invoke(ctx, in, out) @@ -98,6 +176,15 @@ func (c *serviceClient) PolicerInput(ctx context.Context, in *PolicerInput) (*Po return out, api.RetvalToVPPApiError(out.Retval) } +func (c *serviceClient) PolicerInputV2(ctx context.Context, in *PolicerInputV2) (*PolicerInputV2Reply, error) { + out := new(PolicerInputV2Reply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + func (c *serviceClient) PolicerOutput(ctx context.Context, in *PolicerOutput) (*PolicerOutputReply, error) { out := new(PolicerOutputReply) err := c.conn.Invoke(ctx, in, out) @@ -106,3 +193,30 @@ func (c *serviceClient) PolicerOutput(ctx context.Context, in *PolicerOutput) (* } return out, api.RetvalToVPPApiError(out.Retval) } + +func (c *serviceClient) PolicerOutputV2(ctx context.Context, in *PolicerOutputV2) (*PolicerOutputV2Reply, error) { + out := new(PolicerOutputV2Reply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + +func (c *serviceClient) PolicerReset(ctx context.Context, in *PolicerReset) (*PolicerResetReply, error) { + out := new(PolicerResetReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + +func (c *serviceClient) PolicerUpdate(ctx context.Context, in *PolicerUpdate) (*PolicerUpdateReply, error) { + out := new(PolicerUpdateReply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} diff --git a/binapi/policer_types/policer_types.ba.go b/binapi/policer_types/policer_types.ba.go index 42c2438f..157e3dcb 100644 --- a/binapi/policer_types/policer_types.ba.go +++ b/binapi/policer_types/policer_types.ba.go @@ -1,21 +1,20 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/policer_types.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/policer_types.api.json // Package policer_types contains generated bindings for API file policer_types.api. // // Contents: -// -// 4 enums -// 1 struct +// - 4 enums +// - 2 structs package policer_types import ( "strconv" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // This is a compile-time assertion to ensure that this generated file @@ -24,6 +23,12 @@ import ( // GoVPP api package needs to be updated. const _ = api.GoVppAPIPackageIsVersion2 +const ( + APIFile = "policer_types" + APIVersion = "1.0.0" + VersionCrc = 0x5838c08b +) + // Sse2QosActionType defines enum 'sse2_qos_action_type'. type Sse2QosActionType uint8 @@ -156,6 +161,21 @@ func (x Sse2QosRoundType) String() string { return "Sse2QosRoundType(" + strconv.Itoa(int(x)) + ")" } +// PolicerConfig defines type 'policer_config'. +type PolicerConfig struct { + Cir uint32 `binapi:"u32,name=cir" json:"cir,omitempty"` + Eir uint32 `binapi:"u32,name=eir" json:"eir,omitempty"` + Cb uint64 `binapi:"u64,name=cb" json:"cb,omitempty"` + Eb uint64 `binapi:"u64,name=eb" json:"eb,omitempty"` + RateType Sse2QosRateType `binapi:"sse2_qos_rate_type,name=rate_type" json:"rate_type,omitempty"` + RoundType Sse2QosRoundType `binapi:"sse2_qos_round_type,name=round_type" json:"round_type,omitempty"` + Type Sse2QosPolicerType `binapi:"sse2_qos_policer_type,name=type" json:"type,omitempty"` + ColorAware bool `binapi:"bool,name=color_aware" json:"color_aware,omitempty"` + ConformAction Sse2QosAction `binapi:"sse2_qos_action,name=conform_action" json:"conform_action,omitempty"` + ExceedAction Sse2QosAction `binapi:"sse2_qos_action,name=exceed_action" json:"exceed_action,omitempty"` + ViolateAction Sse2QosAction `binapi:"sse2_qos_action,name=violate_action" json:"violate_action,omitempty"` +} + // Sse2QosAction defines type 'sse2_qos_action'. type Sse2QosAction struct { Type Sse2QosActionType `binapi:"sse2_qos_action_type,name=type" json:"type,omitempty"` diff --git a/binapi/pot/pot.ba.go b/binapi/pot/pot.ba.go index 289ce06f..cae8fd22 100644 --- a/binapi/pot/pot.ba.go +++ b/binapi/pot/pot.ba.go @@ -1,19 +1,18 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/pot.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/pot.api.json // Package pot contains generated bindings for API file pot.api. // // Contents: -// -// 8 messages +// - 8 messages package pot import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -28,6 +27,10 @@ const ( VersionCrc = 0xa9d8e55c ) +// Proof of Transit(POT): Activate POT profile in the list +// - id - id of the profile +// - list_name - name of this profile list +// // PotProfileActivate defines message 'pot_profile_activate'. type PotProfileActivate struct { ID uint8 `binapi:"u8,name=id" json:"id,omitempty"` @@ -98,6 +101,17 @@ func (m *PotProfileActivateReply) Unmarshal(b []byte) error { return nil } +// Proof of Transit(POT): Set POT profile +// - id - id of the profile +// - validator - True/False to indicate if this is verifier +// - secret_key - Verification key +// - secret_share - Share of the 1st polynomial +// - prime - Prime number used for modulo operation +// - max_bits - Max bits to be used for Random number generation +// - lpc - Lagrange basis polynomial +// - polynomial_public - pre-evaluated public polynomial +// - list_name - name of this profile list +// // PotProfileAdd defines message 'pot_profile_add'. type PotProfileAdd struct { ID uint8 `binapi:"u8,name=id" json:"id,omitempty"` @@ -196,6 +210,9 @@ func (m *PotProfileAddReply) Unmarshal(b []byte) error { return nil } +// Delete POT Profile +// - list_name - name of profile list to delete +// // PotProfileDel defines message 'pot_profile_del'. type PotProfileDel struct { ListName string `binapi:"string[],name=list_name" json:"list_name,omitempty"` @@ -262,6 +279,18 @@ func (m *PotProfileDelReply) Unmarshal(b []byte) error { return nil } +// Show POT profile reply +// - id - id of the profile +// - validator - True/False to indicate if this is verifier +// - secret_key - Verification key +// - secret_share - Share of the 1st polynomial +// - prime - Prime number used for modulo operation +// - max_bits - Max bits to be used for Random number generation +// - lpc - Lagrange basis polynomial +// - polynomial_public - pre-evaluated public polynomial +// - list_name_len - length of the name of this profile list +// - list_name - name of this profile list +// // PotProfileShowConfigDetails defines message 'pot_profile_show_config_details'. type PotProfileShowConfigDetails struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -327,6 +356,9 @@ func (m *PotProfileShowConfigDetails) Unmarshal(b []byte) error { return nil } +// Show POT Profiles +// - id - id of the profile +// // PotProfileShowConfigDump defines message 'pot_profile_show_config_dump'. type PotProfileShowConfigDump struct { ID uint8 `binapi:"u8,name=id" json:"id,omitempty"` diff --git a/binapi/pot/pot_rpc.ba.go b/binapi/pot/pot_rpc.ba.go index b9acc941..a22bb21c 100644 --- a/binapi/pot/pot_rpc.ba.go +++ b/binapi/pot/pot_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service pot. diff --git a/binapi/pppoe/pppoe.ba.go b/binapi/pppoe/pppoe.ba.go index fbf9be02..20c18304 100644 --- a/binapi/pppoe/pppoe.ba.go +++ b/binapi/pppoe/pppoe.ba.go @@ -1,22 +1,21 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/pppoe.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/pppoe.api.json // Package pppoe contains generated bindings for API file pppoe.api. // // Contents: -// -// 6 messages +// - 6 messages package pppoe import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ethernet_types "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -31,6 +30,10 @@ const ( VersionCrc = 0xec9e86bf ) +// Create PPPOE control plane interface +// - sw_if_index - software index of the interface +// - is_add - to create or to delete +// // PppoeAddDelCp defines message 'pppoe_add_del_cp'. type PppoeAddDelCp struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -68,6 +71,9 @@ func (m *PppoeAddDelCp) Unmarshal(b []byte) error { return nil } +// reply for create PPPOE control plane interface +// - retval - return code +// // PppoeAddDelCpReply defines message 'pppoe_add_del_cp_reply'. type PppoeAddDelCpReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -101,6 +107,13 @@ func (m *PppoeAddDelCpReply) Unmarshal(b []byte) error { return nil } +// Set or delete an PPPOE session +// - is_add - add address if non-zero, else delete +// - session_id - PPPoE session ID +// - client_ip - PPPOE session's client address. +// - decap_vrf_id - the vrf index for pppoe decaped packet +// - client_mac - the client ethernet address +// // PppoeAddDelSession defines message 'pppoe_add_del_session'. type PppoeAddDelSession struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -153,6 +166,10 @@ func (m *PppoeAddDelSession) Unmarshal(b []byte) error { return nil } +// reply for set or delete an PPPOE session +// - retval - return code +// - sw_if_index - software index of the interface +// // PppoeAddDelSessionReply defines message 'pppoe_add_del_session_reply'. type PppoeAddDelSessionReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -190,6 +207,15 @@ func (m *PppoeAddDelSessionReply) Unmarshal(b []byte) error { return nil } +// dump details of an PPPOE session +// - sw_if_index - software index of the interface +// - session_id - PPPoE session ID +// - client_ip - PPPOE session's client address. +// - encap_if_index - the index of tx interface for pppoe encaped packet +// - decap_vrf_id - the vrf index for pppoe decaped packet +// - local_mac - the local ethernet address +// - client_mac - the client ethernet address +// // PppoeSessionDetails defines message 'pppoe_session_details'. type PppoeSessionDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -250,6 +276,9 @@ func (m *PppoeSessionDetails) Unmarshal(b []byte) error { return nil } +// Dump PPPOE session +// - sw_if_index - software index of the interface +// // PppoeSessionDump defines message 'pppoe_session_dump'. type PppoeSessionDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/binapi/pppoe/pppoe_rpc.ba.go b/binapi/pppoe/pppoe_rpc.ba.go index 477c88df..7b290599 100644 --- a/binapi/pppoe/pppoe_rpc.ba.go +++ b/binapi/pppoe/pppoe_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service pppoe. diff --git a/binapi/punt/punt.ba.go b/binapi/punt/punt.ba.go index 19485d4c..68737cf1 100644 --- a/binapi/punt/punt.ba.go +++ b/binapi/punt/punt.ba.go @@ -1,25 +1,24 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/punt.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/punt.api.json // Package punt contains generated bindings for API file punt.api. // // Contents: -// -// 1 enum -// 5 structs -// 1 union -// 10 messages +// - 1 enum +// - 5 structs +// - 1 union +// - 10 messages package punt import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -187,6 +186,9 @@ func (m *PuntReasonDetails) Unmarshal(b []byte) error { return nil } +// Dump all or one of the exception punt reasons +// * - - If the string is not set punt dump all reasons +// * else dump only the one specified // PuntReasonDump defines message 'punt_reason_dump'. type PuntReasonDump struct { Reason PuntReason `binapi:"punt_reason,name=reason" json:"reason,omitempty"` @@ -365,6 +367,10 @@ func (m *PuntSocketDump) Unmarshal(b []byte) error { return nil } +// Punt traffic to the host via socket +// - header_version - expected meta data header version (currently 1) +// - punt - punt definition +// // PuntSocketRegister defines message 'punt_socket_register'. type PuntSocketRegister struct { HeaderVersion uint32 `binapi:"u32,name=header_version" json:"header_version,omitempty"` @@ -446,6 +452,10 @@ func (m *PuntSocketRegisterReply) Unmarshal(b []byte) error { return nil } +// Punt traffic to the host +// - is_add - add punt if non-zero, else delete +// - punt - punt definition, only UDP (0x11) is supported +// // SetPunt defines message 'set_punt'. type SetPunt struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` diff --git a/binapi/punt/punt_rpc.ba.go b/binapi/punt/punt_rpc.ba.go index b30acf7f..f9c62876 100644 --- a/binapi/punt/punt_rpc.ba.go +++ b/binapi/punt/punt_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service punt. diff --git a/binapi/qos/qos.ba.go b/binapi/qos/qos.ba.go index 490acbc5..0ced3e86 100644 --- a/binapi/qos/qos.ba.go +++ b/binapi/qos/qos.ba.go @@ -1,25 +1,24 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/qos.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/qos.api.json // Package qos contains generated bindings for API file qos.api. // // Contents: -// -// 1 enum -// 5 structs -// 19 messages +// - 1 enum +// - 5 structs +// - 19 messages package qos import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" _ "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -98,6 +97,9 @@ type QosStore struct { Value uint8 `binapi:"u8,name=value" json:"value,omitempty"` } +// * @brief Delete a Qos Map +// - - map_id - ID of the map to delete +// // QosEgressMapDelete defines message 'qos_egress_map_delete'. type QosEgressMapDelete struct { ID uint32 `binapi:"u32,name=id" json:"id,omitempty"` @@ -164,6 +166,7 @@ func (m *QosEgressMapDeleteReply) Unmarshal(b []byte) error { return nil } +// * QoS map details // QosEgressMapDetails defines message 'qos_egress_map_details'. type QosEgressMapDetails struct { Map QosEgressMap `binapi:"qos_egress_map,name=map" json:"map,omitempty"` @@ -207,6 +210,7 @@ func (m *QosEgressMapDetails) Unmarshal(b []byte) error { return nil } +// * Dump the QoS egress maps // QosEgressMapDump defines message 'qos_egress_map_dump'. type QosEgressMapDump struct{} @@ -234,6 +238,13 @@ func (m *QosEgressMapDump) Unmarshal(b []byte) error { return nil } +// * @brief Update a QoS Map +// - A QoS map, translates from the QoS value in the packet set by the 'record' +// - feature, to the value used for output in the 'mark' feature. +// - There is one row in the map for each input/record source. +// - The MAP is then applied to the egress interface at for a given output source +// - - map - The Map +// // QosEgressMapUpdate defines message 'qos_egress_map_update'. type QosEgressMapUpdate struct { Map QosEgressMap `binapi:"qos_egress_map,name=map" json:"map,omitempty"` @@ -310,6 +321,7 @@ func (m *QosEgressMapUpdateReply) Unmarshal(b []byte) error { return nil } +// * QoS marking details // QosMarkDetails defines message 'qos_mark_details'. type QosMarkDetails struct { Mark QosMark `binapi:"qos_mark,name=mark" json:"mark,omitempty"` @@ -382,6 +394,7 @@ func (m *QosMarkDetailsReply) Unmarshal(b []byte) error { return nil } +// * Dump QoS marking configs // QosMarkDump defines message 'qos_mark_dump'. type QosMarkDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -415,6 +428,10 @@ func (m *QosMarkDump) Unmarshal(b []byte) error { return nil } +// * @brief Enable/Disable QoS marking +// - - enable - enable=1 or disable the feature +// - - mark - Marking config +// // QosMarkEnableDisable defines message 'qos_mark_enable_disable'. type QosMarkEnableDisable struct { Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"` @@ -491,6 +508,7 @@ func (m *QosMarkEnableDisableReply) Unmarshal(b []byte) error { return nil } +// * Details of QoS recording configs // QosRecordDetails defines message 'qos_record_details'. type QosRecordDetails struct { Record QosRecord `binapi:"qos_record,name=record" json:"record,omitempty"` @@ -527,6 +545,7 @@ func (m *QosRecordDetails) Unmarshal(b []byte) error { return nil } +// * Dump the QoS record configs // QosRecordDump defines message 'qos_record_dump'. type QosRecordDump struct{} @@ -554,6 +573,12 @@ func (m *QosRecordDump) Unmarshal(b []byte) error { return nil } +// * Enable/Disable QoS recording +// - The QoS bits from the packet at the specified input layer are copied +// - into the packet. Recording should be used in conjunction with marking +// - - enable - enable=1 or disable the feature +// - - record - Recording configuration +// // QosRecordEnableDisable defines message 'qos_record_enable_disable'. type QosRecordEnableDisable struct { Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"` @@ -627,6 +652,7 @@ func (m *QosRecordEnableDisableReply) Unmarshal(b []byte) error { return nil } +// * Details of QoS recording configs // QosStoreDetails defines message 'qos_store_details'. type QosStoreDetails struct { Store QosStore `binapi:"qos_store,name=store" json:"store,omitempty"` @@ -666,6 +692,7 @@ func (m *QosStoreDetails) Unmarshal(b []byte) error { return nil } +// * Dump the QoS store configs // QosStoreDump defines message 'qos_store_dump'. type QosStoreDump struct{} @@ -693,6 +720,12 @@ func (m *QosStoreDump) Unmarshal(b []byte) error { return nil } +// * Enable/Disable QoS storing +// - The QoS bits from the packet at the specified input layer are copied +// - into the packet. Storing should be used in conjunction with marking +// - - enable - enable=1 or disable the feature +// - - store - Store configuration +// // QosStoreEnableDisable defines message 'qos_store_enable_disable'. type QosStoreEnableDisable struct { Enable bool `binapi:"bool,name=enable,default=true" json:"enable,omitempty"` diff --git a/binapi/qos/qos_rpc.ba.go b/binapi/qos/qos_rpc.ba.go index 13b34487..04173ba5 100644 --- a/binapi/qos/qos_rpc.ba.go +++ b/binapi/qos/qos_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service qos. diff --git a/binapi/rd_cp/rd_cp.ba.go b/binapi/rd_cp/rd_cp.ba.go index 4919255a..1a9ce396 100644 --- a/binapi/rd_cp/rd_cp.ba.go +++ b/binapi/rd_cp/rd_cp.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/rd_cp.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/rd_cp.api.json // Package rd_cp contains generated bindings for API file rd_cp.api. // // Contents: -// -// 2 messages +// - 2 messages package rd_cp import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,6 +28,16 @@ const ( VersionCrc = 0x871c3bee ) +// Enable/disable IPv6 ND address autoconfiguration +// +// and setting up default routes +// - sw_if_index - interface to enable the autoconfigutation on +// - enable - 1 to enable address autoconfiguration, 0 to disable +// - install_default_routes - 1 to enable installing defaut routes, +// 0 to disable installing defaut routes, +// the value is ignored (and taken as 0) +// when enable param is set to 0 +// // IP6NdAddressAutoconfig defines message 'ip6_nd_address_autoconfig'. type IP6NdAddressAutoconfig struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/binapi/rd_cp/rd_cp_rpc.ba.go b/binapi/rd_cp/rd_cp_rpc.ba.go index 56b2c185..2507f127 100644 --- a/binapi/rd_cp/rd_cp_rpc.ba.go +++ b/binapi/rd_cp/rd_cp_rpc.ba.go @@ -5,7 +5,7 @@ package rd_cp import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service rd_cp. diff --git a/binapi/rdma/rdma.ba.go b/binapi/rdma/rdma.ba.go index 8cde3395..36af7d94 100644 --- a/binapi/rdma/rdma.ba.go +++ b/binapi/rdma/rdma.ba.go @@ -1,23 +1,22 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/rdma.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/rdma.api.json // Package rdma contains generated bindings for API file rdma.api. // // Contents: -// -// 3 enums -// 8 messages +// - 3 enums +// - 8 messages package rdma import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -128,6 +127,14 @@ func (x RdmaRss6) String() string { return "RdmaRss6(" + strconv.Itoa(int(x)) + ")" } +// - client_index - opaque cookie to identify the sender +// - host_if - Linux netdev interface name +// - name - new rdma interface name +// - rxq_num - number of receive queues (optional) +// - rxq_size - receive queue size (optional) +// - txq_size - transmit queue size (optional) +// - mode - operation mode (optional) +// // RdmaCreate defines message 'rdma_create'. // Deprecated: 21.01 type RdmaCreate struct { @@ -182,7 +189,12 @@ func (m *RdmaCreate) Unmarshal(b []byte) error { return nil } +// - context - sender context, to match reply w/ request +// - retval - return value for request +// - sw_if_index - software index for the new rdma interface +// // RdmaCreateReply defines message 'rdma_create_reply'. +// Deprecated: the message will be removed in the future versions type RdmaCreateReply 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"` @@ -219,6 +231,16 @@ func (m *RdmaCreateReply) Unmarshal(b []byte) error { return nil } +// - client_index - opaque cookie to identify the sender +// - host_if - Linux netdev interface name +// - name - new rdma interface name +// - rxq_num - number of receive queues (optional) +// - rxq_size - receive queue size (optional) +// - txq_size - transmit queue size (optional) +// - mode - operation mode (optional) +// - no_multi_seg (optional) - disable chained buffer RX +// - max_pktlen (optional) - maximal RX packet size. +// // RdmaCreateV2 defines message 'rdma_create_v2'. // Deprecated: the message will be removed in the future versions type RdmaCreateV2 struct { @@ -281,7 +303,12 @@ func (m *RdmaCreateV2) Unmarshal(b []byte) error { return nil } +// - context - sender context, to match reply w/ request +// - retval - return value for request +// - sw_if_index - software index for the new rdma interface +// // RdmaCreateV2Reply defines message 'rdma_create_v2_reply'. +// Deprecated: the message will be removed in the future versions type RdmaCreateV2Reply 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"` @@ -318,6 +345,18 @@ func (m *RdmaCreateV2Reply) Unmarshal(b []byte) error { return nil } +// - client_index - opaque cookie to identify the sender +// - host_if - Linux netdev interface name +// - name - new rdma interface name +// - rxq_num - number of receive queues (optional) +// - rxq_size - receive queue size (optional) +// - txq_size - transmit queue size (optional) +// - mode - operation mode (optional) +// - no_multi_seg (optional) - disable chained buffer RX +// - max_pktlen (optional) - maximal RX packet size. +// - rss4 (optional) - IPv4 RSS +// - rss6 (optional) - IPv6 RSS +// // RdmaCreateV3 defines message 'rdma_create_v3'. type RdmaCreateV3 struct { HostIf string `binapi:"string[64],name=host_if" json:"host_if,omitempty"` @@ -387,6 +426,9 @@ func (m *RdmaCreateV3) Unmarshal(b []byte) error { return nil } +// - client_index - opaque cookie to identify the sender +// - sw_if_index - interface index +// // RdmaCreateV3Reply defines message 'rdma_create_v3_reply'. type RdmaCreateV3Reply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -424,6 +466,9 @@ func (m *RdmaCreateV3Reply) Unmarshal(b []byte) error { return nil } +// - client_index - opaque cookie to identify the sender +// - sw_if_index - interface index +// // RdmaDelete defines message 'rdma_delete'. type RdmaDelete struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/binapi/rdma/rdma_rpc.ba.go b/binapi/rdma/rdma_rpc.ba.go index 883c9062..77db494e 100644 --- a/binapi/rdma/rdma_rpc.ba.go +++ b/binapi/rdma/rdma_rpc.ba.go @@ -5,7 +5,7 @@ package rdma import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service rdma. diff --git a/binapi/session/session.ba.go b/binapi/session/session.ba.go index 4bf3a95d..e5923a54 100644 --- a/binapi/session/session.ba.go +++ b/binapi/session/session.ba.go @@ -1,24 +1,23 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/session.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/session.api.json // Package session contains generated bindings for API file session.api. // // Contents: -// -// 2 enums -// 28 messages +// - 2 enums +// - 26 messages package session import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -30,7 +29,7 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "session" APIVersion = "4.0.0" - VersionCrc = 0x72bfc653 + VersionCrc = 0x37cc4b71 ) // SessionRuleScope defines enum 'session_rule_scope'. @@ -99,6 +98,12 @@ func (x TransportProto) String() string { return "TransportProto(" + strconv.Itoa(int(x)) + ")" } +// Add certificate and key +// - engine - crypto engine +// - cert_len - cert length (comes first) +// - certkey_len - cert and key length +// - certkey - cert & key data (due to API limitation) +// // AppAddCertKeyPair defines message 'app_add_cert_key_pair'. type AppAddCertKeyPair struct { CertLen uint16 `binapi:"u16,name=cert_len" json:"cert_len,omitempty"` @@ -141,6 +146,10 @@ func (m *AppAddCertKeyPair) Unmarshal(b []byte) error { return nil } +// Add certificate and key +// - retval - return code for the request +// - index - index in certificate store +// // AppAddCertKeyPairReply defines message 'app_add_cert_key_pair_reply'. type AppAddCertKeyPairReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -178,6 +187,10 @@ func (m *AppAddCertKeyPairReply) Unmarshal(b []byte) error { return nil } +// Application attach to session layer +// - options - segment size, fifo sizes, etc. +// - namespace_id - string +// // AppAttach defines message 'app_attach'. type AppAttach struct { Options []uint64 `binapi:"u64[18],name=options" json:"options,omitempty"` @@ -224,6 +237,20 @@ func (m *AppAttach) Unmarshal(b []byte) error { return nil } +// Application attach reply +// - retval - return code for the request +// - app_mq - app message queue +// - vpp_ctrl_mq - vpp message queue for control events that should +// be handled in main thread, i.e., bind/connect +// - vpp_ctrl_mq_thread_index - thread index of the ctrl mq +// - app_index - index of the newly created app +// - n_fds - number of fds exchanged +// - fd_flags - set of flags that indicate which fds are to be expected +// over the socket (set only if socket transport available) +// - segment_size - size of first shm segment +// - segment_handle - handle for segment +// - segment_name - name of segment client needs to attach to +// // AppAttachReply defines message 'app_attach_reply'. type AppAttachReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -293,6 +320,9 @@ func (m *AppAttachReply) Unmarshal(b []byte) error { return nil } +// Delete certificate and key +// - index - index in certificate store +// // AppDelCertKeyPair defines message 'app_del_cert_key_pair'. type AppDelCertKeyPair struct { Index uint32 `binapi:"u32,name=index" json:"index,omitempty"` @@ -359,6 +389,18 @@ func (m *AppDelCertKeyPairReply) Unmarshal(b []byte) error { return nil } +// add/del application namespace +// +// client to vpp direction only +// - secret - secret shared between app and vpp +// - sw_if_index - local interface that "supports" namespace. Set to +// ~0 if no preference +// - ip4_fib_id - id of ip4 fib that "supports" the namespace. Ignored +// if sw_if_index set. +// - ip6_fib_id - id of ip6 fib that "supports" the namespace. Ignored +// if sw_if_index set. +// - namespace_id - namespace id +// // AppNamespaceAddDel defines message 'app_namespace_add_del'. // Deprecated: the message will be removed in the future versions type AppNamespaceAddDel struct { @@ -409,6 +451,10 @@ func (m *AppNamespaceAddDel) Unmarshal(b []byte) error { return nil } +// Reply for app namespace add/del +// - retval - return code +// - appns_index - app namespace index +// // AppNamespaceAddDelReply defines message 'app_namespace_add_del_reply'. // Deprecated: the message will be removed in the future versions type AppNamespaceAddDelReply struct { @@ -447,7 +493,21 @@ func (m *AppNamespaceAddDelReply) Unmarshal(b []byte) error { return nil } +// add/del application namespace +// +// client to vpp direction only +// - secret - secret shared between app and vpp +// - sw_if_index - local interface that "supports" namespace. Set to +// ~0 if no preference +// - ip4_fib_id - id of ip4 fib that "supports" the namespace. Ignored +// if sw_if_index set. +// - ip6_fib_id - id of ip6 fib that "supports" the namespace. Ignored +// if sw_if_index set. +// - namespace_id - namespace id +// - netns - linux net namespace +// // AppNamespaceAddDelV2 defines message 'app_namespace_add_del_v2'. +// Deprecated: the message will be removed in the future versions type AppNamespaceAddDelV2 struct { Secret uint64 `binapi:"u64,name=secret" json:"secret,omitempty"` SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` @@ -500,7 +560,12 @@ func (m *AppNamespaceAddDelV2) Unmarshal(b []byte) error { return nil } +// Reply for app namespace add/del +// - retval - return code +// - appns_index - app namespace index +// // AppNamespaceAddDelV2Reply defines message 'app_namespace_add_del_v2_reply'. +// Deprecated: the message will be removed in the future versions type AppNamespaceAddDelV2Reply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` AppnsIndex uint32 `binapi:"u32,name=appns_index" json:"appns_index,omitempty"` @@ -537,7 +602,22 @@ func (m *AppNamespaceAddDelV2Reply) Unmarshal(b []byte) error { return nil } +// add/del application namespace +// +// client to vpp direction only +// - secret - secret shared between app and vpp +// - sw_if_index - local interface that "supports" namespace. Set to +// ~0 if no preference +// - ip4_fib_id - id of ip4 fib that "supports" the namespace. Ignored +// if sw_if_index set. +// - ip6_fib_id - id of ip6 fib that "supports" the namespace. Ignored +// if sw_if_index set. +// - namespace_id - namespace id +// - netns - linux net namespace +// - sock_name - socket name (path, abstract socket name) +// // AppNamespaceAddDelV3 defines message 'app_namespace_add_del_v3'. +// Deprecated: the message will be removed in the future versions type AppNamespaceAddDelV3 struct { Secret uint64 `binapi:"u64,name=secret" json:"secret,omitempty"` IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -599,6 +679,7 @@ func (m *AppNamespaceAddDelV3) Unmarshal(b []byte) error { } // AppNamespaceAddDelV3Reply defines message 'app_namespace_add_del_v3_reply'. +// Deprecated: the message will be removed in the future versions type AppNamespaceAddDelV3Reply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` AppnsIndex uint32 `binapi:"u32,name=appns_index" json:"appns_index,omitempty"` @@ -635,6 +716,125 @@ func (m *AppNamespaceAddDelV3Reply) Unmarshal(b []byte) error { return nil } +// add/del application namespace +// +// client to vpp direction only +// - secret - secret shared between app and vpp +// - sw_if_index - local interface that "supports" namespace. Set to +// ~0 if no preference +// - ip4_fib_id - id of ip4 fib that "supports" the namespace. Ignored +// if sw_if_index set. +// - ip6_fib_id - id of ip6 fib that "supports" the namespace. Ignored +// if sw_if_index set. +// - namespace_id - namespace id +// - sock_name - socket name (path, abstract socket name) +// +// AppNamespaceAddDelV4 defines message 'app_namespace_add_del_v4'. +// Deprecated: the message will be removed in the future versions +type AppNamespaceAddDelV4 struct { + Secret uint64 `binapi:"u64,name=secret" json:"secret,omitempty"` + IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` + SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` + IP4FibID uint32 `binapi:"u32,name=ip4_fib_id" json:"ip4_fib_id,omitempty"` + IP6FibID uint32 `binapi:"u32,name=ip6_fib_id" json:"ip6_fib_id,omitempty"` + NamespaceID string `binapi:"string[64],name=namespace_id" json:"namespace_id,omitempty"` + SockName string `binapi:"string[],name=sock_name" json:"sock_name,omitempty"` +} + +func (m *AppNamespaceAddDelV4) Reset() { *m = AppNamespaceAddDelV4{} } +func (*AppNamespaceAddDelV4) GetMessageName() string { return "app_namespace_add_del_v4" } +func (*AppNamespaceAddDelV4) GetCrcString() string { return "42c1d824" } +func (*AppNamespaceAddDelV4) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *AppNamespaceAddDelV4) Size() (size int) { + if m == nil { + return 0 + } + size += 8 // m.Secret + size += 1 // m.IsAdd + size += 4 // m.SwIfIndex + size += 4 // m.IP4FibID + size += 4 // m.IP6FibID + size += 64 // m.NamespaceID + size += 4 + len(m.SockName) // m.SockName + return size +} +func (m *AppNamespaceAddDelV4) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeUint64(m.Secret) + buf.EncodeBool(m.IsAdd) + buf.EncodeUint32(uint32(m.SwIfIndex)) + buf.EncodeUint32(m.IP4FibID) + buf.EncodeUint32(m.IP6FibID) + buf.EncodeString(m.NamespaceID, 64) + buf.EncodeString(m.SockName, 0) + return buf.Bytes(), nil +} +func (m *AppNamespaceAddDelV4) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Secret = buf.DecodeUint64() + m.IsAdd = buf.DecodeBool() + m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32()) + m.IP4FibID = buf.DecodeUint32() + m.IP6FibID = buf.DecodeUint32() + m.NamespaceID = buf.DecodeString(64) + m.SockName = buf.DecodeString(0) + return nil +} + +// Reply for app namespace add/del +// - retval - return code +// - appns_index - app namespace index +// +// AppNamespaceAddDelV4Reply defines message 'app_namespace_add_del_v4_reply'. +type AppNamespaceAddDelV4Reply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` + AppnsIndex uint32 `binapi:"u32,name=appns_index" json:"appns_index,omitempty"` +} + +func (m *AppNamespaceAddDelV4Reply) Reset() { *m = AppNamespaceAddDelV4Reply{} } +func (*AppNamespaceAddDelV4Reply) GetMessageName() string { return "app_namespace_add_del_v4_reply" } +func (*AppNamespaceAddDelV4Reply) GetCrcString() string { return "85137120" } +func (*AppNamespaceAddDelV4Reply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *AppNamespaceAddDelV4Reply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + size += 4 // m.AppnsIndex + return size +} +func (m *AppNamespaceAddDelV4Reply) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeInt32(m.Retval) + buf.EncodeUint32(m.AppnsIndex) + return buf.Bytes(), nil +} +func (m *AppNamespaceAddDelV4Reply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + m.AppnsIndex = buf.DecodeUint32() + return nil +} + +// add/del application worker +// +// client to vpp direction only +// - app_index - application index +// - wrk_index - worker index, if a delete +// - is_add - set if an add +// // AppWorkerAddDel defines message 'app_worker_add_del'. type AppWorkerAddDel struct { AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"` @@ -676,6 +876,17 @@ func (m *AppWorkerAddDel) Unmarshal(b []byte) error { return nil } +// Reply for app worker add/del +// - retval - return code +// - wrk_index - worker index, if add +// - app_event_queue_address - vpp event queue address of new worker +// - n_fds - number of fds exchanged +// - fd_flags - set of flags that indicate which fds are to be expected +// over the socket (set only if socket transport available) +// - segment_handle - handle for segment +// - is_add - add if non zero, else delete +// - segment_name - name of segment client needs to attach to +// // AppWorkerAddDelReply defines message 'app_worker_add_del_reply'. type AppWorkerAddDelReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -737,6 +948,7 @@ func (m *AppWorkerAddDelReply) Unmarshal(b []byte) error { return nil } +// Application detach from session layer // ApplicationDetach defines message 'application_detach'. type ApplicationDetach struct{} @@ -797,160 +1009,11 @@ func (m *ApplicationDetachReply) Unmarshal(b []byte) error { return nil } -// ApplicationTLSCertAdd defines message 'application_tls_cert_add'. -// Deprecated: to be removed post 21.06 -type ApplicationTLSCertAdd struct { - AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"` - CertLen uint16 `binapi:"u16,name=cert_len" json:"-"` - Cert []byte `binapi:"u8[cert_len],name=cert" json:"cert,omitempty"` -} - -func (m *ApplicationTLSCertAdd) Reset() { *m = ApplicationTLSCertAdd{} } -func (*ApplicationTLSCertAdd) GetMessageName() string { return "application_tls_cert_add" } -func (*ApplicationTLSCertAdd) GetCrcString() string { return "3f5cfe45" } -func (*ApplicationTLSCertAdd) GetMessageType() api.MessageType { - return api.RequestMessage -} - -func (m *ApplicationTLSCertAdd) Size() (size int) { - if m == nil { - return 0 - } - size += 4 // m.AppIndex - size += 2 // m.CertLen - size += 1 * len(m.Cert) // m.Cert - return size -} -func (m *ApplicationTLSCertAdd) Marshal(b []byte) ([]byte, error) { - if b == nil { - b = make([]byte, m.Size()) - } - buf := codec.NewBuffer(b) - buf.EncodeUint32(m.AppIndex) - buf.EncodeUint16(uint16(len(m.Cert))) - buf.EncodeBytes(m.Cert, 0) - return buf.Bytes(), nil -} -func (m *ApplicationTLSCertAdd) Unmarshal(b []byte) error { - buf := codec.NewBuffer(b) - m.AppIndex = buf.DecodeUint32() - m.CertLen = buf.DecodeUint16() - m.Cert = make([]byte, m.CertLen) - copy(m.Cert, buf.DecodeBytes(len(m.Cert))) - return nil -} - -// ApplicationTLSCertAddReply defines message 'application_tls_cert_add_reply'. -// Deprecated: to be removed post 21.06 -type ApplicationTLSCertAddReply struct { - Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` -} - -func (m *ApplicationTLSCertAddReply) Reset() { *m = ApplicationTLSCertAddReply{} } -func (*ApplicationTLSCertAddReply) GetMessageName() string { return "application_tls_cert_add_reply" } -func (*ApplicationTLSCertAddReply) GetCrcString() string { return "e8d4e804" } -func (*ApplicationTLSCertAddReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} - -func (m *ApplicationTLSCertAddReply) Size() (size int) { - if m == nil { - return 0 - } - size += 4 // m.Retval - return size -} -func (m *ApplicationTLSCertAddReply) 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 *ApplicationTLSCertAddReply) Unmarshal(b []byte) error { - buf := codec.NewBuffer(b) - m.Retval = buf.DecodeInt32() - return nil -} - -// ApplicationTLSKeyAdd defines message 'application_tls_key_add'. -// Deprecated: to be removed post 21.06 -type ApplicationTLSKeyAdd struct { - AppIndex uint32 `binapi:"u32,name=app_index" json:"app_index,omitempty"` - KeyLen uint16 `binapi:"u16,name=key_len" json:"-"` - Key []byte `binapi:"u8[key_len],name=key" json:"key,omitempty"` -} - -func (m *ApplicationTLSKeyAdd) Reset() { *m = ApplicationTLSKeyAdd{} } -func (*ApplicationTLSKeyAdd) GetMessageName() string { return "application_tls_key_add" } -func (*ApplicationTLSKeyAdd) GetCrcString() string { return "5eaf70cd" } -func (*ApplicationTLSKeyAdd) GetMessageType() api.MessageType { - return api.RequestMessage -} - -func (m *ApplicationTLSKeyAdd) Size() (size int) { - if m == nil { - return 0 - } - size += 4 // m.AppIndex - size += 2 // m.KeyLen - size += 1 * len(m.Key) // m.Key - return size -} -func (m *ApplicationTLSKeyAdd) Marshal(b []byte) ([]byte, error) { - if b == nil { - b = make([]byte, m.Size()) - } - buf := codec.NewBuffer(b) - buf.EncodeUint32(m.AppIndex) - buf.EncodeUint16(uint16(len(m.Key))) - buf.EncodeBytes(m.Key, 0) - return buf.Bytes(), nil -} -func (m *ApplicationTLSKeyAdd) Unmarshal(b []byte) error { - buf := codec.NewBuffer(b) - m.AppIndex = buf.DecodeUint32() - m.KeyLen = buf.DecodeUint16() - m.Key = make([]byte, m.KeyLen) - copy(m.Key, buf.DecodeBytes(len(m.Key))) - return nil -} - -// ApplicationTLSKeyAddReply defines message 'application_tls_key_add_reply'. -// Deprecated: to be removed post 21.06 -type ApplicationTLSKeyAddReply struct { - Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` -} - -func (m *ApplicationTLSKeyAddReply) Reset() { *m = ApplicationTLSKeyAddReply{} } -func (*ApplicationTLSKeyAddReply) GetMessageName() string { return "application_tls_key_add_reply" } -func (*ApplicationTLSKeyAddReply) GetCrcString() string { return "e8d4e804" } -func (*ApplicationTLSKeyAddReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} - -func (m *ApplicationTLSKeyAddReply) Size() (size int) { - if m == nil { - return 0 - } - size += 4 // m.Retval - return size -} -func (m *ApplicationTLSKeyAddReply) 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 *ApplicationTLSKeyAddReply) Unmarshal(b []byte) error { - buf := codec.NewBuffer(b) - m.Retval = buf.DecodeInt32() - return nil -} - +// enable/disable session layer +// +// client to vpp direction only +// - is_enable - disable session layer if 0, enable otherwise +// // SessionEnableDisable defines message 'session_enable_disable'. type SessionEnableDisable struct { IsEnable bool `binapi:"bool,name=is_enable,default=true" json:"is_enable,omitempty"` @@ -1017,6 +1080,25 @@ func (m *SessionEnableDisableReply) Unmarshal(b []byte) error { return nil } +// add/del session rule +// +// client to vpp direction only +// - transport_proto - transport protocol +// - is_ip4 - flag to indicate if ip addresses are ip4 or 6 +// - lcl_ip - local ip +// - lcl_plen - local prefix length +// - rmt_ip - remote ip +// - rmt_ple - remote prefix length +// - lcl_port - local port +// - rmt_port - remote port +// - action_index - the only action defined now is forward to +// application with index action_index +// - is_add - flag to indicate if add or del +// - appns_index - application namespace where rule is to be applied to +// - scope - enum that indicates scope of the rule: global or local. +// If 0, default is global, 1 is global 2 is local, 3 is both +// - tag - tag +// // SessionRuleAddDel defines message 'session_rule_add_del'. type SessionRuleAddDel struct { TransportProto TransportProto `binapi:"transport_proto,name=transport_proto" json:"transport_proto,omitempty"` @@ -1131,6 +1213,22 @@ func (m *SessionRuleAddDelReply) Unmarshal(b []byte) error { return nil } +// Session rules details +// - transport_proto - transport protocol +// - is_ip4 - flag to indicate if ip addresses are ip4 or 6 +// - lcl_ip - local ip +// - lcl_plen - local prefix length +// - rmt_ip - remote ip +// - rmt_ple - remote prefix length +// - lcl_port - local port +// - rmt_port - remote port +// - action_index - the only action defined now is forward to +// application with index action_index +// - appns_index - application namespace where rule is to be applied to +// - scope - enum that indicates scope of the rule: global or local. +// If 0, default is global, 1 is global 2 is local, 3 is both +// - tag - tag +// // SessionRulesDetails defines message 'session_rules_details'. type SessionRulesDetails struct { TransportProto TransportProto `binapi:"transport_proto,name=transport_proto" json:"transport_proto,omitempty"` @@ -1208,6 +1306,7 @@ func (m *SessionRulesDetails) Unmarshal(b []byte) error { return nil } +// Dump session rules // SessionRulesDump defines message 'session_rules_dump'. type SessionRulesDump struct{} @@ -1235,6 +1334,11 @@ func (m *SessionRulesDump) Unmarshal(b []byte) error { return nil } +// enable/disable session layer socket api +// +// client to vpp direction only +// - is_enable - disable session layer if 0, enable otherwise +// // SessionSapiEnableDisable defines message 'session_sapi_enable_disable'. type SessionSapiEnableDisable struct { IsEnable bool `binapi:"bool,name=is_enable,default=true" json:"is_enable,omitempty"` @@ -1317,14 +1421,12 @@ func file_session_binapi_init() { api.RegisterMessage((*AppNamespaceAddDelV2Reply)(nil), "app_namespace_add_del_v2_reply_85137120") api.RegisterMessage((*AppNamespaceAddDelV3)(nil), "app_namespace_add_del_v3_8a7e40a1") api.RegisterMessage((*AppNamespaceAddDelV3Reply)(nil), "app_namespace_add_del_v3_reply_85137120") + api.RegisterMessage((*AppNamespaceAddDelV4)(nil), "app_namespace_add_del_v4_42c1d824") + api.RegisterMessage((*AppNamespaceAddDelV4Reply)(nil), "app_namespace_add_del_v4_reply_85137120") api.RegisterMessage((*AppWorkerAddDel)(nil), "app_worker_add_del_753253dc") api.RegisterMessage((*AppWorkerAddDelReply)(nil), "app_worker_add_del_reply_5735ffe7") api.RegisterMessage((*ApplicationDetach)(nil), "application_detach_51077d14") api.RegisterMessage((*ApplicationDetachReply)(nil), "application_detach_reply_e8d4e804") - api.RegisterMessage((*ApplicationTLSCertAdd)(nil), "application_tls_cert_add_3f5cfe45") - api.RegisterMessage((*ApplicationTLSCertAddReply)(nil), "application_tls_cert_add_reply_e8d4e804") - api.RegisterMessage((*ApplicationTLSKeyAdd)(nil), "application_tls_key_add_5eaf70cd") - api.RegisterMessage((*ApplicationTLSKeyAddReply)(nil), "application_tls_key_add_reply_e8d4e804") api.RegisterMessage((*SessionEnableDisable)(nil), "session_enable_disable_c264d7bf") api.RegisterMessage((*SessionEnableDisableReply)(nil), "session_enable_disable_reply_e8d4e804") api.RegisterMessage((*SessionRuleAddDel)(nil), "session_rule_add_del_82a90af5") @@ -1350,14 +1452,12 @@ func AllMessages() []api.Message { (*AppNamespaceAddDelV2Reply)(nil), (*AppNamespaceAddDelV3)(nil), (*AppNamespaceAddDelV3Reply)(nil), + (*AppNamespaceAddDelV4)(nil), + (*AppNamespaceAddDelV4Reply)(nil), (*AppWorkerAddDel)(nil), (*AppWorkerAddDelReply)(nil), (*ApplicationDetach)(nil), (*ApplicationDetachReply)(nil), - (*ApplicationTLSCertAdd)(nil), - (*ApplicationTLSCertAddReply)(nil), - (*ApplicationTLSKeyAdd)(nil), - (*ApplicationTLSKeyAddReply)(nil), (*SessionEnableDisable)(nil), (*SessionEnableDisableReply)(nil), (*SessionRuleAddDel)(nil), diff --git a/binapi/session/session_rpc.ba.go b/binapi/session/session_rpc.ba.go index be27e366..870f0f7f 100644 --- a/binapi/session/session_rpc.ba.go +++ b/binapi/session/session_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service session. @@ -19,10 +19,9 @@ type RPCService interface { AppNamespaceAddDel(ctx context.Context, in *AppNamespaceAddDel) (*AppNamespaceAddDelReply, error) AppNamespaceAddDelV2(ctx context.Context, in *AppNamespaceAddDelV2) (*AppNamespaceAddDelV2Reply, error) AppNamespaceAddDelV3(ctx context.Context, in *AppNamespaceAddDelV3) (*AppNamespaceAddDelV3Reply, error) + AppNamespaceAddDelV4(ctx context.Context, in *AppNamespaceAddDelV4) (*AppNamespaceAddDelV4Reply, error) AppWorkerAddDel(ctx context.Context, in *AppWorkerAddDel) (*AppWorkerAddDelReply, error) ApplicationDetach(ctx context.Context, in *ApplicationDetach) (*ApplicationDetachReply, error) - ApplicationTLSCertAdd(ctx context.Context, in *ApplicationTLSCertAdd) (*ApplicationTLSCertAddReply, error) - ApplicationTLSKeyAdd(ctx context.Context, in *ApplicationTLSKeyAdd) (*ApplicationTLSKeyAddReply, error) SessionEnableDisable(ctx context.Context, in *SessionEnableDisable) (*SessionEnableDisableReply, error) SessionRuleAddDel(ctx context.Context, in *SessionRuleAddDel) (*SessionRuleAddDelReply, error) SessionRulesDump(ctx context.Context, in *SessionRulesDump) (RPCService_SessionRulesDumpClient, error) @@ -91,8 +90,8 @@ func (c *serviceClient) AppNamespaceAddDelV3(ctx context.Context, in *AppNamespa return out, api.RetvalToVPPApiError(out.Retval) } -func (c *serviceClient) AppWorkerAddDel(ctx context.Context, in *AppWorkerAddDel) (*AppWorkerAddDelReply, error) { - out := new(AppWorkerAddDelReply) +func (c *serviceClient) AppNamespaceAddDelV4(ctx context.Context, in *AppNamespaceAddDelV4) (*AppNamespaceAddDelV4Reply, error) { + out := new(AppNamespaceAddDelV4Reply) err := c.conn.Invoke(ctx, in, out) if err != nil { return nil, err @@ -100,17 +99,8 @@ func (c *serviceClient) AppWorkerAddDel(ctx context.Context, in *AppWorkerAddDel return out, api.RetvalToVPPApiError(out.Retval) } -func (c *serviceClient) ApplicationDetach(ctx context.Context, in *ApplicationDetach) (*ApplicationDetachReply, error) { - out := new(ApplicationDetachReply) - err := c.conn.Invoke(ctx, in, out) - if err != nil { - return nil, err - } - return out, api.RetvalToVPPApiError(out.Retval) -} - -func (c *serviceClient) ApplicationTLSCertAdd(ctx context.Context, in *ApplicationTLSCertAdd) (*ApplicationTLSCertAddReply, error) { - out := new(ApplicationTLSCertAddReply) +func (c *serviceClient) AppWorkerAddDel(ctx context.Context, in *AppWorkerAddDel) (*AppWorkerAddDelReply, error) { + out := new(AppWorkerAddDelReply) err := c.conn.Invoke(ctx, in, out) if err != nil { return nil, err @@ -118,8 +108,8 @@ func (c *serviceClient) ApplicationTLSCertAdd(ctx context.Context, in *Applicati return out, api.RetvalToVPPApiError(out.Retval) } -func (c *serviceClient) ApplicationTLSKeyAdd(ctx context.Context, in *ApplicationTLSKeyAdd) (*ApplicationTLSKeyAddReply, error) { - out := new(ApplicationTLSKeyAddReply) +func (c *serviceClient) ApplicationDetach(ctx context.Context, in *ApplicationDetach) (*ApplicationDetachReply, error) { + out := new(ApplicationDetachReply) err := c.conn.Invoke(ctx, in, out) if err != nil { return nil, err diff --git a/binapi/span/span.ba.go b/binapi/span/span.ba.go index 852ecebc..8c864cd6 100644 --- a/binapi/span/span.ba.go +++ b/binapi/span/span.ba.go @@ -1,23 +1,22 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/span.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/span.api.json // Package span contains generated bindings for API file span.api. // // Contents: -// -// 1 enum -// 4 messages +// - 1 enum +// - 4 messages package span import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -65,6 +64,12 @@ func (x SpanState) String() string { return "SpanState(" + strconv.Itoa(int(x)) + ")" } +// Reply to SPAN dump request +// - sw_if_index_from - mirrored interface +// - sw_if_index_to - interface where the traffic is mirrored +// - state - 0 = disabled, 1 = rx enabled, 2 = tx enabled, 3 tx & rx enabled +// - is_l2 - 0 = mirrored at hw device level, 1 = mirrored at l2 +// // SwInterfaceSpanDetails defines message 'sw_interface_span_details'. type SwInterfaceSpanDetails struct { SwIfIndexFrom interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index_from" json:"sw_if_index_from,omitempty"` @@ -110,6 +115,9 @@ func (m *SwInterfaceSpanDetails) Unmarshal(b []byte) error { return nil } +// SPAN dump request +// - is_l2 - 0 = hw device level, 1 = L2 +// // SwInterfaceSpanDump defines message 'sw_interface_span_dump'. type SwInterfaceSpanDump struct { IsL2 bool `binapi:"bool,name=is_l2" json:"is_l2,omitempty"` @@ -143,6 +151,12 @@ func (m *SwInterfaceSpanDump) Unmarshal(b []byte) error { return nil } +// Enable/Disable span to mirror traffic from one interface to another +// - sw_if_index_from - interface to be mirrored +// - sw_if_index_to - interface where the traffic is mirrored +// - state - 0 = disabled, 1 = rx enabled, 2 = tx enabled, 3 tx & rx enabled +// - is_l2 - 0 = mirror at hw device level, 1 = mirror at L2 +// // SwInterfaceSpanEnableDisable defines message 'sw_interface_span_enable_disable'. type SwInterfaceSpanEnableDisable struct { SwIfIndexFrom interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index_from" json:"sw_if_index_from,omitempty"` diff --git a/binapi/span/span_rpc.ba.go b/binapi/span/span_rpc.ba.go index 545bfa7b..81a0970e 100644 --- a/binapi/span/span_rpc.ba.go +++ b/binapi/span/span_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service span. diff --git a/binapi/sr/sr.ba.go b/binapi/sr/sr.ba.go index 4bccb316..fb7fab92 100644 --- a/binapi/sr/sr.ba.go +++ b/binapi/sr/sr.ba.go @@ -1,23 +1,25 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/sr.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/sr.api.json // Package sr contains generated bindings for API file sr.api. // // Contents: -// -// 2 structs -// 24 messages +// - 1 enum +// - 2 structs +// - 30 messages package sr import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" + "strconv" + interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" sr_types "github.com/networkservicemesh/govpp/binapi/sr_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -28,10 +30,40 @@ const _ = api.GoVppAPIPackageIsVersion2 const ( APIFile = "sr" - APIVersion = "2.0.0" - VersionCrc = 0x66d92d1b + APIVersion = "2.1.0" + VersionCrc = 0x1fa846d0 +) + +// SrPolicyType defines enum 'sr_policy_type'. +type SrPolicyType uint8 + +const ( + SR_API_POLICY_TYPE_DEFAULT SrPolicyType = 0 + SR_API_POLICY_TYPE_SPRAY SrPolicyType = 1 + SR_API_POLICY_TYPE_TEF SrPolicyType = 2 +) + +var ( + SrPolicyType_name = map[uint8]string{ + 0: "SR_API_POLICY_TYPE_DEFAULT", + 1: "SR_API_POLICY_TYPE_SPRAY", + 2: "SR_API_POLICY_TYPE_TEF", + } + SrPolicyType_value = map[string]uint8{ + "SR_API_POLICY_TYPE_DEFAULT": 0, + "SR_API_POLICY_TYPE_SPRAY": 1, + "SR_API_POLICY_TYPE_TEF": 2, + } ) +func (x SrPolicyType) String() string { + s, ok := SrPolicyType_name[uint8(x)] + if ok { + return s + } + return "SrPolicyType(" + strconv.Itoa(int(x)) + ")" +} + // Srv6SidList defines type 'srv6_sid_list'. type Srv6SidList struct { NumSids uint8 `binapi:"u8,name=num_sids" json:"num_sids,omitempty"` @@ -47,6 +79,17 @@ type Srv6SidListWithSlIndex struct { Sids [16]ip_types.IP6Address `binapi:"ip6_address[16],name=sids" json:"sids,omitempty"` } +// IPv6 SR LocalSID add/del request +// - is_del Boolean of whether its a delete instruction +// - localsid_addr IPv6 address of the localsid +// - end_psp Boolean of whether decapsulation is allowed in this function +// - behavior Type of behavior (function) for this localsid +// - sw_if_index Only for L2/L3 xconnect. OIF. In VRF variant the +// fib_table. Default:0xffffffff +// - vlan_index Only for L2 xconnect. Outgoing VLAN tag. +// - fib_table FIB table in which we should install the localsid entry +// - nh_addr Next Hop IPv46 address. Only for L2/L3 xconnect. +// // SrLocalsidAddDel defines message 'sr_localsid_add_del'. type SrLocalsidAddDel struct { IsDel bool `binapi:"bool,name=is_del,default=false" json:"is_del,omitempty"` @@ -204,6 +247,7 @@ func (m *SrLocalsidsDetails) Unmarshal(b []byte) error { return nil } +// Dump the list of SR LocalSIDs // SrLocalsidsDump defines message 'sr_localsids_dump'. type SrLocalsidsDump struct{} @@ -310,6 +354,7 @@ func (m *SrLocalsidsWithPacketStatsDetails) Unmarshal(b []byte) error { return nil } +// Dump the list of SR LocalSIDs along with packet statistics // SrLocalsidsWithPacketStatsDump defines message 'sr_localsids_with_packet_stats_dump'. // InProgress: the message form may change in the future versions type SrLocalsidsWithPacketStatsDump struct{} @@ -421,7 +466,9 @@ func (m *SrPoliciesDetails) Unmarshal(b []byte) error { return nil } +// Dump the list of SR policies // SrPoliciesDump defines message 'sr_policies_dump'. +// Deprecated: the message will be removed in the future versions type SrPoliciesDump struct{} func (m *SrPoliciesDump) Reset() { *m = SrPoliciesDump{} } @@ -448,6 +495,120 @@ func (m *SrPoliciesDump) Unmarshal(b []byte) error { return nil } +// SrPoliciesV2Details defines message 'sr_policies_v2_details'. +// InProgress: the message form may change in the future versions +type SrPoliciesV2Details struct { + Bsid ip_types.IP6Address `binapi:"ip6_address,name=bsid" json:"bsid,omitempty"` + EncapSrc ip_types.IP6Address `binapi:"ip6_address,name=encap_src" json:"encap_src,omitempty"` + Type SrPolicyType `binapi:"sr_policy_type,name=type" json:"type,omitempty"` + IsEncap bool `binapi:"bool,name=is_encap" json:"is_encap,omitempty"` + FibTable uint32 `binapi:"u32,name=fib_table" json:"fib_table,omitempty"` + NumSidLists uint8 `binapi:"u8,name=num_sid_lists" json:"-"` + SidLists []Srv6SidList `binapi:"srv6_sid_list[num_sid_lists],name=sid_lists" json:"sid_lists,omitempty"` +} + +func (m *SrPoliciesV2Details) Reset() { *m = SrPoliciesV2Details{} } +func (*SrPoliciesV2Details) GetMessageName() string { return "sr_policies_v2_details" } +func (*SrPoliciesV2Details) GetCrcString() string { return "96dcb699" } +func (*SrPoliciesV2Details) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *SrPoliciesV2Details) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 16 // m.Bsid + size += 1 * 16 // m.EncapSrc + size += 1 // m.Type + size += 1 // m.IsEncap + size += 4 // m.FibTable + size += 1 // m.NumSidLists + for j1 := 0; j1 < len(m.SidLists); j1++ { + var s1 Srv6SidList + _ = s1 + if j1 < len(m.SidLists) { + s1 = m.SidLists[j1] + } + size += 1 // s1.NumSids + size += 4 // s1.Weight + for j2 := 0; j2 < 16; j2++ { + size += 1 * 16 // s1.Sids[j2] + } + } + return size +} +func (m *SrPoliciesV2Details) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.Bsid[:], 16) + buf.EncodeBytes(m.EncapSrc[:], 16) + buf.EncodeUint8(uint8(m.Type)) + buf.EncodeBool(m.IsEncap) + buf.EncodeUint32(m.FibTable) + buf.EncodeUint8(uint8(len(m.SidLists))) + for j0 := 0; j0 < len(m.SidLists); j0++ { + var v0 Srv6SidList // SidLists + if j0 < len(m.SidLists) { + v0 = m.SidLists[j0] + } + buf.EncodeUint8(v0.NumSids) + buf.EncodeUint32(v0.Weight) + for j1 := 0; j1 < 16; j1++ { + buf.EncodeBytes(v0.Sids[j1][:], 16) + } + } + return buf.Bytes(), nil +} +func (m *SrPoliciesV2Details) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.Bsid[:], buf.DecodeBytes(16)) + copy(m.EncapSrc[:], buf.DecodeBytes(16)) + m.Type = SrPolicyType(buf.DecodeUint8()) + m.IsEncap = buf.DecodeBool() + m.FibTable = buf.DecodeUint32() + m.NumSidLists = buf.DecodeUint8() + m.SidLists = make([]Srv6SidList, m.NumSidLists) + for j0 := 0; j0 < len(m.SidLists); j0++ { + m.SidLists[j0].NumSids = buf.DecodeUint8() + m.SidLists[j0].Weight = buf.DecodeUint32() + for j1 := 0; j1 < 16; j1++ { + copy(m.SidLists[j0].Sids[j1][:], buf.DecodeBytes(16)) + } + } + return nil +} + +// Dump the list of SR policies v2 +// SrPoliciesV2Dump defines message 'sr_policies_v2_dump'. +type SrPoliciesV2Dump struct{} + +func (m *SrPoliciesV2Dump) Reset() { *m = SrPoliciesV2Dump{} } +func (*SrPoliciesV2Dump) GetMessageName() string { return "sr_policies_v2_dump" } +func (*SrPoliciesV2Dump) GetCrcString() string { return "51077d14" } +func (*SrPoliciesV2Dump) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *SrPoliciesV2Dump) Size() (size int) { + if m == nil { + return 0 + } + return size +} +func (m *SrPoliciesV2Dump) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + return buf.Bytes(), nil +} +func (m *SrPoliciesV2Dump) Unmarshal(b []byte) error { + return nil +} + // SrPoliciesWithSlIndexDetails defines message 'sr_policies_with_sl_index_details'. // InProgress: the message form may change in the future versions type SrPoliciesWithSlIndexDetails struct { @@ -535,6 +696,7 @@ func (m *SrPoliciesWithSlIndexDetails) Unmarshal(b []byte) error { return nil } +// Dump the list of SR policies along with actual segment list index on VPP // SrPoliciesWithSlIndexDump defines message 'sr_policies_with_sl_index_dump'. // InProgress: the message form may change in the future versions type SrPoliciesWithSlIndexDump struct{} @@ -563,6 +725,14 @@ func (m *SrPoliciesWithSlIndexDump) Unmarshal(b []byte) error { return nil } +// IPv6 SR policy add +// - bsid is the bindingSID of the SR Policy +// - weight is the weight of the sid list. optional. +// - is_encap is the behavior of the SR policy. (0.SRH insert // 1.Encapsulation) +// - is_spray is the type of the SR policy. (0.Default // 1.Spray) +// - fib_table is the VRF where to install the FIB entry for the BSID +// - sids is a srv6_sid_list object +// // SrPolicyAdd defines message 'sr_policy_add'. type SrPolicyAdd struct { BsidAddr ip_types.IP6Address `binapi:"ip6_address,name=bsid_addr" json:"bsid_addr,omitempty"` @@ -661,6 +831,123 @@ func (m *SrPolicyAddReply) Unmarshal(b []byte) error { return nil } +// IPv6 SR policy add +// - bsid is the bindingSID of the SR Policy +// - weight is the weight of the sid list. optional. +// - is_encap is the behavior of the SR policy. (0.SRH insert // 1.Encapsulation) +// - type is the SR policy param. (0.Default // 1.Spray // 2.Tef) +// - fib_table is the VRF where to install the FIB entry for the BSID +// - sids is a srv6_sid_list object +// - encap_src is a encaps IPv6 source addr. optional. +// +// SrPolicyAddV2 defines message 'sr_policy_add_v2'. +// InProgress: the message form may change in the future versions +type SrPolicyAddV2 struct { + BsidAddr ip_types.IP6Address `binapi:"ip6_address,name=bsid_addr" json:"bsid_addr,omitempty"` + Weight uint32 `binapi:"u32,name=weight" json:"weight,omitempty"` + IsEncap bool `binapi:"bool,name=is_encap" json:"is_encap,omitempty"` + Type SrPolicyType `binapi:"sr_policy_type,name=type,default=0" json:"type,omitempty"` + FibTable uint32 `binapi:"u32,name=fib_table" json:"fib_table,omitempty"` + Sids Srv6SidList `binapi:"srv6_sid_list,name=sids" json:"sids,omitempty"` + EncapSrc ip_types.IP6Address `binapi:"ip6_address,name=encap_src" json:"encap_src,omitempty"` +} + +func (m *SrPolicyAddV2) Reset() { *m = SrPolicyAddV2{} } +func (*SrPolicyAddV2) GetMessageName() string { return "sr_policy_add_v2" } +func (*SrPolicyAddV2) GetCrcString() string { return "f6297f36" } +func (*SrPolicyAddV2) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *SrPolicyAddV2) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 16 // m.BsidAddr + size += 4 // m.Weight + size += 1 // m.IsEncap + size += 1 // m.Type + size += 4 // m.FibTable + size += 1 // m.Sids.NumSids + size += 4 // m.Sids.Weight + for j2 := 0; j2 < 16; j2++ { + size += 1 * 16 // m.Sids.Sids[j2] + } + size += 1 * 16 // m.EncapSrc + return size +} +func (m *SrPolicyAddV2) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.BsidAddr[:], 16) + buf.EncodeUint32(m.Weight) + buf.EncodeBool(m.IsEncap) + buf.EncodeUint8(uint8(m.Type)) + buf.EncodeUint32(m.FibTable) + buf.EncodeUint8(m.Sids.NumSids) + buf.EncodeUint32(m.Sids.Weight) + for j1 := 0; j1 < 16; j1++ { + buf.EncodeBytes(m.Sids.Sids[j1][:], 16) + } + buf.EncodeBytes(m.EncapSrc[:], 16) + return buf.Bytes(), nil +} +func (m *SrPolicyAddV2) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.BsidAddr[:], buf.DecodeBytes(16)) + m.Weight = buf.DecodeUint32() + m.IsEncap = buf.DecodeBool() + m.Type = SrPolicyType(buf.DecodeUint8()) + m.FibTable = buf.DecodeUint32() + m.Sids.NumSids = buf.DecodeUint8() + m.Sids.Weight = buf.DecodeUint32() + for j1 := 0; j1 < 16; j1++ { + copy(m.Sids.Sids[j1][:], buf.DecodeBytes(16)) + } + copy(m.EncapSrc[:], buf.DecodeBytes(16)) + return nil +} + +// SrPolicyAddV2Reply defines message 'sr_policy_add_v2_reply'. +// InProgress: the message form may change in the future versions +type SrPolicyAddV2Reply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *SrPolicyAddV2Reply) Reset() { *m = SrPolicyAddV2Reply{} } +func (*SrPolicyAddV2Reply) GetMessageName() string { return "sr_policy_add_v2_reply" } +func (*SrPolicyAddV2Reply) GetCrcString() string { return "e8d4e804" } +func (*SrPolicyAddV2Reply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *SrPolicyAddV2Reply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *SrPolicyAddV2Reply) 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 *SrPolicyAddV2Reply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// IPv6 SR policy deletion +// - bsid is the bindingSID of the SR Policy +// - index is the index of the SR policy +// // SrPolicyDel defines message 'sr_policy_del'. type SrPolicyDel struct { BsidAddr ip_types.IP6Address `binapi:"ip6_address,name=bsid_addr" json:"bsid_addr,omitempty"` @@ -731,6 +1018,15 @@ func (m *SrPolicyDelReply) Unmarshal(b []byte) error { return nil } +// IPv6 SR policy modification +// - bsid is the bindingSID of the SR Policy +// - sr_policy_index is the index of the SR policy +// - fib_table is the VRF where to install the FIB entry for the BSID +// - operation is the operation to perform (among the top ones) +// - sl_index is the index of the Segment List to modify/delete +// - weight is the weight of the sid list. optional. +// - sids is a srv6_sid_list object +// // SrPolicyMod defines message 'sr_policy_mod'. type SrPolicyMod struct { BsidAddr ip_types.IP6Address `binapi:"ip6_address,name=bsid_addr" json:"bsid_addr,omitempty"` @@ -833,6 +1129,127 @@ func (m *SrPolicyModReply) Unmarshal(b []byte) error { return nil } +// IPv6 SR policy modification +// - bsid is the bindingSID of the SR Policy +// - sr_policy_index is the index of the SR policy +// - fib_table is the VRF where to install the FIB entry for the BSID +// - operation is the operation to perform (among the top ones) +// - sl_index is the index of the Segment List to modify/delete +// - weight is the weight of the sid list. optional. +// - sids is a srv6_sid_list object +// - encap_src is a encaps IPv6 source addr. optional. +// +// SrPolicyModV2 defines message 'sr_policy_mod_v2'. +// InProgress: the message form may change in the future versions +type SrPolicyModV2 struct { + BsidAddr ip_types.IP6Address `binapi:"ip6_address,name=bsid_addr" json:"bsid_addr,omitempty"` + SrPolicyIndex uint32 `binapi:"u32,name=sr_policy_index" json:"sr_policy_index,omitempty"` + FibTable uint32 `binapi:"u32,name=fib_table" json:"fib_table,omitempty"` + Operation sr_types.SrPolicyOp `binapi:"sr_policy_op,name=operation" json:"operation,omitempty"` + SlIndex uint32 `binapi:"u32,name=sl_index" json:"sl_index,omitempty"` + Weight uint32 `binapi:"u32,name=weight" json:"weight,omitempty"` + Sids Srv6SidList `binapi:"srv6_sid_list,name=sids" json:"sids,omitempty"` + EncapSrc ip_types.IP6Address `binapi:"ip6_address,name=encap_src" json:"encap_src,omitempty"` +} + +func (m *SrPolicyModV2) Reset() { *m = SrPolicyModV2{} } +func (*SrPolicyModV2) GetMessageName() string { return "sr_policy_mod_v2" } +func (*SrPolicyModV2) GetCrcString() string { return "c0544823" } +func (*SrPolicyModV2) GetMessageType() api.MessageType { + return api.RequestMessage +} + +func (m *SrPolicyModV2) Size() (size int) { + if m == nil { + return 0 + } + size += 1 * 16 // m.BsidAddr + size += 4 // m.SrPolicyIndex + size += 4 // m.FibTable + size += 1 // m.Operation + size += 4 // m.SlIndex + size += 4 // m.Weight + size += 1 // m.Sids.NumSids + size += 4 // m.Sids.Weight + for j2 := 0; j2 < 16; j2++ { + size += 1 * 16 // m.Sids.Sids[j2] + } + size += 1 * 16 // m.EncapSrc + return size +} +func (m *SrPolicyModV2) Marshal(b []byte) ([]byte, error) { + if b == nil { + b = make([]byte, m.Size()) + } + buf := codec.NewBuffer(b) + buf.EncodeBytes(m.BsidAddr[:], 16) + buf.EncodeUint32(m.SrPolicyIndex) + buf.EncodeUint32(m.FibTable) + buf.EncodeUint8(uint8(m.Operation)) + buf.EncodeUint32(m.SlIndex) + buf.EncodeUint32(m.Weight) + buf.EncodeUint8(m.Sids.NumSids) + buf.EncodeUint32(m.Sids.Weight) + for j1 := 0; j1 < 16; j1++ { + buf.EncodeBytes(m.Sids.Sids[j1][:], 16) + } + buf.EncodeBytes(m.EncapSrc[:], 16) + return buf.Bytes(), nil +} +func (m *SrPolicyModV2) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + copy(m.BsidAddr[:], buf.DecodeBytes(16)) + m.SrPolicyIndex = buf.DecodeUint32() + m.FibTable = buf.DecodeUint32() + m.Operation = sr_types.SrPolicyOp(buf.DecodeUint8()) + m.SlIndex = buf.DecodeUint32() + m.Weight = buf.DecodeUint32() + m.Sids.NumSids = buf.DecodeUint8() + m.Sids.Weight = buf.DecodeUint32() + for j1 := 0; j1 < 16; j1++ { + copy(m.Sids.Sids[j1][:], buf.DecodeBytes(16)) + } + copy(m.EncapSrc[:], buf.DecodeBytes(16)) + return nil +} + +// SrPolicyModV2Reply defines message 'sr_policy_mod_v2_reply'. +// InProgress: the message form may change in the future versions +type SrPolicyModV2Reply struct { + Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` +} + +func (m *SrPolicyModV2Reply) Reset() { *m = SrPolicyModV2Reply{} } +func (*SrPolicyModV2Reply) GetMessageName() string { return "sr_policy_mod_v2_reply" } +func (*SrPolicyModV2Reply) GetCrcString() string { return "e8d4e804" } +func (*SrPolicyModV2Reply) GetMessageType() api.MessageType { + return api.ReplyMessage +} + +func (m *SrPolicyModV2Reply) Size() (size int) { + if m == nil { + return 0 + } + size += 4 // m.Retval + return size +} +func (m *SrPolicyModV2Reply) 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 *SrPolicyModV2Reply) Unmarshal(b []byte) error { + buf := codec.NewBuffer(b) + m.Retval = buf.DecodeInt32() + return nil +} + +// IPv6 SR Set SRv6 encapsulation hop-limit +// - hop_limit is the hop-limit value to set +// // SrSetEncapHopLimit defines message 'sr_set_encap_hop_limit'. type SrSetEncapHopLimit struct { HopLimit uint8 `binapi:"u8,name=hop_limit" json:"hop_limit,omitempty"` @@ -899,6 +1316,10 @@ func (m *SrSetEncapHopLimitReply) Unmarshal(b []byte) error { return nil } +// IPv6 SR Set SRv6 encapsulation source +// - bsid is the bindingSID of the SR Policy +// - index is the index of the SR policy +// // SrSetEncapSource defines message 'sr_set_encap_source'. type SrSetEncapSource struct { EncapsSource ip_types.IP6Address `binapi:"ip6_address,name=encaps_source" json:"encaps_source,omitempty"` @@ -965,6 +1386,16 @@ func (m *SrSetEncapSourceReply) Unmarshal(b []byte) error { return nil } +// IPv6 SR steering add/del +// - is_del +// - bsid is the bindingSID of the SR Policy (alt to sr_policy_index) +// - sr_policy is the index of the SR Policy (alt to bsid) +// - table_id is the VRF where to install the FIB entry for the BSID +// - prefix is the IPv4/v6 address for L3 traffic type +// - mask_width is the mask for L3 traffic type +// - sw_if_index is the incoming interface for L2 traffic +// - traffic_type describes the type of traffic +// // SrSteeringAddDel defines message 'sr_steering_add_del'. type SrSteeringAddDel struct { IsDel bool `binapi:"bool,name=is_del,default=false" json:"is_del,omitempty"` @@ -1116,6 +1547,7 @@ func (m *SrSteeringPolDetails) Unmarshal(b []byte) error { return nil } +// Dump the steering policies // SrSteeringPolDump defines message 'sr_steering_pol_dump'. type SrSteeringPolDump struct{} @@ -1153,14 +1585,20 @@ func file_sr_binapi_init() { api.RegisterMessage((*SrLocalsidsWithPacketStatsDump)(nil), "sr_localsids_with_packet_stats_dump_51077d14") api.RegisterMessage((*SrPoliciesDetails)(nil), "sr_policies_details_db6ff2a1") api.RegisterMessage((*SrPoliciesDump)(nil), "sr_policies_dump_51077d14") + api.RegisterMessage((*SrPoliciesV2Details)(nil), "sr_policies_v2_details_96dcb699") + api.RegisterMessage((*SrPoliciesV2Dump)(nil), "sr_policies_v2_dump_51077d14") api.RegisterMessage((*SrPoliciesWithSlIndexDetails)(nil), "sr_policies_with_sl_index_details_ca2e9bc8") api.RegisterMessage((*SrPoliciesWithSlIndexDump)(nil), "sr_policies_with_sl_index_dump_51077d14") api.RegisterMessage((*SrPolicyAdd)(nil), "sr_policy_add_44ac92e8") api.RegisterMessage((*SrPolicyAddReply)(nil), "sr_policy_add_reply_e8d4e804") + api.RegisterMessage((*SrPolicyAddV2)(nil), "sr_policy_add_v2_f6297f36") + api.RegisterMessage((*SrPolicyAddV2Reply)(nil), "sr_policy_add_v2_reply_e8d4e804") api.RegisterMessage((*SrPolicyDel)(nil), "sr_policy_del_cb4d48d5") api.RegisterMessage((*SrPolicyDelReply)(nil), "sr_policy_del_reply_e8d4e804") api.RegisterMessage((*SrPolicyMod)(nil), "sr_policy_mod_b97bb56e") api.RegisterMessage((*SrPolicyModReply)(nil), "sr_policy_mod_reply_e8d4e804") + api.RegisterMessage((*SrPolicyModV2)(nil), "sr_policy_mod_v2_c0544823") + api.RegisterMessage((*SrPolicyModV2Reply)(nil), "sr_policy_mod_v2_reply_e8d4e804") api.RegisterMessage((*SrSetEncapHopLimit)(nil), "sr_set_encap_hop_limit_aa75d7d0") api.RegisterMessage((*SrSetEncapHopLimitReply)(nil), "sr_set_encap_hop_limit_reply_e8d4e804") api.RegisterMessage((*SrSetEncapSource)(nil), "sr_set_encap_source_d3bad5e1") @@ -1182,14 +1620,20 @@ func AllMessages() []api.Message { (*SrLocalsidsWithPacketStatsDump)(nil), (*SrPoliciesDetails)(nil), (*SrPoliciesDump)(nil), + (*SrPoliciesV2Details)(nil), + (*SrPoliciesV2Dump)(nil), (*SrPoliciesWithSlIndexDetails)(nil), (*SrPoliciesWithSlIndexDump)(nil), (*SrPolicyAdd)(nil), (*SrPolicyAddReply)(nil), + (*SrPolicyAddV2)(nil), + (*SrPolicyAddV2Reply)(nil), (*SrPolicyDel)(nil), (*SrPolicyDelReply)(nil), (*SrPolicyMod)(nil), (*SrPolicyModReply)(nil), + (*SrPolicyModV2)(nil), + (*SrPolicyModV2Reply)(nil), (*SrSetEncapHopLimit)(nil), (*SrSetEncapHopLimitReply)(nil), (*SrSetEncapSource)(nil), diff --git a/binapi/sr/sr_rpc.ba.go b/binapi/sr/sr_rpc.ba.go index d222f494..a0027fe0 100644 --- a/binapi/sr/sr_rpc.ba.go +++ b/binapi/sr/sr_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service sr. @@ -17,10 +17,13 @@ type RPCService interface { SrLocalsidsDump(ctx context.Context, in *SrLocalsidsDump) (RPCService_SrLocalsidsDumpClient, error) SrLocalsidsWithPacketStatsDump(ctx context.Context, in *SrLocalsidsWithPacketStatsDump) (RPCService_SrLocalsidsWithPacketStatsDumpClient, error) SrPoliciesDump(ctx context.Context, in *SrPoliciesDump) (RPCService_SrPoliciesDumpClient, error) + SrPoliciesV2Dump(ctx context.Context, in *SrPoliciesV2Dump) (RPCService_SrPoliciesV2DumpClient, error) SrPoliciesWithSlIndexDump(ctx context.Context, in *SrPoliciesWithSlIndexDump) (RPCService_SrPoliciesWithSlIndexDumpClient, error) SrPolicyAdd(ctx context.Context, in *SrPolicyAdd) (*SrPolicyAddReply, error) + SrPolicyAddV2(ctx context.Context, in *SrPolicyAddV2) (*SrPolicyAddV2Reply, error) SrPolicyDel(ctx context.Context, in *SrPolicyDel) (*SrPolicyDelReply, error) SrPolicyMod(ctx context.Context, in *SrPolicyMod) (*SrPolicyModReply, error) + SrPolicyModV2(ctx context.Context, in *SrPolicyModV2) (*SrPolicyModV2Reply, error) SrSetEncapHopLimit(ctx context.Context, in *SrSetEncapHopLimit) (*SrSetEncapHopLimitReply, error) SrSetEncapSource(ctx context.Context, in *SrSetEncapSource) (*SrSetEncapSourceReply, error) SrSteeringAddDel(ctx context.Context, in *SrSteeringAddDel) (*SrSteeringAddDelReply, error) @@ -173,6 +176,49 @@ func (c *serviceClient_SrPoliciesDumpClient) Recv() (*SrPoliciesDetails, error) } } +func (c *serviceClient) SrPoliciesV2Dump(ctx context.Context, in *SrPoliciesV2Dump) (RPCService_SrPoliciesV2DumpClient, error) { + stream, err := c.conn.NewStream(ctx) + if err != nil { + return nil, err + } + x := &serviceClient_SrPoliciesV2DumpClient{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_SrPoliciesV2DumpClient interface { + Recv() (*SrPoliciesV2Details, error) + api.Stream +} + +type serviceClient_SrPoliciesV2DumpClient struct { + api.Stream +} + +func (c *serviceClient_SrPoliciesV2DumpClient) Recv() (*SrPoliciesV2Details, error) { + msg, err := c.Stream.RecvMsg() + if err != nil { + return nil, err + } + switch m := msg.(type) { + case *SrPoliciesV2Details: + return m, nil + 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) SrPoliciesWithSlIndexDump(ctx context.Context, in *SrPoliciesWithSlIndexDump) (RPCService_SrPoliciesWithSlIndexDumpClient, error) { stream, err := c.conn.NewStream(ctx) if err != nil { @@ -225,6 +271,15 @@ func (c *serviceClient) SrPolicyAdd(ctx context.Context, in *SrPolicyAdd) (*SrPo return out, api.RetvalToVPPApiError(out.Retval) } +func (c *serviceClient) SrPolicyAddV2(ctx context.Context, in *SrPolicyAddV2) (*SrPolicyAddV2Reply, error) { + out := new(SrPolicyAddV2Reply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + func (c *serviceClient) SrPolicyDel(ctx context.Context, in *SrPolicyDel) (*SrPolicyDelReply, error) { out := new(SrPolicyDelReply) err := c.conn.Invoke(ctx, in, out) @@ -243,6 +298,15 @@ func (c *serviceClient) SrPolicyMod(ctx context.Context, in *SrPolicyMod) (*SrPo return out, api.RetvalToVPPApiError(out.Retval) } +func (c *serviceClient) SrPolicyModV2(ctx context.Context, in *SrPolicyModV2) (*SrPolicyModV2Reply, error) { + out := new(SrPolicyModV2Reply) + err := c.conn.Invoke(ctx, in, out) + if err != nil { + return nil, err + } + return out, api.RetvalToVPPApiError(out.Retval) +} + func (c *serviceClient) SrSetEncapHopLimit(ctx context.Context, in *SrSetEncapHopLimit) (*SrSetEncapHopLimitReply, error) { out := new(SrSetEncapHopLimitReply) err := c.conn.Invoke(ctx, in, out) diff --git a/binapi/sr_mpls/sr_mpls.ba.go b/binapi/sr_mpls/sr_mpls.ba.go index 4f49c438..61cc9352 100644 --- a/binapi/sr_mpls/sr_mpls.ba.go +++ b/binapi/sr_mpls/sr_mpls.ba.go @@ -1,22 +1,21 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/sr_mpls.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/sr_mpls.api.json // Package sr_mpls contains generated bindings for API file sr_mpls.api. // // Contents: -// -// 10 messages +// - 10 messages package sr_mpls import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" _ "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" sr_types "github.com/networkservicemesh/govpp/binapi/sr_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -31,6 +30,12 @@ const ( VersionCrc = 0x156edb17 ) +// MPLS SR policy add +// - bsid - is the bindingSID of the SR Policy. MPLS label (20bit) +// - weight - is the weight of the sid list. optional. +// - is_spray - is the type of the SR policy. (0.Default // 1.Spray) +// - segments - vector of labels (20bit) composing the segment list +// // SrMplsPolicyAdd defines message 'sr_mpls_policy_add'. type SrMplsPolicyAdd struct { Bsid uint32 `binapi:"u32,name=bsid" json:"bsid,omitempty"` @@ -122,6 +127,11 @@ func (m *SrMplsPolicyAddReply) Unmarshal(b []byte) error { return nil } +// MPLS SR steering add/del +// - bsid is the bindingSID of the SR Policy +// - endpoint is the endpoint of the SR policy +// - color is the color of the sr policy +// // SrMplsPolicyAssignEndpointColor defines message 'sr_mpls_policy_assign_endpoint_color'. type SrMplsPolicyAssignEndpointColor struct { Bsid uint32 `binapi:"u32,name=bsid" json:"bsid,omitempty"` @@ -203,6 +213,9 @@ func (m *SrMplsPolicyAssignEndpointColorReply) Unmarshal(b []byte) error { return nil } +// MPLS SR policy deletion +// - bsid is the bindingSID of the SR Policy. MPLS label (20bit) +// // SrMplsPolicyDel defines message 'sr_mpls_policy_del'. type SrMplsPolicyDel struct { Bsid uint32 `binapi:"u32,name=bsid" json:"bsid,omitempty"` @@ -269,6 +282,16 @@ func (m *SrMplsPolicyDelReply) Unmarshal(b []byte) error { return nil } +// MPLS SR policy modification +// - bsid is the bindingSID of the SR Policy. MPLS label (20bit) +// - sr_policy_index is the index of the SR policy +// - fib_table is the VRF where to install the FIB entry for the BSID +// - operation is the operation to perform (among the top ones) +// - segments is a vector of MPLS labels composing the segment list +// - sl_index is the index of the Segment List to modify/delete +// - weight is the weight of the sid list. optional. +// - is_encap Mode. Encapsulation or SRH insertion. +// // SrMplsPolicyMod defines message 'sr_mpls_policy_mod'. type SrMplsPolicyMod struct { Bsid uint32 `binapi:"u32,name=bsid" json:"bsid,omitempty"` @@ -364,6 +387,17 @@ func (m *SrMplsPolicyModReply) Unmarshal(b []byte) error { return nil } +// MPLS SR steering add/del +// - is_del +// - bsid - is the bindingSID of the SR Policy (~0 is no bsid) +// - table_id - is the VRF where to install the FIB entry for the BSID +// - prefix - is the IPv4/v6 address for L3 traffic type. +// - mask_width - is the mask for L3 traffic type +// - next_hop - describes the next_hop (in case no BSID) +// - color - describes the color +// - co_bits - are the CO_bits of the steering policy +// - vpn_label - is an additonal last VPN label. (~0 is no label) +// // SrMplsSteeringAddDel defines message 'sr_mpls_steering_add_del'. type SrMplsSteeringAddDel struct { IsDel bool `binapi:"bool,name=is_del,default=false" json:"is_del,omitempty"` diff --git a/binapi/sr_mpls/sr_mpls_rpc.ba.go b/binapi/sr_mpls/sr_mpls_rpc.ba.go index 556d32ef..c4e18a28 100644 --- a/binapi/sr_mpls/sr_mpls_rpc.ba.go +++ b/binapi/sr_mpls/sr_mpls_rpc.ba.go @@ -5,7 +5,7 @@ package sr_mpls import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service sr_mpls. diff --git a/binapi/sr_pt/sr_pt.ba.go b/binapi/sr_pt/sr_pt.ba.go index 8e29f0a0..7f1f2aac 100644 --- a/binapi/sr_pt/sr_pt.ba.go +++ b/binapi/sr_pt/sr_pt.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/sr_pt.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/sr_pt.api.json // Package sr_pt contains generated bindings for API file sr_pt.api. // // Contents: -// -// 6 messages +// - 6 messages package sr_pt import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,6 +28,13 @@ const ( VersionCrc = 0x1fddedad ) +// SR PT iface add request +// - sw_if_index - index of the interface to add to SR PT +// - id - SR PT interface id +// - ingress_load - incoming interface load +// - egress_load - outgoing interface load +// - tts_template - truncated timestamp template to use +// // SrPtIfaceAdd defines message 'sr_pt_iface_add'. type SrPtIfaceAdd struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -111,6 +117,9 @@ func (m *SrPtIfaceAddReply) Unmarshal(b []byte) error { return nil } +// SR PT iface del request +// - sw_if_index - index of the interface to delete from SR PT +// // SrPtIfaceDel defines message 'sr_pt_iface_del'. type SrPtIfaceDel struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -226,6 +235,7 @@ func (m *SrPtIfaceDetails) Unmarshal(b []byte) error { return nil } +// SR PT iface dump request // SrPtIfaceDump defines message 'sr_pt_iface_dump'. type SrPtIfaceDump struct{} diff --git a/binapi/sr_pt/sr_pt_rpc.ba.go b/binapi/sr_pt/sr_pt_rpc.ba.go index f7041d54..118fa081 100644 --- a/binapi/sr_pt/sr_pt_rpc.ba.go +++ b/binapi/sr_pt/sr_pt_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service sr_pt. diff --git a/binapi/sr_types/sr_types.ba.go b/binapi/sr_types/sr_types.ba.go index 9e3ea104..9a1d08f5 100644 --- a/binapi/sr_types/sr_types.ba.go +++ b/binapi/sr_types/sr_types.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/sr_types.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/sr_types.api.json // Package sr_types contains generated bindings for API file sr_types.api. // // Contents: -// -// 3 enums +// - 3 enums package sr_types import ( "strconv" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // This is a compile-time assertion to ensure that this generated file @@ -23,6 +22,12 @@ import ( // GoVPP api package needs to be updated. const _ = api.GoVppAPIPackageIsVersion2 +const ( + APIFile = "sr_types" + APIVersion = "1.0.0" + VersionCrc = 0x7955bd50 +) + // SrBehavior defines enum 'sr_behavior'. type SrBehavior uint8 diff --git a/binapi/stn/stn.ba.go b/binapi/stn/stn.ba.go index 11d682e4..04da8016 100644 --- a/binapi/stn/stn.ba.go +++ b/binapi/stn/stn.ba.go @@ -1,21 +1,20 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/stn.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/stn.api.json // Package stn contains generated bindings for API file stn.api. // // Contents: -// -// 4 messages +// - 4 messages package stn import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -30,6 +29,11 @@ const ( VersionCrc = 0x9cfaef64 ) +// Add/del STN rules +// - ip_address - STN rule IP address +// - sw_if_index - Interface index +// - is_add - 1 if add, 0 if delete +// // StnAddDelRule defines message 'stn_add_del_rule'. type StnAddDelRule struct { IPAddress ip_types.Address `binapi:"address,name=ip_address" json:"ip_address,omitempty"` @@ -107,6 +111,11 @@ func (m *StnAddDelRuleReply) Unmarshal(b []byte) error { return nil } +// STN response to rules request +// - is_ip4 - 1 if address type is IPv4 +// - ip_address - IP address +// - sw_if_index - Interface index +// // StnRulesDetails defines message 'stn_rules_details'. type StnRulesDetails struct { IPAddress ip_types.Address `binapi:"address,name=ip_address" json:"ip_address,omitempty"` @@ -147,6 +156,7 @@ func (m *StnRulesDetails) Unmarshal(b []byte) error { return nil } +// Dump STN rules // StnRulesDump defines message 'stn_rules_dump'. type StnRulesDump struct{} diff --git a/binapi/stn/stn_rpc.ba.go b/binapi/stn/stn_rpc.ba.go index 49cf91f3..b4813a50 100644 --- a/binapi/stn/stn_rpc.ba.go +++ b/binapi/stn/stn_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service stn. diff --git a/binapi/svs/svs.ba.go b/binapi/svs/svs.ba.go index 7258adf2..bfdf27a3 100644 --- a/binapi/svs/svs.ba.go +++ b/binapi/svs/svs.ba.go @@ -1,21 +1,20 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/svs.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/svs.api.json // Package svs contains generated bindings for API file svs.api. // // Contents: -// -// 10 messages +// - 10 messages package svs import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -30,6 +29,11 @@ const ( VersionCrc = 0x816cf275 ) +// * @brief SVS table-id to interface mapping +// - - af - Address Family +// - - table_id - The SVS table (from svs_table_add_del) +// - - sw_if_index - Interface +// // SvsDetails defines message 'svs_details'. type SvsDetails struct { TableID uint32 `binapi:"u32,name=table_id" json:"table_id,omitempty"` @@ -71,6 +75,9 @@ func (m *SvsDetails) Unmarshal(b []byte) error { return nil } +// * @brief Dump the SVS table mappings of table_id to interface +// - To see the routes added to a given table use ip_fib_dump() +// // SvsDump defines message 'svs_dump'. type SvsDump struct{} @@ -98,6 +105,12 @@ func (m *SvsDump) Unmarshal(b []byte) error { return nil } +// * @brief Enable SVS on a given interface by using the given table to match +// - RX'd packets' source addresses +// - - af - Address Family +// - - table_id - The SVS table (from svs_table_add_del) +// - - sw_if_index - Interface +// // SvsEnableDisable defines message 'svs_enable_disable'. type SvsEnableDisable struct { IsEnable bool `binapi:"bool,name=is_enable" json:"is_enable,omitempty"` @@ -176,6 +189,9 @@ func (m *SvsEnableDisableReply) Unmarshal(b []byte) error { return nil } +// - brief Get the plugin version +// *- context - sender context, to match reply w/ request +// // SvsPluginGetVersion defines message 'svs_plugin_get_version'. type SvsPluginGetVersion struct{} @@ -203,6 +219,10 @@ func (m *SvsPluginGetVersion) Unmarshal(b []byte) error { return nil } +// * @brief Reply to get the plugin version +// - - major - Incremented every time a known breaking behavior change is introduced +// - - minor - Incremented with small changes, may be used to avoid buggy versions +// // SvsPluginGetVersionReply defines message 'svs_plugin_get_version_reply'. type SvsPluginGetVersionReply struct { Major uint32 `binapi:"u32,name=major" json:"major,omitempty"` @@ -240,6 +260,13 @@ func (m *SvsPluginGetVersionReply) Unmarshal(b []byte) error { return nil } +// * @brief Add a route into the source address matching table +// - - prefix - prefix +// - - table_id - The SVS table (from svs_table_add_del) +// - - source_table_id - This is the table ID that will be used for +// - the subsequent lookup of the packet. The V in SVS. +// - this table must exist (from e.g. ip_table_add_del) +// // SvsRouteAddDel defines message 'svs_route_add_del'. type SvsRouteAddDel struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -324,6 +351,12 @@ func (m *SvsRouteAddDelReply) Unmarshal(b []byte) error { return nil } +// * @brief Add a table in which to add routes that will match against source +// - addresses +// - - af - Address Family +// - - table_id - User provided ID for the table +// - - is_add - add or delete +// // SvsTableAddDel defines message 'svs_table_add_del'. type SvsTableAddDel struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` diff --git a/binapi/svs/svs_rpc.ba.go b/binapi/svs/svs_rpc.ba.go index 077bce34..89699c84 100644 --- a/binapi/svs/svs_rpc.ba.go +++ b/binapi/svs/svs_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service svs. diff --git a/binapi/syslog/syslog.ba.go b/binapi/syslog/syslog.ba.go index 71087e91..cf7c2750 100644 --- a/binapi/syslog/syslog.ba.go +++ b/binapi/syslog/syslog.ba.go @@ -1,23 +1,22 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/syslog.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/syslog.api.json // Package syslog contains generated bindings for API file syslog.api. // // Contents: -// -// 1 enum -// 8 messages +// - 1 enum +// - 8 messages package syslog import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -77,6 +76,7 @@ func (x SyslogSeverity) String() string { return "SyslogSeverity(" + strconv.Itoa(int(x)) + ")" } +// Get syslog filter // SyslogGetFilter defines message 'syslog_get_filter'. type SyslogGetFilter struct{} @@ -104,6 +104,10 @@ func (m *SyslogGetFilter) Unmarshal(b []byte) error { return nil } +// Get syslog filter reply +// - retval - return code for the request +// - severity - severity filter (specified severity and greater match) +// // SyslogGetFilterReply defines message 'syslog_get_filter_reply'. type SyslogGetFilterReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -141,6 +145,7 @@ func (m *SyslogGetFilterReply) Unmarshal(b []byte) error { return nil } +// Get syslog sender configuration // SyslogGetSender defines message 'syslog_get_sender'. type SyslogGetSender struct{} @@ -168,6 +173,14 @@ func (m *SyslogGetSender) Unmarshal(b []byte) error { return nil } +// Get syslog sender configuration reply +// - retval - return code for the request +// - src_address - IPv4 address of syslog sender (source) +// - collector_address - IPv4 address of syslog collector (destination) +// - collector_port - UDP port of syslog collector (destination) +// - vrf_id - VRF/FIB table ID +// - max_msg_size - maximum message length +// // SyslogGetSenderReply defines message 'syslog_get_sender_reply'. type SyslogGetSenderReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -221,6 +234,9 @@ func (m *SyslogGetSenderReply) Unmarshal(b []byte) error { return nil } +// Set syslog filter +// - severity - severity filter (specified severity and greater match) +// // SyslogSetFilter defines message 'syslog_set_filter'. type SyslogSetFilter struct { Severity SyslogSeverity `binapi:"syslog_severity,name=severity" json:"severity,omitempty"` @@ -287,6 +303,13 @@ func (m *SyslogSetFilterReply) Unmarshal(b []byte) error { return nil } +// Set syslog sender configuration +// - src_address - IPv4 address of syslog sender (source) +// - collector_address - IPv4 address of syslog collector (destination) +// - collector_port - UDP port of syslog collector (destination) Default: 514 +// - vrf_id - VRF/FIB table ID +// - max_msg_size - maximum message length. Default: 480 +// // SyslogSetSender defines message 'syslog_set_sender'. type SyslogSetSender struct { SrcAddress ip_types.IP4Address `binapi:"ip4_address,name=src_address" json:"src_address,omitempty"` diff --git a/binapi/syslog/syslog_rpc.ba.go b/binapi/syslog/syslog_rpc.ba.go index da005b35..c5aa1137 100644 --- a/binapi/syslog/syslog_rpc.ba.go +++ b/binapi/syslog/syslog_rpc.ba.go @@ -5,7 +5,7 @@ package syslog import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service syslog. diff --git a/binapi/tapv2/tapv2.ba.go b/binapi/tapv2/tapv2.ba.go index 1cc60cff..6102f72c 100644 --- a/binapi/tapv2/tapv2.ba.go +++ b/binapi/tapv2/tapv2.ba.go @@ -1,25 +1,24 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/tapv2.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/tapv2.api.json // Package tapv2 contains generated bindings for API file tapv2.api. // // Contents: -// -// 1 enum -// 8 messages +// - 1 enum +// - 8 messages package tapv2 import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ethernet_types "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -98,6 +97,21 @@ func (x TapFlags) String() string { return s } +// Reply for tap dump request +// - sw_if_index - software index of tap interface +// - id - interface id +// - tx_ring_sz - the number of entries of TX ring +// - rx_ring_sz - the number of entries of RX ring +// - host_mtu_size - host mtu size +// - host_mac_addr - mac address assigned to the host side of the interface +// - host_ip4_prefix - host IPv4 ip address +// - host_ip6_prefix - host IPv6 ip address +// - tap_flags - flags for the TAP interface creation +// - dev_name - Linux tap device name +// - host_if_name - host side interface name +// - host_namespace - host namespace the interface is attached into +// - host_bridge - host bridge the interface is attached into +// // SwInterfaceTapV2Details defines message 'sw_interface_tap_v2_details'. type SwInterfaceTapV2Details struct { SwIfIndex uint32 `binapi:"u32,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -185,6 +199,9 @@ func (m *SwInterfaceTapV2Details) Unmarshal(b []byte) error { return nil } +// Dump tap interfaces request +// - sw_if_index - filter by sw_if_index +// // SwInterfaceTapV2Dump defines message 'sw_interface_tap_v2_dump'. type SwInterfaceTapV2Dump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` @@ -218,7 +235,36 @@ func (m *SwInterfaceTapV2Dump) Unmarshal(b []byte) error { return nil } +// Initialize a new tap interface with the given parameters +// - id - interface id, 0xffffffff means auto +// - use_random_mac - let the system generate a unique mac address +// - mac_address - mac addr to assign to the interface if use_random not set +// - num_rx_queues - number of rx queues +// - tx_ring_sz - the number of entries of TX ring, optional, default is 256 entries, must be power of 2 +// - rx_ring_sz - the number of entries of RX ring, optional, default is 256 entries, must be power of 2 +// - host_mtu_set - host MTU should be set +// - host_mtu_size - host MTU size +// - host_mac_addr_set - host side interface mac address should be set +// - host_mac_addr - host side interface mac address +// - host_ip4_prefix_set - host IPv4 ip address should be set +// - host_ip4_prefix - host IPv4 ip address +// - host_ip6_prefix_set - host IPv6 ip address should be set +// - host_ip6_prefix - host IPv6 ip address +// - host_ip4_gw_set - host IPv4 default gateway should be set +// - host_ip4_gw - host IPv4 default gateway +// - host_ip6_gw_set - host IPv6 default gateway should be set +// - host_ip6_gw - host IPv6 default gateway +// - tap_flags - flags for the TAP interface creation +// - host_if_name_set - host side interface name should be set +// - host_if_name - host side interface name +// - host_namespace_set - host namespace should be set +// - host_namespace - host namespace to attach interface to +// - host_bridge_set - host bridge should be set +// - host_bridge - host bridge to attach interface to +// - tag - tag +// // TapCreateV2 defines message 'tap_create_v2'. +// Deprecated: the message will be removed in the future versions type TapCreateV2 struct { ID uint32 `binapi:"u32,name=id,default=4294967295" json:"id,omitempty"` UseRandomMac bool `binapi:"bool,name=use_random_mac,default=true" json:"use_random_mac,omitempty"` @@ -357,7 +403,12 @@ func (m *TapCreateV2) Unmarshal(b []byte) error { return nil } +// Reply for tap create reply +// - retval - return code +// - sw_if_index - software index allocated for the new tap interface +// // TapCreateV2Reply defines message 'tap_create_v2_reply'. +// Deprecated: the message will be removed in the future versions type TapCreateV2Reply 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"` @@ -394,6 +445,35 @@ func (m *TapCreateV2Reply) Unmarshal(b []byte) error { return nil } +// Initialize a new tap interface with the given parameters +// - id - interface id, 0xffffffff means auto +// - use_random_mac - let the system generate a unique mac address +// - mac_address - mac addr to assign to the interface if use_random not set +// - num_rx_queues - number of rx queues +// - num_tx_queues - number of tx queues +// - tx_ring_sz - the number of entries of TX ring, optional, default is 256 entries, must be power of 2 +// - rx_ring_sz - the number of entries of RX ring, optional, default is 256 entries, must be power of 2 +// - host_mtu_set - host MTU should be set +// - host_mtu_size - host MTU size +// - host_mac_addr_set - host side interface mac address should be set +// - host_mac_addr - host side interface mac address +// - host_ip4_prefix_set - host IPv4 ip address should be set +// - host_ip4_prefix - host IPv4 ip address +// - host_ip6_prefix_set - host IPv6 ip address should be set +// - host_ip6_prefix - host IPv6 ip address +// - host_ip4_gw_set - host IPv4 default gateway should be set +// - host_ip4_gw - host IPv4 default gateway +// - host_ip6_gw_set - host IPv6 default gateway should be set +// - host_ip6_gw - host IPv6 default gateway +// - tap_flags - flags for the TAP interface creation +// - host_if_name_set - host side interface name should be set +// - host_if_name - host side interface name +// - host_namespace_set - host namespace should be set +// - host_namespace - host namespace to attach interface to +// - host_bridge_set - host bridge should be set +// - host_bridge - host bridge to attach interface to +// - tag - tag +// // TapCreateV3 defines message 'tap_create_v3'. type TapCreateV3 struct { ID uint32 `binapi:"u32,name=id,default=4294967295" json:"id,omitempty"` @@ -537,6 +617,10 @@ func (m *TapCreateV3) Unmarshal(b []byte) error { return nil } +// Reply for tap create reply +// - retval - return code +// - sw_if_index - software index allocated for the new tap interface +// // TapCreateV3Reply defines message 'tap_create_v3_reply'. type TapCreateV3Reply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -574,6 +658,9 @@ func (m *TapCreateV3Reply) Unmarshal(b []byte) error { return nil } +// Delete tap interface +// - sw_if_index - interface index of existing tap interface +// // TapDeleteV2 defines message 'tap_delete_v2'. type TapDeleteV2 struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/binapi/tapv2/tapv2_rpc.ba.go b/binapi/tapv2/tapv2_rpc.ba.go index 4b7cf662..a9e705e9 100644 --- a/binapi/tapv2/tapv2_rpc.ba.go +++ b/binapi/tapv2/tapv2_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service tapv2. diff --git a/binapi/tcp/tcp.ba.go b/binapi/tcp/tcp.ba.go index a93e9c00..772f4f5c 100644 --- a/binapi/tcp/tcp.ba.go +++ b/binapi/tcp/tcp.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/tcp.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/tcp.api.json // Package tcp contains generated bindings for API file tcp.api. // // Contents: -// -// 2 messages +// - 2 messages package tcp import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,6 +28,20 @@ const ( VersionCrc = 0x93d07485 ) +// Configure TCP source addresses, for active-open TCP sessions +// +// TCP src/dst ports are 16 bits, with the low-order 1024 ports +// reserved. So, it's necessary to provide a considerable number of +// source IP addresses if one wishes to initiate a large number of +// connections. +// Each of those addresses needs to have a receive adjacency - +// either a /32 or a /128 - and vpp needs to answer (proxy) arps or +// neighbor discovery requests for the addresses. +// - is_ipv6 - 1 for ipv6, 0 for ipv4 +// - vrf_id - fib table / vrf id for local adjacencies +// - first_address - first address that TCP will use +// - last_address - last address that TCP will use +// // TCPConfigureSrcAddresses defines message 'tcp_configure_src_addresses'. type TCPConfigureSrcAddresses struct { VrfID uint32 `binapi:"u32,name=vrf_id" json:"vrf_id,omitempty"` diff --git a/binapi/tcp/tcp_rpc.ba.go b/binapi/tcp/tcp_rpc.ba.go index 2d045f7b..5a28d676 100644 --- a/binapi/tcp/tcp_rpc.ba.go +++ b/binapi/tcp/tcp_rpc.ba.go @@ -5,7 +5,7 @@ package tcp import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service tcp. diff --git a/binapi/teib/teib.ba.go b/binapi/teib/teib.ba.go index 034d8c3f..e8af3858 100644 --- a/binapi/teib/teib.ba.go +++ b/binapi/teib/teib.ba.go @@ -1,22 +1,21 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/teib.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/teib.api.json // Package teib contains generated bindings for API file teib.api. // // Contents: -// -// 1 struct -// 4 messages +// - 1 struct +// - 4 messages package teib import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -114,6 +113,9 @@ func (m *TeibDump) Unmarshal(b []byte) error { return nil } +// TEIB Entry +// - sw_if_index +// // TeibEntryAddDel defines message 'teib_entry_add_del'. type TeibEntryAddDel struct { IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"` diff --git a/binapi/teib/teib_rpc.ba.go b/binapi/teib/teib_rpc.ba.go index 4b539139..3afe9933 100644 --- a/binapi/teib/teib_rpc.ba.go +++ b/binapi/teib/teib_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service teib. diff --git a/binapi/tls_openssl/tls_openssl.ba.go b/binapi/tls_openssl/tls_openssl.ba.go index 12179c7a..3e8afa56 100644 --- a/binapi/tls_openssl/tls_openssl.ba.go +++ b/binapi/tls_openssl/tls_openssl.ba.go @@ -1,19 +1,18 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/tls_openssl.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/tls_openssl.api.json // Package tls_openssl contains generated bindings for API file tls_openssl.api. // // Contents: -// -// 2 messages +// - 2 messages package tls_openssl import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -28,6 +27,7 @@ const ( VersionCrc = 0x7386fbcd ) +// /* Define TLS OpenSSL binary API to control the feature // TLSOpensslSetEngine defines message 'tls_openssl_set_engine'. type TLSOpensslSetEngine struct { AsyncEnable uint32 `binapi:"u32,name=async_enable" json:"async_enable,omitempty"` diff --git a/binapi/tls_openssl/tls_openssl_rpc.ba.go b/binapi/tls_openssl/tls_openssl_rpc.ba.go index 57ef26de..b785a9bc 100644 --- a/binapi/tls_openssl/tls_openssl_rpc.ba.go +++ b/binapi/tls_openssl/tls_openssl_rpc.ba.go @@ -5,7 +5,7 @@ package tls_openssl import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service tls_openssl. diff --git a/binapi/trace/trace.ba.go b/binapi/trace/trace.ba.go index a93f2b96..261f681c 100644 --- a/binapi/trace/trace.ba.go +++ b/binapi/trace/trace.ba.go @@ -1,19 +1,18 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/trace.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/trace.api.json // Package trace contains generated bindings for API file trace.api. // // Contents: -// -// 6 messages +// - 6 messages package trace import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -28,6 +27,13 @@ const ( VersionCrc = 0x397cbf90 ) +// iOAM6 Trace - Set the iOAM6 trace profile +// - trace_type - Type of trace requested +// - num_elts - Number of trace elements to be inserted +// - node_id - Trace Node ID +// - trace_tsp- Timestamp resolution +// - app_data - Application specific opaque +// // TraceProfileAdd defines message 'trace_profile_add'. type TraceProfileAdd struct { TraceType uint8 `binapi:"u8,name=trace_type" json:"trace_type,omitempty"` @@ -110,6 +116,7 @@ func (m *TraceProfileAddReply) Unmarshal(b []byte) error { return nil } +// Delete trace Profile // TraceProfileDel defines message 'trace_profile_del'. type TraceProfileDel struct{} @@ -170,6 +177,7 @@ func (m *TraceProfileDelReply) Unmarshal(b []byte) error { return nil } +// Show trace Profile // TraceProfileShowConfig defines message 'trace_profile_show_config'. type TraceProfileShowConfig struct{} @@ -197,6 +205,14 @@ func (m *TraceProfileShowConfig) Unmarshal(b []byte) error { return nil } +// Show trace config response +// - retval - return value for request +// - trace_type - Type of trace requested +// - num_elts - Number of trace elements to be inserted +// - node_id - Trace Node ID +// - trace_tsp- Timestamp resolution +// - app_data - Application specific opaque +// // TraceProfileShowConfigReply defines message 'trace_profile_show_config_reply'. type TraceProfileShowConfigReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` diff --git a/binapi/trace/trace_rpc.ba.go b/binapi/trace/trace_rpc.ba.go index e3f1ecab..849729d7 100644 --- a/binapi/trace/trace_rpc.ba.go +++ b/binapi/trace/trace_rpc.ba.go @@ -5,7 +5,7 @@ package trace import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service trace. diff --git a/binapi/tunnel_types/tunnel_types.ba.go b/binapi/tunnel_types/tunnel_types.ba.go index cd55749e..604d54c9 100644 --- a/binapi/tunnel_types/tunnel_types.ba.go +++ b/binapi/tunnel_types/tunnel_types.ba.go @@ -1,23 +1,22 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/tunnel_types.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/tunnel_types.api.json // Package tunnel_types contains generated bindings for API file tunnel_types.api. // // Contents: -// -// 3 enums -// 1 struct +// - 3 enums +// - 1 struct package tunnel_types import ( "strconv" - api "git.fd.io/govpp.git/api" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" ) // This is a compile-time assertion to ensure that this generated file @@ -26,6 +25,12 @@ import ( // GoVPP api package needs to be updated. const _ = api.GoVppAPIPackageIsVersion2 +const ( + APIFile = "tunnel_types" + APIVersion = "1.0.1" + VersionCrc = 0x882f6758 +) + // TunnelEncapDecapFlags defines enum 'tunnel_encap_decap_flags'. type TunnelEncapDecapFlags uint8 diff --git a/binapi/udp/udp.ba.go b/binapi/udp/udp.ba.go index 0ca33d75..933c4974 100644 --- a/binapi/udp/udp.ba.go +++ b/binapi/udp/udp.ba.go @@ -1,24 +1,23 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/udp.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/udp.api.json // Package udp contains generated bindings for API file udp.api. // // Contents: -// -// 1 enum -// 2 structs -// 8 messages +// - 1 enum +// - 2 structs +// - 8 messages package udp import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -80,6 +79,10 @@ type UDPEncap struct { ID uint32 `binapi:"u32,name=id" json:"id,omitempty"` } +// * @brief Add/Del UDP decap +// - - is_add - add decap if non-zero, else delete +// - - udp_decap - UDP decap description +// // UDPDecapAddDel defines message 'udp_decap_add_del'. type UDPDecapAddDel struct { IsAdd bool `binapi:"bool,name=is_add" json:"is_add,omitempty"` @@ -156,6 +159,9 @@ func (m *UDPDecapAddDelReply) Unmarshal(b []byte) error { return nil } +// * @brief Add UDP encap +// - - udp_encap - UDP encap description +// // UDPEncapAdd defines message 'udp_encap_add'. type UDPEncapAdd struct { UDPEncap UDPEncap `binapi:"udp_encap,name=udp_encap" json:"udp_encap,omitempty"` @@ -210,6 +216,11 @@ func (m *UDPEncapAdd) Unmarshal(b []byte) error { return nil } +// * @brief Add UDP encap reply +// - - retval - success/failure return value +// - - id - The ID of the encap object that should be used on delete +// - and when reading stats from the stats segment. +// // UDPEncapAddReply defines message 'udp_encap_add_reply'. type UDPEncapAddReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -247,6 +258,9 @@ func (m *UDPEncapAddReply) Unmarshal(b []byte) error { return nil } +// * @brief Del UDP encap +// - - id - ID of the encap object the client chose during the add +// // UDPEncapDel defines message 'udp_encap_del'. type UDPEncapDel struct { ID uint32 `binapi:"u32,name=id" json:"id,omitempty"` @@ -313,6 +327,7 @@ func (m *UDPEncapDelReply) Unmarshal(b []byte) error { return nil } +// * @brief UDP encap details during dump // UDPEncapDetails defines message 'udp_encap_details'. type UDPEncapDetails struct { UDPEncap UDPEncap `binapi:"udp_encap,name=udp_encap" json:"udp_encap,omitempty"` @@ -367,6 +382,7 @@ func (m *UDPEncapDetails) Unmarshal(b []byte) error { return nil } +// * @brief dump UDP encaps // UDPEncapDump defines message 'udp_encap_dump'. type UDPEncapDump struct{} diff --git a/binapi/udp/udp_rpc.ba.go b/binapi/udp/udp_rpc.ba.go index 08bd7df6..b972fe59 100644 --- a/binapi/udp/udp_rpc.ba.go +++ b/binapi/udp/udp_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service udp. diff --git a/binapi/udp_ping/udp_ping.ba.go b/binapi/udp_ping/udp_ping.ba.go index 2fb16f60..82c0c0d5 100644 --- a/binapi/udp_ping/udp_ping.ba.go +++ b/binapi/udp_ping/udp_ping.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/udp_ping.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/udp_ping.api.json // Package udp_ping contains generated bindings for API file udp_ping.api. // // Contents: -// -// 4 messages +// - 4 messages package udp_ping import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,6 +28,17 @@ const ( VersionCrc = 0x16d961db ) +// UDP-Probe Add/Delete request +// - src_ip_address - Source ipv4/v6 address for the udp-ping flow +// - dst_ip_address - Destination ipv4/v6 address for the udp-ping flow +// - start_src_port - Starting source port of port range for udp-ping +// - end_src_port - End source port of port range for udp-ping +// - start_dst_port - Starting destination port of port range for udp-ping +// - end_dst_port - End destination port of port range for udp-ping +// - interval - Time interval in seconds at which udp-probe need to be sent +// - is_ipv4 - To determine whether IPv4 or IPv6 address is used +// - dis - TRUE is delete, FALSE if Add +// // UDPPingAddDel defines message 'udp_ping_add_del'. type UDPPingAddDel struct { SrcIPAddress ip_types.Address `binapi:"address,name=src_ip_address" json:"src_ip_address,omitempty"` @@ -138,6 +148,10 @@ func (m *UDPPingAddDelReply) Unmarshal(b []byte) error { return nil } +// Udp-probe export add/del request +// - retval - return value for request +// - enable - If TRUE then enable export else disable +// // UDPPingExport defines message 'udp_ping_export'. type UDPPingExport struct { Enable bool `binapi:"bool,name=enable" json:"enable,omitempty"` diff --git a/binapi/udp_ping/udp_ping_rpc.ba.go b/binapi/udp_ping/udp_ping_rpc.ba.go index 3b01ff79..03b61543 100644 --- a/binapi/udp_ping/udp_ping_rpc.ba.go +++ b/binapi/udp_ping/udp_ping_rpc.ba.go @@ -5,7 +5,7 @@ package udp_ping import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service udp_ping. diff --git a/binapi/urpf/urpf.ba.go b/binapi/urpf/urpf.ba.go index 5255f993..38075e9e 100644 --- a/binapi/urpf/urpf.ba.go +++ b/binapi/urpf/urpf.ba.go @@ -1,25 +1,24 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/urpf.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/urpf.api.json // Package urpf contains generated bindings for API file urpf.api. // // Contents: -// -// 1 enum -// 4 messages +// - 1 enum +// - 4 messages package urpf import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" _ "github.com/networkservicemesh/govpp/binapi/fib_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -64,6 +63,12 @@ func (x UrpfMode) String() string { return "UrpfMode(" + strconv.Itoa(int(x)) + ")" } +// * @brief Enable uRPF on a given interface in a given direction +// - - mode - Mode +// - - af - Address Family +// - - sw_if_index - Interface +// - - is_input - Direction. +// // UrpfUpdate defines message 'urpf_update'. type UrpfUpdate struct { IsInput bool `binapi:"bool,name=is_input,default=true" json:"is_input,omitempty"` @@ -142,6 +147,13 @@ func (m *UrpfUpdateReply) Unmarshal(b []byte) error { return nil } +// * @brief Enable uRPF on a given interface in a given direction +// - - mode - Mode +// - - af - Address Family +// - - sw_if_index - Interface +// - - is_input - Direction. +// - - table-id - Table ID +// // UrpfUpdateV2 defines message 'urpf_update_v2'. type UrpfUpdateV2 struct { IsInput bool `binapi:"bool,name=is_input,default=true" json:"is_input,omitempty"` diff --git a/binapi/urpf/urpf_rpc.ba.go b/binapi/urpf/urpf_rpc.ba.go index 0d61af21..889acd94 100644 --- a/binapi/urpf/urpf_rpc.ba.go +++ b/binapi/urpf/urpf_rpc.ba.go @@ -5,7 +5,7 @@ package urpf import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service urpf. diff --git a/binapi/vhost_user/vhost_user.ba.go b/binapi/vhost_user/vhost_user.ba.go index f19eda8c..a3d84468 100644 --- a/binapi/vhost_user/vhost_user.ba.go +++ b/binapi/vhost_user/vhost_user.ba.go @@ -1,22 +1,21 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/vhost_user.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/vhost_user.api.json // Package vhost_user contains generated bindings for API file vhost_user.api. // // Contents: -// -// 12 messages +// - 12 messages package vhost_user import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ethernet_types "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" virtio_types "github.com/networkservicemesh/govpp/binapi/virtio_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -31,6 +30,16 @@ const ( VersionCrc = 0xd49ae8cd ) +// vhost-user interface create request +// - is_server - our side is socket server +// - sock_filename - unix socket filename, used to speak with frontend +// - use_custom_mac - enable or disable the use of the provided hardware address +// - disable_mrg_rxbuf - disable the use of merge receive buffers +// - disable_indirect_desc - disable the use of indirect descriptors which driver can use +// - enable_gso - enable gso support (default 0) +// - enable_packed - enable packed ring support (default 0) +// - mac_address - hardware address to use if 'use_custom_mac' is set +// // CreateVhostUserIf defines message 'create_vhost_user_if'. // Deprecated: the message will be removed in the future versions type CreateVhostUserIf struct { @@ -105,6 +114,10 @@ func (m *CreateVhostUserIf) Unmarshal(b []byte) error { return nil } +// vhost-user interface create response +// - retval - return code for the request +// - sw_if_index - interface the operation is applied to +// // CreateVhostUserIfReply defines message 'create_vhost_user_if_reply'. // Deprecated: the message will be removed in the future versions type CreateVhostUserIfReply struct { @@ -143,6 +156,19 @@ func (m *CreateVhostUserIfReply) Unmarshal(b []byte) error { return nil } +// vhost-user interface create request +// - is_server - our side is socket server +// - sock_filename - unix socket filename, used to speak with frontend +// - use_custom_mac - enable or disable the use of the provided hardware address +// - disable_mrg_rxbuf - disable the use of merge receive buffers +// - disable_indirect_desc - disable the use of indirect descriptors which driver can use +// - enable_gso - enable gso support (default 0) +// - enable_packed - enable packed ring support (default 0) +// - enable_event_idx - enable event_idx support (default 0) +// - mac_address - hardware address to use if 'use_custom_mac' is set +// - renumber - if true, use custom_dev_instance is valid +// - custom_dev_instance - custom device instance number +// // CreateVhostUserIfV2 defines message 'create_vhost_user_if_v2'. type CreateVhostUserIfV2 struct { IsServer bool `binapi:"bool,name=is_server" json:"is_server,omitempty"` @@ -220,6 +246,10 @@ func (m *CreateVhostUserIfV2) Unmarshal(b []byte) error { return nil } +// vhost-user interface create response +// - retval - return code for the request +// - sw_if_index - interface the operation is applied to +// // CreateVhostUserIfV2Reply defines message 'create_vhost_user_if_v2_reply'. type CreateVhostUserIfV2Reply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -257,6 +287,7 @@ func (m *CreateVhostUserIfV2Reply) Unmarshal(b []byte) error { return nil } +// vhost-user interface delete request // DeleteVhostUserIf defines message 'delete_vhost_user_if'. type DeleteVhostUserIf struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -323,6 +354,12 @@ func (m *DeleteVhostUserIfReply) Unmarshal(b []byte) error { return nil } +// vhost-user interface modify request +// - is_server - our side is socket server +// - sock_filename - unix socket filename, used to speak with frontend +// - enable_gso - enable gso support (default 0) +// - enable_packed - enable packed ring support (default 0) +// // ModifyVhostUserIf defines message 'modify_vhost_user_if'. // Deprecated: the message will be removed in the future versions type ModifyVhostUserIf struct { @@ -415,6 +452,15 @@ func (m *ModifyVhostUserIfReply) Unmarshal(b []byte) error { return nil } +// vhost-user interface modify request +// - is_server - our side is socket server +// - sock_filename - unix socket filename, used to speak with frontend +// - enable_gso - enable gso support (default 0) +// - enable_packed - enable packed ring support (default 0) +// - enable_event_idx - enable event idx support (default 0) +// - renumber - if true, use custom_dev_instance is valid +// - custom_dev_instance - custom device instance number +// // ModifyVhostUserIfV2 defines message 'modify_vhost_user_if_v2'. type ModifyVhostUserIfV2 struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -509,6 +555,17 @@ func (m *ModifyVhostUserIfV2Reply) Unmarshal(b []byte) error { return nil } +// Vhost-user interface details structure (fix this) +// - sw_if_index - index of the interface +// - interface_name - name of interface +// - virtio_net_hdr_sz - net header size +// - features_first_32 - interface features, first 32 bits +// - features_last_32 - interface features, last 32 bits +// - is_server - vhost-user server socket +// - sock_filename - socket filename +// - num_regions - number of used memory regions +// - sock_errno - socket errno +// // SwInterfaceVhostUserDetails defines message 'sw_interface_vhost_user_details'. type SwInterfaceVhostUserDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -574,6 +631,9 @@ func (m *SwInterfaceVhostUserDetails) Unmarshal(b []byte) error { return nil } +// Vhost-user interface dump request +// - sw_if_index - filter by sw_if_index +// // SwInterfaceVhostUserDump defines message 'sw_interface_vhost_user_dump'. type SwInterfaceVhostUserDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` diff --git a/binapi/vhost_user/vhost_user_rpc.ba.go b/binapi/vhost_user/vhost_user_rpc.ba.go index 26306bbe..27d2daf0 100644 --- a/binapi/vhost_user/vhost_user_rpc.ba.go +++ b/binapi/vhost_user/vhost_user_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service vhost_user. diff --git a/binapi/virtio/virtio.ba.go b/binapi/virtio/virtio.ba.go index a5fd660c..6c782e06 100644 --- a/binapi/virtio/virtio.ba.go +++ b/binapi/virtio/virtio.ba.go @@ -1,25 +1,24 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/virtio.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/virtio.api.json // Package virtio contains generated bindings for API file virtio.api. // // Contents: -// -// 1 enum -// 8 messages +// - 1 enum +// - 8 messages package virtio import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ethernet_types "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" pci_types "github.com/networkservicemesh/govpp/binapi/pci_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -92,6 +91,14 @@ func (x VirtioFlags) String() string { return s } +// Reply for virtio pci interface dump request +// - sw_if_index - software index of virtio pci interface +// - pci_addr - pci address +// - mac_addr - native virtio device mac address +// - tx_ring_sz - the number of entries of TX ring +// - rx_ring_sz - the number of entries of RX ring +// - features - the virtio features which driver have negotiated with device +// // SwInterfaceVirtioPciDetails defines message 'sw_interface_virtio_pci_details'. type SwInterfaceVirtioPciDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -154,6 +161,7 @@ func (m *SwInterfaceVirtioPciDetails) Unmarshal(b []byte) error { return nil } +// Dump virtio pci interfaces request // SwInterfaceVirtioPciDump defines message 'sw_interface_virtio_pci_dump'. type SwInterfaceVirtioPciDump struct{} @@ -181,6 +189,14 @@ func (m *SwInterfaceVirtioPciDump) Unmarshal(b []byte) error { return nil } +// Initialize a new virtio pci interface with the given parameters +// - pci_addr - pci address +// - use_random_mac - let the system generate a unique mac address +// - mac_address - mac addr to assign to the interface if use_random not set +// - gso_enabled - enable gso feature if available, 1 to enable +// - checksum_offload_enabled - enable checksum feature if available, 1 to enable +// - features - the virtio features which driver should negotiate with device +// // VirtioPciCreate defines message 'virtio_pci_create'. // Deprecated: the message will be removed in the future versions type VirtioPciCreate struct { @@ -244,6 +260,10 @@ func (m *VirtioPciCreate) Unmarshal(b []byte) error { return nil } +// Reply for virtio pci create reply +// - retval - return code +// - sw_if_index - software index allocated for the new virtio pci interface +// // VirtioPciCreateReply defines message 'virtio_pci_create_reply'. // Deprecated: the message will be removed in the future versions type VirtioPciCreateReply struct { @@ -282,6 +302,13 @@ func (m *VirtioPciCreateReply) Unmarshal(b []byte) error { return nil } +// Initialize a new virtio pci interface with the given parameters +// - pci_addr - pci address +// - use_random_mac - let the system generate a unique mac address +// - mac_address - mac addr to assign to the interface if use_random not set +// - virtio_flags - feature flags to enable +// - features - the virtio features which driver should negotiate with device +// // VirtioPciCreateV2 defines message 'virtio_pci_create_v2'. type VirtioPciCreateV2 struct { PciAddr pci_types.PciAddress `binapi:"pci_address,name=pci_addr" json:"pci_addr,omitempty"` @@ -340,6 +367,10 @@ func (m *VirtioPciCreateV2) Unmarshal(b []byte) error { return nil } +// Reply for virtio pci create reply +// - retval - return code +// - sw_if_index - software index allocated for the new virtio pci interface +// // VirtioPciCreateV2Reply defines message 'virtio_pci_create_v2_reply'. type VirtioPciCreateV2Reply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -377,6 +408,9 @@ func (m *VirtioPciCreateV2Reply) Unmarshal(b []byte) error { return nil } +// Delete virtio pci interface +// - sw_if_index - interface index of existing virtio pci interface +// // VirtioPciDelete defines message 'virtio_pci_delete'. type VirtioPciDelete struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` diff --git a/binapi/virtio/virtio_rpc.ba.go b/binapi/virtio/virtio_rpc.ba.go index 65e9c594..2ae05148 100644 --- a/binapi/virtio/virtio_rpc.ba.go +++ b/binapi/virtio/virtio_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service virtio. diff --git a/binapi/virtio_types/virtio_types.ba.go b/binapi/virtio_types/virtio_types.ba.go index 7ed059f0..e0e95bab 100644 --- a/binapi/virtio_types/virtio_types.ba.go +++ b/binapi/virtio_types/virtio_types.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/virtio_types.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/virtio_types.api.json // Package virtio_types contains generated bindings for API file virtio_types.api. // // Contents: -// -// 2 enums +// - 2 enums package virtio_types import ( "strconv" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // This is a compile-time assertion to ensure that this generated file @@ -23,6 +22,12 @@ import ( // GoVPP api package needs to be updated. const _ = api.GoVppAPIPackageIsVersion2 +const ( + APIFile = "virtio_types" + APIVersion = "1.0.0" + VersionCrc = 0x7a70a44e +) + // VirtioNetFeaturesFirst32 defines enum 'virtio_net_features_first_32'. type VirtioNetFeaturesFirst32 uint32 diff --git a/binapi/vlib/vlib.ba.go b/binapi/vlib/vlib.ba.go index 9c90dacc..3c130810 100644 --- a/binapi/vlib/vlib.ba.go +++ b/binapi/vlib/vlib.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/vlib.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/vlib.api.json // Package vlib contains generated bindings for API file vlib.api. // // Contents: -// -// 1 struct -// 18 messages +// - 1 struct +// - 18 messages package vlib import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -40,6 +39,10 @@ type ThreadData struct { CPUSocket uint32 `binapi:"u32,name=cpu_socket" json:"cpu_socket,omitempty"` } +// Set the next node for a given node request +// - node_name[] - node to add the next node to +// - next_name[] - node to add as the next node +// // AddNodeNext defines message 'add_node_next'. type AddNodeNext struct { NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty"` @@ -77,6 +80,10 @@ func (m *AddNodeNext) Unmarshal(b []byte) error { return nil } +// IP Set the next node for a given node response +// - retval - return code for the add next node request +// - next_index - the index of the next node if success, else ~0 +// // AddNodeNextReply defines message 'add_node_next_reply'. type AddNodeNextReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -114,6 +121,9 @@ func (m *AddNodeNextReply) Unmarshal(b []byte) error { return nil } +// Process a vpe parser cli string request +// - cmd_in_shmem - pointer to cli command string +// // Cli defines message 'cli'. type Cli struct { CmdInShmem uint64 `binapi:"u64,name=cmd_in_shmem" json:"cmd_in_shmem,omitempty"` @@ -217,6 +227,10 @@ func (m *CliInbandReply) Unmarshal(b []byte) error { return nil } +// vpe parser cli string response +// - retval - return code for request +// - reply_in_shmem - Reply string from cli processing if any +// // CliReply defines message 'cli_reply'. type CliReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -254,6 +268,9 @@ func (m *CliReply) Unmarshal(b []byte) error { return nil } +// f64 types are not standardized across the wire. Sense wire format in each direction by sending the f64 value 1.0. +// - f64_one - The constant of 1.0. If you send a different value, expect an rv=VNET_API_ERROR_API_ENDIAN_FAILED. +// // GetF64EndianValue defines message 'get_f64_endian_value'. type GetF64EndianValue struct { F64One float64 `binapi:"f64,name=f64_one,default=1" json:"f64_one,omitempty"` @@ -287,6 +304,10 @@ func (m *GetF64EndianValue) Unmarshal(b []byte) error { return nil } +// get_f64_endian_value reply message +// - retval - return value - VNET_API_ERROR_API_ENDIAN_FAILED if f64_one != 1.0 +// - f64_one_result - The value of 'f64 1.0' +// // GetF64EndianValueReply defines message 'get_f64_endian_value_reply'. type GetF64EndianValueReply struct { Retval uint32 `binapi:"u32,name=retval" json:"retval,omitempty"` @@ -324,6 +345,9 @@ func (m *GetF64EndianValueReply) Unmarshal(b []byte) error { return nil } +// Verify f64 wire format by sending a value and receiving the value + 1.0 +// - f64_value - The value you want to test. Default: 1.0. +// // GetF64IncrementByOne defines message 'get_f64_increment_by_one'. type GetF64IncrementByOne struct { F64Value float64 `binapi:"f64,name=f64_value,default=1" json:"f64_value,omitempty"` @@ -357,6 +381,9 @@ func (m *GetF64IncrementByOne) Unmarshal(b []byte) error { return nil } +// get_f64_increment_by_one reply +// - f64_value - The input f64_value incremented by 1.0. +// // GetF64IncrementByOneReply defines message 'get_f64_increment_by_one_reply'. type GetF64IncrementByOneReply struct { Retval uint32 `binapi:"u32,name=retval" json:"retval,omitempty"` @@ -394,6 +421,10 @@ func (m *GetF64IncrementByOneReply) Unmarshal(b []byte) error { return nil } +// Query relative index via node names +// - node_name - name of node to find relative index from +// - next_name - next node from node_name to find relative index of +// // GetNextIndex defines message 'get_next_index'. type GetNextIndex struct { NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty"` @@ -431,6 +462,10 @@ func (m *GetNextIndex) Unmarshal(b []byte) error { return nil } +// Reply for get next node index +// - retval - return value +// - next_index - index of the next_node +// // GetNextIndexReply defines message 'get_next_index_reply'. type GetNextIndexReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -495,6 +530,12 @@ func (m *GetNodeGraph) Unmarshal(b []byte) error { return nil } +// get_node_graph_reply +// - retval - return code +// - reply_in_shmem - result from vlib_node_serialize, in shared +// memory. Process with vlib_node_unserialize, remember to switch +// heaps and free the result. +// // GetNodeGraphReply defines message 'get_node_graph_reply'. type GetNodeGraphReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -532,6 +573,9 @@ func (m *GetNodeGraphReply) Unmarshal(b []byte) error { return nil } +// Get node index using name request +// - node_name[] - name of the node +// // GetNodeIndex defines message 'get_node_index'. type GetNodeIndex struct { NodeName string `binapi:"string[64],name=node_name" json:"node_name,omitempty"` @@ -565,6 +609,10 @@ func (m *GetNodeIndex) Unmarshal(b []byte) error { return nil } +// Get node index using name request +// - retval - return code for the request +// - node_index - index of the desired node if found, else ~0 +// // GetNodeIndexReply defines message 'get_node_index_reply'. type GetNodeIndexReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -602,6 +650,11 @@ func (m *GetNodeIndexReply) Unmarshal(b []byte) error { return nil } +// show_threads display the information about vpp +// +// threads running on system along with their process id, +// cpu id, physical core and cpu socket. +// // ShowThreads defines message 'show_threads'. type ShowThreads struct{} @@ -629,6 +682,11 @@ func (m *ShowThreads) Unmarshal(b []byte) error { return nil } +// show_threads_reply +// - retval - return code +// - count - number of threads in thread_data array +// - thread_data - array of thread data +// // ShowThreadsReply defines message 'show_threads_reply'. type ShowThreadsReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` diff --git a/binapi/vlib/vlib_rpc.ba.go b/binapi/vlib/vlib_rpc.ba.go index 75e696e5..f12427e1 100644 --- a/binapi/vlib/vlib_rpc.ba.go +++ b/binapi/vlib/vlib_rpc.ba.go @@ -5,7 +5,7 @@ package vlib import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service vlib. diff --git a/binapi/vmxnet3/vmxnet3.ba.go b/binapi/vmxnet3/vmxnet3.ba.go index e7009e15..be3bef6c 100644 --- a/binapi/vmxnet3/vmxnet3.ba.go +++ b/binapi/vmxnet3/vmxnet3.ba.go @@ -1,22 +1,21 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/vmxnet3.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/vmxnet3.api.json // Package vmxnet3 contains generated bindings for API file vmxnet3.api. // // Contents: -// -// 2 structs -// 8 messages +// - 2 structs +// - 8 messages package vmxnet3 import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ethernet_types "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -48,6 +47,18 @@ type Vmxnet3TxList struct { TxConsume uint16 `binapi:"u16,name=tx_consume" json:"tx_consume,omitempty"` } +// Reply for vmxnet3_interface_dump +// - sw_if_index - index of the interface +// - if_name - name of the interface +// - hw_addr - interface MAC address +// - pci_addr - pci address of the interface +// - version - vmxnet3 hardware version +// - admin_up_down - interface administrative status +// - rx_count - number of elements in rx_list +// - rx_list - list of vmxnet3_rx_list +// - tx_count - number of elements in tx_list +// - tx_list - list of vmnxnet3_tx_list +// // SwVmxnet3InterfaceDetails defines message 'sw_vmxnet3_interface_details'. type SwVmxnet3InterfaceDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -177,6 +188,9 @@ func (m *SwVmxnet3InterfaceDetails) Unmarshal(b []byte) error { return nil } +// Dump vmxnet3 interfaces +// - vl_api_interface_index_t sw_if_index [default=0xffffffff]; +// // SwVmxnet3InterfaceDump defines message 'sw_vmxnet3_interface_dump'. type SwVmxnet3InterfaceDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` @@ -210,6 +224,19 @@ func (m *SwVmxnet3InterfaceDump) Unmarshal(b []byte) error { return nil } +// - client_index - opaque cookie to identify the sender +// - pci_addr - pci address as unsigned 32bit integer: +// 0-15 domain, 16-23 bus, 24-28 slot, 29-31 function +// ddddddddddddddddbbbbbbbbsssssfff +// - enable_elog - turn on elog (optional - default is off) +// - rxq_size - receive queue size (optional - default is 1024) +// - rxq_num - number of receive queues (optional - default is 1) +// - txq_size - transmit queue size (optional - default is 1024) +// - txq_num - number of transmit queues (optional - default is 1) +// - bind - automatically bind PCI to vfio-pci module +// (optional - default is 0) +// - enable_gso - enable gso (optional - default is 0) +// // Vmxnet3Create defines message 'vmxnet3_create'. type Vmxnet3Create struct { PciAddr uint32 `binapi:"u32,name=pci_addr" json:"pci_addr,omitempty"` @@ -271,6 +298,10 @@ func (m *Vmxnet3Create) Unmarshal(b []byte) error { return nil } +// - context - sender context, to match reply w/ request +// - retval - return value for request +// - sw_if_index - software index for the new vmxnet3 interface +// // Vmxnet3CreateReply defines message 'vmxnet3_create_reply'. type Vmxnet3CreateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -308,6 +339,9 @@ func (m *Vmxnet3CreateReply) Unmarshal(b []byte) error { return nil } +// - client_index - opaque cookie to identify the sender +// - sw_if_index - interface index +// // Vmxnet3Delete defines message 'vmxnet3_delete'. type Vmxnet3Delete struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -374,6 +408,18 @@ func (m *Vmxnet3DeleteReply) Unmarshal(b []byte) error { return nil } +// Memory interface details structure +// - sw_if_index - index of the interface +// - if_name - name of the interface +// - hw_addr - interface MAC address +// - pci_addr - pci address of the interface +// - version - vmxnet3 hardware version +// - admin_up_down - interface administrative status +// - rx_count - number of elements in rx_list +// - rx_list - list of vmxnet3_rx_list +// - tx_count - number of elements in tx_list +// - tx_list - list of vmnxnet3_tx_list +// // Vmxnet3Details defines message 'vmxnet3_details'. type Vmxnet3Details struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -503,6 +549,7 @@ func (m *Vmxnet3Details) Unmarshal(b []byte) error { return nil } +// Dump all vmxnet3 interfaces // Vmxnet3Dump defines message 'vmxnet3_dump'. // Deprecated: the message will be removed in the future versions type Vmxnet3Dump struct{} diff --git a/binapi/vmxnet3/vmxnet3_rpc.ba.go b/binapi/vmxnet3/vmxnet3_rpc.ba.go index 452b9e82..6cdeb209 100644 --- a/binapi/vmxnet3/vmxnet3_rpc.ba.go +++ b/binapi/vmxnet3/vmxnet3_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service vmxnet3. diff --git a/binapi/vpe/vpe.ba.go b/binapi/vpe/vpe.ba.go index 36667f9e..a983f9c4 100644 --- a/binapi/vpe/vpe.ba.go +++ b/binapi/vpe/vpe.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/vpe.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/vpe.api.json // Package vpe contains generated bindings for API file vpe.api. // // Contents: -// -// 6 messages +// - 6 messages package vpe import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" vpe_types "github.com/networkservicemesh/govpp/binapi/vpe_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -107,6 +106,7 @@ func (m *LogDump) Unmarshal(b []byte) error { return nil } +// show version // ShowVersion defines message 'show_version'. type ShowVersion struct{} @@ -134,6 +134,12 @@ func (m *ShowVersion) Unmarshal(b []byte) error { return nil } +// show version response +// - retval - return code for the request +// - program - name of the program (vpe) +// - version - version of the program +// - build_directory - root of the workspace where the program was built +// // ShowVersionReply defines message 'show_version_reply'. type ShowVersionReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -183,6 +189,7 @@ func (m *ShowVersionReply) Unmarshal(b []byte) error { return nil } +// Show the current system timestamp. // ShowVpeSystemTime defines message 'show_vpe_system_time'. type ShowVpeSystemTime struct{} @@ -210,6 +217,10 @@ func (m *ShowVpeSystemTime) Unmarshal(b []byte) error { return nil } +// Reply for show vpe system time. +// - retval - return value +// - vpe_system_time - the time in seconds since epoch of the host system. +// // ShowVpeSystemTimeReply defines message 'show_vpe_system_time_reply'. type ShowVpeSystemTimeReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` diff --git a/binapi/vpe/vpe_rpc.ba.go b/binapi/vpe/vpe_rpc.ba.go index a57dbfe6..c679c854 100644 --- a/binapi/vpe/vpe_rpc.ba.go +++ b/binapi/vpe/vpe_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service vpe. diff --git a/binapi/vpe_types/vpe_types.ba.go b/binapi/vpe_types/vpe_types.ba.go index 0993e371..25997fa9 100644 --- a/binapi/vpe_types/vpe_types.ba.go +++ b/binapi/vpe_types/vpe_types.ba.go @@ -1,23 +1,22 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/vpe_types.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/vpe_types.api.json // Package vpe_types contains generated bindings for API file vpe_types.api. // // Contents: -// -// 2 aliases -// 1 enum -// 1 struct +// - 2 aliases +// - 1 enum +// - 1 struct package vpe_types import ( "strconv" "time" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // This is a compile-time assertion to ensure that this generated file @@ -26,6 +25,12 @@ import ( // GoVPP api package needs to be updated. const _ = api.GoVppAPIPackageIsVersion2 +const ( + APIFile = "vpe_types" + APIVersion = "1.0.0" + VersionCrc = 0x5f754a1c +) + // LogLevel defines enum 'log_level'. type LogLevel uint32 @@ -86,18 +91,22 @@ func NewTimestamp(t time.Time) Timestamp { ns := float64(sec) + float64(nsec/1e9) return Timestamp(ns) } + func (x Timestamp) ToTime() time.Time { ns := int64(x * 1e9) sec := ns / 1e9 nsec := ns % 1e9 return time.Unix(sec, nsec) } + func (x Timestamp) String() string { return x.ToTime().String() } + func (x *Timestamp) MarshalText() ([]byte, error) { return []byte(x.ToTime().Format(time.RFC3339Nano)), nil } + func (x *Timestamp) UnmarshalText(text []byte) error { t, err := time.Parse(time.RFC3339Nano, string(text)) if err != nil { diff --git a/binapi/vrrp/vrrp.ba.go b/binapi/vrrp/vrrp.ba.go index 38a62663..e56eabde 100644 --- a/binapi/vrrp/vrrp.ba.go +++ b/binapi/vrrp/vrrp.ba.go @@ -1,26 +1,25 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/vrrp.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/vrrp.api.json // Package vrrp contains generated bindings for API file vrrp.api. // // Contents: -// -// 2 enums -// 5 structs -// 21 messages +// - 2 enums +// - 5 structs +// - 21 messages package vrrp import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ethernet_types "github.com/networkservicemesh/govpp/binapi/ethernet_types" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -158,6 +157,16 @@ type VrrpVrTracking struct { Priority uint8 `binapi:"u8,name=priority" json:"priority,omitempty"` } +// VRRP: Add or delete a VRRP virtual router +// - is_add - 0 if deleting, != 0 if adding +// - sw_if_index - interface backed up by this vr +// - vr_id - the VR ID advertised by this vr +// - priority - the priority advertised for this vr +// - interval - interval between advertisements in centiseconds +// - flags - bit flags for booleans - preempt, accept, unicast, ipv6 +// - n_addrs - number of addresses being backed up by this vr +// - addrs - the addresses backed up by this vr +// // VrrpVrAddDel defines message 'vrrp_vr_add_del'. type VrrpVrAddDel struct { IsAdd uint8 `binapi:"u8,name=is_add" json:"is_add,omitempty"` @@ -271,6 +280,9 @@ func (m *VrrpVrAddDelReply) Unmarshal(b []byte) error { return nil } +// * @brief Delete an existing VRRP instance +// - - vrrp_index - index of the VRRP instance to delete +// // VrrpVrDel defines message 'vrrp_vr_del'. type VrrpVrDel struct { VrrpIndex uint32 `binapi:"u32,name=vrrp_index" json:"vrrp_index,omitempty"` @@ -337,6 +349,10 @@ func (m *VrrpVrDelReply) Unmarshal(b []byte) error { return nil } +// VRRP: VR dump response +// - conf - configuration parameters for the VR +// - runtime - runtime state for the VR +// // VrrpVrDetails defines message 'vrrp_vr_details'. type VrrpVrDetails struct { Config VrrpVrConf `binapi:"vrrp_vr_conf,name=config" json:"config,omitempty"` @@ -431,6 +447,9 @@ func (m *VrrpVrDetails) Unmarshal(b []byte) error { return nil } +// VRRP: dump virtual router data +// - sw_if_index - interface to use as filter (0,~0 == "all") +// // VrrpVrDump defines message 'vrrp_vr_dump'. type VrrpVrDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -464,6 +483,12 @@ func (m *VrrpVrDump) Unmarshal(b []byte) error { return nil } +// Notification about VRRP VR state change event +// - pid - client pid registered to receive notification +// - vr - configuration parameters identifying the VR +// - old_state - old state of VR +// - new_state - new state of VR +// // VrrpVrEvent defines message 'vrrp_vr_event'. type VrrpVrEvent struct { PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` @@ -515,6 +540,13 @@ func (m *VrrpVrEvent) Unmarshal(b []byte) error { return nil } +// VRRP: VR peer dump response +// - sw_if_index - interface index +// - is_ipv6 - 0 -> IPv4, 1 -> IPv6 +// - vr_id - ID of VR +// - n_peer_addrs - number of peer addresses +// - peer_addrs - peer addresses +// // VrrpVrPeerDetails defines message 'vrrp_vr_peer_details'. type VrrpVrPeerDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -583,6 +615,11 @@ func (m *VrrpVrPeerDetails) Unmarshal(b []byte) error { return nil } +// VRRP: dump virtual router peer address data +// - sw_if_index - interface (0,~0 == "all" -> ignore is_ipv6 & vr_id)) +// - is_ipv6 - 0 -> IPv4, 1 -> IPv6 +// - vr_id - ID of VR to dump +// // VrrpVrPeerDump defines message 'vrrp_vr_peer_dump'. type VrrpVrPeerDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -624,6 +661,13 @@ func (m *VrrpVrPeerDump) Unmarshal(b []byte) error { return nil } +// VRRP: set unicast peers for a VR +// - sw_if_index - interface ID that VR is backing up +// - vr_id - VR ID +// - is_ipv6 - 1 for IPv6, 0 for IPv4 +// - n_addrs - number of peer addresses +// - addrs - peer addresses +// // VrrpVrSetPeers defines message 'vrrp_vr_set_peers'. type VrrpVrSetPeers struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -725,6 +769,12 @@ func (m *VrrpVrSetPeersReply) Unmarshal(b []byte) error { return nil } +// VRRP: start or shutdown the VRRP protocol for a virtual router +// - sw_if_index - interface ID that VR is backing up +// - vr_id - VR ID +// - is_ipv6 - 1 for IPv6, 0 for IPv4 +// - is_start - 1 to start VRRP proto on this VR, 0 to shutdown +// // VrrpVrStartStop defines message 'vrrp_vr_start_stop'. type VrrpVrStartStop struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -803,6 +853,14 @@ func (m *VrrpVrStartStopReply) Unmarshal(b []byte) error { return nil } +// VRRP: Add/delete VR priority tracking of interface status +// - sw_if_index - interface index +// - is_ipv6 - 0 -> IPv4, 1 -> IPv6 +// - vr_id - ID of VR +// - is_add - 0 -> delete, 1 -> add +// - n_ifs - number of interface tracking records +// - ifs - array of interface tracking records +// // VrrpVrTrackIfAddDel defines message 'vrrp_vr_track_if_add_del'. type VrrpVrTrackIfAddDel struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -908,6 +966,13 @@ func (m *VrrpVrTrackIfAddDelReply) Unmarshal(b []byte) error { return nil } +// VRRP: VR interface tracking dump response +// - sw_if_index - interface index +// - is_ipv6 - 0 -> IPv4, 1 -> IPv6 +// - vr_id - ID of VR +// - n_ifs - number of tracked interfaces +// - ifs - array of tracked interface data +// // VrrpVrTrackIfDetails defines message 'vrrp_vr_track_if_details'. type VrrpVrTrackIfDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -976,6 +1041,12 @@ func (m *VrrpVrTrackIfDetails) Unmarshal(b []byte) error { return nil } +// VRRP: dump virtual router interface tracking data +// - sw_if_index - interface +// - is_ipv6 - 0 -> IPv4, 1 -> IPv6 +// - vr_id - ID of VR to dump +// - dump_all - dump all VR interface tracking, ignore other fields +// // VrrpVrTrackIfDump defines message 'vrrp_vr_track_if_dump'. type VrrpVrTrackIfDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -1021,6 +1092,16 @@ func (m *VrrpVrTrackIfDump) Unmarshal(b []byte) error { return nil } +// @brief Replace an existing VRRP virtual router in-place or create a new one +// - vrrp_index - an existing VRRP entry to replace, or 0xffffffff to crate a new one +// - sw_if_index - interface backed up by this vr +// - vr_id - the VR ID advertised by this vr +// - priority - the priority advertised for this vr +// - interval - interval between advertisements in centiseconds +// - flags - bit flags for booleans - preempt, accept, unicast, ipv6 +// - n_addrs - number of addresses being backed up by this vr +// - addrs - the addresses backed up by this vr +// // VrrpVrUpdate defines message 'vrrp_vr_update'. type VrrpVrUpdate struct { VrrpIndex uint32 `binapi:"u32,name=vrrp_index" json:"vrrp_index,omitempty"` @@ -1101,6 +1182,10 @@ func (m *VrrpVrUpdate) Unmarshal(b []byte) error { return nil } +// * @brief Reply to a VRRP add/replace +// - - vrrp_index - index of the updated or newly created VRRP instance +// - - retval 0 - no error +// // VrrpVrUpdateReply defines message 'vrrp_vr_update_reply'. type VrrpVrUpdateReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` @@ -1138,6 +1223,10 @@ func (m *VrrpVrUpdateReply) Unmarshal(b []byte) error { return nil } +// Register for VRRP VR state change events +// - enable_disable - 1 to register, 0 to cancel registration +// - pid - sender's pid +// // WantVrrpVrEvents defines message 'want_vrrp_vr_events'. type WantVrrpVrEvents struct { EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"` diff --git a/binapi/vrrp/vrrp_rpc.ba.go b/binapi/vrrp/vrrp_rpc.ba.go index 6ec45b2d..2ad784fd 100644 --- a/binapi/vrrp/vrrp_rpc.ba.go +++ b/binapi/vrrp/vrrp_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service vrrp. diff --git a/binapi/vxlan/vxlan.ba.go b/binapi/vxlan/vxlan.ba.go index f14f1a93..e84b32cf 100644 --- a/binapi/vxlan/vxlan.ba.go +++ b/binapi/vxlan/vxlan.ba.go @@ -1,21 +1,20 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/vxlan.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/vxlan.api.json // Package vxlan contains generated bindings for API file vxlan.api. // // Contents: -// -// 14 messages +// - 14 messages package vxlan import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -30,6 +29,11 @@ const ( VersionCrc = 0x95381587 ) +// Interface set vxlan-bypass request +// - sw_if_index - interface used to reach neighbor +// - is_ipv6 - if non-zero, enable ipv6-vxlan-bypass, else ipv4-vxlan-bypass +// - enable - if non-zero enable, else disable +// // SwInterfaceSetVxlanBypass defines message 'sw_interface_set_vxlan_bypass'. type SwInterfaceSetVxlanBypass struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -106,7 +110,18 @@ func (m *SwInterfaceSetVxlanBypassReply) Unmarshal(b []byte) error { return nil } +// Create or delete a VXLAN tunnel +// - is_add - Use 1 to create the tunnel, 0 to remove it +// - instance - optional unique custom device instance, else ~0. +// - src_address - Source IP address +// - dst_address - Destination IP address, can be multicast +// - mcast_sw_if_index - Interface for multicast destination +// - encap_vrf_id - Encap route table FIB index +// - decap_next_index - index of decap next graph node +// - vni - The VXLAN Network Identifier, uint24 +// // VxlanAddDelTunnel defines message 'vxlan_add_del_tunnel'. +// Deprecated: the message will be removed in the future versions type VxlanAddDelTunnel struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"` @@ -174,6 +189,7 @@ func (m *VxlanAddDelTunnel) Unmarshal(b []byte) error { } // VxlanAddDelTunnelReply defines message 'vxlan_add_del_tunnel_reply'. +// Deprecated: the message will be removed in the future versions type VxlanAddDelTunnelReply 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"` @@ -210,7 +226,20 @@ func (m *VxlanAddDelTunnelReply) Unmarshal(b []byte) error { return nil } +// Create or delete a VXLAN tunnel +// - is_add - Use 1 to create the tunnel, 0 to remove it +// - instance - optional unique custom device instance, else ~0. +// - src_address - Source IP address +// - dst_address - Destination IP address, can be multicast +// - src_port - Source UDP port. It is not included in sent packets. Used only for port registration +// - dst_port - Destination UDP port +// - mcast_sw_if_index - Interface for multicast destination +// - encap_vrf_id - Encap route table FIB index +// - decap_next_index - index of decap next graph node +// - vni - The VXLAN Network Identifier, uint24 +// // VxlanAddDelTunnelV2 defines message 'vxlan_add_del_tunnel_v2'. +// Deprecated: the message will be removed in the future versions type VxlanAddDelTunnelV2 struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` Instance uint32 `binapi:"u32,name=instance,default=4294967295" json:"instance,omitempty"` @@ -286,6 +315,7 @@ func (m *VxlanAddDelTunnelV2) Unmarshal(b []byte) error { } // VxlanAddDelTunnelV2Reply defines message 'vxlan_add_del_tunnel_v2_reply'. +// Deprecated: the message will be removed in the future versions type VxlanAddDelTunnelV2Reply 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"` @@ -322,6 +352,19 @@ func (m *VxlanAddDelTunnelV2Reply) Unmarshal(b []byte) error { return nil } +// Create or delete a VXLAN tunnel +// - is_add - Use 1 to create the tunnel, 0 to remove it +// - instance - optional unique custom device instance, else ~0. +// - src_address - Source IP address +// - dst_address - Destination IP address, can be multicast +// - src_port - Source UDP port. It is not included in sent packets. Used only for port registration +// - dst_port - Destination UDP port +// - mcast_sw_if_index - Interface for multicast destination +// - encap_vrf_id - Encap route table FIB index +// - decap_next_index - index of decap next graph node +// - vni - The VXLAN Network Identifier, uint24 +// - is_l3 - if true, create the interface in L3 mode, w/o MAC +// // VxlanAddDelTunnelV3 defines message 'vxlan_add_del_tunnel_v3'. type VxlanAddDelTunnelV3 struct { IsAdd bool `binapi:"bool,name=is_add,default=true" json:"is_add,omitempty"` @@ -438,6 +481,11 @@ func (m *VxlanAddDelTunnelV3Reply) Unmarshal(b []byte) error { return nil } +// Offload vxlan rx request +// - hw_if_index - rx hw interface +// - sw_if_index - vxlan interface to offload +// - enable - if non-zero enable, else disable +// // VxlanOffloadRx defines message 'vxlan_offload_rx'. type VxlanOffloadRx struct { HwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=hw_if_index" json:"hw_if_index,omitempty"` @@ -513,6 +561,7 @@ func (m *VxlanOffloadRxReply) Unmarshal(b []byte) error { } // VxlanTunnelDetails defines message 'vxlan_tunnel_details'. +// Deprecated: the message will be removed in the future versions type VxlanTunnelDetails struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` Instance uint32 `binapi:"u32,name=instance" json:"instance,omitempty"` @@ -580,6 +629,7 @@ func (m *VxlanTunnelDetails) Unmarshal(b []byte) error { } // VxlanTunnelDump defines message 'vxlan_tunnel_dump'. +// Deprecated: the message will be removed in the future versions type VxlanTunnelDump struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` } diff --git a/binapi/vxlan/vxlan_rpc.ba.go b/binapi/vxlan/vxlan_rpc.ba.go index 1da8f397..0dff6a02 100644 --- a/binapi/vxlan/vxlan_rpc.ba.go +++ b/binapi/vxlan/vxlan_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service vxlan. diff --git a/binapi/vxlan_gpe/vxlan_gpe.ba.go b/binapi/vxlan_gpe/vxlan_gpe.ba.go index f65e95d3..74768fe5 100644 --- a/binapi/vxlan_gpe/vxlan_gpe.ba.go +++ b/binapi/vxlan_gpe/vxlan_gpe.ba.go @@ -1,21 +1,20 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/core/vxlan_gpe.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: core/vxlan_gpe.api.json // Package vxlan_gpe contains generated bindings for API file vxlan_gpe.api. // // Contents: -// -// 10 messages +// - 10 messages package vxlan_gpe import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -30,6 +29,11 @@ const ( VersionCrc = 0x3bc06278 ) +// Interface set vxlan-gpe-bypass request +// - sw_if_index - interface used to reach neighbor +// - is_ipv6 - if non-zero, enable ipv6-vxlan-bypass, else ipv4-vxlan-bypass +// - enable - if non-zero enable, else disable +// // SwInterfaceSetVxlanGpeBypass defines message 'sw_interface_set_vxlan_gpe_bypass'. type SwInterfaceSetVxlanGpeBypass struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -108,6 +112,20 @@ func (m *SwInterfaceSetVxlanGpeBypassReply) Unmarshal(b []byte) error { return nil } +// /* +// - Copyright (c) 2015-2016 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. +// // VxlanGpeAddDelTunnel defines message 'vxlan_gpe_add_del_tunnel'. type VxlanGpeAddDelTunnel struct { Local ip_types.Address `binapi:"address,name=local" json:"local,omitempty"` @@ -212,6 +230,18 @@ func (m *VxlanGpeAddDelTunnelReply) Unmarshal(b []byte) error { return nil } +// Create or delete a VXLAN-GPE tunnel +// - local - Source IP address +// - remote - Destination IP address, can be multicast +// - local_port - Source UDP port. It is not included in sent packets. Used only for port registration +// - remote_port - Destination UDP port +// - mcast_sw_if_index - Interface for multicast destination +// - encap_vrf_id - Encap route table FIB index +// - decap_vrf_id - Decap route table FIB index +// - protocol - Encapsulated protocol +// - vni - The VXLAN Network Identifier, uint24 +// - is_add - Use 1 to create the tunnel, 0 to remove it +// // VxlanGpeAddDelTunnelV2 defines message 'vxlan_gpe_add_del_tunnel_v2'. type VxlanGpeAddDelTunnelV2 struct { Local ip_types.Address `binapi:"address,name=local" json:"local,omitempty"` diff --git a/binapi/vxlan_gpe/vxlan_gpe_rpc.ba.go b/binapi/vxlan_gpe/vxlan_gpe_rpc.ba.go index 0d1d7673..4de56e80 100644 --- a/binapi/vxlan_gpe/vxlan_gpe_rpc.ba.go +++ b/binapi/vxlan_gpe/vxlan_gpe_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service vxlan_gpe. diff --git a/binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go b/binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go index f6b9e735..750eb2b3 100644 --- a/binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go +++ b/binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export.ba.go @@ -1,20 +1,19 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/vxlan_gpe_ioam_export.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/vxlan_gpe_ioam_export.api.json // Package vxlan_gpe_ioam_export contains generated bindings for API file vxlan_gpe_ioam_export.api. // // Contents: -// -// 2 messages +// - 2 messages package vxlan_gpe_ioam_export import ( - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -29,6 +28,7 @@ const ( VersionCrc = 0x26bebf64 ) +// /* Define a simple binary API to control the feature // VxlanGpeIoamExportEnableDisable defines message 'vxlan_gpe_ioam_export_enable_disable'. type VxlanGpeIoamExportEnableDisable struct { IsDisable bool `binapi:"bool,name=is_disable" json:"is_disable,omitempty"` diff --git a/binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export_rpc.ba.go b/binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export_rpc.ba.go index f6888033..35823a43 100644 --- a/binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export_rpc.ba.go +++ b/binapi/vxlan_gpe_ioam_export/vxlan_gpe_ioam_export_rpc.ba.go @@ -5,7 +5,7 @@ package vxlan_gpe_ioam_export import ( "context" - api "git.fd.io/govpp.git/api" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service vxlan_gpe_ioam_export. diff --git a/binapi/wireguard/wireguard.ba.go b/binapi/wireguard/wireguard.ba.go index acdaf64f..90bb25ed 100644 --- a/binapi/wireguard/wireguard.ba.go +++ b/binapi/wireguard/wireguard.ba.go @@ -1,25 +1,24 @@ // Code generated by GoVPP's binapi-generator. DO NOT EDIT. // versions: -// binapi-generator: v0.4.0-dev -// VPP: 23.02-rc0~189-g8ba2a057b -// source: /usr/share/vpp/api/plugins/wireguard.api.json +// binapi-generator: v0.8.0 +// VPP: 23.10-rc0~164-gf967da82f +// source: plugins/wireguard.api.json // Package wireguard contains generated bindings for API file wireguard.api. // // Contents: -// -// 1 enum -// 2 structs -// 17 messages +// - 1 enum +// - 2 structs +// - 17 messages package wireguard import ( "strconv" - api "git.fd.io/govpp.git/api" - codec "git.fd.io/govpp.git/codec" interface_types "github.com/networkservicemesh/govpp/binapi/interface_types" ip_types "github.com/networkservicemesh/govpp/binapi/ip_types" + api "go.fd.io/govpp/api" + codec "go.fd.io/govpp/codec" ) // This is a compile-time assertion to ensure that this generated file @@ -104,8 +103,13 @@ type WireguardPeer struct { AllowedIps []ip_types.Prefix `binapi:"prefix[n_allowed_ips],name=allowed_ips" json:"allowed_ips,omitempty"` } +// Register for wireguard peer events +// - sw_if_index - index of the interface to dump peer info on, ~0 if on all +// - peer_index - index of the peer to dump info on, ~0 if on all +// - enable_disable - 1 => register for events, 0 => cancel registration +// - pid - sender's pid +// // WantWireguardPeerEvents defines message 'want_wireguard_peer_events'. -// InProgress: the message form may change in the future versions type WantWireguardPeerEvents struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index,default=4294967295" json:"sw_if_index,omitempty"` PeerIndex uint32 `binapi:"u32,name=peer_index,default=4294967295" json:"peer_index,omitempty"` @@ -151,7 +155,6 @@ func (m *WantWireguardPeerEvents) Unmarshal(b []byte) error { } // WantWireguardPeerEventsReply defines message 'want_wireguard_peer_events_reply'. -// InProgress: the message form may change in the future versions type WantWireguardPeerEventsReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -186,8 +189,10 @@ func (m *WantWireguardPeerEventsReply) Unmarshal(b []byte) error { return nil } +// Wireguard Set Async mode +// - async_enable - wireguard async mode on or off, default off +// // WgSetAsyncMode defines message 'wg_set_async_mode'. -// InProgress: the message form may change in the future versions type WgSetAsyncMode struct { AsyncEnable bool `binapi:"bool,name=async_enable,default=false" json:"async_enable,omitempty"` } @@ -221,7 +226,6 @@ func (m *WgSetAsyncMode) Unmarshal(b []byte) error { } // WgSetAsyncModeReply defines message 'wg_set_async_mode_reply'. -// InProgress: the message form may change in the future versions type WgSetAsyncModeReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -254,8 +258,8 @@ func (m *WgSetAsyncModeReply) Unmarshal(b []byte) error { return nil } +// Create an Wireguard interface // WireguardInterfaceCreate defines message 'wireguard_interface_create'. -// InProgress: the message form may change in the future versions type WireguardInterfaceCreate struct { Interface WireguardInterface `binapi:"wireguard_interface,name=interface" json:"interface,omitempty"` GenerateKey bool `binapi:"bool,name=generate_key" json:"generate_key,omitempty"` @@ -312,8 +316,11 @@ func (m *WireguardInterfaceCreate) Unmarshal(b []byte) error { return nil } +// Add Wireguard interface interface response +// - retval - return status +// - sw_if_index - sw_if_index of new interface (for successful add) +// // WireguardInterfaceCreateReply defines message 'wireguard_interface_create_reply'. -// InProgress: the message form may change in the future versions type WireguardInterfaceCreateReply 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"` @@ -353,7 +360,6 @@ func (m *WireguardInterfaceCreateReply) Unmarshal(b []byte) error { } // WireguardInterfaceDelete defines message 'wireguard_interface_delete'. -// InProgress: the message form may change in the future versions type WireguardInterfaceDelete struct { SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` } @@ -387,7 +393,6 @@ func (m *WireguardInterfaceDelete) Unmarshal(b []byte) error { } // WireguardInterfaceDeleteReply defines message 'wireguard_interface_delete_reply'. -// InProgress: the message form may change in the future versions type WireguardInterfaceDeleteReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -423,7 +428,6 @@ func (m *WireguardInterfaceDeleteReply) Unmarshal(b []byte) error { } // WireguardInterfaceDetails defines message 'wireguard_interface_details'. -// InProgress: the message form may change in the future versions type WireguardInterfaceDetails struct { Interface WireguardInterface `binapi:"wireguard_interface,name=interface" json:"interface,omitempty"` } @@ -477,7 +481,6 @@ func (m *WireguardInterfaceDetails) Unmarshal(b []byte) error { } // WireguardInterfaceDump defines message 'wireguard_interface_dump'. -// InProgress: the message form may change in the future versions type WireguardInterfaceDump struct { ShowPrivateKey bool `binapi:"bool,name=show_private_key" json:"show_private_key,omitempty"` SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"` @@ -514,8 +517,10 @@ func (m *WireguardInterfaceDump) Unmarshal(b []byte) error { return nil } +// Create new peer +// - peer - peer to create +// // WireguardPeerAdd defines message 'wireguard_peer_add'. -// InProgress: the message form may change in the future versions type WireguardPeerAdd struct { Peer WireguardPeer `binapi:"wireguard_peer,name=peer" json:"peer,omitempty"` } @@ -601,8 +606,11 @@ func (m *WireguardPeerAdd) Unmarshal(b []byte) error { return nil } +// Create new peer +// - retval - return status +// - peer_index - Created or existing peer pool index +// // WireguardPeerAddReply defines message 'wireguard_peer_add_reply'. -// InProgress: the message form may change in the future versions type WireguardPeerAddReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` PeerIndex uint32 `binapi:"u32,name=peer_index" json:"peer_index,omitempty"` @@ -639,8 +647,12 @@ func (m *WireguardPeerAddReply) Unmarshal(b []byte) error { return nil } +// Interface Event generated by want_wireguard_peer_events +// - pid - client pid registered to receive notification +// - peer_index - index of the peer for this event +// - deleted - interface was deleted +// // WireguardPeerEvent defines message 'wireguard_peer_event'. -// InProgress: the message form may change in the future versions type WireguardPeerEvent struct { PID uint32 `binapi:"u32,name=pid" json:"pid,omitempty"` PeerIndex uint32 `binapi:"u32,name=peer_index" json:"peer_index,omitempty"` @@ -681,8 +693,10 @@ func (m *WireguardPeerEvent) Unmarshal(b []byte) error { return nil } +// Remove peer +// - peer_index - peer to be removed +// // WireguardPeerRemove defines message 'wireguard_peer_remove'. -// InProgress: the message form may change in the future versions type WireguardPeerRemove struct { PeerIndex uint32 `binapi:"u32,name=peer_index" json:"peer_index,omitempty"` } @@ -716,7 +730,6 @@ func (m *WireguardPeerRemove) Unmarshal(b []byte) error { } // WireguardPeerRemoveReply defines message 'wireguard_peer_remove_reply'. -// InProgress: the message form may change in the future versions type WireguardPeerRemoveReply struct { Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"` } @@ -749,8 +762,10 @@ func (m *WireguardPeerRemoveReply) Unmarshal(b []byte) error { return nil } +// Dump peer details +// - peer - peer details +// // WireguardPeersDetails defines message 'wireguard_peers_details'. -// InProgress: the message form may change in the future versions type WireguardPeersDetails struct { Peer WireguardPeer `binapi:"wireguard_peer,name=peer" json:"peer,omitempty"` } @@ -836,8 +851,10 @@ func (m *WireguardPeersDetails) Unmarshal(b []byte) error { return nil } +// Dump all peers +// - peer_index - peer index to be dumped. If 0xFFFFFFFF dumps all peers +// // WireguardPeersDump defines message 'wireguard_peers_dump'. -// InProgress: the message form may change in the future versions type WireguardPeersDump struct { PeerIndex uint32 `binapi:"u32,name=peer_index,default=4294967295" json:"peer_index,omitempty"` } diff --git a/binapi/wireguard/wireguard_rpc.ba.go b/binapi/wireguard/wireguard_rpc.ba.go index 4178b9e5..2d6101b0 100644 --- a/binapi/wireguard/wireguard_rpc.ba.go +++ b/binapi/wireguard/wireguard_rpc.ba.go @@ -7,8 +7,8 @@ import ( "fmt" "io" - api "git.fd.io/govpp.git/api" memclnt "github.com/networkservicemesh/govpp/binapi/memclnt" + api "go.fd.io/govpp/api" ) // RPCService defines RPC service wireguard. diff --git a/gen.go b/gen.go index 99216447..2fb7f56f 100644 --- a/gen.go +++ b/gen.go @@ -16,5 +16,5 @@ package govpp -//go:generate bash -c "docker buildx build -t govpp:gogenerate . -q --build-arg GOVPP_VERSION=$(go list -m -f '{{ .Version }}' git.fd.io/govpp.git) --load" +//go:generate bash -c "docker buildx build -t govpp:gogenerate . -q --build-arg GOVPP_VERSION=$(go list -m -f '{{ .Version }}' go.fd.io/govpp) --load" //go:generate bash -c "docker run -e PKGPREFIX=$(go list)/binapi -v $(go list -f '{{ .Dir }}'):/gen govpp:gogenerate" diff --git a/go.mod b/go.mod index f62b2b54..e1c2b3f5 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,6 @@ module github.com/networkservicemesh/govpp go 1.20 -require git.fd.io/govpp.git v0.3.6-0.20210927044411-385ccc0d8ba9 +require go.fd.io/govpp v0.8.0 require github.com/lunixbochs/struc v0.0.0-20200521075829-a4cb8d33dbbe // indirect diff --git a/go.sum b/go.sum index 1a543a4e..f2456191 100644 --- a/go.sum +++ b/go.sum @@ -1,32 +1,8 @@ -git.fd.io/govpp.git v0.3.6-0.20210927044411-385ccc0d8ba9 h1:QFHVGWCWf6e226vMy1zU614eC3glrfJO2CwREUk8D6s= -git.fd.io/govpp.git v0.3.6-0.20210927044411-385ccc0d8ba9/go.mod h1:OCVd4W8SH+666KRQoMj6PM+oipLDZAHhqMz9B1TGbgI= -github.com/bennyscetbun/jsongo v1.1.0/go.mod h1:suxbVmjBV8+A2BBAM5EYVh6Uj8j3rqJhzWf3hv7Ff8U= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/ftrvxmtrx/fd v0.0.0-20150925145434-c6d800382fff/go.mod h1:yUhRXHewUVJ1k89wHKP68xfzk7kwXUx/DV1nx4EBMbw= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/lunixbochs/struc v0.0.0-20200521075829-a4cb8d33dbbe h1:ewr1srjRCmcQogPQ/NCx6XCk6LGVmsVCc9Y3vvPZj+Y= github.com/lunixbochs/struc v0.0.0-20200521075829-a4cb8d33dbbe/go.mod h1:vy1vK6wD6j7xX6O6hXe621WabdtNkou2h7uRtTfRMyg= -github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/gomega v1.1.0 h1:e3YP4dN/HYPpGh29X1ZkcxcEICsOls9huyVCRBaxjq8= -github.com/onsi/gomega v1.1.0/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200610111108-226ff32320da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= +go.fd.io/govpp v0.8.0 h1:eUzJCM34Y528+gfcNxAzKu4cw3MdEk5z59wxVuI4+ck= +go.fd.io/govpp v0.8.0/go.mod h1:nuMKRRm5/uknVTKrRDhncrNJu0F+1AjMxLuC/+g+Z1k= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= diff --git a/patch/patch.sh b/patch/patch.sh index 4dc8df4c..cf5dd3a2 100755 --- a/patch/patch.sh +++ b/patch/patch.sh @@ -13,24 +13,11 @@ function git_cherry_pick () } # Calico cherry picks -git_cherry_pick refs/changes/13/34713/4 # 34713: vppinfra: improve & test abstract socket | https://gerrit.fd.io/r/c/vpp/+/34713 -git_cherry_pick refs/changes/71/32271/16 # 32271: memif: add support for ns abstract sockets | https://gerrit.fd.io/r/c/vpp/+/32271 -git_cherry_pick refs/changes/34/34734/3 # 34734: memif: autogenerate socket_ids | https://gerrit.fd.io/r/c/vpp/+/34734 -git_cherry_pick refs/changes/26/34726/1 # 34726: interface: add buffer stats api | https://gerrit.fd.io/r/c/vpp/+/34726 -git_cherry_pick refs/changes/05/35805/2 # 35805: dpdk: add intf tag to dev{} subinput | https://gerrit.fd.io/r/c/vpp/+/35805 +git_cherry_pick refs/changes/26/34726/3 # 34726: interface: add buffer stats api | https://gerrit.fd.io/r/c/vpp/+/34726 -# --------------- Dedicated plugins --------------- -git_cherry_pick refs/changes/64/33264/7 # 33264: pbl: Port based balancer | https://gerrit.fd.io/r/c/vpp/+/33264 -git_cherry_pick refs/changes/88/31588/4 # 31588: cnat: [WIP] no k8s maglev from pods | https://gerrit.fd.io/r/c/vpp/+/31588 -git_cherry_pick refs/changes/83/28083/21 # 28083: acl: acl-plugin custom policies | https://gerrit.fd.io/r/c/vpp/+/28083 -git_cherry_pick refs/changes/13/28513/28 # 25813: capo: Calico Policies plugin | https://gerrit.fd.io/r/c/vpp/+/28513 -# --------------- Dedicated plugins --------------- - -# NSM cherry-picks -git_cherry_pick refs/changes/74/37274/5 # 37274: af_xdp: fix xdp socket create fail | https://gerrit.fd.io/r/c/vpp/+/37274 -git_cherry_pick refs/changes/63/37763/4 # 37763: wireguard: add local variable | https://gerrit.fd.io/r/c/vpp/+/37763 -git_cherry_pick refs/changes/01/38001/9 # 38001: wireguard: sending the first handshake | https://gerrit.fd.io/r/c/vpp/+/38001 -git_cherry_pick refs/changes/00/38000/4 # 38000: wireguard: update ESTABLISHED flag | https://gerrit.fd.io/r/c/vpp/+/38000 +# Copy Calico local patches +git clone -b v3.26.0 https://github.com/projectcalico/vpp-dataplane.git /vpp-dataplane/ +cp /vpp-dataplane/vpplink/generated/patches/* patch/ if [ "$(ls ./patch/*.patch 2> /dev/null)" ]; then git apply patch/*.patch