diff options
author | Ondrej Fabry <ofabry@cisco.com> | 2019-01-31 08:23:02 +0100 |
---|---|---|
committer | Ondrej Fabry <ofabry@cisco.com> | 2019-01-31 08:23:02 +0100 |
commit | 6476a2b64a2e1ea6c0d695127d726a348cc5c99b (patch) | |
tree | 49909ae9800e9eb9af64731141dc899accf5d2d6 /examples/bin_api/af_packet/af_packet.ba.go | |
parent | 2323d3ffe6e66ea7ffa40be232aa54c1d24c8651 (diff) |
Generator improvements
- all objects are now sorted alphabetically for more consistent output
- unions now have constructor generated
- log level for warnings was changed to debug
- GetAllMessages renamed to GetRegisteredMessages
Change-Id: I976453004a2fd8b6cb95ca0acfcef56913bf8d38
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'examples/bin_api/af_packet/af_packet.ba.go')
-rw-r--r-- | examples/bin_api/af_packet/af_packet.ba.go | 127 |
1 files changed, 63 insertions, 64 deletions
diff --git a/examples/bin_api/af_packet/af_packet.ba.go b/examples/bin_api/af_packet/af_packet.ba.go index 93d5e58..668c95a 100644 --- a/examples/bin_api/af_packet/af_packet.ba.go +++ b/examples/bin_api/af_packet/af_packet.ba.go @@ -5,9 +5,8 @@ Package af_packet is a generated from VPP binary API module 'af_packet'. It contains following objects: - 8 messages 4 services - + 8 messages */ package af_packet @@ -205,84 +204,79 @@ func (*AfPacketDeleteReply) GetMessageType() api.MessageType { return api.ReplyMessage } -// AfPacketSetL4CksumOffload represents VPP binary API message 'af_packet_set_l4_cksum_offload': +// AfPacketDetails represents VPP binary API message 'af_packet_details': // -// "af_packet_set_l4_cksum_offload", +// "af_packet_details", // [ // "u16", // "_vl_msg_id" // ], // [ // "u32", -// "client_index" -// ], -// [ -// "u32", // "context" // ], // [ -// "u8", +// "u32", // "sw_if_index" // ], // [ // "u8", -// "set" +// "host_if_name", +// 64 // ], // { -// "crc": "0x86538585" +// "crc": "0x057205fa" // } // -type AfPacketSetL4CksumOffload struct { - SwIfIndex uint8 - Set uint8 +type AfPacketDetails struct { + SwIfIndex uint32 + HostIfName []byte `struc:"[64]byte"` } -func (*AfPacketSetL4CksumOffload) GetMessageName() string { - return "af_packet_set_l4_cksum_offload" +func (*AfPacketDetails) GetMessageName() string { + return "af_packet_details" } -func (*AfPacketSetL4CksumOffload) GetCrcString() string { - return "86538585" +func (*AfPacketDetails) GetCrcString() string { + return "057205fa" } -func (*AfPacketSetL4CksumOffload) GetMessageType() api.MessageType { - return api.RequestMessage +func (*AfPacketDetails) GetMessageType() api.MessageType { + return api.ReplyMessage } -// AfPacketSetL4CksumOffloadReply represents VPP binary API message 'af_packet_set_l4_cksum_offload_reply': +// AfPacketDump represents VPP binary API message 'af_packet_dump': // -// "af_packet_set_l4_cksum_offload_reply", +// "af_packet_dump", // [ // "u16", // "_vl_msg_id" // ], // [ // "u32", -// "context" +// "client_index" // ], // [ -// "i32", -// "retval" +// "u32", +// "context" // ], // { -// "crc": "0xe8d4e804" +// "crc": "0x51077d14" // } // -type AfPacketSetL4CksumOffloadReply struct { - Retval int32 -} +type AfPacketDump struct{} -func (*AfPacketSetL4CksumOffloadReply) GetMessageName() string { - return "af_packet_set_l4_cksum_offload_reply" +func (*AfPacketDump) GetMessageName() string { + return "af_packet_dump" } -func (*AfPacketSetL4CksumOffloadReply) GetCrcString() string { - return "e8d4e804" +func (*AfPacketDump) GetCrcString() string { + return "51077d14" } -func (*AfPacketSetL4CksumOffloadReply) GetMessageType() api.MessageType { - return api.ReplyMessage +func (*AfPacketDump) GetMessageType() api.MessageType { + return api.RequestMessage } -// AfPacketDump represents VPP binary API message 'af_packet_dump': +// AfPacketSetL4CksumOffload represents VPP binary API message 'af_packet_set_l4_cksum_offload': // -// "af_packet_dump", +// "af_packet_set_l4_cksum_offload", // [ // "u16", // "_vl_msg_id" @@ -295,25 +289,36 @@ func (*AfPacketSetL4CksumOffloadReply) GetMessageType() api.MessageType { // "u32", // "context" // ], +// [ +// "u8", +// "sw_if_index" +// ], +// [ +// "u8", +// "set" +// ], // { -// "crc": "0x51077d14" +// "crc": "0x86538585" // } // -type AfPacketDump struct{} +type AfPacketSetL4CksumOffload struct { + SwIfIndex uint8 + Set uint8 +} -func (*AfPacketDump) GetMessageName() string { - return "af_packet_dump" +func (*AfPacketSetL4CksumOffload) GetMessageName() string { + return "af_packet_set_l4_cksum_offload" } -func (*AfPacketDump) GetCrcString() string { - return "51077d14" +func (*AfPacketSetL4CksumOffload) GetCrcString() string { + return "86538585" } -func (*AfPacketDump) GetMessageType() api.MessageType { +func (*AfPacketSetL4CksumOffload) GetMessageType() api.MessageType { return api.RequestMessage } -// AfPacketDetails represents VPP binary API message 'af_packet_details': +// AfPacketSetL4CksumOffloadReply represents VPP binary API message 'af_packet_set_l4_cksum_offload_reply': // -// "af_packet_details", +// "af_packet_set_l4_cksum_offload_reply", // [ // "u16", // "_vl_msg_id" @@ -323,30 +328,24 @@ func (*AfPacketDump) GetMessageType() api.MessageType { // "context" // ], // [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "host_if_name", -// 64 +// "i32", +// "retval" // ], // { -// "crc": "0x057205fa" +// "crc": "0xe8d4e804" // } // -type AfPacketDetails struct { - SwIfIndex uint32 - HostIfName []byte `struc:"[64]byte"` +type AfPacketSetL4CksumOffloadReply struct { + Retval int32 } -func (*AfPacketDetails) GetMessageName() string { - return "af_packet_details" +func (*AfPacketSetL4CksumOffloadReply) GetMessageName() string { + return "af_packet_set_l4_cksum_offload_reply" } -func (*AfPacketDetails) GetCrcString() string { - return "057205fa" +func (*AfPacketSetL4CksumOffloadReply) GetCrcString() string { + return "e8d4e804" } -func (*AfPacketDetails) GetMessageType() api.MessageType { +func (*AfPacketSetL4CksumOffloadReply) GetMessageType() api.MessageType { return api.ReplyMessage } @@ -355,8 +354,8 @@ func init() { api.RegisterMessage((*AfPacketCreateReply)(nil), "af_packet.AfPacketCreateReply") api.RegisterMessage((*AfPacketDelete)(nil), "af_packet.AfPacketDelete") api.RegisterMessage((*AfPacketDeleteReply)(nil), "af_packet.AfPacketDeleteReply") + api.RegisterMessage((*AfPacketDetails)(nil), "af_packet.AfPacketDetails") + api.RegisterMessage((*AfPacketDump)(nil), "af_packet.AfPacketDump") 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") } |