From a3bb834db727a3ac9a1ffcfeae9265e5dead851f Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Wed, 15 Aug 2018 12:59:25 +0200 Subject: Refactor GoVPP Squashed commit of the following: commit 348930db31575e9f59b3834d9fec07411f011e05 Author: Ondrej Fabry Date: Wed Aug 15 11:30:13 2018 +0200 Use debug level for log about different context commit 9fc963c559cea67a41b85c6cdadc322fb3b1fc7c Author: Ondrej Fabry Date: Wed Aug 15 11:22:03 2018 +0200 Remove annoying logs and add env vars for debugging commit fdc9fd624d13feadb602e0d03d58f8a44b7a565f Author: Ondrej Fabry Date: Wed Aug 15 11:18:47 2018 +0200 Fix printing unknown VPPApiError commit 8f968be36a91de4d4a8ea17593ba314f82aa9583 Author: Ondrej Fabry Date: Tue Aug 14 17:25:10 2018 +0200 Refactor entire GoVPP - fix some cases with inconsistent VPP messages, causing messages to be incorrectly identified as event or request - simplify API, remove direct access to internal Go channels - add module name with message to registration of messages - start watching filesystem only when vpe-api file does not exist - simplify code in message codec and remove unneeded parts - retrieve IDs of all registered messages after connect to VPP - define fallback for control ping in core to avoid duplicate registration - add SetLogLevel function to set logger level more easily - remove lot of unused code commit 34dd1b7e10ef0324aa8c4e4cc42375bd6021c6cb Author: Ondrej Fabry Date: Mon Aug 13 11:29:54 2018 +0200 Rename VnetError to VPPApiError commit c6549d6f77847a1367a12ff47fb716e2955e973a Author: Ondrej Fabry Date: Mon Aug 13 10:23:43 2018 +0200 Fix examples and regenerate binapi commit 4612e36b416779771f5efab4fc654c2766d2cb1c Author: Ondrej Fabry Date: Mon Aug 13 09:51:22 2018 +0200 Add parsing and generation for services commit ac9c5280c5aa27e325f327609e2364cc66f3723f Author: Ondrej Fabry Date: Fri Aug 10 14:30:15 2018 +0200 Fix exit status on error and add continue-onerror flag commit 9b3f4ef9fc7c8c62037fa107085eae18a8725314 Author: Ondrej Fabry Date: Thu Aug 9 15:20:56 2018 +0200 Return VnetError when Retval != 0 commit 8fd21a907b5e628ec4d2026215b83d15da96c297 Author: Ondrej Fabry Date: Thu Aug 9 14:59:05 2018 +0200 Add all missing errors from api_errno.h commit 08450f288d3046ebaecf40203174ae342a07f1eb Author: Ondrej Fabry Date: Thu Aug 9 14:29:27 2018 +0200 Update README commit d8dced0728dd62243539be741868fb7d9b8de4cc Author: Ondrej Fabry Date: Thu Aug 9 13:59:59 2018 +0200 Regenerate vpe in core commit 254da7592cdbf634cf7aa46ae36ce7bb6d4ee555 Author: Ondrej Fabry Date: Thu Aug 9 13:37:00 2018 +0200 Add VnetError type for Retvals commit 4475c1087fb53ab4c788e530bc7fef7cfc89d2cd Author: Ondrej Fabry Date: Thu Aug 9 13:36:07 2018 +0200 Add registration API commit 892a3ea5a2c703e2f7c29331663f6a6fa706bff5 Author: Ondrej Fabry Date: Thu Aug 9 13:30:43 2018 +0200 Generate registration for messages and check all IDs on connect commit 389ed03b6e7082260281866c3449d72d72347c99 Author: Ondrej Fabry Date: Thu Aug 9 11:32:41 2018 +0200 Show error for empty adapter (on Darwin/Windows) commit ef1ea040d656ade64242432dc5f06810ed8dcde6 Author: Ondrej Fabry Date: Thu Aug 9 11:31:37 2018 +0200 Improve logged info commit d4adae3b14ed54c8d693060dd857fa9ba5ec8e06 Author: Ondrej Fabry Date: Thu Aug 9 11:27:48 2018 +0200 Update examples commit 63921e1346014701a22639a2611129563bb1eb78 Author: Ondrej Fabry Date: Thu Aug 9 11:02:56 2018 +0200 Generate unions and fix some issues - add comments between sections - define structs on single line if it has no fields - generate unions with setters/getters for each field - fix detection of message type commit 6ab3e3fa590b245898306a6ffaf32c7721eab60c Author: Ondrej Fabry Date: Wed Aug 8 15:37:10 2018 +0200 Refactor binapi-generator - split JSON parsing from code generation - parse and generate enums - parse unions (no generation yet) - change output file suffix to '.ba.go' - cleanup and simplify code - split code into files - add flag for debug mode Change-Id: I58f685e0d4c7a38e9a7b6ea0a1f47792d95d7399 Signed-off-by: Ondrej Fabry --- examples/bin_api/acl.api.json | 252 +- examples/bin_api/acl/acl.ba.go | 1757 +++++++++ examples/bin_api/acl/acl.go | 1493 -------- examples/bin_api/af_packet.api.json | 78 +- examples/bin_api/af_packet/af_packet.ba.go | 379 ++ examples/bin_api/af_packet/af_packet.go | 266 -- examples/bin_api/gen.go | 4 + examples/bin_api/interface.api.json | 471 +-- examples/bin_api/interfaces/interfaces.ba.go | 2453 +++++++++++++ examples/bin_api/interfaces/interfaces.go | 2233 ------------ examples/bin_api/ip.api.json | 1194 ++++-- examples/bin_api/ip/ip.ba.go | 4976 ++++++++++++++++++++++++++ examples/bin_api/ip/ip.go | 3502 ------------------ examples/bin_api/memif.api.json | 144 +- examples/bin_api/memif/memif.ba.go | 546 +++ examples/bin_api/memif/memif.go | 344 -- examples/bin_api/stats.api.json | 508 ++- examples/bin_api/stats/stats.ba.go | 2265 ++++++++++++ examples/bin_api/stats/stats.go | 1560 -------- examples/bin_api/tap.api.json | 43 +- examples/bin_api/tap/tap.ba.go | 453 +++ examples/bin_api/tap/tap.go | 419 --- examples/cmd/simple-client/simple_client.go | 166 +- examples/cmd/stats-client/stats_client.go | 53 +- examples/cmd/union-example/union_example.go | 63 + 25 files changed, 15054 insertions(+), 10568 deletions(-) create mode 100644 examples/bin_api/acl/acl.ba.go delete mode 100644 examples/bin_api/acl/acl.go create mode 100644 examples/bin_api/af_packet/af_packet.ba.go delete mode 100644 examples/bin_api/af_packet/af_packet.go create mode 100644 examples/bin_api/gen.go create mode 100644 examples/bin_api/interfaces/interfaces.ba.go delete mode 100644 examples/bin_api/interfaces/interfaces.go create mode 100644 examples/bin_api/ip/ip.ba.go delete mode 100644 examples/bin_api/ip/ip.go create mode 100644 examples/bin_api/memif/memif.ba.go delete mode 100644 examples/bin_api/memif/memif.go create mode 100644 examples/bin_api/stats/stats.ba.go delete mode 100644 examples/bin_api/stats/stats.go create mode 100644 examples/bin_api/tap/tap.ba.go delete mode 100644 examples/bin_api/tap/tap.go create mode 100644 examples/cmd/union-example/union_example.go (limited to 'examples') diff --git a/examples/bin_api/acl.api.json b/examples/bin_api/acl.api.json index 4c6653c..13b8665 100644 --- a/examples/bin_api/acl.api.json +++ b/examples/bin_api/acl.api.json @@ -1,87 +1,4 @@ { - "services": [ - { - "acl_interface_add_del": { - "reply": "acl_interface_add_del_reply" - } - }, - { - "acl_del": { - "reply": "acl_del_reply" - } - }, - { - "macip_acl_del": { - "reply": "macip_acl_del_reply" - } - }, - { - "acl_plugin_get_version": { - "reply": "acl_plugin_get_version_reply" - } - }, - { - "macip_acl_interface_add_del": { - "reply": "macip_acl_interface_add_del_reply" - } - }, - { - "acl_interface_set_acl_list": { - "reply": "acl_interface_set_acl_list_reply" - } - }, - { - "acl_dump": { - "reply": "acl_details", - "stream": true - } - }, - { - "acl_interface_list_dump": { - "reply": "acl_interface_list_details", - "stream": true - } - }, - { - "macip_acl_interface_list_dump": { - "reply": "macip_acl_interface_list_details", - "stream": true - } - }, - { - "acl_add_replace": { - "reply": "acl_add_replace_reply" - } - }, - { - "acl_plugin_control_ping": { - "reply": "acl_plugin_control_ping_reply" - } - }, - { - "macip_acl_interface_get": { - "reply": "macip_acl_interface_get_reply" - } - }, - { - "macip_acl_add": { - "reply": "macip_acl_add_reply" - } - }, - { - "macip_acl_add_replace": { - "reply": "macip_acl_add_replace_reply" - } - }, - { - "macip_acl_dump": { - "reply": "macip_acl_details", - "stream": true - } - } - ], - "vl_api_version": "0x1db2ece9", - "enums": [], "messages": [ [ "acl_plugin_get_version", @@ -829,8 +746,177 @@ { "crc": "0x29783fa0" } + ], + [ + "acl_interface_set_etype_whitelist", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "u32", + "sw_if_index" + ], + [ + "u8", + "count" + ], + [ + "u8", + "n_input" + ], + [ + "u16", + "whitelist", + 0, + "count" + ], + { + "crc": "0xf515efc5" + } + ], + [ + "acl_interface_set_etype_whitelist_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ], + [ + "acl_interface_etype_whitelist_dump", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "u32", + "sw_if_index" + ], + { + "crc": "0x529cb13f" + } + ], + [ + "acl_interface_etype_whitelist_details", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "u32", + "sw_if_index" + ], + [ + "u8", + "count" + ], + [ + "u8", + "n_input" + ], + [ + "u16", + "whitelist", + 0, + "count" + ], + { + "crc": "0x6a5d4e81" + } ] ], + "vl_api_version": "0x25a6e1e9", + "unions": [], + "services": { + "acl_plugin_get_version": { + "reply": "acl_plugin_get_version_reply" + }, + "acl_dump": { + "reply": "acl_details", + "stream": true + }, + "acl_interface_add_del": { + "reply": "acl_interface_add_del_reply" + }, + "acl_del": { + "reply": "acl_del_reply" + }, + "acl_plugin_control_ping": { + "reply": "acl_plugin_control_ping_reply" + }, + "macip_acl_interface_get": { + "reply": "macip_acl_interface_get_reply" + }, + "acl_interface_etype_whitelist_dump": { + "reply": "acl_interface_etype_whitelist_details", + "stream": true + }, + "macip_acl_interface_add_del": { + "reply": "macip_acl_interface_add_del_reply" + }, + "macip_acl_del": { + "reply": "macip_acl_del_reply" + }, + "macip_acl_add": { + "reply": "macip_acl_add_reply" + }, + "acl_interface_list_dump": { + "reply": "acl_interface_list_details", + "stream": true + }, + "acl_interface_set_acl_list": { + "reply": "acl_interface_set_acl_list_reply" + }, + "acl_add_replace": { + "reply": "acl_add_replace_reply" + }, + "acl_interface_set_etype_whitelist": { + "reply": "acl_interface_set_etype_whitelist_reply" + }, + "macip_acl_add_replace": { + "reply": "macip_acl_add_replace_reply" + }, + "macip_acl_dump": { + "reply": "macip_acl_details", + "stream": true + }, + "macip_acl_interface_list_dump": { + "reply": "macip_acl_interface_list_details", + "stream": true + } + }, + "enums": [], "types": [ [ "acl_rule", diff --git a/examples/bin_api/acl/acl.ba.go b/examples/bin_api/acl/acl.ba.go new file mode 100644 index 0000000..ff80173 --- /dev/null +++ b/examples/bin_api/acl/acl.ba.go @@ -0,0 +1,1757 @@ +// Code generated by GoVPP binapi-generator. DO NOT EDIT. +// source: acl.api.json + +/* +Package acl is a generated VPP binary API of the 'acl' VPP module. + +It is generated from this file: + acl.api.json + +It contains these VPP binary API objects: + 34 messages + 2 types + 17 services +*/ +package acl + +import "git.fd.io/govpp.git/api" +import "github.com/lunixbochs/struc" +import "bytes" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = struc.Pack +var _ = bytes.NewBuffer + +/* Types */ + +// ACLRule represents the VPP binary API type 'acl_rule'. +// Generated from 'acl.api.json', line 922: +// +// "acl_rule", +// [ +// "u8", +// "is_permit" +// ], +// [ +// "u8", +// "is_ipv6" +// ], +// [ +// "u8", +// "src_ip_addr", +// 16 +// ], +// [ +// "u8", +// "src_ip_prefix_len" +// ], +// [ +// "u8", +// "dst_ip_addr", +// 16 +// ], +// [ +// "u8", +// "dst_ip_prefix_len" +// ], +// [ +// "u8", +// "proto" +// ], +// [ +// "u16", +// "srcport_or_icmptype_first" +// ], +// [ +// "u16", +// "srcport_or_icmptype_last" +// ], +// [ +// "u16", +// "dstport_or_icmpcode_first" +// ], +// [ +// "u16", +// "dstport_or_icmpcode_last" +// ], +// [ +// "u8", +// "tcp_flags_mask" +// ], +// [ +// "u8", +// "tcp_flags_value" +// ], +// { +// "crc": "0x6f99bf4d" +// } +// +type ACLRule struct { + IsPermit uint8 + IsIPv6 uint8 + SrcIPAddr []byte `struc:"[16]byte"` + SrcIPPrefixLen uint8 + DstIPAddr []byte `struc:"[16]byte"` + DstIPPrefixLen uint8 + Proto uint8 + SrcportOrIcmptypeFirst uint16 + SrcportOrIcmptypeLast uint16 + DstportOrIcmpcodeFirst uint16 + DstportOrIcmpcodeLast uint16 + TCPFlagsMask uint8 + TCPFlagsValue uint8 +} + +func (*ACLRule) GetTypeName() string { + return "acl_rule" +} +func (*ACLRule) GetCrcString() string { + return "6f99bf4d" +} + +// MacipACLRule represents the VPP binary API type 'macip_acl_rule'. +// Generated from 'acl.api.json', line 982: +// +// "macip_acl_rule", +// [ +// "u8", +// "is_permit" +// ], +// [ +// "u8", +// "is_ipv6" +// ], +// [ +// "u8", +// "src_mac", +// 6 +// ], +// [ +// "u8", +// "src_mac_mask", +// 6 +// ], +// [ +// "u8", +// "src_ip_addr", +// 16 +// ], +// [ +// "u8", +// "src_ip_prefix_len" +// ], +// { +// "crc": "0x70589f1e" +// } +// +type MacipACLRule struct { + IsPermit uint8 + IsIPv6 uint8 + SrcMac []byte `struc:"[6]byte"` + SrcMacMask []byte `struc:"[6]byte"` + SrcIPAddr []byte `struc:"[16]byte"` + SrcIPPrefixLen uint8 +} + +func (*MacipACLRule) GetTypeName() string { + return "macip_acl_rule" +} +func (*MacipACLRule) GetCrcString() string { + return "70589f1e" +} + +/* Messages */ + +// ACLPluginGetVersion represents the VPP binary API message 'acl_plugin_get_version'. +// Generated from 'acl.api.json', line 4: +// +// "acl_plugin_get_version", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// { +// "crc": "0x51077d14" +// } +// +type ACLPluginGetVersion struct{} + +func (*ACLPluginGetVersion) GetMessageName() string { + return "acl_plugin_get_version" +} +func (*ACLPluginGetVersion) GetCrcString() string { + return "51077d14" +} +func (*ACLPluginGetVersion) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewACLPluginGetVersion() api.Message { + return &ACLPluginGetVersion{} +} + +// ACLPluginGetVersionReply represents the VPP binary API message 'acl_plugin_get_version_reply'. +// Generated from 'acl.api.json', line 22: +// +// "acl_plugin_get_version_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "major" +// ], +// [ +// "u32", +// "minor" +// ], +// { +// "crc": "0x9b32cf86" +// } +// +type ACLPluginGetVersionReply struct { + Major uint32 + Minor uint32 +} + +func (*ACLPluginGetVersionReply) GetMessageName() string { + return "acl_plugin_get_version_reply" +} +func (*ACLPluginGetVersionReply) GetCrcString() string { + return "9b32cf86" +} +func (*ACLPluginGetVersionReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewACLPluginGetVersionReply() api.Message { + return &ACLPluginGetVersionReply{} +} + +// ACLPluginControlPing represents the VPP binary API message 'acl_plugin_control_ping'. +// Generated from 'acl.api.json', line 44: +// +// "acl_plugin_control_ping", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// { +// "crc": "0x51077d14" +// } +// +type ACLPluginControlPing struct{} + +func (*ACLPluginControlPing) GetMessageName() string { + return "acl_plugin_control_ping" +} +func (*ACLPluginControlPing) GetCrcString() string { + return "51077d14" +} +func (*ACLPluginControlPing) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewACLPluginControlPing() api.Message { + return &ACLPluginControlPing{} +} + +// ACLPluginControlPingReply represents the VPP binary API message 'acl_plugin_control_ping_reply'. +// Generated from 'acl.api.json', line 62: +// +// "acl_plugin_control_ping_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "vpe_pid" +// ], +// { +// "crc": "0xf6b0b8ca" +// } +// +type ACLPluginControlPingReply struct { + Retval int32 + ClientIndex uint32 + VpePID uint32 +} + +func (*ACLPluginControlPingReply) GetMessageName() string { + return "acl_plugin_control_ping_reply" +} +func (*ACLPluginControlPingReply) GetCrcString() string { + return "f6b0b8ca" +} +func (*ACLPluginControlPingReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewACLPluginControlPingReply() api.Message { + return &ACLPluginControlPingReply{} +} + +// ACLAddReplace represents the VPP binary API message 'acl_add_replace'. +// Generated from 'acl.api.json', line 88: +// +// "acl_add_replace", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "acl_index" +// ], +// [ +// "u8", +// "tag", +// 64 +// ], +// [ +// "u32", +// "count" +// ], +// [ +// "vl_api_acl_rule_t", +// "r", +// 0, +// "count" +// ], +// { +// "crc": "0xe839997e" +// } +// +type ACLAddReplace struct { + ACLIndex uint32 + Tag []byte `struc:"[64]byte"` + Count uint32 `struc:"sizeof=R"` + R []ACLRule +} + +func (*ACLAddReplace) GetMessageName() string { + return "acl_add_replace" +} +func (*ACLAddReplace) GetCrcString() string { + return "e839997e" +} +func (*ACLAddReplace) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewACLAddReplace() api.Message { + return &ACLAddReplace{} +} + +// ACLAddReplaceReply represents the VPP binary API message 'acl_add_replace_reply'. +// Generated from 'acl.api.json', line 125: +// +// "acl_add_replace_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "acl_index" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xac407b0c" +// } +// +type ACLAddReplaceReply struct { + ACLIndex uint32 + Retval int32 +} + +func (*ACLAddReplaceReply) GetMessageName() string { + return "acl_add_replace_reply" +} +func (*ACLAddReplaceReply) GetCrcString() string { + return "ac407b0c" +} +func (*ACLAddReplaceReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewACLAddReplaceReply() api.Message { + return &ACLAddReplaceReply{} +} + +// ACLDel represents the VPP binary API message 'acl_del'. +// Generated from 'acl.api.json', line 147: +// +// "acl_del", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "acl_index" +// ], +// { +// "crc": "0xef34fea4" +// } +// +type ACLDel struct { + ACLIndex uint32 +} + +func (*ACLDel) GetMessageName() string { + return "acl_del" +} +func (*ACLDel) GetCrcString() string { + return "ef34fea4" +} +func (*ACLDel) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewACLDel() api.Message { + return &ACLDel{} +} + +// ACLDelReply represents the VPP binary API message 'acl_del_reply'. +// Generated from 'acl.api.json', line 169: +// +// "acl_del_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type ACLDelReply struct { + Retval int32 +} + +func (*ACLDelReply) GetMessageName() string { + return "acl_del_reply" +} +func (*ACLDelReply) GetCrcString() string { + return "e8d4e804" +} +func (*ACLDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewACLDelReply() api.Message { + return &ACLDelReply{} +} + +// ACLInterfaceAddDel represents the VPP binary API message 'acl_interface_add_del'. +// Generated from 'acl.api.json', line 187: +// +// "acl_interface_add_del", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "is_add" +// ], +// [ +// "u8", +// "is_input" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u32", +// "acl_index" +// ], +// { +// "crc": "0x0b2aedd1" +// } +// +type ACLInterfaceAddDel struct { + IsAdd uint8 + IsInput uint8 + SwIfIndex uint32 + ACLIndex uint32 +} + +func (*ACLInterfaceAddDel) GetMessageName() string { + return "acl_interface_add_del" +} +func (*ACLInterfaceAddDel) GetCrcString() string { + return "0b2aedd1" +} +func (*ACLInterfaceAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewACLInterfaceAddDel() api.Message { + return &ACLInterfaceAddDel{} +} + +// ACLInterfaceAddDelReply represents the VPP binary API message 'acl_interface_add_del_reply'. +// Generated from 'acl.api.json', line 221: +// +// "acl_interface_add_del_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type ACLInterfaceAddDelReply struct { + Retval int32 +} + +func (*ACLInterfaceAddDelReply) GetMessageName() string { + return "acl_interface_add_del_reply" +} +func (*ACLInterfaceAddDelReply) GetCrcString() string { + return "e8d4e804" +} +func (*ACLInterfaceAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewACLInterfaceAddDelReply() api.Message { + return &ACLInterfaceAddDelReply{} +} + +// ACLInterfaceSetACLList represents the VPP binary API message 'acl_interface_set_acl_list'. +// Generated from 'acl.api.json', line 239: +// +// "acl_interface_set_acl_list", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "count" +// ], +// [ +// "u8", +// "n_input" +// ], +// [ +// "u32", +// "acls", +// 0, +// "count" +// ], +// { +// "crc": "0x8baece38" +// } +// +type ACLInterfaceSetACLList struct { + SwIfIndex uint32 + Count uint8 `struc:"sizeof=Acls"` + NInput uint8 + Acls []uint32 +} + +func (*ACLInterfaceSetACLList) GetMessageName() string { + return "acl_interface_set_acl_list" +} +func (*ACLInterfaceSetACLList) GetCrcString() string { + return "8baece38" +} +func (*ACLInterfaceSetACLList) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewACLInterfaceSetACLList() api.Message { + return &ACLInterfaceSetACLList{} +} + +// ACLInterfaceSetACLListReply represents the VPP binary API message 'acl_interface_set_acl_list_reply'. +// Generated from 'acl.api.json', line 275: +// +// "acl_interface_set_acl_list_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type ACLInterfaceSetACLListReply struct { + Retval int32 +} + +func (*ACLInterfaceSetACLListReply) GetMessageName() string { + return "acl_interface_set_acl_list_reply" +} +func (*ACLInterfaceSetACLListReply) GetCrcString() string { + return "e8d4e804" +} +func (*ACLInterfaceSetACLListReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewACLInterfaceSetACLListReply() api.Message { + return &ACLInterfaceSetACLListReply{} +} + +// ACLDump represents the VPP binary API message 'acl_dump'. +// Generated from 'acl.api.json', line 293: +// +// "acl_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "acl_index" +// ], +// { +// "crc": "0xef34fea4" +// } +// +type ACLDump struct { + ACLIndex uint32 +} + +func (*ACLDump) GetMessageName() string { + return "acl_dump" +} +func (*ACLDump) GetCrcString() string { + return "ef34fea4" +} +func (*ACLDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewACLDump() api.Message { + return &ACLDump{} +} + +// ACLDetails represents the VPP binary API message 'acl_details'. +// Generated from 'acl.api.json', line 315: +// +// "acl_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "acl_index" +// ], +// [ +// "u8", +// "tag", +// 64 +// ], +// [ +// "u32", +// "count" +// ], +// [ +// "vl_api_acl_rule_t", +// "r", +// 0, +// "count" +// ], +// { +// "crc": "0x5bd895be" +// } +// +type ACLDetails struct { + ACLIndex uint32 + Tag []byte `struc:"[64]byte"` + Count uint32 `struc:"sizeof=R"` + R []ACLRule +} + +func (*ACLDetails) GetMessageName() string { + return "acl_details" +} +func (*ACLDetails) GetCrcString() string { + return "5bd895be" +} +func (*ACLDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewACLDetails() api.Message { + return &ACLDetails{} +} + +// ACLInterfaceListDump represents the VPP binary API message 'acl_interface_list_dump'. +// Generated from 'acl.api.json', line 348: +// +// "acl_interface_list_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0x529cb13f" +// } +// +type ACLInterfaceListDump struct { + SwIfIndex uint32 +} + +func (*ACLInterfaceListDump) GetMessageName() string { + return "acl_interface_list_dump" +} +func (*ACLInterfaceListDump) GetCrcString() string { + return "529cb13f" +} +func (*ACLInterfaceListDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewACLInterfaceListDump() api.Message { + return &ACLInterfaceListDump{} +} + +// ACLInterfaceListDetails represents the VPP binary API message 'acl_interface_list_details'. +// Generated from 'acl.api.json', line 370: +// +// "acl_interface_list_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "count" +// ], +// [ +// "u8", +// "n_input" +// ], +// [ +// "u32", +// "acls", +// 0, +// "count" +// ], +// { +// "crc": "0xd5e80809" +// } +// +type ACLInterfaceListDetails struct { + SwIfIndex uint32 + Count uint8 `struc:"sizeof=Acls"` + NInput uint8 + Acls []uint32 +} + +func (*ACLInterfaceListDetails) GetMessageName() string { + return "acl_interface_list_details" +} +func (*ACLInterfaceListDetails) GetCrcString() string { + return "d5e80809" +} +func (*ACLInterfaceListDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewACLInterfaceListDetails() api.Message { + return &ACLInterfaceListDetails{} +} + +// MacipACLAdd represents the VPP binary API message 'macip_acl_add'. +// Generated from 'acl.api.json', line 402: +// +// "macip_acl_add", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "tag", +// 64 +// ], +// [ +// "u32", +// "count" +// ], +// [ +// "vl_api_macip_acl_rule_t", +// "r", +// 0, +// "count" +// ], +// { +// "crc": "0xb3d3d65a" +// } +// +type MacipACLAdd struct { + Tag []byte `struc:"[64]byte"` + Count uint32 `struc:"sizeof=R"` + R []MacipACLRule +} + +func (*MacipACLAdd) GetMessageName() string { + return "macip_acl_add" +} +func (*MacipACLAdd) GetCrcString() string { + return "b3d3d65a" +} +func (*MacipACLAdd) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewMacipACLAdd() api.Message { + return &MacipACLAdd{} +} + +// MacipACLAddReply represents the VPP binary API message 'macip_acl_add_reply'. +// Generated from 'acl.api.json', line 435: +// +// "macip_acl_add_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "acl_index" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xac407b0c" +// } +// +type MacipACLAddReply struct { + ACLIndex uint32 + Retval int32 +} + +func (*MacipACLAddReply) GetMessageName() string { + return "macip_acl_add_reply" +} +func (*MacipACLAddReply) GetCrcString() string { + return "ac407b0c" +} +func (*MacipACLAddReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewMacipACLAddReply() api.Message { + return &MacipACLAddReply{} +} + +// MacipACLAddReplace represents the VPP binary API message 'macip_acl_add_replace'. +// Generated from 'acl.api.json', line 457: +// +// "macip_acl_add_replace", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "acl_index" +// ], +// [ +// "u8", +// "tag", +// 64 +// ], +// [ +// "u32", +// "count" +// ], +// [ +// "vl_api_macip_acl_rule_t", +// "r", +// 0, +// "count" +// ], +// { +// "crc": "0xa0e8c01b" +// } +// +type MacipACLAddReplace struct { + ACLIndex uint32 + Tag []byte `struc:"[64]byte"` + Count uint32 `struc:"sizeof=R"` + R []MacipACLRule +} + +func (*MacipACLAddReplace) GetMessageName() string { + return "macip_acl_add_replace" +} +func (*MacipACLAddReplace) GetCrcString() string { + return "a0e8c01b" +} +func (*MacipACLAddReplace) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewMacipACLAddReplace() api.Message { + return &MacipACLAddReplace{} +} + +// MacipACLAddReplaceReply represents the VPP binary API message 'macip_acl_add_replace_reply'. +// Generated from 'acl.api.json', line 494: +// +// "macip_acl_add_replace_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "acl_index" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xac407b0c" +// } +// +type MacipACLAddReplaceReply struct { + ACLIndex uint32 + Retval int32 +} + +func (*MacipACLAddReplaceReply) GetMessageName() string { + return "macip_acl_add_replace_reply" +} +func (*MacipACLAddReplaceReply) GetCrcString() string { + return "ac407b0c" +} +func (*MacipACLAddReplaceReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewMacipACLAddReplaceReply() api.Message { + return &MacipACLAddReplaceReply{} +} + +// MacipACLDel represents the VPP binary API message 'macip_acl_del'. +// Generated from 'acl.api.json', line 516: +// +// "macip_acl_del", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "acl_index" +// ], +// { +// "crc": "0xef34fea4" +// } +// +type MacipACLDel struct { + ACLIndex uint32 +} + +func (*MacipACLDel) GetMessageName() string { + return "macip_acl_del" +} +func (*MacipACLDel) GetCrcString() string { + return "ef34fea4" +} +func (*MacipACLDel) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewMacipACLDel() api.Message { + return &MacipACLDel{} +} + +// MacipACLDelReply represents the VPP binary API message 'macip_acl_del_reply'. +// Generated from 'acl.api.json', line 538: +// +// "macip_acl_del_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type MacipACLDelReply struct { + Retval int32 +} + +func (*MacipACLDelReply) GetMessageName() string { + return "macip_acl_del_reply" +} +func (*MacipACLDelReply) GetCrcString() string { + return "e8d4e804" +} +func (*MacipACLDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewMacipACLDelReply() api.Message { + return &MacipACLDelReply{} +} + +// MacipACLInterfaceAddDel represents the VPP binary API message 'macip_acl_interface_add_del'. +// Generated from 'acl.api.json', line 556: +// +// "macip_acl_interface_add_del", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "is_add" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u32", +// "acl_index" +// ], +// { +// "crc": "0x6a6be97c" +// } +// +type MacipACLInterfaceAddDel struct { + IsAdd uint8 + SwIfIndex uint32 + ACLIndex uint32 +} + +func (*MacipACLInterfaceAddDel) GetMessageName() string { + return "macip_acl_interface_add_del" +} +func (*MacipACLInterfaceAddDel) GetCrcString() string { + return "6a6be97c" +} +func (*MacipACLInterfaceAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewMacipACLInterfaceAddDel() api.Message { + return &MacipACLInterfaceAddDel{} +} + +// MacipACLInterfaceAddDelReply represents the VPP binary API message 'macip_acl_interface_add_del_reply'. +// Generated from 'acl.api.json', line 586: +// +// "macip_acl_interface_add_del_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type MacipACLInterfaceAddDelReply struct { + Retval int32 +} + +func (*MacipACLInterfaceAddDelReply) GetMessageName() string { + return "macip_acl_interface_add_del_reply" +} +func (*MacipACLInterfaceAddDelReply) GetCrcString() string { + return "e8d4e804" +} +func (*MacipACLInterfaceAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewMacipACLInterfaceAddDelReply() api.Message { + return &MacipACLInterfaceAddDelReply{} +} + +// MacipACLDump represents the VPP binary API message 'macip_acl_dump'. +// Generated from 'acl.api.json', line 604: +// +// "macip_acl_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "acl_index" +// ], +// { +// "crc": "0xef34fea4" +// } +// +type MacipACLDump struct { + ACLIndex uint32 +} + +func (*MacipACLDump) GetMessageName() string { + return "macip_acl_dump" +} +func (*MacipACLDump) GetCrcString() string { + return "ef34fea4" +} +func (*MacipACLDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewMacipACLDump() api.Message { + return &MacipACLDump{} +} + +// MacipACLDetails represents the VPP binary API message 'macip_acl_details'. +// Generated from 'acl.api.json', line 626: +// +// "macip_acl_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "acl_index" +// ], +// [ +// "u8", +// "tag", +// 64 +// ], +// [ +// "u32", +// "count" +// ], +// [ +// "vl_api_macip_acl_rule_t", +// "r", +// 0, +// "count" +// ], +// { +// "crc": "0xdd2b55ba" +// } +// +type MacipACLDetails struct { + ACLIndex uint32 + Tag []byte `struc:"[64]byte"` + Count uint32 `struc:"sizeof=R"` + R []MacipACLRule +} + +func (*MacipACLDetails) GetMessageName() string { + return "macip_acl_details" +} +func (*MacipACLDetails) GetCrcString() string { + return "dd2b55ba" +} +func (*MacipACLDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewMacipACLDetails() api.Message { + return &MacipACLDetails{} +} + +// MacipACLInterfaceGet represents the VPP binary API message 'macip_acl_interface_get'. +// Generated from 'acl.api.json', line 659: +// +// "macip_acl_interface_get", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// { +// "crc": "0x51077d14" +// } +// +type MacipACLInterfaceGet struct{} + +func (*MacipACLInterfaceGet) GetMessageName() string { + return "macip_acl_interface_get" +} +func (*MacipACLInterfaceGet) GetCrcString() string { + return "51077d14" +} +func (*MacipACLInterfaceGet) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewMacipACLInterfaceGet() api.Message { + return &MacipACLInterfaceGet{} +} + +// MacipACLInterfaceGetReply represents the VPP binary API message 'macip_acl_interface_get_reply'. +// Generated from 'acl.api.json', line 677: +// +// "macip_acl_interface_get_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "count" +// ], +// [ +// "u32", +// "acls", +// 0, +// "count" +// ], +// { +// "crc": "0xaccf9b05" +// } +// +type MacipACLInterfaceGetReply struct { + Count uint32 `struc:"sizeof=Acls"` + Acls []uint32 +} + +func (*MacipACLInterfaceGetReply) GetMessageName() string { + return "macip_acl_interface_get_reply" +} +func (*MacipACLInterfaceGetReply) GetCrcString() string { + return "accf9b05" +} +func (*MacipACLInterfaceGetReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewMacipACLInterfaceGetReply() api.Message { + return &MacipACLInterfaceGetReply{} +} + +// MacipACLInterfaceListDump represents the VPP binary API message 'macip_acl_interface_list_dump'. +// Generated from 'acl.api.json', line 701: +// +// "macip_acl_interface_list_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0x529cb13f" +// } +// +type MacipACLInterfaceListDump struct { + SwIfIndex uint32 +} + +func (*MacipACLInterfaceListDump) GetMessageName() string { + return "macip_acl_interface_list_dump" +} +func (*MacipACLInterfaceListDump) GetCrcString() string { + return "529cb13f" +} +func (*MacipACLInterfaceListDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewMacipACLInterfaceListDump() api.Message { + return &MacipACLInterfaceListDump{} +} + +// MacipACLInterfaceListDetails represents the VPP binary API message 'macip_acl_interface_list_details'. +// Generated from 'acl.api.json', line 723: +// +// "macip_acl_interface_list_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "count" +// ], +// [ +// "u32", +// "acls", +// 0, +// "count" +// ], +// { +// "crc": "0x29783fa0" +// } +// +type MacipACLInterfaceListDetails struct { + SwIfIndex uint32 + Count uint8 `struc:"sizeof=Acls"` + Acls []uint32 +} + +func (*MacipACLInterfaceListDetails) GetMessageName() string { + return "macip_acl_interface_list_details" +} +func (*MacipACLInterfaceListDetails) GetCrcString() string { + return "29783fa0" +} +func (*MacipACLInterfaceListDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewMacipACLInterfaceListDetails() api.Message { + return &MacipACLInterfaceListDetails{} +} + +// ACLInterfaceSetEtypeWhitelist represents the VPP binary API message 'acl_interface_set_etype_whitelist'. +// Generated from 'acl.api.json', line 751: +// +// "acl_interface_set_etype_whitelist", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "count" +// ], +// [ +// "u8", +// "n_input" +// ], +// [ +// "u16", +// "whitelist", +// 0, +// "count" +// ], +// { +// "crc": "0xf515efc5" +// } +// +type ACLInterfaceSetEtypeWhitelist struct { + SwIfIndex uint32 + Count uint8 `struc:"sizeof=Whitelist"` + NInput uint8 + Whitelist []uint16 +} + +func (*ACLInterfaceSetEtypeWhitelist) GetMessageName() string { + return "acl_interface_set_etype_whitelist" +} +func (*ACLInterfaceSetEtypeWhitelist) GetCrcString() string { + return "f515efc5" +} +func (*ACLInterfaceSetEtypeWhitelist) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewACLInterfaceSetEtypeWhitelist() api.Message { + return &ACLInterfaceSetEtypeWhitelist{} +} + +// ACLInterfaceSetEtypeWhitelistReply represents the VPP binary API message 'acl_interface_set_etype_whitelist_reply'. +// Generated from 'acl.api.json', line 787: +// +// "acl_interface_set_etype_whitelist_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type ACLInterfaceSetEtypeWhitelistReply struct { + Retval int32 +} + +func (*ACLInterfaceSetEtypeWhitelistReply) GetMessageName() string { + return "acl_interface_set_etype_whitelist_reply" +} +func (*ACLInterfaceSetEtypeWhitelistReply) GetCrcString() string { + return "e8d4e804" +} +func (*ACLInterfaceSetEtypeWhitelistReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewACLInterfaceSetEtypeWhitelistReply() api.Message { + return &ACLInterfaceSetEtypeWhitelistReply{} +} + +// ACLInterfaceEtypeWhitelistDump represents the VPP binary API message 'acl_interface_etype_whitelist_dump'. +// Generated from 'acl.api.json', line 805: +// +// "acl_interface_etype_whitelist_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0x529cb13f" +// } +// +type ACLInterfaceEtypeWhitelistDump struct { + SwIfIndex uint32 +} + +func (*ACLInterfaceEtypeWhitelistDump) GetMessageName() string { + return "acl_interface_etype_whitelist_dump" +} +func (*ACLInterfaceEtypeWhitelistDump) GetCrcString() string { + return "529cb13f" +} +func (*ACLInterfaceEtypeWhitelistDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewACLInterfaceEtypeWhitelistDump() api.Message { + return &ACLInterfaceEtypeWhitelistDump{} +} + +// ACLInterfaceEtypeWhitelistDetails represents the VPP binary API message 'acl_interface_etype_whitelist_details'. +// Generated from 'acl.api.json', line 827: +// +// "acl_interface_etype_whitelist_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "count" +// ], +// [ +// "u8", +// "n_input" +// ], +// [ +// "u16", +// "whitelist", +// 0, +// "count" +// ], +// { +// "crc": "0x6a5d4e81" +// } +// +type ACLInterfaceEtypeWhitelistDetails struct { + SwIfIndex uint32 + Count uint8 `struc:"sizeof=Whitelist"` + NInput uint8 + Whitelist []uint16 +} + +func (*ACLInterfaceEtypeWhitelistDetails) GetMessageName() string { + return "acl_interface_etype_whitelist_details" +} +func (*ACLInterfaceEtypeWhitelistDetails) GetCrcString() string { + return "6a5d4e81" +} +func (*ACLInterfaceEtypeWhitelistDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewACLInterfaceEtypeWhitelistDetails() api.Message { + return &ACLInterfaceEtypeWhitelistDetails{} +} + +/* Services */ + +type Services interface { + DumpACL(*ACLDump) (*ACLDetails, error) + DumpACLInterfaceEtypeWhitelist(*ACLInterfaceEtypeWhitelistDump) (*ACLInterfaceEtypeWhitelistDetails, error) + DumpACLInterfaceList(*ACLInterfaceListDump) (*ACLInterfaceListDetails, error) + DumpMacipACL(*MacipACLDump) (*MacipACLDetails, error) + DumpMacipACLInterfaceList(*MacipACLInterfaceListDump) (*MacipACLInterfaceListDetails, error) + ACLAddReplace(*ACLAddReplace) (*ACLAddReplaceReply, error) + ACLDel(*ACLDel) (*ACLDelReply, error) + ACLInterfaceAddDel(*ACLInterfaceAddDel) (*ACLInterfaceAddDelReply, error) + ACLInterfaceSetACLList(*ACLInterfaceSetACLList) (*ACLInterfaceSetACLListReply, error) + ACLInterfaceSetEtypeWhitelist(*ACLInterfaceSetEtypeWhitelist) (*ACLInterfaceSetEtypeWhitelistReply, error) + ACLPluginControlPing(*ACLPluginControlPing) (*ACLPluginControlPingReply, error) + ACLPluginGetVersion(*ACLPluginGetVersion) (*ACLPluginGetVersionReply, error) + MacipACLAdd(*MacipACLAdd) (*MacipACLAddReply, error) + MacipACLAddReplace(*MacipACLAddReplace) (*MacipACLAddReplaceReply, error) + MacipACLDel(*MacipACLDel) (*MacipACLDelReply, error) + MacipACLInterfaceAddDel(*MacipACLInterfaceAddDel) (*MacipACLInterfaceAddDelReply, error) + MacipACLInterfaceGet(*MacipACLInterfaceGet) (*MacipACLInterfaceGetReply, error) +} + +func init() { + api.RegisterMessage((*ACLPluginGetVersion)(nil), "acl.ACLPluginGetVersion") + api.RegisterMessage((*ACLPluginGetVersionReply)(nil), "acl.ACLPluginGetVersionReply") + api.RegisterMessage((*ACLPluginControlPing)(nil), "acl.ACLPluginControlPing") + api.RegisterMessage((*ACLPluginControlPingReply)(nil), "acl.ACLPluginControlPingReply") + api.RegisterMessage((*ACLAddReplace)(nil), "acl.ACLAddReplace") + api.RegisterMessage((*ACLAddReplaceReply)(nil), "acl.ACLAddReplaceReply") + api.RegisterMessage((*ACLDel)(nil), "acl.ACLDel") + api.RegisterMessage((*ACLDelReply)(nil), "acl.ACLDelReply") + api.RegisterMessage((*ACLInterfaceAddDel)(nil), "acl.ACLInterfaceAddDel") + api.RegisterMessage((*ACLInterfaceAddDelReply)(nil), "acl.ACLInterfaceAddDelReply") + api.RegisterMessage((*ACLInterfaceSetACLList)(nil), "acl.ACLInterfaceSetACLList") + api.RegisterMessage((*ACLInterfaceSetACLListReply)(nil), "acl.ACLInterfaceSetACLListReply") + api.RegisterMessage((*ACLDump)(nil), "acl.ACLDump") + api.RegisterMessage((*ACLDetails)(nil), "acl.ACLDetails") + api.RegisterMessage((*ACLInterfaceListDump)(nil), "acl.ACLInterfaceListDump") + api.RegisterMessage((*ACLInterfaceListDetails)(nil), "acl.ACLInterfaceListDetails") + api.RegisterMessage((*MacipACLAdd)(nil), "acl.MacipACLAdd") + api.RegisterMessage((*MacipACLAddReply)(nil), "acl.MacipACLAddReply") + api.RegisterMessage((*MacipACLAddReplace)(nil), "acl.MacipACLAddReplace") + api.RegisterMessage((*MacipACLAddReplaceReply)(nil), "acl.MacipACLAddReplaceReply") + api.RegisterMessage((*MacipACLDel)(nil), "acl.MacipACLDel") + api.RegisterMessage((*MacipACLDelReply)(nil), "acl.MacipACLDelReply") + api.RegisterMessage((*MacipACLInterfaceAddDel)(nil), "acl.MacipACLInterfaceAddDel") + api.RegisterMessage((*MacipACLInterfaceAddDelReply)(nil), "acl.MacipACLInterfaceAddDelReply") + api.RegisterMessage((*MacipACLDump)(nil), "acl.MacipACLDump") + api.RegisterMessage((*MacipACLDetails)(nil), "acl.MacipACLDetails") + api.RegisterMessage((*MacipACLInterfaceGet)(nil), "acl.MacipACLInterfaceGet") + api.RegisterMessage((*MacipACLInterfaceGetReply)(nil), "acl.MacipACLInterfaceGetReply") + api.RegisterMessage((*MacipACLInterfaceListDump)(nil), "acl.MacipACLInterfaceListDump") + api.RegisterMessage((*MacipACLInterfaceListDetails)(nil), "acl.MacipACLInterfaceListDetails") + api.RegisterMessage((*ACLInterfaceSetEtypeWhitelist)(nil), "acl.ACLInterfaceSetEtypeWhitelist") + api.RegisterMessage((*ACLInterfaceSetEtypeWhitelistReply)(nil), "acl.ACLInterfaceSetEtypeWhitelistReply") + api.RegisterMessage((*ACLInterfaceEtypeWhitelistDump)(nil), "acl.ACLInterfaceEtypeWhitelistDump") + api.RegisterMessage((*ACLInterfaceEtypeWhitelistDetails)(nil), "acl.ACLInterfaceEtypeWhitelistDetails") +} diff --git a/examples/bin_api/acl/acl.go b/examples/bin_api/acl/acl.go deleted file mode 100644 index f8bb944..0000000 --- a/examples/bin_api/acl/acl.go +++ /dev/null @@ -1,1493 +0,0 @@ -// Code generated by govpp binapi-generator DO NOT EDIT. -// Package acl represents the VPP binary API of the 'acl' VPP module. -// Generated from '../../bin_api/acl.api.json' -package acl - -import "git.fd.io/govpp.git/api" - -// VlApiVersion contains version of the API. -const VlAPIVersion = 0x1db2ece9 - -// ACLRule represents the VPP binary API data type 'acl_rule'. -// Generated from '../../bin_api/acl.api.json', line 836: -// -// "acl_rule", -// [ -// "u8", -// "is_permit" -// ], -// [ -// "u8", -// "is_ipv6" -// ], -// [ -// "u8", -// "src_ip_addr", -// 16 -// ], -// [ -// "u8", -// "src_ip_prefix_len" -// ], -// [ -// "u8", -// "dst_ip_addr", -// 16 -// ], -// [ -// "u8", -// "dst_ip_prefix_len" -// ], -// [ -// "u8", -// "proto" -// ], -// [ -// "u16", -// "srcport_or_icmptype_first" -// ], -// [ -// "u16", -// "srcport_or_icmptype_last" -// ], -// [ -// "u16", -// "dstport_or_icmpcode_first" -// ], -// [ -// "u16", -// "dstport_or_icmpcode_last" -// ], -// [ -// "u8", -// "tcp_flags_mask" -// ], -// [ -// "u8", -// "tcp_flags_value" -// ], -// { -// "crc": "0x6f99bf4d" -// } -// -type ACLRule struct { - IsPermit uint8 - IsIpv6 uint8 - SrcIPAddr []byte `struc:"[16]byte"` - SrcIPPrefixLen uint8 - DstIPAddr []byte `struc:"[16]byte"` - DstIPPrefixLen uint8 - Proto uint8 - SrcportOrIcmptypeFirst uint16 - SrcportOrIcmptypeLast uint16 - DstportOrIcmpcodeFirst uint16 - DstportOrIcmpcodeLast uint16 - TCPFlagsMask uint8 - TCPFlagsValue uint8 -} - -func (*ACLRule) GetTypeName() string { - return "acl_rule" -} -func (*ACLRule) GetCrcString() string { - return "6f99bf4d" -} - -// MacipACLRule represents the VPP binary API data type 'macip_acl_rule'. -// Generated from '../../bin_api/acl.api.json', line 896: -// -// "macip_acl_rule", -// [ -// "u8", -// "is_permit" -// ], -// [ -// "u8", -// "is_ipv6" -// ], -// [ -// "u8", -// "src_mac", -// 6 -// ], -// [ -// "u8", -// "src_mac_mask", -// 6 -// ], -// [ -// "u8", -// "src_ip_addr", -// 16 -// ], -// [ -// "u8", -// "src_ip_prefix_len" -// ], -// { -// "crc": "0x70589f1e" -// } -// -type MacipACLRule struct { - IsPermit uint8 - IsIpv6 uint8 - SrcMac []byte `struc:"[6]byte"` - SrcMacMask []byte `struc:"[6]byte"` - SrcIPAddr []byte `struc:"[16]byte"` - SrcIPPrefixLen uint8 -} - -func (*MacipACLRule) GetTypeName() string { - return "macip_acl_rule" -} -func (*MacipACLRule) GetCrcString() string { - return "70589f1e" -} - -// ACLPluginGetVersion represents the VPP binary API message 'acl_plugin_get_version'. -// Generated from '../../bin_api/acl.api.json', line 87: -// -// "acl_plugin_get_version", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// { -// "crc": "0x51077d14" -// } -// -type ACLPluginGetVersion struct { -} - -func (*ACLPluginGetVersion) GetMessageName() string { - return "acl_plugin_get_version" -} -func (*ACLPluginGetVersion) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*ACLPluginGetVersion) GetCrcString() string { - return "51077d14" -} -func NewACLPluginGetVersion() api.Message { - return &ACLPluginGetVersion{} -} - -// ACLPluginGetVersionReply represents the VPP binary API message 'acl_plugin_get_version_reply'. -// Generated from '../../bin_api/acl.api.json', line 105: -// -// "acl_plugin_get_version_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "major" -// ], -// [ -// "u32", -// "minor" -// ], -// { -// "crc": "0x9b32cf86" -// } -// -type ACLPluginGetVersionReply struct { - Major uint32 - Minor uint32 -} - -func (*ACLPluginGetVersionReply) GetMessageName() string { - return "acl_plugin_get_version_reply" -} -func (*ACLPluginGetVersionReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*ACLPluginGetVersionReply) GetCrcString() string { - return "9b32cf86" -} -func NewACLPluginGetVersionReply() api.Message { - return &ACLPluginGetVersionReply{} -} - -// ACLPluginControlPing represents the VPP binary API message 'acl_plugin_control_ping'. -// Generated from '../../bin_api/acl.api.json', line 127: -// -// "acl_plugin_control_ping", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// { -// "crc": "0x51077d14" -// } -// -type ACLPluginControlPing struct { -} - -func (*ACLPluginControlPing) GetMessageName() string { - return "acl_plugin_control_ping" -} -func (*ACLPluginControlPing) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*ACLPluginControlPing) GetCrcString() string { - return "51077d14" -} -func NewACLPluginControlPing() api.Message { - return &ACLPluginControlPing{} -} - -// ACLPluginControlPingReply represents the VPP binary API message 'acl_plugin_control_ping_reply'. -// Generated from '../../bin_api/acl.api.json', line 145: -// -// "acl_plugin_control_ping_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "vpe_pid" -// ], -// { -// "crc": "0xf6b0b8ca" -// } -// -type ACLPluginControlPingReply struct { - Retval int32 - ClientIndex uint32 - VpePid uint32 -} - -func (*ACLPluginControlPingReply) GetMessageName() string { - return "acl_plugin_control_ping_reply" -} -func (*ACLPluginControlPingReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*ACLPluginControlPingReply) GetCrcString() string { - return "f6b0b8ca" -} -func NewACLPluginControlPingReply() api.Message { - return &ACLPluginControlPingReply{} -} - -// ACLAddReplace represents the VPP binary API message 'acl_add_replace'. -// Generated from '../../bin_api/acl.api.json', line 171: -// -// "acl_add_replace", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "acl_index" -// ], -// [ -// "u8", -// "tag", -// 64 -// ], -// [ -// "u32", -// "count" -// ], -// [ -// "vl_api_acl_rule_t", -// "r", -// 0, -// "count" -// ], -// { -// "crc": "0xe839997e" -// } -// -type ACLAddReplace struct { - ACLIndex uint32 - Tag []byte `struc:"[64]byte"` - Count uint32 `struc:"sizeof=R"` - R []ACLRule -} - -func (*ACLAddReplace) GetMessageName() string { - return "acl_add_replace" -} -func (*ACLAddReplace) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*ACLAddReplace) GetCrcString() string { - return "e839997e" -} -func NewACLAddReplace() api.Message { - return &ACLAddReplace{} -} - -// ACLAddReplaceReply represents the VPP binary API message 'acl_add_replace_reply'. -// Generated from '../../bin_api/acl.api.json', line 208: -// -// "acl_add_replace_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "acl_index" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xac407b0c" -// } -// -type ACLAddReplaceReply struct { - ACLIndex uint32 - Retval int32 -} - -func (*ACLAddReplaceReply) GetMessageName() string { - return "acl_add_replace_reply" -} -func (*ACLAddReplaceReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*ACLAddReplaceReply) GetCrcString() string { - return "ac407b0c" -} -func NewACLAddReplaceReply() api.Message { - return &ACLAddReplaceReply{} -} - -// ACLDel represents the VPP binary API message 'acl_del'. -// Generated from '../../bin_api/acl.api.json', line 230: -// -// "acl_del", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "acl_index" -// ], -// { -// "crc": "0xef34fea4" -// } -// -type ACLDel struct { - ACLIndex uint32 -} - -func (*ACLDel) GetMessageName() string { - return "acl_del" -} -func (*ACLDel) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*ACLDel) GetCrcString() string { - return "ef34fea4" -} -func NewACLDel() api.Message { - return &ACLDel{} -} - -// ACLDelReply represents the VPP binary API message 'acl_del_reply'. -// Generated from '../../bin_api/acl.api.json', line 252: -// -// "acl_del_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type ACLDelReply struct { - Retval int32 -} - -func (*ACLDelReply) GetMessageName() string { - return "acl_del_reply" -} -func (*ACLDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*ACLDelReply) GetCrcString() string { - return "e8d4e804" -} -func NewACLDelReply() api.Message { - return &ACLDelReply{} -} - -// ACLInterfaceAddDel represents the VPP binary API message 'acl_interface_add_del'. -// Generated from '../../bin_api/acl.api.json', line 270: -// -// "acl_interface_add_del", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "is_add" -// ], -// [ -// "u8", -// "is_input" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u32", -// "acl_index" -// ], -// { -// "crc": "0x0b2aedd1" -// } -// -type ACLInterfaceAddDel struct { - IsAdd uint8 - IsInput uint8 - SwIfIndex uint32 - ACLIndex uint32 -} - -func (*ACLInterfaceAddDel) GetMessageName() string { - return "acl_interface_add_del" -} -func (*ACLInterfaceAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*ACLInterfaceAddDel) GetCrcString() string { - return "0b2aedd1" -} -func NewACLInterfaceAddDel() api.Message { - return &ACLInterfaceAddDel{} -} - -// ACLInterfaceAddDelReply represents the VPP binary API message 'acl_interface_add_del_reply'. -// Generated from '../../bin_api/acl.api.json', line 304: -// -// "acl_interface_add_del_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type ACLInterfaceAddDelReply struct { - Retval int32 -} - -func (*ACLInterfaceAddDelReply) GetMessageName() string { - return "acl_interface_add_del_reply" -} -func (*ACLInterfaceAddDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*ACLInterfaceAddDelReply) GetCrcString() string { - return "e8d4e804" -} -func NewACLInterfaceAddDelReply() api.Message { - return &ACLInterfaceAddDelReply{} -} - -// ACLInterfaceSetACLList represents the VPP binary API message 'acl_interface_set_acl_list'. -// Generated from '../../bin_api/acl.api.json', line 322: -// -// "acl_interface_set_acl_list", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "count" -// ], -// [ -// "u8", -// "n_input" -// ], -// [ -// "u32", -// "acls", -// 0, -// "count" -// ], -// { -// "crc": "0x8baece38" -// } -// -type ACLInterfaceSetACLList struct { - SwIfIndex uint32 - Count uint8 `struc:"sizeof=Acls"` - NInput uint8 - Acls []uint32 -} - -func (*ACLInterfaceSetACLList) GetMessageName() string { - return "acl_interface_set_acl_list" -} -func (*ACLInterfaceSetACLList) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*ACLInterfaceSetACLList) GetCrcString() string { - return "8baece38" -} -func NewACLInterfaceSetACLList() api.Message { - return &ACLInterfaceSetACLList{} -} - -// ACLInterfaceSetACLListReply represents the VPP binary API message 'acl_interface_set_acl_list_reply'. -// Generated from '../../bin_api/acl.api.json', line 358: -// -// "acl_interface_set_acl_list_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type ACLInterfaceSetACLListReply struct { - Retval int32 -} - -func (*ACLInterfaceSetACLListReply) GetMessageName() string { - return "acl_interface_set_acl_list_reply" -} -func (*ACLInterfaceSetACLListReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*ACLInterfaceSetACLListReply) GetCrcString() string { - return "e8d4e804" -} -func NewACLInterfaceSetACLListReply() api.Message { - return &ACLInterfaceSetACLListReply{} -} - -// ACLDump represents the VPP binary API message 'acl_dump'. -// Generated from '../../bin_api/acl.api.json', line 376: -// -// "acl_dump", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "acl_index" -// ], -// { -// "crc": "0xef34fea4" -// } -// -type ACLDump struct { - ACLIndex uint32 -} - -func (*ACLDump) GetMessageName() string { - return "acl_dump" -} -func (*ACLDump) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*ACLDump) GetCrcString() string { - return "ef34fea4" -} -func NewACLDump() api.Message { - return &ACLDump{} -} - -// ACLDetails represents the VPP binary API message 'acl_details'. -// Generated from '../../bin_api/acl.api.json', line 398: -// -// "acl_details", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "acl_index" -// ], -// [ -// "u8", -// "tag", -// 64 -// ], -// [ -// "u32", -// "count" -// ], -// [ -// "vl_api_acl_rule_t", -// "r", -// 0, -// "count" -// ], -// { -// "crc": "0x5bd895be" -// } -// -type ACLDetails struct { - ACLIndex uint32 - Tag []byte `struc:"[64]byte"` - Count uint32 `struc:"sizeof=R"` - R []ACLRule -} - -func (*ACLDetails) GetMessageName() string { - return "acl_details" -} -func (*ACLDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*ACLDetails) GetCrcString() string { - return "5bd895be" -} -func NewACLDetails() api.Message { - return &ACLDetails{} -} - -// ACLInterfaceListDump represents the VPP binary API message 'acl_interface_list_dump'. -// Generated from '../../bin_api/acl.api.json', line 431: -// -// "acl_interface_list_dump", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// { -// "crc": "0x529cb13f" -// } -// -type ACLInterfaceListDump struct { - SwIfIndex uint32 -} - -func (*ACLInterfaceListDump) GetMessageName() string { - return "acl_interface_list_dump" -} -func (*ACLInterfaceListDump) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*ACLInterfaceListDump) GetCrcString() string { - return "529cb13f" -} -func NewACLInterfaceListDump() api.Message { - return &ACLInterfaceListDump{} -} - -// ACLInterfaceListDetails represents the VPP binary API message 'acl_interface_list_details'. -// Generated from '../../bin_api/acl.api.json', line 453: -// -// "acl_interface_list_details", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "count" -// ], -// [ -// "u8", -// "n_input" -// ], -// [ -// "u32", -// "acls", -// 0, -// "count" -// ], -// { -// "crc": "0xd5e80809" -// } -// -type ACLInterfaceListDetails struct { - SwIfIndex uint32 - Count uint8 `struc:"sizeof=Acls"` - NInput uint8 - Acls []uint32 -} - -func (*ACLInterfaceListDetails) GetMessageName() string { - return "acl_interface_list_details" -} -func (*ACLInterfaceListDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*ACLInterfaceListDetails) GetCrcString() string { - return "d5e80809" -} -func NewACLInterfaceListDetails() api.Message { - return &ACLInterfaceListDetails{} -} - -// MacipACLAdd represents the VPP binary API message 'macip_acl_add'. -// Generated from '../../bin_api/acl.api.json', line 485: -// -// "macip_acl_add", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "tag", -// 64 -// ], -// [ -// "u32", -// "count" -// ], -// [ -// "vl_api_macip_acl_rule_t", -// "r", -// 0, -// "count" -// ], -// { -// "crc": "0xb3d3d65a" -// } -// -type MacipACLAdd struct { - Tag []byte `struc:"[64]byte"` - Count uint32 `struc:"sizeof=R"` - R []MacipACLRule -} - -func (*MacipACLAdd) GetMessageName() string { - return "macip_acl_add" -} -func (*MacipACLAdd) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*MacipACLAdd) GetCrcString() string { - return "b3d3d65a" -} -func NewMacipACLAdd() api.Message { - return &MacipACLAdd{} -} - -// MacipACLAddReply represents the VPP binary API message 'macip_acl_add_reply'. -// Generated from '../../bin_api/acl.api.json', line 518: -// -// "macip_acl_add_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "acl_index" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xac407b0c" -// } -// -type MacipACLAddReply struct { - ACLIndex uint32 - Retval int32 -} - -func (*MacipACLAddReply) GetMessageName() string { - return "macip_acl_add_reply" -} -func (*MacipACLAddReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*MacipACLAddReply) GetCrcString() string { - return "ac407b0c" -} -func NewMacipACLAddReply() api.Message { - return &MacipACLAddReply{} -} - -// MacipACLAddReplace represents the VPP binary API message 'macip_acl_add_replace'. -// Generated from '../../bin_api/acl.api.json', line 540: -// -// "macip_acl_add_replace", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "acl_index" -// ], -// [ -// "u8", -// "tag", -// 64 -// ], -// [ -// "u32", -// "count" -// ], -// [ -// "vl_api_macip_acl_rule_t", -// "r", -// 0, -// "count" -// ], -// { -// "crc": "0xa0e8c01b" -// } -// -type MacipACLAddReplace struct { - ACLIndex uint32 - Tag []byte `struc:"[64]byte"` - Count uint32 `struc:"sizeof=R"` - R []MacipACLRule -} - -func (*MacipACLAddReplace) GetMessageName() string { - return "macip_acl_add_replace" -} -func (*MacipACLAddReplace) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*MacipACLAddReplace) GetCrcString() string { - return "a0e8c01b" -} -func NewMacipACLAddReplace() api.Message { - return &MacipACLAddReplace{} -} - -// MacipACLAddReplaceReply represents the VPP binary API message 'macip_acl_add_replace_reply'. -// Generated from '../../bin_api/acl.api.json', line 577: -// -// "macip_acl_add_replace_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "acl_index" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xac407b0c" -// } -// -type MacipACLAddReplaceReply struct { - ACLIndex uint32 - Retval int32 -} - -func (*MacipACLAddReplaceReply) GetMessageName() string { - return "macip_acl_add_replace_reply" -} -func (*MacipACLAddReplaceReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*MacipACLAddReplaceReply) GetCrcString() string { - return "ac407b0c" -} -func NewMacipACLAddReplaceReply() api.Message { - return &MacipACLAddReplaceReply{} -} - -// MacipACLDel represents the VPP binary API message 'macip_acl_del'. -// Generated from '../../bin_api/acl.api.json', line 599: -// -// "macip_acl_del", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "acl_index" -// ], -// { -// "crc": "0xef34fea4" -// } -// -type MacipACLDel struct { - ACLIndex uint32 -} - -func (*MacipACLDel) GetMessageName() string { - return "macip_acl_del" -} -func (*MacipACLDel) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*MacipACLDel) GetCrcString() string { - return "ef34fea4" -} -func NewMacipACLDel() api.Message { - return &MacipACLDel{} -} - -// MacipACLDelReply represents the VPP binary API message 'macip_acl_del_reply'. -// Generated from '../../bin_api/acl.api.json', line 621: -// -// "macip_acl_del_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type MacipACLDelReply struct { - Retval int32 -} - -func (*MacipACLDelReply) GetMessageName() string { - return "macip_acl_del_reply" -} -func (*MacipACLDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*MacipACLDelReply) GetCrcString() string { - return "e8d4e804" -} -func NewMacipACLDelReply() api.Message { - return &MacipACLDelReply{} -} - -// MacipACLInterfaceAddDel represents the VPP binary API message 'macip_acl_interface_add_del'. -// Generated from '../../bin_api/acl.api.json', line 639: -// -// "macip_acl_interface_add_del", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "is_add" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u32", -// "acl_index" -// ], -// { -// "crc": "0x6a6be97c" -// } -// -type MacipACLInterfaceAddDel struct { - IsAdd uint8 - SwIfIndex uint32 - ACLIndex uint32 -} - -func (*MacipACLInterfaceAddDel) GetMessageName() string { - return "macip_acl_interface_add_del" -} -func (*MacipACLInterfaceAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*MacipACLInterfaceAddDel) GetCrcString() string { - return "6a6be97c" -} -func NewMacipACLInterfaceAddDel() api.Message { - return &MacipACLInterfaceAddDel{} -} - -// MacipACLInterfaceAddDelReply represents the VPP binary API message 'macip_acl_interface_add_del_reply'. -// Generated from '../../bin_api/acl.api.json', line 669: -// -// "macip_acl_interface_add_del_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type MacipACLInterfaceAddDelReply struct { - Retval int32 -} - -func (*MacipACLInterfaceAddDelReply) GetMessageName() string { - return "macip_acl_interface_add_del_reply" -} -func (*MacipACLInterfaceAddDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*MacipACLInterfaceAddDelReply) GetCrcString() string { - return "e8d4e804" -} -func NewMacipACLInterfaceAddDelReply() api.Message { - return &MacipACLInterfaceAddDelReply{} -} - -// MacipACLDump represents the VPP binary API message 'macip_acl_dump'. -// Generated from '../../bin_api/acl.api.json', line 687: -// -// "macip_acl_dump", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "acl_index" -// ], -// { -// "crc": "0xef34fea4" -// } -// -type MacipACLDump struct { - ACLIndex uint32 -} - -func (*MacipACLDump) GetMessageName() string { - return "macip_acl_dump" -} -func (*MacipACLDump) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*MacipACLDump) GetCrcString() string { - return "ef34fea4" -} -func NewMacipACLDump() api.Message { - return &MacipACLDump{} -} - -// MacipACLDetails represents the VPP binary API message 'macip_acl_details'. -// Generated from '../../bin_api/acl.api.json', line 709: -// -// "macip_acl_details", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "acl_index" -// ], -// [ -// "u8", -// "tag", -// 64 -// ], -// [ -// "u32", -// "count" -// ], -// [ -// "vl_api_macip_acl_rule_t", -// "r", -// 0, -// "count" -// ], -// { -// "crc": "0xdd2b55ba" -// } -// -type MacipACLDetails struct { - ACLIndex uint32 - Tag []byte `struc:"[64]byte"` - Count uint32 `struc:"sizeof=R"` - R []MacipACLRule -} - -func (*MacipACLDetails) GetMessageName() string { - return "macip_acl_details" -} -func (*MacipACLDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*MacipACLDetails) GetCrcString() string { - return "dd2b55ba" -} -func NewMacipACLDetails() api.Message { - return &MacipACLDetails{} -} - -// MacipACLInterfaceGet represents the VPP binary API message 'macip_acl_interface_get'. -// Generated from '../../bin_api/acl.api.json', line 742: -// -// "macip_acl_interface_get", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// { -// "crc": "0x51077d14" -// } -// -type MacipACLInterfaceGet struct { -} - -func (*MacipACLInterfaceGet) GetMessageName() string { - return "macip_acl_interface_get" -} -func (*MacipACLInterfaceGet) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*MacipACLInterfaceGet) GetCrcString() string { - return "51077d14" -} -func NewMacipACLInterfaceGet() api.Message { - return &MacipACLInterfaceGet{} -} - -// MacipACLInterfaceGetReply represents the VPP binary API message 'macip_acl_interface_get_reply'. -// Generated from '../../bin_api/acl.api.json', line 760: -// -// "macip_acl_interface_get_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "count" -// ], -// [ -// "u32", -// "acls", -// 0, -// "count" -// ], -// { -// "crc": "0xaccf9b05" -// } -// -type MacipACLInterfaceGetReply struct { - Count uint32 `struc:"sizeof=Acls"` - Acls []uint32 -} - -func (*MacipACLInterfaceGetReply) GetMessageName() string { - return "macip_acl_interface_get_reply" -} -func (*MacipACLInterfaceGetReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*MacipACLInterfaceGetReply) GetCrcString() string { - return "accf9b05" -} -func NewMacipACLInterfaceGetReply() api.Message { - return &MacipACLInterfaceGetReply{} -} - -// MacipACLInterfaceListDump represents the VPP binary API message 'macip_acl_interface_list_dump'. -// Generated from '../../bin_api/acl.api.json', line 784: -// -// "macip_acl_interface_list_dump", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// { -// "crc": "0x529cb13f" -// } -// -type MacipACLInterfaceListDump struct { - SwIfIndex uint32 -} - -func (*MacipACLInterfaceListDump) GetMessageName() string { - return "macip_acl_interface_list_dump" -} -func (*MacipACLInterfaceListDump) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*MacipACLInterfaceListDump) GetCrcString() string { - return "529cb13f" -} -func NewMacipACLInterfaceListDump() api.Message { - return &MacipACLInterfaceListDump{} -} - -// MacipACLInterfaceListDetails represents the VPP binary API message 'macip_acl_interface_list_details'. -// Generated from '../../bin_api/acl.api.json', line 806: -// -// "macip_acl_interface_list_details", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "count" -// ], -// [ -// "u32", -// "acls", -// 0, -// "count" -// ], -// { -// "crc": "0x29783fa0" -// } -// -type MacipACLInterfaceListDetails struct { - SwIfIndex uint32 - Count uint8 `struc:"sizeof=Acls"` - Acls []uint32 -} - -func (*MacipACLInterfaceListDetails) GetMessageName() string { - return "macip_acl_interface_list_details" -} -func (*MacipACLInterfaceListDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*MacipACLInterfaceListDetails) GetCrcString() string { - return "29783fa0" -} -func NewMacipACLInterfaceListDetails() api.Message { - return &MacipACLInterfaceListDetails{} -} diff --git a/examples/bin_api/af_packet.api.json b/examples/bin_api/af_packet.api.json index 81ee2f9..d28c5bb 100644 --- a/examples/bin_api/af_packet.api.json +++ b/examples/bin_api/af_packet.api.json @@ -1,23 +1,4 @@ { - "services": [ - { - "af_packet_delete": { - "reply": "af_packet_delete_reply" - } - }, - { - "af_packet_create": { - "reply": "af_packet_create_reply" - } - }, - { - "af_packet_set_l4_cksum_offload": { - "reply": "af_packet_set_l4_cksum_offload_reply" - } - } - ], - "vl_api_version": "0x8957ca8b", - "enums": [], "messages": [ [ "af_packet_create", @@ -157,7 +138,66 @@ { "crc": "0xe8d4e804" } + ], + [ + "af_packet_dump", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + { + "crc": "0x51077d14" + } + ], + [ + "af_packet_details", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "u32", + "sw_if_index" + ], + [ + "u8", + "host_if_name", + 64 + ], + { + "crc": "0x057205fa" + } ] ], + "vl_api_version": "0x206563c", + "unions": [], + "services": { + "af_packet_dump": { + "reply": "af_packet_details", + "stream": true + }, + "af_packet_set_l4_cksum_offload": { + "reply": "af_packet_set_l4_cksum_offload_reply" + }, + "af_packet_delete": { + "reply": "af_packet_delete_reply" + }, + "af_packet_create": { + "reply": "af_packet_create_reply" + } + }, + "enums": [], "types": [] } diff --git a/examples/bin_api/af_packet/af_packet.ba.go b/examples/bin_api/af_packet/af_packet.ba.go new file mode 100644 index 0000000..a6bdc93 --- /dev/null +++ b/examples/bin_api/af_packet/af_packet.ba.go @@ -0,0 +1,379 @@ +// Code generated by GoVPP binapi-generator. DO NOT EDIT. +// source: af_packet.api.json + +/* +Package af_packet is a generated VPP binary API of the 'af_packet' VPP module. + +It is generated from this file: + af_packet.api.json + +It contains these VPP binary API objects: + 8 messages + 4 services +*/ +package af_packet + +import "git.fd.io/govpp.git/api" +import "github.com/lunixbochs/struc" +import "bytes" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = struc.Pack +var _ = bytes.NewBuffer + +/* Messages */ + +// AfPacketCreate represents the VPP binary API message 'af_packet_create'. +// Generated from 'af_packet.api.json', line 4: +// +// "af_packet_create", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "host_if_name", +// 64 +// ], +// [ +// "u8", +// "hw_addr", +// 6 +// ], +// [ +// "u8", +// "use_random_hw_addr" +// ], +// { +// "crc": "0x6d5d30d6" +// } +// +type AfPacketCreate struct { + HostIfName []byte `struc:"[64]byte"` + HwAddr []byte `struc:"[6]byte"` + UseRandomHwAddr uint8 +} + +func (*AfPacketCreate) GetMessageName() string { + return "af_packet_create" +} +func (*AfPacketCreate) GetCrcString() string { + return "6d5d30d6" +} +func (*AfPacketCreate) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewAfPacketCreate() api.Message { + return &AfPacketCreate{} +} + +// AfPacketCreateReply represents the VPP binary API message 'af_packet_create_reply'. +// Generated from 'af_packet.api.json', line 36: +// +// "af_packet_create_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0xfda5941f" +// } +// +type AfPacketCreateReply struct { + Retval int32 + SwIfIndex uint32 +} + +func (*AfPacketCreateReply) GetMessageName() string { + return "af_packet_create_reply" +} +func (*AfPacketCreateReply) GetCrcString() string { + return "fda5941f" +} +func (*AfPacketCreateReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewAfPacketCreateReply() api.Message { + return &AfPacketCreateReply{} +} + +// AfPacketDelete represents the VPP binary API message 'af_packet_delete'. +// Generated from 'af_packet.api.json', line 58: +// +// "af_packet_delete", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "host_if_name", +// 64 +// ], +// { +// "crc": "0x3efceda3" +// } +// +type AfPacketDelete struct { + HostIfName []byte `struc:"[64]byte"` +} + +func (*AfPacketDelete) GetMessageName() string { + return "af_packet_delete" +} +func (*AfPacketDelete) GetCrcString() string { + return "3efceda3" +} +func (*AfPacketDelete) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewAfPacketDelete() api.Message { + return &AfPacketDelete{} +} + +// AfPacketDeleteReply represents the VPP binary API message 'af_packet_delete_reply'. +// Generated from 'af_packet.api.json', line 81: +// +// "af_packet_delete_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type AfPacketDeleteReply struct { + Retval int32 +} + +func (*AfPacketDeleteReply) GetMessageName() string { + return "af_packet_delete_reply" +} +func (*AfPacketDeleteReply) GetCrcString() string { + return "e8d4e804" +} +func (*AfPacketDeleteReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewAfPacketDeleteReply() api.Message { + return &AfPacketDeleteReply{} +} + +// AfPacketSetL4CksumOffload represents the VPP binary API message 'af_packet_set_l4_cksum_offload'. +// Generated from 'af_packet.api.json', line 99: +// +// "af_packet_set_l4_cksum_offload", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "sw_if_index" +// ], +// [ +// "u8", +// "set" +// ], +// { +// "crc": "0x86538585" +// } +// +type AfPacketSetL4CksumOffload struct { + SwIfIndex uint8 + Set uint8 +} + +func (*AfPacketSetL4CksumOffload) GetMessageName() string { + return "af_packet_set_l4_cksum_offload" +} +func (*AfPacketSetL4CksumOffload) GetCrcString() string { + return "86538585" +} +func (*AfPacketSetL4CksumOffload) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewAfPacketSetL4CksumOffload() api.Message { + return &AfPacketSetL4CksumOffload{} +} + +// AfPacketSetL4CksumOffloadReply represents the VPP binary API message 'af_packet_set_l4_cksum_offload_reply'. +// Generated from 'af_packet.api.json', line 125: +// +// "af_packet_set_l4_cksum_offload_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type AfPacketSetL4CksumOffloadReply struct { + Retval int32 +} + +func (*AfPacketSetL4CksumOffloadReply) GetMessageName() string { + return "af_packet_set_l4_cksum_offload_reply" +} +func (*AfPacketSetL4CksumOffloadReply) GetCrcString() string { + return "e8d4e804" +} +func (*AfPacketSetL4CksumOffloadReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewAfPacketSetL4CksumOffloadReply() api.Message { + return &AfPacketSetL4CksumOffloadReply{} +} + +// AfPacketDump represents the VPP binary API message 'af_packet_dump'. +// Generated from 'af_packet.api.json', line 143: +// +// "af_packet_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// { +// "crc": "0x51077d14" +// } +// +type AfPacketDump struct{} + +func (*AfPacketDump) GetMessageName() string { + return "af_packet_dump" +} +func (*AfPacketDump) GetCrcString() string { + return "51077d14" +} +func (*AfPacketDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewAfPacketDump() api.Message { + return &AfPacketDump{} +} + +// AfPacketDetails represents the VPP binary API message 'af_packet_details'. +// Generated from 'af_packet.api.json', line 161: +// +// "af_packet_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "host_if_name", +// 64 +// ], +// { +// "crc": "0x057205fa" +// } +// +type AfPacketDetails struct { + SwIfIndex uint32 + HostIfName []byte `struc:"[64]byte"` +} + +func (*AfPacketDetails) GetMessageName() string { + return "af_packet_details" +} +func (*AfPacketDetails) GetCrcString() string { + return "057205fa" +} +func (*AfPacketDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewAfPacketDetails() api.Message { + return &AfPacketDetails{} +} + +/* Services */ + +type Services interface { + DumpAfPacket(*AfPacketDump) (*AfPacketDetails, error) + AfPacketCreate(*AfPacketCreate) (*AfPacketCreateReply, error) + AfPacketDelete(*AfPacketDelete) (*AfPacketDeleteReply, error) + AfPacketSetL4CksumOffload(*AfPacketSetL4CksumOffload) (*AfPacketSetL4CksumOffloadReply, error) +} + +func init() { + api.RegisterMessage((*AfPacketCreate)(nil), "af_packet.AfPacketCreate") + api.RegisterMessage((*AfPacketCreateReply)(nil), "af_packet.AfPacketCreateReply") + api.RegisterMessage((*AfPacketDelete)(nil), "af_packet.AfPacketDelete") + api.RegisterMessage((*AfPacketDeleteReply)(nil), "af_packet.AfPacketDeleteReply") + api.RegisterMessage((*AfPacketSetL4CksumOffload)(nil), "af_packet.AfPacketSetL4CksumOffload") + api.RegisterMessage((*AfPacketSetL4CksumOffloadReply)(nil), "af_packet.AfPacketSetL4CksumOffloadReply") + api.RegisterMessage((*AfPacketDump)(nil), "af_packet.AfPacketDump") + api.RegisterMessage((*AfPacketDetails)(nil), "af_packet.AfPacketDetails") +} diff --git a/examples/bin_api/af_packet/af_packet.go b/examples/bin_api/af_packet/af_packet.go deleted file mode 100644 index c969e2a..0000000 --- a/examples/bin_api/af_packet/af_packet.go +++ /dev/null @@ -1,266 +0,0 @@ -// Code generated by govpp binapi-generator DO NOT EDIT. -// Package af_packet represents the VPP binary API of the 'af_packet' VPP module. -// Generated from '../../bin_api/af_packet.api.json' -package af_packet - -import "git.fd.io/govpp.git/api" - -// VlApiVersion contains version of the API. -const VlAPIVersion = 0x8957ca8b - -// AfPacketCreate represents the VPP binary API message 'af_packet_create'. -// Generated from '../../bin_api/af_packet.api.json', line 23: -// -// "af_packet_create", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "host_if_name", -// 64 -// ], -// [ -// "u8", -// "hw_addr", -// 6 -// ], -// [ -// "u8", -// "use_random_hw_addr" -// ], -// { -// "crc": "0x6d5d30d6" -// } -// -type AfPacketCreate struct { - HostIfName []byte `struc:"[64]byte"` - HwAddr []byte `struc:"[6]byte"` - UseRandomHwAddr uint8 -} - -func (*AfPacketCreate) GetMessageName() string { - return "af_packet_create" -} -func (*AfPacketCreate) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*AfPacketCreate) GetCrcString() string { - return "6d5d30d6" -} -func NewAfPacketCreate() api.Message { - return &AfPacketCreate{} -} - -// AfPacketCreateReply represents the VPP binary API message 'af_packet_create_reply'. -// Generated from '../../bin_api/af_packet.api.json', line 55: -// -// "af_packet_create_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// { -// "crc": "0xfda5941f" -// } -// -type AfPacketCreateReply struct { - Retval int32 - SwIfIndex uint32 -} - -func (*AfPacketCreateReply) GetMessageName() string { - return "af_packet_create_reply" -} -func (*AfPacketCreateReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*AfPacketCreateReply) GetCrcString() string { - return "fda5941f" -} -func NewAfPacketCreateReply() api.Message { - return &AfPacketCreateReply{} -} - -// AfPacketDelete represents the VPP binary API message 'af_packet_delete'. -// Generated from '../../bin_api/af_packet.api.json', line 77: -// -// "af_packet_delete", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "host_if_name", -// 64 -// ], -// { -// "crc": "0x3efceda3" -// } -// -type AfPacketDelete struct { - HostIfName []byte `struc:"[64]byte"` -} - -func (*AfPacketDelete) GetMessageName() string { - return "af_packet_delete" -} -func (*AfPacketDelete) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*AfPacketDelete) GetCrcString() string { - return "3efceda3" -} -func NewAfPacketDelete() api.Message { - return &AfPacketDelete{} -} - -// AfPacketDeleteReply represents the VPP binary API message 'af_packet_delete_reply'. -// Generated from '../../bin_api/af_packet.api.json', line 100: -// -// "af_packet_delete_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type AfPacketDeleteReply struct { - Retval int32 -} - -func (*AfPacketDeleteReply) GetMessageName() string { - return "af_packet_delete_reply" -} -func (*AfPacketDeleteReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*AfPacketDeleteReply) GetCrcString() string { - return "e8d4e804" -} -func NewAfPacketDeleteReply() api.Message { - return &AfPacketDeleteReply{} -} - -// AfPacketSetL4CksumOffload represents the VPP binary API message 'af_packet_set_l4_cksum_offload'. -// Generated from '../../bin_api/af_packet.api.json', line 118: -// -// "af_packet_set_l4_cksum_offload", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "sw_if_index" -// ], -// [ -// "u8", -// "set" -// ], -// { -// "crc": "0x86538585" -// } -// -type AfPacketSetL4CksumOffload struct { - SwIfIndex uint8 - Set uint8 -} - -func (*AfPacketSetL4CksumOffload) GetMessageName() string { - return "af_packet_set_l4_cksum_offload" -} -func (*AfPacketSetL4CksumOffload) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*AfPacketSetL4CksumOffload) GetCrcString() string { - return "86538585" -} -func NewAfPacketSetL4CksumOffload() api.Message { - return &AfPacketSetL4CksumOffload{} -} - -// AfPacketSetL4CksumOffloadReply represents the VPP binary API message 'af_packet_set_l4_cksum_offload_reply'. -// Generated from '../../bin_api/af_packet.api.json', line 144: -// -// "af_packet_set_l4_cksum_offload_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type AfPacketSetL4CksumOffloadReply struct { - Retval int32 -} - -func (*AfPacketSetL4CksumOffloadReply) GetMessageName() string { - return "af_packet_set_l4_cksum_offload_reply" -} -func (*AfPacketSetL4CksumOffloadReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*AfPacketSetL4CksumOffloadReply) GetCrcString() string { - return "e8d4e804" -} -func NewAfPacketSetL4CksumOffloadReply() api.Message { - return &AfPacketSetL4CksumOffloadReply{} -} diff --git a/examples/bin_api/gen.go b/examples/bin_api/gen.go new file mode 100644 index 0000000..de6e275 --- /dev/null +++ b/examples/bin_api/gen.go @@ -0,0 +1,4 @@ +package bin_api + +// Generates Go bindings for all VPP APIs located in the json directory. +//go:generate binapi-generator --input-dir=. --output-dir=. diff --git a/examples/bin_api/interface.api.json b/examples/bin_api/interface.api.json index 0103007..87c9358 100644 --- a/examples/bin_api/interface.api.json +++ b/examples/bin_api/interface.api.json @@ -1,109 +1,4 @@ { - "services": [ - { - "create_subif": { - "reply": "create_subif_reply" - } - }, - { - "delete_subif": { - "reply": "delete_subif_reply" - } - }, - { - "sw_interface_tag_add_del": { - "reply": "sw_interface_tag_add_del_reply" - } - }, - { - "sw_interface_event": { - "reply": null - } - }, - { - "sw_interface_set_rx_mode": { - "reply": "sw_interface_set_rx_mode_reply" - } - }, - { - "sw_interface_dump": { - "reply": "sw_interface_details", - "stream": true - } - }, - { - "sw_interface_get_table": { - "reply": "sw_interface_get_table_reply" - } - }, - { - "sw_interface_add_del_address": { - "reply": "sw_interface_add_del_address_reply" - } - }, - { - "interface_name_renumber": { - "reply": "interface_name_renumber_reply" - } - }, - { - "create_loopback_instance": { - "reply": "create_loopback_instance_reply" - } - }, - { - "sw_interface_set_mtu": { - "reply": "sw_interface_set_mtu_reply" - } - }, - { - "create_loopback": { - "reply": "create_loopback_reply" - } - }, - { - "sw_interface_clear_stats": { - "reply": "sw_interface_clear_stats_reply" - } - }, - { - "create_vlan_subif": { - "reply": "create_vlan_subif_reply" - } - }, - { - "sw_interface_set_mac_address": { - "reply": "sw_interface_set_mac_address_reply" - } - }, - { - "sw_interface_set_table": { - "reply": "sw_interface_set_table_reply" - } - }, - { - "sw_interface_set_flags": { - "reply": "sw_interface_set_flags_reply" - } - }, - { - "delete_loopback": { - "reply": "delete_loopback_reply" - } - }, - { - "want_interface_events": { - "reply": "want_interface_events_reply" - } - }, - { - "sw_interface_set_unnumbered": { - "reply": "sw_interface_set_unnumbered_reply" - } - } - ], - "vl_api_version": "0xa9b5d13", - "enums": [], "messages": [ [ "sw_interface_set_flags", @@ -150,7 +45,7 @@ } ], [ - "sw_interface_set_mtu", + "hw_interface_set_mtu", [ "u16", "_vl_msg_id" @@ -175,6 +70,51 @@ "crc": "0x132da1e7" } ], + [ + "hw_interface_set_mtu_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ], + [ + "sw_interface_set_mtu", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "u32", + "sw_if_index" + ], + [ + "u32", + "mtu", + 4 + ], + { + "crc": "0xd0008db8" + } + ], [ "sw_interface_set_mtu_reply", [ @@ -323,6 +263,11 @@ "u16", "link_mtu" ], + [ + "u32", + "mtu", + 4 + ], [ "u32", "sub_id" @@ -407,7 +352,7 @@ "i_sid" ], { - "crc": "0x23dee0ff" + "crc": "0x09b4b510" } ], [ @@ -595,111 +540,55 @@ } ], [ - "vnet_interface_simple_counters", - [ - "u16", - "_vl_msg_id" - ], - [ - "u8", - "vnet_counter_type" - ], - [ - "u32", - "first_sw_if_index" - ], - [ - "u32", - "count" - ], - [ - "u64", - "data", - 0, - "count" - ], - { - "crc": "0x9bc4a808" - } - ], - [ - "vnet_interface_combined_counters", + "sw_interface_set_unnumbered", [ "u16", "_vl_msg_id" ], - [ - "u8", - "vnet_counter_type" - ], [ "u32", - "first_sw_if_index" + "client_index" ], [ "u32", - "count" - ], - [ - "vl_api_vlib_counter_t", - "data", - 0, - "count" - ], - { - "crc": "0x2c595002" - } - ], - [ - "vnet_per_interface_simple_counters", - [ - "u16", - "_vl_msg_id" + "context" ], [ "u32", - "count" + "sw_if_index" ], [ "u32", - "timestamp" + "unnumbered_sw_if_index" ], [ - "vl_api_vnet_simple_counter_t", - "data", - 0, - "count" + "u8", + "is_add" ], { - "crc": "0xd1fba9ba" + "crc": "0xa2c1bbda" } ], [ - "vnet_per_interface_combined_counters", + "sw_interface_set_unnumbered_reply", [ "u16", "_vl_msg_id" ], [ "u32", - "count" - ], - [ - "u32", - "timestamp" + "context" ], [ - "vl_api_vnet_combined_counter_t", - "data", - 0, - "count" + "i32", + "retval" ], { - "crc": "0xdc578375" + "crc": "0xe8d4e804" } ], [ - "sw_interface_set_unnumbered", + "sw_interface_clear_stats", [ "u16", "_vl_msg_id" @@ -716,20 +605,12 @@ "u32", "sw_if_index" ], - [ - "u32", - "unnumbered_sw_if_index" - ], - [ - "u8", - "is_add" - ], { - "crc": "0xa2c1bbda" + "crc": "0x529cb13f" } ], [ - "sw_interface_set_unnumbered_reply", + "sw_interface_clear_stats_reply", [ "u16", "_vl_msg_id" @@ -747,7 +628,7 @@ } ], [ - "sw_interface_clear_stats", + "sw_interface_tag_add_del", [ "u16", "_vl_msg_id" @@ -760,16 +641,25 @@ "u32", "context" ], + [ + "u8", + "is_add" + ], [ "u32", "sw_if_index" ], + [ + "u8", + "tag", + 64 + ], { - "crc": "0x529cb13f" + "crc": "0x14cc636c" } ], [ - "sw_interface_clear_stats_reply", + "sw_interface_tag_add_del_reply", [ "u16", "_vl_msg_id" @@ -787,7 +677,7 @@ } ], [ - "sw_interface_tag_add_del", + "sw_interface_set_mac_address", [ "u16", "_vl_msg_id" @@ -800,25 +690,21 @@ "u32", "context" ], - [ - "u8", - "is_add" - ], [ "u32", "sw_if_index" ], [ "u8", - "tag", - 64 + "mac_address", + 6 ], { - "crc": "0x14cc636c" + "crc": "0xeed5dfca" } ], [ - "sw_interface_tag_add_del_reply", + "sw_interface_set_mac_address_reply", [ "u16", "_vl_msg_id" @@ -836,7 +722,7 @@ } ], [ - "sw_interface_set_mac_address", + "sw_interface_get_mac_address", [ "u16", "_vl_msg_id" @@ -853,17 +739,12 @@ "u32", "sw_if_index" ], - [ - "u8", - "mac_address", - 6 - ], { - "crc": "0xeed5dfca" + "crc": "0x529cb13f" } ], [ - "sw_interface_set_mac_address_reply", + "sw_interface_get_mac_address_reply", [ "u16", "_vl_msg_id" @@ -876,8 +757,13 @@ "i32", "retval" ], + [ + "u8", + "mac_address", + 6 + ], { - "crc": "0xe8d4e804" + "crc": "0x8ea538d3" } ], [ @@ -1289,8 +1175,127 @@ { "crc": "0xe8d4e804" } + ], + [ + "collect_detailed_interface_stats", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "u32", + "sw_if_index" + ], + [ + "u8", + "enable_disable" + ], + { + "crc": "0x69d24598" + } + ], + [ + "collect_detailed_interface_stats_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } ] ], + "vl_api_version": "0x6a38a271", + "unions": [], + "services": { + "create_subif": { + "reply": "create_subif_reply" + }, + "delete_subif": { + "reply": "delete_subif_reply" + }, + "sw_interface_tag_add_del": { + "reply": "sw_interface_tag_add_del_reply" + }, + "collect_detailed_interface_stats": { + "reply": "collect_detailed_interface_stats_reply" + }, + "sw_interface_dump": { + "reply": "sw_interface_details", + "stream": true + }, + "sw_interface_add_del_address": { + "reply": "sw_interface_add_del_address_reply" + }, + "sw_interface_get_table": { + "reply": "sw_interface_get_table_reply" + }, + "interface_name_renumber": { + "reply": "interface_name_renumber_reply" + }, + "create_loopback_instance": { + "reply": "create_loopback_instance_reply" + }, + "sw_interface_get_mac_address": { + "reply": "sw_interface_get_mac_address_reply" + }, + "want_interface_events": { + "reply": "want_interface_events_reply", + "events": [ + "sw_interface_event" + ] + }, + "create_loopback": { + "reply": "create_loopback_reply" + }, + "sw_interface_clear_stats": { + "reply": "sw_interface_clear_stats_reply" + }, + "hw_interface_set_mtu": { + "reply": "hw_interface_set_mtu_reply" + }, + "sw_interface_set_mac_address": { + "reply": "sw_interface_set_mac_address_reply" + }, + "sw_interface_set_table": { + "reply": "sw_interface_set_table_reply" + }, + "sw_interface_set_mtu": { + "reply": "sw_interface_set_mtu_reply" + }, + "sw_interface_set_flags": { + "reply": "sw_interface_set_flags_reply" + }, + "delete_loopback": { + "reply": "delete_loopback_reply" + }, + "sw_interface_set_rx_mode": { + "reply": "sw_interface_set_rx_mode_reply" + }, + "create_vlan_subif": { + "reply": "create_vlan_subif_reply" + }, + "sw_interface_set_unnumbered": { + "reply": "sw_interface_set_unnumbered_reply" + } + }, + "enums": [], "types": [ [ "vlib_counter", @@ -1320,6 +1325,30 @@ "u64", "rx_bytes" ], + [ + "u64", + "rx_unicast_packets" + ], + [ + "u64", + "rx_unicast_bytes" + ], + [ + "u64", + "rx_multicast_packets" + ], + [ + "u64", + "rx_multicast_bytes" + ], + [ + "u64", + "rx_broadcast_packets" + ], + [ + "u64", + "rx_broadcast_bytes" + ], [ "u64", "tx_packets" @@ -1328,8 +1357,32 @@ "u64", "tx_bytes" ], + [ + "u64", + "tx_unicast_packets" + ], + [ + "u64", + "tx_unicast_bytes" + ], + [ + "u64", + "tx_multicast_packets" + ], + [ + "u64", + "tx_multicast_bytes" + ], + [ + "u64", + "tx_broadcast_packets" + ], + [ + "u64", + "tx_broadcast_bytes" + ], { - "crc": "0x3217ba8e" + "crc": "0x20905ca4" } ], [ diff --git a/examples/bin_api/interfaces/interfaces.ba.go b/examples/bin_api/interfaces/interfaces.ba.go new file mode 100644 index 0000000..5ef58ed --- /dev/null +++ b/examples/bin_api/interfaces/interfaces.ba.go @@ -0,0 +1,2453 @@ +// Code generated by GoVPP binapi-generator. DO NOT EDIT. +// source: interface.api.json + +/* +Package interfaces is a generated VPP binary API of the 'interface' VPP module. + +It is generated from this file: + interface.api.json + +It contains these VPP binary API objects: + 45 messages + 3 types + 22 services +*/ +package interfaces + +import "git.fd.io/govpp.git/api" +import "github.com/lunixbochs/struc" +import "bytes" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = struc.Pack +var _ = bytes.NewBuffer + +/* Types */ + +// VlibCounter represents the VPP binary API type 'vlib_counter'. +// Generated from 'interface.api.json', line 1301: +// +// "vlib_counter", +// [ +// "u64", +// "packets" +// ], +// [ +// "u64", +// "bytes" +// ], +// { +// "crc": "0xce2325a2" +// } +// +type VlibCounter struct { + Packets uint64 + Bytes uint64 +} + +func (*VlibCounter) GetTypeName() string { + return "vlib_counter" +} +func (*VlibCounter) GetCrcString() string { + return "ce2325a2" +} + +// VnetCombinedCounter represents the VPP binary API type 'vnet_combined_counter'. +// Generated from 'interface.api.json', line 1315: +// +// "vnet_combined_counter", +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u64", +// "rx_packets" +// ], +// [ +// "u64", +// "rx_bytes" +// ], +// [ +// "u64", +// "rx_unicast_packets" +// ], +// [ +// "u64", +// "rx_unicast_bytes" +// ], +// [ +// "u64", +// "rx_multicast_packets" +// ], +// [ +// "u64", +// "rx_multicast_bytes" +// ], +// [ +// "u64", +// "rx_broadcast_packets" +// ], +// [ +// "u64", +// "rx_broadcast_bytes" +// ], +// [ +// "u64", +// "tx_packets" +// ], +// [ +// "u64", +// "tx_bytes" +// ], +// [ +// "u64", +// "tx_unicast_packets" +// ], +// [ +// "u64", +// "tx_unicast_bytes" +// ], +// [ +// "u64", +// "tx_multicast_packets" +// ], +// [ +// "u64", +// "tx_multicast_bytes" +// ], +// [ +// "u64", +// "tx_broadcast_packets" +// ], +// [ +// "u64", +// "tx_broadcast_bytes" +// ], +// { +// "crc": "0x20905ca4" +// } +// +type VnetCombinedCounter struct { + SwIfIndex uint32 + RxPackets uint64 + RxBytes uint64 + RxUnicastPackets uint64 + RxUnicastBytes uint64 + RxMulticastPackets uint64 + RxMulticastBytes uint64 + RxBroadcastPackets uint64 + RxBroadcastBytes uint64 + TxPackets uint64 + TxBytes uint64 + TxUnicastPackets uint64 + TxUnicastBytes uint64 + TxMulticastPackets uint64 + TxMulticastBytes uint64 + TxBroadcastPackets uint64 + TxBroadcastBytes uint64 +} + +func (*VnetCombinedCounter) GetTypeName() string { + return "vnet_combined_counter" +} +func (*VnetCombinedCounter) GetCrcString() string { + return "20905ca4" +} + +// VnetSimpleCounter represents the VPP binary API type 'vnet_simple_counter'. +// Generated from 'interface.api.json', line 1389: +// +// "vnet_simple_counter", +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u64", +// "drop" +// ], +// [ +// "u64", +// "punt" +// ], +// [ +// "u64", +// "rx_ip4" +// ], +// [ +// "u64", +// "rx_ip6" +// ], +// [ +// "u64", +// "rx_no_buffer" +// ], +// [ +// "u64", +// "rx_miss" +// ], +// [ +// "u64", +// "rx_error" +// ], +// [ +// "u64", +// "tx_error" +// ], +// [ +// "u64", +// "rx_mpls" +// ], +// { +// "crc": "0x8bd65e2d" +// } +// +type VnetSimpleCounter struct { + SwIfIndex uint32 + Drop uint64 + Punt uint64 + RxIP4 uint64 + RxIP6 uint64 + RxNoBuffer uint64 + RxMiss uint64 + RxError uint64 + TxError uint64 + RxMpls uint64 +} + +func (*VnetSimpleCounter) GetTypeName() string { + return "vnet_simple_counter" +} +func (*VnetSimpleCounter) GetCrcString() string { + return "8bd65e2d" +} + +/* Messages */ + +// SwInterfaceSetFlags represents the VPP binary API message 'sw_interface_set_flags'. +// Generated from 'interface.api.json', line 4: +// +// "sw_interface_set_flags", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "admin_up_down" +// ], +// { +// "crc": "0x555485f5" +// } +// +type SwInterfaceSetFlags struct { + SwIfIndex uint32 + AdminUpDown uint8 +} + +func (*SwInterfaceSetFlags) GetMessageName() string { + return "sw_interface_set_flags" +} +func (*SwInterfaceSetFlags) GetCrcString() string { + return "555485f5" +} +func (*SwInterfaceSetFlags) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewSwInterfaceSetFlags() api.Message { + return &SwInterfaceSetFlags{} +} + +// SwInterfaceSetFlagsReply represents the VPP binary API message 'sw_interface_set_flags_reply'. +// Generated from 'interface.api.json', line 30: +// +// "sw_interface_set_flags_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type SwInterfaceSetFlagsReply struct { + Retval int32 +} + +func (*SwInterfaceSetFlagsReply) GetMessageName() string { + return "sw_interface_set_flags_reply" +} +func (*SwInterfaceSetFlagsReply) GetCrcString() string { + return "e8d4e804" +} +func (*SwInterfaceSetFlagsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewSwInterfaceSetFlagsReply() api.Message { + return &SwInterfaceSetFlagsReply{} +} + +// HwInterfaceSetMtu represents the VPP binary API message 'hw_interface_set_mtu'. +// Generated from 'interface.api.json', line 48: +// +// "hw_interface_set_mtu", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u16", +// "mtu" +// ], +// { +// "crc": "0x132da1e7" +// } +// +type HwInterfaceSetMtu struct { + SwIfIndex uint32 + Mtu uint16 +} + +func (*HwInterfaceSetMtu) GetMessageName() string { + return "hw_interface_set_mtu" +} +func (*HwInterfaceSetMtu) GetCrcString() string { + return "132da1e7" +} +func (*HwInterfaceSetMtu) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewHwInterfaceSetMtu() api.Message { + return &HwInterfaceSetMtu{} +} + +// HwInterfaceSetMtuReply represents the VPP binary API message 'hw_interface_set_mtu_reply'. +// Generated from 'interface.api.json', line 74: +// +// "hw_interface_set_mtu_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type HwInterfaceSetMtuReply struct { + Retval int32 +} + +func (*HwInterfaceSetMtuReply) GetMessageName() string { + return "hw_interface_set_mtu_reply" +} +func (*HwInterfaceSetMtuReply) GetCrcString() string { + return "e8d4e804" +} +func (*HwInterfaceSetMtuReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewHwInterfaceSetMtuReply() api.Message { + return &HwInterfaceSetMtuReply{} +} + +// SwInterfaceSetMtu represents the VPP binary API message 'sw_interface_set_mtu'. +// Generated from 'interface.api.json', line 92: +// +// "sw_interface_set_mtu", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u32", +// "mtu", +// 4 +// ], +// { +// "crc": "0xd0008db8" +// } +// +type SwInterfaceSetMtu struct { + SwIfIndex uint32 + Mtu []uint32 `struc:"[4]uint32"` +} + +func (*SwInterfaceSetMtu) GetMessageName() string { + return "sw_interface_set_mtu" +} +func (*SwInterfaceSetMtu) GetCrcString() string { + return "d0008db8" +} +func (*SwInterfaceSetMtu) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewSwInterfaceSetMtu() api.Message { + return &SwInterfaceSetMtu{} +} + +// SwInterfaceSetMtuReply represents the VPP binary API message 'sw_interface_set_mtu_reply'. +// Generated from 'interface.api.json', line 119: +// +// "sw_interface_set_mtu_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type SwInterfaceSetMtuReply struct { + Retval int32 +} + +func (*SwInterfaceSetMtuReply) GetMessageName() string { + return "sw_interface_set_mtu_reply" +} +func (*SwInterfaceSetMtuReply) GetCrcString() string { + return "e8d4e804" +} +func (*SwInterfaceSetMtuReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewSwInterfaceSetMtuReply() api.Message { + return &SwInterfaceSetMtuReply{} +} + +// SwInterfaceEvent represents the VPP binary API message 'sw_interface_event'. +// Generated from 'interface.api.json', line 137: +// +// "sw_interface_event", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "pid" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "admin_up_down" +// ], +// [ +// "u8", +// "link_up_down" +// ], +// [ +// "u8", +// "deleted" +// ], +// { +// "crc": "0xbf9938e4" +// } +// +type SwInterfaceEvent struct { + PID uint32 + SwIfIndex uint32 + AdminUpDown uint8 + LinkUpDown uint8 + Deleted uint8 +} + +func (*SwInterfaceEvent) GetMessageName() string { + return "sw_interface_event" +} +func (*SwInterfaceEvent) GetCrcString() string { + return "bf9938e4" +} +func (*SwInterfaceEvent) GetMessageType() api.MessageType { + return api.EventMessage +} +func NewSwInterfaceEvent() api.Message { + return &SwInterfaceEvent{} +} + +// WantInterfaceEvents represents the VPP binary API message 'want_interface_events'. +// Generated from 'interface.api.json', line 171: +// +// "want_interface_events", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "enable_disable" +// ], +// [ +// "u32", +// "pid" +// ], +// { +// "crc": "0x476f5a08" +// } +// +type WantInterfaceEvents struct { + EnableDisable uint32 + PID uint32 +} + +func (*WantInterfaceEvents) GetMessageName() string { + return "want_interface_events" +} +func (*WantInterfaceEvents) GetCrcString() string { + return "476f5a08" +} +func (*WantInterfaceEvents) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewWantInterfaceEvents() api.Message { + return &WantInterfaceEvents{} +} + +// WantInterfaceEventsReply represents the VPP binary API message 'want_interface_events_reply'. +// Generated from 'interface.api.json', line 197: +// +// "want_interface_events_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type WantInterfaceEventsReply struct { + Retval int32 +} + +func (*WantInterfaceEventsReply) GetMessageName() string { + return "want_interface_events_reply" +} +func (*WantInterfaceEventsReply) GetCrcString() string { + return "e8d4e804" +} +func (*WantInterfaceEventsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewWantInterfaceEventsReply() api.Message { + return &WantInterfaceEventsReply{} +} + +// SwInterfaceDetails represents the VPP binary API message 'sw_interface_details'. +// Generated from 'interface.api.json', line 215: +// +// "sw_interface_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u32", +// "sup_sw_if_index" +// ], +// [ +// "u32", +// "l2_address_length" +// ], +// [ +// "u8", +// "l2_address", +// 8 +// ], +// [ +// "u8", +// "interface_name", +// 64 +// ], +// [ +// "u8", +// "admin_up_down" +// ], +// [ +// "u8", +// "link_up_down" +// ], +// [ +// "u8", +// "link_duplex" +// ], +// [ +// "u8", +// "link_speed" +// ], +// [ +// "u16", +// "link_mtu" +// ], +// [ +// "u32", +// "mtu", +// 4 +// ], +// [ +// "u32", +// "sub_id" +// ], +// [ +// "u8", +// "sub_dot1ad" +// ], +// [ +// "u8", +// "sub_dot1ah" +// ], +// [ +// "u8", +// "sub_number_of_tags" +// ], +// [ +// "u16", +// "sub_outer_vlan_id" +// ], +// [ +// "u16", +// "sub_inner_vlan_id" +// ], +// [ +// "u8", +// "sub_exact_match" +// ], +// [ +// "u8", +// "sub_default" +// ], +// [ +// "u8", +// "sub_outer_vlan_id_any" +// ], +// [ +// "u8", +// "sub_inner_vlan_id_any" +// ], +// [ +// "u32", +// "vtr_op" +// ], +// [ +// "u32", +// "vtr_push_dot1q" +// ], +// [ +// "u32", +// "vtr_tag1" +// ], +// [ +// "u32", +// "vtr_tag2" +// ], +// [ +// "u8", +// "tag", +// 64 +// ], +// [ +// "u16", +// "outer_tag" +// ], +// [ +// "u8", +// "b_dmac", +// 6 +// ], +// [ +// "u8", +// "b_smac", +// 6 +// ], +// [ +// "u16", +// "b_vlanid" +// ], +// [ +// "u32", +// "i_sid" +// ], +// { +// "crc": "0x09b4b510" +// } +// +type SwInterfaceDetails struct { + SwIfIndex uint32 + SupSwIfIndex uint32 + L2AddressLength uint32 + L2Address []byte `struc:"[8]byte"` + InterfaceName []byte `struc:"[64]byte"` + AdminUpDown uint8 + LinkUpDown uint8 + LinkDuplex uint8 + LinkSpeed uint8 + LinkMtu uint16 + Mtu []uint32 `struc:"[4]uint32"` + SubID uint32 + SubDot1ad uint8 + SubDot1ah uint8 + SubNumberOfTags uint8 + SubOuterVlanID uint16 + SubInnerVlanID uint16 + SubExactMatch uint8 + SubDefault uint8 + SubOuterVlanIDAny uint8 + SubInnerVlanIDAny uint8 + VtrOp uint32 + VtrPushDot1q uint32 + VtrTag1 uint32 + VtrTag2 uint32 + Tag []byte `struc:"[64]byte"` + OuterTag uint16 + BDmac []byte `struc:"[6]byte"` + BSmac []byte `struc:"[6]byte"` + BVlanid uint16 + ISid uint32 +} + +func (*SwInterfaceDetails) GetMessageName() string { + return "sw_interface_details" +} +func (*SwInterfaceDetails) GetCrcString() string { + return "09b4b510" +} +func (*SwInterfaceDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewSwInterfaceDetails() api.Message { + return &SwInterfaceDetails{} +} + +// SwInterfaceDump represents the VPP binary API message 'sw_interface_dump'. +// Generated from 'interface.api.json', line 359: +// +// "sw_interface_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "name_filter_valid" +// ], +// [ +// "u8", +// "name_filter", +// 49 +// ], +// { +// "crc": "0x63f5e3b7" +// } +// +type SwInterfaceDump struct { + NameFilterValid uint8 + NameFilter []byte `struc:"[49]byte"` +} + +func (*SwInterfaceDump) GetMessageName() string { + return "sw_interface_dump" +} +func (*SwInterfaceDump) GetCrcString() string { + return "63f5e3b7" +} +func (*SwInterfaceDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewSwInterfaceDump() api.Message { + return &SwInterfaceDump{} +} + +// SwInterfaceAddDelAddress represents the VPP binary API message 'sw_interface_add_del_address'. +// Generated from 'interface.api.json', line 386: +// +// "sw_interface_add_del_address", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "is_add" +// ], +// [ +// "u8", +// "is_ipv6" +// ], +// [ +// "u8", +// "del_all" +// ], +// [ +// "u8", +// "address_length" +// ], +// [ +// "u8", +// "address", +// 16 +// ], +// { +// "crc": "0x7b583179" +// } +// +type SwInterfaceAddDelAddress struct { + SwIfIndex uint32 + IsAdd uint8 + IsIPv6 uint8 + DelAll uint8 + AddressLength uint8 + Address []byte `struc:"[16]byte"` +} + +func (*SwInterfaceAddDelAddress) GetMessageName() string { + return "sw_interface_add_del_address" +} +func (*SwInterfaceAddDelAddress) GetCrcString() string { + return "7b583179" +} +func (*SwInterfaceAddDelAddress) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewSwInterfaceAddDelAddress() api.Message { + return &SwInterfaceAddDelAddress{} +} + +// SwInterfaceAddDelAddressReply represents the VPP binary API message 'sw_interface_add_del_address_reply'. +// Generated from 'interface.api.json', line 429: +// +// "sw_interface_add_del_address_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type SwInterfaceAddDelAddressReply struct { + Retval int32 +} + +func (*SwInterfaceAddDelAddressReply) GetMessageName() string { + return "sw_interface_add_del_address_reply" +} +func (*SwInterfaceAddDelAddressReply) GetCrcString() string { + return "e8d4e804" +} +func (*SwInterfaceAddDelAddressReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewSwInterfaceAddDelAddressReply() api.Message { + return &SwInterfaceAddDelAddressReply{} +} + +// SwInterfaceSetTable represents the VPP binary API message 'sw_interface_set_table'. +// Generated from 'interface.api.json', line 447: +// +// "sw_interface_set_table", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "is_ipv6" +// ], +// [ +// "u32", +// "vrf_id" +// ], +// { +// "crc": "0xacb25d89" +// } +// +type SwInterfaceSetTable struct { + SwIfIndex uint32 + IsIPv6 uint8 + VrfID uint32 +} + +func (*SwInterfaceSetTable) GetMessageName() string { + return "sw_interface_set_table" +} +func (*SwInterfaceSetTable) GetCrcString() string { + return "acb25d89" +} +func (*SwInterfaceSetTable) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewSwInterfaceSetTable() api.Message { + return &SwInterfaceSetTable{} +} + +// SwInterfaceSetTableReply represents the VPP binary API message 'sw_interface_set_table_reply'. +// Generated from 'interface.api.json', line 477: +// +// "sw_interface_set_table_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type SwInterfaceSetTableReply struct { + Retval int32 +} + +func (*SwInterfaceSetTableReply) GetMessageName() string { + return "sw_interface_set_table_reply" +} +func (*SwInterfaceSetTableReply) GetCrcString() string { + return "e8d4e804" +} +func (*SwInterfaceSetTableReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewSwInterfaceSetTableReply() api.Message { + return &SwInterfaceSetTableReply{} +} + +// SwInterfaceGetTable represents the VPP binary API message 'sw_interface_get_table'. +// Generated from 'interface.api.json', line 495: +// +// "sw_interface_get_table", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "is_ipv6" +// ], +// { +// "crc": "0x6b7bcd0a" +// } +// +type SwInterfaceGetTable struct { + SwIfIndex uint32 + IsIPv6 uint8 +} + +func (*SwInterfaceGetTable) GetMessageName() string { + return "sw_interface_get_table" +} +func (*SwInterfaceGetTable) GetCrcString() string { + return "6b7bcd0a" +} +func (*SwInterfaceGetTable) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewSwInterfaceGetTable() api.Message { + return &SwInterfaceGetTable{} +} + +// SwInterfaceGetTableReply represents the VPP binary API message 'sw_interface_get_table_reply'. +// Generated from 'interface.api.json', line 521: +// +// "sw_interface_get_table_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// [ +// "u32", +// "vrf_id" +// ], +// { +// "crc": "0xa6eb0109" +// } +// +type SwInterfaceGetTableReply struct { + Retval int32 + VrfID uint32 +} + +func (*SwInterfaceGetTableReply) GetMessageName() string { + return "sw_interface_get_table_reply" +} +func (*SwInterfaceGetTableReply) GetCrcString() string { + return "a6eb0109" +} +func (*SwInterfaceGetTableReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewSwInterfaceGetTableReply() api.Message { + return &SwInterfaceGetTableReply{} +} + +// SwInterfaceSetUnnumbered represents the VPP binary API message 'sw_interface_set_unnumbered'. +// Generated from 'interface.api.json', line 543: +// +// "sw_interface_set_unnumbered", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u32", +// "unnumbered_sw_if_index" +// ], +// [ +// "u8", +// "is_add" +// ], +// { +// "crc": "0xa2c1bbda" +// } +// +type SwInterfaceSetUnnumbered struct { + SwIfIndex uint32 + UnnumberedSwIfIndex uint32 + IsAdd uint8 +} + +func (*SwInterfaceSetUnnumbered) GetMessageName() string { + return "sw_interface_set_unnumbered" +} +func (*SwInterfaceSetUnnumbered) GetCrcString() string { + return "a2c1bbda" +} +func (*SwInterfaceSetUnnumbered) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewSwInterfaceSetUnnumbered() api.Message { + return &SwInterfaceSetUnnumbered{} +} + +// SwInterfaceSetUnnumberedReply represents the VPP binary API message 'sw_interface_set_unnumbered_reply'. +// Generated from 'interface.api.json', line 573: +// +// "sw_interface_set_unnumbered_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type SwInterfaceSetUnnumberedReply struct { + Retval int32 +} + +func (*SwInterfaceSetUnnumberedReply) GetMessageName() string { + return "sw_interface_set_unnumbered_reply" +} +func (*SwInterfaceSetUnnumberedReply) GetCrcString() string { + return "e8d4e804" +} +func (*SwInterfaceSetUnnumberedReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewSwInterfaceSetUnnumberedReply() api.Message { + return &SwInterfaceSetUnnumberedReply{} +} + +// SwInterfaceClearStats represents the VPP binary API message 'sw_interface_clear_stats'. +// Generated from 'interface.api.json', line 591: +// +// "sw_interface_clear_stats", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0x529cb13f" +// } +// +type SwInterfaceClearStats struct { + SwIfIndex uint32 +} + +func (*SwInterfaceClearStats) GetMessageName() string { + return "sw_interface_clear_stats" +} +func (*SwInterfaceClearStats) GetCrcString() string { + return "529cb13f" +} +func (*SwInterfaceClearStats) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewSwInterfaceClearStats() api.Message { + return &SwInterfaceClearStats{} +} + +// SwInterfaceClearStatsReply represents the VPP binary API message 'sw_interface_clear_stats_reply'. +// Generated from 'interface.api.json', line 613: +// +// "sw_interface_clear_stats_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type SwInterfaceClearStatsReply struct { + Retval int32 +} + +func (*SwInterfaceClearStatsReply) GetMessageName() string { + return "sw_interface_clear_stats_reply" +} +func (*SwInterfaceClearStatsReply) GetCrcString() string { + return "e8d4e804" +} +func (*SwInterfaceClearStatsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewSwInterfaceClearStatsReply() api.Message { + return &SwInterfaceClearStatsReply{} +} + +// SwInterfaceTagAddDel represents the VPP binary API message 'sw_interface_tag_add_del'. +// Generated from 'interface.api.json', line 631: +// +// "sw_interface_tag_add_del", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "is_add" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "tag", +// 64 +// ], +// { +// "crc": "0x14cc636c" +// } +// +type SwInterfaceTagAddDel struct { + IsAdd uint8 + SwIfIndex uint32 + Tag []byte `struc:"[64]byte"` +} + +func (*SwInterfaceTagAddDel) GetMessageName() string { + return "sw_interface_tag_add_del" +} +func (*SwInterfaceTagAddDel) GetCrcString() string { + return "14cc636c" +} +func (*SwInterfaceTagAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewSwInterfaceTagAddDel() api.Message { + return &SwInterfaceTagAddDel{} +} + +// SwInterfaceTagAddDelReply represents the VPP binary API message 'sw_interface_tag_add_del_reply'. +// Generated from 'interface.api.json', line 662: +// +// "sw_interface_tag_add_del_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type SwInterfaceTagAddDelReply struct { + Retval int32 +} + +func (*SwInterfaceTagAddDelReply) GetMessageName() string { + return "sw_interface_tag_add_del_reply" +} +func (*SwInterfaceTagAddDelReply) GetCrcString() string { + return "e8d4e804" +} +func (*SwInterfaceTagAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewSwInterfaceTagAddDelReply() api.Message { + return &SwInterfaceTagAddDelReply{} +} + +// SwInterfaceSetMacAddress represents the VPP binary API message 'sw_interface_set_mac_address'. +// Generated from 'interface.api.json', line 680: +// +// "sw_interface_set_mac_address", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "mac_address", +// 6 +// ], +// { +// "crc": "0xeed5dfca" +// } +// +type SwInterfaceSetMacAddress struct { + SwIfIndex uint32 + MacAddress []byte `struc:"[6]byte"` +} + +func (*SwInterfaceSetMacAddress) GetMessageName() string { + return "sw_interface_set_mac_address" +} +func (*SwInterfaceSetMacAddress) GetCrcString() string { + return "eed5dfca" +} +func (*SwInterfaceSetMacAddress) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewSwInterfaceSetMacAddress() api.Message { + return &SwInterfaceSetMacAddress{} +} + +// SwInterfaceSetMacAddressReply represents the VPP binary API message 'sw_interface_set_mac_address_reply'. +// Generated from 'interface.api.json', line 707: +// +// "sw_interface_set_mac_address_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type SwInterfaceSetMacAddressReply struct { + Retval int32 +} + +func (*SwInterfaceSetMacAddressReply) GetMessageName() string { + return "sw_interface_set_mac_address_reply" +} +func (*SwInterfaceSetMacAddressReply) GetCrcString() string { + return "e8d4e804" +} +func (*SwInterfaceSetMacAddressReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewSwInterfaceSetMacAddressReply() api.Message { + return &SwInterfaceSetMacAddressReply{} +} + +// SwInterfaceGetMacAddress represents the VPP binary API message 'sw_interface_get_mac_address'. +// Generated from 'interface.api.json', line 725: +// +// "sw_interface_get_mac_address", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0x529cb13f" +// } +// +type SwInterfaceGetMacAddress struct { + SwIfIndex uint32 +} + +func (*SwInterfaceGetMacAddress) GetMessageName() string { + return "sw_interface_get_mac_address" +} +func (*SwInterfaceGetMacAddress) GetCrcString() string { + return "529cb13f" +} +func (*SwInterfaceGetMacAddress) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewSwInterfaceGetMacAddress() api.Message { + return &SwInterfaceGetMacAddress{} +} + +// SwInterfaceGetMacAddressReply represents the VPP binary API message 'sw_interface_get_mac_address_reply'. +// Generated from 'interface.api.json', line 747: +// +// "sw_interface_get_mac_address_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// [ +// "u8", +// "mac_address", +// 6 +// ], +// { +// "crc": "0x8ea538d3" +// } +// +type SwInterfaceGetMacAddressReply struct { + Retval int32 + MacAddress []byte `struc:"[6]byte"` +} + +func (*SwInterfaceGetMacAddressReply) GetMessageName() string { + return "sw_interface_get_mac_address_reply" +} +func (*SwInterfaceGetMacAddressReply) GetCrcString() string { + return "8ea538d3" +} +func (*SwInterfaceGetMacAddressReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewSwInterfaceGetMacAddressReply() api.Message { + return &SwInterfaceGetMacAddressReply{} +} + +// SwInterfaceSetRxMode represents the VPP binary API message 'sw_interface_set_rx_mode'. +// Generated from 'interface.api.json', line 770: +// +// "sw_interface_set_rx_mode", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "queue_id_valid" +// ], +// [ +// "u32", +// "queue_id" +// ], +// [ +// "u8", +// "mode" +// ], +// { +// "crc": "0x2a1cc58c" +// } +// +type SwInterfaceSetRxMode struct { + SwIfIndex uint32 + QueueIDValid uint8 + QueueID uint32 + Mode uint8 +} + +func (*SwInterfaceSetRxMode) GetMessageName() string { + return "sw_interface_set_rx_mode" +} +func (*SwInterfaceSetRxMode) GetCrcString() string { + return "2a1cc58c" +} +func (*SwInterfaceSetRxMode) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewSwInterfaceSetRxMode() api.Message { + return &SwInterfaceSetRxMode{} +} + +// SwInterfaceSetRxModeReply represents the VPP binary API message 'sw_interface_set_rx_mode_reply'. +// Generated from 'interface.api.json', line 804: +// +// "sw_interface_set_rx_mode_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type SwInterfaceSetRxModeReply struct { + Retval int32 +} + +func (*SwInterfaceSetRxModeReply) GetMessageName() string { + return "sw_interface_set_rx_mode_reply" +} +func (*SwInterfaceSetRxModeReply) GetCrcString() string { + return "e8d4e804" +} +func (*SwInterfaceSetRxModeReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewSwInterfaceSetRxModeReply() api.Message { + return &SwInterfaceSetRxModeReply{} +} + +// InterfaceNameRenumber represents the VPP binary API message 'interface_name_renumber'. +// Generated from 'interface.api.json', line 822: +// +// "interface_name_renumber", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u32", +// "new_show_dev_instance" +// ], +// { +// "crc": "0x39194269" +// } +// +type InterfaceNameRenumber struct { + SwIfIndex uint32 + NewShowDevInstance uint32 +} + +func (*InterfaceNameRenumber) GetMessageName() string { + return "interface_name_renumber" +} +func (*InterfaceNameRenumber) GetCrcString() string { + return "39194269" +} +func (*InterfaceNameRenumber) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewInterfaceNameRenumber() api.Message { + return &InterfaceNameRenumber{} +} + +// InterfaceNameRenumberReply represents the VPP binary API message 'interface_name_renumber_reply'. +// Generated from 'interface.api.json', line 848: +// +// "interface_name_renumber_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type InterfaceNameRenumberReply struct { + Retval int32 +} + +func (*InterfaceNameRenumberReply) GetMessageName() string { + return "interface_name_renumber_reply" +} +func (*InterfaceNameRenumberReply) GetCrcString() string { + return "e8d4e804" +} +func (*InterfaceNameRenumberReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewInterfaceNameRenumberReply() api.Message { + return &InterfaceNameRenumberReply{} +} + +// CreateSubif represents the VPP binary API message 'create_subif'. +// Generated from 'interface.api.json', line 866: +// +// "create_subif", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u32", +// "sub_id" +// ], +// [ +// "u8", +// "no_tags" +// ], +// [ +// "u8", +// "one_tag" +// ], +// [ +// "u8", +// "two_tags" +// ], +// [ +// "u8", +// "dot1ad" +// ], +// [ +// "u8", +// "exact_match" +// ], +// [ +// "u8", +// "default_sub" +// ], +// [ +// "u8", +// "outer_vlan_id_any" +// ], +// [ +// "u8", +// "inner_vlan_id_any" +// ], +// [ +// "u16", +// "outer_vlan_id" +// ], +// [ +// "u16", +// "inner_vlan_id" +// ], +// { +// "crc": "0x86cfe408" +// } +// +type CreateSubif struct { + SwIfIndex uint32 + SubID uint32 + NoTags uint8 + OneTag uint8 + TwoTags uint8 + Dot1ad uint8 + ExactMatch uint8 + DefaultSub uint8 + OuterVlanIDAny uint8 + InnerVlanIDAny uint8 + OuterVlanID uint16 + InnerVlanID uint16 +} + +func (*CreateSubif) GetMessageName() string { + return "create_subif" +} +func (*CreateSubif) GetCrcString() string { + return "86cfe408" +} +func (*CreateSubif) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewCreateSubif() api.Message { + return &CreateSubif{} +} + +// CreateSubifReply represents the VPP binary API message 'create_subif_reply'. +// Generated from 'interface.api.json', line 932: +// +// "create_subif_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0xfda5941f" +// } +// +type CreateSubifReply struct { + Retval int32 + SwIfIndex uint32 +} + +func (*CreateSubifReply) GetMessageName() string { + return "create_subif_reply" +} +func (*CreateSubifReply) GetCrcString() string { + return "fda5941f" +} +func (*CreateSubifReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewCreateSubifReply() api.Message { + return &CreateSubifReply{} +} + +// CreateVlanSubif represents the VPP binary API message 'create_vlan_subif'. +// Generated from 'interface.api.json', line 954: +// +// "create_vlan_subif", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u32", +// "vlan_id" +// ], +// { +// "crc": "0x70cadeda" +// } +// +type CreateVlanSubif struct { + SwIfIndex uint32 + VlanID uint32 +} + +func (*CreateVlanSubif) GetMessageName() string { + return "create_vlan_subif" +} +func (*CreateVlanSubif) GetCrcString() string { + return "70cadeda" +} +func (*CreateVlanSubif) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewCreateVlanSubif() api.Message { + return &CreateVlanSubif{} +} + +// CreateVlanSubifReply represents the VPP binary API message 'create_vlan_subif_reply'. +// Generated from 'interface.api.json', line 980: +// +// "create_vlan_subif_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0xfda5941f" +// } +// +type CreateVlanSubifReply struct { + Retval int32 + SwIfIndex uint32 +} + +func (*CreateVlanSubifReply) GetMessageName() string { + return "create_vlan_subif_reply" +} +func (*CreateVlanSubifReply) GetCrcString() string { + return "fda5941f" +} +func (*CreateVlanSubifReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewCreateVlanSubifReply() api.Message { + return &CreateVlanSubifReply{} +} + +// DeleteSubif represents the VPP binary API message 'delete_subif'. +// Generated from 'interface.api.json', line 1002: +// +// "delete_subif", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0x529cb13f" +// } +// +type DeleteSubif struct { + SwIfIndex uint32 +} + +func (*DeleteSubif) GetMessageName() string { + return "delete_subif" +} +func (*DeleteSubif) GetCrcString() string { + return "529cb13f" +} +func (*DeleteSubif) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewDeleteSubif() api.Message { + return &DeleteSubif{} +} + +// DeleteSubifReply represents the VPP binary API message 'delete_subif_reply'. +// Generated from 'interface.api.json', line 1024: +// +// "delete_subif_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type DeleteSubifReply struct { + Retval int32 +} + +func (*DeleteSubifReply) GetMessageName() string { + return "delete_subif_reply" +} +func (*DeleteSubifReply) GetCrcString() string { + return "e8d4e804" +} +func (*DeleteSubifReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewDeleteSubifReply() api.Message { + return &DeleteSubifReply{} +} + +// CreateLoopback represents the VPP binary API message 'create_loopback'. +// Generated from 'interface.api.json', line 1042: +// +// "create_loopback", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "mac_address", +// 6 +// ], +// { +// "crc": "0x3b54129c" +// } +// +type CreateLoopback struct { + MacAddress []byte `struc:"[6]byte"` +} + +func (*CreateLoopback) GetMessageName() string { + return "create_loopback" +} +func (*CreateLoopback) GetCrcString() string { + return "3b54129c" +} +func (*CreateLoopback) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewCreateLoopback() api.Message { + return &CreateLoopback{} +} + +// CreateLoopbackReply represents the VPP binary API message 'create_loopback_reply'. +// Generated from 'interface.api.json', line 1065: +// +// "create_loopback_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0xfda5941f" +// } +// +type CreateLoopbackReply struct { + Retval int32 + SwIfIndex uint32 +} + +func (*CreateLoopbackReply) GetMessageName() string { + return "create_loopback_reply" +} +func (*CreateLoopbackReply) GetCrcString() string { + return "fda5941f" +} +func (*CreateLoopbackReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewCreateLoopbackReply() api.Message { + return &CreateLoopbackReply{} +} + +// CreateLoopbackInstance represents the VPP binary API message 'create_loopback_instance'. +// Generated from 'interface.api.json', line 1087: +// +// "create_loopback_instance", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "mac_address", +// 6 +// ], +// [ +// "u8", +// "is_specified" +// ], +// [ +// "u32", +// "user_instance" +// ], +// { +// "crc": "0x7bbd53b6" +// } +// +type CreateLoopbackInstance struct { + MacAddress []byte `struc:"[6]byte"` + IsSpecified uint8 + UserInstance uint32 +} + +func (*CreateLoopbackInstance) GetMessageName() string { + return "create_loopback_instance" +} +func (*CreateLoopbackInstance) GetCrcString() string { + return "7bbd53b6" +} +func (*CreateLoopbackInstance) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewCreateLoopbackInstance() api.Message { + return &CreateLoopbackInstance{} +} + +// CreateLoopbackInstanceReply represents the VPP binary API message 'create_loopback_instance_reply'. +// Generated from 'interface.api.json', line 1118: +// +// "create_loopback_instance_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0xfda5941f" +// } +// +type CreateLoopbackInstanceReply struct { + Retval int32 + SwIfIndex uint32 +} + +func (*CreateLoopbackInstanceReply) GetMessageName() string { + return "create_loopback_instance_reply" +} +func (*CreateLoopbackInstanceReply) GetCrcString() string { + return "fda5941f" +} +func (*CreateLoopbackInstanceReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewCreateLoopbackInstanceReply() api.Message { + return &CreateLoopbackInstanceReply{} +} + +// DeleteLoopback represents the VPP binary API message 'delete_loopback'. +// Generated from 'interface.api.json', line 1140: +// +// "delete_loopback", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0x529cb13f" +// } +// +type DeleteLoopback struct { + SwIfIndex uint32 +} + +func (*DeleteLoopback) GetMessageName() string { + return "delete_loopback" +} +func (*DeleteLoopback) GetCrcString() string { + return "529cb13f" +} +func (*DeleteLoopback) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewDeleteLoopback() api.Message { + return &DeleteLoopback{} +} + +// DeleteLoopbackReply represents the VPP binary API message 'delete_loopback_reply'. +// Generated from 'interface.api.json', line 1162: +// +// "delete_loopback_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type DeleteLoopbackReply struct { + Retval int32 +} + +func (*DeleteLoopbackReply) GetMessageName() string { + return "delete_loopback_reply" +} +func (*DeleteLoopbackReply) GetCrcString() string { + return "e8d4e804" +} +func (*DeleteLoopbackReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewDeleteLoopbackReply() api.Message { + return &DeleteLoopbackReply{} +} + +// CollectDetailedInterfaceStats represents the VPP binary API message 'collect_detailed_interface_stats'. +// Generated from 'interface.api.json', line 1180: +// +// "collect_detailed_interface_stats", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "enable_disable" +// ], +// { +// "crc": "0x69d24598" +// } +// +type CollectDetailedInterfaceStats struct { + SwIfIndex uint32 + EnableDisable uint8 +} + +func (*CollectDetailedInterfaceStats) GetMessageName() string { + return "collect_detailed_interface_stats" +} +func (*CollectDetailedInterfaceStats) GetCrcString() string { + return "69d24598" +} +func (*CollectDetailedInterfaceStats) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewCollectDetailedInterfaceStats() api.Message { + return &CollectDetailedInterfaceStats{} +} + +// CollectDetailedInterfaceStatsReply represents the VPP binary API message 'collect_detailed_interface_stats_reply'. +// Generated from 'interface.api.json', line 1206: +// +// "collect_detailed_interface_stats_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type CollectDetailedInterfaceStatsReply struct { + Retval int32 +} + +func (*CollectDetailedInterfaceStatsReply) GetMessageName() string { + return "collect_detailed_interface_stats_reply" +} +func (*CollectDetailedInterfaceStatsReply) GetCrcString() string { + return "e8d4e804" +} +func (*CollectDetailedInterfaceStatsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewCollectDetailedInterfaceStatsReply() api.Message { + return &CollectDetailedInterfaceStatsReply{} +} + +/* Services */ + +type Services interface { + DumpSwInterface(*SwInterfaceDump) (*SwInterfaceDetails, error) + CollectDetailedInterfaceStats(*CollectDetailedInterfaceStats) (*CollectDetailedInterfaceStatsReply, error) + CreateLoopback(*CreateLoopback) (*CreateLoopbackReply, error) + CreateLoopbackInstance(*CreateLoopbackInstance) (*CreateLoopbackInstanceReply, error) + CreateSubif(*CreateSubif) (*CreateSubifReply, error) + CreateVlanSubif(*CreateVlanSubif) (*CreateVlanSubifReply, error) + DeleteLoopback(*DeleteLoopback) (*DeleteLoopbackReply, error) + DeleteSubif(*DeleteSubif) (*DeleteSubifReply, error) + HwInterfaceSetMtu(*HwInterfaceSetMtu) (*HwInterfaceSetMtuReply, error) + InterfaceNameRenumber(*InterfaceNameRenumber) (*InterfaceNameRenumberReply, error) + SwInterfaceAddDelAddress(*SwInterfaceAddDelAddress) (*SwInterfaceAddDelAddressReply, error) + SwInterfaceClearStats(*SwInterfaceClearStats) (*SwInterfaceClearStatsReply, error) + SwInterfaceGetMacAddress(*SwInterfaceGetMacAddress) (*SwInterfaceGetMacAddressReply, error) + SwInterfaceGetTable(*SwInterfaceGetTable) (*SwInterfaceGetTableReply, error) + SwInterfaceSetFlags(*SwInterfaceSetFlags) (*SwInterfaceSetFlagsReply, error) + SwInterfaceSetMacAddress(*SwInterfaceSetMacAddress) (*SwInterfaceSetMacAddressReply, error) + SwInterfaceSetMtu(*SwInterfaceSetMtu) (*SwInterfaceSetMtuReply, error) + SwInterfaceSetRxMode(*SwInterfaceSetRxMode) (*SwInterfaceSetRxModeReply, error) + SwInterfaceSetTable(*SwInterfaceSetTable) (*SwInterfaceSetTableReply, error) + SwInterfaceSetUnnumbered(*SwInterfaceSetUnnumbered) (*SwInterfaceSetUnnumberedReply, error) + SwInterfaceTagAddDel(*SwInterfaceTagAddDel) (*SwInterfaceTagAddDelReply, error) + WantInterfaceEvents(*WantInterfaceEvents) (*WantInterfaceEventsReply, error) +} + +func init() { + api.RegisterMessage((*SwInterfaceSetFlags)(nil), "interface.SwInterfaceSetFlags") + api.RegisterMessage((*SwInterfaceSetFlagsReply)(nil), "interface.SwInterfaceSetFlagsReply") + api.RegisterMessage((*HwInterfaceSetMtu)(nil), "interface.HwInterfaceSetMtu") + api.RegisterMessage((*HwInterfaceSetMtuReply)(nil), "interface.HwInterfaceSetMtuReply") + api.RegisterMessage((*SwInterfaceSetMtu)(nil), "interface.SwInterfaceSetMtu") + api.RegisterMessage((*SwInterfaceSetMtuReply)(nil), "interface.SwInterfaceSetMtuReply") + api.RegisterMessage((*SwInterfaceEvent)(nil), "interface.SwInterfaceEvent") + api.RegisterMessage((*WantInterfaceEvents)(nil), "interface.WantInterfaceEvents") + api.RegisterMessage((*WantInterfaceEventsReply)(nil), "interface.WantInterfaceEventsReply") + api.RegisterMessage((*SwInterfaceDetails)(nil), "interface.SwInterfaceDetails") + api.RegisterMessage((*SwInterfaceDump)(nil), "interface.SwInterfaceDump") + api.RegisterMessage((*SwInterfaceAddDelAddress)(nil), "interface.SwInterfaceAddDelAddress") + api.RegisterMessage((*SwInterfaceAddDelAddressReply)(nil), "interface.SwInterfaceAddDelAddressReply") + api.RegisterMessage((*SwInterfaceSetTable)(nil), "interface.SwInterfaceSetTable") + api.RegisterMessage((*SwInterfaceSetTableReply)(nil), "interface.SwInterfaceSetTableReply") + api.RegisterMessage((*SwInterfaceGetTable)(nil), "interface.SwInterfaceGetTable") + api.RegisterMessage((*SwInterfaceGetTableReply)(nil), "interface.SwInterfaceGetTableReply") + api.RegisterMessage((*SwInterfaceSetUnnumbered)(nil), "interface.SwInterfaceSetUnnumbered") + api.RegisterMessage((*SwInterfaceSetUnnumberedReply)(nil), "interface.SwInterfaceSetUnnumberedReply") + api.RegisterMessage((*SwInterfaceClearStats)(nil), "interface.SwInterfaceClearStats") + api.RegisterMessage((*SwInterfaceClearStatsReply)(nil), "interface.SwInterfaceClearStatsReply") + api.RegisterMessage((*SwInterfaceTagAddDel)(nil), "interface.SwInterfaceTagAddDel") + api.RegisterMessage((*SwInterfaceTagAddDelReply)(nil), "interface.SwInterfaceTagAddDelReply") + api.RegisterMessage((*SwInterfaceSetMacAddress)(nil), "interface.SwInterfaceSetMacAddress") + api.RegisterMessage((*SwInterfaceSetMacAddressReply)(nil), "interface.SwInterfaceSetMacAddressReply") + api.RegisterMessage((*SwInterfaceGetMacAddress)(nil), "interface.SwInterfaceGetMacAddress") + api.RegisterMessage((*SwInterfaceGetMacAddressReply)(nil), "interface.SwInterfaceGetMacAddressReply") + api.RegisterMessage((*SwInterfaceSetRxMode)(nil), "interface.SwInterfaceSetRxMode") + api.RegisterMessage((*SwInterfaceSetRxModeReply)(nil), "interface.SwInterfaceSetRxModeReply") + api.RegisterMessage((*InterfaceNameRenumber)(nil), "interface.InterfaceNameRenumber") + api.RegisterMessage((*InterfaceNameRenumberReply)(nil), "interface.InterfaceNameRenumberReply") + api.RegisterMessage((*CreateSubif)(nil), "interface.CreateSubif") + api.RegisterMessage((*CreateSubifReply)(nil), "interface.CreateSubifReply") + api.RegisterMessage((*CreateVlanSubif)(nil), "interface.CreateVlanSubif") + api.RegisterMessage((*CreateVlanSubifReply)(nil), "interface.CreateVlanSubifReply") + api.RegisterMessage((*DeleteSubif)(nil), "interface.DeleteSubif") + api.RegisterMessage((*DeleteSubifReply)(nil), "interface.DeleteSubifReply") + api.RegisterMessage((*CreateLoopback)(nil), "interface.CreateLoopback") + api.RegisterMessage((*CreateLoopbackReply)(nil), "interface.CreateLoopbackReply") + api.RegisterMessage((*CreateLoopbackInstance)(nil), "interface.CreateLoopbackInstance") + api.RegisterMessage((*CreateLoopbackInstanceReply)(nil), "interface.CreateLoopbackInstanceReply") + api.RegisterMessage((*DeleteLoopback)(nil), "interface.DeleteLoopback") + api.RegisterMessage((*DeleteLoopbackReply)(nil), "interface.DeleteLoopbackReply") + api.RegisterMessage((*CollectDetailedInterfaceStats)(nil), "interface.CollectDetailedInterfaceStats") + api.RegisterMessage((*CollectDetailedInterfaceStatsReply)(nil), "interface.CollectDetailedInterfaceStatsReply") +} diff --git a/examples/bin_api/interfaces/interfaces.go b/examples/bin_api/interfaces/interfaces.go deleted file mode 100644 index 41fda27..0000000 --- a/examples/bin_api/interfaces/interfaces.go +++ /dev/null @@ -1,2233 +0,0 @@ -// Code generated by govpp binapi-generator DO NOT EDIT. -// Package interfaces represents the VPP binary API of the 'interfaces' VPP module. -// Generated from '../../bin_api/interface.api.json' -package interfaces - -import "git.fd.io/govpp.git/api" - -// VlApiVersion contains version of the API. -const VlAPIVersion = 0xa9b5d13 - -// VlibCounter represents the VPP binary API data type 'vlib_counter'. -// Generated from '../../bin_api/interface.api.json', line 1296: -// -// "vlib_counter", -// [ -// "u64", -// "packets" -// ], -// [ -// "u64", -// "bytes" -// ], -// { -// "crc": "0xce2325a2" -// } -// -type VlibCounter struct { - Packets uint64 - Bytes uint64 -} - -func (*VlibCounter) GetTypeName() string { - return "vlib_counter" -} -func (*VlibCounter) GetCrcString() string { - return "ce2325a2" -} - -// VnetCombinedCounter represents the VPP binary API data type 'vnet_combined_counter'. -// Generated from '../../bin_api/interface.api.json', line 1310: -// -// "vnet_combined_counter", -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u64", -// "rx_packets" -// ], -// [ -// "u64", -// "rx_bytes" -// ], -// [ -// "u64", -// "tx_packets" -// ], -// [ -// "u64", -// "tx_bytes" -// ], -// { -// "crc": "0x3217ba8e" -// } -// -type VnetCombinedCounter struct { - SwIfIndex uint32 - RxPackets uint64 - RxBytes uint64 - TxPackets uint64 - TxBytes uint64 -} - -func (*VnetCombinedCounter) GetTypeName() string { - return "vnet_combined_counter" -} -func (*VnetCombinedCounter) GetCrcString() string { - return "3217ba8e" -} - -// VnetSimpleCounter represents the VPP binary API data type 'vnet_simple_counter'. -// Generated from '../../bin_api/interface.api.json', line 1336: -// -// "vnet_simple_counter", -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u64", -// "drop" -// ], -// [ -// "u64", -// "punt" -// ], -// [ -// "u64", -// "rx_ip4" -// ], -// [ -// "u64", -// "rx_ip6" -// ], -// [ -// "u64", -// "rx_no_buffer" -// ], -// [ -// "u64", -// "rx_miss" -// ], -// [ -// "u64", -// "rx_error" -// ], -// [ -// "u64", -// "tx_error" -// ], -// [ -// "u64", -// "rx_mpls" -// ], -// { -// "crc": "0x8bd65e2d" -// } -// -type VnetSimpleCounter struct { - SwIfIndex uint32 - Drop uint64 - Punt uint64 - RxIP4 uint64 - RxIP6 uint64 - RxNoBuffer uint64 - RxMiss uint64 - RxError uint64 - TxError uint64 - RxMpls uint64 -} - -func (*VnetSimpleCounter) GetTypeName() string { - return "vnet_simple_counter" -} -func (*VnetSimpleCounter) GetCrcString() string { - return "8bd65e2d" -} - -// SwInterfaceSetFlags represents the VPP binary API message 'sw_interface_set_flags'. -// Generated from '../../bin_api/interface.api.json', line 109: -// -// "sw_interface_set_flags", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "admin_up_down" -// ], -// { -// "crc": "0x555485f5" -// } -// -type SwInterfaceSetFlags struct { - SwIfIndex uint32 - AdminUpDown uint8 -} - -func (*SwInterfaceSetFlags) GetMessageName() string { - return "sw_interface_set_flags" -} -func (*SwInterfaceSetFlags) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*SwInterfaceSetFlags) GetCrcString() string { - return "555485f5" -} -func NewSwInterfaceSetFlags() api.Message { - return &SwInterfaceSetFlags{} -} - -// SwInterfaceSetFlagsReply represents the VPP binary API message 'sw_interface_set_flags_reply'. -// Generated from '../../bin_api/interface.api.json', line 135: -// -// "sw_interface_set_flags_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type SwInterfaceSetFlagsReply struct { - Retval int32 -} - -func (*SwInterfaceSetFlagsReply) GetMessageName() string { - return "sw_interface_set_flags_reply" -} -func (*SwInterfaceSetFlagsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*SwInterfaceSetFlagsReply) GetCrcString() string { - return "e8d4e804" -} -func NewSwInterfaceSetFlagsReply() api.Message { - return &SwInterfaceSetFlagsReply{} -} - -// SwInterfaceSetMtu represents the VPP binary API message 'sw_interface_set_mtu'. -// Generated from '../../bin_api/interface.api.json', line 153: -// -// "sw_interface_set_mtu", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u16", -// "mtu" -// ], -// { -// "crc": "0x132da1e7" -// } -// -type SwInterfaceSetMtu struct { - SwIfIndex uint32 - Mtu uint16 -} - -func (*SwInterfaceSetMtu) GetMessageName() string { - return "sw_interface_set_mtu" -} -func (*SwInterfaceSetMtu) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*SwInterfaceSetMtu) GetCrcString() string { - return "132da1e7" -} -func NewSwInterfaceSetMtu() api.Message { - return &SwInterfaceSetMtu{} -} - -// SwInterfaceSetMtuReply represents the VPP binary API message 'sw_interface_set_mtu_reply'. -// Generated from '../../bin_api/interface.api.json', line 179: -// -// "sw_interface_set_mtu_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type SwInterfaceSetMtuReply struct { - Retval int32 -} - -func (*SwInterfaceSetMtuReply) GetMessageName() string { - return "sw_interface_set_mtu_reply" -} -func (*SwInterfaceSetMtuReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*SwInterfaceSetMtuReply) GetCrcString() string { - return "e8d4e804" -} -func NewSwInterfaceSetMtuReply() api.Message { - return &SwInterfaceSetMtuReply{} -} - -// SwInterfaceEvent represents the VPP binary API message 'sw_interface_event'. -// Generated from '../../bin_api/interface.api.json', line 197: -// -// "sw_interface_event", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "pid" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "admin_up_down" -// ], -// [ -// "u8", -// "link_up_down" -// ], -// [ -// "u8", -// "deleted" -// ], -// { -// "crc": "0xbf9938e4" -// } -// -type SwInterfaceEvent struct { - Pid uint32 - SwIfIndex uint32 - AdminUpDown uint8 - LinkUpDown uint8 - Deleted uint8 -} - -func (*SwInterfaceEvent) GetMessageName() string { - return "sw_interface_event" -} -func (*SwInterfaceEvent) GetMessageType() api.MessageType { - return api.EventMessage -} -func (*SwInterfaceEvent) GetCrcString() string { - return "bf9938e4" -} -func NewSwInterfaceEvent() api.Message { - return &SwInterfaceEvent{} -} - -// WantInterfaceEvents represents the VPP binary API message 'want_interface_events'. -// Generated from '../../bin_api/interface.api.json', line 231: -// -// "want_interface_events", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "enable_disable" -// ], -// [ -// "u32", -// "pid" -// ], -// { -// "crc": "0x476f5a08" -// } -// -type WantInterfaceEvents struct { - EnableDisable uint32 - Pid uint32 -} - -func (*WantInterfaceEvents) GetMessageName() string { - return "want_interface_events" -} -func (*WantInterfaceEvents) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*WantInterfaceEvents) GetCrcString() string { - return "476f5a08" -} -func NewWantInterfaceEvents() api.Message { - return &WantInterfaceEvents{} -} - -// WantInterfaceEventsReply represents the VPP binary API message 'want_interface_events_reply'. -// Generated from '../../bin_api/interface.api.json', line 257: -// -// "want_interface_events_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type WantInterfaceEventsReply struct { - Retval int32 -} - -func (*WantInterfaceEventsReply) GetMessageName() string { - return "want_interface_events_reply" -} -func (*WantInterfaceEventsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*WantInterfaceEventsReply) GetCrcString() string { - return "e8d4e804" -} -func NewWantInterfaceEventsReply() api.Message { - return &WantInterfaceEventsReply{} -} - -// SwInterfaceDetails represents the VPP binary API message 'sw_interface_details'. -// Generated from '../../bin_api/interface.api.json', line 275: -// -// "sw_interface_details", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u32", -// "sup_sw_if_index" -// ], -// [ -// "u32", -// "l2_address_length" -// ], -// [ -// "u8", -// "l2_address", -// 8 -// ], -// [ -// "u8", -// "interface_name", -// 64 -// ], -// [ -// "u8", -// "admin_up_down" -// ], -// [ -// "u8", -// "link_up_down" -// ], -// [ -// "u8", -// "link_duplex" -// ], -// [ -// "u8", -// "link_speed" -// ], -// [ -// "u16", -// "link_mtu" -// ], -// [ -// "u32", -// "sub_id" -// ], -// [ -// "u8", -// "sub_dot1ad" -// ], -// [ -// "u8", -// "sub_dot1ah" -// ], -// [ -// "u8", -// "sub_number_of_tags" -// ], -// [ -// "u16", -// "sub_outer_vlan_id" -// ], -// [ -// "u16", -// "sub_inner_vlan_id" -// ], -// [ -// "u8", -// "sub_exact_match" -// ], -// [ -// "u8", -// "sub_default" -// ], -// [ -// "u8", -// "sub_outer_vlan_id_any" -// ], -// [ -// "u8", -// "sub_inner_vlan_id_any" -// ], -// [ -// "u32", -// "vtr_op" -// ], -// [ -// "u32", -// "vtr_push_dot1q" -// ], -// [ -// "u32", -// "vtr_tag1" -// ], -// [ -// "u32", -// "vtr_tag2" -// ], -// [ -// "u8", -// "tag", -// 64 -// ], -// [ -// "u16", -// "outer_tag" -// ], -// [ -// "u8", -// "b_dmac", -// 6 -// ], -// [ -// "u8", -// "b_smac", -// 6 -// ], -// [ -// "u16", -// "b_vlanid" -// ], -// [ -// "u32", -// "i_sid" -// ], -// { -// "crc": "0x23dee0ff" -// } -// -type SwInterfaceDetails struct { - SwIfIndex uint32 - SupSwIfIndex uint32 - L2AddressLength uint32 - L2Address []byte `struc:"[8]byte"` - InterfaceName []byte `struc:"[64]byte"` - AdminUpDown uint8 - LinkUpDown uint8 - LinkDuplex uint8 - LinkSpeed uint8 - LinkMtu uint16 - SubID uint32 - SubDot1ad uint8 - SubDot1ah uint8 - SubNumberOfTags uint8 - SubOuterVlanID uint16 - SubInnerVlanID uint16 - SubExactMatch uint8 - SubDefault uint8 - SubOuterVlanIDAny uint8 - SubInnerVlanIDAny uint8 - VtrOp uint32 - VtrPushDot1q uint32 - VtrTag1 uint32 - VtrTag2 uint32 - Tag []byte `struc:"[64]byte"` - OuterTag uint16 - BDmac []byte `struc:"[6]byte"` - BSmac []byte `struc:"[6]byte"` - BVlanid uint16 - ISid uint32 -} - -func (*SwInterfaceDetails) GetMessageName() string { - return "sw_interface_details" -} -func (*SwInterfaceDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*SwInterfaceDetails) GetCrcString() string { - return "23dee0ff" -} -func NewSwInterfaceDetails() api.Message { - return &SwInterfaceDetails{} -} - -// SwInterfaceDump represents the VPP binary API message 'sw_interface_dump'. -// Generated from '../../bin_api/interface.api.json', line 414: -// -// "sw_interface_dump", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "name_filter_valid" -// ], -// [ -// "u8", -// "name_filter", -// 49 -// ], -// { -// "crc": "0x63f5e3b7" -// } -// -type SwInterfaceDump struct { - NameFilterValid uint8 - NameFilter []byte `struc:"[49]byte"` -} - -func (*SwInterfaceDump) GetMessageName() string { - return "sw_interface_dump" -} -func (*SwInterfaceDump) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*SwInterfaceDump) GetCrcString() string { - return "63f5e3b7" -} -func NewSwInterfaceDump() api.Message { - return &SwInterfaceDump{} -} - -// SwInterfaceAddDelAddress represents the VPP binary API message 'sw_interface_add_del_address'. -// Generated from '../../bin_api/interface.api.json', line 441: -// -// "sw_interface_add_del_address", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "is_add" -// ], -// [ -// "u8", -// "is_ipv6" -// ], -// [ -// "u8", -// "del_all" -// ], -// [ -// "u8", -// "address_length" -// ], -// [ -// "u8", -// "address", -// 16 -// ], -// { -// "crc": "0x7b583179" -// } -// -type SwInterfaceAddDelAddress struct { - SwIfIndex uint32 - IsAdd uint8 - IsIpv6 uint8 - DelAll uint8 - AddressLength uint8 - Address []byte `struc:"[16]byte"` -} - -func (*SwInterfaceAddDelAddress) GetMessageName() string { - return "sw_interface_add_del_address" -} -func (*SwInterfaceAddDelAddress) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*SwInterfaceAddDelAddress) GetCrcString() string { - return "7b583179" -} -func NewSwInterfaceAddDelAddress() api.Message { - return &SwInterfaceAddDelAddress{} -} - -// SwInterfaceAddDelAddressReply represents the VPP binary API message 'sw_interface_add_del_address_reply'. -// Generated from '../../bin_api/interface.api.json', line 484: -// -// "sw_interface_add_del_address_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type SwInterfaceAddDelAddressReply struct { - Retval int32 -} - -func (*SwInterfaceAddDelAddressReply) GetMessageName() string { - return "sw_interface_add_del_address_reply" -} -func (*SwInterfaceAddDelAddressReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*SwInterfaceAddDelAddressReply) GetCrcString() string { - return "e8d4e804" -} -func NewSwInterfaceAddDelAddressReply() api.Message { - return &SwInterfaceAddDelAddressReply{} -} - -// SwInterfaceSetTable represents the VPP binary API message 'sw_interface_set_table'. -// Generated from '../../bin_api/interface.api.json', line 502: -// -// "sw_interface_set_table", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "is_ipv6" -// ], -// [ -// "u32", -// "vrf_id" -// ], -// { -// "crc": "0xacb25d89" -// } -// -type SwInterfaceSetTable struct { - SwIfIndex uint32 - IsIpv6 uint8 - VrfID uint32 -} - -func (*SwInterfaceSetTable) GetMessageName() string { - return "sw_interface_set_table" -} -func (*SwInterfaceSetTable) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*SwInterfaceSetTable) GetCrcString() string { - return "acb25d89" -} -func NewSwInterfaceSetTable() api.Message { - return &SwInterfaceSetTable{} -} - -// SwInterfaceSetTableReply represents the VPP binary API message 'sw_interface_set_table_reply'. -// Generated from '../../bin_api/interface.api.json', line 532: -// -// "sw_interface_set_table_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type SwInterfaceSetTableReply struct { - Retval int32 -} - -func (*SwInterfaceSetTableReply) GetMessageName() string { - return "sw_interface_set_table_reply" -} -func (*SwInterfaceSetTableReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*SwInterfaceSetTableReply) GetCrcString() string { - return "e8d4e804" -} -func NewSwInterfaceSetTableReply() api.Message { - return &SwInterfaceSetTableReply{} -} - -// SwInterfaceGetTable represents the VPP binary API message 'sw_interface_get_table'. -// Generated from '../../bin_api/interface.api.json', line 550: -// -// "sw_interface_get_table", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "is_ipv6" -// ], -// { -// "crc": "0x6b7bcd0a" -// } -// -type SwInterfaceGetTable struct { - SwIfIndex uint32 - IsIpv6 uint8 -} - -func (*SwInterfaceGetTable) GetMessageName() string { - return "sw_interface_get_table" -} -func (*SwInterfaceGetTable) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*SwInterfaceGetTable) GetCrcString() string { - return "6b7bcd0a" -} -func NewSwInterfaceGetTable() api.Message { - return &SwInterfaceGetTable{} -} - -// SwInterfaceGetTableReply represents the VPP binary API message 'sw_interface_get_table_reply'. -// Generated from '../../bin_api/interface.api.json', line 576: -// -// "sw_interface_get_table_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// [ -// "u32", -// "vrf_id" -// ], -// { -// "crc": "0xa6eb0109" -// } -// -type SwInterfaceGetTableReply struct { - Retval int32 - VrfID uint32 -} - -func (*SwInterfaceGetTableReply) GetMessageName() string { - return "sw_interface_get_table_reply" -} -func (*SwInterfaceGetTableReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*SwInterfaceGetTableReply) GetCrcString() string { - return "a6eb0109" -} -func NewSwInterfaceGetTableReply() api.Message { - return &SwInterfaceGetTableReply{} -} - -// VnetInterfaceSimpleCounters represents the VPP binary API message 'vnet_interface_simple_counters'. -// Generated from '../../bin_api/interface.api.json', line 598: -// -// "vnet_interface_simple_counters", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u8", -// "vnet_counter_type" -// ], -// [ -// "u32", -// "first_sw_if_index" -// ], -// [ -// "u32", -// "count" -// ], -// [ -// "u64", -// "data", -// 0, -// "count" -// ], -// { -// "crc": "0x9bc4a808" -// } -// -type VnetInterfaceSimpleCounters struct { - VnetCounterType uint8 - FirstSwIfIndex uint32 - Count uint32 `struc:"sizeof=Data"` - Data []uint64 -} - -func (*VnetInterfaceSimpleCounters) GetMessageName() string { - return "vnet_interface_simple_counters" -} -func (*VnetInterfaceSimpleCounters) GetMessageType() api.MessageType { - return api.OtherMessage -} -func (*VnetInterfaceSimpleCounters) GetCrcString() string { - return "9bc4a808" -} -func NewVnetInterfaceSimpleCounters() api.Message { - return &VnetInterfaceSimpleCounters{} -} - -// VnetInterfaceCombinedCounters represents the VPP binary API message 'vnet_interface_combined_counters'. -// Generated from '../../bin_api/interface.api.json', line 626: -// -// "vnet_interface_combined_counters", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u8", -// "vnet_counter_type" -// ], -// [ -// "u32", -// "first_sw_if_index" -// ], -// [ -// "u32", -// "count" -// ], -// [ -// "vl_api_vlib_counter_t", -// "data", -// 0, -// "count" -// ], -// { -// "crc": "0x2c595002" -// } -// -type VnetInterfaceCombinedCounters struct { - VnetCounterType uint8 - FirstSwIfIndex uint32 - Count uint32 `struc:"sizeof=Data"` - Data []VlibCounter -} - -func (*VnetInterfaceCombinedCounters) GetMessageName() string { - return "vnet_interface_combined_counters" -} -func (*VnetInterfaceCombinedCounters) GetMessageType() api.MessageType { - return api.OtherMessage -} -func (*VnetInterfaceCombinedCounters) GetCrcString() string { - return "2c595002" -} -func NewVnetInterfaceCombinedCounters() api.Message { - return &VnetInterfaceCombinedCounters{} -} - -// VnetPerInterfaceSimpleCounters represents the VPP binary API message 'vnet_per_interface_simple_counters'. -// Generated from '../../bin_api/interface.api.json', line 654: -// -// "vnet_per_interface_simple_counters", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "count" -// ], -// [ -// "u32", -// "timestamp" -// ], -// [ -// "vl_api_vnet_simple_counter_t", -// "data", -// 0, -// "count" -// ], -// { -// "crc": "0xd1fba9ba" -// } -// -type VnetPerInterfaceSimpleCounters struct { - Count uint32 `struc:"sizeof=Data"` - Timestamp uint32 - Data []VnetSimpleCounter -} - -func (*VnetPerInterfaceSimpleCounters) GetMessageName() string { - return "vnet_per_interface_simple_counters" -} -func (*VnetPerInterfaceSimpleCounters) GetMessageType() api.MessageType { - return api.OtherMessage -} -func (*VnetPerInterfaceSimpleCounters) GetCrcString() string { - return "d1fba9ba" -} -func NewVnetPerInterfaceSimpleCounters() api.Message { - return &VnetPerInterfaceSimpleCounters{} -} - -// VnetPerInterfaceCombinedCounters represents the VPP binary API message 'vnet_per_interface_combined_counters'. -// Generated from '../../bin_api/interface.api.json', line 678: -// -// "vnet_per_interface_combined_counters", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "count" -// ], -// [ -// "u32", -// "timestamp" -// ], -// [ -// "vl_api_vnet_combined_counter_t", -// "data", -// 0, -// "count" -// ], -// { -// "crc": "0xdc578375" -// } -// -type VnetPerInterfaceCombinedCounters struct { - Count uint32 `struc:"sizeof=Data"` - Timestamp uint32 - Data []VnetCombinedCounter -} - -func (*VnetPerInterfaceCombinedCounters) GetMessageName() string { - return "vnet_per_interface_combined_counters" -} -func (*VnetPerInterfaceCombinedCounters) GetMessageType() api.MessageType { - return api.OtherMessage -} -func (*VnetPerInterfaceCombinedCounters) GetCrcString() string { - return "dc578375" -} -func NewVnetPerInterfaceCombinedCounters() api.Message { - return &VnetPerInterfaceCombinedCounters{} -} - -// SwInterfaceSetUnnumbered represents the VPP binary API message 'sw_interface_set_unnumbered'. -// Generated from '../../bin_api/interface.api.json', line 702: -// -// "sw_interface_set_unnumbered", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u32", -// "unnumbered_sw_if_index" -// ], -// [ -// "u8", -// "is_add" -// ], -// { -// "crc": "0xa2c1bbda" -// } -// -type SwInterfaceSetUnnumbered struct { - SwIfIndex uint32 - UnnumberedSwIfIndex uint32 - IsAdd uint8 -} - -func (*SwInterfaceSetUnnumbered) GetMessageName() string { - return "sw_interface_set_unnumbered" -} -func (*SwInterfaceSetUnnumbered) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*SwInterfaceSetUnnumbered) GetCrcString() string { - return "a2c1bbda" -} -func NewSwInterfaceSetUnnumbered() api.Message { - return &SwInterfaceSetUnnumbered{} -} - -// SwInterfaceSetUnnumberedReply represents the VPP binary API message 'sw_interface_set_unnumbered_reply'. -// Generated from '../../bin_api/interface.api.json', line 732: -// -// "sw_interface_set_unnumbered_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type SwInterfaceSetUnnumberedReply struct { - Retval int32 -} - -func (*SwInterfaceSetUnnumberedReply) GetMessageName() string { - return "sw_interface_set_unnumbered_reply" -} -func (*SwInterfaceSetUnnumberedReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*SwInterfaceSetUnnumberedReply) GetCrcString() string { - return "e8d4e804" -} -func NewSwInterfaceSetUnnumberedReply() api.Message { - return &SwInterfaceSetUnnumberedReply{} -} - -// SwInterfaceClearStats represents the VPP binary API message 'sw_interface_clear_stats'. -// Generated from '../../bin_api/interface.api.json', line 750: -// -// "sw_interface_clear_stats", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// { -// "crc": "0x529cb13f" -// } -// -type SwInterfaceClearStats struct { - SwIfIndex uint32 -} - -func (*SwInterfaceClearStats) GetMessageName() string { - return "sw_interface_clear_stats" -} -func (*SwInterfaceClearStats) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*SwInterfaceClearStats) GetCrcString() string { - return "529cb13f" -} -func NewSwInterfaceClearStats() api.Message { - return &SwInterfaceClearStats{} -} - -// SwInterfaceClearStatsReply represents the VPP binary API message 'sw_interface_clear_stats_reply'. -// Generated from '../../bin_api/interface.api.json', line 772: -// -// "sw_interface_clear_stats_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type SwInterfaceClearStatsReply struct { - Retval int32 -} - -func (*SwInterfaceClearStatsReply) GetMessageName() string { - return "sw_interface_clear_stats_reply" -} -func (*SwInterfaceClearStatsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*SwInterfaceClearStatsReply) GetCrcString() string { - return "e8d4e804" -} -func NewSwInterfaceClearStatsReply() api.Message { - return &SwInterfaceClearStatsReply{} -} - -// SwInterfaceTagAddDel represents the VPP binary API message 'sw_interface_tag_add_del'. -// Generated from '../../bin_api/interface.api.json', line 790: -// -// "sw_interface_tag_add_del", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "is_add" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "tag", -// 64 -// ], -// { -// "crc": "0x14cc636c" -// } -// -type SwInterfaceTagAddDel struct { - IsAdd uint8 - SwIfIndex uint32 - Tag []byte `struc:"[64]byte"` -} - -func (*SwInterfaceTagAddDel) GetMessageName() string { - return "sw_interface_tag_add_del" -} -func (*SwInterfaceTagAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*SwInterfaceTagAddDel) GetCrcString() string { - return "14cc636c" -} -func NewSwInterfaceTagAddDel() api.Message { - return &SwInterfaceTagAddDel{} -} - -// SwInterfaceTagAddDelReply represents the VPP binary API message 'sw_interface_tag_add_del_reply'. -// Generated from '../../bin_api/interface.api.json', line 821: -// -// "sw_interface_tag_add_del_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type SwInterfaceTagAddDelReply struct { - Retval int32 -} - -func (*SwInterfaceTagAddDelReply) GetMessageName() string { - return "sw_interface_tag_add_del_reply" -} -func (*SwInterfaceTagAddDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*SwInterfaceTagAddDelReply) GetCrcString() string { - return "e8d4e804" -} -func NewSwInterfaceTagAddDelReply() api.Message { - return &SwInterfaceTagAddDelReply{} -} - -// SwInterfaceSetMacAddress represents the VPP binary API message 'sw_interface_set_mac_address'. -// Generated from '../../bin_api/interface.api.json', line 839: -// -// "sw_interface_set_mac_address", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "mac_address", -// 6 -// ], -// { -// "crc": "0xeed5dfca" -// } -// -type SwInterfaceSetMacAddress struct { - SwIfIndex uint32 - MacAddress []byte `struc:"[6]byte"` -} - -func (*SwInterfaceSetMacAddress) GetMessageName() string { - return "sw_interface_set_mac_address" -} -func (*SwInterfaceSetMacAddress) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*SwInterfaceSetMacAddress) GetCrcString() string { - return "eed5dfca" -} -func NewSwInterfaceSetMacAddress() api.Message { - return &SwInterfaceSetMacAddress{} -} - -// SwInterfaceSetMacAddressReply represents the VPP binary API message 'sw_interface_set_mac_address_reply'. -// Generated from '../../bin_api/interface.api.json', line 866: -// -// "sw_interface_set_mac_address_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type SwInterfaceSetMacAddressReply struct { - Retval int32 -} - -func (*SwInterfaceSetMacAddressReply) GetMessageName() string { - return "sw_interface_set_mac_address_reply" -} -func (*SwInterfaceSetMacAddressReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*SwInterfaceSetMacAddressReply) GetCrcString() string { - return "e8d4e804" -} -func NewSwInterfaceSetMacAddressReply() api.Message { - return &SwInterfaceSetMacAddressReply{} -} - -// SwInterfaceSetRxMode represents the VPP binary API message 'sw_interface_set_rx_mode'. -// Generated from '../../bin_api/interface.api.json', line 884: -// -// "sw_interface_set_rx_mode", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "queue_id_valid" -// ], -// [ -// "u32", -// "queue_id" -// ], -// [ -// "u8", -// "mode" -// ], -// { -// "crc": "0x2a1cc58c" -// } -// -type SwInterfaceSetRxMode struct { - SwIfIndex uint32 - QueueIDValid uint8 - QueueID uint32 - Mode uint8 -} - -func (*SwInterfaceSetRxMode) GetMessageName() string { - return "sw_interface_set_rx_mode" -} -func (*SwInterfaceSetRxMode) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*SwInterfaceSetRxMode) GetCrcString() string { - return "2a1cc58c" -} -func NewSwInterfaceSetRxMode() api.Message { - return &SwInterfaceSetRxMode{} -} - -// SwInterfaceSetRxModeReply represents the VPP binary API message 'sw_interface_set_rx_mode_reply'. -// Generated from '../../bin_api/interface.api.json', line 918: -// -// "sw_interface_set_rx_mode_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type SwInterfaceSetRxModeReply struct { - Retval int32 -} - -func (*SwInterfaceSetRxModeReply) GetMessageName() string { - return "sw_interface_set_rx_mode_reply" -} -func (*SwInterfaceSetRxModeReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*SwInterfaceSetRxModeReply) GetCrcString() string { - return "e8d4e804" -} -func NewSwInterfaceSetRxModeReply() api.Message { - return &SwInterfaceSetRxModeReply{} -} - -// InterfaceNameRenumber represents the VPP binary API message 'interface_name_renumber'. -// Generated from '../../bin_api/interface.api.json', line 936: -// -// "interface_name_renumber", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u32", -// "new_show_dev_instance" -// ], -// { -// "crc": "0x39194269" -// } -// -type InterfaceNameRenumber struct { - SwIfIndex uint32 - NewShowDevInstance uint32 -} - -func (*InterfaceNameRenumber) GetMessageName() string { - return "interface_name_renumber" -} -func (*InterfaceNameRenumber) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*InterfaceNameRenumber) GetCrcString() string { - return "39194269" -} -func NewInterfaceNameRenumber() api.Message { - return &InterfaceNameRenumber{} -} - -// InterfaceNameRenumberReply represents the VPP binary API message 'interface_name_renumber_reply'. -// Generated from '../../bin_api/interface.api.json', line 962: -// -// "interface_name_renumber_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type InterfaceNameRenumberReply struct { - Retval int32 -} - -func (*InterfaceNameRenumberReply) GetMessageName() string { - return "interface_name_renumber_reply" -} -func (*InterfaceNameRenumberReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*InterfaceNameRenumberReply) GetCrcString() string { - return "e8d4e804" -} -func NewInterfaceNameRenumberReply() api.Message { - return &InterfaceNameRenumberReply{} -} - -// CreateSubif represents the VPP binary API message 'create_subif'. -// Generated from '../../bin_api/interface.api.json', line 980: -// -// "create_subif", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u32", -// "sub_id" -// ], -// [ -// "u8", -// "no_tags" -// ], -// [ -// "u8", -// "one_tag" -// ], -// [ -// "u8", -// "two_tags" -// ], -// [ -// "u8", -// "dot1ad" -// ], -// [ -// "u8", -// "exact_match" -// ], -// [ -// "u8", -// "default_sub" -// ], -// [ -// "u8", -// "outer_vlan_id_any" -// ], -// [ -// "u8", -// "inner_vlan_id_any" -// ], -// [ -// "u16", -// "outer_vlan_id" -// ], -// [ -// "u16", -// "inner_vlan_id" -// ], -// { -// "crc": "0x86cfe408" -// } -// -type CreateSubif struct { - SwIfIndex uint32 - SubID uint32 - NoTags uint8 - OneTag uint8 - TwoTags uint8 - Dot1ad uint8 - ExactMatch uint8 - DefaultSub uint8 - OuterVlanIDAny uint8 - InnerVlanIDAny uint8 - OuterVlanID uint16 - InnerVlanID uint16 -} - -func (*CreateSubif) GetMessageName() string { - return "create_subif" -} -func (*CreateSubif) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*CreateSubif) GetCrcString() string { - return "86cfe408" -} -func NewCreateSubif() api.Message { - return &CreateSubif{} -} - -// CreateSubifReply represents the VPP binary API message 'create_subif_reply'. -// Generated from '../../bin_api/interface.api.json', line 1046: -// -// "create_subif_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// { -// "crc": "0xfda5941f" -// } -// -type CreateSubifReply struct { - Retval int32 - SwIfIndex uint32 -} - -func (*CreateSubifReply) GetMessageName() string { - return "create_subif_reply" -} -func (*CreateSubifReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*CreateSubifReply) GetCrcString() string { - return "fda5941f" -} -func NewCreateSubifReply() api.Message { - return &CreateSubifReply{} -} - -// CreateVlanSubif represents the VPP binary API message 'create_vlan_subif'. -// Generated from '../../bin_api/interface.api.json', line 1068: -// -// "create_vlan_subif", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u32", -// "vlan_id" -// ], -// { -// "crc": "0x70cadeda" -// } -// -type CreateVlanSubif struct { - SwIfIndex uint32 - VlanID uint32 -} - -func (*CreateVlanSubif) GetMessageName() string { - return "create_vlan_subif" -} -func (*CreateVlanSubif) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*CreateVlanSubif) GetCrcString() string { - return "70cadeda" -} -func NewCreateVlanSubif() api.Message { - return &CreateVlanSubif{} -} - -// CreateVlanSubifReply represents the VPP binary API message 'create_vlan_subif_reply'. -// Generated from '../../bin_api/interface.api.json', line 1094: -// -// "create_vlan_subif_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// { -// "crc": "0xfda5941f" -// } -// -type CreateVlanSubifReply struct { - Retval int32 - SwIfIndex uint32 -} - -func (*CreateVlanSubifReply) GetMessageName() string { - return "create_vlan_subif_reply" -} -func (*CreateVlanSubifReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*CreateVlanSubifReply) GetCrcString() string { - return "fda5941f" -} -func NewCreateVlanSubifReply() api.Message { - return &CreateVlanSubifReply{} -} - -// DeleteSubif represents the VPP binary API message 'delete_subif'. -// Generated from '../../bin_api/interface.api.json', line 1116: -// -// "delete_subif", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// { -// "crc": "0x529cb13f" -// } -// -type DeleteSubif struct { - SwIfIndex uint32 -} - -func (*DeleteSubif) GetMessageName() string { - return "delete_subif" -} -func (*DeleteSubif) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*DeleteSubif) GetCrcString() string { - return "529cb13f" -} -func NewDeleteSubif() api.Message { - return &DeleteSubif{} -} - -// DeleteSubifReply represents the VPP binary API message 'delete_subif_reply'. -// Generated from '../../bin_api/interface.api.json', line 1138: -// -// "delete_subif_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type DeleteSubifReply struct { - Retval int32 -} - -func (*DeleteSubifReply) GetMessageName() string { - return "delete_subif_reply" -} -func (*DeleteSubifReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*DeleteSubifReply) GetCrcString() string { - return "e8d4e804" -} -func NewDeleteSubifReply() api.Message { - return &DeleteSubifReply{} -} - -// CreateLoopback represents the VPP binary API message 'create_loopback'. -// Generated from '../../bin_api/interface.api.json', line 1156: -// -// "create_loopback", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "mac_address", -// 6 -// ], -// { -// "crc": "0x3b54129c" -// } -// -type CreateLoopback struct { - MacAddress []byte `struc:"[6]byte"` -} - -func (*CreateLoopback) GetMessageName() string { - return "create_loopback" -} -func (*CreateLoopback) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*CreateLoopback) GetCrcString() string { - return "3b54129c" -} -func NewCreateLoopback() api.Message { - return &CreateLoopback{} -} - -// CreateLoopbackReply represents the VPP binary API message 'create_loopback_reply'. -// Generated from '../../bin_api/interface.api.json', line 1179: -// -// "create_loopback_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// { -// "crc": "0xfda5941f" -// } -// -type CreateLoopbackReply struct { - Retval int32 - SwIfIndex uint32 -} - -func (*CreateLoopbackReply) GetMessageName() string { - return "create_loopback_reply" -} -func (*CreateLoopbackReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*CreateLoopbackReply) GetCrcString() string { - return "fda5941f" -} -func NewCreateLoopbackReply() api.Message { - return &CreateLoopbackReply{} -} - -// CreateLoopbackInstance represents the VPP binary API message 'create_loopback_instance'. -// Generated from '../../bin_api/interface.api.json', line 1201: -// -// "create_loopback_instance", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "mac_address", -// 6 -// ], -// [ -// "u8", -// "is_specified" -// ], -// [ -// "u32", -// "user_instance" -// ], -// { -// "crc": "0x7bbd53b6" -// } -// -type CreateLoopbackInstance struct { - MacAddress []byte `struc:"[6]byte"` - IsSpecified uint8 - UserInstance uint32 -} - -func (*CreateLoopbackInstance) GetMessageName() string { - return "create_loopback_instance" -} -func (*CreateLoopbackInstance) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*CreateLoopbackInstance) GetCrcString() string { - return "7bbd53b6" -} -func NewCreateLoopbackInstance() api.Message { - return &CreateLoopbackInstance{} -} - -// CreateLoopbackInstanceReply represents the VPP binary API message 'create_loopback_instance_reply'. -// Generated from '../../bin_api/interface.api.json', line 1232: -// -// "create_loopback_instance_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// { -// "crc": "0xfda5941f" -// } -// -type CreateLoopbackInstanceReply struct { - Retval int32 - SwIfIndex uint32 -} - -func (*CreateLoopbackInstanceReply) GetMessageName() string { - return "create_loopback_instance_reply" -} -func (*CreateLoopbackInstanceReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*CreateLoopbackInstanceReply) GetCrcString() string { - return "fda5941f" -} -func NewCreateLoopbackInstanceReply() api.Message { - return &CreateLoopbackInstanceReply{} -} - -// DeleteLoopback represents the VPP binary API message 'delete_loopback'. -// Generated from '../../bin_api/interface.api.json', line 1254: -// -// "delete_loopback", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// { -// "crc": "0x529cb13f" -// } -// -type DeleteLoopback struct { - SwIfIndex uint32 -} - -func (*DeleteLoopback) GetMessageName() string { - return "delete_loopback" -} -func (*DeleteLoopback) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*DeleteLoopback) GetCrcString() string { - return "529cb13f" -} -func NewDeleteLoopback() api.Message { - return &DeleteLoopback{} -} - -// DeleteLoopbackReply represents the VPP binary API message 'delete_loopback_reply'. -// Generated from '../../bin_api/interface.api.json', line 1276: -// -// "delete_loopback_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type DeleteLoopbackReply struct { - Retval int32 -} - -func (*DeleteLoopbackReply) GetMessageName() string { - return "delete_loopback_reply" -} -func (*DeleteLoopbackReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*DeleteLoopbackReply) GetCrcString() string { - return "e8d4e804" -} -func NewDeleteLoopbackReply() api.Message { - return &DeleteLoopbackReply{} -} diff --git a/examples/bin_api/ip.api.json b/examples/bin_api/ip.api.json index 530b6d6..d9b4277 100644 --- a/examples/bin_api/ip.api.json +++ b/examples/bin_api/ip.api.json @@ -1,187 +1,4 @@ { - "services": [ - { - "ip_source_and_port_range_check_add_del": { - "reply": "ip_source_and_port_range_check_add_del_reply" - } - }, - { - "ip6_fib_dump": { - "reply": "ip6_fib_details", - "stream": true - } - }, - { - "want_ip6_nd_events": { - "reply": "want_ip6_nd_events_reply" - } - }, - { - "ip_punt_police": { - "reply": "ip_punt_police_reply" - } - }, - { - "set_arp_neighbor_limit": { - "reply": "set_arp_neighbor_limit_reply" - } - }, - { - "ip6nd_proxy_add_del": { - "reply": "ip6nd_proxy_add_del_reply" - } - }, - { - "ioam_disable": { - "reply": "ioam_disable_reply" - } - }, - { - "ip_table_add_del": { - "reply": "ip_table_add_del_reply" - } - }, - { - "ip_neighbor_dump": { - "reply": "ip_neighbor_details", - "stream": true - } - }, - { - "ip4_arp_event": { - "reply": null - } - }, - { - "ip_punt_redirect": { - "reply": "ip_punt_redirect_reply" - } - }, - { - "sw_interface_ip6nd_ra_prefix": { - "reply": "sw_interface_ip6nd_ra_prefix_reply" - } - }, - { - "reset_fib": { - "reply": "reset_fib_reply" - } - }, - { - "ip6_mfib_dump": { - "reply": "ip6_mfib_details", - "stream": true - } - }, - { - "sw_interface_ip6nd_ra_config": { - "reply": "sw_interface_ip6nd_ra_config_reply" - } - }, - { - "sw_interface_ip6_enable_disable": { - "reply": "sw_interface_ip6_enable_disable_reply" - } - }, - { - "sw_interface_ip6_set_link_local_address": { - "reply": "sw_interface_ip6_set_link_local_address_reply" - } - }, - { - "mfib_signal_dump": { - "reply": "mfib_signal_details", - "stream": true - } - }, - { - "ip_container_proxy_add_del": { - "reply": "ip_container_proxy_add_del_reply" - } - }, - { - "ip_mfib_dump": { - "reply": "ip_mfib_details", - "stream": true - } - }, - { - "ip_address_dump": { - "reply": "ip_address_details", - "stream": true - } - }, - { - "ip_dump": { - "reply": "ip_details", - "stream": true - } - }, - { - "ip_neighbor_add_del": { - "reply": "ip_neighbor_add_del_reply" - } - }, - { - "proxy_arp_intfc_enable_disable": { - "reply": "proxy_arp_intfc_enable_disable_reply" - } - }, - { - "proxy_arp_add_del": { - "reply": "proxy_arp_add_del_reply" - } - }, - { - "ip_add_del_route": { - "reply": "ip_add_del_route_reply" - } - }, - { - "ip6nd_proxy_dump": { - "reply": "ip6nd_proxy_details", - "stream": true - } - }, - { - "ip_fib_dump": { - "reply": "ip_fib_details", - "stream": true - } - }, - { - "want_ip4_arp_events": { - "reply": "want_ip4_arp_events_reply" - } - }, - { - "ioam_enable": { - "reply": "ioam_enable_reply" - } - }, - { - "ip6_nd_event": { - "reply": null - } - }, - { - "ip_mroute_add_del": { - "reply": "ip_mroute_add_del_reply" - } - }, - { - "ip_source_and_port_range_check_interface_add_del": { - "reply": "ip_source_and_port_range_check_interface_add_del_reply" - } - }, - { - "set_ip_flow_hash": { - "reply": "set_ip_flow_hash_reply" - } - } - ], - "vl_api_version": "0xb395c625", - "enums": [], "messages": [ [ "ip_table_add_del", @@ -819,6 +636,66 @@ "crc": "0x51077d14" } ], + [ + "ip6nd_send_router_solicitation", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "u32", + "irt" + ], + [ + "u32", + "mrt" + ], + [ + "u32", + "mrc" + ], + [ + "u32", + "mrd" + ], + [ + "u32", + "sw_if_index" + ], + [ + "u8", + "stop" + ], + { + "crc": "0xbd968917" + } + ], + [ + "ip6nd_send_router_solicitation_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ], [ "sw_interface_ip6_enable_disable", [ @@ -1029,13 +906,13 @@ "next_hop_via_label" ], [ - "u32", + "vl_api_fib_mpls_label_t", "next_hop_out_label_stack", 0, "next_hop_n_out_labels" ], { - "crc": "0xc85f8290" + "crc": "0x4219d62d" } ], [ @@ -1124,8 +1001,13 @@ "src_address", 16 ], + [ + "u8", + "nh_address", + 16 + ], { - "crc": "0xc37112f7" + "crc": "0xf44c17b1" } ], [ @@ -1335,6 +1217,54 @@ "crc": "0x6b7bcd0a" } ], + [ + "ip_unnumbered_details", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "u32", + "sw_if_index" + ], + [ + "u32", + "ip_sw_if_index" + ], + { + "crc": "0x05b717ca" + } + ], + [ + "ip_unnumbered_dump", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "u32", + "sw_if_index" + ], + { + "crc": "0x529cb13f" + } + ], [ "ip_details", [ @@ -1740,7 +1670,7 @@ } ], [ - "want_ip4_arp_events", + "ip_scan_neighbor_enable_disable", [ "u16", "_vl_msg_id" @@ -1755,22 +1685,34 @@ ], [ "u8", - "enable_disable" + "mode" ], [ - "u32", - "pid" + "u8", + "scan_interval" ], [ - "u32", - "address" + "u8", + "max_proc_time" + ], + [ + "u8", + "max_update" + ], + [ + "u8", + "scan_int_delay" + ], + [ + "u8", + "stale_threshold" ], { - "crc": "0x77e06379" + "crc": "0x0a6bf57a" } ], [ - "want_ip4_arp_events_reply", + "ip_scan_neighbor_enable_disable_reply", [ "u16", "_vl_msg_id" @@ -1788,7 +1730,7 @@ } ], [ - "ip4_arp_event", + "ip_probe_neighbor", [ "u16", "_vl_msg_id" @@ -1799,11 +1741,7 @@ ], [ "u32", - "address" - ], - [ - "u32", - "pid" + "context" ], [ "u32", @@ -1811,19 +1749,37 @@ ], [ "u8", - "new_mac", - 6 + "dst_address", + 16 ], [ "u8", - "mac_ip" + "is_ipv6" ], { - "crc": "0xef7235f7" + "crc": "0x1e44bfd7" } ], [ - "want_ip6_nd_events", + "ip_probe_neighbor_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ], + [ + "want_ip4_arp_events", [ "u16", "_vl_msg_id" @@ -1845,16 +1801,15 @@ "pid" ], [ - "u8", - "address", - 16 + "u32", + "address" ], { - "crc": "0x1cf65fbb" + "crc": "0x77e06379" } ], [ - "want_ip6_nd_events_reply", + "want_ip4_arp_events_reply", [ "u16", "_vl_msg_id" @@ -1872,7 +1827,7 @@ } ], [ - "ip6_nd_event", + "ip4_arp_event", [ "u16", "_vl_msg_id" @@ -1883,16 +1838,15 @@ ], [ "u32", - "pid" + "address" ], [ "u32", - "sw_if_index" + "pid" ], [ - "u8", - "address", - 16 + "u32", + "sw_if_index" ], [ "u8", @@ -1904,11 +1858,11 @@ "mac_ip" ], { - "crc": "0x96ab2fdd" + "crc": "0xef7235f7" } ], [ - "proxy_arp_add_del", + "want_ip6_nd_events", [ "u16", "_vl_msg_id" @@ -1921,26 +1875,202 @@ "u32", "context" ], - [ - "u32", - "vrf_id" - ], [ "u8", - "is_add" + "enable_disable" ], [ - "u8", - "low_address", - 4 + "u32", + "pid" ], [ "u8", - "hi_address", - 4 + "address", + 16 + ], + { + "crc": "0x1cf65fbb" + } + ], + [ + "want_ip6_nd_events_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ], + [ + "ip6_nd_event", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "pid" + ], + [ + "u32", + "sw_if_index" + ], + [ + "u8", + "address", + 16 + ], + [ + "u8", + "new_mac", + 6 + ], + [ + "u8", + "mac_ip" + ], + { + "crc": "0x96ab2fdd" + } + ], + [ + "want_ip6_ra_events", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "u8", + "enable_disable" + ], + [ + "u32", + "pid" + ], + { + "crc": "0x05b454b5" + } + ], + [ + "want_ip6_ra_events_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ], + [ + "ip6_ra_event", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "pid" + ], + [ + "u32", + "sw_if_index" + ], + [ + "u8", + "router_address", + 16 + ], + [ + "u8", + "current_hop_limit" + ], + [ + "u8", + "flags" + ], + [ + "u16", + "router_lifetime_in_sec" + ], + [ + "u32", + "neighbor_reachable_time_in_msec" + ], + [ + "u32", + "time_in_msec_between_retransmitted_neighbor_solicitations" + ], + [ + "u32", + "n_prefixes" + ], + [ + "vl_api_ip6_ra_prefix_info_t", + "prefixes", + 0, + "n_prefixes" + ], + { + "crc": "0xc5e54257" + } + ], + [ + "proxy_arp_add_del", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "u8", + "is_add" + ], + [ + "vl_api_proxy_arp_t", + "proxy" ], { - "crc": "0xc2442918" + "crc": "0x227988d9" } ], [ @@ -1961,6 +2091,42 @@ "crc": "0xe8d4e804" } ], + [ + "proxy_arp_dump", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + { + "crc": "0x51077d14" + } + ], + [ + "proxy_arp_details", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "vl_api_proxy_arp_t", + "proxy" + ], + { + "crc": "0x9b707c77" + } + ], [ "proxy_arp_intfc_enable_disable", [ @@ -2005,6 +2171,42 @@ "crc": "0xe8d4e804" } ], + [ + "proxy_arp_intfc_dump", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + { + "crc": "0x51077d14" + } + ], + [ + "proxy_arp_intfc_details", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "u32", + "sw_if_index" + ], + { + "crc": "0xf6458e5f" + } + ], [ "reset_fib", [ @@ -2192,34 +2394,452 @@ { "crc": "0xe8d4e804" } - ] - ], - "types": [ + ], [ - "fib_path", + "ip_reassembly_set", [ - "u32", - "sw_if_index" + "u16", + "_vl_msg_id" ], [ "u32", - "table_id" + "client_index" ], [ - "u8", - "weight" + "u32", + "context" ], [ - "u8", - "preference" + "u32", + "timeout_ms" ], [ - "u8", - "is_local" + "u32", + "max_reassemblies" ], [ - "u8", - "is_drop" + "u32", + "expire_walk_interval_ms" + ], + [ + "u8", + "is_ip6" + ], + { + "crc": "0x1db184de" + } + ], + [ + "ip_reassembly_set_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ], + [ + "ip_reassembly_get", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "u8", + "is_ip6" + ], + { + "crc": "0x6fe91190" + } + ], + [ + "ip_reassembly_get_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + [ + "u32", + "timeout_ms" + ], + [ + "u32", + "max_reassemblies" + ], + [ + "u32", + "expire_walk_interval_ms" + ], + [ + "u8", + "is_ip6" + ], + { + "crc": "0xd746fc57" + } + ], + [ + "ip_reassembly_enable_disable", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "u32", + "sw_if_index" + ], + [ + "u8", + "enable_ip4" + ], + [ + "u8", + "enable_ip6" + ], + { + "crc": "0xbb8dc5d0" + } + ], + [ + "ip_reassembly_enable_disable_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ] + ], + "vl_api_version": "0xff691c00", + "unions": [ + [ + "address_union", + [ + "vl_api_ip4_address_t", + "ip4" + ], + [ + "vl_api_ip6_address_t", + "ip6" + ], + { + "crc": "0xd68a2fb4" + } + ] + ], + "services": { + "ip_address_dump": { + "reply": "ip_address_details", + "stream": true + }, + "ip_source_and_port_range_check_add_del": { + "reply": "ip_source_and_port_range_check_add_del_reply" + }, + "reset_fib": { + "reply": "reset_fib_reply" + }, + "ip_probe_neighbor": { + "reply": "ip_probe_neighbor_reply" + }, + "want_ip6_nd_events": { + "reply": "want_ip6_nd_events_reply", + "events": [ + "ip6_nd_event" + ] + }, + "ip_punt_police": { + "reply": "ip_punt_police_reply" + }, + "ip6nd_proxy_add_del": { + "reply": "ip6nd_proxy_add_del_reply" + }, + "set_arp_neighbor_limit": { + "reply": "set_arp_neighbor_limit_reply" + }, + "ip_reassembly_enable_disable": { + "reply": "ip_reassembly_enable_disable_reply" + }, + "ip6_fib_dump": { + "reply": "ip6_fib_details", + "stream": true + }, + "ip6nd_send_router_solicitation": { + "reply": "ip6nd_send_router_solicitation_reply" + }, + "ip_table_add_del": { + "reply": "ip_table_add_del_reply" + }, + "ip_neighbor_dump": { + "reply": "ip_neighbor_details", + "stream": true + }, + "ip_punt_redirect": { + "reply": "ip_punt_redirect_reply" + }, + "sw_interface_ip6nd_ra_prefix": { + "reply": "sw_interface_ip6nd_ra_prefix_reply" + }, + "ip_reassembly_set": { + "reply": "ip_reassembly_set_reply" + }, + "ip6_mfib_dump": { + "reply": "ip6_mfib_details", + "stream": true + }, + "sw_interface_ip6nd_ra_config": { + "reply": "sw_interface_ip6nd_ra_config_reply" + }, + "proxy_arp_dump": { + "reply": "proxy_arp_details", + "stream": true + }, + "sw_interface_ip6_enable_disable": { + "reply": "sw_interface_ip6_enable_disable_reply" + }, + "ip_source_and_port_range_check_interface_add_del": { + "reply": "ip_source_and_port_range_check_interface_add_del_reply" + }, + "sw_interface_ip6_set_link_local_address": { + "reply": "sw_interface_ip6_set_link_local_address_reply" + }, + "mfib_signal_dump": { + "reply": "mfib_signal_details", + "stream": true + }, + "ip_container_proxy_add_del": { + "reply": "ip_container_proxy_add_del_reply" + }, + "ip_mfib_dump": { + "reply": "ip_mfib_details", + "stream": true + }, + "ip_unnumbered_dump": { + "reply": "ip_unnumbered_details", + "stream": true + }, + "ip_dump": { + "reply": "ip_details", + "stream": true + }, + "ip_neighbor_add_del": { + "reply": "ip_neighbor_add_del_reply" + }, + "proxy_arp_intfc_enable_disable": { + "reply": "proxy_arp_intfc_enable_disable_reply" + }, + "proxy_arp_add_del": { + "reply": "proxy_arp_add_del_reply" + }, + "ip_add_del_route": { + "reply": "ip_add_del_route_reply" + }, + "ip6nd_proxy_dump": { + "reply": "ip6nd_proxy_details", + "stream": true + }, + "want_ip6_ra_events": { + "reply": "want_ip6_ra_events_reply", + "events": [ + "ip6_ra_event" + ] + }, + "ip_fib_dump": { + "reply": "ip_fib_details", + "stream": true + }, + "ip_scan_neighbor_enable_disable": { + "reply": "ip_scan_neighbor_enable_disable_reply" + }, + "ioam_enable": { + "reply": "ioam_enable_reply" + }, + "ip_mroute_add_del": { + "reply": "ip_mroute_add_del_reply" + }, + "proxy_arp_intfc_dump": { + "reply": "proxy_arp_intfc_details", + "stream": true + }, + "want_ip4_arp_events": { + "reply": "want_ip4_arp_events_reply", + "events": [ + "ip4_arp_event" + ] + }, + "ip_reassembly_get": { + "reply": "ip_reassembly_get_reply" + }, + "set_ip_flow_hash": { + "reply": "set_ip_flow_hash_reply" + }, + "ioam_disable": { + "reply": "ioam_disable_reply" + } + }, + "enums": [ + [ + "address_family", + [ + "ADDRESS_IP4", + 0 + ], + [ + "ADDRESS_IP6", + 1 + ], + { + "enumtype": "u32" + } + ] + ], + "types": [ + [ + "ip4_address", + [ + "u8", + "address", + 4 + ], + { + "crc": "0xfc4baa28" + } + ], + [ + "ip6_address", + [ + "u8", + "address", + 16 + ], + { + "crc": "0xad99ccc2" + } + ], + [ + "address", + [ + "vl_api_address_family_t", + "af" + ], + [ + "vl_api_address_union_t", + "un" + ], + { + "crc": "0x09f11671" + } + ], + [ + "prefix", + [ + "vl_api_address_t", + "address" + ], + [ + "u8", + "address_length" + ], + { + "crc": "0x0403aebc" + } + ], + [ + "fib_mpls_label", + [ + "u8", + "is_uniform" + ], + [ + "u32", + "label" + ], + [ + "u8", + "ttl" + ], + [ + "u8", + "exp" + ], + { + "crc": "0xc93bf35c" + } + ], + [ + "fib_path", + [ + "u32", + "sw_if_index" + ], + [ + "u32", + "table_id" + ], + [ + "u8", + "weight" + ], + [ + "u8", + "preference" + ], + [ + "u8", + "is_local" + ], + [ + "u8", + "is_drop" + ], + [ + "u8", + "is_udp_encap" ], [ "u8", @@ -2229,6 +2849,22 @@ "u8", "is_prohibit" ], + [ + "u8", + "is_resolve_host" + ], + [ + "u8", + "is_resolve_attached" + ], + [ + "u8", + "is_dvr" + ], + [ + "u8", + "is_source_lookup" + ], [ "u8", "afi" @@ -2238,8 +2874,76 @@ "next_hop", 16 ], + [ + "u32", + "next_hop_id" + ], + [ + "u32", + "rpf_id" + ], + [ + "u32", + "via_label" + ], + [ + "u8", + "n_labels" + ], + [ + "vl_api_fib_mpls_label_t", + "label_stack", + 16 + ], + { + "crc": "0xabe483ef" + } + ], + [ + "ip6_ra_prefix_info", + [ + "u8", + "dst_address", + 16 + ], + [ + "u8", + "dst_address_length" + ], + [ + "u8", + "flags" + ], + [ + "u32", + "valid_time" + ], + [ + "u32", + "preferred_time" + ], + { + "crc": "0x83d7c6e5" + } + ], + [ + "proxy_arp", + [ + "u32", + "vrf_id" + ], + [ + "u8", + "low_address", + 4 + ], + [ + "u8", + "hi_address", + 4 + ], { - "crc": "0xcd899e0a" + "crc": "0x6d88106e" } ] ] diff --git a/examples/bin_api/ip/ip.ba.go b/examples/bin_api/ip/ip.ba.go new file mode 100644 index 0000000..c980b6a --- /dev/null +++ b/examples/bin_api/ip/ip.ba.go @@ -0,0 +1,4976 @@ +// Code generated by GoVPP binapi-generator. DO NOT EDIT. +// source: ip.api.json + +/* +Package ip is a generated VPP binary API of the 'ip' VPP module. + +It is generated from this file: + ip.api.json + +It contains these VPP binary API objects: + 87 messages + 8 types + 1 enum + 1 union + 42 services +*/ +package ip + +import "git.fd.io/govpp.git/api" +import "github.com/lunixbochs/struc" +import "bytes" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = struc.Pack +var _ = bytes.NewBuffer + +/* Enums */ + +// AddressFamily represents the VPP binary API enum 'address_family'. +// Generated from 'ip.api.json', line 2727: +// +// "address_family", +// [ +// "ADDRESS_IP4", +// 0 +// ], +// [ +// "ADDRESS_IP6", +// 1 +// ], +// { +// "enumtype": "u32" +// } +// +type AddressFamily uint32 + +const ( + ADDRESS_IP4 AddressFamily = 0 + ADDRESS_IP6 AddressFamily = 1 +) + +/* Types */ + +// IP4Address represents the VPP binary API type 'ip4_address'. +// Generated from 'ip.api.json', line 2743: +// +// "ip4_address", +// [ +// "u8", +// "address", +// 4 +// ], +// { +// "crc": "0xfc4baa28" +// } +// +type IP4Address struct { + Address []byte `struc:"[4]byte"` +} + +func (*IP4Address) GetTypeName() string { + return "ip4_address" +} +func (*IP4Address) GetCrcString() string { + return "fc4baa28" +} + +// IP6Address represents the VPP binary API type 'ip6_address'. +// Generated from 'ip.api.json', line 2754: +// +// "ip6_address", +// [ +// "u8", +// "address", +// 16 +// ], +// { +// "crc": "0xad99ccc2" +// } +// +type IP6Address struct { + Address []byte `struc:"[16]byte"` +} + +func (*IP6Address) GetTypeName() string { + return "ip6_address" +} +func (*IP6Address) GetCrcString() string { + return "ad99ccc2" +} + +// Address represents the VPP binary API type 'address'. +// Generated from 'ip.api.json', line 2765: +// +// "address", +// [ +// "vl_api_address_family_t", +// "af" +// ], +// [ +// "vl_api_address_union_t", +// "un" +// ], +// { +// "crc": "0x09f11671" +// } +// +type Address struct { + Af AddressFamily + Un AddressUnion +} + +func (*Address) GetTypeName() string { + return "address" +} +func (*Address) GetCrcString() string { + return "09f11671" +} + +// Prefix represents the VPP binary API type 'prefix'. +// Generated from 'ip.api.json', line 2779: +// +// "prefix", +// [ +// "vl_api_address_t", +// "address" +// ], +// [ +// "u8", +// "address_length" +// ], +// { +// "crc": "0x0403aebc" +// } +// +type Prefix struct { + Address Address + AddressLength uint8 +} + +func (*Prefix) GetTypeName() string { + return "prefix" +} +func (*Prefix) GetCrcString() string { + return "0403aebc" +} + +// FibMplsLabel represents the VPP binary API type 'fib_mpls_label'. +// Generated from 'ip.api.json', line 2793: +// +// "fib_mpls_label", +// [ +// "u8", +// "is_uniform" +// ], +// [ +// "u32", +// "label" +// ], +// [ +// "u8", +// "ttl" +// ], +// [ +// "u8", +// "exp" +// ], +// { +// "crc": "0xc93bf35c" +// } +// +type FibMplsLabel struct { + IsUniform uint8 + Label uint32 + TTL uint8 + Exp uint8 +} + +func (*FibMplsLabel) GetTypeName() string { + return "fib_mpls_label" +} +func (*FibMplsLabel) GetCrcString() string { + return "c93bf35c" +} + +// FibPath represents the VPP binary API type 'fib_path'. +// Generated from 'ip.api.json', line 2815: +// +// "fib_path", +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u32", +// "table_id" +// ], +// [ +// "u8", +// "weight" +// ], +// [ +// "u8", +// "preference" +// ], +// [ +// "u8", +// "is_local" +// ], +// [ +// "u8", +// "is_drop" +// ], +// [ +// "u8", +// "is_udp_encap" +// ], +// [ +// "u8", +// "is_unreach" +// ], +// [ +// "u8", +// "is_prohibit" +// ], +// [ +// "u8", +// "is_resolve_host" +// ], +// [ +// "u8", +// "is_resolve_attached" +// ], +// [ +// "u8", +// "is_dvr" +// ], +// [ +// "u8", +// "is_source_lookup" +// ], +// [ +// "u8", +// "afi" +// ], +// [ +// "u8", +// "next_hop", +// 16 +// ], +// [ +// "u32", +// "next_hop_id" +// ], +// [ +// "u32", +// "rpf_id" +// ], +// [ +// "u32", +// "via_label" +// ], +// [ +// "u8", +// "n_labels" +// ], +// [ +// "vl_api_fib_mpls_label_t", +// "label_stack", +// 16 +// ], +// { +// "crc": "0xabe483ef" +// } +// +type FibPath struct { + SwIfIndex uint32 + TableID uint32 + Weight uint8 + Preference uint8 + IsLocal uint8 + IsDrop uint8 + IsUDPEncap uint8 + IsUnreach uint8 + IsProhibit uint8 + IsResolveHost uint8 + IsResolveAttached uint8 + IsDvr uint8 + IsSourceLookup uint8 + Afi uint8 + NextHop []byte `struc:"[16]byte"` + NextHopID uint32 + RpfID uint32 + ViaLabel uint32 + NLabels uint8 + LabelStack []FibMplsLabel `struc:"[16]FibMplsLabel"` +} + +func (*FibPath) GetTypeName() string { + return "fib_path" +} +func (*FibPath) GetCrcString() string { + return "abe483ef" +} + +// IP6RaPrefixInfo represents the VPP binary API type 'ip6_ra_prefix_info'. +// Generated from 'ip.api.json', line 2903: +// +// "ip6_ra_prefix_info", +// [ +// "u8", +// "dst_address", +// 16 +// ], +// [ +// "u8", +// "dst_address_length" +// ], +// [ +// "u8", +// "flags" +// ], +// [ +// "u32", +// "valid_time" +// ], +// [ +// "u32", +// "preferred_time" +// ], +// { +// "crc": "0x83d7c6e5" +// } +// +type IP6RaPrefixInfo struct { + DstAddress []byte `struc:"[16]byte"` + DstAddressLength uint8 + Flags uint8 + ValidTime uint32 + PreferredTime uint32 +} + +func (*IP6RaPrefixInfo) GetTypeName() string { + return "ip6_ra_prefix_info" +} +func (*IP6RaPrefixInfo) GetCrcString() string { + return "83d7c6e5" +} + +// ProxyArp represents the VPP binary API type 'proxy_arp'. +// Generated from 'ip.api.json', line 2930: +// +// "proxy_arp", +// [ +// "u32", +// "vrf_id" +// ], +// [ +// "u8", +// "low_address", +// 4 +// ], +// [ +// "u8", +// "hi_address", +// 4 +// ], +// { +// "crc": "0x6d88106e" +// } +// +type ProxyArp struct { + VrfID uint32 + LowAddress []byte `struc:"[4]byte"` + HiAddress []byte `struc:"[4]byte"` +} + +func (*ProxyArp) GetTypeName() string { + return "proxy_arp" +} +func (*ProxyArp) GetCrcString() string { + return "6d88106e" +} + +/* Unions */ + +// AddressUnion represents the VPP binary API union 'address_union'. +// Generated from 'ip.api.json', line 2562: +// +// "address_union", +// [ +// "vl_api_ip4_address_t", +// "ip4" +// ], +// [ +// "vl_api_ip6_address_t", +// "ip6" +// ], +// { +// "crc": "0xd68a2fb4" +// } +// +type AddressUnion struct { + Union_data [16]byte +} + +func (*AddressUnion) GetTypeName() string { + return "address_union" +} +func (*AddressUnion) GetCrcString() string { + return "d68a2fb4" +} + +func (u *AddressUnion) SetIP4(a IP4Address) { + var b = new(bytes.Buffer) + if err := struc.Pack(b, &a); err != nil { + return + } + copy(u.Union_data[:], b.Bytes()) +} +func (u *AddressUnion) GetIP4() (a IP4Address) { + var b = bytes.NewReader(u.Union_data[:]) + struc.Unpack(b, &a) + return +} + +func (u *AddressUnion) SetIP6(a IP6Address) { + var b = new(bytes.Buffer) + if err := struc.Pack(b, &a); err != nil { + return + } + copy(u.Union_data[:], b.Bytes()) +} +func (u *AddressUnion) GetIP6() (a IP6Address) { + var b = bytes.NewReader(u.Union_data[:]) + struc.Unpack(b, &a) + return +} + +/* Messages */ + +// IPTableAddDel represents the VPP binary API message 'ip_table_add_del'. +// Generated from 'ip.api.json', line 4: +// +// "ip_table_add_del", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "table_id" +// ], +// [ +// "u8", +// "is_ipv6" +// ], +// [ +// "u8", +// "is_add" +// ], +// [ +// "u8", +// "name", +// 64 +// ], +// { +// "crc": "0x0240c89d" +// } +// +type IPTableAddDel struct { + TableID uint32 + IsIPv6 uint8 + IsAdd uint8 + Name []byte `struc:"[64]byte"` +} + +func (*IPTableAddDel) GetMessageName() string { + return "ip_table_add_del" +} +func (*IPTableAddDel) GetCrcString() string { + return "0240c89d" +} +func (*IPTableAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPTableAddDel() api.Message { + return &IPTableAddDel{} +} + +// IPTableAddDelReply represents the VPP binary API message 'ip_table_add_del_reply'. +// Generated from 'ip.api.json', line 39: +// +// "ip_table_add_del_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type IPTableAddDelReply struct { + Retval int32 +} + +func (*IPTableAddDelReply) GetMessageName() string { + return "ip_table_add_del_reply" +} +func (*IPTableAddDelReply) GetCrcString() string { + return "e8d4e804" +} +func (*IPTableAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIPTableAddDelReply() api.Message { + return &IPTableAddDelReply{} +} + +// IPFibDump represents the VPP binary API message 'ip_fib_dump'. +// Generated from 'ip.api.json', line 57: +// +// "ip_fib_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// { +// "crc": "0x51077d14" +// } +// +type IPFibDump struct{} + +func (*IPFibDump) GetMessageName() string { + return "ip_fib_dump" +} +func (*IPFibDump) GetCrcString() string { + return "51077d14" +} +func (*IPFibDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPFibDump() api.Message { + return &IPFibDump{} +} + +// IPFibDetails represents the VPP binary API message 'ip_fib_details'. +// Generated from 'ip.api.json', line 75: +// +// "ip_fib_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "table_id" +// ], +// [ +// "u8", +// "table_name", +// 64 +// ], +// [ +// "u8", +// "address_length" +// ], +// [ +// "u8", +// "address", +// 4 +// ], +// [ +// "u32", +// "count" +// ], +// [ +// "vl_api_fib_path_t", +// "path", +// 0, +// "count" +// ], +// { +// "crc": "0x99dfd73b" +// } +// +type IPFibDetails struct { + TableID uint32 + TableName []byte `struc:"[64]byte"` + AddressLength uint8 + Address []byte `struc:"[4]byte"` + Count uint32 `struc:"sizeof=Path"` + Path []FibPath +} + +func (*IPFibDetails) GetMessageName() string { + return "ip_fib_details" +} +func (*IPFibDetails) GetCrcString() string { + return "99dfd73b" +} +func (*IPFibDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIPFibDetails() api.Message { + return &IPFibDetails{} +} + +// IP6FibDump represents the VPP binary API message 'ip6_fib_dump'. +// Generated from 'ip.api.json', line 117: +// +// "ip6_fib_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// { +// "crc": "0x51077d14" +// } +// +type IP6FibDump struct{} + +func (*IP6FibDump) GetMessageName() string { + return "ip6_fib_dump" +} +func (*IP6FibDump) GetCrcString() string { + return "51077d14" +} +func (*IP6FibDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIP6FibDump() api.Message { + return &IP6FibDump{} +} + +// IP6FibDetails represents the VPP binary API message 'ip6_fib_details'. +// Generated from 'ip.api.json', line 135: +// +// "ip6_fib_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "table_id" +// ], +// [ +// "u8", +// "table_name", +// 64 +// ], +// [ +// "u8", +// "address_length" +// ], +// [ +// "u8", +// "address", +// 16 +// ], +// [ +// "u32", +// "count" +// ], +// [ +// "vl_api_fib_path_t", +// "path", +// 0, +// "count" +// ], +// { +// "crc": "0xabd0060e" +// } +// +type IP6FibDetails struct { + TableID uint32 + TableName []byte `struc:"[64]byte"` + AddressLength uint8 + Address []byte `struc:"[16]byte"` + Count uint32 `struc:"sizeof=Path"` + Path []FibPath +} + +func (*IP6FibDetails) GetMessageName() string { + return "ip6_fib_details" +} +func (*IP6FibDetails) GetCrcString() string { + return "abd0060e" +} +func (*IP6FibDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIP6FibDetails() api.Message { + return &IP6FibDetails{} +} + +// IPNeighborDump represents the VPP binary API message 'ip_neighbor_dump'. +// Generated from 'ip.api.json', line 177: +// +// "ip_neighbor_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "is_ipv6" +// ], +// { +// "crc": "0x6b7bcd0a" +// } +// +type IPNeighborDump struct { + SwIfIndex uint32 + IsIPv6 uint8 +} + +func (*IPNeighborDump) GetMessageName() string { + return "ip_neighbor_dump" +} +func (*IPNeighborDump) GetCrcString() string { + return "6b7bcd0a" +} +func (*IPNeighborDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPNeighborDump() api.Message { + return &IPNeighborDump{} +} + +// IPNeighborDetails represents the VPP binary API message 'ip_neighbor_details'. +// Generated from 'ip.api.json', line 203: +// +// "ip_neighbor_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "is_static" +// ], +// [ +// "u8", +// "is_ipv6" +// ], +// [ +// "u8", +// "mac_address", +// 6 +// ], +// [ +// "u8", +// "ip_address", +// 16 +// ], +// { +// "crc": "0x85e32a72" +// } +// +type IPNeighborDetails struct { + SwIfIndex uint32 + IsStatic uint8 + IsIPv6 uint8 + MacAddress []byte `struc:"[6]byte"` + IPAddress []byte `struc:"[16]byte"` +} + +func (*IPNeighborDetails) GetMessageName() string { + return "ip_neighbor_details" +} +func (*IPNeighborDetails) GetCrcString() string { + return "85e32a72" +} +func (*IPNeighborDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIPNeighborDetails() api.Message { + return &IPNeighborDetails{} +} + +// IPNeighborAddDel represents the VPP binary API message 'ip_neighbor_add_del'. +// Generated from 'ip.api.json', line 239: +// +// "ip_neighbor_add_del", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "is_add" +// ], +// [ +// "u8", +// "is_ipv6" +// ], +// [ +// "u8", +// "is_static" +// ], +// [ +// "u8", +// "is_no_adj_fib" +// ], +// [ +// "u8", +// "mac_address", +// 6 +// ], +// [ +// "u8", +// "dst_address", +// 16 +// ], +// { +// "crc": "0x4711eb25" +// } +// +type IPNeighborAddDel struct { + SwIfIndex uint32 + IsAdd uint8 + IsIPv6 uint8 + IsStatic uint8 + IsNoAdjFib uint8 + MacAddress []byte `struc:"[6]byte"` + DstAddress []byte `struc:"[16]byte"` +} + +func (*IPNeighborAddDel) GetMessageName() string { + return "ip_neighbor_add_del" +} +func (*IPNeighborAddDel) GetCrcString() string { + return "4711eb25" +} +func (*IPNeighborAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPNeighborAddDel() api.Message { + return &IPNeighborAddDel{} +} + +// IPNeighborAddDelReply represents the VPP binary API message 'ip_neighbor_add_del_reply'. +// Generated from 'ip.api.json', line 287: +// +// "ip_neighbor_add_del_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type IPNeighborAddDelReply struct { + Retval int32 +} + +func (*IPNeighborAddDelReply) GetMessageName() string { + return "ip_neighbor_add_del_reply" +} +func (*IPNeighborAddDelReply) GetCrcString() string { + return "e8d4e804" +} +func (*IPNeighborAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIPNeighborAddDelReply() api.Message { + return &IPNeighborAddDelReply{} +} + +// SetIPFlowHash represents the VPP binary API message 'set_ip_flow_hash'. +// Generated from 'ip.api.json', line 305: +// +// "set_ip_flow_hash", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "vrf_id" +// ], +// [ +// "u8", +// "is_ipv6" +// ], +// [ +// "u8", +// "src" +// ], +// [ +// "u8", +// "dst" +// ], +// [ +// "u8", +// "sport" +// ], +// [ +// "u8", +// "dport" +// ], +// [ +// "u8", +// "proto" +// ], +// [ +// "u8", +// "reverse" +// ], +// { +// "crc": "0x32ebf737" +// } +// +type SetIPFlowHash struct { + VrfID uint32 + IsIPv6 uint8 + Src uint8 + Dst uint8 + Sport uint8 + Dport uint8 + Proto uint8 + Reverse uint8 +} + +func (*SetIPFlowHash) GetMessageName() string { + return "set_ip_flow_hash" +} +func (*SetIPFlowHash) GetCrcString() string { + return "32ebf737" +} +func (*SetIPFlowHash) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewSetIPFlowHash() api.Message { + return &SetIPFlowHash{} +} + +// SetIPFlowHashReply represents the VPP binary API message 'set_ip_flow_hash_reply'. +// Generated from 'ip.api.json', line 355: +// +// "set_ip_flow_hash_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type SetIPFlowHashReply struct { + Retval int32 +} + +func (*SetIPFlowHashReply) GetMessageName() string { + return "set_ip_flow_hash_reply" +} +func (*SetIPFlowHashReply) GetCrcString() string { + return "e8d4e804" +} +func (*SetIPFlowHashReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewSetIPFlowHashReply() api.Message { + return &SetIPFlowHashReply{} +} + +// SwInterfaceIP6ndRaConfig represents the VPP binary API message 'sw_interface_ip6nd_ra_config'. +// Generated from 'ip.api.json', line 373: +// +// "sw_interface_ip6nd_ra_config", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "suppress" +// ], +// [ +// "u8", +// "managed" +// ], +// [ +// "u8", +// "other" +// ], +// [ +// "u8", +// "ll_option" +// ], +// [ +// "u8", +// "send_unicast" +// ], +// [ +// "u8", +// "cease" +// ], +// [ +// "u8", +// "is_no" +// ], +// [ +// "u8", +// "default_router" +// ], +// [ +// "u32", +// "max_interval" +// ], +// [ +// "u32", +// "min_interval" +// ], +// [ +// "u32", +// "lifetime" +// ], +// [ +// "u32", +// "initial_count" +// ], +// [ +// "u32", +// "initial_interval" +// ], +// { +// "crc": "0xc3f02daa" +// } +// +type SwInterfaceIP6ndRaConfig struct { + SwIfIndex uint32 + Suppress uint8 + Managed uint8 + Other uint8 + LlOption uint8 + SendUnicast uint8 + Cease uint8 + IsNo uint8 + DefaultRouter uint8 + MaxInterval uint32 + MinInterval uint32 + Lifetime uint32 + InitialCount uint32 + InitialInterval uint32 +} + +func (*SwInterfaceIP6ndRaConfig) GetMessageName() string { + return "sw_interface_ip6nd_ra_config" +} +func (*SwInterfaceIP6ndRaConfig) GetCrcString() string { + return "c3f02daa" +} +func (*SwInterfaceIP6ndRaConfig) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewSwInterfaceIP6ndRaConfig() api.Message { + return &SwInterfaceIP6ndRaConfig{} +} + +// SwInterfaceIP6ndRaConfigReply represents the VPP binary API message 'sw_interface_ip6nd_ra_config_reply'. +// Generated from 'ip.api.json', line 447: +// +// "sw_interface_ip6nd_ra_config_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type SwInterfaceIP6ndRaConfigReply struct { + Retval int32 +} + +func (*SwInterfaceIP6ndRaConfigReply) GetMessageName() string { + return "sw_interface_ip6nd_ra_config_reply" +} +func (*SwInterfaceIP6ndRaConfigReply) GetCrcString() string { + return "e8d4e804" +} +func (*SwInterfaceIP6ndRaConfigReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewSwInterfaceIP6ndRaConfigReply() api.Message { + return &SwInterfaceIP6ndRaConfigReply{} +} + +// SwInterfaceIP6ndRaPrefix represents the VPP binary API message 'sw_interface_ip6nd_ra_prefix'. +// Generated from 'ip.api.json', line 465: +// +// "sw_interface_ip6nd_ra_prefix", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "address", +// 16 +// ], +// [ +// "u8", +// "address_length" +// ], +// [ +// "u8", +// "use_default" +// ], +// [ +// "u8", +// "no_advertise" +// ], +// [ +// "u8", +// "off_link" +// ], +// [ +// "u8", +// "no_autoconfig" +// ], +// [ +// "u8", +// "no_onlink" +// ], +// [ +// "u8", +// "is_no" +// ], +// [ +// "u32", +// "val_lifetime" +// ], +// [ +// "u32", +// "pref_lifetime" +// ], +// { +// "crc": "0xca763c9a" +// } +// +type SwInterfaceIP6ndRaPrefix struct { + SwIfIndex uint32 + Address []byte `struc:"[16]byte"` + AddressLength uint8 + UseDefault uint8 + NoAdvertise uint8 + OffLink uint8 + NoAutoconfig uint8 + NoOnlink uint8 + IsNo uint8 + ValLifetime uint32 + PrefLifetime uint32 +} + +func (*SwInterfaceIP6ndRaPrefix) GetMessageName() string { + return "sw_interface_ip6nd_ra_prefix" +} +func (*SwInterfaceIP6ndRaPrefix) GetCrcString() string { + return "ca763c9a" +} +func (*SwInterfaceIP6ndRaPrefix) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewSwInterfaceIP6ndRaPrefix() api.Message { + return &SwInterfaceIP6ndRaPrefix{} +} + +// SwInterfaceIP6ndRaPrefixReply represents the VPP binary API message 'sw_interface_ip6nd_ra_prefix_reply'. +// Generated from 'ip.api.json', line 528: +// +// "sw_interface_ip6nd_ra_prefix_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type SwInterfaceIP6ndRaPrefixReply struct { + Retval int32 +} + +func (*SwInterfaceIP6ndRaPrefixReply) GetMessageName() string { + return "sw_interface_ip6nd_ra_prefix_reply" +} +func (*SwInterfaceIP6ndRaPrefixReply) GetCrcString() string { + return "e8d4e804" +} +func (*SwInterfaceIP6ndRaPrefixReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewSwInterfaceIP6ndRaPrefixReply() api.Message { + return &SwInterfaceIP6ndRaPrefixReply{} +} + +// IP6ndProxyAddDel represents the VPP binary API message 'ip6nd_proxy_add_del'. +// Generated from 'ip.api.json', line 546: +// +// "ip6nd_proxy_add_del", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "is_del" +// ], +// [ +// "u8", +// "address", +// 16 +// ], +// { +// "crc": "0xd95f0fa0" +// } +// +type IP6ndProxyAddDel struct { + SwIfIndex uint32 + IsDel uint8 + Address []byte `struc:"[16]byte"` +} + +func (*IP6ndProxyAddDel) GetMessageName() string { + return "ip6nd_proxy_add_del" +} +func (*IP6ndProxyAddDel) GetCrcString() string { + return "d95f0fa0" +} +func (*IP6ndProxyAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIP6ndProxyAddDel() api.Message { + return &IP6ndProxyAddDel{} +} + +// IP6ndProxyAddDelReply represents the VPP binary API message 'ip6nd_proxy_add_del_reply'. +// Generated from 'ip.api.json', line 577: +// +// "ip6nd_proxy_add_del_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type IP6ndProxyAddDelReply struct { + Retval int32 +} + +func (*IP6ndProxyAddDelReply) GetMessageName() string { + return "ip6nd_proxy_add_del_reply" +} +func (*IP6ndProxyAddDelReply) GetCrcString() string { + return "e8d4e804" +} +func (*IP6ndProxyAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIP6ndProxyAddDelReply() api.Message { + return &IP6ndProxyAddDelReply{} +} + +// IP6ndProxyDetails represents the VPP binary API message 'ip6nd_proxy_details'. +// Generated from 'ip.api.json', line 595: +// +// "ip6nd_proxy_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "address", +// 16 +// ], +// { +// "crc": "0xd73bf1ab" +// } +// +type IP6ndProxyDetails struct { + SwIfIndex uint32 + Address []byte `struc:"[16]byte"` +} + +func (*IP6ndProxyDetails) GetMessageName() string { + return "ip6nd_proxy_details" +} +func (*IP6ndProxyDetails) GetCrcString() string { + return "d73bf1ab" +} +func (*IP6ndProxyDetails) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIP6ndProxyDetails() api.Message { + return &IP6ndProxyDetails{} +} + +// IP6ndProxyDump represents the VPP binary API message 'ip6nd_proxy_dump'. +// Generated from 'ip.api.json', line 622: +// +// "ip6nd_proxy_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// { +// "crc": "0x51077d14" +// } +// +type IP6ndProxyDump struct{} + +func (*IP6ndProxyDump) GetMessageName() string { + return "ip6nd_proxy_dump" +} +func (*IP6ndProxyDump) GetCrcString() string { + return "51077d14" +} +func (*IP6ndProxyDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIP6ndProxyDump() api.Message { + return &IP6ndProxyDump{} +} + +// IP6ndSendRouterSolicitation represents the VPP binary API message 'ip6nd_send_router_solicitation'. +// Generated from 'ip.api.json', line 640: +// +// "ip6nd_send_router_solicitation", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "irt" +// ], +// [ +// "u32", +// "mrt" +// ], +// [ +// "u32", +// "mrc" +// ], +// [ +// "u32", +// "mrd" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "stop" +// ], +// { +// "crc": "0xbd968917" +// } +// +type IP6ndSendRouterSolicitation struct { + Irt uint32 + Mrt uint32 + Mrc uint32 + Mrd uint32 + SwIfIndex uint32 + Stop uint8 +} + +func (*IP6ndSendRouterSolicitation) GetMessageName() string { + return "ip6nd_send_router_solicitation" +} +func (*IP6ndSendRouterSolicitation) GetCrcString() string { + return "bd968917" +} +func (*IP6ndSendRouterSolicitation) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIP6ndSendRouterSolicitation() api.Message { + return &IP6ndSendRouterSolicitation{} +} + +// IP6ndSendRouterSolicitationReply represents the VPP binary API message 'ip6nd_send_router_solicitation_reply'. +// Generated from 'ip.api.json', line 682: +// +// "ip6nd_send_router_solicitation_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type IP6ndSendRouterSolicitationReply struct { + Retval int32 +} + +func (*IP6ndSendRouterSolicitationReply) GetMessageName() string { + return "ip6nd_send_router_solicitation_reply" +} +func (*IP6ndSendRouterSolicitationReply) GetCrcString() string { + return "e8d4e804" +} +func (*IP6ndSendRouterSolicitationReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIP6ndSendRouterSolicitationReply() api.Message { + return &IP6ndSendRouterSolicitationReply{} +} + +// SwInterfaceIP6EnableDisable represents the VPP binary API message 'sw_interface_ip6_enable_disable'. +// Generated from 'ip.api.json', line 700: +// +// "sw_interface_ip6_enable_disable", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "enable" +// ], +// { +// "crc": "0xa36fadc0" +// } +// +type SwInterfaceIP6EnableDisable struct { + SwIfIndex uint32 + Enable uint8 +} + +func (*SwInterfaceIP6EnableDisable) GetMessageName() string { + return "sw_interface_ip6_enable_disable" +} +func (*SwInterfaceIP6EnableDisable) GetCrcString() string { + return "a36fadc0" +} +func (*SwInterfaceIP6EnableDisable) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewSwInterfaceIP6EnableDisable() api.Message { + return &SwInterfaceIP6EnableDisable{} +} + +// SwInterfaceIP6EnableDisableReply represents the VPP binary API message 'sw_interface_ip6_enable_disable_reply'. +// Generated from 'ip.api.json', line 726: +// +// "sw_interface_ip6_enable_disable_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type SwInterfaceIP6EnableDisableReply struct { + Retval int32 +} + +func (*SwInterfaceIP6EnableDisableReply) GetMessageName() string { + return "sw_interface_ip6_enable_disable_reply" +} +func (*SwInterfaceIP6EnableDisableReply) GetCrcString() string { + return "e8d4e804" +} +func (*SwInterfaceIP6EnableDisableReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewSwInterfaceIP6EnableDisableReply() api.Message { + return &SwInterfaceIP6EnableDisableReply{} +} + +// SwInterfaceIP6SetLinkLocalAddress represents the VPP binary API message 'sw_interface_ip6_set_link_local_address'. +// Generated from 'ip.api.json', line 744: +// +// "sw_interface_ip6_set_link_local_address", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "address", +// 16 +// ], +// { +// "crc": "0xd73bf1ab" +// } +// +type SwInterfaceIP6SetLinkLocalAddress struct { + SwIfIndex uint32 + Address []byte `struc:"[16]byte"` +} + +func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageName() string { + return "sw_interface_ip6_set_link_local_address" +} +func (*SwInterfaceIP6SetLinkLocalAddress) GetCrcString() string { + return "d73bf1ab" +} +func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewSwInterfaceIP6SetLinkLocalAddress() api.Message { + return &SwInterfaceIP6SetLinkLocalAddress{} +} + +// SwInterfaceIP6SetLinkLocalAddressReply represents the VPP binary API message 'sw_interface_ip6_set_link_local_address_reply'. +// Generated from 'ip.api.json', line 771: +// +// "sw_interface_ip6_set_link_local_address_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type SwInterfaceIP6SetLinkLocalAddressReply struct { + Retval int32 +} + +func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageName() string { + return "sw_interface_ip6_set_link_local_address_reply" +} +func (*SwInterfaceIP6SetLinkLocalAddressReply) GetCrcString() string { + return "e8d4e804" +} +func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewSwInterfaceIP6SetLinkLocalAddressReply() api.Message { + return &SwInterfaceIP6SetLinkLocalAddressReply{} +} + +// IPAddDelRoute represents the VPP binary API message 'ip_add_del_route'. +// Generated from 'ip.api.json', line 789: +// +// "ip_add_del_route", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "next_hop_sw_if_index" +// ], +// [ +// "u32", +// "table_id" +// ], +// [ +// "u32", +// "classify_table_index" +// ], +// [ +// "u32", +// "next_hop_table_id" +// ], +// [ +// "u32", +// "next_hop_id" +// ], +// [ +// "u8", +// "is_add" +// ], +// [ +// "u8", +// "is_drop" +// ], +// [ +// "u8", +// "is_unreach" +// ], +// [ +// "u8", +// "is_prohibit" +// ], +// [ +// "u8", +// "is_ipv6" +// ], +// [ +// "u8", +// "is_local" +// ], +// [ +// "u8", +// "is_classify" +// ], +// [ +// "u8", +// "is_multipath" +// ], +// [ +// "u8", +// "is_resolve_host" +// ], +// [ +// "u8", +// "is_resolve_attached" +// ], +// [ +// "u8", +// "is_dvr" +// ], +// [ +// "u8", +// "is_source_lookup" +// ], +// [ +// "u8", +// "is_udp_encap" +// ], +// [ +// "u8", +// "next_hop_weight" +// ], +// [ +// "u8", +// "next_hop_preference" +// ], +// [ +// "u8", +// "next_hop_proto" +// ], +// [ +// "u8", +// "dst_address_length" +// ], +// [ +// "u8", +// "dst_address", +// 16 +// ], +// [ +// "u8", +// "next_hop_address", +// 16 +// ], +// [ +// "u8", +// "next_hop_n_out_labels" +// ], +// [ +// "u32", +// "next_hop_via_label" +// ], +// [ +// "vl_api_fib_mpls_label_t", +// "next_hop_out_label_stack", +// 0, +// "next_hop_n_out_labels" +// ], +// { +// "crc": "0x4219d62d" +// } +// +type IPAddDelRoute struct { + NextHopSwIfIndex uint32 + TableID uint32 + ClassifyTableIndex uint32 + NextHopTableID uint32 + NextHopID uint32 + IsAdd uint8 + IsDrop uint8 + IsUnreach uint8 + IsProhibit uint8 + IsIPv6 uint8 + IsLocal uint8 + IsClassify uint8 + IsMultipath uint8 + IsResolveHost uint8 + IsResolveAttached uint8 + IsDvr uint8 + IsSourceLookup uint8 + IsUDPEncap uint8 + NextHopWeight uint8 + NextHopPreference uint8 + NextHopProto uint8 + DstAddressLength uint8 + DstAddress []byte `struc:"[16]byte"` + NextHopAddress []byte `struc:"[16]byte"` + NextHopNOutLabels uint8 `struc:"sizeof=NextHopOutLabelStack"` + NextHopViaLabel uint32 + NextHopOutLabelStack []FibMplsLabel +} + +func (*IPAddDelRoute) GetMessageName() string { + return "ip_add_del_route" +} +func (*IPAddDelRoute) GetCrcString() string { + return "4219d62d" +} +func (*IPAddDelRoute) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPAddDelRoute() api.Message { + return &IPAddDelRoute{} +} + +// IPAddDelRouteReply represents the VPP binary API message 'ip_add_del_route_reply'. +// Generated from 'ip.api.json', line 919: +// +// "ip_add_del_route_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type IPAddDelRouteReply struct { + Retval int32 +} + +func (*IPAddDelRouteReply) GetMessageName() string { + return "ip_add_del_route_reply" +} +func (*IPAddDelRouteReply) GetCrcString() string { + return "e8d4e804" +} +func (*IPAddDelRouteReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIPAddDelRouteReply() api.Message { + return &IPAddDelRouteReply{} +} + +// IPMrouteAddDel represents the VPP binary API message 'ip_mroute_add_del'. +// Generated from 'ip.api.json', line 937: +// +// "ip_mroute_add_del", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "next_hop_sw_if_index" +// ], +// [ +// "u32", +// "table_id" +// ], +// [ +// "u32", +// "entry_flags" +// ], +// [ +// "u32", +// "itf_flags" +// ], +// [ +// "u32", +// "rpf_id" +// ], +// [ +// "u32", +// "bier_imp" +// ], +// [ +// "u16", +// "grp_address_length" +// ], +// [ +// "u8", +// "next_hop_afi" +// ], +// [ +// "u8", +// "is_add" +// ], +// [ +// "u8", +// "is_ipv6" +// ], +// [ +// "u8", +// "is_local" +// ], +// [ +// "u8", +// "grp_address", +// 16 +// ], +// [ +// "u8", +// "src_address", +// 16 +// ], +// [ +// "u8", +// "nh_address", +// 16 +// ], +// { +// "crc": "0xf44c17b1" +// } +// +type IPMrouteAddDel struct { + NextHopSwIfIndex uint32 + TableID uint32 + EntryFlags uint32 + ItfFlags uint32 + RpfID uint32 + BierImp uint32 + GrpAddressLength uint16 + NextHopAfi uint8 + IsAdd uint8 + IsIPv6 uint8 + IsLocal uint8 + GrpAddress []byte `struc:"[16]byte"` + SrcAddress []byte `struc:"[16]byte"` + NhAddress []byte `struc:"[16]byte"` +} + +func (*IPMrouteAddDel) GetMessageName() string { + return "ip_mroute_add_del" +} +func (*IPMrouteAddDel) GetCrcString() string { + return "f44c17b1" +} +func (*IPMrouteAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPMrouteAddDel() api.Message { + return &IPMrouteAddDel{} +} + +// IPMrouteAddDelReply represents the VPP binary API message 'ip_mroute_add_del_reply'. +// Generated from 'ip.api.json', line 1014: +// +// "ip_mroute_add_del_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type IPMrouteAddDelReply struct { + Retval int32 +} + +func (*IPMrouteAddDelReply) GetMessageName() string { + return "ip_mroute_add_del_reply" +} +func (*IPMrouteAddDelReply) GetCrcString() string { + return "e8d4e804" +} +func (*IPMrouteAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIPMrouteAddDelReply() api.Message { + return &IPMrouteAddDelReply{} +} + +// IPMfibDump represents the VPP binary API message 'ip_mfib_dump'. +// Generated from 'ip.api.json', line 1032: +// +// "ip_mfib_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// { +// "crc": "0x51077d14" +// } +// +type IPMfibDump struct{} + +func (*IPMfibDump) GetMessageName() string { + return "ip_mfib_dump" +} +func (*IPMfibDump) GetCrcString() string { + return "51077d14" +} +func (*IPMfibDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPMfibDump() api.Message { + return &IPMfibDump{} +} + +// IPMfibDetails represents the VPP binary API message 'ip_mfib_details'. +// Generated from 'ip.api.json', line 1050: +// +// "ip_mfib_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "table_id" +// ], +// [ +// "u32", +// "entry_flags" +// ], +// [ +// "u32", +// "rpf_id" +// ], +// [ +// "u8", +// "address_length" +// ], +// [ +// "u8", +// "grp_address", +// 4 +// ], +// [ +// "u8", +// "src_address", +// 4 +// ], +// [ +// "u32", +// "count" +// ], +// [ +// "vl_api_fib_path_t", +// "path", +// 0, +// "count" +// ], +// { +// "crc": "0x5e530d5e" +// } +// +type IPMfibDetails struct { + TableID uint32 + EntryFlags uint32 + RpfID uint32 + AddressLength uint8 + GrpAddress []byte `struc:"[4]byte"` + SrcAddress []byte `struc:"[4]byte"` + Count uint32 `struc:"sizeof=Path"` + Path []FibPath +} + +func (*IPMfibDetails) GetMessageName() string { + return "ip_mfib_details" +} +func (*IPMfibDetails) GetCrcString() string { + return "5e530d5e" +} +func (*IPMfibDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIPMfibDetails() api.Message { + return &IPMfibDetails{} +} + +// IP6MfibDump represents the VPP binary API message 'ip6_mfib_dump'. +// Generated from 'ip.api.json', line 1100: +// +// "ip6_mfib_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// { +// "crc": "0x51077d14" +// } +// +type IP6MfibDump struct{} + +func (*IP6MfibDump) GetMessageName() string { + return "ip6_mfib_dump" +} +func (*IP6MfibDump) GetCrcString() string { + return "51077d14" +} +func (*IP6MfibDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIP6MfibDump() api.Message { + return &IP6MfibDump{} +} + +// IP6MfibDetails represents the VPP binary API message 'ip6_mfib_details'. +// Generated from 'ip.api.json', line 1118: +// +// "ip6_mfib_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "table_id" +// ], +// [ +// "u8", +// "address_length" +// ], +// [ +// "u8", +// "grp_address", +// 16 +// ], +// [ +// "u8", +// "src_address", +// 16 +// ], +// [ +// "u32", +// "count" +// ], +// [ +// "vl_api_fib_path_t", +// "path", +// 0, +// "count" +// ], +// { +// "crc": "0xe02dcb4b" +// } +// +type IP6MfibDetails struct { + TableID uint32 + AddressLength uint8 + GrpAddress []byte `struc:"[16]byte"` + SrcAddress []byte `struc:"[16]byte"` + Count uint32 `struc:"sizeof=Path"` + Path []FibPath +} + +func (*IP6MfibDetails) GetMessageName() string { + return "ip6_mfib_details" +} +func (*IP6MfibDetails) GetCrcString() string { + return "e02dcb4b" +} +func (*IP6MfibDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIP6MfibDetails() api.Message { + return &IP6MfibDetails{} +} + +// IPAddressDetails represents the VPP binary API message 'ip_address_details'. +// Generated from 'ip.api.json', line 1160: +// +// "ip_address_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "ip", +// 16 +// ], +// [ +// "u8", +// "prefix_length" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "is_ipv6" +// ], +// { +// "crc": "0xbc7442f2" +// } +// +type IPAddressDetails struct { + IP []byte `struc:"[16]byte"` + PrefixLength uint8 + SwIfIndex uint32 + IsIPv6 uint8 +} + +func (*IPAddressDetails) GetMessageName() string { + return "ip_address_details" +} +func (*IPAddressDetails) GetCrcString() string { + return "bc7442f2" +} +func (*IPAddressDetails) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPAddressDetails() api.Message { + return &IPAddressDetails{} +} + +// IPAddressDump represents the VPP binary API message 'ip_address_dump'. +// Generated from 'ip.api.json', line 1195: +// +// "ip_address_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "is_ipv6" +// ], +// { +// "crc": "0x6b7bcd0a" +// } +// +type IPAddressDump struct { + SwIfIndex uint32 + IsIPv6 uint8 +} + +func (*IPAddressDump) GetMessageName() string { + return "ip_address_dump" +} +func (*IPAddressDump) GetCrcString() string { + return "6b7bcd0a" +} +func (*IPAddressDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPAddressDump() api.Message { + return &IPAddressDump{} +} + +// IPUnnumberedDetails represents the VPP binary API message 'ip_unnumbered_details'. +// Generated from 'ip.api.json', line 1221: +// +// "ip_unnumbered_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u32", +// "ip_sw_if_index" +// ], +// { +// "crc": "0x05b717ca" +// } +// +type IPUnnumberedDetails struct { + SwIfIndex uint32 + IPSwIfIndex uint32 +} + +func (*IPUnnumberedDetails) GetMessageName() string { + return "ip_unnumbered_details" +} +func (*IPUnnumberedDetails) GetCrcString() string { + return "05b717ca" +} +func (*IPUnnumberedDetails) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPUnnumberedDetails() api.Message { + return &IPUnnumberedDetails{} +} + +// IPUnnumberedDump represents the VPP binary API message 'ip_unnumbered_dump'. +// Generated from 'ip.api.json', line 1247: +// +// "ip_unnumbered_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0x529cb13f" +// } +// +type IPUnnumberedDump struct { + SwIfIndex uint32 +} + +func (*IPUnnumberedDump) GetMessageName() string { + return "ip_unnumbered_dump" +} +func (*IPUnnumberedDump) GetCrcString() string { + return "529cb13f" +} +func (*IPUnnumberedDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPUnnumberedDump() api.Message { + return &IPUnnumberedDump{} +} + +// IPDetails represents the VPP binary API message 'ip_details'. +// Generated from 'ip.api.json', line 1269: +// +// "ip_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "is_ipv6" +// ], +// { +// "crc": "0x452ffc5a" +// } +// +type IPDetails struct { + SwIfIndex uint32 + Context uint32 + IsIPv6 uint8 +} + +func (*IPDetails) GetMessageName() string { + return "ip_details" +} +func (*IPDetails) GetCrcString() string { + return "452ffc5a" +} +func (*IPDetails) GetMessageType() api.MessageType { + return api.OtherMessage +} +func NewIPDetails() api.Message { + return &IPDetails{} +} + +// IPDump represents the VPP binary API message 'ip_dump'. +// Generated from 'ip.api.json', line 1291: +// +// "ip_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "is_ipv6" +// ], +// { +// "crc": "0xde883da4" +// } +// +type IPDump struct { + IsIPv6 uint8 +} + +func (*IPDump) GetMessageName() string { + return "ip_dump" +} +func (*IPDump) GetCrcString() string { + return "de883da4" +} +func (*IPDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPDump() api.Message { + return &IPDump{} +} + +// MfibSignalDump represents the VPP binary API message 'mfib_signal_dump'. +// Generated from 'ip.api.json', line 1313: +// +// "mfib_signal_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// { +// "crc": "0x51077d14" +// } +// +type MfibSignalDump struct{} + +func (*MfibSignalDump) GetMessageName() string { + return "mfib_signal_dump" +} +func (*MfibSignalDump) GetCrcString() string { + return "51077d14" +} +func (*MfibSignalDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewMfibSignalDump() api.Message { + return &MfibSignalDump{} +} + +// MfibSignalDetails represents the VPP binary API message 'mfib_signal_details'. +// Generated from 'ip.api.json', line 1331: +// +// "mfib_signal_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u32", +// "table_id" +// ], +// [ +// "u16", +// "grp_address_len" +// ], +// [ +// "u8", +// "grp_address", +// 16 +// ], +// [ +// "u8", +// "src_address", +// 16 +// ], +// [ +// "u16", +// "ip_packet_len" +// ], +// [ +// "u8", +// "ip_packet_data", +// 256 +// ], +// { +// "crc": "0x791bbeab" +// } +// +type MfibSignalDetails struct { + SwIfIndex uint32 + TableID uint32 + GrpAddressLen uint16 + GrpAddress []byte `struc:"[16]byte"` + SrcAddress []byte `struc:"[16]byte"` + IPPacketLen uint16 + IPPacketData []byte `struc:"[256]byte"` +} + +func (*MfibSignalDetails) GetMessageName() string { + return "mfib_signal_details" +} +func (*MfibSignalDetails) GetCrcString() string { + return "791bbeab" +} +func (*MfibSignalDetails) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewMfibSignalDetails() api.Message { + return &MfibSignalDetails{} +} + +// IPPuntPolice represents the VPP binary API message 'ip_punt_police'. +// Generated from 'ip.api.json', line 1380: +// +// "ip_punt_police", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "policer_index" +// ], +// [ +// "u8", +// "is_add" +// ], +// [ +// "u8", +// "is_ip6" +// ], +// { +// "crc": "0x38691592" +// } +// +type IPPuntPolice struct { + PolicerIndex uint32 + IsAdd uint8 + IsIP6 uint8 +} + +func (*IPPuntPolice) GetMessageName() string { + return "ip_punt_police" +} +func (*IPPuntPolice) GetCrcString() string { + return "38691592" +} +func (*IPPuntPolice) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPPuntPolice() api.Message { + return &IPPuntPolice{} +} + +// IPPuntPoliceReply represents the VPP binary API message 'ip_punt_police_reply'. +// Generated from 'ip.api.json', line 1410: +// +// "ip_punt_police_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type IPPuntPoliceReply struct { + Retval int32 +} + +func (*IPPuntPoliceReply) GetMessageName() string { + return "ip_punt_police_reply" +} +func (*IPPuntPoliceReply) GetCrcString() string { + return "e8d4e804" +} +func (*IPPuntPoliceReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIPPuntPoliceReply() api.Message { + return &IPPuntPoliceReply{} +} + +// IPPuntRedirect represents the VPP binary API message 'ip_punt_redirect'. +// Generated from 'ip.api.json', line 1428: +// +// "ip_punt_redirect", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "rx_sw_if_index" +// ], +// [ +// "u32", +// "tx_sw_if_index" +// ], +// [ +// "u8", +// "is_add" +// ], +// [ +// "u8", +// "is_ip6" +// ], +// [ +// "u8", +// "nh", +// 16 +// ], +// { +// "crc": "0x996b6603" +// } +// +type IPPuntRedirect struct { + RxSwIfIndex uint32 + TxSwIfIndex uint32 + IsAdd uint8 + IsIP6 uint8 + Nh []byte `struc:"[16]byte"` +} + +func (*IPPuntRedirect) GetMessageName() string { + return "ip_punt_redirect" +} +func (*IPPuntRedirect) GetCrcString() string { + return "996b6603" +} +func (*IPPuntRedirect) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPPuntRedirect() api.Message { + return &IPPuntRedirect{} +} + +// IPPuntRedirectReply represents the VPP binary API message 'ip_punt_redirect_reply'. +// Generated from 'ip.api.json', line 1467: +// +// "ip_punt_redirect_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type IPPuntRedirectReply struct { + Retval int32 +} + +func (*IPPuntRedirectReply) GetMessageName() string { + return "ip_punt_redirect_reply" +} +func (*IPPuntRedirectReply) GetCrcString() string { + return "e8d4e804" +} +func (*IPPuntRedirectReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIPPuntRedirectReply() api.Message { + return &IPPuntRedirectReply{} +} + +// IPContainerProxyAddDel represents the VPP binary API message 'ip_container_proxy_add_del'. +// Generated from 'ip.api.json', line 1485: +// +// "ip_container_proxy_add_del", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "ip", +// 16 +// ], +// [ +// "u8", +// "is_ip4" +// ], +// [ +// "u8", +// "plen" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "is_add" +// ], +// { +// "crc": "0x0a355d39" +// } +// +type IPContainerProxyAddDel struct { + IP []byte `struc:"[16]byte"` + IsIP4 uint8 + Plen uint8 + SwIfIndex uint32 + IsAdd uint8 +} + +func (*IPContainerProxyAddDel) GetMessageName() string { + return "ip_container_proxy_add_del" +} +func (*IPContainerProxyAddDel) GetCrcString() string { + return "0a355d39" +} +func (*IPContainerProxyAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPContainerProxyAddDel() api.Message { + return &IPContainerProxyAddDel{} +} + +// IPContainerProxyAddDelReply represents the VPP binary API message 'ip_container_proxy_add_del_reply'. +// Generated from 'ip.api.json', line 1524: +// +// "ip_container_proxy_add_del_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type IPContainerProxyAddDelReply struct { + Retval int32 +} + +func (*IPContainerProxyAddDelReply) GetMessageName() string { + return "ip_container_proxy_add_del_reply" +} +func (*IPContainerProxyAddDelReply) GetCrcString() string { + return "e8d4e804" +} +func (*IPContainerProxyAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIPContainerProxyAddDelReply() api.Message { + return &IPContainerProxyAddDelReply{} +} + +// IPSourceAndPortRangeCheckAddDel represents the VPP binary API message 'ip_source_and_port_range_check_add_del'. +// Generated from 'ip.api.json', line 1542: +// +// "ip_source_and_port_range_check_add_del", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "is_ipv6" +// ], +// [ +// "u8", +// "is_add" +// ], +// [ +// "u8", +// "mask_length" +// ], +// [ +// "u8", +// "address", +// 16 +// ], +// [ +// "u8", +// "number_of_ranges" +// ], +// [ +// "u16", +// "low_ports", +// 32 +// ], +// [ +// "u16", +// "high_ports", +// 32 +// ], +// [ +// "u32", +// "vrf_id" +// ], +// { +// "crc": "0x03d6b03a" +// } +// +type IPSourceAndPortRangeCheckAddDel struct { + IsIPv6 uint8 + IsAdd uint8 + MaskLength uint8 + Address []byte `struc:"[16]byte"` + NumberOfRanges uint8 + LowPorts []uint16 `struc:"[32]uint16"` + HighPorts []uint16 `struc:"[32]uint16"` + VrfID uint32 +} + +func (*IPSourceAndPortRangeCheckAddDel) GetMessageName() string { + return "ip_source_and_port_range_check_add_del" +} +func (*IPSourceAndPortRangeCheckAddDel) GetCrcString() string { + return "03d6b03a" +} +func (*IPSourceAndPortRangeCheckAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPSourceAndPortRangeCheckAddDel() api.Message { + return &IPSourceAndPortRangeCheckAddDel{} +} + +// IPSourceAndPortRangeCheckAddDelReply represents the VPP binary API message 'ip_source_and_port_range_check_add_del_reply'. +// Generated from 'ip.api.json', line 1595: +// +// "ip_source_and_port_range_check_add_del_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type IPSourceAndPortRangeCheckAddDelReply struct { + Retval int32 +} + +func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageName() string { + return "ip_source_and_port_range_check_add_del_reply" +} +func (*IPSourceAndPortRangeCheckAddDelReply) GetCrcString() string { + return "e8d4e804" +} +func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIPSourceAndPortRangeCheckAddDelReply() api.Message { + return &IPSourceAndPortRangeCheckAddDelReply{} +} + +// IPSourceAndPortRangeCheckInterfaceAddDel represents the VPP binary API message 'ip_source_and_port_range_check_interface_add_del'. +// Generated from 'ip.api.json', line 1613: +// +// "ip_source_and_port_range_check_interface_add_del", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "is_add" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u32", +// "tcp_in_vrf_id" +// ], +// [ +// "u32", +// "tcp_out_vrf_id" +// ], +// [ +// "u32", +// "udp_in_vrf_id" +// ], +// [ +// "u32", +// "udp_out_vrf_id" +// ], +// { +// "crc": "0x6966bc44" +// } +// +type IPSourceAndPortRangeCheckInterfaceAddDel struct { + IsAdd uint8 + SwIfIndex uint32 + TCPInVrfID uint32 + TCPOutVrfID uint32 + UDPInVrfID uint32 + UDPOutVrfID uint32 +} + +func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageName() string { + return "ip_source_and_port_range_check_interface_add_del" +} +func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetCrcString() string { + return "6966bc44" +} +func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPSourceAndPortRangeCheckInterfaceAddDel() api.Message { + return &IPSourceAndPortRangeCheckInterfaceAddDel{} +} + +// IPSourceAndPortRangeCheckInterfaceAddDelReply represents the VPP binary API message 'ip_source_and_port_range_check_interface_add_del_reply'. +// Generated from 'ip.api.json', line 1655: +// +// "ip_source_and_port_range_check_interface_add_del_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type IPSourceAndPortRangeCheckInterfaceAddDelReply struct { + Retval int32 +} + +func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageName() string { + return "ip_source_and_port_range_check_interface_add_del_reply" +} +func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetCrcString() string { + return "e8d4e804" +} +func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIPSourceAndPortRangeCheckInterfaceAddDelReply() api.Message { + return &IPSourceAndPortRangeCheckInterfaceAddDelReply{} +} + +// IPScanNeighborEnableDisable represents the VPP binary API message 'ip_scan_neighbor_enable_disable'. +// Generated from 'ip.api.json', line 1673: +// +// "ip_scan_neighbor_enable_disable", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "mode" +// ], +// [ +// "u8", +// "scan_interval" +// ], +// [ +// "u8", +// "max_proc_time" +// ], +// [ +// "u8", +// "max_update" +// ], +// [ +// "u8", +// "scan_int_delay" +// ], +// [ +// "u8", +// "stale_threshold" +// ], +// { +// "crc": "0x0a6bf57a" +// } +// +type IPScanNeighborEnableDisable struct { + Mode uint8 + ScanInterval uint8 + MaxProcTime uint8 + MaxUpdate uint8 + ScanIntDelay uint8 + StaleThreshold uint8 +} + +func (*IPScanNeighborEnableDisable) GetMessageName() string { + return "ip_scan_neighbor_enable_disable" +} +func (*IPScanNeighborEnableDisable) GetCrcString() string { + return "0a6bf57a" +} +func (*IPScanNeighborEnableDisable) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPScanNeighborEnableDisable() api.Message { + return &IPScanNeighborEnableDisable{} +} + +// IPScanNeighborEnableDisableReply represents the VPP binary API message 'ip_scan_neighbor_enable_disable_reply'. +// Generated from 'ip.api.json', line 1715: +// +// "ip_scan_neighbor_enable_disable_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type IPScanNeighborEnableDisableReply struct { + Retval int32 +} + +func (*IPScanNeighborEnableDisableReply) GetMessageName() string { + return "ip_scan_neighbor_enable_disable_reply" +} +func (*IPScanNeighborEnableDisableReply) GetCrcString() string { + return "e8d4e804" +} +func (*IPScanNeighborEnableDisableReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIPScanNeighborEnableDisableReply() api.Message { + return &IPScanNeighborEnableDisableReply{} +} + +// IPProbeNeighbor represents the VPP binary API message 'ip_probe_neighbor'. +// Generated from 'ip.api.json', line 1733: +// +// "ip_probe_neighbor", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "dst_address", +// 16 +// ], +// [ +// "u8", +// "is_ipv6" +// ], +// { +// "crc": "0x1e44bfd7" +// } +// +type IPProbeNeighbor struct { + SwIfIndex uint32 + DstAddress []byte `struc:"[16]byte"` + IsIPv6 uint8 +} + +func (*IPProbeNeighbor) GetMessageName() string { + return "ip_probe_neighbor" +} +func (*IPProbeNeighbor) GetCrcString() string { + return "1e44bfd7" +} +func (*IPProbeNeighbor) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPProbeNeighbor() api.Message { + return &IPProbeNeighbor{} +} + +// IPProbeNeighborReply represents the VPP binary API message 'ip_probe_neighbor_reply'. +// Generated from 'ip.api.json', line 1764: +// +// "ip_probe_neighbor_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type IPProbeNeighborReply struct { + Retval int32 +} + +func (*IPProbeNeighborReply) GetMessageName() string { + return "ip_probe_neighbor_reply" +} +func (*IPProbeNeighborReply) GetCrcString() string { + return "e8d4e804" +} +func (*IPProbeNeighborReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIPProbeNeighborReply() api.Message { + return &IPProbeNeighborReply{} +} + +// WantIP4ArpEvents represents the VPP binary API message 'want_ip4_arp_events'. +// Generated from 'ip.api.json', line 1782: +// +// "want_ip4_arp_events", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "enable_disable" +// ], +// [ +// "u32", +// "pid" +// ], +// [ +// "u32", +// "address" +// ], +// { +// "crc": "0x77e06379" +// } +// +type WantIP4ArpEvents struct { + EnableDisable uint8 + PID uint32 + Address uint32 +} + +func (*WantIP4ArpEvents) GetMessageName() string { + return "want_ip4_arp_events" +} +func (*WantIP4ArpEvents) GetCrcString() string { + return "77e06379" +} +func (*WantIP4ArpEvents) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewWantIP4ArpEvents() api.Message { + return &WantIP4ArpEvents{} +} + +// WantIP4ArpEventsReply represents the VPP binary API message 'want_ip4_arp_events_reply'. +// Generated from 'ip.api.json', line 1812: +// +// "want_ip4_arp_events_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type WantIP4ArpEventsReply struct { + Retval int32 +} + +func (*WantIP4ArpEventsReply) GetMessageName() string { + return "want_ip4_arp_events_reply" +} +func (*WantIP4ArpEventsReply) GetCrcString() string { + return "e8d4e804" +} +func (*WantIP4ArpEventsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewWantIP4ArpEventsReply() api.Message { + return &WantIP4ArpEventsReply{} +} + +// IP4ArpEvent represents the VPP binary API message 'ip4_arp_event'. +// Generated from 'ip.api.json', line 1830: +// +// "ip4_arp_event", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "address" +// ], +// [ +// "u32", +// "pid" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "new_mac", +// 6 +// ], +// [ +// "u8", +// "mac_ip" +// ], +// { +// "crc": "0xef7235f7" +// } +// +type IP4ArpEvent struct { + Address uint32 + PID uint32 + SwIfIndex uint32 + NewMac []byte `struc:"[6]byte"` + MacIP uint8 +} + +func (*IP4ArpEvent) GetMessageName() string { + return "ip4_arp_event" +} +func (*IP4ArpEvent) GetCrcString() string { + return "ef7235f7" +} +func (*IP4ArpEvent) GetMessageType() api.MessageType { + return api.EventMessage +} +func NewIP4ArpEvent() api.Message { + return &IP4ArpEvent{} +} + +// WantIP6NdEvents represents the VPP binary API message 'want_ip6_nd_events'. +// Generated from 'ip.api.json', line 1865: +// +// "want_ip6_nd_events", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "enable_disable" +// ], +// [ +// "u32", +// "pid" +// ], +// [ +// "u8", +// "address", +// 16 +// ], +// { +// "crc": "0x1cf65fbb" +// } +// +type WantIP6NdEvents struct { + EnableDisable uint8 + PID uint32 + Address []byte `struc:"[16]byte"` +} + +func (*WantIP6NdEvents) GetMessageName() string { + return "want_ip6_nd_events" +} +func (*WantIP6NdEvents) GetCrcString() string { + return "1cf65fbb" +} +func (*WantIP6NdEvents) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewWantIP6NdEvents() api.Message { + return &WantIP6NdEvents{} +} + +// WantIP6NdEventsReply represents the VPP binary API message 'want_ip6_nd_events_reply'. +// Generated from 'ip.api.json', line 1896: +// +// "want_ip6_nd_events_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type WantIP6NdEventsReply struct { + Retval int32 +} + +func (*WantIP6NdEventsReply) GetMessageName() string { + return "want_ip6_nd_events_reply" +} +func (*WantIP6NdEventsReply) GetCrcString() string { + return "e8d4e804" +} +func (*WantIP6NdEventsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewWantIP6NdEventsReply() api.Message { + return &WantIP6NdEventsReply{} +} + +// IP6NdEvent represents the VPP binary API message 'ip6_nd_event'. +// Generated from 'ip.api.json', line 1914: +// +// "ip6_nd_event", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "pid" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "address", +// 16 +// ], +// [ +// "u8", +// "new_mac", +// 6 +// ], +// [ +// "u8", +// "mac_ip" +// ], +// { +// "crc": "0x96ab2fdd" +// } +// +type IP6NdEvent struct { + PID uint32 + SwIfIndex uint32 + Address []byte `struc:"[16]byte"` + NewMac []byte `struc:"[6]byte"` + MacIP uint8 +} + +func (*IP6NdEvent) GetMessageName() string { + return "ip6_nd_event" +} +func (*IP6NdEvent) GetCrcString() string { + return "96ab2fdd" +} +func (*IP6NdEvent) GetMessageType() api.MessageType { + return api.EventMessage +} +func NewIP6NdEvent() api.Message { + return &IP6NdEvent{} +} + +// WantIP6RaEvents represents the VPP binary API message 'want_ip6_ra_events'. +// Generated from 'ip.api.json', line 1950: +// +// "want_ip6_ra_events", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "enable_disable" +// ], +// [ +// "u32", +// "pid" +// ], +// { +// "crc": "0x05b454b5" +// } +// +type WantIP6RaEvents struct { + EnableDisable uint8 + PID uint32 +} + +func (*WantIP6RaEvents) GetMessageName() string { + return "want_ip6_ra_events" +} +func (*WantIP6RaEvents) GetCrcString() string { + return "05b454b5" +} +func (*WantIP6RaEvents) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewWantIP6RaEvents() api.Message { + return &WantIP6RaEvents{} +} + +// WantIP6RaEventsReply represents the VPP binary API message 'want_ip6_ra_events_reply'. +// Generated from 'ip.api.json', line 1976: +// +// "want_ip6_ra_events_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type WantIP6RaEventsReply struct { + Retval int32 +} + +func (*WantIP6RaEventsReply) GetMessageName() string { + return "want_ip6_ra_events_reply" +} +func (*WantIP6RaEventsReply) GetCrcString() string { + return "e8d4e804" +} +func (*WantIP6RaEventsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewWantIP6RaEventsReply() api.Message { + return &WantIP6RaEventsReply{} +} + +// IP6RaEvent represents the VPP binary API message 'ip6_ra_event'. +// Generated from 'ip.api.json', line 1994: +// +// "ip6_ra_event", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "pid" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "router_address", +// 16 +// ], +// [ +// "u8", +// "current_hop_limit" +// ], +// [ +// "u8", +// "flags" +// ], +// [ +// "u16", +// "router_lifetime_in_sec" +// ], +// [ +// "u32", +// "neighbor_reachable_time_in_msec" +// ], +// [ +// "u32", +// "time_in_msec_between_retransmitted_neighbor_solicitations" +// ], +// [ +// "u32", +// "n_prefixes" +// ], +// [ +// "vl_api_ip6_ra_prefix_info_t", +// "prefixes", +// 0, +// "n_prefixes" +// ], +// { +// "crc": "0xc5e54257" +// } +// +type IP6RaEvent struct { + PID uint32 + SwIfIndex uint32 + RouterAddress []byte `struc:"[16]byte"` + CurrentHopLimit uint8 + Flags uint8 + RouterLifetimeInSec uint16 + NeighborReachableTimeInMsec uint32 + TimeInMsecBetweenRetransmittedNeighborSolicitations uint32 + NPrefixes uint32 `struc:"sizeof=Prefixes"` + Prefixes []IP6RaPrefixInfo +} + +func (*IP6RaEvent) GetMessageName() string { + return "ip6_ra_event" +} +func (*IP6RaEvent) GetCrcString() string { + return "c5e54257" +} +func (*IP6RaEvent) GetMessageType() api.MessageType { + return api.EventMessage +} +func NewIP6RaEvent() api.Message { + return &IP6RaEvent{} +} + +// ProxyArpAddDel represents the VPP binary API message 'proxy_arp_add_del'. +// Generated from 'ip.api.json', line 2051: +// +// "proxy_arp_add_del", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "is_add" +// ], +// [ +// "vl_api_proxy_arp_t", +// "proxy" +// ], +// { +// "crc": "0x227988d9" +// } +// +type ProxyArpAddDel struct { + IsAdd uint8 + Proxy ProxyArp +} + +func (*ProxyArpAddDel) GetMessageName() string { + return "proxy_arp_add_del" +} +func (*ProxyArpAddDel) GetCrcString() string { + return "227988d9" +} +func (*ProxyArpAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewProxyArpAddDel() api.Message { + return &ProxyArpAddDel{} +} + +// ProxyArpAddDelReply represents the VPP binary API message 'proxy_arp_add_del_reply'. +// Generated from 'ip.api.json', line 2077: +// +// "proxy_arp_add_del_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type ProxyArpAddDelReply struct { + Retval int32 +} + +func (*ProxyArpAddDelReply) GetMessageName() string { + return "proxy_arp_add_del_reply" +} +func (*ProxyArpAddDelReply) GetCrcString() string { + return "e8d4e804" +} +func (*ProxyArpAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewProxyArpAddDelReply() api.Message { + return &ProxyArpAddDelReply{} +} + +// ProxyArpDump represents the VPP binary API message 'proxy_arp_dump'. +// Generated from 'ip.api.json', line 2095: +// +// "proxy_arp_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// { +// "crc": "0x51077d14" +// } +// +type ProxyArpDump struct{} + +func (*ProxyArpDump) GetMessageName() string { + return "proxy_arp_dump" +} +func (*ProxyArpDump) GetCrcString() string { + return "51077d14" +} +func (*ProxyArpDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewProxyArpDump() api.Message { + return &ProxyArpDump{} +} + +// ProxyArpDetails represents the VPP binary API message 'proxy_arp_details'. +// Generated from 'ip.api.json', line 2113: +// +// "proxy_arp_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "vl_api_proxy_arp_t", +// "proxy" +// ], +// { +// "crc": "0x9b707c77" +// } +// +type ProxyArpDetails struct { + Proxy ProxyArp +} + +func (*ProxyArpDetails) GetMessageName() string { + return "proxy_arp_details" +} +func (*ProxyArpDetails) GetCrcString() string { + return "9b707c77" +} +func (*ProxyArpDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewProxyArpDetails() api.Message { + return &ProxyArpDetails{} +} + +// ProxyArpIntfcEnableDisable represents the VPP binary API message 'proxy_arp_intfc_enable_disable'. +// Generated from 'ip.api.json', line 2131: +// +// "proxy_arp_intfc_enable_disable", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "enable_disable" +// ], +// { +// "crc": "0x69d24598" +// } +// +type ProxyArpIntfcEnableDisable struct { + SwIfIndex uint32 + EnableDisable uint8 +} + +func (*ProxyArpIntfcEnableDisable) GetMessageName() string { + return "proxy_arp_intfc_enable_disable" +} +func (*ProxyArpIntfcEnableDisable) GetCrcString() string { + return "69d24598" +} +func (*ProxyArpIntfcEnableDisable) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewProxyArpIntfcEnableDisable() api.Message { + return &ProxyArpIntfcEnableDisable{} +} + +// ProxyArpIntfcEnableDisableReply represents the VPP binary API message 'proxy_arp_intfc_enable_disable_reply'. +// Generated from 'ip.api.json', line 2157: +// +// "proxy_arp_intfc_enable_disable_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type ProxyArpIntfcEnableDisableReply struct { + Retval int32 +} + +func (*ProxyArpIntfcEnableDisableReply) GetMessageName() string { + return "proxy_arp_intfc_enable_disable_reply" +} +func (*ProxyArpIntfcEnableDisableReply) GetCrcString() string { + return "e8d4e804" +} +func (*ProxyArpIntfcEnableDisableReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewProxyArpIntfcEnableDisableReply() api.Message { + return &ProxyArpIntfcEnableDisableReply{} +} + +// ProxyArpIntfcDump represents the VPP binary API message 'proxy_arp_intfc_dump'. +// Generated from 'ip.api.json', line 2175: +// +// "proxy_arp_intfc_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// { +// "crc": "0x51077d14" +// } +// +type ProxyArpIntfcDump struct{} + +func (*ProxyArpIntfcDump) GetMessageName() string { + return "proxy_arp_intfc_dump" +} +func (*ProxyArpIntfcDump) GetCrcString() string { + return "51077d14" +} +func (*ProxyArpIntfcDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewProxyArpIntfcDump() api.Message { + return &ProxyArpIntfcDump{} +} + +// ProxyArpIntfcDetails represents the VPP binary API message 'proxy_arp_intfc_details'. +// Generated from 'ip.api.json', line 2193: +// +// "proxy_arp_intfc_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0xf6458e5f" +// } +// +type ProxyArpIntfcDetails struct { + SwIfIndex uint32 +} + +func (*ProxyArpIntfcDetails) GetMessageName() string { + return "proxy_arp_intfc_details" +} +func (*ProxyArpIntfcDetails) GetCrcString() string { + return "f6458e5f" +} +func (*ProxyArpIntfcDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewProxyArpIntfcDetails() api.Message { + return &ProxyArpIntfcDetails{} +} + +// ResetFib represents the VPP binary API message 'reset_fib'. +// Generated from 'ip.api.json', line 2211: +// +// "reset_fib", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "vrf_id" +// ], +// [ +// "u8", +// "is_ipv6" +// ], +// { +// "crc": "0x8553ebd9" +// } +// +type ResetFib struct { + VrfID uint32 + IsIPv6 uint8 +} + +func (*ResetFib) GetMessageName() string { + return "reset_fib" +} +func (*ResetFib) GetCrcString() string { + return "8553ebd9" +} +func (*ResetFib) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewResetFib() api.Message { + return &ResetFib{} +} + +// ResetFibReply represents the VPP binary API message 'reset_fib_reply'. +// Generated from 'ip.api.json', line 2237: +// +// "reset_fib_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type ResetFibReply struct { + Retval int32 +} + +func (*ResetFibReply) GetMessageName() string { + return "reset_fib_reply" +} +func (*ResetFibReply) GetCrcString() string { + return "e8d4e804" +} +func (*ResetFibReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewResetFibReply() api.Message { + return &ResetFibReply{} +} + +// SetArpNeighborLimit represents the VPP binary API message 'set_arp_neighbor_limit'. +// Generated from 'ip.api.json', line 2255: +// +// "set_arp_neighbor_limit", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "is_ipv6" +// ], +// [ +// "u32", +// "arp_neighbor_limit" +// ], +// { +// "crc": "0x97d01fd6" +// } +// +type SetArpNeighborLimit struct { + IsIPv6 uint8 + ArpNeighborLimit uint32 +} + +func (*SetArpNeighborLimit) GetMessageName() string { + return "set_arp_neighbor_limit" +} +func (*SetArpNeighborLimit) GetCrcString() string { + return "97d01fd6" +} +func (*SetArpNeighborLimit) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewSetArpNeighborLimit() api.Message { + return &SetArpNeighborLimit{} +} + +// SetArpNeighborLimitReply represents the VPP binary API message 'set_arp_neighbor_limit_reply'. +// Generated from 'ip.api.json', line 2281: +// +// "set_arp_neighbor_limit_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type SetArpNeighborLimitReply struct { + Retval int32 +} + +func (*SetArpNeighborLimitReply) GetMessageName() string { + return "set_arp_neighbor_limit_reply" +} +func (*SetArpNeighborLimitReply) GetCrcString() string { + return "e8d4e804" +} +func (*SetArpNeighborLimitReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewSetArpNeighborLimitReply() api.Message { + return &SetArpNeighborLimitReply{} +} + +// IoamEnable represents the VPP binary API message 'ioam_enable'. +// Generated from 'ip.api.json', line 2299: +// +// "ioam_enable", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u16", +// "id" +// ], +// [ +// "u8", +// "seqno" +// ], +// [ +// "u8", +// "analyse" +// ], +// [ +// "u8", +// "pot_enable" +// ], +// [ +// "u8", +// "trace_enable" +// ], +// [ +// "u32", +// "node_id" +// ], +// { +// "crc": "0x9392e032" +// } +// +type IoamEnable struct { + ID uint16 + Seqno uint8 + Analyse uint8 + PotEnable uint8 + TraceEnable uint8 + NodeID uint32 +} + +func (*IoamEnable) GetMessageName() string { + return "ioam_enable" +} +func (*IoamEnable) GetCrcString() string { + return "9392e032" +} +func (*IoamEnable) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIoamEnable() api.Message { + return &IoamEnable{} +} + +// IoamEnableReply represents the VPP binary API message 'ioam_enable_reply'. +// Generated from 'ip.api.json', line 2341: +// +// "ioam_enable_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type IoamEnableReply struct { + Retval int32 +} + +func (*IoamEnableReply) GetMessageName() string { + return "ioam_enable_reply" +} +func (*IoamEnableReply) GetCrcString() string { + return "e8d4e804" +} +func (*IoamEnableReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIoamEnableReply() api.Message { + return &IoamEnableReply{} +} + +// IoamDisable represents the VPP binary API message 'ioam_disable'. +// Generated from 'ip.api.json', line 2359: +// +// "ioam_disable", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u16", +// "id" +// ], +// { +// "crc": "0x6b16a45e" +// } +// +type IoamDisable struct { + ID uint16 +} + +func (*IoamDisable) GetMessageName() string { + return "ioam_disable" +} +func (*IoamDisable) GetCrcString() string { + return "6b16a45e" +} +func (*IoamDisable) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIoamDisable() api.Message { + return &IoamDisable{} +} + +// IoamDisableReply represents the VPP binary API message 'ioam_disable_reply'. +// Generated from 'ip.api.json', line 2381: +// +// "ioam_disable_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type IoamDisableReply struct { + Retval int32 +} + +func (*IoamDisableReply) GetMessageName() string { + return "ioam_disable_reply" +} +func (*IoamDisableReply) GetCrcString() string { + return "e8d4e804" +} +func (*IoamDisableReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIoamDisableReply() api.Message { + return &IoamDisableReply{} +} + +// IPReassemblySet represents the VPP binary API message 'ip_reassembly_set'. +// Generated from 'ip.api.json', line 2399: +// +// "ip_reassembly_set", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "timeout_ms" +// ], +// [ +// "u32", +// "max_reassemblies" +// ], +// [ +// "u32", +// "expire_walk_interval_ms" +// ], +// [ +// "u8", +// "is_ip6" +// ], +// { +// "crc": "0x1db184de" +// } +// +type IPReassemblySet struct { + TimeoutMs uint32 + MaxReassemblies uint32 + ExpireWalkIntervalMs uint32 + IsIP6 uint8 +} + +func (*IPReassemblySet) GetMessageName() string { + return "ip_reassembly_set" +} +func (*IPReassemblySet) GetCrcString() string { + return "1db184de" +} +func (*IPReassemblySet) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPReassemblySet() api.Message { + return &IPReassemblySet{} +} + +// IPReassemblySetReply represents the VPP binary API message 'ip_reassembly_set_reply'. +// Generated from 'ip.api.json', line 2433: +// +// "ip_reassembly_set_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type IPReassemblySetReply struct { + Retval int32 +} + +func (*IPReassemblySetReply) GetMessageName() string { + return "ip_reassembly_set_reply" +} +func (*IPReassemblySetReply) GetCrcString() string { + return "e8d4e804" +} +func (*IPReassemblySetReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIPReassemblySetReply() api.Message { + return &IPReassemblySetReply{} +} + +// IPReassemblyGet represents the VPP binary API message 'ip_reassembly_get'. +// Generated from 'ip.api.json', line 2451: +// +// "ip_reassembly_get", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "is_ip6" +// ], +// { +// "crc": "0x6fe91190" +// } +// +type IPReassemblyGet struct { + IsIP6 uint8 +} + +func (*IPReassemblyGet) GetMessageName() string { + return "ip_reassembly_get" +} +func (*IPReassemblyGet) GetCrcString() string { + return "6fe91190" +} +func (*IPReassemblyGet) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPReassemblyGet() api.Message { + return &IPReassemblyGet{} +} + +// IPReassemblyGetReply represents the VPP binary API message 'ip_reassembly_get_reply'. +// Generated from 'ip.api.json', line 2473: +// +// "ip_reassembly_get_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// [ +// "u32", +// "timeout_ms" +// ], +// [ +// "u32", +// "max_reassemblies" +// ], +// [ +// "u32", +// "expire_walk_interval_ms" +// ], +// [ +// "u8", +// "is_ip6" +// ], +// { +// "crc": "0xd746fc57" +// } +// +type IPReassemblyGetReply struct { + Retval int32 + TimeoutMs uint32 + MaxReassemblies uint32 + ExpireWalkIntervalMs uint32 + IsIP6 uint8 +} + +func (*IPReassemblyGetReply) GetMessageName() string { + return "ip_reassembly_get_reply" +} +func (*IPReassemblyGetReply) GetCrcString() string { + return "d746fc57" +} +func (*IPReassemblyGetReply) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPReassemblyGetReply() api.Message { + return &IPReassemblyGetReply{} +} + +// IPReassemblyEnableDisable represents the VPP binary API message 'ip_reassembly_enable_disable'. +// Generated from 'ip.api.json', line 2511: +// +// "ip_reassembly_enable_disable", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "enable_ip4" +// ], +// [ +// "u8", +// "enable_ip6" +// ], +// { +// "crc": "0xbb8dc5d0" +// } +// +type IPReassemblyEnableDisable struct { + SwIfIndex uint32 + EnableIP4 uint8 + EnableIP6 uint8 +} + +func (*IPReassemblyEnableDisable) GetMessageName() string { + return "ip_reassembly_enable_disable" +} +func (*IPReassemblyEnableDisable) GetCrcString() string { + return "bb8dc5d0" +} +func (*IPReassemblyEnableDisable) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewIPReassemblyEnableDisable() api.Message { + return &IPReassemblyEnableDisable{} +} + +// IPReassemblyEnableDisableReply represents the VPP binary API message 'ip_reassembly_enable_disable_reply'. +// Generated from 'ip.api.json', line 2541: +// +// "ip_reassembly_enable_disable_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type IPReassemblyEnableDisableReply struct { + Retval int32 +} + +func (*IPReassemblyEnableDisableReply) GetMessageName() string { + return "ip_reassembly_enable_disable_reply" +} +func (*IPReassemblyEnableDisableReply) GetCrcString() string { + return "e8d4e804" +} +func (*IPReassemblyEnableDisableReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewIPReassemblyEnableDisableReply() api.Message { + return &IPReassemblyEnableDisableReply{} +} + +/* Services */ + +type Services interface { + DumpIP6Fib(*IP6FibDump) (*IP6FibDetails, error) + DumpIP6Mfib(*IP6MfibDump) (*IP6MfibDetails, error) + DumpIP6ndProxy(*IP6ndProxyDump) (*IP6ndProxyDetails, error) + DumpIPAddress(*IPAddressDump) (*IPAddressDetails, error) + DumpIP(*IPDump) (*IPDetails, error) + DumpIPFib(*IPFibDump) (*IPFibDetails, error) + DumpIPMfib(*IPMfibDump) (*IPMfibDetails, error) + DumpIPNeighbor(*IPNeighborDump) (*IPNeighborDetails, error) + DumpIPUnnumbered(*IPUnnumberedDump) (*IPUnnumberedDetails, error) + DumpMfibSignal(*MfibSignalDump) (*MfibSignalDetails, error) + DumpProxyArp(*ProxyArpDump) (*ProxyArpDetails, error) + DumpProxyArpIntfc(*ProxyArpIntfcDump) (*ProxyArpIntfcDetails, error) + IoamDisable(*IoamDisable) (*IoamDisableReply, error) + IoamEnable(*IoamEnable) (*IoamEnableReply, error) + IP6ndProxyAddDel(*IP6ndProxyAddDel) (*IP6ndProxyAddDelReply, error) + IP6ndSendRouterSolicitation(*IP6ndSendRouterSolicitation) (*IP6ndSendRouterSolicitationReply, error) + IPAddDelRoute(*IPAddDelRoute) (*IPAddDelRouteReply, error) + IPContainerProxyAddDel(*IPContainerProxyAddDel) (*IPContainerProxyAddDelReply, error) + IPMrouteAddDel(*IPMrouteAddDel) (*IPMrouteAddDelReply, error) + IPNeighborAddDel(*IPNeighborAddDel) (*IPNeighborAddDelReply, error) + IPProbeNeighbor(*IPProbeNeighbor) (*IPProbeNeighborReply, error) + IPPuntPolice(*IPPuntPolice) (*IPPuntPoliceReply, error) + IPPuntRedirect(*IPPuntRedirect) (*IPPuntRedirectReply, error) + IPReassemblyEnableDisable(*IPReassemblyEnableDisable) (*IPReassemblyEnableDisableReply, error) + IPReassemblyGet(*IPReassemblyGet) (*IPReassemblyGetReply, error) + IPReassemblySet(*IPReassemblySet) (*IPReassemblySetReply, error) + IPScanNeighborEnableDisable(*IPScanNeighborEnableDisable) (*IPScanNeighborEnableDisableReply, error) + IPSourceAndPortRangeCheckAddDel(*IPSourceAndPortRangeCheckAddDel) (*IPSourceAndPortRangeCheckAddDelReply, error) + IPSourceAndPortRangeCheckInterfaceAddDel(*IPSourceAndPortRangeCheckInterfaceAddDel) (*IPSourceAndPortRangeCheckInterfaceAddDelReply, error) + IPTableAddDel(*IPTableAddDel) (*IPTableAddDelReply, error) + ProxyArpAddDel(*ProxyArpAddDel) (*ProxyArpAddDelReply, error) + ProxyArpIntfcEnableDisable(*ProxyArpIntfcEnableDisable) (*ProxyArpIntfcEnableDisableReply, error) + ResetFib(*ResetFib) (*ResetFibReply, error) + SetArpNeighborLimit(*SetArpNeighborLimit) (*SetArpNeighborLimitReply, error) + SetIPFlowHash(*SetIPFlowHash) (*SetIPFlowHashReply, error) + SwInterfaceIP6EnableDisable(*SwInterfaceIP6EnableDisable) (*SwInterfaceIP6EnableDisableReply, error) + SwInterfaceIP6SetLinkLocalAddress(*SwInterfaceIP6SetLinkLocalAddress) (*SwInterfaceIP6SetLinkLocalAddressReply, error) + SwInterfaceIP6ndRaConfig(*SwInterfaceIP6ndRaConfig) (*SwInterfaceIP6ndRaConfigReply, error) + SwInterfaceIP6ndRaPrefix(*SwInterfaceIP6ndRaPrefix) (*SwInterfaceIP6ndRaPrefixReply, error) + WantIP4ArpEvents(*WantIP4ArpEvents) (*WantIP4ArpEventsReply, error) + WantIP6NdEvents(*WantIP6NdEvents) (*WantIP6NdEventsReply, error) + WantIP6RaEvents(*WantIP6RaEvents) (*WantIP6RaEventsReply, error) +} + +func init() { + api.RegisterMessage((*IPTableAddDel)(nil), "ip.IPTableAddDel") + api.RegisterMessage((*IPTableAddDelReply)(nil), "ip.IPTableAddDelReply") + api.RegisterMessage((*IPFibDump)(nil), "ip.IPFibDump") + api.RegisterMessage((*IPFibDetails)(nil), "ip.IPFibDetails") + api.RegisterMessage((*IP6FibDump)(nil), "ip.IP6FibDump") + api.RegisterMessage((*IP6FibDetails)(nil), "ip.IP6FibDetails") + api.RegisterMessage((*IPNeighborDump)(nil), "ip.IPNeighborDump") + api.RegisterMessage((*IPNeighborDetails)(nil), "ip.IPNeighborDetails") + api.RegisterMessage((*IPNeighborAddDel)(nil), "ip.IPNeighborAddDel") + api.RegisterMessage((*IPNeighborAddDelReply)(nil), "ip.IPNeighborAddDelReply") + api.RegisterMessage((*SetIPFlowHash)(nil), "ip.SetIPFlowHash") + api.RegisterMessage((*SetIPFlowHashReply)(nil), "ip.SetIPFlowHashReply") + api.RegisterMessage((*SwInterfaceIP6ndRaConfig)(nil), "ip.SwInterfaceIP6ndRaConfig") + api.RegisterMessage((*SwInterfaceIP6ndRaConfigReply)(nil), "ip.SwInterfaceIP6ndRaConfigReply") + api.RegisterMessage((*SwInterfaceIP6ndRaPrefix)(nil), "ip.SwInterfaceIP6ndRaPrefix") + api.RegisterMessage((*SwInterfaceIP6ndRaPrefixReply)(nil), "ip.SwInterfaceIP6ndRaPrefixReply") + api.RegisterMessage((*IP6ndProxyAddDel)(nil), "ip.IP6ndProxyAddDel") + api.RegisterMessage((*IP6ndProxyAddDelReply)(nil), "ip.IP6ndProxyAddDelReply") + api.RegisterMessage((*IP6ndProxyDetails)(nil), "ip.IP6ndProxyDetails") + api.RegisterMessage((*IP6ndProxyDump)(nil), "ip.IP6ndProxyDump") + api.RegisterMessage((*IP6ndSendRouterSolicitation)(nil), "ip.IP6ndSendRouterSolicitation") + api.RegisterMessage((*IP6ndSendRouterSolicitationReply)(nil), "ip.IP6ndSendRouterSolicitationReply") + api.RegisterMessage((*SwInterfaceIP6EnableDisable)(nil), "ip.SwInterfaceIP6EnableDisable") + api.RegisterMessage((*SwInterfaceIP6EnableDisableReply)(nil), "ip.SwInterfaceIP6EnableDisableReply") + api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddress)(nil), "ip.SwInterfaceIP6SetLinkLocalAddress") + api.RegisterMessage((*SwInterfaceIP6SetLinkLocalAddressReply)(nil), "ip.SwInterfaceIP6SetLinkLocalAddressReply") + api.RegisterMessage((*IPAddDelRoute)(nil), "ip.IPAddDelRoute") + api.RegisterMessage((*IPAddDelRouteReply)(nil), "ip.IPAddDelRouteReply") + api.RegisterMessage((*IPMrouteAddDel)(nil), "ip.IPMrouteAddDel") + api.RegisterMessage((*IPMrouteAddDelReply)(nil), "ip.IPMrouteAddDelReply") + api.RegisterMessage((*IPMfibDump)(nil), "ip.IPMfibDump") + api.RegisterMessage((*IPMfibDetails)(nil), "ip.IPMfibDetails") + api.RegisterMessage((*IP6MfibDump)(nil), "ip.IP6MfibDump") + api.RegisterMessage((*IP6MfibDetails)(nil), "ip.IP6MfibDetails") + api.RegisterMessage((*IPAddressDetails)(nil), "ip.IPAddressDetails") + api.RegisterMessage((*IPAddressDump)(nil), "ip.IPAddressDump") + api.RegisterMessage((*IPUnnumberedDetails)(nil), "ip.IPUnnumberedDetails") + api.RegisterMessage((*IPUnnumberedDump)(nil), "ip.IPUnnumberedDump") + api.RegisterMessage((*IPDetails)(nil), "ip.IPDetails") + api.RegisterMessage((*IPDump)(nil), "ip.IPDump") + api.RegisterMessage((*MfibSignalDump)(nil), "ip.MfibSignalDump") + api.RegisterMessage((*MfibSignalDetails)(nil), "ip.MfibSignalDetails") + api.RegisterMessage((*IPPuntPolice)(nil), "ip.IPPuntPolice") + api.RegisterMessage((*IPPuntPoliceReply)(nil), "ip.IPPuntPoliceReply") + api.RegisterMessage((*IPPuntRedirect)(nil), "ip.IPPuntRedirect") + api.RegisterMessage((*IPPuntRedirectReply)(nil), "ip.IPPuntRedirectReply") + api.RegisterMessage((*IPContainerProxyAddDel)(nil), "ip.IPContainerProxyAddDel") + api.RegisterMessage((*IPContainerProxyAddDelReply)(nil), "ip.IPContainerProxyAddDelReply") + api.RegisterMessage((*IPSourceAndPortRangeCheckAddDel)(nil), "ip.IPSourceAndPortRangeCheckAddDel") + api.RegisterMessage((*IPSourceAndPortRangeCheckAddDelReply)(nil), "ip.IPSourceAndPortRangeCheckAddDelReply") + api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDel)(nil), "ip.IPSourceAndPortRangeCheckInterfaceAddDel") + api.RegisterMessage((*IPSourceAndPortRangeCheckInterfaceAddDelReply)(nil), "ip.IPSourceAndPortRangeCheckInterfaceAddDelReply") + api.RegisterMessage((*IPScanNeighborEnableDisable)(nil), "ip.IPScanNeighborEnableDisable") + api.RegisterMessage((*IPScanNeighborEnableDisableReply)(nil), "ip.IPScanNeighborEnableDisableReply") + api.RegisterMessage((*IPProbeNeighbor)(nil), "ip.IPProbeNeighbor") + api.RegisterMessage((*IPProbeNeighborReply)(nil), "ip.IPProbeNeighborReply") + api.RegisterMessage((*WantIP4ArpEvents)(nil), "ip.WantIP4ArpEvents") + api.RegisterMessage((*WantIP4ArpEventsReply)(nil), "ip.WantIP4ArpEventsReply") + api.RegisterMessage((*IP4ArpEvent)(nil), "ip.IP4ArpEvent") + api.RegisterMessage((*WantIP6NdEvents)(nil), "ip.WantIP6NdEvents") + api.RegisterMessage((*WantIP6NdEventsReply)(nil), "ip.WantIP6NdEventsReply") + api.RegisterMessage((*IP6NdEvent)(nil), "ip.IP6NdEvent") + api.RegisterMessage((*WantIP6RaEvents)(nil), "ip.WantIP6RaEvents") + api.RegisterMessage((*WantIP6RaEventsReply)(nil), "ip.WantIP6RaEventsReply") + api.RegisterMessage((*IP6RaEvent)(nil), "ip.IP6RaEvent") + api.RegisterMessage((*ProxyArpAddDel)(nil), "ip.ProxyArpAddDel") + api.RegisterMessage((*ProxyArpAddDelReply)(nil), "ip.ProxyArpAddDelReply") + api.RegisterMessage((*ProxyArpDump)(nil), "ip.ProxyArpDump") + api.RegisterMessage((*ProxyArpDetails)(nil), "ip.ProxyArpDetails") + api.RegisterMessage((*ProxyArpIntfcEnableDisable)(nil), "ip.ProxyArpIntfcEnableDisable") + api.RegisterMessage((*ProxyArpIntfcEnableDisableReply)(nil), "ip.ProxyArpIntfcEnableDisableReply") + api.RegisterMessage((*ProxyArpIntfcDump)(nil), "ip.ProxyArpIntfcDump") + api.RegisterMessage((*ProxyArpIntfcDetails)(nil), "ip.ProxyArpIntfcDetails") + api.RegisterMessage((*ResetFib)(nil), "ip.ResetFib") + api.RegisterMessage((*ResetFibReply)(nil), "ip.ResetFibReply") + api.RegisterMessage((*SetArpNeighborLimit)(nil), "ip.SetArpNeighborLimit") + api.RegisterMessage((*SetArpNeighborLimitReply)(nil), "ip.SetArpNeighborLimitReply") + api.RegisterMessage((*IoamEnable)(nil), "ip.IoamEnable") + api.RegisterMessage((*IoamEnableReply)(nil), "ip.IoamEnableReply") + api.RegisterMessage((*IoamDisable)(nil), "ip.IoamDisable") + api.RegisterMessage((*IoamDisableReply)(nil), "ip.IoamDisableReply") + api.RegisterMessage((*IPReassemblySet)(nil), "ip.IPReassemblySet") + api.RegisterMessage((*IPReassemblySetReply)(nil), "ip.IPReassemblySetReply") + api.RegisterMessage((*IPReassemblyGet)(nil), "ip.IPReassemblyGet") + api.RegisterMessage((*IPReassemblyGetReply)(nil), "ip.IPReassemblyGetReply") + api.RegisterMessage((*IPReassemblyEnableDisable)(nil), "ip.IPReassemblyEnableDisable") + api.RegisterMessage((*IPReassemblyEnableDisableReply)(nil), "ip.IPReassemblyEnableDisableReply") +} diff --git a/examples/bin_api/ip/ip.go b/examples/bin_api/ip/ip.go deleted file mode 100644 index 7a72629..0000000 --- a/examples/bin_api/ip/ip.go +++ /dev/null @@ -1,3502 +0,0 @@ -// Code generated by govpp binapi-generator DO NOT EDIT. -// Package ip represents the VPP binary API of the 'ip' VPP module. -// Generated from '../../bin_api/ip.api.json' -package ip - -import "git.fd.io/govpp.git/api" - -// VlApiVersion contains version of the API. -const VlAPIVersion = 0xb395c625 - -// FibPath represents the VPP binary API data type 'fib_path'. -// Generated from '../../bin_api/ip.api.json', line 2199: -// -// "fib_path", -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u32", -// "table_id" -// ], -// [ -// "u8", -// "weight" -// ], -// [ -// "u8", -// "preference" -// ], -// [ -// "u8", -// "is_local" -// ], -// [ -// "u8", -// "is_drop" -// ], -// [ -// "u8", -// "is_unreach" -// ], -// [ -// "u8", -// "is_prohibit" -// ], -// [ -// "u8", -// "afi" -// ], -// [ -// "u8", -// "next_hop", -// 16 -// ], -// { -// "crc": "0xcd899e0a" -// } -// -type FibPath struct { - SwIfIndex uint32 - TableID uint32 - Weight uint8 - Preference uint8 - IsLocal uint8 - IsDrop uint8 - IsUnreach uint8 - IsProhibit uint8 - Afi uint8 - NextHop []byte `struc:"[16]byte"` -} - -func (*FibPath) GetTypeName() string { - return "fib_path" -} -func (*FibPath) GetCrcString() string { - return "cd899e0a" -} - -// IPTableAddDel represents the VPP binary API message 'ip_table_add_del'. -// Generated from '../../bin_api/ip.api.json', line 187: -// -// "ip_table_add_del", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "table_id" -// ], -// [ -// "u8", -// "is_ipv6" -// ], -// [ -// "u8", -// "is_add" -// ], -// [ -// "u8", -// "name", -// 64 -// ], -// { -// "crc": "0x0240c89d" -// } -// -type IPTableAddDel struct { - TableID uint32 - IsIpv6 uint8 - IsAdd uint8 - Name []byte `struc:"[64]byte"` -} - -func (*IPTableAddDel) GetMessageName() string { - return "ip_table_add_del" -} -func (*IPTableAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IPTableAddDel) GetCrcString() string { - return "0240c89d" -} -func NewIPTableAddDel() api.Message { - return &IPTableAddDel{} -} - -// IPTableAddDelReply represents the VPP binary API message 'ip_table_add_del_reply'. -// Generated from '../../bin_api/ip.api.json', line 222: -// -// "ip_table_add_del_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type IPTableAddDelReply struct { - Retval int32 -} - -func (*IPTableAddDelReply) GetMessageName() string { - return "ip_table_add_del_reply" -} -func (*IPTableAddDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*IPTableAddDelReply) GetCrcString() string { - return "e8d4e804" -} -func NewIPTableAddDelReply() api.Message { - return &IPTableAddDelReply{} -} - -// IPFibDump represents the VPP binary API message 'ip_fib_dump'. -// Generated from '../../bin_api/ip.api.json', line 240: -// -// "ip_fib_dump", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// { -// "crc": "0x51077d14" -// } -// -type IPFibDump struct { -} - -func (*IPFibDump) GetMessageName() string { - return "ip_fib_dump" -} -func (*IPFibDump) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IPFibDump) GetCrcString() string { - return "51077d14" -} -func NewIPFibDump() api.Message { - return &IPFibDump{} -} - -// IPFibDetails represents the VPP binary API message 'ip_fib_details'. -// Generated from '../../bin_api/ip.api.json', line 258: -// -// "ip_fib_details", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "table_id" -// ], -// [ -// "u8", -// "table_name", -// 64 -// ], -// [ -// "u8", -// "address_length" -// ], -// [ -// "u8", -// "address", -// 4 -// ], -// [ -// "u32", -// "count" -// ], -// [ -// "vl_api_fib_path_t", -// "path", -// 0, -// "count" -// ], -// { -// "crc": "0x99dfd73b" -// } -// -type IPFibDetails struct { - TableID uint32 - TableName []byte `struc:"[64]byte"` - AddressLength uint8 - Address []byte `struc:"[4]byte"` - Count uint32 `struc:"sizeof=Path"` - Path []FibPath -} - -func (*IPFibDetails) GetMessageName() string { - return "ip_fib_details" -} -func (*IPFibDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*IPFibDetails) GetCrcString() string { - return "99dfd73b" -} -func NewIPFibDetails() api.Message { - return &IPFibDetails{} -} - -// IP6FibDump represents the VPP binary API message 'ip6_fib_dump'. -// Generated from '../../bin_api/ip.api.json', line 300: -// -// "ip6_fib_dump", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// { -// "crc": "0x51077d14" -// } -// -type IP6FibDump struct { -} - -func (*IP6FibDump) GetMessageName() string { - return "ip6_fib_dump" -} -func (*IP6FibDump) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IP6FibDump) GetCrcString() string { - return "51077d14" -} -func NewIP6FibDump() api.Message { - return &IP6FibDump{} -} - -// IP6FibDetails represents the VPP binary API message 'ip6_fib_details'. -// Generated from '../../bin_api/ip.api.json', line 318: -// -// "ip6_fib_details", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "table_id" -// ], -// [ -// "u8", -// "table_name", -// 64 -// ], -// [ -// "u8", -// "address_length" -// ], -// [ -// "u8", -// "address", -// 16 -// ], -// [ -// "u32", -// "count" -// ], -// [ -// "vl_api_fib_path_t", -// "path", -// 0, -// "count" -// ], -// { -// "crc": "0xabd0060e" -// } -// -type IP6FibDetails struct { - TableID uint32 - TableName []byte `struc:"[64]byte"` - AddressLength uint8 - Address []byte `struc:"[16]byte"` - Count uint32 `struc:"sizeof=Path"` - Path []FibPath -} - -func (*IP6FibDetails) GetMessageName() string { - return "ip6_fib_details" -} -func (*IP6FibDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*IP6FibDetails) GetCrcString() string { - return "abd0060e" -} -func NewIP6FibDetails() api.Message { - return &IP6FibDetails{} -} - -// IPNeighborDump represents the VPP binary API message 'ip_neighbor_dump'. -// Generated from '../../bin_api/ip.api.json', line 360: -// -// "ip_neighbor_dump", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "is_ipv6" -// ], -// { -// "crc": "0x6b7bcd0a" -// } -// -type IPNeighborDump struct { - SwIfIndex uint32 - IsIpv6 uint8 -} - -func (*IPNeighborDump) GetMessageName() string { - return "ip_neighbor_dump" -} -func (*IPNeighborDump) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IPNeighborDump) GetCrcString() string { - return "6b7bcd0a" -} -func NewIPNeighborDump() api.Message { - return &IPNeighborDump{} -} - -// IPNeighborDetails represents the VPP binary API message 'ip_neighbor_details'. -// Generated from '../../bin_api/ip.api.json', line 386: -// -// "ip_neighbor_details", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "is_static" -// ], -// [ -// "u8", -// "is_ipv6" -// ], -// [ -// "u8", -// "mac_address", -// 6 -// ], -// [ -// "u8", -// "ip_address", -// 16 -// ], -// { -// "crc": "0x85e32a72" -// } -// -type IPNeighborDetails struct { - SwIfIndex uint32 - IsStatic uint8 - IsIpv6 uint8 - MacAddress []byte `struc:"[6]byte"` - IPAddress []byte `struc:"[16]byte"` -} - -func (*IPNeighborDetails) GetMessageName() string { - return "ip_neighbor_details" -} -func (*IPNeighborDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*IPNeighborDetails) GetCrcString() string { - return "85e32a72" -} -func NewIPNeighborDetails() api.Message { - return &IPNeighborDetails{} -} - -// IPNeighborAddDel represents the VPP binary API message 'ip_neighbor_add_del'. -// Generated from '../../bin_api/ip.api.json', line 422: -// -// "ip_neighbor_add_del", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "is_add" -// ], -// [ -// "u8", -// "is_ipv6" -// ], -// [ -// "u8", -// "is_static" -// ], -// [ -// "u8", -// "is_no_adj_fib" -// ], -// [ -// "u8", -// "mac_address", -// 6 -// ], -// [ -// "u8", -// "dst_address", -// 16 -// ], -// { -// "crc": "0x4711eb25" -// } -// -type IPNeighborAddDel struct { - SwIfIndex uint32 - IsAdd uint8 - IsIpv6 uint8 - IsStatic uint8 - IsNoAdjFib uint8 - MacAddress []byte `struc:"[6]byte"` - DstAddress []byte `struc:"[16]byte"` -} - -func (*IPNeighborAddDel) GetMessageName() string { - return "ip_neighbor_add_del" -} -func (*IPNeighborAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IPNeighborAddDel) GetCrcString() string { - return "4711eb25" -} -func NewIPNeighborAddDel() api.Message { - return &IPNeighborAddDel{} -} - -// IPNeighborAddDelReply represents the VPP binary API message 'ip_neighbor_add_del_reply'. -// Generated from '../../bin_api/ip.api.json', line 470: -// -// "ip_neighbor_add_del_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type IPNeighborAddDelReply struct { - Retval int32 -} - -func (*IPNeighborAddDelReply) GetMessageName() string { - return "ip_neighbor_add_del_reply" -} -func (*IPNeighborAddDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*IPNeighborAddDelReply) GetCrcString() string { - return "e8d4e804" -} -func NewIPNeighborAddDelReply() api.Message { - return &IPNeighborAddDelReply{} -} - -// SetIPFlowHash represents the VPP binary API message 'set_ip_flow_hash'. -// Generated from '../../bin_api/ip.api.json', line 488: -// -// "set_ip_flow_hash", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "vrf_id" -// ], -// [ -// "u8", -// "is_ipv6" -// ], -// [ -// "u8", -// "src" -// ], -// [ -// "u8", -// "dst" -// ], -// [ -// "u8", -// "sport" -// ], -// [ -// "u8", -// "dport" -// ], -// [ -// "u8", -// "proto" -// ], -// [ -// "u8", -// "reverse" -// ], -// { -// "crc": "0x32ebf737" -// } -// -type SetIPFlowHash struct { - VrfID uint32 - IsIpv6 uint8 - Src uint8 - Dst uint8 - Sport uint8 - Dport uint8 - Proto uint8 - Reverse uint8 -} - -func (*SetIPFlowHash) GetMessageName() string { - return "set_ip_flow_hash" -} -func (*SetIPFlowHash) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*SetIPFlowHash) GetCrcString() string { - return "32ebf737" -} -func NewSetIPFlowHash() api.Message { - return &SetIPFlowHash{} -} - -// SetIPFlowHashReply represents the VPP binary API message 'set_ip_flow_hash_reply'. -// Generated from '../../bin_api/ip.api.json', line 538: -// -// "set_ip_flow_hash_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type SetIPFlowHashReply struct { - Retval int32 -} - -func (*SetIPFlowHashReply) GetMessageName() string { - return "set_ip_flow_hash_reply" -} -func (*SetIPFlowHashReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*SetIPFlowHashReply) GetCrcString() string { - return "e8d4e804" -} -func NewSetIPFlowHashReply() api.Message { - return &SetIPFlowHashReply{} -} - -// SwInterfaceIP6ndRaConfig represents the VPP binary API message 'sw_interface_ip6nd_ra_config'. -// Generated from '../../bin_api/ip.api.json', line 556: -// -// "sw_interface_ip6nd_ra_config", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "suppress" -// ], -// [ -// "u8", -// "managed" -// ], -// [ -// "u8", -// "other" -// ], -// [ -// "u8", -// "ll_option" -// ], -// [ -// "u8", -// "send_unicast" -// ], -// [ -// "u8", -// "cease" -// ], -// [ -// "u8", -// "is_no" -// ], -// [ -// "u8", -// "default_router" -// ], -// [ -// "u32", -// "max_interval" -// ], -// [ -// "u32", -// "min_interval" -// ], -// [ -// "u32", -// "lifetime" -// ], -// [ -// "u32", -// "initial_count" -// ], -// [ -// "u32", -// "initial_interval" -// ], -// { -// "crc": "0xc3f02daa" -// } -// -type SwInterfaceIP6ndRaConfig struct { - SwIfIndex uint32 - Suppress uint8 - Managed uint8 - Other uint8 - LlOption uint8 - SendUnicast uint8 - Cease uint8 - IsNo uint8 - DefaultRouter uint8 - MaxInterval uint32 - MinInterval uint32 - Lifetime uint32 - InitialCount uint32 - InitialInterval uint32 -} - -func (*SwInterfaceIP6ndRaConfig) GetMessageName() string { - return "sw_interface_ip6nd_ra_config" -} -func (*SwInterfaceIP6ndRaConfig) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*SwInterfaceIP6ndRaConfig) GetCrcString() string { - return "c3f02daa" -} -func NewSwInterfaceIP6ndRaConfig() api.Message { - return &SwInterfaceIP6ndRaConfig{} -} - -// SwInterfaceIP6ndRaConfigReply represents the VPP binary API message 'sw_interface_ip6nd_ra_config_reply'. -// Generated from '../../bin_api/ip.api.json', line 630: -// -// "sw_interface_ip6nd_ra_config_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type SwInterfaceIP6ndRaConfigReply struct { - Retval int32 -} - -func (*SwInterfaceIP6ndRaConfigReply) GetMessageName() string { - return "sw_interface_ip6nd_ra_config_reply" -} -func (*SwInterfaceIP6ndRaConfigReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*SwInterfaceIP6ndRaConfigReply) GetCrcString() string { - return "e8d4e804" -} -func NewSwInterfaceIP6ndRaConfigReply() api.Message { - return &SwInterfaceIP6ndRaConfigReply{} -} - -// SwInterfaceIP6ndRaPrefix represents the VPP binary API message 'sw_interface_ip6nd_ra_prefix'. -// Generated from '../../bin_api/ip.api.json', line 648: -// -// "sw_interface_ip6nd_ra_prefix", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "address", -// 16 -// ], -// [ -// "u8", -// "address_length" -// ], -// [ -// "u8", -// "use_default" -// ], -// [ -// "u8", -// "no_advertise" -// ], -// [ -// "u8", -// "off_link" -// ], -// [ -// "u8", -// "no_autoconfig" -// ], -// [ -// "u8", -// "no_onlink" -// ], -// [ -// "u8", -// "is_no" -// ], -// [ -// "u32", -// "val_lifetime" -// ], -// [ -// "u32", -// "pref_lifetime" -// ], -// { -// "crc": "0xca763c9a" -// } -// -type SwInterfaceIP6ndRaPrefix struct { - SwIfIndex uint32 - Address []byte `struc:"[16]byte"` - AddressLength uint8 - UseDefault uint8 - NoAdvertise uint8 - OffLink uint8 - NoAutoconfig uint8 - NoOnlink uint8 - IsNo uint8 - ValLifetime uint32 - PrefLifetime uint32 -} - -func (*SwInterfaceIP6ndRaPrefix) GetMessageName() string { - return "sw_interface_ip6nd_ra_prefix" -} -func (*SwInterfaceIP6ndRaPrefix) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*SwInterfaceIP6ndRaPrefix) GetCrcString() string { - return "ca763c9a" -} -func NewSwInterfaceIP6ndRaPrefix() api.Message { - return &SwInterfaceIP6ndRaPrefix{} -} - -// SwInterfaceIP6ndRaPrefixReply represents the VPP binary API message 'sw_interface_ip6nd_ra_prefix_reply'. -// Generated from '../../bin_api/ip.api.json', line 711: -// -// "sw_interface_ip6nd_ra_prefix_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type SwInterfaceIP6ndRaPrefixReply struct { - Retval int32 -} - -func (*SwInterfaceIP6ndRaPrefixReply) GetMessageName() string { - return "sw_interface_ip6nd_ra_prefix_reply" -} -func (*SwInterfaceIP6ndRaPrefixReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*SwInterfaceIP6ndRaPrefixReply) GetCrcString() string { - return "e8d4e804" -} -func NewSwInterfaceIP6ndRaPrefixReply() api.Message { - return &SwInterfaceIP6ndRaPrefixReply{} -} - -// IP6ndProxyAddDel represents the VPP binary API message 'ip6nd_proxy_add_del'. -// Generated from '../../bin_api/ip.api.json', line 729: -// -// "ip6nd_proxy_add_del", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "is_del" -// ], -// [ -// "u8", -// "address", -// 16 -// ], -// { -// "crc": "0xd95f0fa0" -// } -// -type IP6ndProxyAddDel struct { - SwIfIndex uint32 - IsDel uint8 - Address []byte `struc:"[16]byte"` -} - -func (*IP6ndProxyAddDel) GetMessageName() string { - return "ip6nd_proxy_add_del" -} -func (*IP6ndProxyAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IP6ndProxyAddDel) GetCrcString() string { - return "d95f0fa0" -} -func NewIP6ndProxyAddDel() api.Message { - return &IP6ndProxyAddDel{} -} - -// IP6ndProxyAddDelReply represents the VPP binary API message 'ip6nd_proxy_add_del_reply'. -// Generated from '../../bin_api/ip.api.json', line 760: -// -// "ip6nd_proxy_add_del_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type IP6ndProxyAddDelReply struct { - Retval int32 -} - -func (*IP6ndProxyAddDelReply) GetMessageName() string { - return "ip6nd_proxy_add_del_reply" -} -func (*IP6ndProxyAddDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*IP6ndProxyAddDelReply) GetCrcString() string { - return "e8d4e804" -} -func NewIP6ndProxyAddDelReply() api.Message { - return &IP6ndProxyAddDelReply{} -} - -// IP6ndProxyDetails represents the VPP binary API message 'ip6nd_proxy_details'. -// Generated from '../../bin_api/ip.api.json', line 778: -// -// "ip6nd_proxy_details", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "address", -// 16 -// ], -// { -// "crc": "0xd73bf1ab" -// } -// -type IP6ndProxyDetails struct { - SwIfIndex uint32 - Address []byte `struc:"[16]byte"` -} - -func (*IP6ndProxyDetails) GetMessageName() string { - return "ip6nd_proxy_details" -} -func (*IP6ndProxyDetails) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IP6ndProxyDetails) GetCrcString() string { - return "d73bf1ab" -} -func NewIP6ndProxyDetails() api.Message { - return &IP6ndProxyDetails{} -} - -// IP6ndProxyDump represents the VPP binary API message 'ip6nd_proxy_dump'. -// Generated from '../../bin_api/ip.api.json', line 805: -// -// "ip6nd_proxy_dump", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// { -// "crc": "0x51077d14" -// } -// -type IP6ndProxyDump struct { -} - -func (*IP6ndProxyDump) GetMessageName() string { - return "ip6nd_proxy_dump" -} -func (*IP6ndProxyDump) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IP6ndProxyDump) GetCrcString() string { - return "51077d14" -} -func NewIP6ndProxyDump() api.Message { - return &IP6ndProxyDump{} -} - -// SwInterfaceIP6EnableDisable represents the VPP binary API message 'sw_interface_ip6_enable_disable'. -// Generated from '../../bin_api/ip.api.json', line 823: -// -// "sw_interface_ip6_enable_disable", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "enable" -// ], -// { -// "crc": "0xa36fadc0" -// } -// -type SwInterfaceIP6EnableDisable struct { - SwIfIndex uint32 - Enable uint8 -} - -func (*SwInterfaceIP6EnableDisable) GetMessageName() string { - return "sw_interface_ip6_enable_disable" -} -func (*SwInterfaceIP6EnableDisable) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*SwInterfaceIP6EnableDisable) GetCrcString() string { - return "a36fadc0" -} -func NewSwInterfaceIP6EnableDisable() api.Message { - return &SwInterfaceIP6EnableDisable{} -} - -// SwInterfaceIP6EnableDisableReply represents the VPP binary API message 'sw_interface_ip6_enable_disable_reply'. -// Generated from '../../bin_api/ip.api.json', line 849: -// -// "sw_interface_ip6_enable_disable_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type SwInterfaceIP6EnableDisableReply struct { - Retval int32 -} - -func (*SwInterfaceIP6EnableDisableReply) GetMessageName() string { - return "sw_interface_ip6_enable_disable_reply" -} -func (*SwInterfaceIP6EnableDisableReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*SwInterfaceIP6EnableDisableReply) GetCrcString() string { - return "e8d4e804" -} -func NewSwInterfaceIP6EnableDisableReply() api.Message { - return &SwInterfaceIP6EnableDisableReply{} -} - -// SwInterfaceIP6SetLinkLocalAddress represents the VPP binary API message 'sw_interface_ip6_set_link_local_address'. -// Generated from '../../bin_api/ip.api.json', line 867: -// -// "sw_interface_ip6_set_link_local_address", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "address", -// 16 -// ], -// { -// "crc": "0xd73bf1ab" -// } -// -type SwInterfaceIP6SetLinkLocalAddress struct { - SwIfIndex uint32 - Address []byte `struc:"[16]byte"` -} - -func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageName() string { - return "sw_interface_ip6_set_link_local_address" -} -func (*SwInterfaceIP6SetLinkLocalAddress) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*SwInterfaceIP6SetLinkLocalAddress) GetCrcString() string { - return "d73bf1ab" -} -func NewSwInterfaceIP6SetLinkLocalAddress() api.Message { - return &SwInterfaceIP6SetLinkLocalAddress{} -} - -// SwInterfaceIP6SetLinkLocalAddressReply represents the VPP binary API message 'sw_interface_ip6_set_link_local_address_reply'. -// Generated from '../../bin_api/ip.api.json', line 894: -// -// "sw_interface_ip6_set_link_local_address_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type SwInterfaceIP6SetLinkLocalAddressReply struct { - Retval int32 -} - -func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageName() string { - return "sw_interface_ip6_set_link_local_address_reply" -} -func (*SwInterfaceIP6SetLinkLocalAddressReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*SwInterfaceIP6SetLinkLocalAddressReply) GetCrcString() string { - return "e8d4e804" -} -func NewSwInterfaceIP6SetLinkLocalAddressReply() api.Message { - return &SwInterfaceIP6SetLinkLocalAddressReply{} -} - -// IPAddDelRoute represents the VPP binary API message 'ip_add_del_route'. -// Generated from '../../bin_api/ip.api.json', line 912: -// -// "ip_add_del_route", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "next_hop_sw_if_index" -// ], -// [ -// "u32", -// "table_id" -// ], -// [ -// "u32", -// "classify_table_index" -// ], -// [ -// "u32", -// "next_hop_table_id" -// ], -// [ -// "u32", -// "next_hop_id" -// ], -// [ -// "u8", -// "is_add" -// ], -// [ -// "u8", -// "is_drop" -// ], -// [ -// "u8", -// "is_unreach" -// ], -// [ -// "u8", -// "is_prohibit" -// ], -// [ -// "u8", -// "is_ipv6" -// ], -// [ -// "u8", -// "is_local" -// ], -// [ -// "u8", -// "is_classify" -// ], -// [ -// "u8", -// "is_multipath" -// ], -// [ -// "u8", -// "is_resolve_host" -// ], -// [ -// "u8", -// "is_resolve_attached" -// ], -// [ -// "u8", -// "is_dvr" -// ], -// [ -// "u8", -// "is_source_lookup" -// ], -// [ -// "u8", -// "is_udp_encap" -// ], -// [ -// "u8", -// "next_hop_weight" -// ], -// [ -// "u8", -// "next_hop_preference" -// ], -// [ -// "u8", -// "next_hop_proto" -// ], -// [ -// "u8", -// "dst_address_length" -// ], -// [ -// "u8", -// "dst_address", -// 16 -// ], -// [ -// "u8", -// "next_hop_address", -// 16 -// ], -// [ -// "u8", -// "next_hop_n_out_labels" -// ], -// [ -// "u32", -// "next_hop_via_label" -// ], -// [ -// "u32", -// "next_hop_out_label_stack", -// 0, -// "next_hop_n_out_labels" -// ], -// { -// "crc": "0xc85f8290" -// } -// -type IPAddDelRoute struct { - NextHopSwIfIndex uint32 - TableID uint32 - ClassifyTableIndex uint32 - NextHopTableID uint32 - NextHopID uint32 - IsAdd uint8 - IsDrop uint8 - IsUnreach uint8 - IsProhibit uint8 - IsIpv6 uint8 - IsLocal uint8 - IsClassify uint8 - IsMultipath uint8 - IsResolveHost uint8 - IsResolveAttached uint8 - IsDvr uint8 - IsSourceLookup uint8 - IsUDPEncap uint8 - NextHopWeight uint8 - NextHopPreference uint8 - NextHopProto uint8 - DstAddressLength uint8 - DstAddress []byte `struc:"[16]byte"` - NextHopAddress []byte `struc:"[16]byte"` - NextHopNOutLabels uint8 `struc:"sizeof=NextHopOutLabelStack"` - NextHopViaLabel uint32 - NextHopOutLabelStack []uint32 -} - -func (*IPAddDelRoute) GetMessageName() string { - return "ip_add_del_route" -} -func (*IPAddDelRoute) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IPAddDelRoute) GetCrcString() string { - return "c85f8290" -} -func NewIPAddDelRoute() api.Message { - return &IPAddDelRoute{} -} - -// IPAddDelRouteReply represents the VPP binary API message 'ip_add_del_route_reply'. -// Generated from '../../bin_api/ip.api.json', line 1042: -// -// "ip_add_del_route_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type IPAddDelRouteReply struct { - Retval int32 -} - -func (*IPAddDelRouteReply) GetMessageName() string { - return "ip_add_del_route_reply" -} -func (*IPAddDelRouteReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*IPAddDelRouteReply) GetCrcString() string { - return "e8d4e804" -} -func NewIPAddDelRouteReply() api.Message { - return &IPAddDelRouteReply{} -} - -// IPMrouteAddDel represents the VPP binary API message 'ip_mroute_add_del'. -// Generated from '../../bin_api/ip.api.json', line 1060: -// -// "ip_mroute_add_del", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "next_hop_sw_if_index" -// ], -// [ -// "u32", -// "table_id" -// ], -// [ -// "u32", -// "entry_flags" -// ], -// [ -// "u32", -// "itf_flags" -// ], -// [ -// "u32", -// "rpf_id" -// ], -// [ -// "u32", -// "bier_imp" -// ], -// [ -// "u16", -// "grp_address_length" -// ], -// [ -// "u8", -// "next_hop_afi" -// ], -// [ -// "u8", -// "is_add" -// ], -// [ -// "u8", -// "is_ipv6" -// ], -// [ -// "u8", -// "is_local" -// ], -// [ -// "u8", -// "grp_address", -// 16 -// ], -// [ -// "u8", -// "src_address", -// 16 -// ], -// { -// "crc": "0xc37112f7" -// } -// -type IPMrouteAddDel struct { - NextHopSwIfIndex uint32 - TableID uint32 - EntryFlags uint32 - ItfFlags uint32 - RpfID uint32 - BierImp uint32 - GrpAddressLength uint16 - NextHopAfi uint8 - IsAdd uint8 - IsIpv6 uint8 - IsLocal uint8 - GrpAddress []byte `struc:"[16]byte"` - SrcAddress []byte `struc:"[16]byte"` -} - -func (*IPMrouteAddDel) GetMessageName() string { - return "ip_mroute_add_del" -} -func (*IPMrouteAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IPMrouteAddDel) GetCrcString() string { - return "c37112f7" -} -func NewIPMrouteAddDel() api.Message { - return &IPMrouteAddDel{} -} - -// IPMrouteAddDelReply represents the VPP binary API message 'ip_mroute_add_del_reply'. -// Generated from '../../bin_api/ip.api.json', line 1132: -// -// "ip_mroute_add_del_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type IPMrouteAddDelReply struct { - Retval int32 -} - -func (*IPMrouteAddDelReply) GetMessageName() string { - return "ip_mroute_add_del_reply" -} -func (*IPMrouteAddDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*IPMrouteAddDelReply) GetCrcString() string { - return "e8d4e804" -} -func NewIPMrouteAddDelReply() api.Message { - return &IPMrouteAddDelReply{} -} - -// IPMfibDump represents the VPP binary API message 'ip_mfib_dump'. -// Generated from '../../bin_api/ip.api.json', line 1150: -// -// "ip_mfib_dump", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// { -// "crc": "0x51077d14" -// } -// -type IPMfibDump struct { -} - -func (*IPMfibDump) GetMessageName() string { - return "ip_mfib_dump" -} -func (*IPMfibDump) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IPMfibDump) GetCrcString() string { - return "51077d14" -} -func NewIPMfibDump() api.Message { - return &IPMfibDump{} -} - -// IPMfibDetails represents the VPP binary API message 'ip_mfib_details'. -// Generated from '../../bin_api/ip.api.json', line 1168: -// -// "ip_mfib_details", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "table_id" -// ], -// [ -// "u32", -// "entry_flags" -// ], -// [ -// "u32", -// "rpf_id" -// ], -// [ -// "u8", -// "address_length" -// ], -// [ -// "u8", -// "grp_address", -// 4 -// ], -// [ -// "u8", -// "src_address", -// 4 -// ], -// [ -// "u32", -// "count" -// ], -// [ -// "vl_api_fib_path_t", -// "path", -// 0, -// "count" -// ], -// { -// "crc": "0x5e530d5e" -// } -// -type IPMfibDetails struct { - TableID uint32 - EntryFlags uint32 - RpfID uint32 - AddressLength uint8 - GrpAddress []byte `struc:"[4]byte"` - SrcAddress []byte `struc:"[4]byte"` - Count uint32 `struc:"sizeof=Path"` - Path []FibPath -} - -func (*IPMfibDetails) GetMessageName() string { - return "ip_mfib_details" -} -func (*IPMfibDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*IPMfibDetails) GetCrcString() string { - return "5e530d5e" -} -func NewIPMfibDetails() api.Message { - return &IPMfibDetails{} -} - -// IP6MfibDump represents the VPP binary API message 'ip6_mfib_dump'. -// Generated from '../../bin_api/ip.api.json', line 1218: -// -// "ip6_mfib_dump", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// { -// "crc": "0x51077d14" -// } -// -type IP6MfibDump struct { -} - -func (*IP6MfibDump) GetMessageName() string { - return "ip6_mfib_dump" -} -func (*IP6MfibDump) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IP6MfibDump) GetCrcString() string { - return "51077d14" -} -func NewIP6MfibDump() api.Message { - return &IP6MfibDump{} -} - -// IP6MfibDetails represents the VPP binary API message 'ip6_mfib_details'. -// Generated from '../../bin_api/ip.api.json', line 1236: -// -// "ip6_mfib_details", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "table_id" -// ], -// [ -// "u8", -// "address_length" -// ], -// [ -// "u8", -// "grp_address", -// 16 -// ], -// [ -// "u8", -// "src_address", -// 16 -// ], -// [ -// "u32", -// "count" -// ], -// [ -// "vl_api_fib_path_t", -// "path", -// 0, -// "count" -// ], -// { -// "crc": "0xe02dcb4b" -// } -// -type IP6MfibDetails struct { - TableID uint32 - AddressLength uint8 - GrpAddress []byte `struc:"[16]byte"` - SrcAddress []byte `struc:"[16]byte"` - Count uint32 `struc:"sizeof=Path"` - Path []FibPath -} - -func (*IP6MfibDetails) GetMessageName() string { - return "ip6_mfib_details" -} -func (*IP6MfibDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*IP6MfibDetails) GetCrcString() string { - return "e02dcb4b" -} -func NewIP6MfibDetails() api.Message { - return &IP6MfibDetails{} -} - -// IPAddressDetails represents the VPP binary API message 'ip_address_details'. -// Generated from '../../bin_api/ip.api.json', line 1278: -// -// "ip_address_details", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "ip", -// 16 -// ], -// [ -// "u8", -// "prefix_length" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "is_ipv6" -// ], -// { -// "crc": "0xbc7442f2" -// } -// -type IPAddressDetails struct { - IP []byte `struc:"[16]byte"` - PrefixLength uint8 - SwIfIndex uint32 - IsIpv6 uint8 -} - -func (*IPAddressDetails) GetMessageName() string { - return "ip_address_details" -} -func (*IPAddressDetails) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IPAddressDetails) GetCrcString() string { - return "bc7442f2" -} -func NewIPAddressDetails() api.Message { - return &IPAddressDetails{} -} - -// IPAddressDump represents the VPP binary API message 'ip_address_dump'. -// Generated from '../../bin_api/ip.api.json', line 1313: -// -// "ip_address_dump", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "is_ipv6" -// ], -// { -// "crc": "0x6b7bcd0a" -// } -// -type IPAddressDump struct { - SwIfIndex uint32 - IsIpv6 uint8 -} - -func (*IPAddressDump) GetMessageName() string { - return "ip_address_dump" -} -func (*IPAddressDump) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IPAddressDump) GetCrcString() string { - return "6b7bcd0a" -} -func NewIPAddressDump() api.Message { - return &IPAddressDump{} -} - -// IPDetails represents the VPP binary API message 'ip_details'. -// Generated from '../../bin_api/ip.api.json', line 1339: -// -// "ip_details", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "is_ipv6" -// ], -// { -// "crc": "0x452ffc5a" -// } -// -type IPDetails struct { - SwIfIndex uint32 - Context uint32 - IsIpv6 uint8 -} - -func (*IPDetails) GetMessageName() string { - return "ip_details" -} -func (*IPDetails) GetMessageType() api.MessageType { - return api.OtherMessage -} -func (*IPDetails) GetCrcString() string { - return "452ffc5a" -} -func NewIPDetails() api.Message { - return &IPDetails{} -} - -// IPDump represents the VPP binary API message 'ip_dump'. -// Generated from '../../bin_api/ip.api.json', line 1361: -// -// "ip_dump", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "is_ipv6" -// ], -// { -// "crc": "0xde883da4" -// } -// -type IPDump struct { - IsIpv6 uint8 -} - -func (*IPDump) GetMessageName() string { - return "ip_dump" -} -func (*IPDump) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IPDump) GetCrcString() string { - return "de883da4" -} -func NewIPDump() api.Message { - return &IPDump{} -} - -// MfibSignalDump represents the VPP binary API message 'mfib_signal_dump'. -// Generated from '../../bin_api/ip.api.json', line 1383: -// -// "mfib_signal_dump", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// { -// "crc": "0x51077d14" -// } -// -type MfibSignalDump struct { -} - -func (*MfibSignalDump) GetMessageName() string { - return "mfib_signal_dump" -} -func (*MfibSignalDump) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*MfibSignalDump) GetCrcString() string { - return "51077d14" -} -func NewMfibSignalDump() api.Message { - return &MfibSignalDump{} -} - -// MfibSignalDetails represents the VPP binary API message 'mfib_signal_details'. -// Generated from '../../bin_api/ip.api.json', line 1401: -// -// "mfib_signal_details", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u32", -// "table_id" -// ], -// [ -// "u16", -// "grp_address_len" -// ], -// [ -// "u8", -// "grp_address", -// 16 -// ], -// [ -// "u8", -// "src_address", -// 16 -// ], -// [ -// "u16", -// "ip_packet_len" -// ], -// [ -// "u8", -// "ip_packet_data", -// 256 -// ], -// { -// "crc": "0x791bbeab" -// } -// -type MfibSignalDetails struct { - SwIfIndex uint32 - TableID uint32 - GrpAddressLen uint16 - GrpAddress []byte `struc:"[16]byte"` - SrcAddress []byte `struc:"[16]byte"` - IPPacketLen uint16 - IPPacketData []byte `struc:"[256]byte"` -} - -func (*MfibSignalDetails) GetMessageName() string { - return "mfib_signal_details" -} -func (*MfibSignalDetails) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*MfibSignalDetails) GetCrcString() string { - return "791bbeab" -} -func NewMfibSignalDetails() api.Message { - return &MfibSignalDetails{} -} - -// IPPuntPolice represents the VPP binary API message 'ip_punt_police'. -// Generated from '../../bin_api/ip.api.json', line 1450: -// -// "ip_punt_police", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "policer_index" -// ], -// [ -// "u8", -// "is_add" -// ], -// [ -// "u8", -// "is_ip6" -// ], -// { -// "crc": "0x38691592" -// } -// -type IPPuntPolice struct { - PolicerIndex uint32 - IsAdd uint8 - IsIP6 uint8 -} - -func (*IPPuntPolice) GetMessageName() string { - return "ip_punt_police" -} -func (*IPPuntPolice) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IPPuntPolice) GetCrcString() string { - return "38691592" -} -func NewIPPuntPolice() api.Message { - return &IPPuntPolice{} -} - -// IPPuntPoliceReply represents the VPP binary API message 'ip_punt_police_reply'. -// Generated from '../../bin_api/ip.api.json', line 1480: -// -// "ip_punt_police_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type IPPuntPoliceReply struct { - Retval int32 -} - -func (*IPPuntPoliceReply) GetMessageName() string { - return "ip_punt_police_reply" -} -func (*IPPuntPoliceReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*IPPuntPoliceReply) GetCrcString() string { - return "e8d4e804" -} -func NewIPPuntPoliceReply() api.Message { - return &IPPuntPoliceReply{} -} - -// IPPuntRedirect represents the VPP binary API message 'ip_punt_redirect'. -// Generated from '../../bin_api/ip.api.json', line 1498: -// -// "ip_punt_redirect", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "rx_sw_if_index" -// ], -// [ -// "u32", -// "tx_sw_if_index" -// ], -// [ -// "u8", -// "is_add" -// ], -// [ -// "u8", -// "is_ip6" -// ], -// [ -// "u8", -// "nh", -// 16 -// ], -// { -// "crc": "0x996b6603" -// } -// -type IPPuntRedirect struct { - RxSwIfIndex uint32 - TxSwIfIndex uint32 - IsAdd uint8 - IsIP6 uint8 - Nh []byte `struc:"[16]byte"` -} - -func (*IPPuntRedirect) GetMessageName() string { - return "ip_punt_redirect" -} -func (*IPPuntRedirect) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IPPuntRedirect) GetCrcString() string { - return "996b6603" -} -func NewIPPuntRedirect() api.Message { - return &IPPuntRedirect{} -} - -// IPPuntRedirectReply represents the VPP binary API message 'ip_punt_redirect_reply'. -// Generated from '../../bin_api/ip.api.json', line 1537: -// -// "ip_punt_redirect_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type IPPuntRedirectReply struct { - Retval int32 -} - -func (*IPPuntRedirectReply) GetMessageName() string { - return "ip_punt_redirect_reply" -} -func (*IPPuntRedirectReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*IPPuntRedirectReply) GetCrcString() string { - return "e8d4e804" -} -func NewIPPuntRedirectReply() api.Message { - return &IPPuntRedirectReply{} -} - -// IPContainerProxyAddDel represents the VPP binary API message 'ip_container_proxy_add_del'. -// Generated from '../../bin_api/ip.api.json', line 1555: -// -// "ip_container_proxy_add_del", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "ip", -// 16 -// ], -// [ -// "u8", -// "is_ip4" -// ], -// [ -// "u8", -// "plen" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "is_add" -// ], -// { -// "crc": "0x0a355d39" -// } -// -type IPContainerProxyAddDel struct { - IP []byte `struc:"[16]byte"` - IsIP4 uint8 - Plen uint8 - SwIfIndex uint32 - IsAdd uint8 -} - -func (*IPContainerProxyAddDel) GetMessageName() string { - return "ip_container_proxy_add_del" -} -func (*IPContainerProxyAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IPContainerProxyAddDel) GetCrcString() string { - return "0a355d39" -} -func NewIPContainerProxyAddDel() api.Message { - return &IPContainerProxyAddDel{} -} - -// IPContainerProxyAddDelReply represents the VPP binary API message 'ip_container_proxy_add_del_reply'. -// Generated from '../../bin_api/ip.api.json', line 1594: -// -// "ip_container_proxy_add_del_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type IPContainerProxyAddDelReply struct { - Retval int32 -} - -func (*IPContainerProxyAddDelReply) GetMessageName() string { - return "ip_container_proxy_add_del_reply" -} -func (*IPContainerProxyAddDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*IPContainerProxyAddDelReply) GetCrcString() string { - return "e8d4e804" -} -func NewIPContainerProxyAddDelReply() api.Message { - return &IPContainerProxyAddDelReply{} -} - -// IPSourceAndPortRangeCheckAddDel represents the VPP binary API message 'ip_source_and_port_range_check_add_del'. -// Generated from '../../bin_api/ip.api.json', line 1612: -// -// "ip_source_and_port_range_check_add_del", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "is_ipv6" -// ], -// [ -// "u8", -// "is_add" -// ], -// [ -// "u8", -// "mask_length" -// ], -// [ -// "u8", -// "address", -// 16 -// ], -// [ -// "u8", -// "number_of_ranges" -// ], -// [ -// "u16", -// "low_ports", -// 32 -// ], -// [ -// "u16", -// "high_ports", -// 32 -// ], -// [ -// "u32", -// "vrf_id" -// ], -// { -// "crc": "0x03d6b03a" -// } -// -type IPSourceAndPortRangeCheckAddDel struct { - IsIpv6 uint8 - IsAdd uint8 - MaskLength uint8 - Address []byte `struc:"[16]byte"` - NumberOfRanges uint8 - LowPorts []uint16 `struc:"[32]uint16"` - HighPorts []uint16 `struc:"[32]uint16"` - VrfID uint32 -} - -func (*IPSourceAndPortRangeCheckAddDel) GetMessageName() string { - return "ip_source_and_port_range_check_add_del" -} -func (*IPSourceAndPortRangeCheckAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IPSourceAndPortRangeCheckAddDel) GetCrcString() string { - return "03d6b03a" -} -func NewIPSourceAndPortRangeCheckAddDel() api.Message { - return &IPSourceAndPortRangeCheckAddDel{} -} - -// IPSourceAndPortRangeCheckAddDelReply represents the VPP binary API message 'ip_source_and_port_range_check_add_del_reply'. -// Generated from '../../bin_api/ip.api.json', line 1665: -// -// "ip_source_and_port_range_check_add_del_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type IPSourceAndPortRangeCheckAddDelReply struct { - Retval int32 -} - -func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageName() string { - return "ip_source_and_port_range_check_add_del_reply" -} -func (*IPSourceAndPortRangeCheckAddDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*IPSourceAndPortRangeCheckAddDelReply) GetCrcString() string { - return "e8d4e804" -} -func NewIPSourceAndPortRangeCheckAddDelReply() api.Message { - return &IPSourceAndPortRangeCheckAddDelReply{} -} - -// IPSourceAndPortRangeCheckInterfaceAddDel represents the VPP binary API message 'ip_source_and_port_range_check_interface_add_del'. -// Generated from '../../bin_api/ip.api.json', line 1683: -// -// "ip_source_and_port_range_check_interface_add_del", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "is_add" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u32", -// "tcp_in_vrf_id" -// ], -// [ -// "u32", -// "tcp_out_vrf_id" -// ], -// [ -// "u32", -// "udp_in_vrf_id" -// ], -// [ -// "u32", -// "udp_out_vrf_id" -// ], -// { -// "crc": "0x6966bc44" -// } -// -type IPSourceAndPortRangeCheckInterfaceAddDel struct { - IsAdd uint8 - SwIfIndex uint32 - TCPInVrfID uint32 - TCPOutVrfID uint32 - UDPInVrfID uint32 - UDPOutVrfID uint32 -} - -func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageName() string { - return "ip_source_and_port_range_check_interface_add_del" -} -func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IPSourceAndPortRangeCheckInterfaceAddDel) GetCrcString() string { - return "6966bc44" -} -func NewIPSourceAndPortRangeCheckInterfaceAddDel() api.Message { - return &IPSourceAndPortRangeCheckInterfaceAddDel{} -} - -// IPSourceAndPortRangeCheckInterfaceAddDelReply represents the VPP binary API message 'ip_source_and_port_range_check_interface_add_del_reply'. -// Generated from '../../bin_api/ip.api.json', line 1725: -// -// "ip_source_and_port_range_check_interface_add_del_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type IPSourceAndPortRangeCheckInterfaceAddDelReply struct { - Retval int32 -} - -func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageName() string { - return "ip_source_and_port_range_check_interface_add_del_reply" -} -func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*IPSourceAndPortRangeCheckInterfaceAddDelReply) GetCrcString() string { - return "e8d4e804" -} -func NewIPSourceAndPortRangeCheckInterfaceAddDelReply() api.Message { - return &IPSourceAndPortRangeCheckInterfaceAddDelReply{} -} - -// WantIP4ArpEvents represents the VPP binary API message 'want_ip4_arp_events'. -// Generated from '../../bin_api/ip.api.json', line 1743: -// -// "want_ip4_arp_events", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "enable_disable" -// ], -// [ -// "u32", -// "pid" -// ], -// [ -// "u32", -// "address" -// ], -// { -// "crc": "0x77e06379" -// } -// -type WantIP4ArpEvents struct { - EnableDisable uint8 - Pid uint32 - Address uint32 -} - -func (*WantIP4ArpEvents) GetMessageName() string { - return "want_ip4_arp_events" -} -func (*WantIP4ArpEvents) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*WantIP4ArpEvents) GetCrcString() string { - return "77e06379" -} -func NewWantIP4ArpEvents() api.Message { - return &WantIP4ArpEvents{} -} - -// WantIP4ArpEventsReply represents the VPP binary API message 'want_ip4_arp_events_reply'. -// Generated from '../../bin_api/ip.api.json', line 1773: -// -// "want_ip4_arp_events_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type WantIP4ArpEventsReply struct { - Retval int32 -} - -func (*WantIP4ArpEventsReply) GetMessageName() string { - return "want_ip4_arp_events_reply" -} -func (*WantIP4ArpEventsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*WantIP4ArpEventsReply) GetCrcString() string { - return "e8d4e804" -} -func NewWantIP4ArpEventsReply() api.Message { - return &WantIP4ArpEventsReply{} -} - -// IP4ArpEvent represents the VPP binary API message 'ip4_arp_event'. -// Generated from '../../bin_api/ip.api.json', line 1791: -// -// "ip4_arp_event", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "address" -// ], -// [ -// "u32", -// "pid" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "new_mac", -// 6 -// ], -// [ -// "u8", -// "mac_ip" -// ], -// { -// "crc": "0xef7235f7" -// } -// -type IP4ArpEvent struct { - Address uint32 - Pid uint32 - SwIfIndex uint32 - NewMac []byte `struc:"[6]byte"` - MacIP uint8 -} - -func (*IP4ArpEvent) GetMessageName() string { - return "ip4_arp_event" -} -func (*IP4ArpEvent) GetMessageType() api.MessageType { - return api.EventMessage -} -func (*IP4ArpEvent) GetCrcString() string { - return "ef7235f7" -} -func NewIP4ArpEvent() api.Message { - return &IP4ArpEvent{} -} - -// WantIP6NdEvents represents the VPP binary API message 'want_ip6_nd_events'. -// Generated from '../../bin_api/ip.api.json', line 1826: -// -// "want_ip6_nd_events", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "enable_disable" -// ], -// [ -// "u32", -// "pid" -// ], -// [ -// "u8", -// "address", -// 16 -// ], -// { -// "crc": "0x1cf65fbb" -// } -// -type WantIP6NdEvents struct { - EnableDisable uint8 - Pid uint32 - Address []byte `struc:"[16]byte"` -} - -func (*WantIP6NdEvents) GetMessageName() string { - return "want_ip6_nd_events" -} -func (*WantIP6NdEvents) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*WantIP6NdEvents) GetCrcString() string { - return "1cf65fbb" -} -func NewWantIP6NdEvents() api.Message { - return &WantIP6NdEvents{} -} - -// WantIP6NdEventsReply represents the VPP binary API message 'want_ip6_nd_events_reply'. -// Generated from '../../bin_api/ip.api.json', line 1857: -// -// "want_ip6_nd_events_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type WantIP6NdEventsReply struct { - Retval int32 -} - -func (*WantIP6NdEventsReply) GetMessageName() string { - return "want_ip6_nd_events_reply" -} -func (*WantIP6NdEventsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*WantIP6NdEventsReply) GetCrcString() string { - return "e8d4e804" -} -func NewWantIP6NdEventsReply() api.Message { - return &WantIP6NdEventsReply{} -} - -// IP6NdEvent represents the VPP binary API message 'ip6_nd_event'. -// Generated from '../../bin_api/ip.api.json', line 1875: -// -// "ip6_nd_event", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "pid" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "address", -// 16 -// ], -// [ -// "u8", -// "new_mac", -// 6 -// ], -// [ -// "u8", -// "mac_ip" -// ], -// { -// "crc": "0x96ab2fdd" -// } -// -type IP6NdEvent struct { - Pid uint32 - SwIfIndex uint32 - Address []byte `struc:"[16]byte"` - NewMac []byte `struc:"[6]byte"` - MacIP uint8 -} - -func (*IP6NdEvent) GetMessageName() string { - return "ip6_nd_event" -} -func (*IP6NdEvent) GetMessageType() api.MessageType { - return api.EventMessage -} -func (*IP6NdEvent) GetCrcString() string { - return "96ab2fdd" -} -func NewIP6NdEvent() api.Message { - return &IP6NdEvent{} -} - -// ProxyArpAddDel represents the VPP binary API message 'proxy_arp_add_del'. -// Generated from '../../bin_api/ip.api.json', line 1911: -// -// "proxy_arp_add_del", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "vrf_id" -// ], -// [ -// "u8", -// "is_add" -// ], -// [ -// "u8", -// "low_address", -// 4 -// ], -// [ -// "u8", -// "hi_address", -// 4 -// ], -// { -// "crc": "0xc2442918" -// } -// -type ProxyArpAddDel struct { - VrfID uint32 - IsAdd uint8 - LowAddress []byte `struc:"[4]byte"` - HiAddress []byte `struc:"[4]byte"` -} - -func (*ProxyArpAddDel) GetMessageName() string { - return "proxy_arp_add_del" -} -func (*ProxyArpAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*ProxyArpAddDel) GetCrcString() string { - return "c2442918" -} -func NewProxyArpAddDel() api.Message { - return &ProxyArpAddDel{} -} - -// ProxyArpAddDelReply represents the VPP binary API message 'proxy_arp_add_del_reply'. -// Generated from '../../bin_api/ip.api.json', line 1947: -// -// "proxy_arp_add_del_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type ProxyArpAddDelReply struct { - Retval int32 -} - -func (*ProxyArpAddDelReply) GetMessageName() string { - return "proxy_arp_add_del_reply" -} -func (*ProxyArpAddDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*ProxyArpAddDelReply) GetCrcString() string { - return "e8d4e804" -} -func NewProxyArpAddDelReply() api.Message { - return &ProxyArpAddDelReply{} -} - -// ProxyArpIntfcEnableDisable represents the VPP binary API message 'proxy_arp_intfc_enable_disable'. -// Generated from '../../bin_api/ip.api.json', line 1965: -// -// "proxy_arp_intfc_enable_disable", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "enable_disable" -// ], -// { -// "crc": "0x69d24598" -// } -// -type ProxyArpIntfcEnableDisable struct { - SwIfIndex uint32 - EnableDisable uint8 -} - -func (*ProxyArpIntfcEnableDisable) GetMessageName() string { - return "proxy_arp_intfc_enable_disable" -} -func (*ProxyArpIntfcEnableDisable) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*ProxyArpIntfcEnableDisable) GetCrcString() string { - return "69d24598" -} -func NewProxyArpIntfcEnableDisable() api.Message { - return &ProxyArpIntfcEnableDisable{} -} - -// ProxyArpIntfcEnableDisableReply represents the VPP binary API message 'proxy_arp_intfc_enable_disable_reply'. -// Generated from '../../bin_api/ip.api.json', line 1991: -// -// "proxy_arp_intfc_enable_disable_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type ProxyArpIntfcEnableDisableReply struct { - Retval int32 -} - -func (*ProxyArpIntfcEnableDisableReply) GetMessageName() string { - return "proxy_arp_intfc_enable_disable_reply" -} -func (*ProxyArpIntfcEnableDisableReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*ProxyArpIntfcEnableDisableReply) GetCrcString() string { - return "e8d4e804" -} -func NewProxyArpIntfcEnableDisableReply() api.Message { - return &ProxyArpIntfcEnableDisableReply{} -} - -// ResetFib represents the VPP binary API message 'reset_fib'. -// Generated from '../../bin_api/ip.api.json', line 2009: -// -// "reset_fib", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "vrf_id" -// ], -// [ -// "u8", -// "is_ipv6" -// ], -// { -// "crc": "0x8553ebd9" -// } -// -type ResetFib struct { - VrfID uint32 - IsIpv6 uint8 -} - -func (*ResetFib) GetMessageName() string { - return "reset_fib" -} -func (*ResetFib) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*ResetFib) GetCrcString() string { - return "8553ebd9" -} -func NewResetFib() api.Message { - return &ResetFib{} -} - -// ResetFibReply represents the VPP binary API message 'reset_fib_reply'. -// Generated from '../../bin_api/ip.api.json', line 2035: -// -// "reset_fib_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type ResetFibReply struct { - Retval int32 -} - -func (*ResetFibReply) GetMessageName() string { - return "reset_fib_reply" -} -func (*ResetFibReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*ResetFibReply) GetCrcString() string { - return "e8d4e804" -} -func NewResetFibReply() api.Message { - return &ResetFibReply{} -} - -// SetArpNeighborLimit represents the VPP binary API message 'set_arp_neighbor_limit'. -// Generated from '../../bin_api/ip.api.json', line 2053: -// -// "set_arp_neighbor_limit", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "is_ipv6" -// ], -// [ -// "u32", -// "arp_neighbor_limit" -// ], -// { -// "crc": "0x97d01fd6" -// } -// -type SetArpNeighborLimit struct { - IsIpv6 uint8 - ArpNeighborLimit uint32 -} - -func (*SetArpNeighborLimit) GetMessageName() string { - return "set_arp_neighbor_limit" -} -func (*SetArpNeighborLimit) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*SetArpNeighborLimit) GetCrcString() string { - return "97d01fd6" -} -func NewSetArpNeighborLimit() api.Message { - return &SetArpNeighborLimit{} -} - -// SetArpNeighborLimitReply represents the VPP binary API message 'set_arp_neighbor_limit_reply'. -// Generated from '../../bin_api/ip.api.json', line 2079: -// -// "set_arp_neighbor_limit_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type SetArpNeighborLimitReply struct { - Retval int32 -} - -func (*SetArpNeighborLimitReply) GetMessageName() string { - return "set_arp_neighbor_limit_reply" -} -func (*SetArpNeighborLimitReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*SetArpNeighborLimitReply) GetCrcString() string { - return "e8d4e804" -} -func NewSetArpNeighborLimitReply() api.Message { - return &SetArpNeighborLimitReply{} -} - -// IoamEnable represents the VPP binary API message 'ioam_enable'. -// Generated from '../../bin_api/ip.api.json', line 2097: -// -// "ioam_enable", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u16", -// "id" -// ], -// [ -// "u8", -// "seqno" -// ], -// [ -// "u8", -// "analyse" -// ], -// [ -// "u8", -// "pot_enable" -// ], -// [ -// "u8", -// "trace_enable" -// ], -// [ -// "u32", -// "node_id" -// ], -// { -// "crc": "0x9392e032" -// } -// -type IoamEnable struct { - ID uint16 - Seqno uint8 - Analyse uint8 - PotEnable uint8 - TraceEnable uint8 - NodeID uint32 -} - -func (*IoamEnable) GetMessageName() string { - return "ioam_enable" -} -func (*IoamEnable) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IoamEnable) GetCrcString() string { - return "9392e032" -} -func NewIoamEnable() api.Message { - return &IoamEnable{} -} - -// IoamEnableReply represents the VPP binary API message 'ioam_enable_reply'. -// Generated from '../../bin_api/ip.api.json', line 2139: -// -// "ioam_enable_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type IoamEnableReply struct { - Retval int32 -} - -func (*IoamEnableReply) GetMessageName() string { - return "ioam_enable_reply" -} -func (*IoamEnableReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*IoamEnableReply) GetCrcString() string { - return "e8d4e804" -} -func NewIoamEnableReply() api.Message { - return &IoamEnableReply{} -} - -// IoamDisable represents the VPP binary API message 'ioam_disable'. -// Generated from '../../bin_api/ip.api.json', line 2157: -// -// "ioam_disable", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u16", -// "id" -// ], -// { -// "crc": "0x6b16a45e" -// } -// -type IoamDisable struct { - ID uint16 -} - -func (*IoamDisable) GetMessageName() string { - return "ioam_disable" -} -func (*IoamDisable) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*IoamDisable) GetCrcString() string { - return "6b16a45e" -} -func NewIoamDisable() api.Message { - return &IoamDisable{} -} - -// IoamDisableReply represents the VPP binary API message 'ioam_disable_reply'. -// Generated from '../../bin_api/ip.api.json', line 2179: -// -// "ioam_disable_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type IoamDisableReply struct { - Retval int32 -} - -func (*IoamDisableReply) GetMessageName() string { - return "ioam_disable_reply" -} -func (*IoamDisableReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*IoamDisableReply) GetCrcString() string { - return "e8d4e804" -} -func NewIoamDisableReply() api.Message { - return &IoamDisableReply{} -} diff --git a/examples/bin_api/memif.api.json b/examples/bin_api/memif.api.json index dea1924..b0ff645 100644 --- a/examples/bin_api/memif.api.json +++ b/examples/bin_api/memif.api.json @@ -1,25 +1,54 @@ { - "services": [ - { - "memif_dump": { - "reply": "memif_details", - "stream": true - } - }, - { - "memif_create": { - "reply": "memif_create_reply" + "messages": [ + [ + "memif_socket_filename_add_del", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "u8", + "is_add" + ], + [ + "u32", + "socket_id" + ], + [ + "u8", + "socket_filename", + 128 + ], + { + "crc": "0x30e3929d" } - }, - { - "memif_delete": { - "reply": "memif_delete_reply" + ], + [ + "memif_socket_filename_add_del_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" } - } - ], - "vl_api_version": "0x824c4ae0", - "enums": [], - "messages": [ + ], [ "memif_create", [ @@ -55,9 +84,8 @@ "id" ], [ - "u8", - "socket_filename", - 128 + "u32", + "socket_id" ], [ "u8", @@ -78,7 +106,7 @@ 6 ], { - "crc": "0x3551c914" + "crc": "0x6597cdb2" } ], [ @@ -143,6 +171,47 @@ "crc": "0xe8d4e804" } ], + [ + "memif_socket_filename_details", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "u32", + "socket_id" + ], + [ + "u8", + "socket_filename", + 128 + ], + { + "crc": "0xe347e32f" + } + ], + [ + "memif_socket_filename_dump", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + { + "crc": "0x51077d14" + } + ], [ "memif_details", [ @@ -180,9 +249,8 @@ "mode" ], [ - "u8", - "socket_filename", - 128 + "u32", + "socket_id" ], [ "u32", @@ -201,7 +269,7 @@ "link_up_down" ], { - "crc": "0x0e1da928" + "crc": "0x4f5a3397" } ], [ @@ -223,5 +291,27 @@ } ] ], + "vl_api_version": "0x31b42e17", + "unions": [], + "services": { + "memif_delete": { + "reply": "memif_delete_reply" + }, + "memif_socket_filename_add_del": { + "reply": "memif_socket_filename_add_del_reply" + }, + "memif_create": { + "reply": "memif_create_reply" + }, + "memif_socket_filename_dump": { + "reply": "memif_socket_filename_details", + "stream": true + }, + "memif_dump": { + "reply": "memif_details", + "stream": true + } + }, + "enums": [], "types": [] } diff --git a/examples/bin_api/memif/memif.ba.go b/examples/bin_api/memif/memif.ba.go new file mode 100644 index 0000000..3650355 --- /dev/null +++ b/examples/bin_api/memif/memif.ba.go @@ -0,0 +1,546 @@ +// Code generated by GoVPP binapi-generator. DO NOT EDIT. +// source: memif.api.json + +/* +Package memif is a generated VPP binary API of the 'memif' VPP module. + +It is generated from this file: + memif.api.json + +It contains these VPP binary API objects: + 10 messages + 5 services +*/ +package memif + +import "git.fd.io/govpp.git/api" +import "github.com/lunixbochs/struc" +import "bytes" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = struc.Pack +var _ = bytes.NewBuffer + +/* Messages */ + +// MemifSocketFilenameAddDel represents the VPP binary API message 'memif_socket_filename_add_del'. +// Generated from 'memif.api.json', line 4: +// +// "memif_socket_filename_add_del", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "is_add" +// ], +// [ +// "u32", +// "socket_id" +// ], +// [ +// "u8", +// "socket_filename", +// 128 +// ], +// { +// "crc": "0x30e3929d" +// } +// +type MemifSocketFilenameAddDel struct { + IsAdd uint8 + SocketID uint32 + SocketFilename []byte `struc:"[128]byte"` +} + +func (*MemifSocketFilenameAddDel) GetMessageName() string { + return "memif_socket_filename_add_del" +} +func (*MemifSocketFilenameAddDel) GetCrcString() string { + return "30e3929d" +} +func (*MemifSocketFilenameAddDel) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewMemifSocketFilenameAddDel() api.Message { + return &MemifSocketFilenameAddDel{} +} + +// MemifSocketFilenameAddDelReply represents the VPP binary API message 'memif_socket_filename_add_del_reply'. +// Generated from 'memif.api.json', line 35: +// +// "memif_socket_filename_add_del_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type MemifSocketFilenameAddDelReply struct { + Retval int32 +} + +func (*MemifSocketFilenameAddDelReply) GetMessageName() string { + return "memif_socket_filename_add_del_reply" +} +func (*MemifSocketFilenameAddDelReply) GetCrcString() string { + return "e8d4e804" +} +func (*MemifSocketFilenameAddDelReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewMemifSocketFilenameAddDelReply() api.Message { + return &MemifSocketFilenameAddDelReply{} +} + +// MemifCreate represents the VPP binary API message 'memif_create'. +// Generated from 'memif.api.json', line 53: +// +// "memif_create", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "role" +// ], +// [ +// "u8", +// "mode" +// ], +// [ +// "u8", +// "rx_queues" +// ], +// [ +// "u8", +// "tx_queues" +// ], +// [ +// "u32", +// "id" +// ], +// [ +// "u32", +// "socket_id" +// ], +// [ +// "u8", +// "secret", +// 24 +// ], +// [ +// "u32", +// "ring_size" +// ], +// [ +// "u16", +// "buffer_size" +// ], +// [ +// "u8", +// "hw_addr", +// 6 +// ], +// { +// "crc": "0x6597cdb2" +// } +// +type MemifCreate struct { + Role uint8 + Mode uint8 + RxQueues uint8 + TxQueues uint8 + ID uint32 + SocketID uint32 + Secret []byte `struc:"[24]byte"` + RingSize uint32 + BufferSize uint16 + HwAddr []byte `struc:"[6]byte"` +} + +func (*MemifCreate) GetMessageName() string { + return "memif_create" +} +func (*MemifCreate) GetCrcString() string { + return "6597cdb2" +} +func (*MemifCreate) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewMemifCreate() api.Message { + return &MemifCreate{} +} + +// MemifCreateReply represents the VPP binary API message 'memif_create_reply'. +// Generated from 'memif.api.json', line 113: +// +// "memif_create_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0xfda5941f" +// } +// +type MemifCreateReply struct { + Retval int32 + SwIfIndex uint32 +} + +func (*MemifCreateReply) GetMessageName() string { + return "memif_create_reply" +} +func (*MemifCreateReply) GetCrcString() string { + return "fda5941f" +} +func (*MemifCreateReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewMemifCreateReply() api.Message { + return &MemifCreateReply{} +} + +// MemifDelete represents the VPP binary API message 'memif_delete'. +// Generated from 'memif.api.json', line 135: +// +// "memif_delete", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0x529cb13f" +// } +// +type MemifDelete struct { + SwIfIndex uint32 +} + +func (*MemifDelete) GetMessageName() string { + return "memif_delete" +} +func (*MemifDelete) GetCrcString() string { + return "529cb13f" +} +func (*MemifDelete) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewMemifDelete() api.Message { + return &MemifDelete{} +} + +// MemifDeleteReply represents the VPP binary API message 'memif_delete_reply'. +// Generated from 'memif.api.json', line 157: +// +// "memif_delete_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type MemifDeleteReply struct { + Retval int32 +} + +func (*MemifDeleteReply) GetMessageName() string { + return "memif_delete_reply" +} +func (*MemifDeleteReply) GetCrcString() string { + return "e8d4e804" +} +func (*MemifDeleteReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewMemifDeleteReply() api.Message { + return &MemifDeleteReply{} +} + +// MemifSocketFilenameDetails represents the VPP binary API message 'memif_socket_filename_details'. +// Generated from 'memif.api.json', line 175: +// +// "memif_socket_filename_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "socket_id" +// ], +// [ +// "u8", +// "socket_filename", +// 128 +// ], +// { +// "crc": "0xe347e32f" +// } +// +type MemifSocketFilenameDetails struct { + SocketID uint32 + SocketFilename []byte `struc:"[128]byte"` +} + +func (*MemifSocketFilenameDetails) GetMessageName() string { + return "memif_socket_filename_details" +} +func (*MemifSocketFilenameDetails) GetCrcString() string { + return "e347e32f" +} +func (*MemifSocketFilenameDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewMemifSocketFilenameDetails() api.Message { + return &MemifSocketFilenameDetails{} +} + +// MemifSocketFilenameDump represents the VPP binary API message 'memif_socket_filename_dump'. +// Generated from 'memif.api.json', line 198: +// +// "memif_socket_filename_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// { +// "crc": "0x51077d14" +// } +// +type MemifSocketFilenameDump struct{} + +func (*MemifSocketFilenameDump) GetMessageName() string { + return "memif_socket_filename_dump" +} +func (*MemifSocketFilenameDump) GetCrcString() string { + return "51077d14" +} +func (*MemifSocketFilenameDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewMemifSocketFilenameDump() api.Message { + return &MemifSocketFilenameDump{} +} + +// MemifDetails represents the VPP binary API message 'memif_details'. +// Generated from 'memif.api.json', line 216: +// +// "memif_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "if_name", +// 64 +// ], +// [ +// "u8", +// "hw_addr", +// 6 +// ], +// [ +// "u32", +// "id" +// ], +// [ +// "u8", +// "role" +// ], +// [ +// "u8", +// "mode" +// ], +// [ +// "u32", +// "socket_id" +// ], +// [ +// "u32", +// "ring_size" +// ], +// [ +// "u16", +// "buffer_size" +// ], +// [ +// "u8", +// "admin_up_down" +// ], +// [ +// "u8", +// "link_up_down" +// ], +// { +// "crc": "0x4f5a3397" +// } +// +type MemifDetails struct { + SwIfIndex uint32 + IfName []byte `struc:"[64]byte"` + HwAddr []byte `struc:"[6]byte"` + ID uint32 + Role uint8 + Mode uint8 + SocketID uint32 + RingSize uint32 + BufferSize uint16 + AdminUpDown uint8 + LinkUpDown uint8 +} + +func (*MemifDetails) GetMessageName() string { + return "memif_details" +} +func (*MemifDetails) GetCrcString() string { + return "4f5a3397" +} +func (*MemifDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewMemifDetails() api.Message { + return &MemifDetails{} +} + +// MemifDump represents the VPP binary API message 'memif_dump'. +// Generated from 'memif.api.json', line 276: +// +// "memif_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// { +// "crc": "0x51077d14" +// } +// +type MemifDump struct{} + +func (*MemifDump) GetMessageName() string { + return "memif_dump" +} +func (*MemifDump) GetCrcString() string { + return "51077d14" +} +func (*MemifDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewMemifDump() api.Message { + return &MemifDump{} +} + +/* Services */ + +type Services interface { + DumpMemif(*MemifDump) (*MemifDetails, error) + DumpMemifSocketFilename(*MemifSocketFilenameDump) (*MemifSocketFilenameDetails, error) + MemifCreate(*MemifCreate) (*MemifCreateReply, error) + MemifDelete(*MemifDelete) (*MemifDeleteReply, error) + MemifSocketFilenameAddDel(*MemifSocketFilenameAddDel) (*MemifSocketFilenameAddDelReply, error) +} + +func init() { + api.RegisterMessage((*MemifSocketFilenameAddDel)(nil), "memif.MemifSocketFilenameAddDel") + api.RegisterMessage((*MemifSocketFilenameAddDelReply)(nil), "memif.MemifSocketFilenameAddDelReply") + api.RegisterMessage((*MemifCreate)(nil), "memif.MemifCreate") + api.RegisterMessage((*MemifCreateReply)(nil), "memif.MemifCreateReply") + api.RegisterMessage((*MemifDelete)(nil), "memif.MemifDelete") + api.RegisterMessage((*MemifDeleteReply)(nil), "memif.MemifDeleteReply") + api.RegisterMessage((*MemifSocketFilenameDetails)(nil), "memif.MemifSocketFilenameDetails") + api.RegisterMessage((*MemifSocketFilenameDump)(nil), "memif.MemifSocketFilenameDump") + api.RegisterMessage((*MemifDetails)(nil), "memif.MemifDetails") + api.RegisterMessage((*MemifDump)(nil), "memif.MemifDump") +} diff --git a/examples/bin_api/memif/memif.go b/examples/bin_api/memif/memif.go deleted file mode 100644 index 3f6ad02..0000000 --- a/examples/bin_api/memif/memif.go +++ /dev/null @@ -1,344 +0,0 @@ -// Code generated by govpp binapi-generator DO NOT EDIT. -// Package memif represents the VPP binary API of the 'memif' VPP module. -// Generated from '../../bin_api/memif.api.json' -package memif - -import "git.fd.io/govpp.git/api" - -// VlApiVersion contains version of the API. -const VlAPIVersion = 0x824c4ae0 - -// MemifCreate represents the VPP binary API message 'memif_create'. -// Generated from '../../bin_api/memif.api.json', line 24: -// -// "memif_create", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "role" -// ], -// [ -// "u8", -// "mode" -// ], -// [ -// "u8", -// "rx_queues" -// ], -// [ -// "u8", -// "tx_queues" -// ], -// [ -// "u32", -// "id" -// ], -// [ -// "u8", -// "socket_filename", -// 128 -// ], -// [ -// "u8", -// "secret", -// 24 -// ], -// [ -// "u32", -// "ring_size" -// ], -// [ -// "u16", -// "buffer_size" -// ], -// [ -// "u8", -// "hw_addr", -// 6 -// ], -// { -// "crc": "0x3551c914" -// } -// -type MemifCreate struct { - Role uint8 - Mode uint8 - RxQueues uint8 - TxQueues uint8 - ID uint32 - SocketFilename []byte `struc:"[128]byte"` - Secret []byte `struc:"[24]byte"` - RingSize uint32 - BufferSize uint16 - HwAddr []byte `struc:"[6]byte"` -} - -func (*MemifCreate) GetMessageName() string { - return "memif_create" -} -func (*MemifCreate) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*MemifCreate) GetCrcString() string { - return "3551c914" -} -func NewMemifCreate() api.Message { - return &MemifCreate{} -} - -// MemifCreateReply represents the VPP binary API message 'memif_create_reply'. -// Generated from '../../bin_api/memif.api.json', line 85: -// -// "memif_create_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// { -// "crc": "0xfda5941f" -// } -// -type MemifCreateReply struct { - Retval int32 - SwIfIndex uint32 -} - -func (*MemifCreateReply) GetMessageName() string { - return "memif_create_reply" -} -func (*MemifCreateReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*MemifCreateReply) GetCrcString() string { - return "fda5941f" -} -func NewMemifCreateReply() api.Message { - return &MemifCreateReply{} -} - -// MemifDelete represents the VPP binary API message 'memif_delete'. -// Generated from '../../bin_api/memif.api.json', line 107: -// -// "memif_delete", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// { -// "crc": "0x529cb13f" -// } -// -type MemifDelete struct { - SwIfIndex uint32 -} - -func (*MemifDelete) GetMessageName() string { - return "memif_delete" -} -func (*MemifDelete) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*MemifDelete) GetCrcString() string { - return "529cb13f" -} -func NewMemifDelete() api.Message { - return &MemifDelete{} -} - -// MemifDeleteReply represents the VPP binary API message 'memif_delete_reply'. -// Generated from '../../bin_api/memif.api.json', line 129: -// -// "memif_delete_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type MemifDeleteReply struct { - Retval int32 -} - -func (*MemifDeleteReply) GetMessageName() string { - return "memif_delete_reply" -} -func (*MemifDeleteReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*MemifDeleteReply) GetCrcString() string { - return "e8d4e804" -} -func NewMemifDeleteReply() api.Message { - return &MemifDeleteReply{} -} - -// MemifDetails represents the VPP binary API message 'memif_details'. -// Generated from '../../bin_api/memif.api.json', line 147: -// -// "memif_details", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "if_name", -// 64 -// ], -// [ -// "u8", -// "hw_addr", -// 6 -// ], -// [ -// "u32", -// "id" -// ], -// [ -// "u8", -// "role" -// ], -// [ -// "u8", -// "mode" -// ], -// [ -// "u8", -// "socket_filename", -// 128 -// ], -// [ -// "u32", -// "ring_size" -// ], -// [ -// "u16", -// "buffer_size" -// ], -// [ -// "u8", -// "admin_up_down" -// ], -// [ -// "u8", -// "link_up_down" -// ], -// { -// "crc": "0x0e1da928" -// } -// -type MemifDetails struct { - SwIfIndex uint32 - IfName []byte `struc:"[64]byte"` - HwAddr []byte `struc:"[6]byte"` - ID uint32 - Role uint8 - Mode uint8 - SocketFilename []byte `struc:"[128]byte"` - RingSize uint32 - BufferSize uint16 - AdminUpDown uint8 - LinkUpDown uint8 -} - -func (*MemifDetails) GetMessageName() string { - return "memif_details" -} -func (*MemifDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*MemifDetails) GetCrcString() string { - return "0e1da928" -} -func NewMemifDetails() api.Message { - return &MemifDetails{} -} - -// MemifDump represents the VPP binary API message 'memif_dump'. -// Generated from '../../bin_api/memif.api.json', line 208: -// -// "memif_dump", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// { -// "crc": "0x51077d14" -// } -// -type MemifDump struct { -} - -func (*MemifDump) GetMessageName() string { - return "memif_dump" -} -func (*MemifDump) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*MemifDump) GetCrcString() string { - return "51077d14" -} -func NewMemifDump() api.Message { - return &MemifDump{} -} diff --git a/examples/bin_api/stats.api.json b/examples/bin_api/stats.api.json index 3275811..9ac3640 100644 --- a/examples/bin_api/stats.api.json +++ b/examples/bin_api/stats.api.json @@ -1,68 +1,4 @@ { - "services": [ - { - "want_ip4_fib_stats": { - "reply": "want_ip4_fib_stats_reply" - } - }, - { - "want_ip4_mfib_stats": { - "reply": "want_ip4_mfib_stats_reply" - } - }, - { - "want_interface_combined_stats": { - "reply": "want_interface_combined_stats_reply" - } - }, - { - "want_ip6_fib_stats": { - "reply": "want_ip6_fib_stats_reply" - } - }, - { - "want_stats": { - "reply": "want_stats_reply" - } - }, - { - "want_per_interface_simple_stats": { - "reply": "want_per_interface_simple_stats_reply" - } - }, - { - "want_per_interface_combined_stats": { - "reply": "want_per_interface_combined_stats_reply" - } - }, - { - "vnet_get_summary_stats": { - "reply": "vnet_get_summary_stats_reply" - } - }, - { - "want_ip6_mfib_stats": { - "reply": "want_ip6_mfib_stats_reply" - } - }, - { - "want_interface_simple_stats": { - "reply": "want_interface_simple_stats_reply" - } - }, - { - "want_ip4_nbr_stats": { - "reply": "want_ip4_nbr_stats_reply" - } - }, - { - "want_ip6_nbr_stats": { - "reply": "want_ip6_nbr_stats_reply" - } - } - ], - "vl_api_version": "0x50890812", - "enums": [], "messages": [ [ "want_stats", @@ -720,6 +656,110 @@ "crc": "0x650161c0" } ], + [ + "vnet_interface_simple_counters", + [ + "u16", + "_vl_msg_id" + ], + [ + "u8", + "vnet_counter_type" + ], + [ + "u32", + "first_sw_if_index" + ], + [ + "u32", + "count" + ], + [ + "u64", + "data", + 0, + "count" + ], + { + "crc": "0x9bc4a808" + } + ], + [ + "vnet_interface_combined_counters", + [ + "u16", + "_vl_msg_id" + ], + [ + "u8", + "vnet_counter_type" + ], + [ + "u32", + "first_sw_if_index" + ], + [ + "u32", + "count" + ], + [ + "vl_api_vlib_counter_t", + "data", + 0, + "count" + ], + { + "crc": "0x2c595002" + } + ], + [ + "vnet_per_interface_simple_counters", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "count" + ], + [ + "u32", + "timestamp" + ], + [ + "vl_api_vnet_simple_counter_t", + "data", + 0, + "count" + ], + { + "crc": "0xd1fba9ba" + } + ], + [ + "vnet_per_interface_combined_counters", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "count" + ], + [ + "u32", + "timestamp" + ], + [ + "vl_api_vnet_combined_counter_t", + "data", + 0, + "count" + ], + { + "crc": "0xdc578375" + } + ], [ "vnet_get_summary_stats", [ @@ -769,9 +809,331 @@ { "crc": "0x32b87c56" } + ], + [ + "stats_get_poller_delay", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + { + "crc": "0x51077d14" + } + ], + [ + "stats_get_poller_delay_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + [ + "u32", + "delay" + ], + { + "crc": "0x8c445a33" + } + ], + [ + "want_udp_encap_stats", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "client_index" + ], + [ + "u32", + "context" + ], + [ + "u32", + "enable" + ], + [ + "u32", + "pid" + ], + { + "crc": "0xcfaccc1f" + } + ], + [ + "want_udp_encap_stats_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ], + [ + "vnet_udp_encap_counters", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "timestamp" + ], + [ + "u32", + "count" + ], + [ + "vl_api_udp_encap_counter_t", + "c", + 0, + "count" + ], + { + "crc": "0x1ab5e649" + } ] ], + "vl_api_version": "0xfc484aa", + "unions": [], + "services": { + "want_ip4_fib_stats": { + "reply": "want_ip4_fib_stats_reply", + "events": [ + "vnet_ip4_fib_counters" + ] + }, + "want_ip6_fib_stats": { + "reply": "want_ip6_fib_stats_reply", + "events": [ + "vnet_ip6_fib_counters" + ] + }, + "want_stats": { + "reply": "want_stats_reply" + }, + "want_interface_simple_stats": { + "reply": "want_interface_simple_stats_reply", + "events": [ + "vnet_interface_simple_counters" + ] + }, + "stats_get_poller_delay": { + "reply": "stats_get_poller_delay_reply" + }, + "want_per_interface_combined_stats": { + "reply": "want_per_interface_combined_stats_reply", + "events": [ + "vnet_per_interface_combined_counters" + ] + }, + "vnet_get_summary_stats": { + "reply": "vnet_get_summary_stats_reply" + }, + "want_udp_encap_stats": { + "reply": "want_udp_encap_stats_reply", + "events": [ + "vnet_udp_encap_counters" + ] + }, + "want_ip6_nbr_stats": { + "reply": "want_ip6_nbr_stats_reply", + "events": [ + "vnet_ip6_nbr_counters" + ] + }, + "want_ip4_mfib_stats": { + "reply": "want_ip4_mfib_stats_reply", + "events": [ + "vnet_ip4_mfib_counters" + ] + }, + "want_ip6_mfib_stats": { + "reply": "want_ip6_mfib_stats_reply", + "events": [ + "vnet_ip6_mfib_counters" + ] + }, + "want_per_interface_simple_stats": { + "reply": "want_per_interface_simple_stats_reply", + "events": [ + "vnet_per_interface_simple_counters" + ] + }, + "want_interface_combined_stats": { + "reply": "want_interface_combined_stats_reply", + "events": [ + "vnet_interface_combined_counters" + ] + }, + "want_ip4_nbr_stats": { + "reply": "want_ip4_nbr_stats_reply", + "events": [ + "vnet_ip4_nbr_counters" + ] + } + }, + "enums": [], "types": [ + [ + "vlib_counter", + [ + "u64", + "packets" + ], + [ + "u64", + "bytes" + ], + { + "crc": "0xce2325a2" + } + ], + [ + "vnet_combined_counter", + [ + "u32", + "sw_if_index" + ], + [ + "u64", + "rx_packets" + ], + [ + "u64", + "rx_bytes" + ], + [ + "u64", + "rx_unicast_packets" + ], + [ + "u64", + "rx_unicast_bytes" + ], + [ + "u64", + "rx_multicast_packets" + ], + [ + "u64", + "rx_multicast_bytes" + ], + [ + "u64", + "rx_broadcast_packets" + ], + [ + "u64", + "rx_broadcast_bytes" + ], + [ + "u64", + "tx_packets" + ], + [ + "u64", + "tx_bytes" + ], + [ + "u64", + "tx_unicast_packets" + ], + [ + "u64", + "tx_unicast_bytes" + ], + [ + "u64", + "tx_multicast_packets" + ], + [ + "u64", + "tx_multicast_bytes" + ], + [ + "u64", + "tx_broadcast_packets" + ], + [ + "u64", + "tx_broadcast_bytes" + ], + { + "crc": "0x20905ca4" + } + ], + [ + "vnet_simple_counter", + [ + "u32", + "sw_if_index" + ], + [ + "u64", + "drop" + ], + [ + "u64", + "punt" + ], + [ + "u64", + "rx_ip4" + ], + [ + "u64", + "rx_ip6" + ], + [ + "u64", + "rx_no_buffer" + ], + [ + "u64", + "rx_miss" + ], + [ + "u64", + "rx_error" + ], + [ + "u64", + "tx_error" + ], + [ + "u64", + "rx_mpls" + ], + { + "crc": "0x8bd65e2d" + } + ], [ "ip4_fib_counter", [ @@ -917,6 +1279,24 @@ { "crc": "0x2d755474" } + ], + [ + "udp_encap_counter", + [ + "u32", + "id" + ], + [ + "u64", + "packets" + ], + [ + "u64", + "bytes" + ], + { + "crc": "0x7107035f" + } ] ] } diff --git a/examples/bin_api/stats/stats.ba.go b/examples/bin_api/stats/stats.ba.go new file mode 100644 index 0000000..eb2dd8f --- /dev/null +++ b/examples/bin_api/stats/stats.ba.go @@ -0,0 +1,2265 @@ +// Code generated by GoVPP binapi-generator. DO NOT EDIT. +// source: stats.api.json + +/* +Package stats is a generated VPP binary API of the 'stats' VPP module. + +It is generated from this file: + stats.api.json + +It contains these VPP binary API objects: + 39 messages + 10 types + 14 services +*/ +package stats + +import "git.fd.io/govpp.git/api" +import "github.com/lunixbochs/struc" +import "bytes" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = struc.Pack +var _ = bytes.NewBuffer + +/* Types */ + +// VlibCounter represents the VPP binary API type 'vlib_counter'. +// Generated from 'stats.api.json', line 1004: +// +// "vlib_counter", +// [ +// "u64", +// "packets" +// ], +// [ +// "u64", +// "bytes" +// ], +// { +// "crc": "0xce2325a2" +// } +// +type VlibCounter struct { + Packets uint64 + Bytes uint64 +} + +func (*VlibCounter) GetTypeName() string { + return "vlib_counter" +} +func (*VlibCounter) GetCrcString() string { + return "ce2325a2" +} + +// VnetCombinedCounter represents the VPP binary API type 'vnet_combined_counter'. +// Generated from 'stats.api.json', line 1018: +// +// "vnet_combined_counter", +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u64", +// "rx_packets" +// ], +// [ +// "u64", +// "rx_bytes" +// ], +// [ +// "u64", +// "rx_unicast_packets" +// ], +// [ +// "u64", +// "rx_unicast_bytes" +// ], +// [ +// "u64", +// "rx_multicast_packets" +// ], +// [ +// "u64", +// "rx_multicast_bytes" +// ], +// [ +// "u64", +// "rx_broadcast_packets" +// ], +// [ +// "u64", +// "rx_broadcast_bytes" +// ], +// [ +// "u64", +// "tx_packets" +// ], +// [ +// "u64", +// "tx_bytes" +// ], +// [ +// "u64", +// "tx_unicast_packets" +// ], +// [ +// "u64", +// "tx_unicast_bytes" +// ], +// [ +// "u64", +// "tx_multicast_packets" +// ], +// [ +// "u64", +// "tx_multicast_bytes" +// ], +// [ +// "u64", +// "tx_broadcast_packets" +// ], +// [ +// "u64", +// "tx_broadcast_bytes" +// ], +// { +// "crc": "0x20905ca4" +// } +// +type VnetCombinedCounter struct { + SwIfIndex uint32 + RxPackets uint64 + RxBytes uint64 + RxUnicastPackets uint64 + RxUnicastBytes uint64 + RxMulticastPackets uint64 + RxMulticastBytes uint64 + RxBroadcastPackets uint64 + RxBroadcastBytes uint64 + TxPackets uint64 + TxBytes uint64 + TxUnicastPackets uint64 + TxUnicastBytes uint64 + TxMulticastPackets uint64 + TxMulticastBytes uint64 + TxBroadcastPackets uint64 + TxBroadcastBytes uint64 +} + +func (*VnetCombinedCounter) GetTypeName() string { + return "vnet_combined_counter" +} +func (*VnetCombinedCounter) GetCrcString() string { + return "20905ca4" +} + +// VnetSimpleCounter represents the VPP binary API type 'vnet_simple_counter'. +// Generated from 'stats.api.json', line 1092: +// +// "vnet_simple_counter", +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u64", +// "drop" +// ], +// [ +// "u64", +// "punt" +// ], +// [ +// "u64", +// "rx_ip4" +// ], +// [ +// "u64", +// "rx_ip6" +// ], +// [ +// "u64", +// "rx_no_buffer" +// ], +// [ +// "u64", +// "rx_miss" +// ], +// [ +// "u64", +// "rx_error" +// ], +// [ +// "u64", +// "tx_error" +// ], +// [ +// "u64", +// "rx_mpls" +// ], +// { +// "crc": "0x8bd65e2d" +// } +// +type VnetSimpleCounter struct { + SwIfIndex uint32 + Drop uint64 + Punt uint64 + RxIP4 uint64 + RxIP6 uint64 + RxNoBuffer uint64 + RxMiss uint64 + RxError uint64 + TxError uint64 + RxMpls uint64 +} + +func (*VnetSimpleCounter) GetTypeName() string { + return "vnet_simple_counter" +} +func (*VnetSimpleCounter) GetCrcString() string { + return "8bd65e2d" +} + +// IP4FibCounter represents the VPP binary API type 'ip4_fib_counter'. +// Generated from 'stats.api.json', line 1138: +// +// "ip4_fib_counter", +// [ +// "u32", +// "address" +// ], +// [ +// "u8", +// "address_length" +// ], +// [ +// "u64", +// "packets" +// ], +// [ +// "u64", +// "bytes" +// ], +// { +// "crc": "0xa6ceb0c9" +// } +// +type IP4FibCounter struct { + Address uint32 + AddressLength uint8 + Packets uint64 + Bytes uint64 +} + +func (*IP4FibCounter) GetTypeName() string { + return "ip4_fib_counter" +} +func (*IP4FibCounter) GetCrcString() string { + return "a6ceb0c9" +} + +// IP4MfibCounter represents the VPP binary API type 'ip4_mfib_counter'. +// Generated from 'stats.api.json', line 1160: +// +// "ip4_mfib_counter", +// [ +// "u8", +// "source", +// 4 +// ], +// [ +// "u8", +// "group", +// 4 +// ], +// [ +// "u8", +// "group_length" +// ], +// [ +// "u64", +// "packets" +// ], +// [ +// "u64", +// "bytes" +// ], +// { +// "crc": "0x2cee4721" +// } +// +type IP4MfibCounter struct { + Source []byte `struc:"[4]byte"` + Group []byte `struc:"[4]byte"` + GroupLength uint8 + Packets uint64 + Bytes uint64 +} + +func (*IP4MfibCounter) GetTypeName() string { + return "ip4_mfib_counter" +} +func (*IP4MfibCounter) GetCrcString() string { + return "2cee4721" +} + +// IP4NbrCounter represents the VPP binary API type 'ip4_nbr_counter'. +// Generated from 'stats.api.json', line 1188: +// +// "ip4_nbr_counter", +// [ +// "u32", +// "address" +// ], +// [ +// "u8", +// "link_type" +// ], +// [ +// "u64", +// "packets" +// ], +// [ +// "u64", +// "bytes" +// ], +// { +// "crc": "0xb9f974d6" +// } +// +type IP4NbrCounter struct { + Address uint32 + LinkType uint8 + Packets uint64 + Bytes uint64 +} + +func (*IP4NbrCounter) GetTypeName() string { + return "ip4_nbr_counter" +} +func (*IP4NbrCounter) GetCrcString() string { + return "b9f974d6" +} + +// IP6FibCounter represents the VPP binary API type 'ip6_fib_counter'. +// Generated from 'stats.api.json', line 1210: +// +// "ip6_fib_counter", +// [ +// "u64", +// "address", +// 2 +// ], +// [ +// "u8", +// "address_length" +// ], +// [ +// "u64", +// "packets" +// ], +// [ +// "u64", +// "bytes" +// ], +// { +// "crc": "0xf1197efb" +// } +// +type IP6FibCounter struct { + Address []uint64 `struc:"[2]uint64"` + AddressLength uint8 + Packets uint64 + Bytes uint64 +} + +func (*IP6FibCounter) GetTypeName() string { + return "ip6_fib_counter" +} +func (*IP6FibCounter) GetCrcString() string { + return "f1197efb" +} + +// IP6MfibCounter represents the VPP binary API type 'ip6_mfib_counter'. +// Generated from 'stats.api.json', line 1233: +// +// "ip6_mfib_counter", +// [ +// "u8", +// "source", +// 16 +// ], +// [ +// "u8", +// "group", +// 16 +// ], +// [ +// "u8", +// "group_length" +// ], +// [ +// "u64", +// "packets" +// ], +// [ +// "u64", +// "bytes" +// ], +// { +// "crc": "0x90a9590e" +// } +// +type IP6MfibCounter struct { + Source []byte `struc:"[16]byte"` + Group []byte `struc:"[16]byte"` + GroupLength uint8 + Packets uint64 + Bytes uint64 +} + +func (*IP6MfibCounter) GetTypeName() string { + return "ip6_mfib_counter" +} +func (*IP6MfibCounter) GetCrcString() string { + return "90a9590e" +} + +// IP6NbrCounter represents the VPP binary API type 'ip6_nbr_counter'. +// Generated from 'stats.api.json', line 1261: +// +// "ip6_nbr_counter", +// [ +// "u64", +// "address", +// 2 +// ], +// [ +// "u8", +// "link_type" +// ], +// [ +// "u64", +// "packets" +// ], +// [ +// "u64", +// "bytes" +// ], +// { +// "crc": "0x2d755474" +// } +// +type IP6NbrCounter struct { + Address []uint64 `struc:"[2]uint64"` + LinkType uint8 + Packets uint64 + Bytes uint64 +} + +func (*IP6NbrCounter) GetTypeName() string { + return "ip6_nbr_counter" +} +func (*IP6NbrCounter) GetCrcString() string { + return "2d755474" +} + +// UDPEncapCounter represents the VPP binary API type 'udp_encap_counter'. +// Generated from 'stats.api.json', line 1284: +// +// "udp_encap_counter", +// [ +// "u32", +// "id" +// ], +// [ +// "u64", +// "packets" +// ], +// [ +// "u64", +// "bytes" +// ], +// { +// "crc": "0x7107035f" +// } +// +type UDPEncapCounter struct { + ID uint32 + Packets uint64 + Bytes uint64 +} + +func (*UDPEncapCounter) GetTypeName() string { + return "udp_encap_counter" +} +func (*UDPEncapCounter) GetCrcString() string { + return "7107035f" +} + +/* Messages */ + +// WantStats represents the VPP binary API message 'want_stats'. +// Generated from 'stats.api.json', line 4: +// +// "want_stats", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "enable_disable" +// ], +// [ +// "u32", +// "pid" +// ], +// { +// "crc": "0x476f5a08" +// } +// +type WantStats struct { + EnableDisable uint32 + PID uint32 +} + +func (*WantStats) GetMessageName() string { + return "want_stats" +} +func (*WantStats) GetCrcString() string { + return "476f5a08" +} +func (*WantStats) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewWantStats() api.Message { + return &WantStats{} +} + +// WantStatsReply represents the VPP binary API message 'want_stats_reply'. +// Generated from 'stats.api.json', line 30: +// +// "want_stats_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type WantStatsReply struct { + Retval int32 +} + +func (*WantStatsReply) GetMessageName() string { + return "want_stats_reply" +} +func (*WantStatsReply) GetCrcString() string { + return "e8d4e804" +} +func (*WantStatsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewWantStatsReply() api.Message { + return &WantStatsReply{} +} + +// WantInterfaceSimpleStats represents the VPP binary API message 'want_interface_simple_stats'. +// Generated from 'stats.api.json', line 48: +// +// "want_interface_simple_stats", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "enable_disable" +// ], +// [ +// "u32", +// "pid" +// ], +// { +// "crc": "0x476f5a08" +// } +// +type WantInterfaceSimpleStats struct { + EnableDisable uint32 + PID uint32 +} + +func (*WantInterfaceSimpleStats) GetMessageName() string { + return "want_interface_simple_stats" +} +func (*WantInterfaceSimpleStats) GetCrcString() string { + return "476f5a08" +} +func (*WantInterfaceSimpleStats) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewWantInterfaceSimpleStats() api.Message { + return &WantInterfaceSimpleStats{} +} + +// WantInterfaceSimpleStatsReply represents the VPP binary API message 'want_interface_simple_stats_reply'. +// Generated from 'stats.api.json', line 74: +// +// "want_interface_simple_stats_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type WantInterfaceSimpleStatsReply struct { + Retval int32 +} + +func (*WantInterfaceSimpleStatsReply) GetMessageName() string { + return "want_interface_simple_stats_reply" +} +func (*WantInterfaceSimpleStatsReply) GetCrcString() string { + return "e8d4e804" +} +func (*WantInterfaceSimpleStatsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewWantInterfaceSimpleStatsReply() api.Message { + return &WantInterfaceSimpleStatsReply{} +} + +// WantPerInterfaceSimpleStats represents the VPP binary API message 'want_per_interface_simple_stats'. +// Generated from 'stats.api.json', line 92: +// +// "want_per_interface_simple_stats", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "enable_disable" +// ], +// [ +// "u32", +// "pid" +// ], +// [ +// "u32", +// "num" +// ], +// [ +// "u32", +// "sw_ifs", +// 0, +// "num" +// ], +// { +// "crc": "0x729d04f1" +// } +// +type WantPerInterfaceSimpleStats struct { + EnableDisable uint32 + PID uint32 + Num uint32 `struc:"sizeof=SwIfs"` + SwIfs []uint32 +} + +func (*WantPerInterfaceSimpleStats) GetMessageName() string { + return "want_per_interface_simple_stats" +} +func (*WantPerInterfaceSimpleStats) GetCrcString() string { + return "729d04f1" +} +func (*WantPerInterfaceSimpleStats) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewWantPerInterfaceSimpleStats() api.Message { + return &WantPerInterfaceSimpleStats{} +} + +// WantPerInterfaceSimpleStatsReply represents the VPP binary API message 'want_per_interface_simple_stats_reply'. +// Generated from 'stats.api.json', line 128: +// +// "want_per_interface_simple_stats_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type WantPerInterfaceSimpleStatsReply struct { + Retval int32 +} + +func (*WantPerInterfaceSimpleStatsReply) GetMessageName() string { + return "want_per_interface_simple_stats_reply" +} +func (*WantPerInterfaceSimpleStatsReply) GetCrcString() string { + return "e8d4e804" +} +func (*WantPerInterfaceSimpleStatsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewWantPerInterfaceSimpleStatsReply() api.Message { + return &WantPerInterfaceSimpleStatsReply{} +} + +// WantInterfaceCombinedStats represents the VPP binary API message 'want_interface_combined_stats'. +// Generated from 'stats.api.json', line 146: +// +// "want_interface_combined_stats", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "enable_disable" +// ], +// [ +// "u32", +// "pid" +// ], +// { +// "crc": "0x476f5a08" +// } +// +type WantInterfaceCombinedStats struct { + EnableDisable uint32 + PID uint32 +} + +func (*WantInterfaceCombinedStats) GetMessageName() string { + return "want_interface_combined_stats" +} +func (*WantInterfaceCombinedStats) GetCrcString() string { + return "476f5a08" +} +func (*WantInterfaceCombinedStats) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewWantInterfaceCombinedStats() api.Message { + return &WantInterfaceCombinedStats{} +} + +// WantInterfaceCombinedStatsReply represents the VPP binary API message 'want_interface_combined_stats_reply'. +// Generated from 'stats.api.json', line 172: +// +// "want_interface_combined_stats_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type WantInterfaceCombinedStatsReply struct { + Retval int32 +} + +func (*WantInterfaceCombinedStatsReply) GetMessageName() string { + return "want_interface_combined_stats_reply" +} +func (*WantInterfaceCombinedStatsReply) GetCrcString() string { + return "e8d4e804" +} +func (*WantInterfaceCombinedStatsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewWantInterfaceCombinedStatsReply() api.Message { + return &WantInterfaceCombinedStatsReply{} +} + +// WantPerInterfaceCombinedStats represents the VPP binary API message 'want_per_interface_combined_stats'. +// Generated from 'stats.api.json', line 190: +// +// "want_per_interface_combined_stats", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "enable_disable" +// ], +// [ +// "u32", +// "pid" +// ], +// [ +// "u32", +// "num" +// ], +// [ +// "u32", +// "sw_ifs", +// 0, +// "num" +// ], +// { +// "crc": "0x729d04f1" +// } +// +type WantPerInterfaceCombinedStats struct { + EnableDisable uint32 + PID uint32 + Num uint32 `struc:"sizeof=SwIfs"` + SwIfs []uint32 +} + +func (*WantPerInterfaceCombinedStats) GetMessageName() string { + return "want_per_interface_combined_stats" +} +func (*WantPerInterfaceCombinedStats) GetCrcString() string { + return "729d04f1" +} +func (*WantPerInterfaceCombinedStats) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewWantPerInterfaceCombinedStats() api.Message { + return &WantPerInterfaceCombinedStats{} +} + +// WantPerInterfaceCombinedStatsReply represents the VPP binary API message 'want_per_interface_combined_stats_reply'. +// Generated from 'stats.api.json', line 226: +// +// "want_per_interface_combined_stats_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type WantPerInterfaceCombinedStatsReply struct { + Retval int32 +} + +func (*WantPerInterfaceCombinedStatsReply) GetMessageName() string { + return "want_per_interface_combined_stats_reply" +} +func (*WantPerInterfaceCombinedStatsReply) GetCrcString() string { + return "e8d4e804" +} +func (*WantPerInterfaceCombinedStatsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewWantPerInterfaceCombinedStatsReply() api.Message { + return &WantPerInterfaceCombinedStatsReply{} +} + +// WantIP4FibStats represents the VPP binary API message 'want_ip4_fib_stats'. +// Generated from 'stats.api.json', line 244: +// +// "want_ip4_fib_stats", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "enable_disable" +// ], +// [ +// "u32", +// "pid" +// ], +// { +// "crc": "0x476f5a08" +// } +// +type WantIP4FibStats struct { + EnableDisable uint32 + PID uint32 +} + +func (*WantIP4FibStats) GetMessageName() string { + return "want_ip4_fib_stats" +} +func (*WantIP4FibStats) GetCrcString() string { + return "476f5a08" +} +func (*WantIP4FibStats) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewWantIP4FibStats() api.Message { + return &WantIP4FibStats{} +} + +// WantIP4FibStatsReply represents the VPP binary API message 'want_ip4_fib_stats_reply'. +// Generated from 'stats.api.json', line 270: +// +// "want_ip4_fib_stats_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type WantIP4FibStatsReply struct { + Retval int32 +} + +func (*WantIP4FibStatsReply) GetMessageName() string { + return "want_ip4_fib_stats_reply" +} +func (*WantIP4FibStatsReply) GetCrcString() string { + return "e8d4e804" +} +func (*WantIP4FibStatsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewWantIP4FibStatsReply() api.Message { + return &WantIP4FibStatsReply{} +} + +// WantIP6FibStats represents the VPP binary API message 'want_ip6_fib_stats'. +// Generated from 'stats.api.json', line 288: +// +// "want_ip6_fib_stats", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "enable_disable" +// ], +// [ +// "u32", +// "pid" +// ], +// { +// "crc": "0x476f5a08" +// } +// +type WantIP6FibStats struct { + EnableDisable uint32 + PID uint32 +} + +func (*WantIP6FibStats) GetMessageName() string { + return "want_ip6_fib_stats" +} +func (*WantIP6FibStats) GetCrcString() string { + return "476f5a08" +} +func (*WantIP6FibStats) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewWantIP6FibStats() api.Message { + return &WantIP6FibStats{} +} + +// WantIP6FibStatsReply represents the VPP binary API message 'want_ip6_fib_stats_reply'. +// Generated from 'stats.api.json', line 314: +// +// "want_ip6_fib_stats_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type WantIP6FibStatsReply struct { + Retval int32 +} + +func (*WantIP6FibStatsReply) GetMessageName() string { + return "want_ip6_fib_stats_reply" +} +func (*WantIP6FibStatsReply) GetCrcString() string { + return "e8d4e804" +} +func (*WantIP6FibStatsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewWantIP6FibStatsReply() api.Message { + return &WantIP6FibStatsReply{} +} + +// WantIP4MfibStats represents the VPP binary API message 'want_ip4_mfib_stats'. +// Generated from 'stats.api.json', line 332: +// +// "want_ip4_mfib_stats", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "enable_disable" +// ], +// [ +// "u32", +// "pid" +// ], +// { +// "crc": "0x476f5a08" +// } +// +type WantIP4MfibStats struct { + EnableDisable uint32 + PID uint32 +} + +func (*WantIP4MfibStats) GetMessageName() string { + return "want_ip4_mfib_stats" +} +func (*WantIP4MfibStats) GetCrcString() string { + return "476f5a08" +} +func (*WantIP4MfibStats) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewWantIP4MfibStats() api.Message { + return &WantIP4MfibStats{} +} + +// WantIP4MfibStatsReply represents the VPP binary API message 'want_ip4_mfib_stats_reply'. +// Generated from 'stats.api.json', line 358: +// +// "want_ip4_mfib_stats_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type WantIP4MfibStatsReply struct { + Retval int32 +} + +func (*WantIP4MfibStatsReply) GetMessageName() string { + return "want_ip4_mfib_stats_reply" +} +func (*WantIP4MfibStatsReply) GetCrcString() string { + return "e8d4e804" +} +func (*WantIP4MfibStatsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewWantIP4MfibStatsReply() api.Message { + return &WantIP4MfibStatsReply{} +} + +// WantIP6MfibStats represents the VPP binary API message 'want_ip6_mfib_stats'. +// Generated from 'stats.api.json', line 376: +// +// "want_ip6_mfib_stats", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "enable_disable" +// ], +// [ +// "u32", +// "pid" +// ], +// { +// "crc": "0x476f5a08" +// } +// +type WantIP6MfibStats struct { + EnableDisable uint32 + PID uint32 +} + +func (*WantIP6MfibStats) GetMessageName() string { + return "want_ip6_mfib_stats" +} +func (*WantIP6MfibStats) GetCrcString() string { + return "476f5a08" +} +func (*WantIP6MfibStats) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewWantIP6MfibStats() api.Message { + return &WantIP6MfibStats{} +} + +// WantIP6MfibStatsReply represents the VPP binary API message 'want_ip6_mfib_stats_reply'. +// Generated from 'stats.api.json', line 402: +// +// "want_ip6_mfib_stats_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type WantIP6MfibStatsReply struct { + Retval int32 +} + +func (*WantIP6MfibStatsReply) GetMessageName() string { + return "want_ip6_mfib_stats_reply" +} +func (*WantIP6MfibStatsReply) GetCrcString() string { + return "e8d4e804" +} +func (*WantIP6MfibStatsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewWantIP6MfibStatsReply() api.Message { + return &WantIP6MfibStatsReply{} +} + +// WantIP4NbrStats represents the VPP binary API message 'want_ip4_nbr_stats'. +// Generated from 'stats.api.json', line 420: +// +// "want_ip4_nbr_stats", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "enable_disable" +// ], +// [ +// "u32", +// "pid" +// ], +// { +// "crc": "0x476f5a08" +// } +// +type WantIP4NbrStats struct { + EnableDisable uint32 + PID uint32 +} + +func (*WantIP4NbrStats) GetMessageName() string { + return "want_ip4_nbr_stats" +} +func (*WantIP4NbrStats) GetCrcString() string { + return "476f5a08" +} +func (*WantIP4NbrStats) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewWantIP4NbrStats() api.Message { + return &WantIP4NbrStats{} +} + +// WantIP4NbrStatsReply represents the VPP binary API message 'want_ip4_nbr_stats_reply'. +// Generated from 'stats.api.json', line 446: +// +// "want_ip4_nbr_stats_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type WantIP4NbrStatsReply struct { + Retval int32 +} + +func (*WantIP4NbrStatsReply) GetMessageName() string { + return "want_ip4_nbr_stats_reply" +} +func (*WantIP4NbrStatsReply) GetCrcString() string { + return "e8d4e804" +} +func (*WantIP4NbrStatsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewWantIP4NbrStatsReply() api.Message { + return &WantIP4NbrStatsReply{} +} + +// WantIP6NbrStats represents the VPP binary API message 'want_ip6_nbr_stats'. +// Generated from 'stats.api.json', line 464: +// +// "want_ip6_nbr_stats", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "enable_disable" +// ], +// [ +// "u32", +// "pid" +// ], +// { +// "crc": "0x476f5a08" +// } +// +type WantIP6NbrStats struct { + EnableDisable uint32 + PID uint32 +} + +func (*WantIP6NbrStats) GetMessageName() string { + return "want_ip6_nbr_stats" +} +func (*WantIP6NbrStats) GetCrcString() string { + return "476f5a08" +} +func (*WantIP6NbrStats) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewWantIP6NbrStats() api.Message { + return &WantIP6NbrStats{} +} + +// WantIP6NbrStatsReply represents the VPP binary API message 'want_ip6_nbr_stats_reply'. +// Generated from 'stats.api.json', line 490: +// +// "want_ip6_nbr_stats_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type WantIP6NbrStatsReply struct { + Retval int32 +} + +func (*WantIP6NbrStatsReply) GetMessageName() string { + return "want_ip6_nbr_stats_reply" +} +func (*WantIP6NbrStatsReply) GetCrcString() string { + return "e8d4e804" +} +func (*WantIP6NbrStatsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewWantIP6NbrStatsReply() api.Message { + return &WantIP6NbrStatsReply{} +} + +// VnetIP4FibCounters represents the VPP binary API message 'vnet_ip4_fib_counters'. +// Generated from 'stats.api.json', line 508: +// +// "vnet_ip4_fib_counters", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "vrf_id" +// ], +// [ +// "u32", +// "count" +// ], +// [ +// "vl_api_ip4_fib_counter_t", +// "c", +// 0, +// "count" +// ], +// { +// "crc": "0x57e3feec" +// } +// +type VnetIP4FibCounters struct { + VrfID uint32 + Count uint32 `struc:"sizeof=C"` + C []IP4FibCounter +} + +func (*VnetIP4FibCounters) GetMessageName() string { + return "vnet_ip4_fib_counters" +} +func (*VnetIP4FibCounters) GetCrcString() string { + return "57e3feec" +} +func (*VnetIP4FibCounters) GetMessageType() api.MessageType { + return api.OtherMessage +} +func NewVnetIP4FibCounters() api.Message { + return &VnetIP4FibCounters{} +} + +// VnetIP4MfibCounters represents the VPP binary API message 'vnet_ip4_mfib_counters'. +// Generated from 'stats.api.json', line 532: +// +// "vnet_ip4_mfib_counters", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "vrf_id" +// ], +// [ +// "u32", +// "count" +// ], +// [ +// "vl_api_ip4_mfib_counter_t", +// "c", +// 0, +// "count" +// ], +// { +// "crc": "0x946eb588" +// } +// +type VnetIP4MfibCounters struct { + VrfID uint32 + Count uint32 `struc:"sizeof=C"` + C []IP4MfibCounter +} + +func (*VnetIP4MfibCounters) GetMessageName() string { + return "vnet_ip4_mfib_counters" +} +func (*VnetIP4MfibCounters) GetCrcString() string { + return "946eb588" +} +func (*VnetIP4MfibCounters) GetMessageType() api.MessageType { + return api.OtherMessage +} +func NewVnetIP4MfibCounters() api.Message { + return &VnetIP4MfibCounters{} +} + +// VnetIP4NbrCounters represents the VPP binary API message 'vnet_ip4_nbr_counters'. +// Generated from 'stats.api.json', line 556: +// +// "vnet_ip4_nbr_counters", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "count" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "begin" +// ], +// [ +// "vl_api_ip4_nbr_counter_t", +// "c", +// 0, +// "count" +// ], +// { +// "crc": "0x214c4811" +// } +// +type VnetIP4NbrCounters struct { + Count uint32 `struc:"sizeof=C"` + SwIfIndex uint32 + Begin uint8 + C []IP4NbrCounter +} + +func (*VnetIP4NbrCounters) GetMessageName() string { + return "vnet_ip4_nbr_counters" +} +func (*VnetIP4NbrCounters) GetCrcString() string { + return "214c4811" +} +func (*VnetIP4NbrCounters) GetMessageType() api.MessageType { + return api.OtherMessage +} +func NewVnetIP4NbrCounters() api.Message { + return &VnetIP4NbrCounters{} +} + +// VnetIP6FibCounters represents the VPP binary API message 'vnet_ip6_fib_counters'. +// Generated from 'stats.api.json', line 584: +// +// "vnet_ip6_fib_counters", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "vrf_id" +// ], +// [ +// "u32", +// "count" +// ], +// [ +// "vl_api_ip6_fib_counter_t", +// "c", +// 0, +// "count" +// ], +// { +// "crc": "0x13aed73d" +// } +// +type VnetIP6FibCounters struct { + VrfID uint32 + Count uint32 `struc:"sizeof=C"` + C []IP6FibCounter +} + +func (*VnetIP6FibCounters) GetMessageName() string { + return "vnet_ip6_fib_counters" +} +func (*VnetIP6FibCounters) GetCrcString() string { + return "13aed73d" +} +func (*VnetIP6FibCounters) GetMessageType() api.MessageType { + return api.OtherMessage +} +func NewVnetIP6FibCounters() api.Message { + return &VnetIP6FibCounters{} +} + +// VnetIP6MfibCounters represents the VPP binary API message 'vnet_ip6_mfib_counters'. +// Generated from 'stats.api.json', line 608: +// +// "vnet_ip6_mfib_counters", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "vrf_id" +// ], +// [ +// "u32", +// "count" +// ], +// [ +// "vl_api_ip6_mfib_counter_t", +// "c", +// 0, +// "count" +// ], +// { +// "crc": "0x65fe1ae3" +// } +// +type VnetIP6MfibCounters struct { + VrfID uint32 + Count uint32 `struc:"sizeof=C"` + C []IP6MfibCounter +} + +func (*VnetIP6MfibCounters) GetMessageName() string { + return "vnet_ip6_mfib_counters" +} +func (*VnetIP6MfibCounters) GetCrcString() string { + return "65fe1ae3" +} +func (*VnetIP6MfibCounters) GetMessageType() api.MessageType { + return api.OtherMessage +} +func NewVnetIP6MfibCounters() api.Message { + return &VnetIP6MfibCounters{} +} + +// VnetIP6NbrCounters represents the VPP binary API message 'vnet_ip6_nbr_counters'. +// Generated from 'stats.api.json', line 632: +// +// "vnet_ip6_nbr_counters", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "count" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "begin" +// ], +// [ +// "vl_api_ip6_nbr_counter_t", +// "c", +// 0, +// "count" +// ], +// { +// "crc": "0x650161c0" +// } +// +type VnetIP6NbrCounters struct { + Count uint32 `struc:"sizeof=C"` + SwIfIndex uint32 + Begin uint8 + C []IP6NbrCounter +} + +func (*VnetIP6NbrCounters) GetMessageName() string { + return "vnet_ip6_nbr_counters" +} +func (*VnetIP6NbrCounters) GetCrcString() string { + return "650161c0" +} +func (*VnetIP6NbrCounters) GetMessageType() api.MessageType { + return api.OtherMessage +} +func NewVnetIP6NbrCounters() api.Message { + return &VnetIP6NbrCounters{} +} + +// VnetInterfaceSimpleCounters represents the VPP binary API message 'vnet_interface_simple_counters'. +// Generated from 'stats.api.json', line 660: +// +// "vnet_interface_simple_counters", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u8", +// "vnet_counter_type" +// ], +// [ +// "u32", +// "first_sw_if_index" +// ], +// [ +// "u32", +// "count" +// ], +// [ +// "u64", +// "data", +// 0, +// "count" +// ], +// { +// "crc": "0x9bc4a808" +// } +// +type VnetInterfaceSimpleCounters struct { + VnetCounterType uint8 + FirstSwIfIndex uint32 + Count uint32 `struc:"sizeof=Data"` + Data []uint64 +} + +func (*VnetInterfaceSimpleCounters) GetMessageName() string { + return "vnet_interface_simple_counters" +} +func (*VnetInterfaceSimpleCounters) GetCrcString() string { + return "9bc4a808" +} +func (*VnetInterfaceSimpleCounters) GetMessageType() api.MessageType { + return api.OtherMessage +} +func NewVnetInterfaceSimpleCounters() api.Message { + return &VnetInterfaceSimpleCounters{} +} + +// VnetInterfaceCombinedCounters represents the VPP binary API message 'vnet_interface_combined_counters'. +// Generated from 'stats.api.json', line 688: +// +// "vnet_interface_combined_counters", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u8", +// "vnet_counter_type" +// ], +// [ +// "u32", +// "first_sw_if_index" +// ], +// [ +// "u32", +// "count" +// ], +// [ +// "vl_api_vlib_counter_t", +// "data", +// 0, +// "count" +// ], +// { +// "crc": "0x2c595002" +// } +// +type VnetInterfaceCombinedCounters struct { + VnetCounterType uint8 + FirstSwIfIndex uint32 + Count uint32 `struc:"sizeof=Data"` + Data []VlibCounter +} + +func (*VnetInterfaceCombinedCounters) GetMessageName() string { + return "vnet_interface_combined_counters" +} +func (*VnetInterfaceCombinedCounters) GetCrcString() string { + return "2c595002" +} +func (*VnetInterfaceCombinedCounters) GetMessageType() api.MessageType { + return api.OtherMessage +} +func NewVnetInterfaceCombinedCounters() api.Message { + return &VnetInterfaceCombinedCounters{} +} + +// VnetPerInterfaceSimpleCounters represents the VPP binary API message 'vnet_per_interface_simple_counters'. +// Generated from 'stats.api.json', line 716: +// +// "vnet_per_interface_simple_counters", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "count" +// ], +// [ +// "u32", +// "timestamp" +// ], +// [ +// "vl_api_vnet_simple_counter_t", +// "data", +// 0, +// "count" +// ], +// { +// "crc": "0xd1fba9ba" +// } +// +type VnetPerInterfaceSimpleCounters struct { + Count uint32 `struc:"sizeof=Data"` + Timestamp uint32 + Data []VnetSimpleCounter +} + +func (*VnetPerInterfaceSimpleCounters) GetMessageName() string { + return "vnet_per_interface_simple_counters" +} +func (*VnetPerInterfaceSimpleCounters) GetCrcString() string { + return "d1fba9ba" +} +func (*VnetPerInterfaceSimpleCounters) GetMessageType() api.MessageType { + return api.OtherMessage +} +func NewVnetPerInterfaceSimpleCounters() api.Message { + return &VnetPerInterfaceSimpleCounters{} +} + +// VnetPerInterfaceCombinedCounters represents the VPP binary API message 'vnet_per_interface_combined_counters'. +// Generated from 'stats.api.json', line 740: +// +// "vnet_per_interface_combined_counters", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "count" +// ], +// [ +// "u32", +// "timestamp" +// ], +// [ +// "vl_api_vnet_combined_counter_t", +// "data", +// 0, +// "count" +// ], +// { +// "crc": "0xdc578375" +// } +// +type VnetPerInterfaceCombinedCounters struct { + Count uint32 `struc:"sizeof=Data"` + Timestamp uint32 + Data []VnetCombinedCounter +} + +func (*VnetPerInterfaceCombinedCounters) GetMessageName() string { + return "vnet_per_interface_combined_counters" +} +func (*VnetPerInterfaceCombinedCounters) GetCrcString() string { + return "dc578375" +} +func (*VnetPerInterfaceCombinedCounters) GetMessageType() api.MessageType { + return api.OtherMessage +} +func NewVnetPerInterfaceCombinedCounters() api.Message { + return &VnetPerInterfaceCombinedCounters{} +} + +// VnetGetSummaryStats represents the VPP binary API message 'vnet_get_summary_stats'. +// Generated from 'stats.api.json', line 764: +// +// "vnet_get_summary_stats", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// { +// "crc": "0x51077d14" +// } +// +type VnetGetSummaryStats struct{} + +func (*VnetGetSummaryStats) GetMessageName() string { + return "vnet_get_summary_stats" +} +func (*VnetGetSummaryStats) GetCrcString() string { + return "51077d14" +} +func (*VnetGetSummaryStats) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewVnetGetSummaryStats() api.Message { + return &VnetGetSummaryStats{} +} + +// VnetGetSummaryStatsReply represents the VPP binary API message 'vnet_get_summary_stats_reply'. +// Generated from 'stats.api.json', line 782: +// +// "vnet_get_summary_stats_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// [ +// "u64", +// "total_pkts", +// 2 +// ], +// [ +// "u64", +// "total_bytes", +// 2 +// ], +// [ +// "f64", +// "vector_rate" +// ], +// { +// "crc": "0x32b87c56" +// } +// +type VnetGetSummaryStatsReply struct { + Retval int32 + TotalPkts []uint64 `struc:"[2]uint64"` + TotalBytes []uint64 `struc:"[2]uint64"` + VectorRate float64 +} + +func (*VnetGetSummaryStatsReply) GetMessageName() string { + return "vnet_get_summary_stats_reply" +} +func (*VnetGetSummaryStatsReply) GetCrcString() string { + return "32b87c56" +} +func (*VnetGetSummaryStatsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewVnetGetSummaryStatsReply() api.Message { + return &VnetGetSummaryStatsReply{} +} + +// StatsGetPollerDelay represents the VPP binary API message 'stats_get_poller_delay'. +// Generated from 'stats.api.json', line 814: +// +// "stats_get_poller_delay", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// { +// "crc": "0x51077d14" +// } +// +type StatsGetPollerDelay struct{} + +func (*StatsGetPollerDelay) GetMessageName() string { + return "stats_get_poller_delay" +} +func (*StatsGetPollerDelay) GetCrcString() string { + return "51077d14" +} +func (*StatsGetPollerDelay) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewStatsGetPollerDelay() api.Message { + return &StatsGetPollerDelay{} +} + +// StatsGetPollerDelayReply represents the VPP binary API message 'stats_get_poller_delay_reply'. +// Generated from 'stats.api.json', line 832: +// +// "stats_get_poller_delay_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// [ +// "u32", +// "delay" +// ], +// { +// "crc": "0x8c445a33" +// } +// +type StatsGetPollerDelayReply struct { + Retval int32 + Delay uint32 +} + +func (*StatsGetPollerDelayReply) GetMessageName() string { + return "stats_get_poller_delay_reply" +} +func (*StatsGetPollerDelayReply) GetCrcString() string { + return "8c445a33" +} +func (*StatsGetPollerDelayReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewStatsGetPollerDelayReply() api.Message { + return &StatsGetPollerDelayReply{} +} + +// WantUDPEncapStats represents the VPP binary API message 'want_udp_encap_stats'. +// Generated from 'stats.api.json', line 854: +// +// "want_udp_encap_stats", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "enable" +// ], +// [ +// "u32", +// "pid" +// ], +// { +// "crc": "0xcfaccc1f" +// } +// +type WantUDPEncapStats struct { + Enable uint32 + PID uint32 +} + +func (*WantUDPEncapStats) GetMessageName() string { + return "want_udp_encap_stats" +} +func (*WantUDPEncapStats) GetCrcString() string { + return "cfaccc1f" +} +func (*WantUDPEncapStats) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewWantUDPEncapStats() api.Message { + return &WantUDPEncapStats{} +} + +// WantUDPEncapStatsReply represents the VPP binary API message 'want_udp_encap_stats_reply'. +// Generated from 'stats.api.json', line 880: +// +// "want_udp_encap_stats_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type WantUDPEncapStatsReply struct { + Retval int32 +} + +func (*WantUDPEncapStatsReply) GetMessageName() string { + return "want_udp_encap_stats_reply" +} +func (*WantUDPEncapStatsReply) GetCrcString() string { + return "e8d4e804" +} +func (*WantUDPEncapStatsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewWantUDPEncapStatsReply() api.Message { + return &WantUDPEncapStatsReply{} +} + +// VnetUDPEncapCounters represents the VPP binary API message 'vnet_udp_encap_counters'. +// Generated from 'stats.api.json', line 898: +// +// "vnet_udp_encap_counters", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "timestamp" +// ], +// [ +// "u32", +// "count" +// ], +// [ +// "vl_api_udp_encap_counter_t", +// "c", +// 0, +// "count" +// ], +// { +// "crc": "0x1ab5e649" +// } +// +type VnetUDPEncapCounters struct { + Timestamp uint32 + Count uint32 `struc:"sizeof=C"` + C []UDPEncapCounter +} + +func (*VnetUDPEncapCounters) GetMessageName() string { + return "vnet_udp_encap_counters" +} +func (*VnetUDPEncapCounters) GetCrcString() string { + return "1ab5e649" +} +func (*VnetUDPEncapCounters) GetMessageType() api.MessageType { + return api.OtherMessage +} +func NewVnetUDPEncapCounters() api.Message { + return &VnetUDPEncapCounters{} +} + +/* Services */ + +type Services interface { + StatsGetPollerDelay(*StatsGetPollerDelay) (*StatsGetPollerDelayReply, error) + VnetGetSummaryStats(*VnetGetSummaryStats) (*VnetGetSummaryStatsReply, error) + WantInterfaceCombinedStats(*WantInterfaceCombinedStats) (*WantInterfaceCombinedStatsReply, error) + WantInterfaceSimpleStats(*WantInterfaceSimpleStats) (*WantInterfaceSimpleStatsReply, error) + WantIP4FibStats(*WantIP4FibStats) (*WantIP4FibStatsReply, error) + WantIP4MfibStats(*WantIP4MfibStats) (*WantIP4MfibStatsReply, error) + WantIP4NbrStats(*WantIP4NbrStats) (*WantIP4NbrStatsReply, error) + WantIP6FibStats(*WantIP6FibStats) (*WantIP6FibStatsReply, error) + WantIP6MfibStats(*WantIP6MfibStats) (*WantIP6MfibStatsReply, error) + WantIP6NbrStats(*WantIP6NbrStats) (*WantIP6NbrStatsReply, error) + WantPerInterfaceCombinedStats(*WantPerInterfaceCombinedStats) (*WantPerInterfaceCombinedStatsReply, error) + WantPerInterfaceSimpleStats(*WantPerInterfaceSimpleStats) (*WantPerInterfaceSimpleStatsReply, error) + WantStats(*WantStats) (*WantStatsReply, error) + WantUDPEncapStats(*WantUDPEncapStats) (*WantUDPEncapStatsReply, error) +} + +func init() { + api.RegisterMessage((*WantStats)(nil), "stats.WantStats") + api.RegisterMessage((*WantStatsReply)(nil), "stats.WantStatsReply") + api.RegisterMessage((*WantInterfaceSimpleStats)(nil), "stats.WantInterfaceSimpleStats") + api.RegisterMessage((*WantInterfaceSimpleStatsReply)(nil), "stats.WantInterfaceSimpleStatsReply") + api.RegisterMessage((*WantPerInterfaceSimpleStats)(nil), "stats.WantPerInterfaceSimpleStats") + api.RegisterMessage((*WantPerInterfaceSimpleStatsReply)(nil), "stats.WantPerInterfaceSimpleStatsReply") + api.RegisterMessage((*WantInterfaceCombinedStats)(nil), "stats.WantInterfaceCombinedStats") + api.RegisterMessage((*WantInterfaceCombinedStatsReply)(nil), "stats.WantInterfaceCombinedStatsReply") + api.RegisterMessage((*WantPerInterfaceCombinedStats)(nil), "stats.WantPerInterfaceCombinedStats") + api.RegisterMessage((*WantPerInterfaceCombinedStatsReply)(nil), "stats.WantPerInterfaceCombinedStatsReply") + api.RegisterMessage((*WantIP4FibStats)(nil), "stats.WantIP4FibStats") + api.RegisterMessage((*WantIP4FibStatsReply)(nil), "stats.WantIP4FibStatsReply") + api.RegisterMessage((*WantIP6FibStats)(nil), "stats.WantIP6FibStats") + api.RegisterMessage((*WantIP6FibStatsReply)(nil), "stats.WantIP6FibStatsReply") + api.RegisterMessage((*WantIP4MfibStats)(nil), "stats.WantIP4MfibStats") + api.RegisterMessage((*WantIP4MfibStatsReply)(nil), "stats.WantIP4MfibStatsReply") + api.RegisterMessage((*WantIP6MfibStats)(nil), "stats.WantIP6MfibStats") + api.RegisterMessage((*WantIP6MfibStatsReply)(nil), "stats.WantIP6MfibStatsReply") + api.RegisterMessage((*WantIP4NbrStats)(nil), "stats.WantIP4NbrStats") + api.RegisterMessage((*WantIP4NbrStatsReply)(nil), "stats.WantIP4NbrStatsReply") + api.RegisterMessage((*WantIP6NbrStats)(nil), "stats.WantIP6NbrStats") + api.RegisterMessage((*WantIP6NbrStatsReply)(nil), "stats.WantIP6NbrStatsReply") + api.RegisterMessage((*VnetIP4FibCounters)(nil), "stats.VnetIP4FibCounters") + api.RegisterMessage((*VnetIP4MfibCounters)(nil), "stats.VnetIP4MfibCounters") + api.RegisterMessage((*VnetIP4NbrCounters)(nil), "stats.VnetIP4NbrCounters") + api.RegisterMessage((*VnetIP6FibCounters)(nil), "stats.VnetIP6FibCounters") + api.RegisterMessage((*VnetIP6MfibCounters)(nil), "stats.VnetIP6MfibCounters") + api.RegisterMessage((*VnetIP6NbrCounters)(nil), "stats.VnetIP6NbrCounters") + api.RegisterMessage((*VnetInterfaceSimpleCounters)(nil), "stats.VnetInterfaceSimpleCounters") + api.RegisterMessage((*VnetInterfaceCombinedCounters)(nil), "stats.VnetInterfaceCombinedCounters") + api.RegisterMessage((*VnetPerInterfaceSimpleCounters)(nil), "stats.VnetPerInterfaceSimpleCounters") + api.RegisterMessage((*VnetPerInterfaceCombinedCounters)(nil), "stats.VnetPerInterfaceCombinedCounters") + api.RegisterMessage((*VnetGetSummaryStats)(nil), "stats.VnetGetSummaryStats") + api.RegisterMessage((*VnetGetSummaryStatsReply)(nil), "stats.VnetGetSummaryStatsReply") + api.RegisterMessage((*StatsGetPollerDelay)(nil), "stats.StatsGetPollerDelay") + api.RegisterMessage((*StatsGetPollerDelayReply)(nil), "stats.StatsGetPollerDelayReply") + api.RegisterMessage((*WantUDPEncapStats)(nil), "stats.WantUDPEncapStats") + api.RegisterMessage((*WantUDPEncapStatsReply)(nil), "stats.WantUDPEncapStatsReply") + api.RegisterMessage((*VnetUDPEncapCounters)(nil), "stats.VnetUDPEncapCounters") +} diff --git a/examples/bin_api/stats/stats.go b/examples/bin_api/stats/stats.go deleted file mode 100644 index 0285698..0000000 --- a/examples/bin_api/stats/stats.go +++ /dev/null @@ -1,1560 +0,0 @@ -// Code generated by govpp binapi-generator DO NOT EDIT. -// Package stats represents the VPP binary API of the 'stats' VPP module. -// Generated from '../../bin_api/stats.api.json' -package stats - -import "git.fd.io/govpp.git/api" - -// VlApiVersion contains version of the API. -const VlAPIVersion = 0x50890812 - -// IP4FibCounter represents the VPP binary API data type 'ip4_fib_counter'. -// Generated from '../../bin_api/stats.api.json', line 776: -// -// "ip4_fib_counter", -// [ -// "u32", -// "address" -// ], -// [ -// "u8", -// "address_length" -// ], -// [ -// "u64", -// "packets" -// ], -// [ -// "u64", -// "bytes" -// ], -// { -// "crc": "0xa6ceb0c9" -// } -// -type IP4FibCounter struct { - Address uint32 - AddressLength uint8 - Packets uint64 - Bytes uint64 -} - -func (*IP4FibCounter) GetTypeName() string { - return "ip4_fib_counter" -} -func (*IP4FibCounter) GetCrcString() string { - return "a6ceb0c9" -} - -// IP4MfibCounter represents the VPP binary API data type 'ip4_mfib_counter'. -// Generated from '../../bin_api/stats.api.json', line 798: -// -// "ip4_mfib_counter", -// [ -// "u8", -// "source", -// 4 -// ], -// [ -// "u8", -// "group", -// 4 -// ], -// [ -// "u8", -// "group_length" -// ], -// [ -// "u64", -// "packets" -// ], -// [ -// "u64", -// "bytes" -// ], -// { -// "crc": "0x2cee4721" -// } -// -type IP4MfibCounter struct { - Source []byte `struc:"[4]byte"` - Group []byte `struc:"[4]byte"` - GroupLength uint8 - Packets uint64 - Bytes uint64 -} - -func (*IP4MfibCounter) GetTypeName() string { - return "ip4_mfib_counter" -} -func (*IP4MfibCounter) GetCrcString() string { - return "2cee4721" -} - -// IP4NbrCounter represents the VPP binary API data type 'ip4_nbr_counter'. -// Generated from '../../bin_api/stats.api.json', line 826: -// -// "ip4_nbr_counter", -// [ -// "u32", -// "address" -// ], -// [ -// "u8", -// "link_type" -// ], -// [ -// "u64", -// "packets" -// ], -// [ -// "u64", -// "bytes" -// ], -// { -// "crc": "0xb9f974d6" -// } -// -type IP4NbrCounter struct { - Address uint32 - LinkType uint8 - Packets uint64 - Bytes uint64 -} - -func (*IP4NbrCounter) GetTypeName() string { - return "ip4_nbr_counter" -} -func (*IP4NbrCounter) GetCrcString() string { - return "b9f974d6" -} - -// IP6FibCounter represents the VPP binary API data type 'ip6_fib_counter'. -// Generated from '../../bin_api/stats.api.json', line 848: -// -// "ip6_fib_counter", -// [ -// "u64", -// "address", -// 2 -// ], -// [ -// "u8", -// "address_length" -// ], -// [ -// "u64", -// "packets" -// ], -// [ -// "u64", -// "bytes" -// ], -// { -// "crc": "0xf1197efb" -// } -// -type IP6FibCounter struct { - Address []uint64 `struc:"[2]uint64"` - AddressLength uint8 - Packets uint64 - Bytes uint64 -} - -func (*IP6FibCounter) GetTypeName() string { - return "ip6_fib_counter" -} -func (*IP6FibCounter) GetCrcString() string { - return "f1197efb" -} - -// IP6MfibCounter represents the VPP binary API data type 'ip6_mfib_counter'. -// Generated from '../../bin_api/stats.api.json', line 871: -// -// "ip6_mfib_counter", -// [ -// "u8", -// "source", -// 16 -// ], -// [ -// "u8", -// "group", -// 16 -// ], -// [ -// "u8", -// "group_length" -// ], -// [ -// "u64", -// "packets" -// ], -// [ -// "u64", -// "bytes" -// ], -// { -// "crc": "0x90a9590e" -// } -// -type IP6MfibCounter struct { - Source []byte `struc:"[16]byte"` - Group []byte `struc:"[16]byte"` - GroupLength uint8 - Packets uint64 - Bytes uint64 -} - -func (*IP6MfibCounter) GetTypeName() string { - return "ip6_mfib_counter" -} -func (*IP6MfibCounter) GetCrcString() string { - return "90a9590e" -} - -// IP6NbrCounter represents the VPP binary API data type 'ip6_nbr_counter'. -// Generated from '../../bin_api/stats.api.json', line 899: -// -// "ip6_nbr_counter", -// [ -// "u64", -// "address", -// 2 -// ], -// [ -// "u8", -// "link_type" -// ], -// [ -// "u64", -// "packets" -// ], -// [ -// "u64", -// "bytes" -// ], -// { -// "crc": "0x2d755474" -// } -// -type IP6NbrCounter struct { - Address []uint64 `struc:"[2]uint64"` - LinkType uint8 - Packets uint64 - Bytes uint64 -} - -func (*IP6NbrCounter) GetTypeName() string { - return "ip6_nbr_counter" -} -func (*IP6NbrCounter) GetCrcString() string { - return "2d755474" -} - -// WantStats represents the VPP binary API message 'want_stats'. -// Generated from '../../bin_api/stats.api.json', line 68: -// -// "want_stats", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "enable_disable" -// ], -// [ -// "u32", -// "pid" -// ], -// { -// "crc": "0x476f5a08" -// } -// -type WantStats struct { - EnableDisable uint32 - Pid uint32 -} - -func (*WantStats) GetMessageName() string { - return "want_stats" -} -func (*WantStats) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*WantStats) GetCrcString() string { - return "476f5a08" -} -func NewWantStats() api.Message { - return &WantStats{} -} - -// WantStatsReply represents the VPP binary API message 'want_stats_reply'. -// Generated from '../../bin_api/stats.api.json', line 94: -// -// "want_stats_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type WantStatsReply struct { - Retval int32 -} - -func (*WantStatsReply) GetMessageName() string { - return "want_stats_reply" -} -func (*WantStatsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*WantStatsReply) GetCrcString() string { - return "e8d4e804" -} -func NewWantStatsReply() api.Message { - return &WantStatsReply{} -} - -// WantInterfaceSimpleStats represents the VPP binary API message 'want_interface_simple_stats'. -// Generated from '../../bin_api/stats.api.json', line 112: -// -// "want_interface_simple_stats", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "enable_disable" -// ], -// [ -// "u32", -// "pid" -// ], -// { -// "crc": "0x476f5a08" -// } -// -type WantInterfaceSimpleStats struct { - EnableDisable uint32 - Pid uint32 -} - -func (*WantInterfaceSimpleStats) GetMessageName() string { - return "want_interface_simple_stats" -} -func (*WantInterfaceSimpleStats) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*WantInterfaceSimpleStats) GetCrcString() string { - return "476f5a08" -} -func NewWantInterfaceSimpleStats() api.Message { - return &WantInterfaceSimpleStats{} -} - -// WantInterfaceSimpleStatsReply represents the VPP binary API message 'want_interface_simple_stats_reply'. -// Generated from '../../bin_api/stats.api.json', line 138: -// -// "want_interface_simple_stats_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type WantInterfaceSimpleStatsReply struct { - Retval int32 -} - -func (*WantInterfaceSimpleStatsReply) GetMessageName() string { - return "want_interface_simple_stats_reply" -} -func (*WantInterfaceSimpleStatsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*WantInterfaceSimpleStatsReply) GetCrcString() string { - return "e8d4e804" -} -func NewWantInterfaceSimpleStatsReply() api.Message { - return &WantInterfaceSimpleStatsReply{} -} - -// WantPerInterfaceSimpleStats represents the VPP binary API message 'want_per_interface_simple_stats'. -// Generated from '../../bin_api/stats.api.json', line 156: -// -// "want_per_interface_simple_stats", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "enable_disable" -// ], -// [ -// "u32", -// "pid" -// ], -// [ -// "u32", -// "num" -// ], -// [ -// "u32", -// "sw_ifs", -// 0, -// "num" -// ], -// { -// "crc": "0x729d04f1" -// } -// -type WantPerInterfaceSimpleStats struct { - EnableDisable uint32 - Pid uint32 - Num uint32 `struc:"sizeof=SwIfs"` - SwIfs []uint32 -} - -func (*WantPerInterfaceSimpleStats) GetMessageName() string { - return "want_per_interface_simple_stats" -} -func (*WantPerInterfaceSimpleStats) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*WantPerInterfaceSimpleStats) GetCrcString() string { - return "729d04f1" -} -func NewWantPerInterfaceSimpleStats() api.Message { - return &WantPerInterfaceSimpleStats{} -} - -// WantPerInterfaceSimpleStatsReply represents the VPP binary API message 'want_per_interface_simple_stats_reply'. -// Generated from '../../bin_api/stats.api.json', line 192: -// -// "want_per_interface_simple_stats_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type WantPerInterfaceSimpleStatsReply struct { - Retval int32 -} - -func (*WantPerInterfaceSimpleStatsReply) GetMessageName() string { - return "want_per_interface_simple_stats_reply" -} -func (*WantPerInterfaceSimpleStatsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*WantPerInterfaceSimpleStatsReply) GetCrcString() string { - return "e8d4e804" -} -func NewWantPerInterfaceSimpleStatsReply() api.Message { - return &WantPerInterfaceSimpleStatsReply{} -} - -// WantInterfaceCombinedStats represents the VPP binary API message 'want_interface_combined_stats'. -// Generated from '../../bin_api/stats.api.json', line 210: -// -// "want_interface_combined_stats", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "enable_disable" -// ], -// [ -// "u32", -// "pid" -// ], -// { -// "crc": "0x476f5a08" -// } -// -type WantInterfaceCombinedStats struct { - EnableDisable uint32 - Pid uint32 -} - -func (*WantInterfaceCombinedStats) GetMessageName() string { - return "want_interface_combined_stats" -} -func (*WantInterfaceCombinedStats) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*WantInterfaceCombinedStats) GetCrcString() string { - return "476f5a08" -} -func NewWantInterfaceCombinedStats() api.Message { - return &WantInterfaceCombinedStats{} -} - -// WantInterfaceCombinedStatsReply represents the VPP binary API message 'want_interface_combined_stats_reply'. -// Generated from '../../bin_api/stats.api.json', line 236: -// -// "want_interface_combined_stats_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type WantInterfaceCombinedStatsReply struct { - Retval int32 -} - -func (*WantInterfaceCombinedStatsReply) GetMessageName() string { - return "want_interface_combined_stats_reply" -} -func (*WantInterfaceCombinedStatsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*WantInterfaceCombinedStatsReply) GetCrcString() string { - return "e8d4e804" -} -func NewWantInterfaceCombinedStatsReply() api.Message { - return &WantInterfaceCombinedStatsReply{} -} - -// WantPerInterfaceCombinedStats represents the VPP binary API message 'want_per_interface_combined_stats'. -// Generated from '../../bin_api/stats.api.json', line 254: -// -// "want_per_interface_combined_stats", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "enable_disable" -// ], -// [ -// "u32", -// "pid" -// ], -// [ -// "u32", -// "num" -// ], -// [ -// "u32", -// "sw_ifs", -// 0, -// "num" -// ], -// { -// "crc": "0x729d04f1" -// } -// -type WantPerInterfaceCombinedStats struct { - EnableDisable uint32 - Pid uint32 - Num uint32 `struc:"sizeof=SwIfs"` - SwIfs []uint32 -} - -func (*WantPerInterfaceCombinedStats) GetMessageName() string { - return "want_per_interface_combined_stats" -} -func (*WantPerInterfaceCombinedStats) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*WantPerInterfaceCombinedStats) GetCrcString() string { - return "729d04f1" -} -func NewWantPerInterfaceCombinedStats() api.Message { - return &WantPerInterfaceCombinedStats{} -} - -// WantPerInterfaceCombinedStatsReply represents the VPP binary API message 'want_per_interface_combined_stats_reply'. -// Generated from '../../bin_api/stats.api.json', line 290: -// -// "want_per_interface_combined_stats_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type WantPerInterfaceCombinedStatsReply struct { - Retval int32 -} - -func (*WantPerInterfaceCombinedStatsReply) GetMessageName() string { - return "want_per_interface_combined_stats_reply" -} -func (*WantPerInterfaceCombinedStatsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*WantPerInterfaceCombinedStatsReply) GetCrcString() string { - return "e8d4e804" -} -func NewWantPerInterfaceCombinedStatsReply() api.Message { - return &WantPerInterfaceCombinedStatsReply{} -} - -// WantIP4FibStats represents the VPP binary API message 'want_ip4_fib_stats'. -// Generated from '../../bin_api/stats.api.json', line 308: -// -// "want_ip4_fib_stats", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "enable_disable" -// ], -// [ -// "u32", -// "pid" -// ], -// { -// "crc": "0x476f5a08" -// } -// -type WantIP4FibStats struct { - EnableDisable uint32 - Pid uint32 -} - -func (*WantIP4FibStats) GetMessageName() string { - return "want_ip4_fib_stats" -} -func (*WantIP4FibStats) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*WantIP4FibStats) GetCrcString() string { - return "476f5a08" -} -func NewWantIP4FibStats() api.Message { - return &WantIP4FibStats{} -} - -// WantIP4FibStatsReply represents the VPP binary API message 'want_ip4_fib_stats_reply'. -// Generated from '../../bin_api/stats.api.json', line 334: -// -// "want_ip4_fib_stats_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type WantIP4FibStatsReply struct { - Retval int32 -} - -func (*WantIP4FibStatsReply) GetMessageName() string { - return "want_ip4_fib_stats_reply" -} -func (*WantIP4FibStatsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*WantIP4FibStatsReply) GetCrcString() string { - return "e8d4e804" -} -func NewWantIP4FibStatsReply() api.Message { - return &WantIP4FibStatsReply{} -} - -// WantIP6FibStats represents the VPP binary API message 'want_ip6_fib_stats'. -// Generated from '../../bin_api/stats.api.json', line 352: -// -// "want_ip6_fib_stats", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "enable_disable" -// ], -// [ -// "u32", -// "pid" -// ], -// { -// "crc": "0x476f5a08" -// } -// -type WantIP6FibStats struct { - EnableDisable uint32 - Pid uint32 -} - -func (*WantIP6FibStats) GetMessageName() string { - return "want_ip6_fib_stats" -} -func (*WantIP6FibStats) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*WantIP6FibStats) GetCrcString() string { - return "476f5a08" -} -func NewWantIP6FibStats() api.Message { - return &WantIP6FibStats{} -} - -// WantIP6FibStatsReply represents the VPP binary API message 'want_ip6_fib_stats_reply'. -// Generated from '../../bin_api/stats.api.json', line 378: -// -// "want_ip6_fib_stats_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type WantIP6FibStatsReply struct { - Retval int32 -} - -func (*WantIP6FibStatsReply) GetMessageName() string { - return "want_ip6_fib_stats_reply" -} -func (*WantIP6FibStatsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*WantIP6FibStatsReply) GetCrcString() string { - return "e8d4e804" -} -func NewWantIP6FibStatsReply() api.Message { - return &WantIP6FibStatsReply{} -} - -// WantIP4MfibStats represents the VPP binary API message 'want_ip4_mfib_stats'. -// Generated from '../../bin_api/stats.api.json', line 396: -// -// "want_ip4_mfib_stats", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "enable_disable" -// ], -// [ -// "u32", -// "pid" -// ], -// { -// "crc": "0x476f5a08" -// } -// -type WantIP4MfibStats struct { - EnableDisable uint32 - Pid uint32 -} - -func (*WantIP4MfibStats) GetMessageName() string { - return "want_ip4_mfib_stats" -} -func (*WantIP4MfibStats) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*WantIP4MfibStats) GetCrcString() string { - return "476f5a08" -} -func NewWantIP4MfibStats() api.Message { - return &WantIP4MfibStats{} -} - -// WantIP4MfibStatsReply represents the VPP binary API message 'want_ip4_mfib_stats_reply'. -// Generated from '../../bin_api/stats.api.json', line 422: -// -// "want_ip4_mfib_stats_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type WantIP4MfibStatsReply struct { - Retval int32 -} - -func (*WantIP4MfibStatsReply) GetMessageName() string { - return "want_ip4_mfib_stats_reply" -} -func (*WantIP4MfibStatsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*WantIP4MfibStatsReply) GetCrcString() string { - return "e8d4e804" -} -func NewWantIP4MfibStatsReply() api.Message { - return &WantIP4MfibStatsReply{} -} - -// WantIP6MfibStats represents the VPP binary API message 'want_ip6_mfib_stats'. -// Generated from '../../bin_api/stats.api.json', line 440: -// -// "want_ip6_mfib_stats", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "enable_disable" -// ], -// [ -// "u32", -// "pid" -// ], -// { -// "crc": "0x476f5a08" -// } -// -type WantIP6MfibStats struct { - EnableDisable uint32 - Pid uint32 -} - -func (*WantIP6MfibStats) GetMessageName() string { - return "want_ip6_mfib_stats" -} -func (*WantIP6MfibStats) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*WantIP6MfibStats) GetCrcString() string { - return "476f5a08" -} -func NewWantIP6MfibStats() api.Message { - return &WantIP6MfibStats{} -} - -// WantIP6MfibStatsReply represents the VPP binary API message 'want_ip6_mfib_stats_reply'. -// Generated from '../../bin_api/stats.api.json', line 466: -// -// "want_ip6_mfib_stats_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type WantIP6MfibStatsReply struct { - Retval int32 -} - -func (*WantIP6MfibStatsReply) GetMessageName() string { - return "want_ip6_mfib_stats_reply" -} -func (*WantIP6MfibStatsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*WantIP6MfibStatsReply) GetCrcString() string { - return "e8d4e804" -} -func NewWantIP6MfibStatsReply() api.Message { - return &WantIP6MfibStatsReply{} -} - -// WantIP4NbrStats represents the VPP binary API message 'want_ip4_nbr_stats'. -// Generated from '../../bin_api/stats.api.json', line 484: -// -// "want_ip4_nbr_stats", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "enable_disable" -// ], -// [ -// "u32", -// "pid" -// ], -// { -// "crc": "0x476f5a08" -// } -// -type WantIP4NbrStats struct { - EnableDisable uint32 - Pid uint32 -} - -func (*WantIP4NbrStats) GetMessageName() string { - return "want_ip4_nbr_stats" -} -func (*WantIP4NbrStats) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*WantIP4NbrStats) GetCrcString() string { - return "476f5a08" -} -func NewWantIP4NbrStats() api.Message { - return &WantIP4NbrStats{} -} - -// WantIP4NbrStatsReply represents the VPP binary API message 'want_ip4_nbr_stats_reply'. -// Generated from '../../bin_api/stats.api.json', line 510: -// -// "want_ip4_nbr_stats_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type WantIP4NbrStatsReply struct { - Retval int32 -} - -func (*WantIP4NbrStatsReply) GetMessageName() string { - return "want_ip4_nbr_stats_reply" -} -func (*WantIP4NbrStatsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*WantIP4NbrStatsReply) GetCrcString() string { - return "e8d4e804" -} -func NewWantIP4NbrStatsReply() api.Message { - return &WantIP4NbrStatsReply{} -} - -// WantIP6NbrStats represents the VPP binary API message 'want_ip6_nbr_stats'. -// Generated from '../../bin_api/stats.api.json', line 528: -// -// "want_ip6_nbr_stats", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "enable_disable" -// ], -// [ -// "u32", -// "pid" -// ], -// { -// "crc": "0x476f5a08" -// } -// -type WantIP6NbrStats struct { - EnableDisable uint32 - Pid uint32 -} - -func (*WantIP6NbrStats) GetMessageName() string { - return "want_ip6_nbr_stats" -} -func (*WantIP6NbrStats) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*WantIP6NbrStats) GetCrcString() string { - return "476f5a08" -} -func NewWantIP6NbrStats() api.Message { - return &WantIP6NbrStats{} -} - -// WantIP6NbrStatsReply represents the VPP binary API message 'want_ip6_nbr_stats_reply'. -// Generated from '../../bin_api/stats.api.json', line 554: -// -// "want_ip6_nbr_stats_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type WantIP6NbrStatsReply struct { - Retval int32 -} - -func (*WantIP6NbrStatsReply) GetMessageName() string { - return "want_ip6_nbr_stats_reply" -} -func (*WantIP6NbrStatsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*WantIP6NbrStatsReply) GetCrcString() string { - return "e8d4e804" -} -func NewWantIP6NbrStatsReply() api.Message { - return &WantIP6NbrStatsReply{} -} - -// VnetIP4FibCounters represents the VPP binary API message 'vnet_ip4_fib_counters'. -// Generated from '../../bin_api/stats.api.json', line 572: -// -// "vnet_ip4_fib_counters", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "vrf_id" -// ], -// [ -// "u32", -// "count" -// ], -// [ -// "vl_api_ip4_fib_counter_t", -// "c", -// 0, -// "count" -// ], -// { -// "crc": "0x57e3feec" -// } -// -type VnetIP4FibCounters struct { - VrfID uint32 - Count uint32 `struc:"sizeof=C"` - C []IP4FibCounter -} - -func (*VnetIP4FibCounters) GetMessageName() string { - return "vnet_ip4_fib_counters" -} -func (*VnetIP4FibCounters) GetMessageType() api.MessageType { - return api.OtherMessage -} -func (*VnetIP4FibCounters) GetCrcString() string { - return "57e3feec" -} -func NewVnetIP4FibCounters() api.Message { - return &VnetIP4FibCounters{} -} - -// VnetIP4MfibCounters represents the VPP binary API message 'vnet_ip4_mfib_counters'. -// Generated from '../../bin_api/stats.api.json', line 596: -// -// "vnet_ip4_mfib_counters", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "vrf_id" -// ], -// [ -// "u32", -// "count" -// ], -// [ -// "vl_api_ip4_mfib_counter_t", -// "c", -// 0, -// "count" -// ], -// { -// "crc": "0x946eb588" -// } -// -type VnetIP4MfibCounters struct { - VrfID uint32 - Count uint32 `struc:"sizeof=C"` - C []IP4MfibCounter -} - -func (*VnetIP4MfibCounters) GetMessageName() string { - return "vnet_ip4_mfib_counters" -} -func (*VnetIP4MfibCounters) GetMessageType() api.MessageType { - return api.OtherMessage -} -func (*VnetIP4MfibCounters) GetCrcString() string { - return "946eb588" -} -func NewVnetIP4MfibCounters() api.Message { - return &VnetIP4MfibCounters{} -} - -// VnetIP4NbrCounters represents the VPP binary API message 'vnet_ip4_nbr_counters'. -// Generated from '../../bin_api/stats.api.json', line 620: -// -// "vnet_ip4_nbr_counters", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "count" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "begin" -// ], -// [ -// "vl_api_ip4_nbr_counter_t", -// "c", -// 0, -// "count" -// ], -// { -// "crc": "0x214c4811" -// } -// -type VnetIP4NbrCounters struct { - Count uint32 `struc:"sizeof=C"` - SwIfIndex uint32 - Begin uint8 - C []IP4NbrCounter -} - -func (*VnetIP4NbrCounters) GetMessageName() string { - return "vnet_ip4_nbr_counters" -} -func (*VnetIP4NbrCounters) GetMessageType() api.MessageType { - return api.OtherMessage -} -func (*VnetIP4NbrCounters) GetCrcString() string { - return "214c4811" -} -func NewVnetIP4NbrCounters() api.Message { - return &VnetIP4NbrCounters{} -} - -// VnetIP6FibCounters represents the VPP binary API message 'vnet_ip6_fib_counters'. -// Generated from '../../bin_api/stats.api.json', line 648: -// -// "vnet_ip6_fib_counters", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "vrf_id" -// ], -// [ -// "u32", -// "count" -// ], -// [ -// "vl_api_ip6_fib_counter_t", -// "c", -// 0, -// "count" -// ], -// { -// "crc": "0x13aed73d" -// } -// -type VnetIP6FibCounters struct { - VrfID uint32 - Count uint32 `struc:"sizeof=C"` - C []IP6FibCounter -} - -func (*VnetIP6FibCounters) GetMessageName() string { - return "vnet_ip6_fib_counters" -} -func (*VnetIP6FibCounters) GetMessageType() api.MessageType { - return api.OtherMessage -} -func (*VnetIP6FibCounters) GetCrcString() string { - return "13aed73d" -} -func NewVnetIP6FibCounters() api.Message { - return &VnetIP6FibCounters{} -} - -// VnetIP6MfibCounters represents the VPP binary API message 'vnet_ip6_mfib_counters'. -// Generated from '../../bin_api/stats.api.json', line 672: -// -// "vnet_ip6_mfib_counters", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "vrf_id" -// ], -// [ -// "u32", -// "count" -// ], -// [ -// "vl_api_ip6_mfib_counter_t", -// "c", -// 0, -// "count" -// ], -// { -// "crc": "0x65fe1ae3" -// } -// -type VnetIP6MfibCounters struct { - VrfID uint32 - Count uint32 `struc:"sizeof=C"` - C []IP6MfibCounter -} - -func (*VnetIP6MfibCounters) GetMessageName() string { - return "vnet_ip6_mfib_counters" -} -func (*VnetIP6MfibCounters) GetMessageType() api.MessageType { - return api.OtherMessage -} -func (*VnetIP6MfibCounters) GetCrcString() string { - return "65fe1ae3" -} -func NewVnetIP6MfibCounters() api.Message { - return &VnetIP6MfibCounters{} -} - -// VnetIP6NbrCounters represents the VPP binary API message 'vnet_ip6_nbr_counters'. -// Generated from '../../bin_api/stats.api.json', line 696: -// -// "vnet_ip6_nbr_counters", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "count" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "begin" -// ], -// [ -// "vl_api_ip6_nbr_counter_t", -// "c", -// 0, -// "count" -// ], -// { -// "crc": "0x650161c0" -// } -// -type VnetIP6NbrCounters struct { - Count uint32 `struc:"sizeof=C"` - SwIfIndex uint32 - Begin uint8 - C []IP6NbrCounter -} - -func (*VnetIP6NbrCounters) GetMessageName() string { - return "vnet_ip6_nbr_counters" -} -func (*VnetIP6NbrCounters) GetMessageType() api.MessageType { - return api.OtherMessage -} -func (*VnetIP6NbrCounters) GetCrcString() string { - return "650161c0" -} -func NewVnetIP6NbrCounters() api.Message { - return &VnetIP6NbrCounters{} -} - -// VnetGetSummaryStats represents the VPP binary API message 'vnet_get_summary_stats'. -// Generated from '../../bin_api/stats.api.json', line 724: -// -// "vnet_get_summary_stats", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// { -// "crc": "0x51077d14" -// } -// -type VnetGetSummaryStats struct { -} - -func (*VnetGetSummaryStats) GetMessageName() string { - return "vnet_get_summary_stats" -} -func (*VnetGetSummaryStats) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*VnetGetSummaryStats) GetCrcString() string { - return "51077d14" -} -func NewVnetGetSummaryStats() api.Message { - return &VnetGetSummaryStats{} -} - -// VnetGetSummaryStatsReply represents the VPP binary API message 'vnet_get_summary_stats_reply'. -// Generated from '../../bin_api/stats.api.json', line 742: -// -// "vnet_get_summary_stats_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// [ -// "u64", -// "total_pkts", -// 2 -// ], -// [ -// "u64", -// "total_bytes", -// 2 -// ], -// [ -// "f64", -// "vector_rate" -// ], -// { -// "crc": "0x32b87c56" -// } -// -type VnetGetSummaryStatsReply struct { - Retval int32 - TotalPkts []uint64 `struc:"[2]uint64"` - TotalBytes []uint64 `struc:"[2]uint64"` - VectorRate float64 -} - -func (*VnetGetSummaryStatsReply) GetMessageName() string { - return "vnet_get_summary_stats_reply" -} -func (*VnetGetSummaryStatsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*VnetGetSummaryStatsReply) GetCrcString() string { - return "32b87c56" -} -func NewVnetGetSummaryStatsReply() api.Message { - return &VnetGetSummaryStatsReply{} -} diff --git a/examples/bin_api/tap.api.json b/examples/bin_api/tap.api.json index 3b09caa..5a0ab74 100644 --- a/examples/bin_api/tap.api.json +++ b/examples/bin_api/tap.api.json @@ -1,29 +1,4 @@ { - "services": [ - { - "sw_interface_tap_dump": { - "reply": "sw_interface_tap_details", - "stream": true - } - }, - { - "tap_connect": { - "reply": "tap_connect_reply" - } - }, - { - "tap_modify": { - "reply": "tap_modify_reply" - } - }, - { - "tap_delete": { - "reply": "tap_delete_reply" - } - } - ], - "vl_api_version": "0x3a0725de", - "enums": [], "messages": [ [ "tap_connect", @@ -266,5 +241,23 @@ } ] ], + "vl_api_version": "0xacec1ba1", + "unions": [], + "services": { + "tap_delete": { + "reply": "tap_delete_reply" + }, + "sw_interface_tap_dump": { + "reply": "sw_interface_tap_details", + "stream": true + }, + "tap_modify": { + "reply": "tap_modify_reply" + }, + "tap_connect": { + "reply": "tap_connect_reply" + } + }, + "enums": [], "types": [] } diff --git a/examples/bin_api/tap/tap.ba.go b/examples/bin_api/tap/tap.ba.go new file mode 100644 index 0000000..36f5549 --- /dev/null +++ b/examples/bin_api/tap/tap.ba.go @@ -0,0 +1,453 @@ +// Code generated by GoVPP binapi-generator. DO NOT EDIT. +// source: tap.api.json + +/* +Package tap is a generated VPP binary API of the 'tap' VPP module. + +It is generated from this file: + tap.api.json + +It contains these VPP binary API objects: + 8 messages + 4 services +*/ +package tap + +import "git.fd.io/govpp.git/api" +import "github.com/lunixbochs/struc" +import "bytes" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = struc.Pack +var _ = bytes.NewBuffer + +/* Messages */ + +// TapConnect represents the VPP binary API message 'tap_connect'. +// Generated from 'tap.api.json', line 4: +// +// "tap_connect", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "use_random_mac" +// ], +// [ +// "u8", +// "tap_name", +// 64 +// ], +// [ +// "u8", +// "mac_address", +// 6 +// ], +// [ +// "u8", +// "renumber" +// ], +// [ +// "u32", +// "custom_dev_instance" +// ], +// [ +// "u8", +// "ip4_address_set" +// ], +// [ +// "u8", +// "ip4_address", +// 4 +// ], +// [ +// "u8", +// "ip4_mask_width" +// ], +// [ +// "u8", +// "ip6_address_set" +// ], +// [ +// "u8", +// "ip6_address", +// 16 +// ], +// [ +// "u8", +// "ip6_mask_width" +// ], +// [ +// "u8", +// "tag", +// 64 +// ], +// { +// "crc": "0x9b9c396f" +// } +// +type TapConnect struct { + UseRandomMac uint8 + TapName []byte `struc:"[64]byte"` + MacAddress []byte `struc:"[6]byte"` + Renumber uint8 + CustomDevInstance uint32 + IP4AddressSet uint8 + IP4Address []byte `struc:"[4]byte"` + IP4MaskWidth uint8 + IP6AddressSet uint8 + IP6Address []byte `struc:"[16]byte"` + IP6MaskWidth uint8 + Tag []byte `struc:"[64]byte"` +} + +func (*TapConnect) GetMessageName() string { + return "tap_connect" +} +func (*TapConnect) GetCrcString() string { + return "9b9c396f" +} +func (*TapConnect) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewTapConnect() api.Message { + return &TapConnect{} +} + +// TapConnectReply represents the VPP binary API message 'tap_connect_reply'. +// Generated from 'tap.api.json', line 75: +// +// "tap_connect_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0xfda5941f" +// } +// +type TapConnectReply struct { + Retval int32 + SwIfIndex uint32 +} + +func (*TapConnectReply) GetMessageName() string { + return "tap_connect_reply" +} +func (*TapConnectReply) GetCrcString() string { + return "fda5941f" +} +func (*TapConnectReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewTapConnectReply() api.Message { + return &TapConnectReply{} +} + +// TapModify represents the VPP binary API message 'tap_modify'. +// Generated from 'tap.api.json', line 97: +// +// "tap_modify", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "use_random_mac" +// ], +// [ +// "u8", +// "tap_name", +// 64 +// ], +// [ +// "u8", +// "mac_address", +// 6 +// ], +// [ +// "u8", +// "renumber" +// ], +// [ +// "u32", +// "custom_dev_instance" +// ], +// { +// "crc": "0x8047ae5c" +// } +// +type TapModify struct { + SwIfIndex uint32 + UseRandomMac uint8 + TapName []byte `struc:"[64]byte"` + MacAddress []byte `struc:"[6]byte"` + Renumber uint8 + CustomDevInstance uint32 +} + +func (*TapModify) GetMessageName() string { + return "tap_modify" +} +func (*TapModify) GetCrcString() string { + return "8047ae5c" +} +func (*TapModify) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewTapModify() api.Message { + return &TapModify{} +} + +// TapModifyReply represents the VPP binary API message 'tap_modify_reply'. +// Generated from 'tap.api.json', line 141: +// +// "tap_modify_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0xfda5941f" +// } +// +type TapModifyReply struct { + Retval int32 + SwIfIndex uint32 +} + +func (*TapModifyReply) GetMessageName() string { + return "tap_modify_reply" +} +func (*TapModifyReply) GetCrcString() string { + return "fda5941f" +} +func (*TapModifyReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewTapModifyReply() api.Message { + return &TapModifyReply{} +} + +// TapDelete represents the VPP binary API message 'tap_delete'. +// Generated from 'tap.api.json', line 163: +// +// "tap_delete", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0x529cb13f" +// } +// +type TapDelete struct { + SwIfIndex uint32 +} + +func (*TapDelete) GetMessageName() string { + return "tap_delete" +} +func (*TapDelete) GetCrcString() string { + return "529cb13f" +} +func (*TapDelete) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewTapDelete() api.Message { + return &TapDelete{} +} + +// TapDeleteReply represents the VPP binary API message 'tap_delete_reply'. +// Generated from 'tap.api.json', line 185: +// +// "tap_delete_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } +// +type TapDeleteReply struct { + Retval int32 +} + +func (*TapDeleteReply) GetMessageName() string { + return "tap_delete_reply" +} +func (*TapDeleteReply) GetCrcString() string { + return "e8d4e804" +} +func (*TapDeleteReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewTapDeleteReply() api.Message { + return &TapDeleteReply{} +} + +// SwInterfaceTapDump represents the VPP binary API message 'sw_interface_tap_dump'. +// Generated from 'tap.api.json', line 203: +// +// "sw_interface_tap_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// { +// "crc": "0x51077d14" +// } +// +type SwInterfaceTapDump struct{} + +func (*SwInterfaceTapDump) GetMessageName() string { + return "sw_interface_tap_dump" +} +func (*SwInterfaceTapDump) GetCrcString() string { + return "51077d14" +} +func (*SwInterfaceTapDump) GetMessageType() api.MessageType { + return api.RequestMessage +} +func NewSwInterfaceTapDump() api.Message { + return &SwInterfaceTapDump{} +} + +// SwInterfaceTapDetails represents the VPP binary API message 'sw_interface_tap_details'. +// Generated from 'tap.api.json', line 221: +// +// "sw_interface_tap_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "dev_name", +// 64 +// ], +// { +// "crc": "0x76229a57" +// } +// +type SwInterfaceTapDetails struct { + SwIfIndex uint32 + DevName []byte `struc:"[64]byte"` +} + +func (*SwInterfaceTapDetails) GetMessageName() string { + return "sw_interface_tap_details" +} +func (*SwInterfaceTapDetails) GetCrcString() string { + return "76229a57" +} +func (*SwInterfaceTapDetails) GetMessageType() api.MessageType { + return api.ReplyMessage +} +func NewSwInterfaceTapDetails() api.Message { + return &SwInterfaceTapDetails{} +} + +/* Services */ + +type Services interface { + DumpSwInterfaceTap(*SwInterfaceTapDump) (*SwInterfaceTapDetails, error) + TapConnect(*TapConnect) (*TapConnectReply, error) + TapDelete(*TapDelete) (*TapDeleteReply, error) + TapModify(*TapModify) (*TapModifyReply, error) +} + +func init() { + api.RegisterMessage((*TapConnect)(nil), "tap.TapConnect") + api.RegisterMessage((*TapConnectReply)(nil), "tap.TapConnectReply") + api.RegisterMessage((*TapModify)(nil), "tap.TapModify") + api.RegisterMessage((*TapModifyReply)(nil), "tap.TapModifyReply") + api.RegisterMessage((*TapDelete)(nil), "tap.TapDelete") + api.RegisterMessage((*TapDeleteReply)(nil), "tap.TapDeleteReply") + api.RegisterMessage((*SwInterfaceTapDump)(nil), "tap.SwInterfaceTapDump") + api.RegisterMessage((*SwInterfaceTapDetails)(nil), "tap.SwInterfaceTapDetails") +} diff --git a/examples/bin_api/tap/tap.go b/examples/bin_api/tap/tap.go deleted file mode 100644 index f7d6745..0000000 --- a/examples/bin_api/tap/tap.go +++ /dev/null @@ -1,419 +0,0 @@ -// Code generated by govpp binapi-generator DO NOT EDIT. -// Package tap represents the VPP binary API of the 'tap' VPP module. -// Generated from '../../bin_api/tap.api.json' -package tap - -import "git.fd.io/govpp.git/api" - -// VlApiVersion contains version of the API. -const VlAPIVersion = 0x3a0725de - -// TapConnect represents the VPP binary API message 'tap_connect'. -// Generated from '../../bin_api/tap.api.json', line 29: -// -// "tap_connect", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "use_random_mac" -// ], -// [ -// "u8", -// "tap_name", -// 64 -// ], -// [ -// "u8", -// "mac_address", -// 6 -// ], -// [ -// "u8", -// "renumber" -// ], -// [ -// "u32", -// "custom_dev_instance" -// ], -// [ -// "u8", -// "ip4_address_set" -// ], -// [ -// "u8", -// "ip4_address", -// 4 -// ], -// [ -// "u8", -// "ip4_mask_width" -// ], -// [ -// "u8", -// "ip6_address_set" -// ], -// [ -// "u8", -// "ip6_address", -// 16 -// ], -// [ -// "u8", -// "ip6_mask_width" -// ], -// [ -// "u8", -// "tag", -// 64 -// ], -// { -// "crc": "0x9b9c396f" -// } -// -type TapConnect struct { - UseRandomMac uint8 - TapName []byte `struc:"[64]byte"` - MacAddress []byte `struc:"[6]byte"` - Renumber uint8 - CustomDevInstance uint32 - IP4AddressSet uint8 - IP4Address []byte `struc:"[4]byte"` - IP4MaskWidth uint8 - IP6AddressSet uint8 - IP6Address []byte `struc:"[16]byte"` - IP6MaskWidth uint8 - Tag []byte `struc:"[64]byte"` -} - -func (*TapConnect) GetMessageName() string { - return "tap_connect" -} -func (*TapConnect) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*TapConnect) GetCrcString() string { - return "9b9c396f" -} -func NewTapConnect() api.Message { - return &TapConnect{} -} - -// TapConnectReply represents the VPP binary API message 'tap_connect_reply'. -// Generated from '../../bin_api/tap.api.json', line 100: -// -// "tap_connect_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// { -// "crc": "0xfda5941f" -// } -// -type TapConnectReply struct { - Retval int32 - SwIfIndex uint32 -} - -func (*TapConnectReply) GetMessageName() string { - return "tap_connect_reply" -} -func (*TapConnectReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*TapConnectReply) GetCrcString() string { - return "fda5941f" -} -func NewTapConnectReply() api.Message { - return &TapConnectReply{} -} - -// TapModify represents the VPP binary API message 'tap_modify'. -// Generated from '../../bin_api/tap.api.json', line 122: -// -// "tap_modify", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "use_random_mac" -// ], -// [ -// "u8", -// "tap_name", -// 64 -// ], -// [ -// "u8", -// "mac_address", -// 6 -// ], -// [ -// "u8", -// "renumber" -// ], -// [ -// "u32", -// "custom_dev_instance" -// ], -// { -// "crc": "0x8047ae5c" -// } -// -type TapModify struct { - SwIfIndex uint32 - UseRandomMac uint8 - TapName []byte `struc:"[64]byte"` - MacAddress []byte `struc:"[6]byte"` - Renumber uint8 - CustomDevInstance uint32 -} - -func (*TapModify) GetMessageName() string { - return "tap_modify" -} -func (*TapModify) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*TapModify) GetCrcString() string { - return "8047ae5c" -} -func NewTapModify() api.Message { - return &TapModify{} -} - -// TapModifyReply represents the VPP binary API message 'tap_modify_reply'. -// Generated from '../../bin_api/tap.api.json', line 166: -// -// "tap_modify_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// { -// "crc": "0xfda5941f" -// } -// -type TapModifyReply struct { - Retval int32 - SwIfIndex uint32 -} - -func (*TapModifyReply) GetMessageName() string { - return "tap_modify_reply" -} -func (*TapModifyReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*TapModifyReply) GetCrcString() string { - return "fda5941f" -} -func NewTapModifyReply() api.Message { - return &TapModifyReply{} -} - -// TapDelete represents the VPP binary API message 'tap_delete'. -// Generated from '../../bin_api/tap.api.json', line 188: -// -// "tap_delete", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// { -// "crc": "0x529cb13f" -// } -// -type TapDelete struct { - SwIfIndex uint32 -} - -func (*TapDelete) GetMessageName() string { - return "tap_delete" -} -func (*TapDelete) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*TapDelete) GetCrcString() string { - return "529cb13f" -} -func NewTapDelete() api.Message { - return &TapDelete{} -} - -// TapDeleteReply represents the VPP binary API message 'tap_delete_reply'. -// Generated from '../../bin_api/tap.api.json', line 210: -// -// "tap_delete_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } -// -type TapDeleteReply struct { - Retval int32 -} - -func (*TapDeleteReply) GetMessageName() string { - return "tap_delete_reply" -} -func (*TapDeleteReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*TapDeleteReply) GetCrcString() string { - return "e8d4e804" -} -func NewTapDeleteReply() api.Message { - return &TapDeleteReply{} -} - -// SwInterfaceTapDump represents the VPP binary API message 'sw_interface_tap_dump'. -// Generated from '../../bin_api/tap.api.json', line 228: -// -// "sw_interface_tap_dump", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// { -// "crc": "0x51077d14" -// } -// -type SwInterfaceTapDump struct { -} - -func (*SwInterfaceTapDump) GetMessageName() string { - return "sw_interface_tap_dump" -} -func (*SwInterfaceTapDump) GetMessageType() api.MessageType { - return api.RequestMessage -} -func (*SwInterfaceTapDump) GetCrcString() string { - return "51077d14" -} -func NewSwInterfaceTapDump() api.Message { - return &SwInterfaceTapDump{} -} - -// SwInterfaceTapDetails represents the VPP binary API message 'sw_interface_tap_details'. -// Generated from '../../bin_api/tap.api.json', line 246: -// -// "sw_interface_tap_details", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "dev_name", -// 64 -// ], -// { -// "crc": "0x76229a57" -// } -// -type SwInterfaceTapDetails struct { - SwIfIndex uint32 - DevName []byte `struc:"[64]byte"` -} - -func (*SwInterfaceTapDetails) GetMessageName() string { - return "sw_interface_tap_details" -} -func (*SwInterfaceTapDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} -func (*SwInterfaceTapDetails) GetCrcString() string { - return "76229a57" -} -func NewSwInterfaceTapDetails() api.Message { - return &SwInterfaceTapDetails{} -} diff --git a/examples/cmd/simple-client/simple_client.go b/examples/cmd/simple-client/simple_client.go index 7b7dbcd..b9e8052 100644 --- a/examples/cmd/simple-client/simple_client.go +++ b/examples/cmd/simple-client/simple_client.go @@ -12,23 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Binary simple-client is an example VPP management application that exercises the +// simple-client is an example VPP management application that exercises the // govpp API on real-world use-cases. package main -// Generates Go bindings for all VPP APIs located in the json directory. -//go:generate binapi-generator --input-dir=../../bin_api --output-dir=../../bin_api - import ( "fmt" "net" "os" + "strings" "git.fd.io/govpp.git" "git.fd.io/govpp.git/api" "git.fd.io/govpp.git/examples/bin_api/acl" "git.fd.io/govpp.git/examples/bin_api/interfaces" - "git.fd.io/govpp.git/examples/bin_api/tap" + "git.fd.io/govpp.git/examples/bin_api/ip" ) func main() { @@ -50,31 +48,18 @@ func main() { } defer ch.Close() - // check whether the VPP supports our version of some messages - compatibilityCheck(ch) - // individual examples aclVersion(ch) aclConfig(ch) aclDump(ch) - tapConnect(ch) - interfaceDump(ch) - interfaceNotifications(ch) -} + ipAddressDump(ch) -// compatibilityCheck shows how an management application can check whether generated API messages are -// compatible with the version of VPP which the library is connected to. -func compatibilityCheck(ch api.Channel) { - err := ch.CheckMessageCompatibility( - &interfaces.SwInterfaceDump{}, - &interfaces.SwInterfaceDetails{}, - ) - if err != nil { - fmt.Println(err) - os.Exit(1) - } + setIpUnnumbered(ch) + ipUnnumberedDump(ch) + + interfaceNotifications(ch) } // aclVersion is the simplest API example - one empty request message and one reply message. @@ -121,9 +106,15 @@ func aclConfig(ch api.Channel) { if err != nil { fmt.Println("Error:", err) - } else { - fmt.Printf("%+v\n", reply) + return } + if reply.Retval != 0 { + fmt.Println("Retval:", reply.Retval) + return + } + + fmt.Printf("%+v\n", reply) + } // aclDump shows an example where SendRequest and ReceiveReply are not chained together. @@ -131,60 +122,91 @@ func aclDump(ch api.Channel) { req := &acl.ACLDump{} reply := &acl.ACLDetails{} - reqCtx := ch.SendRequest(req) - err := reqCtx.ReceiveReply(reply) - - if err != nil { + if err := ch.SendRequest(req).ReceiveReply(reply); err != nil { fmt.Println("Error:", err) } else { fmt.Printf("%+v\n", reply) } } -// tapConnect example shows how the Go channels in the API channel can be accessed directly instead -// of using SendRequest and ReceiveReply wrappers. -func tapConnect(ch api.Channel) { - req := &tap.TapConnect{ - TapName: []byte("testtap"), - UseRandomMac: 1, +// interfaceDump shows an example of multipart request (multiple replies are expected). +func interfaceDump(ch api.Channel) { + fmt.Println("Dumping interfaces") + + req := &interfaces.SwInterfaceDump{} + reqCtx := ch.SendMultiRequest(req) + + for { + msg := &interfaces.SwInterfaceDetails{} + stop, err := reqCtx.ReceiveReply(msg) + if stop { + break // break out of the loop + } + if err != nil { + fmt.Println("ERROR:", err) + } + ifaceName := strings.TrimFunc(string(msg.InterfaceName), func(r rune) bool { + return r == 0x00 + }) + fmt.Printf("Interface: %q %+v\n", ifaceName, msg) } +} - // send the request to the request go channel - ch.GetRequestChannel() <- &api.VppRequest{Message: req} +func ipAddressDump(ch api.Channel) { + fmt.Println("Dumping IP addresses") - // receive a reply from the reply go channel - vppReply := <-ch.GetReplyChannel() - if vppReply.Error != nil { - fmt.Println("Error:", vppReply.Error) - return + req := &ip.IPAddressDump{ + SwIfIndex: 1, //^uint32(0), } + reqCtx := ch.SendMultiRequest(req) - // decode the message - reply := &tap.TapConnectReply{} - err := ch.GetMessageDecoder().DecodeMsg(vppReply.Data, reply) + for { + msg := &ip.IPAddressDetails{} + stop, err := reqCtx.ReceiveReply(msg) + if stop { + break // break out of the loop + } + if err != nil { + fmt.Println("ERROR:", err) + } + fmt.Printf("ip address: %d %+v\n", msg.SwIfIndex, msg) + } +} - if err != nil { +// aclDump shows an example where SendRequest and ReceiveReply are not chained together. +func setIpUnnumbered(ch api.Channel) { + req := &interfaces.SwInterfaceSetUnnumbered{ + SwIfIndex: 1, + UnnumberedSwIfIndex: 2, + IsAdd: 1, + } + reply := &interfaces.SwInterfaceSetUnnumberedReply{} + + if err := ch.SendRequest(req).ReceiveReply(reply); err != nil { fmt.Println("Error:", err) } else { fmt.Printf("%+v\n", reply) } } -// interfaceDump shows an example of multipart request (multiple replies are expected). -func interfaceDump(ch api.Channel) { - req := &interfaces.SwInterfaceDump{} +func ipUnnumberedDump(ch api.Channel) { + fmt.Println("Dumping IP unnumbered") + + req := &ip.IPUnnumberedDump{ + SwIfIndex: ^uint32(0), + } reqCtx := ch.SendMultiRequest(req) for { - msg := &interfaces.SwInterfaceDetails{} + msg := &ip.IPUnnumberedDetails{} stop, err := reqCtx.ReceiveReply(msg) if stop { break // break out of the loop } if err != nil { - fmt.Println("Error:", err) + fmt.Println("ERROR:", err) } - fmt.Printf("%+v\n", msg) + fmt.Printf("ip unnumbered: %+v\n", msg) } } @@ -194,28 +216,52 @@ func interfaceDump(ch api.Channel) { func interfaceNotifications(ch api.Channel) { // subscribe for specific notification message notifChan := make(chan api.Message, 100) - subs, _ := ch.SubscribeNotification(notifChan, interfaces.NewSwInterfaceSetFlags) + subs, err := ch.SubscribeNotification(notifChan, interfaces.NewSwInterfaceEvent) + if err != nil { + panic(err) + } // enable interface events in VPP - ch.SendRequest(&interfaces.WantInterfaceEvents{ - Pid: uint32(os.Getpid()), + err = ch.SendRequest(&interfaces.WantInterfaceEvents{ + PID: uint32(os.Getpid()), EnableDisable: 1, }).ReceiveReply(&interfaces.WantInterfaceEventsReply{}) + if err != nil { + panic(err) + } // generate some events in VPP - ch.SendRequest(&interfaces.SwInterfaceSetFlags{ + err = ch.SendRequest(&interfaces.SwInterfaceSetFlags{ SwIfIndex: 0, AdminUpDown: 0, }).ReceiveReply(&interfaces.SwInterfaceSetFlagsReply{}) - ch.SendRequest(&interfaces.SwInterfaceSetFlags{ + if err != nil { + panic(err) + } + err = ch.SendRequest(&interfaces.SwInterfaceSetFlags{ SwIfIndex: 0, AdminUpDown: 1, }).ReceiveReply(&interfaces.SwInterfaceSetFlagsReply{}) + if err != nil { + panic(err) + } // receive one notification - notif := (<-notifChan).(*interfaces.SwInterfaceSetFlags) - fmt.Printf("%+v\n", notif) + notif := (<-notifChan).(*interfaces.SwInterfaceEvent) + fmt.Printf("NOTIF: %+v\n", notif) + + // disable interface events in VPP + err = ch.SendRequest(&interfaces.WantInterfaceEvents{ + PID: uint32(os.Getpid()), + EnableDisable: 0, + }).ReceiveReply(&interfaces.WantInterfaceEventsReply{}) + if err != nil { + panic(err) + } // unsubscribe from delivery of the notifications - ch.UnsubscribeNotification(subs) + err = ch.UnsubscribeNotification(subs) + if err != nil { + panic(err) + } } diff --git a/examples/cmd/stats-client/stats_client.go b/examples/cmd/stats-client/stats_client.go index 5f9966f..4ea4659 100644 --- a/examples/cmd/stats-client/stats_client.go +++ b/examples/cmd/stats-client/stats_client.go @@ -16,9 +16,6 @@ // govpp API for interface counters together with asynchronous connection to VPP. package main -// Generates Go bindings for all VPP APIs located in the json directory. -//go:generate binapi-generator --input-dir=../../bin_api --output-dir=../../bin_api - import ( "fmt" "os" @@ -27,7 +24,6 @@ import ( "git.fd.io/govpp.git" "git.fd.io/govpp.git/api" "git.fd.io/govpp.git/core" - "git.fd.io/govpp.git/examples/bin_api/interfaces" "git.fd.io/govpp.git/examples/bin_api/stats" ) @@ -48,6 +44,7 @@ func main() { fmt.Println("Error:", err) os.Exit(1) } + defer fmt.Println("calling close") defer ch.Close() // create channel for Interrupt signal @@ -79,10 +76,10 @@ loop: case msg := <-notifChan: switch notif := msg.(type) { - case *interfaces.VnetInterfaceSimpleCounters: + case *stats.VnetInterfaceSimpleCounters: // simple counter notification received processSimpleCounters(notif) - case *interfaces.VnetInterfaceCombinedCounters: + case *stats.VnetInterfaceCombinedCounters: // combined counter notification received processCombinedCounters(notif) default: @@ -102,27 +99,41 @@ loop: // subscribeNotifications subscribes for interface counters notifications. func subscribeNotifications(ch api.Channel) (*api.NotifSubscription, *api.NotifSubscription, chan api.Message) { - notifChan := make(chan api.Message, 100) - simpleCountersSubs, _ := ch.SubscribeNotification(notifChan, interfaces.NewVnetInterfaceSimpleCounters) - combinedCountersSubs, _ := ch.SubscribeNotification(notifChan, interfaces.NewVnetInterfaceCombinedCounters) + + simpleCountersSubs, err := ch.SubscribeNotification(notifChan, stats.NewVnetInterfaceSimpleCounters) + if err != nil { + panic(err) + } + combinedCountersSubs, err := ch.SubscribeNotification(notifChan, stats.NewVnetInterfaceCombinedCounters) + if err != nil { + panic(err) + } return simpleCountersSubs, combinedCountersSubs, notifChan } // requestStatistics requests interface counters notifications from VPP. func requestStatistics(ch api.Channel) { - ch.SendRequest(&stats.WantStats{ - Pid: uint32(os.Getpid()), + if err := ch.SendRequest(&stats.WantStats{ + PID: uint32(os.Getpid()), EnableDisable: 1, - }).ReceiveReply(&stats.WantStatsReply{}) + }).ReceiveReply(&stats.WantStatsReply{}); err != nil { + panic(err) + } } // processSimpleCounters processes simple counters received from VPP. -func processSimpleCounters(counters *interfaces.VnetInterfaceSimpleCounters) { - fmt.Printf("%+v\n", counters) - - counterNames := []string{"Drop", "Punt", "IPv4", "IPv6", "RxNoBuf", "RxMiss", "RxError", "TxError", "MPLS"} +func processSimpleCounters(counters *stats.VnetInterfaceSimpleCounters) { + fmt.Printf("SimpleCounters: %+v\n", counters) + + counterNames := []string{ + "Drop", "Punt", + "IPv4", "IPv6", + "RxNoBuf", "RxMiss", + "RxError", "TxError", + "MPLS", + } for i := uint32(0); i < counters.Count; i++ { fmt.Printf("Interface '%d': %s = %d\n", @@ -131,14 +142,18 @@ func processSimpleCounters(counters *interfaces.VnetInterfaceSimpleCounters) { } // processCombinedCounters processes combined counters received from VPP. -func processCombinedCounters(counters *interfaces.VnetInterfaceCombinedCounters) { - fmt.Printf("%+v\n", counters) +func processCombinedCounters(counters *stats.VnetInterfaceCombinedCounters) { + fmt.Printf("CombinedCounters: %+v\n", counters) counterNames := []string{"Rx", "Tx"} for i := uint32(0); i < counters.Count; i++ { + if len(counterNames) <= int(counters.VnetCounterType) { + continue + } fmt.Printf("Interface '%d': %s packets = %d, %s bytes = %d\n", - counters.FirstSwIfIndex+i, counterNames[counters.VnetCounterType], counters.Data[i].Packets, + counters.FirstSwIfIndex+i, + counterNames[counters.VnetCounterType], counters.Data[i].Packets, counterNames[counters.VnetCounterType], counters.Data[i].Bytes) } } diff --git a/examples/cmd/union-example/union_example.go b/examples/cmd/union-example/union_example.go new file mode 100644 index 0000000..bb6c8a1 --- /dev/null +++ b/examples/cmd/union-example/union_example.go @@ -0,0 +1,63 @@ +// 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. + +// union-example is an example to show how to use unions in VPP binary API. +package main + +import ( + "bytes" + "log" + + "git.fd.io/govpp.git/examples/bin_api/ip" + "github.com/lunixbochs/struc" +) + +func main() { + // create union with IPv4 address + var unionIP4 ip.AddressUnion + unionIP4.SetIP4(ip.IP4Address{Address: []byte{192, 168, 1, 10}}) + + // use it in the Address type + addr := &ip.Address{ + Af: ip.ADDRESS_IP4, + Un: unionIP4, + } + log.Printf("encoding union IPv4: %v", addr.Un.GetIP4()) + + // encode the address with union + data := encode(addr) + // decode the address with union + addr2 := decode(data) + + log.Printf("decoded union IPv4: %v", addr2.Un.GetIP4()) +} + +func encode(addr *ip.Address) []byte { + log.Printf("encoding address: %#v", addr) + buf := new(bytes.Buffer) + if err := struc.Pack(buf, addr); err != nil { + panic(err) + } + return buf.Bytes() +} + +func decode(data []byte) *ip.Address { + addr := new(ip.Address) + buf := bytes.NewReader(data) + if err := struc.Unpack(buf, addr); err != nil { + panic(err) + } + log.Printf("decoded address: %#v", addr) + return addr +} -- cgit 1.2.3-korg