diff options
author | Ondrej Fabry <ofabry@cisco.com> | 2018-08-15 12:59:25 +0200 |
---|---|---|
committer | Ondrej Fabry <ofabry@cisco.com> | 2018-08-16 15:03:29 +0200 |
commit | a3bb834db727a3ac9a1ffcfeae9265e5dead851f (patch) | |
tree | 6ffe64d2dd78a4c3434c2889dd7582b74619fe2b /examples/bin_api | |
parent | da815585c3f75c4ac073b0766dd668abf83844d8 (diff) |
Refactor GoVPP
Squashed commit of the following:
commit 348930db31575e9f59b3834d9fec07411f011e05
Author: Ondrej Fabry <ofabry@cisco.com>
Date: Wed Aug 15 11:30:13 2018 +0200
Use debug level for log about different context
commit 9fc963c559cea67a41b85c6cdadc322fb3b1fc7c
Author: Ondrej Fabry <ofabry@cisco.com>
Date: Wed Aug 15 11:22:03 2018 +0200
Remove annoying logs and add env vars for debugging
commit fdc9fd624d13feadb602e0d03d58f8a44b7a565f
Author: Ondrej Fabry <ofabry@cisco.com>
Date: Wed Aug 15 11:18:47 2018 +0200
Fix printing unknown VPPApiError
commit 8f968be36a91de4d4a8ea17593ba314f82aa9583
Author: Ondrej Fabry <ofabry@cisco.com>
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 <ofabry@cisco.com>
Date: Mon Aug 13 11:29:54 2018 +0200
Rename VnetError to VPPApiError
commit c6549d6f77847a1367a12ff47fb716e2955e973a
Author: Ondrej Fabry <ofabry@cisco.com>
Date: Mon Aug 13 10:23:43 2018 +0200
Fix examples and regenerate binapi
commit 4612e36b416779771f5efab4fc654c2766d2cb1c
Author: Ondrej Fabry <ofabry@cisco.com>
Date: Mon Aug 13 09:51:22 2018 +0200
Add parsing and generation for services
commit ac9c5280c5aa27e325f327609e2364cc66f3723f
Author: Ondrej Fabry <ofabry@cisco.com>
Date: Fri Aug 10 14:30:15 2018 +0200
Fix exit status on error and add continue-onerror flag
commit 9b3f4ef9fc7c8c62037fa107085eae18a8725314
Author: Ondrej Fabry <ofabry@cisco.com>
Date: Thu Aug 9 15:20:56 2018 +0200
Return VnetError when Retval != 0
commit 8fd21a907b5e628ec4d2026215b83d15da96c297
Author: Ondrej Fabry <ofabry@cisco.com>
Date: Thu Aug 9 14:59:05 2018 +0200
Add all missing errors from api_errno.h
commit 08450f288d3046ebaecf40203174ae342a07f1eb
Author: Ondrej Fabry <ofabry@cisco.com>
Date: Thu Aug 9 14:29:27 2018 +0200
Update README
commit d8dced0728dd62243539be741868fb7d9b8de4cc
Author: Ondrej Fabry <ofabry@cisco.com>
Date: Thu Aug 9 13:59:59 2018 +0200
Regenerate vpe in core
commit 254da7592cdbf634cf7aa46ae36ce7bb6d4ee555
Author: Ondrej Fabry <ofabry@cisco.com>
Date: Thu Aug 9 13:37:00 2018 +0200
Add VnetError type for Retvals
commit 4475c1087fb53ab4c788e530bc7fef7cfc89d2cd
Author: Ondrej Fabry <ofabry@cisco.com>
Date: Thu Aug 9 13:36:07 2018 +0200
Add registration API
commit 892a3ea5a2c703e2f7c29331663f6a6fa706bff5
Author: Ondrej Fabry <ofabry@cisco.com>
Date: Thu Aug 9 13:30:43 2018 +0200
Generate registration for messages and check all IDs on connect
commit 389ed03b6e7082260281866c3449d72d72347c99
Author: Ondrej Fabry <ofabry@cisco.com>
Date: Thu Aug 9 11:32:41 2018 +0200
Show error for empty adapter (on Darwin/Windows)
commit ef1ea040d656ade64242432dc5f06810ed8dcde6
Author: Ondrej Fabry <ofabry@cisco.com>
Date: Thu Aug 9 11:31:37 2018 +0200
Improve logged info
commit d4adae3b14ed54c8d693060dd857fa9ba5ec8e06
Author: Ondrej Fabry <ofabry@cisco.com>
Date: Thu Aug 9 11:27:48 2018 +0200
Update examples
commit 63921e1346014701a22639a2611129563bb1eb78
Author: Ondrej Fabry <ofabry@cisco.com>
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 <ofabry@cisco.com>
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 <ofabry@cisco.com>
Diffstat (limited to 'examples/bin_api')
16 files changed, 6387 insertions, 2025 deletions
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.go b/examples/bin_api/acl/acl.ba.go index f8bb944..ff80173 100644 --- a/examples/bin_api/acl/acl.go +++ b/examples/bin_api/acl/acl.ba.go @@ -1,15 +1,31 @@ -// 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' +// 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" -// VlApiVersion contains version of the API. -const VlAPIVersion = 0x1db2ece9 +// Reference imports to suppress errors if they are not otherwise used. +var _ = struc.Pack +var _ = bytes.NewBuffer -// ACLRule represents the VPP binary API data type 'acl_rule'. -// Generated from '../../bin_api/acl.api.json', line 836: +/* Types */ + +// ACLRule represents the VPP binary API type 'acl_rule'. +// Generated from 'acl.api.json', line 922: // // "acl_rule", // [ @@ -72,7 +88,7 @@ const VlAPIVersion = 0x1db2ece9 // type ACLRule struct { IsPermit uint8 - IsIpv6 uint8 + IsIPv6 uint8 SrcIPAddr []byte `struc:"[16]byte"` SrcIPPrefixLen uint8 DstIPAddr []byte `struc:"[16]byte"` @@ -93,8 +109,8 @@ 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: +// MacipACLRule represents the VPP binary API type 'macip_acl_rule'. +// Generated from 'acl.api.json', line 982: // // "macip_acl_rule", // [ @@ -130,7 +146,7 @@ func (*ACLRule) GetCrcString() string { // type MacipACLRule struct { IsPermit uint8 - IsIpv6 uint8 + IsIPv6 uint8 SrcMac []byte `struc:"[6]byte"` SrcMacMask []byte `struc:"[6]byte"` SrcIPAddr []byte `struc:"[16]byte"` @@ -144,8 +160,10 @@ func (*MacipACLRule) GetCrcString() string { return "70589f1e" } +/* Messages */ + // ACLPluginGetVersion represents the VPP binary API message 'acl_plugin_get_version'. -// Generated from '../../bin_api/acl.api.json', line 87: +// Generated from 'acl.api.json', line 4: // // "acl_plugin_get_version", // [ @@ -164,24 +182,23 @@ func (*MacipACLRule) GetCrcString() string { // "crc": "0x51077d14" // } // -type ACLPluginGetVersion struct { -} +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 (*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 '../../bin_api/acl.api.json', line 105: +// Generated from 'acl.api.json', line 22: // // "acl_plugin_get_version_reply", // [ @@ -212,18 +229,18 @@ type ACLPluginGetVersionReply struct { 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 (*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 '../../bin_api/acl.api.json', line 127: +// Generated from 'acl.api.json', line 44: // // "acl_plugin_control_ping", // [ @@ -242,24 +259,23 @@ func NewACLPluginGetVersionReply() api.Message { // "crc": "0x51077d14" // } // -type ACLPluginControlPing struct { -} +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 (*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 '../../bin_api/acl.api.json', line 145: +// Generated from 'acl.api.json', line 62: // // "acl_plugin_control_ping_reply", // [ @@ -289,24 +305,24 @@ func NewACLPluginControlPing() api.Message { type ACLPluginControlPingReply struct { Retval int32 ClientIndex uint32 - VpePid 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 (*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 '../../bin_api/acl.api.json', line 171: +// Generated from 'acl.api.json', line 88: // // "acl_add_replace", // [ @@ -354,18 +370,18 @@ type ACLAddReplace struct { func (*ACLAddReplace) GetMessageName() string { return "acl_add_replace" } -func (*ACLAddReplace) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/acl.api.json', line 208: +// Generated from 'acl.api.json', line 125: // // "acl_add_replace_reply", // [ @@ -396,18 +412,18 @@ type ACLAddReplaceReply struct { func (*ACLAddReplaceReply) GetMessageName() string { return "acl_add_replace_reply" } -func (*ACLAddReplaceReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/acl.api.json', line 230: +// Generated from 'acl.api.json', line 147: // // "acl_del", // [ @@ -437,18 +453,18 @@ type ACLDel struct { func (*ACLDel) GetMessageName() string { return "acl_del" } -func (*ACLDel) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/acl.api.json', line 252: +// Generated from 'acl.api.json', line 169: // // "acl_del_reply", // [ @@ -474,18 +490,18 @@ type ACLDelReply struct { func (*ACLDelReply) GetMessageName() string { return "acl_del_reply" } -func (*ACLDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/acl.api.json', line 270: +// Generated from 'acl.api.json', line 187: // // "acl_interface_add_del", // [ @@ -530,18 +546,18 @@ type ACLInterfaceAddDel struct { func (*ACLInterfaceAddDel) GetMessageName() string { return "acl_interface_add_del" } -func (*ACLInterfaceAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/acl.api.json', line 304: +// Generated from 'acl.api.json', line 221: // // "acl_interface_add_del_reply", // [ @@ -567,18 +583,18 @@ type ACLInterfaceAddDelReply struct { 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 (*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 '../../bin_api/acl.api.json', line 322: +// Generated from 'acl.api.json', line 239: // // "acl_interface_set_acl_list", // [ @@ -625,18 +641,18 @@ type ACLInterfaceSetACLList struct { 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 (*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 '../../bin_api/acl.api.json', line 358: +// Generated from 'acl.api.json', line 275: // // "acl_interface_set_acl_list_reply", // [ @@ -662,18 +678,18 @@ type ACLInterfaceSetACLListReply struct { 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 (*ACLInterfaceSetACLListReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} func NewACLInterfaceSetACLListReply() api.Message { return &ACLInterfaceSetACLListReply{} } // ACLDump represents the VPP binary API message 'acl_dump'. -// Generated from '../../bin_api/acl.api.json', line 376: +// Generated from 'acl.api.json', line 293: // // "acl_dump", // [ @@ -703,18 +719,18 @@ type ACLDump struct { func (*ACLDump) GetMessageName() string { return "acl_dump" } -func (*ACLDump) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/acl.api.json', line 398: +// Generated from 'acl.api.json', line 315: // // "acl_details", // [ @@ -758,18 +774,18 @@ type ACLDetails struct { func (*ACLDetails) GetMessageName() string { return "acl_details" } -func (*ACLDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/acl.api.json', line 431: +// Generated from 'acl.api.json', line 348: // // "acl_interface_list_dump", // [ @@ -799,18 +815,18 @@ type ACLInterfaceListDump struct { func (*ACLInterfaceListDump) GetMessageName() string { return "acl_interface_list_dump" } -func (*ACLInterfaceListDump) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/acl.api.json', line 453: +// Generated from 'acl.api.json', line 370: // // "acl_interface_list_details", // [ @@ -853,18 +869,18 @@ type ACLInterfaceListDetails struct { func (*ACLInterfaceListDetails) GetMessageName() string { return "acl_interface_list_details" } -func (*ACLInterfaceListDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/acl.api.json', line 485: +// Generated from 'acl.api.json', line 402: // // "macip_acl_add", // [ @@ -907,18 +923,18 @@ type MacipACLAdd struct { func (*MacipACLAdd) GetMessageName() string { return "macip_acl_add" } -func (*MacipACLAdd) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/acl.api.json', line 518: +// Generated from 'acl.api.json', line 435: // // "macip_acl_add_reply", // [ @@ -949,18 +965,18 @@ type MacipACLAddReply struct { func (*MacipACLAddReply) GetMessageName() string { return "macip_acl_add_reply" } -func (*MacipACLAddReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/acl.api.json', line 540: +// Generated from 'acl.api.json', line 457: // // "macip_acl_add_replace", // [ @@ -1008,18 +1024,18 @@ type MacipACLAddReplace struct { func (*MacipACLAddReplace) GetMessageName() string { return "macip_acl_add_replace" } -func (*MacipACLAddReplace) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/acl.api.json', line 577: +// Generated from 'acl.api.json', line 494: // // "macip_acl_add_replace_reply", // [ @@ -1050,18 +1066,18 @@ type MacipACLAddReplaceReply struct { 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 (*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 '../../bin_api/acl.api.json', line 599: +// Generated from 'acl.api.json', line 516: // // "macip_acl_del", // [ @@ -1091,18 +1107,18 @@ type MacipACLDel struct { func (*MacipACLDel) GetMessageName() string { return "macip_acl_del" } -func (*MacipACLDel) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/acl.api.json', line 621: +// Generated from 'acl.api.json', line 538: // // "macip_acl_del_reply", // [ @@ -1128,18 +1144,18 @@ type MacipACLDelReply struct { func (*MacipACLDelReply) GetMessageName() string { return "macip_acl_del_reply" } -func (*MacipACLDelReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/acl.api.json', line 639: +// Generated from 'acl.api.json', line 556: // // "macip_acl_interface_add_del", // [ @@ -1179,18 +1195,18 @@ type MacipACLInterfaceAddDel struct { 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 (*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 '../../bin_api/acl.api.json', line 669: +// Generated from 'acl.api.json', line 586: // // "macip_acl_interface_add_del_reply", // [ @@ -1216,18 +1232,18 @@ type MacipACLInterfaceAddDelReply struct { 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 (*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 '../../bin_api/acl.api.json', line 687: +// Generated from 'acl.api.json', line 604: // // "macip_acl_dump", // [ @@ -1257,18 +1273,18 @@ type MacipACLDump struct { func (*MacipACLDump) GetMessageName() string { return "macip_acl_dump" } -func (*MacipACLDump) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/acl.api.json', line 709: +// Generated from 'acl.api.json', line 626: // // "macip_acl_details", // [ @@ -1312,18 +1328,18 @@ type MacipACLDetails struct { func (*MacipACLDetails) GetMessageName() string { return "macip_acl_details" } -func (*MacipACLDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/acl.api.json', line 742: +// Generated from 'acl.api.json', line 659: // // "macip_acl_interface_get", // [ @@ -1342,24 +1358,23 @@ func NewMacipACLDetails() api.Message { // "crc": "0x51077d14" // } // -type MacipACLInterfaceGet struct { -} +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 (*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 '../../bin_api/acl.api.json', line 760: +// Generated from 'acl.api.json', line 677: // // "macip_acl_interface_get_reply", // [ @@ -1392,18 +1407,18 @@ type MacipACLInterfaceGetReply struct { 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 (*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 '../../bin_api/acl.api.json', line 784: +// Generated from 'acl.api.json', line 701: // // "macip_acl_interface_list_dump", // [ @@ -1433,18 +1448,18 @@ type MacipACLInterfaceListDump struct { 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 (*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 '../../bin_api/acl.api.json', line 806: +// Generated from 'acl.api.json', line 723: // // "macip_acl_interface_list_details", // [ @@ -1482,12 +1497,261 @@ type MacipACLInterfaceListDetails struct { 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 (*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/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.go b/examples/bin_api/af_packet/af_packet.ba.go index c969e2a..a6bdc93 100644 --- a/examples/bin_api/af_packet/af_packet.go +++ b/examples/bin_api/af_packet/af_packet.ba.go @@ -1,15 +1,30 @@ -// 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' +// 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 -// VlApiVersion contains version of the API. -const VlAPIVersion = 0x8957ca8b +/* Messages */ // AfPacketCreate represents the VPP binary API message 'af_packet_create'. -// Generated from '../../bin_api/af_packet.api.json', line 23: +// Generated from 'af_packet.api.json', line 4: // // "af_packet_create", // [ @@ -51,18 +66,18 @@ type AfPacketCreate struct { func (*AfPacketCreate) GetMessageName() string { return "af_packet_create" } -func (*AfPacketCreate) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/af_packet.api.json', line 55: +// Generated from 'af_packet.api.json', line 36: // // "af_packet_create_reply", // [ @@ -93,18 +108,18 @@ type AfPacketCreateReply struct { func (*AfPacketCreateReply) GetMessageName() string { return "af_packet_create_reply" } -func (*AfPacketCreateReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/af_packet.api.json', line 77: +// Generated from 'af_packet.api.json', line 58: // // "af_packet_delete", // [ @@ -135,18 +150,18 @@ type AfPacketDelete struct { func (*AfPacketDelete) GetMessageName() string { return "af_packet_delete" } -func (*AfPacketDelete) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/af_packet.api.json', line 100: +// Generated from 'af_packet.api.json', line 81: // // "af_packet_delete_reply", // [ @@ -172,18 +187,18 @@ type AfPacketDeleteReply struct { func (*AfPacketDeleteReply) GetMessageName() string { return "af_packet_delete_reply" } -func (*AfPacketDeleteReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/af_packet.api.json', line 118: +// Generated from 'af_packet.api.json', line 99: // // "af_packet_set_l4_cksum_offload", // [ @@ -218,18 +233,18 @@ type AfPacketSetL4CksumOffload struct { 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 (*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 '../../bin_api/af_packet.api.json', line 144: +// Generated from 'af_packet.api.json', line 125: // // "af_packet_set_l4_cksum_offload_reply", // [ @@ -255,12 +270,110 @@ type AfPacketSetL4CksumOffloadReply struct { 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 (*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/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" @@ -176,6 +71,51 @@ } ], [ + "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", [ "u16", @@ -325,6 +265,11 @@ ], [ "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" @@ -761,15 +642,24 @@ "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" @@ -801,24 +691,20 @@ "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", @@ -1322,14 +1327,62 @@ ], [ "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": "0x3217ba8e" + "crc": "0x20905ca4" } ], [ diff --git a/examples/bin_api/interfaces/interfaces.go b/examples/bin_api/interfaces/interfaces.ba.go index 41fda27..5ef58ed 100644 --- a/examples/bin_api/interfaces/interfaces.go +++ b/examples/bin_api/interfaces/interfaces.ba.go @@ -1,15 +1,31 @@ -// 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' +// 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" -// VlApiVersion contains version of the API. -const VlAPIVersion = 0xa9b5d13 +// Reference imports to suppress errors if they are not otherwise used. +var _ = struc.Pack +var _ = bytes.NewBuffer -// VlibCounter represents the VPP binary API data type 'vlib_counter'. -// Generated from '../../bin_api/interface.api.json', line 1296: +/* Types */ + +// VlibCounter represents the VPP binary API type 'vlib_counter'. +// Generated from 'interface.api.json', line 1301: // // "vlib_counter", // [ @@ -36,8 +52,8 @@ 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: +// VnetCombinedCounter represents the VPP binary API type 'vnet_combined_counter'. +// Generated from 'interface.api.json', line 1315: // // "vnet_combined_counter", // [ @@ -54,33 +70,93 @@ func (*VlibCounter) GetCrcString() string { // ], // [ // "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": "0x3217ba8e" +// "crc": "0x20905ca4" // } // type VnetCombinedCounter struct { - SwIfIndex uint32 - RxPackets uint64 - RxBytes uint64 - TxPackets uint64 - TxBytes uint64 + 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 "3217ba8e" + return "20905ca4" } -// VnetSimpleCounter represents the VPP binary API data type 'vnet_simple_counter'. -// Generated from '../../bin_api/interface.api.json', line 1336: +// VnetSimpleCounter represents the VPP binary API type 'vnet_simple_counter'. +// Generated from 'interface.api.json', line 1389: // // "vnet_simple_counter", // [ @@ -147,8 +223,10 @@ func (*VnetSimpleCounter) GetCrcString() string { return "8bd65e2d" } +/* Messages */ + // SwInterfaceSetFlags represents the VPP binary API message 'sw_interface_set_flags'. -// Generated from '../../bin_api/interface.api.json', line 109: +// Generated from 'interface.api.json', line 4: // // "sw_interface_set_flags", // [ @@ -183,18 +261,18 @@ type SwInterfaceSetFlags struct { func (*SwInterfaceSetFlags) GetMessageName() string { return "sw_interface_set_flags" } -func (*SwInterfaceSetFlags) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/interface.api.json', line 135: +// Generated from 'interface.api.json', line 30: // // "sw_interface_set_flags_reply", // [ @@ -220,20 +298,20 @@ type SwInterfaceSetFlagsReply struct { 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 (*SwInterfaceSetFlagsReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} 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: +// HwInterfaceSetMtu represents the VPP binary API message 'hw_interface_set_mtu'. +// Generated from 'interface.api.json', line 48: // -// "sw_interface_set_mtu", +// "hw_interface_set_mtu", // [ // "u16", // "_vl_msg_id" @@ -258,26 +336,110 @@ func NewSwInterfaceSetFlagsReply() api.Message { // "crc": "0x132da1e7" // } // -type SwInterfaceSetMtu struct { +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 (*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: +// Generated from 'interface.api.json', line 119: // // "sw_interface_set_mtu_reply", // [ @@ -303,18 +465,18 @@ type SwInterfaceSetMtuReply struct { 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 (*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 '../../bin_api/interface.api.json', line 197: +// Generated from 'interface.api.json', line 137: // // "sw_interface_event", // [ @@ -350,7 +512,7 @@ func NewSwInterfaceSetMtuReply() api.Message { // } // type SwInterfaceEvent struct { - Pid uint32 + PID uint32 SwIfIndex uint32 AdminUpDown uint8 LinkUpDown uint8 @@ -360,18 +522,18 @@ type SwInterfaceEvent struct { func (*SwInterfaceEvent) GetMessageName() string { return "sw_interface_event" } -func (*SwInterfaceEvent) GetMessageType() api.MessageType { - return api.EventMessage -} 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 '../../bin_api/interface.api.json', line 231: +// Generated from 'interface.api.json', line 171: // // "want_interface_events", // [ @@ -400,24 +562,24 @@ func NewSwInterfaceEvent() api.Message { // type WantInterfaceEvents struct { EnableDisable uint32 - Pid 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 (*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 '../../bin_api/interface.api.json', line 257: +// Generated from 'interface.api.json', line 197: // // "want_interface_events_reply", // [ @@ -443,18 +605,18 @@ type WantInterfaceEventsReply struct { func (*WantInterfaceEventsReply) GetMessageName() string { return "want_interface_events_reply" } -func (*WantInterfaceEventsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/interface.api.json', line 275: +// Generated from 'interface.api.json', line 215: // // "sw_interface_details", // [ @@ -509,6 +671,11 @@ func NewWantInterfaceEventsReply() api.Message { // ], // [ // "u32", +// "mtu", +// 4 +// ], +// [ +// "u32", // "sub_id" // ], // [ @@ -591,7 +758,7 @@ func NewWantInterfaceEventsReply() api.Message { // "i_sid" // ], // { -// "crc": "0x23dee0ff" +// "crc": "0x09b4b510" // } // type SwInterfaceDetails struct { @@ -605,6 +772,7 @@ type SwInterfaceDetails struct { LinkDuplex uint8 LinkSpeed uint8 LinkMtu uint16 + Mtu []uint32 `struc:"[4]uint32"` SubID uint32 SubDot1ad uint8 SubDot1ah uint8 @@ -630,18 +798,18 @@ type SwInterfaceDetails struct { func (*SwInterfaceDetails) GetMessageName() string { return "sw_interface_details" } +func (*SwInterfaceDetails) GetCrcString() string { + return "09b4b510" +} 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: +// Generated from 'interface.api.json', line 359: // // "sw_interface_dump", // [ @@ -677,18 +845,18 @@ type SwInterfaceDump struct { func (*SwInterfaceDump) GetMessageName() string { return "sw_interface_dump" } -func (*SwInterfaceDump) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/interface.api.json', line 441: +// Generated from 'interface.api.json', line 386: // // "sw_interface_add_del_address", // [ @@ -735,7 +903,7 @@ func NewSwInterfaceDump() api.Message { type SwInterfaceAddDelAddress struct { SwIfIndex uint32 IsAdd uint8 - IsIpv6 uint8 + IsIPv6 uint8 DelAll uint8 AddressLength uint8 Address []byte `struc:"[16]byte"` @@ -744,18 +912,18 @@ type SwInterfaceAddDelAddress struct { 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 (*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 '../../bin_api/interface.api.json', line 484: +// Generated from 'interface.api.json', line 429: // // "sw_interface_add_del_address_reply", // [ @@ -781,18 +949,18 @@ type SwInterfaceAddDelAddressReply struct { 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 (*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 '../../bin_api/interface.api.json', line 502: +// Generated from 'interface.api.json', line 447: // // "sw_interface_set_table", // [ @@ -825,25 +993,25 @@ func NewSwInterfaceAddDelAddressReply() api.Message { // type SwInterfaceSetTable struct { SwIfIndex uint32 - IsIpv6 uint8 + 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 (*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 '../../bin_api/interface.api.json', line 532: +// Generated from 'interface.api.json', line 477: // // "sw_interface_set_table_reply", // [ @@ -869,18 +1037,18 @@ type SwInterfaceSetTableReply struct { 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 (*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 '../../bin_api/interface.api.json', line 550: +// Generated from 'interface.api.json', line 495: // // "sw_interface_get_table", // [ @@ -909,24 +1077,24 @@ func NewSwInterfaceSetTableReply() api.Message { // type SwInterfaceGetTable struct { SwIfIndex uint32 - IsIpv6 uint8 + 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 (*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 '../../bin_api/interface.api.json', line 576: +// Generated from 'interface.api.json', line 521: // // "sw_interface_get_table_reply", // [ @@ -957,208 +1125,18 @@ type SwInterfaceGetTableReply struct { 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 (*SwInterfaceGetTableReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} 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: +// Generated from 'interface.api.json', line 543: // // "sw_interface_set_unnumbered", // [ @@ -1198,18 +1176,18 @@ type SwInterfaceSetUnnumbered struct { func (*SwInterfaceSetUnnumbered) GetMessageName() string { return "sw_interface_set_unnumbered" } -func (*SwInterfaceSetUnnumbered) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/interface.api.json', line 732: +// Generated from 'interface.api.json', line 573: // // "sw_interface_set_unnumbered_reply", // [ @@ -1235,18 +1213,18 @@ type SwInterfaceSetUnnumberedReply struct { 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 (*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 '../../bin_api/interface.api.json', line 750: +// Generated from 'interface.api.json', line 591: // // "sw_interface_clear_stats", // [ @@ -1276,18 +1254,18 @@ type SwInterfaceClearStats struct { func (*SwInterfaceClearStats) GetMessageName() string { return "sw_interface_clear_stats" } -func (*SwInterfaceClearStats) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/interface.api.json', line 772: +// Generated from 'interface.api.json', line 613: // // "sw_interface_clear_stats_reply", // [ @@ -1313,18 +1291,18 @@ type SwInterfaceClearStatsReply struct { 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 (*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 '../../bin_api/interface.api.json', line 790: +// Generated from 'interface.api.json', line 631: // // "sw_interface_tag_add_del", // [ @@ -1365,18 +1343,18 @@ type SwInterfaceTagAddDel struct { 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 (*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 '../../bin_api/interface.api.json', line 821: +// Generated from 'interface.api.json', line 662: // // "sw_interface_tag_add_del_reply", // [ @@ -1402,18 +1380,18 @@ type SwInterfaceTagAddDelReply struct { 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 (*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 '../../bin_api/interface.api.json', line 839: +// Generated from 'interface.api.json', line 680: // // "sw_interface_set_mac_address", // [ @@ -1449,18 +1427,18 @@ type SwInterfaceSetMacAddress struct { 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 (*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 '../../bin_api/interface.api.json', line 866: +// Generated from 'interface.api.json', line 707: // // "sw_interface_set_mac_address_reply", // [ @@ -1486,18 +1464,102 @@ type SwInterfaceSetMacAddressReply struct { 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 (*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 '../../bin_api/interface.api.json', line 884: +// Generated from 'interface.api.json', line 770: // // "sw_interface_set_rx_mode", // [ @@ -1542,18 +1604,18 @@ type SwInterfaceSetRxMode struct { 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 (*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 '../../bin_api/interface.api.json', line 918: +// Generated from 'interface.api.json', line 804: // // "sw_interface_set_rx_mode_reply", // [ @@ -1579,18 +1641,18 @@ type SwInterfaceSetRxModeReply struct { 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 (*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 '../../bin_api/interface.api.json', line 936: +// Generated from 'interface.api.json', line 822: // // "interface_name_renumber", // [ @@ -1625,18 +1687,18 @@ type InterfaceNameRenumber struct { func (*InterfaceNameRenumber) GetMessageName() string { return "interface_name_renumber" } -func (*InterfaceNameRenumber) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/interface.api.json', line 962: +// Generated from 'interface.api.json', line 848: // // "interface_name_renumber_reply", // [ @@ -1662,18 +1724,18 @@ type InterfaceNameRenumberReply struct { func (*InterfaceNameRenumberReply) GetMessageName() string { return "interface_name_renumber_reply" } -func (*InterfaceNameRenumberReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/interface.api.json', line 980: +// Generated from 'interface.api.json', line 866: // // "create_subif", // [ @@ -1758,18 +1820,18 @@ type CreateSubif struct { func (*CreateSubif) GetMessageName() string { return "create_subif" } -func (*CreateSubif) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/interface.api.json', line 1046: +// Generated from 'interface.api.json', line 932: // // "create_subif_reply", // [ @@ -1800,18 +1862,18 @@ type CreateSubifReply struct { func (*CreateSubifReply) GetMessageName() string { return "create_subif_reply" } -func (*CreateSubifReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/interface.api.json', line 1068: +// Generated from 'interface.api.json', line 954: // // "create_vlan_subif", // [ @@ -1846,18 +1908,18 @@ type CreateVlanSubif struct { func (*CreateVlanSubif) GetMessageName() string { return "create_vlan_subif" } -func (*CreateVlanSubif) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/interface.api.json', line 1094: +// Generated from 'interface.api.json', line 980: // // "create_vlan_subif_reply", // [ @@ -1888,18 +1950,18 @@ type CreateVlanSubifReply struct { func (*CreateVlanSubifReply) GetMessageName() string { return "create_vlan_subif_reply" } -func (*CreateVlanSubifReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/interface.api.json', line 1116: +// Generated from 'interface.api.json', line 1002: // // "delete_subif", // [ @@ -1929,18 +1991,18 @@ type DeleteSubif struct { func (*DeleteSubif) GetMessageName() string { return "delete_subif" } -func (*DeleteSubif) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/interface.api.json', line 1138: +// Generated from 'interface.api.json', line 1024: // // "delete_subif_reply", // [ @@ -1966,18 +2028,18 @@ type DeleteSubifReply struct { func (*DeleteSubifReply) GetMessageName() string { return "delete_subif_reply" } -func (*DeleteSubifReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/interface.api.json', line 1156: +// Generated from 'interface.api.json', line 1042: // // "create_loopback", // [ @@ -2008,18 +2070,18 @@ type CreateLoopback struct { func (*CreateLoopback) GetMessageName() string { return "create_loopback" } -func (*CreateLoopback) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/interface.api.json', line 1179: +// Generated from 'interface.api.json', line 1065: // // "create_loopback_reply", // [ @@ -2050,18 +2112,18 @@ type CreateLoopbackReply struct { func (*CreateLoopbackReply) GetMessageName() string { return "create_loopback_reply" } -func (*CreateLoopbackReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/interface.api.json', line 1201: +// Generated from 'interface.api.json', line 1087: // // "create_loopback_instance", // [ @@ -2102,18 +2164,18 @@ type CreateLoopbackInstance struct { func (*CreateLoopbackInstance) GetMessageName() string { return "create_loopback_instance" } -func (*CreateLoopbackInstance) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/interface.api.json', line 1232: +// Generated from 'interface.api.json', line 1118: // // "create_loopback_instance_reply", // [ @@ -2144,18 +2206,18 @@ type CreateLoopbackInstanceReply struct { func (*CreateLoopbackInstanceReply) GetMessageName() string { return "create_loopback_instance_reply" } -func (*CreateLoopbackInstanceReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/interface.api.json', line 1254: +// Generated from 'interface.api.json', line 1140: // // "delete_loopback", // [ @@ -2185,18 +2247,18 @@ type DeleteLoopback struct { func (*DeleteLoopback) GetMessageName() string { return "delete_loopback" } -func (*DeleteLoopback) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/interface.api.json', line 1276: +// Generated from 'interface.api.json', line 1162: // // "delete_loopback_reply", // [ @@ -2222,12 +2284,170 @@ type DeleteLoopbackReply struct { func (*DeleteLoopbackReply) GetMessageName() string { return "delete_loopback_reply" } -func (*DeleteLoopbackReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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/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", @@ -820,6 +637,66 @@ } ], [ + "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", [ "u16", @@ -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" } ], [ @@ -1336,6 +1218,54 @@ } ], [ + "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", [ "u16", @@ -1740,6 +1670,115 @@ } ], [ + "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" + } + ], + [ + "ip_scan_neighbor_enable_disable_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ], + [ + "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" + } + ], + [ + "ip_probe_neighbor_reply", + [ + "u16", + "_vl_msg_id" + ], + [ + "u32", + "context" + ], + [ + "i32", + "retval" + ], + { + "crc": "0xe8d4e804" + } + ], + [ "want_ip4_arp_events", [ "u16", @@ -1908,7 +1947,7 @@ } ], [ - "proxy_arp_add_del", + "want_ip6_ra_events", [ "u16", "_vl_msg_id" @@ -1922,25 +1961,116 @@ "context" ], [ + "u8", + "enable_disable" + ], + [ "u32", - "vrf_id" + "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", - "is_add" + "router_address", + 16 ], [ "u8", - "low_address", - 4 + "current_hop_limit" ], [ "u8", - "hi_address", - 4 + "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" } ], [ @@ -1962,6 +2092,42 @@ } ], [ + "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", [ "u16", @@ -2006,6 +2172,42 @@ } ], [ + "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", [ "u16", @@ -2192,10 +2394,424 @@ { "crc": "0xe8d4e804" } + ], + [ + "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" + } + ], + [ + "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", @@ -2223,6 +2839,10 @@ ], [ "u8", + "is_udp_encap" + ], + [ + "u8", "is_unreach" ], [ @@ -2231,6 +2851,22 @@ ], [ "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.go b/examples/bin_api/ip/ip.ba.go index 7a72629..c980b6a 100644 --- a/examples/bin_api/ip/ip.go +++ b/examples/bin_api/ip/ip.ba.go @@ -1,15 +1,200 @@ -// 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' +// 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" -// VlApiVersion contains version of the API. -const VlAPIVersion = 0xb395c625 +// Reference imports to suppress errors if they are not otherwise used. +var _ = struc.Pack +var _ = bytes.NewBuffer -// FibPath represents the VPP binary API data type 'fib_path'. -// Generated from '../../bin_api/ip.api.json', line 2199: +/* 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", // [ @@ -38,6 +223,10 @@ const VlAPIVersion = 0xb395c625 // ], // [ // "u8", +// "is_udp_encap" +// ], +// [ +// "u8", // "is_unreach" // ], // [ @@ -46,6 +235,22 @@ const VlAPIVersion = 0xb395c625 // ], // [ // "u8", +// "is_resolve_host" +// ], +// [ +// "u8", +// "is_resolve_attached" +// ], +// [ +// "u8", +// "is_dvr" +// ], +// [ +// "u8", +// "is_source_lookup" +// ], +// [ +// "u8", // "afi" // ], // [ @@ -53,32 +258,199 @@ const VlAPIVersion = 0xb395c625 // "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": "0xcd899e0a" +// "crc": "0xabe483ef" // } // 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"` + 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 "cd899e0a" + 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 '../../bin_api/ip.api.json', line 187: +// Generated from 'ip.api.json', line 4: // // "ip_table_add_del", // [ @@ -116,7 +488,7 @@ func (*FibPath) GetCrcString() string { // type IPTableAddDel struct { TableID uint32 - IsIpv6 uint8 + IsIPv6 uint8 IsAdd uint8 Name []byte `struc:"[64]byte"` } @@ -124,18 +496,18 @@ type IPTableAddDel struct { func (*IPTableAddDel) GetMessageName() string { return "ip_table_add_del" } -func (*IPTableAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/ip.api.json', line 222: +// Generated from 'ip.api.json', line 39: // // "ip_table_add_del_reply", // [ @@ -161,18 +533,18 @@ type IPTableAddDelReply struct { 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 (*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 '../../bin_api/ip.api.json', line 240: +// Generated from 'ip.api.json', line 57: // // "ip_fib_dump", // [ @@ -191,24 +563,23 @@ func NewIPTableAddDelReply() api.Message { // "crc": "0x51077d14" // } // -type IPFibDump struct { -} +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 (*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 '../../bin_api/ip.api.json', line 258: +// Generated from 'ip.api.json', line 75: // // "ip_fib_details", // [ @@ -263,18 +634,18 @@ type IPFibDetails struct { func (*IPFibDetails) GetMessageName() string { return "ip_fib_details" } -func (*IPFibDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/ip.api.json', line 300: +// Generated from 'ip.api.json', line 117: // // "ip6_fib_dump", // [ @@ -293,24 +664,23 @@ func NewIPFibDetails() api.Message { // "crc": "0x51077d14" // } // -type IP6FibDump struct { -} +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 (*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 '../../bin_api/ip.api.json', line 318: +// Generated from 'ip.api.json', line 135: // // "ip6_fib_details", // [ @@ -365,18 +735,18 @@ type IP6FibDetails struct { func (*IP6FibDetails) GetMessageName() string { return "ip6_fib_details" } -func (*IP6FibDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/ip.api.json', line 360: +// Generated from 'ip.api.json', line 177: // // "ip_neighbor_dump", // [ @@ -405,24 +775,24 @@ func NewIP6FibDetails() api.Message { // type IPNeighborDump struct { SwIfIndex uint32 - IsIpv6 uint8 + 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 (*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 '../../bin_api/ip.api.json', line 386: +// Generated from 'ip.api.json', line 203: // // "ip_neighbor_details", // [ @@ -462,7 +832,7 @@ func NewIPNeighborDump() api.Message { type IPNeighborDetails struct { SwIfIndex uint32 IsStatic uint8 - IsIpv6 uint8 + IsIPv6 uint8 MacAddress []byte `struc:"[6]byte"` IPAddress []byte `struc:"[16]byte"` } @@ -470,18 +840,18 @@ type IPNeighborDetails struct { func (*IPNeighborDetails) GetMessageName() string { return "ip_neighbor_details" } -func (*IPNeighborDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/ip.api.json', line 422: +// Generated from 'ip.api.json', line 239: // // "ip_neighbor_add_del", // [ @@ -533,7 +903,7 @@ func NewIPNeighborDetails() api.Message { type IPNeighborAddDel struct { SwIfIndex uint32 IsAdd uint8 - IsIpv6 uint8 + IsIPv6 uint8 IsStatic uint8 IsNoAdjFib uint8 MacAddress []byte `struc:"[6]byte"` @@ -543,18 +913,18 @@ type IPNeighborAddDel struct { func (*IPNeighborAddDel) GetMessageName() string { return "ip_neighbor_add_del" } -func (*IPNeighborAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/ip.api.json', line 470: +// Generated from 'ip.api.json', line 287: // // "ip_neighbor_add_del_reply", // [ @@ -580,18 +950,18 @@ type IPNeighborAddDelReply struct { 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 (*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 '../../bin_api/ip.api.json', line 488: +// Generated from 'ip.api.json', line 305: // // "set_ip_flow_hash", // [ @@ -644,7 +1014,7 @@ func NewIPNeighborAddDelReply() api.Message { // type SetIPFlowHash struct { VrfID uint32 - IsIpv6 uint8 + IsIPv6 uint8 Src uint8 Dst uint8 Sport uint8 @@ -656,18 +1026,18 @@ type SetIPFlowHash struct { func (*SetIPFlowHash) GetMessageName() string { return "set_ip_flow_hash" } -func (*SetIPFlowHash) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/ip.api.json', line 538: +// Generated from 'ip.api.json', line 355: // // "set_ip_flow_hash_reply", // [ @@ -693,18 +1063,18 @@ type SetIPFlowHashReply struct { 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 (*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 '../../bin_api/ip.api.json', line 556: +// Generated from 'ip.api.json', line 373: // // "sw_interface_ip6nd_ra_config", // [ @@ -799,18 +1169,18 @@ type SwInterfaceIP6ndRaConfig struct { 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 (*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 '../../bin_api/ip.api.json', line 630: +// Generated from 'ip.api.json', line 447: // // "sw_interface_ip6nd_ra_config_reply", // [ @@ -836,18 +1206,18 @@ type SwInterfaceIP6ndRaConfigReply struct { 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 (*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 '../../bin_api/ip.api.json', line 648: +// Generated from 'ip.api.json', line 465: // // "sw_interface_ip6nd_ra_prefix", // [ @@ -928,18 +1298,18 @@ type SwInterfaceIP6ndRaPrefix struct { 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 (*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 '../../bin_api/ip.api.json', line 711: +// Generated from 'ip.api.json', line 528: // // "sw_interface_ip6nd_ra_prefix_reply", // [ @@ -965,18 +1335,18 @@ type SwInterfaceIP6ndRaPrefixReply struct { 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 (*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 '../../bin_api/ip.api.json', line 729: +// Generated from 'ip.api.json', line 546: // // "ip6nd_proxy_add_del", // [ @@ -1017,18 +1387,18 @@ type IP6ndProxyAddDel struct { func (*IP6ndProxyAddDel) GetMessageName() string { return "ip6nd_proxy_add_del" } -func (*IP6ndProxyAddDel) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/ip.api.json', line 760: +// Generated from 'ip.api.json', line 577: // // "ip6nd_proxy_add_del_reply", // [ @@ -1054,18 +1424,18 @@ type IP6ndProxyAddDelReply struct { 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 (*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 '../../bin_api/ip.api.json', line 778: +// Generated from 'ip.api.json', line 595: // // "ip6nd_proxy_details", // [ @@ -1101,18 +1471,18 @@ type IP6ndProxyDetails struct { func (*IP6ndProxyDetails) GetMessageName() string { return "ip6nd_proxy_details" } -func (*IP6ndProxyDetails) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/ip.api.json', line 805: +// Generated from 'ip.api.json', line 622: // // "ip6nd_proxy_dump", // [ @@ -1131,24 +1501,126 @@ func NewIP6ndProxyDetails() api.Message { // "crc": "0x51077d14" // } // -type IP6ndProxyDump struct { -} +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 (*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 '../../bin_api/ip.api.json', line 823: +// Generated from 'ip.api.json', line 700: // // "sw_interface_ip6_enable_disable", // [ @@ -1183,18 +1655,18 @@ type SwInterfaceIP6EnableDisable struct { 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 (*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 '../../bin_api/ip.api.json', line 849: +// Generated from 'ip.api.json', line 726: // // "sw_interface_ip6_enable_disable_reply", // [ @@ -1220,18 +1692,18 @@ type SwInterfaceIP6EnableDisableReply struct { 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 (*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 '../../bin_api/ip.api.json', line 867: +// Generated from 'ip.api.json', line 744: // // "sw_interface_ip6_set_link_local_address", // [ @@ -1267,18 +1739,18 @@ type SwInterfaceIP6SetLinkLocalAddress struct { 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 (*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 '../../bin_api/ip.api.json', line 894: +// Generated from 'ip.api.json', line 771: // // "sw_interface_ip6_set_link_local_address_reply", // [ @@ -1304,18 +1776,18 @@ type SwInterfaceIP6SetLinkLocalAddressReply struct { 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 (*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 '../../bin_api/ip.api.json', line 912: +// Generated from 'ip.api.json', line 789: // // "ip_add_del_route", // [ @@ -1437,13 +1909,13 @@ func NewSwInterfaceIP6SetLinkLocalAddressReply() api.Message { // "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" // } // type IPAddDelRoute struct { @@ -1456,7 +1928,7 @@ type IPAddDelRoute struct { IsDrop uint8 IsUnreach uint8 IsProhibit uint8 - IsIpv6 uint8 + IsIPv6 uint8 IsLocal uint8 IsClassify uint8 IsMultipath uint8 @@ -1473,24 +1945,24 @@ type IPAddDelRoute struct { NextHopAddress []byte `struc:"[16]byte"` NextHopNOutLabels uint8 `struc:"sizeof=NextHopOutLabelStack"` NextHopViaLabel uint32 - NextHopOutLabelStack []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 (*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: +// Generated from 'ip.api.json', line 919: // // "ip_add_del_route_reply", // [ @@ -1516,18 +1988,18 @@ type IPAddDelRouteReply struct { 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 (*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 '../../bin_api/ip.api.json', line 1060: +// Generated from 'ip.api.json', line 937: // // "ip_mroute_add_del", // [ @@ -1596,8 +2068,13 @@ func NewIPAddDelRouteReply() api.Message { // "src_address", // 16 // ], +// [ +// "u8", +// "nh_address", +// 16 +// ], // { -// "crc": "0xc37112f7" +// "crc": "0xf44c17b1" // } // type IPMrouteAddDel struct { @@ -1610,27 +2087,28 @@ type IPMrouteAddDel struct { GrpAddressLength uint16 NextHopAfi uint8 IsAdd uint8 - IsIpv6 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 (*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: +// Generated from 'ip.api.json', line 1014: // // "ip_mroute_add_del_reply", // [ @@ -1656,18 +2134,18 @@ type IPMrouteAddDelReply struct { 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 (*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 '../../bin_api/ip.api.json', line 1150: +// Generated from 'ip.api.json', line 1032: // // "ip_mfib_dump", // [ @@ -1686,24 +2164,23 @@ func NewIPMrouteAddDelReply() api.Message { // "crc": "0x51077d14" // } // -type IPMfibDump struct { -} +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 (*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 '../../bin_api/ip.api.json', line 1168: +// Generated from 'ip.api.json', line 1050: // // "ip_mfib_details", // [ @@ -1768,18 +2245,18 @@ type IPMfibDetails struct { func (*IPMfibDetails) GetMessageName() string { return "ip_mfib_details" } -func (*IPMfibDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/ip.api.json', line 1218: +// Generated from 'ip.api.json', line 1100: // // "ip6_mfib_dump", // [ @@ -1798,24 +2275,23 @@ func NewIPMfibDetails() api.Message { // "crc": "0x51077d14" // } // -type IP6MfibDump struct { -} +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 (*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 '../../bin_api/ip.api.json', line 1236: +// Generated from 'ip.api.json', line 1118: // // "ip6_mfib_details", // [ @@ -1870,18 +2346,18 @@ type IP6MfibDetails struct { func (*IP6MfibDetails) GetMessageName() string { return "ip6_mfib_details" } -func (*IP6MfibDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/ip.api.json', line 1278: +// Generated from 'ip.api.json', line 1160: // // "ip_address_details", // [ @@ -1921,24 +2397,24 @@ type IPAddressDetails struct { IP []byte `struc:"[16]byte"` PrefixLength uint8 SwIfIndex uint32 - IsIpv6 uint8 + 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 (*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 '../../bin_api/ip.api.json', line 1313: +// Generated from 'ip.api.json', line 1195: // // "ip_address_dump", // [ @@ -1967,24 +2443,111 @@ func NewIPAddressDetails() api.Message { // type IPAddressDump struct { SwIfIndex uint32 - IsIpv6 uint8 + 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 (*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 '../../bin_api/ip.api.json', line 1339: +// Generated from 'ip.api.json', line 1269: // // "ip_details", // [ @@ -2010,24 +2573,24 @@ func NewIPAddressDump() api.Message { type IPDetails struct { SwIfIndex uint32 Context uint32 - IsIpv6 uint8 + IsIPv6 uint8 } func (*IPDetails) GetMessageName() string { return "ip_details" } -func (*IPDetails) GetMessageType() api.MessageType { - return api.OtherMessage -} 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 '../../bin_api/ip.api.json', line 1361: +// Generated from 'ip.api.json', line 1291: // // "ip_dump", // [ @@ -2051,24 +2614,24 @@ func NewIPDetails() api.Message { // } // type IPDump struct { - IsIpv6 uint8 + IsIPv6 uint8 } func (*IPDump) GetMessageName() string { return "ip_dump" } -func (*IPDump) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/ip.api.json', line 1383: +// Generated from 'ip.api.json', line 1313: // // "mfib_signal_dump", // [ @@ -2087,24 +2650,23 @@ func NewIPDump() api.Message { // "crc": "0x51077d14" // } // -type MfibSignalDump struct { -} +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 (*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 '../../bin_api/ip.api.json', line 1401: +// Generated from 'ip.api.json', line 1331: // // "mfib_signal_details", // [ @@ -2167,18 +2729,18 @@ type MfibSignalDetails struct { func (*MfibSignalDetails) GetMessageName() string { return "mfib_signal_details" } -func (*MfibSignalDetails) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/ip.api.json', line 1450: +// Generated from 'ip.api.json', line 1380: // // "ip_punt_police", // [ @@ -2218,18 +2780,18 @@ type IPPuntPolice struct { func (*IPPuntPolice) GetMessageName() string { return "ip_punt_police" } -func (*IPPuntPolice) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/ip.api.json', line 1480: +// Generated from 'ip.api.json', line 1410: // // "ip_punt_police_reply", // [ @@ -2255,18 +2817,18 @@ type IPPuntPoliceReply struct { func (*IPPuntPoliceReply) GetMessageName() string { return "ip_punt_police_reply" } -func (*IPPuntPoliceReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/ip.api.json', line 1498: +// Generated from 'ip.api.json', line 1428: // // "ip_punt_redirect", // [ @@ -2317,18 +2879,18 @@ type IPPuntRedirect struct { func (*IPPuntRedirect) GetMessageName() string { return "ip_punt_redirect" } -func (*IPPuntRedirect) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/ip.api.json', line 1537: +// Generated from 'ip.api.json', line 1467: // // "ip_punt_redirect_reply", // [ @@ -2354,18 +2916,18 @@ type IPPuntRedirectReply struct { func (*IPPuntRedirectReply) GetMessageName() string { return "ip_punt_redirect_reply" } -func (*IPPuntRedirectReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/ip.api.json', line 1555: +// Generated from 'ip.api.json', line 1485: // // "ip_container_proxy_add_del", // [ @@ -2416,18 +2978,18 @@ type IPContainerProxyAddDel struct { 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 (*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 '../../bin_api/ip.api.json', line 1594: +// Generated from 'ip.api.json', line 1524: // // "ip_container_proxy_add_del_reply", // [ @@ -2453,18 +3015,18 @@ type IPContainerProxyAddDelReply struct { 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 (*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 '../../bin_api/ip.api.json', line 1612: +// Generated from 'ip.api.json', line 1542: // // "ip_source_and_port_range_check_add_del", // [ @@ -2519,7 +3081,7 @@ func NewIPContainerProxyAddDelReply() api.Message { // } // type IPSourceAndPortRangeCheckAddDel struct { - IsIpv6 uint8 + IsIPv6 uint8 IsAdd uint8 MaskLength uint8 Address []byte `struc:"[16]byte"` @@ -2532,18 +3094,18 @@ type IPSourceAndPortRangeCheckAddDel struct { 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 (*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 '../../bin_api/ip.api.json', line 1665: +// Generated from 'ip.api.json', line 1595: // // "ip_source_and_port_range_check_add_del_reply", // [ @@ -2569,18 +3131,18 @@ type IPSourceAndPortRangeCheckAddDelReply struct { 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 (*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 '../../bin_api/ip.api.json', line 1683: +// Generated from 'ip.api.json', line 1613: // // "ip_source_and_port_range_check_interface_add_del", // [ @@ -2635,18 +3197,18 @@ type IPSourceAndPortRangeCheckInterfaceAddDel struct { 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 (*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 '../../bin_api/ip.api.json', line 1725: +// Generated from 'ip.api.json', line 1655: // // "ip_source_and_port_range_check_interface_add_del_reply", // [ @@ -2672,18 +3234,210 @@ type IPSourceAndPortRangeCheckInterfaceAddDelReply struct { 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 (*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 '../../bin_api/ip.api.json', line 1743: +// Generated from 'ip.api.json', line 1782: // // "want_ip4_arp_events", // [ @@ -2716,25 +3470,25 @@ func NewIPSourceAndPortRangeCheckInterfaceAddDelReply() api.Message { // type WantIP4ArpEvents struct { EnableDisable uint8 - Pid uint32 + 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 (*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 '../../bin_api/ip.api.json', line 1773: +// Generated from 'ip.api.json', line 1812: // // "want_ip4_arp_events_reply", // [ @@ -2760,18 +3514,18 @@ type WantIP4ArpEventsReply struct { 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 (*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 '../../bin_api/ip.api.json', line 1791: +// Generated from 'ip.api.json', line 1830: // // "ip4_arp_event", // [ @@ -2809,7 +3563,7 @@ func NewWantIP4ArpEventsReply() api.Message { // type IP4ArpEvent struct { Address uint32 - Pid uint32 + PID uint32 SwIfIndex uint32 NewMac []byte `struc:"[6]byte"` MacIP uint8 @@ -2818,18 +3572,18 @@ type IP4ArpEvent struct { func (*IP4ArpEvent) GetMessageName() string { return "ip4_arp_event" } -func (*IP4ArpEvent) GetMessageType() api.MessageType { - return api.EventMessage -} 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 '../../bin_api/ip.api.json', line 1826: +// Generated from 'ip.api.json', line 1865: // // "want_ip6_nd_events", // [ @@ -2863,25 +3617,25 @@ func NewIP4ArpEvent() api.Message { // type WantIP6NdEvents struct { EnableDisable uint8 - Pid uint32 + 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 (*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 '../../bin_api/ip.api.json', line 1857: +// Generated from 'ip.api.json', line 1896: // // "want_ip6_nd_events_reply", // [ @@ -2907,18 +3661,18 @@ type WantIP6NdEventsReply struct { 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 (*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 '../../bin_api/ip.api.json', line 1875: +// Generated from 'ip.api.json', line 1914: // // "ip6_nd_event", // [ @@ -2956,7 +3710,7 @@ func NewWantIP6NdEventsReply() api.Message { // } // type IP6NdEvent struct { - Pid uint32 + PID uint32 SwIfIndex uint32 Address []byte `struc:"[16]byte"` NewMac []byte `struc:"[6]byte"` @@ -2966,20 +3720,20 @@ type IP6NdEvent struct { func (*IP6NdEvent) GetMessageName() string { return "ip6_nd_event" } -func (*IP6NdEvent) GetMessageType() api.MessageType { - return api.EventMessage -} func (*IP6NdEvent) GetCrcString() string { return "96ab2fdd" } +func (*IP6NdEvent) GetMessageType() api.MessageType { + return api.EventMessage +} 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: +// WantIP6RaEvents represents the VPP binary API message 'want_ip6_ra_events'. +// Generated from 'ip.api.json', line 1950: // -// "proxy_arp_add_del", +// "want_ip6_ra_events", // [ // "u16", // "_vl_msg_id" @@ -2993,49 +3747,205 @@ func NewIP6NdEvent() api.Message { // "context" // ], // [ +// "u8", +// "enable_disable" +// ], +// [ // "u32", -// "vrf_id" +// "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", -// "is_add" +// "router_address", +// 16 // ], // [ // "u8", -// "low_address", -// 4 +// "current_hop_limit" // ], // [ // "u8", -// "hi_address", -// 4 +// "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": "0xc2442918" +// "crc": "0x227988d9" // } // type ProxyArpAddDel struct { - VrfID uint32 - IsAdd uint8 - LowAddress []byte `struc:"[4]byte"` - HiAddress []byte `struc:"[4]byte"` + 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 (*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: +// Generated from 'ip.api.json', line 2077: // // "proxy_arp_add_del_reply", // [ @@ -3061,18 +3971,90 @@ type ProxyArpAddDelReply struct { 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 (*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 '../../bin_api/ip.api.json', line 1965: +// Generated from 'ip.api.json', line 2131: // // "proxy_arp_intfc_enable_disable", // [ @@ -3107,18 +4089,18 @@ type ProxyArpIntfcEnableDisable struct { 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 (*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 '../../bin_api/ip.api.json', line 1991: +// Generated from 'ip.api.json', line 2157: // // "proxy_arp_intfc_enable_disable_reply", // [ @@ -3144,18 +4126,90 @@ type ProxyArpIntfcEnableDisableReply struct { 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 (*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 '../../bin_api/ip.api.json', line 2009: +// Generated from 'ip.api.json', line 2211: // // "reset_fib", // [ @@ -3184,24 +4238,24 @@ func NewProxyArpIntfcEnableDisableReply() api.Message { // type ResetFib struct { VrfID uint32 - IsIpv6 uint8 + IsIPv6 uint8 } func (*ResetFib) GetMessageName() string { return "reset_fib" } -func (*ResetFib) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/ip.api.json', line 2035: +// Generated from 'ip.api.json', line 2237: // // "reset_fib_reply", // [ @@ -3227,18 +4281,18 @@ type ResetFibReply struct { func (*ResetFibReply) GetMessageName() string { return "reset_fib_reply" } -func (*ResetFibReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/ip.api.json', line 2053: +// Generated from 'ip.api.json', line 2255: // // "set_arp_neighbor_limit", // [ @@ -3266,25 +4320,25 @@ func NewResetFibReply() api.Message { // } // type SetArpNeighborLimit struct { - IsIpv6 uint8 + 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 (*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 '../../bin_api/ip.api.json', line 2079: +// Generated from 'ip.api.json', line 2281: // // "set_arp_neighbor_limit_reply", // [ @@ -3310,18 +4364,18 @@ type SetArpNeighborLimitReply struct { 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 (*SetArpNeighborLimitReply) GetMessageType() api.MessageType { + return api.ReplyMessage +} func NewSetArpNeighborLimitReply() api.Message { return &SetArpNeighborLimitReply{} } // IoamEnable represents the VPP binary API message 'ioam_enable'. -// Generated from '../../bin_api/ip.api.json', line 2097: +// Generated from 'ip.api.json', line 2299: // // "ioam_enable", // [ @@ -3376,18 +4430,18 @@ type IoamEnable struct { func (*IoamEnable) GetMessageName() string { return "ioam_enable" } -func (*IoamEnable) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/ip.api.json', line 2139: +// Generated from 'ip.api.json', line 2341: // // "ioam_enable_reply", // [ @@ -3413,18 +4467,18 @@ type IoamEnableReply struct { func (*IoamEnableReply) GetMessageName() string { return "ioam_enable_reply" } -func (*IoamEnableReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/ip.api.json', line 2157: +// Generated from 'ip.api.json', line 2359: // // "ioam_disable", // [ @@ -3454,18 +4508,18 @@ type IoamDisable struct { func (*IoamDisable) GetMessageName() string { return "ioam_disable" } -func (*IoamDisable) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/ip.api.json', line 2179: +// Generated from 'ip.api.json', line 2381: // // "ioam_disable_reply", // [ @@ -3491,12 +4545,432 @@ type IoamDisableReply struct { func (*IoamDisableReply) GetMessageName() string { return "ioam_disable_reply" } -func (*IoamDisableReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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/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" } ], [ @@ -144,6 +172,47 @@ } ], [ + "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", [ "u16", @@ -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", @@ -721,6 +657,110 @@ } ], [ + "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", [ "u16", @@ -769,10 +809,332 @@ { "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", [ "u32", @@ -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.go b/examples/bin_api/stats/stats.ba.go index 0285698..eb2dd8f 100644 --- a/examples/bin_api/stats/stats.go +++ b/examples/bin_api/stats/stats.ba.go @@ -1,15 +1,230 @@ -// 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' +// 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" -// VlApiVersion contains version of the API. -const VlAPIVersion = 0x50890812 +// Reference imports to suppress errors if they are not otherwise used. +var _ = struc.Pack +var _ = bytes.NewBuffer -// IP4FibCounter represents the VPP binary API data type 'ip4_fib_counter'. -// Generated from '../../bin_api/stats.api.json', line 776: +/* 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", // [ @@ -46,8 +261,8 @@ 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: +// IP4MfibCounter represents the VPP binary API type 'ip4_mfib_counter'. +// Generated from 'stats.api.json', line 1160: // // "ip4_mfib_counter", // [ @@ -91,8 +306,8 @@ 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: +// IP4NbrCounter represents the VPP binary API type 'ip4_nbr_counter'. +// Generated from 'stats.api.json', line 1188: // // "ip4_nbr_counter", // [ @@ -129,8 +344,8 @@ 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: +// IP6FibCounter represents the VPP binary API type 'ip6_fib_counter'. +// Generated from 'stats.api.json', line 1210: // // "ip6_fib_counter", // [ @@ -168,8 +383,8 @@ 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: +// IP6MfibCounter represents the VPP binary API type 'ip6_mfib_counter'. +// Generated from 'stats.api.json', line 1233: // // "ip6_mfib_counter", // [ @@ -213,8 +428,8 @@ 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: +// IP6NbrCounter represents the VPP binary API type 'ip6_nbr_counter'. +// Generated from 'stats.api.json', line 1261: // // "ip6_nbr_counter", // [ @@ -252,8 +467,43 @@ 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 '../../bin_api/stats.api.json', line 68: +// Generated from 'stats.api.json', line 4: // // "want_stats", // [ @@ -282,24 +532,24 @@ func (*IP6NbrCounter) GetCrcString() string { // type WantStats struct { EnableDisable uint32 - Pid 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 (*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 '../../bin_api/stats.api.json', line 94: +// Generated from 'stats.api.json', line 30: // // "want_stats_reply", // [ @@ -325,18 +575,18 @@ type WantStatsReply struct { func (*WantStatsReply) GetMessageName() string { return "want_stats_reply" } -func (*WantStatsReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/stats.api.json', line 112: +// Generated from 'stats.api.json', line 48: // // "want_interface_simple_stats", // [ @@ -365,24 +615,24 @@ func NewWantStatsReply() api.Message { // type WantInterfaceSimpleStats struct { EnableDisable uint32 - Pid 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 (*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 '../../bin_api/stats.api.json', line 138: +// Generated from 'stats.api.json', line 74: // // "want_interface_simple_stats_reply", // [ @@ -408,18 +658,18 @@ type WantInterfaceSimpleStatsReply struct { 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 (*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 '../../bin_api/stats.api.json', line 156: +// Generated from 'stats.api.json', line 92: // // "want_per_interface_simple_stats", // [ @@ -458,7 +708,7 @@ func NewWantInterfaceSimpleStatsReply() api.Message { // type WantPerInterfaceSimpleStats struct { EnableDisable uint32 - Pid uint32 + PID uint32 Num uint32 `struc:"sizeof=SwIfs"` SwIfs []uint32 } @@ -466,18 +716,18 @@ type WantPerInterfaceSimpleStats struct { 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 (*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 '../../bin_api/stats.api.json', line 192: +// Generated from 'stats.api.json', line 128: // // "want_per_interface_simple_stats_reply", // [ @@ -503,18 +753,18 @@ type WantPerInterfaceSimpleStatsReply struct { 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 (*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 '../../bin_api/stats.api.json', line 210: +// Generated from 'stats.api.json', line 146: // // "want_interface_combined_stats", // [ @@ -543,24 +793,24 @@ func NewWantPerInterfaceSimpleStatsReply() api.Message { // type WantInterfaceCombinedStats struct { EnableDisable uint32 - Pid 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 (*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 '../../bin_api/stats.api.json', line 236: +// Generated from 'stats.api.json', line 172: // // "want_interface_combined_stats_reply", // [ @@ -586,18 +836,18 @@ type WantInterfaceCombinedStatsReply struct { 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 (*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 '../../bin_api/stats.api.json', line 254: +// Generated from 'stats.api.json', line 190: // // "want_per_interface_combined_stats", // [ @@ -636,7 +886,7 @@ func NewWantInterfaceCombinedStatsReply() api.Message { // type WantPerInterfaceCombinedStats struct { EnableDisable uint32 - Pid uint32 + PID uint32 Num uint32 `struc:"sizeof=SwIfs"` SwIfs []uint32 } @@ -644,18 +894,18 @@ type WantPerInterfaceCombinedStats struct { 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 (*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 '../../bin_api/stats.api.json', line 290: +// Generated from 'stats.api.json', line 226: // // "want_per_interface_combined_stats_reply", // [ @@ -681,18 +931,18 @@ type WantPerInterfaceCombinedStatsReply struct { 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 (*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 '../../bin_api/stats.api.json', line 308: +// Generated from 'stats.api.json', line 244: // // "want_ip4_fib_stats", // [ @@ -721,24 +971,24 @@ func NewWantPerInterfaceCombinedStatsReply() api.Message { // type WantIP4FibStats struct { EnableDisable uint32 - Pid 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 (*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 '../../bin_api/stats.api.json', line 334: +// Generated from 'stats.api.json', line 270: // // "want_ip4_fib_stats_reply", // [ @@ -764,18 +1014,18 @@ type WantIP4FibStatsReply struct { 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 (*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 '../../bin_api/stats.api.json', line 352: +// Generated from 'stats.api.json', line 288: // // "want_ip6_fib_stats", // [ @@ -804,24 +1054,24 @@ func NewWantIP4FibStatsReply() api.Message { // type WantIP6FibStats struct { EnableDisable uint32 - Pid 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 (*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 '../../bin_api/stats.api.json', line 378: +// Generated from 'stats.api.json', line 314: // // "want_ip6_fib_stats_reply", // [ @@ -847,18 +1097,18 @@ type WantIP6FibStatsReply struct { 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 (*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 '../../bin_api/stats.api.json', line 396: +// Generated from 'stats.api.json', line 332: // // "want_ip4_mfib_stats", // [ @@ -887,24 +1137,24 @@ func NewWantIP6FibStatsReply() api.Message { // type WantIP4MfibStats struct { EnableDisable uint32 - Pid 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 (*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 '../../bin_api/stats.api.json', line 422: +// Generated from 'stats.api.json', line 358: // // "want_ip4_mfib_stats_reply", // [ @@ -930,18 +1180,18 @@ type WantIP4MfibStatsReply struct { 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 (*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 '../../bin_api/stats.api.json', line 440: +// Generated from 'stats.api.json', line 376: // // "want_ip6_mfib_stats", // [ @@ -970,24 +1220,24 @@ func NewWantIP4MfibStatsReply() api.Message { // type WantIP6MfibStats struct { EnableDisable uint32 - Pid 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 (*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 '../../bin_api/stats.api.json', line 466: +// Generated from 'stats.api.json', line 402: // // "want_ip6_mfib_stats_reply", // [ @@ -1013,18 +1263,18 @@ type WantIP6MfibStatsReply struct { 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 (*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 '../../bin_api/stats.api.json', line 484: +// Generated from 'stats.api.json', line 420: // // "want_ip4_nbr_stats", // [ @@ -1053,24 +1303,24 @@ func NewWantIP6MfibStatsReply() api.Message { // type WantIP4NbrStats struct { EnableDisable uint32 - Pid 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 (*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 '../../bin_api/stats.api.json', line 510: +// Generated from 'stats.api.json', line 446: // // "want_ip4_nbr_stats_reply", // [ @@ -1096,18 +1346,18 @@ type WantIP4NbrStatsReply struct { 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 (*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 '../../bin_api/stats.api.json', line 528: +// Generated from 'stats.api.json', line 464: // // "want_ip6_nbr_stats", // [ @@ -1136,24 +1386,24 @@ func NewWantIP4NbrStatsReply() api.Message { // type WantIP6NbrStats struct { EnableDisable uint32 - Pid 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 (*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 '../../bin_api/stats.api.json', line 554: +// Generated from 'stats.api.json', line 490: // // "want_ip6_nbr_stats_reply", // [ @@ -1179,18 +1429,18 @@ type WantIP6NbrStatsReply struct { 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 (*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 '../../bin_api/stats.api.json', line 572: +// Generated from 'stats.api.json', line 508: // // "vnet_ip4_fib_counters", // [ @@ -1224,18 +1474,18 @@ type VnetIP4FibCounters struct { func (*VnetIP4FibCounters) GetMessageName() string { return "vnet_ip4_fib_counters" } -func (*VnetIP4FibCounters) GetMessageType() api.MessageType { - return api.OtherMessage -} 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 '../../bin_api/stats.api.json', line 596: +// Generated from 'stats.api.json', line 532: // // "vnet_ip4_mfib_counters", // [ @@ -1269,18 +1519,18 @@ type VnetIP4MfibCounters struct { func (*VnetIP4MfibCounters) GetMessageName() string { return "vnet_ip4_mfib_counters" } -func (*VnetIP4MfibCounters) GetMessageType() api.MessageType { - return api.OtherMessage -} 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 '../../bin_api/stats.api.json', line 620: +// Generated from 'stats.api.json', line 556: // // "vnet_ip4_nbr_counters", // [ @@ -1319,18 +1569,18 @@ type VnetIP4NbrCounters struct { func (*VnetIP4NbrCounters) GetMessageName() string { return "vnet_ip4_nbr_counters" } -func (*VnetIP4NbrCounters) GetMessageType() api.MessageType { - return api.OtherMessage -} 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 '../../bin_api/stats.api.json', line 648: +// Generated from 'stats.api.json', line 584: // // "vnet_ip6_fib_counters", // [ @@ -1364,18 +1614,18 @@ type VnetIP6FibCounters struct { func (*VnetIP6FibCounters) GetMessageName() string { return "vnet_ip6_fib_counters" } -func (*VnetIP6FibCounters) GetMessageType() api.MessageType { - return api.OtherMessage -} 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 '../../bin_api/stats.api.json', line 672: +// Generated from 'stats.api.json', line 608: // // "vnet_ip6_mfib_counters", // [ @@ -1409,18 +1659,18 @@ type VnetIP6MfibCounters struct { func (*VnetIP6MfibCounters) GetMessageName() string { return "vnet_ip6_mfib_counters" } -func (*VnetIP6MfibCounters) GetMessageType() api.MessageType { - return api.OtherMessage -} 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 '../../bin_api/stats.api.json', line 696: +// Generated from 'stats.api.json', line 632: // // "vnet_ip6_nbr_counters", // [ @@ -1459,18 +1709,208 @@ type VnetIP6NbrCounters struct { func (*VnetIP6NbrCounters) GetMessageName() string { return "vnet_ip6_nbr_counters" } -func (*VnetIP6NbrCounters) GetMessageType() api.MessageType { - return api.OtherMessage -} 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 '../../bin_api/stats.api.json', line 724: +// Generated from 'stats.api.json', line 764: // // "vnet_get_summary_stats", // [ @@ -1489,24 +1929,23 @@ func NewVnetIP6NbrCounters() api.Message { // "crc": "0x51077d14" // } // -type VnetGetSummaryStats struct { -} +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 (*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 '../../bin_api/stats.api.json', line 742: +// Generated from 'stats.api.json', line 782: // // "vnet_get_summary_stats_reply", // [ @@ -1549,12 +1988,278 @@ type VnetGetSummaryStatsReply struct { 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 (*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/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.go b/examples/bin_api/tap/tap.ba.go index f7d6745..36f5549 100644 --- a/examples/bin_api/tap/tap.go +++ b/examples/bin_api/tap/tap.ba.go @@ -1,15 +1,30 @@ -// 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' +// 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 -// VlApiVersion contains version of the API. -const VlAPIVersion = 0x3a0725de +/* Messages */ // TapConnect represents the VPP binary API message 'tap_connect'. -// Generated from '../../bin_api/tap.api.json', line 29: +// Generated from 'tap.api.json', line 4: // // "tap_connect", // [ @@ -99,18 +114,18 @@ type TapConnect struct { func (*TapConnect) GetMessageName() string { return "tap_connect" } -func (*TapConnect) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/tap.api.json', line 100: +// Generated from 'tap.api.json', line 75: // // "tap_connect_reply", // [ @@ -141,18 +156,18 @@ type TapConnectReply struct { func (*TapConnectReply) GetMessageName() string { return "tap_connect_reply" } -func (*TapConnectReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/tap.api.json', line 122: +// Generated from 'tap.api.json', line 97: // // "tap_modify", // [ @@ -209,18 +224,18 @@ type TapModify struct { func (*TapModify) GetMessageName() string { return "tap_modify" } -func (*TapModify) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/tap.api.json', line 166: +// Generated from 'tap.api.json', line 141: // // "tap_modify_reply", // [ @@ -251,18 +266,18 @@ type TapModifyReply struct { func (*TapModifyReply) GetMessageName() string { return "tap_modify_reply" } -func (*TapModifyReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/tap.api.json', line 188: +// Generated from 'tap.api.json', line 163: // // "tap_delete", // [ @@ -292,18 +307,18 @@ type TapDelete struct { func (*TapDelete) GetMessageName() string { return "tap_delete" } -func (*TapDelete) GetMessageType() api.MessageType { - return api.RequestMessage -} 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 '../../bin_api/tap.api.json', line 210: +// Generated from 'tap.api.json', line 185: // // "tap_delete_reply", // [ @@ -329,18 +344,18 @@ type TapDeleteReply struct { func (*TapDeleteReply) GetMessageName() string { return "tap_delete_reply" } -func (*TapDeleteReply) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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 '../../bin_api/tap.api.json', line 228: +// Generated from 'tap.api.json', line 203: // // "sw_interface_tap_dump", // [ @@ -359,24 +374,23 @@ func NewTapDeleteReply() api.Message { // "crc": "0x51077d14" // } // -type SwInterfaceTapDump struct { -} +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 (*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 '../../bin_api/tap.api.json', line 246: +// Generated from 'tap.api.json', line 221: // // "sw_interface_tap_details", // [ @@ -408,12 +422,32 @@ type SwInterfaceTapDetails struct { func (*SwInterfaceTapDetails) GetMessageName() string { return "sw_interface_tap_details" } -func (*SwInterfaceTapDetails) GetMessageType() api.MessageType { - return api.ReplyMessage -} 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") +} |