Generator improvements and cleanup
[govpp.git] / examples / bin_api / vpe / vpe.ba.go
index 9eb4c98..7dc718d 100644 (file)
@@ -11,9 +11,9 @@
 */
 package vpe
 
-import "git.fd.io/govpp.git/api"
-import "github.com/lunixbochs/struc"
-import "bytes"
+import api "git.fd.io/govpp.git/api"
+import struc "github.com/lunixbochs/struc"
+import bytes "bytes"
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ = api.RegisterMessage
@@ -21,37 +21,6 @@ var _ = struc.Pack
 var _ = bytes.NewBuffer
 
 // Services represents VPP binary API services:
-//
-//     "services": {
-//         "cli_inband": {
-//             "reply": "cli_inband_reply"
-//         },
-//         "get_node_index": {
-//             "reply": "get_node_index_reply"
-//         },
-//         "cli": {
-//             "reply": "cli_reply"
-//         },
-//         "show_version": {
-//             "reply": "show_version_reply"
-//         },
-//         "get_node_graph": {
-//             "reply": "get_node_graph_reply"
-//         },
-//         "get_next_index": {
-//             "reply": "get_next_index_reply"
-//         },
-//         "show_threads": {
-//             "reply": "show_threads_reply"
-//         },
-//         "add_node_next": {
-//             "reply": "add_node_next_reply"
-//         },
-//         "control_ping": {
-//             "reply": "control_ping_reply"
-//         }
-//     },
-//
 type Services interface {
        AddNodeNext(*AddNodeNext) (*AddNodeNextReply, error)
        Cli(*Cli) (*CliReply, error)
@@ -67,11 +36,6 @@ type Services interface {
 /* Types */
 
 // ThreadData represents VPP binary API type 'thread_data':
-//
-//     "thread_data",
-//     0,
-//     "count"
-//
 type ThreadData struct {
        ID        uint32
        Name      []byte `struc:"[64]byte"`
@@ -92,34 +56,6 @@ func (*ThreadData) GetCrcString() string {
 /* Messages */
 
 // AddNodeNext represents VPP binary API message 'add_node_next':
-//
-//     "add_node_next",
-//     [
-//         "u16",
-//         "_vl_msg_id"
-//     ],
-//     [
-//         "u32",
-//         "client_index"
-//     ],
-//     [
-//         "u32",
-//         "context"
-//     ],
-//     [
-//         "u8",
-//         "node_name",
-//         64
-//     ],
-//     [
-//         "u8",
-//         "next_name",
-//         64
-//     ],
-//     {
-//         "crc": "0x9ab92f7a"
-//     }
-//
 type AddNodeNext struct {
        NodeName []byte `struc:"[64]byte"`
        NextName []byte `struc:"[64]byte"`
@@ -136,28 +72,6 @@ func (*AddNodeNext) GetMessageType() api.MessageType {
 }
 
 // AddNodeNextReply represents VPP binary API message 'add_node_next_reply':
-//
-//     "add_node_next_reply",
-//     [
-//         "u16",
-//         "_vl_msg_id"
-//     ],
-//     [
-//         "u32",
-//         "context"
-//     ],
-//     [
-//         "i32",
-//         "retval"
-//     ],
-//     [
-//         "u32",
-//         "next_index"
-//     ],
-//     {
-//         "crc": "0x2ed75f32"
-//     }
-//
 type AddNodeNextReply struct {
        Retval    int32
        NextIndex uint32
@@ -174,28 +88,6 @@ func (*AddNodeNextReply) GetMessageType() api.MessageType {
 }
 
 // Cli represents VPP binary API message 'cli':
-//
-//     "cli",
-//     [
-//         "u16",
-//         "_vl_msg_id"
-//     ],
-//     [
-//         "u32",
-//         "client_index"
-//     ],
-//     [
-//         "u32",
-//         "context"
-//     ],
-//     [
-//         "u64",
-//         "cmd_in_shmem"
-//     ],
-//     {
-//         "crc": "0x23bfbfff"
-//     }
-//
 type Cli struct {
        CmdInShmem uint64
 }
@@ -211,28 +103,6 @@ func (*Cli) GetMessageType() api.MessageType {
 }
 
 // CliInband represents VPP binary API message 'cli_inband':
-//
-//     "cli_inband",
-//     [
-//         "u16",
-//         "_vl_msg_id"
-//     ],
-//     [
-//         "u32",
-//         "client_index"
-//     ],
-//     [
-//         "u32",
-//         "context"
-//     ],
-//     [
-//         "string",
-//         "cmd"
-//     ],
-//     {
-//         "crc": "0xb1ad59b3"
-//     }
-//
 type CliInband struct {
        XXX_CmdLen uint32 `struc:"sizeof=Cmd"`
        Cmd        string
@@ -249,28 +119,6 @@ func (*CliInband) GetMessageType() api.MessageType {
 }
 
 // CliInbandReply represents VPP binary API message 'cli_inband_reply':
-//
-//     "cli_inband_reply",
-//     [
-//         "u16",
-//         "_vl_msg_id"
-//     ],
-//     [
-//         "u32",
-//         "context"
-//     ],
-//     [
-//         "i32",
-//         "retval"
-//     ],
-//     [
-//         "string",
-//         "reply"
-//     ],
-//     {
-//         "crc": "0x6d3c80a4"
-//     }
-//
 type CliInbandReply struct {
        Retval       int32
        XXX_ReplyLen uint32 `struc:"sizeof=Reply"`
@@ -288,28 +136,6 @@ func (*CliInbandReply) GetMessageType() api.MessageType {
 }
 
 // CliReply represents VPP binary API message 'cli_reply':
-//
-//     "cli_reply",
-//     [
-//         "u16",
-//         "_vl_msg_id"
-//     ],
-//     [
-//         "u32",
-//         "context"
-//     ],
-//     [
-//         "i32",
-//         "retval"
-//     ],
-//     [
-//         "u64",
-//         "reply_in_shmem"
-//     ],
-//     {
-//         "crc": "0x06d68297"
-//     }
-//
 type CliReply struct {
        Retval       int32
        ReplyInShmem uint64
@@ -326,24 +152,6 @@ func (*CliReply) GetMessageType() api.MessageType {
 }
 
 // ControlPing represents VPP binary API message 'control_ping':
-//
-//     "control_ping",
-//     [
-//         "u16",
-//         "_vl_msg_id"
-//     ],
-//     [
-//         "u32",
-//         "client_index"
-//     ],
-//     [
-//         "u32",
-//         "context"
-//     ],
-//     {
-//         "crc": "0x51077d14"
-//     }
-//
 type ControlPing struct{}
 
 func (*ControlPing) GetMessageName() string {
@@ -357,32 +165,6 @@ func (*ControlPing) GetMessageType() api.MessageType {
 }
 
 // ControlPingReply represents VPP binary API message 'control_ping_reply':
-//
-//     "control_ping_reply",
-//     [
-//         "u16",
-//         "_vl_msg_id"
-//     ],
-//     [
-//         "u32",
-//         "context"
-//     ],
-//     [
-//         "i32",
-//         "retval"
-//     ],
-//     [
-//         "u32",
-//         "client_index"
-//     ],
-//     [
-//         "u32",
-//         "vpe_pid"
-//     ],
-//     {
-//         "crc": "0xf6b0b8ca"
-//     }
-//
 type ControlPingReply struct {
        Retval      int32
        ClientIndex uint32
@@ -400,34 +182,6 @@ func (*ControlPingReply) GetMessageType() api.MessageType {
 }
 
 // GetNextIndex represents VPP binary API message 'get_next_index':
-//
-//     "get_next_index",
-//     [
-//         "u16",
-//         "_vl_msg_id"
-//     ],
-//     [
-//         "u32",
-//         "client_index"
-//     ],
-//     [
-//         "u32",
-//         "context"
-//     ],
-//     [
-//         "u8",
-//         "node_name",
-//         64
-//     ],
-//     [
-//         "u8",
-//         "next_name",
-//         64
-//     ],
-//     {
-//         "crc": "0x9ab92f7a"
-//     }
-//
 type GetNextIndex struct {
        NodeName []byte `struc:"[64]byte"`
        NextName []byte `struc:"[64]byte"`
@@ -444,28 +198,6 @@ func (*GetNextIndex) GetMessageType() api.MessageType {
 }
 
 // GetNextIndexReply represents VPP binary API message 'get_next_index_reply':
-//
-//     "get_next_index_reply",
-//     [
-//         "u16",
-//         "_vl_msg_id"
-//     ],
-//     [
-//         "u32",
-//         "context"
-//     ],
-//     [
-//         "i32",
-//         "retval"
-//     ],
-//     [
-//         "u32",
-//         "next_index"
-//     ],
-//     {
-//         "crc": "0x2ed75f32"
-//     }
-//
 type GetNextIndexReply struct {
        Retval    int32
        NextIndex uint32
@@ -482,24 +214,6 @@ func (*GetNextIndexReply) GetMessageType() api.MessageType {
 }
 
 // GetNodeGraph represents VPP binary API message 'get_node_graph':
-//
-//     "get_node_graph",
-//     [
-//         "u16",
-//         "_vl_msg_id"
-//     ],
-//     [
-//         "u32",
-//         "client_index"
-//     ],
-//     [
-//         "u32",
-//         "context"
-//     ],
-//     {
-//         "crc": "0x51077d14"
-//     }
-//
 type GetNodeGraph struct{}
 
 func (*GetNodeGraph) GetMessageName() string {
@@ -513,28 +227,6 @@ func (*GetNodeGraph) GetMessageType() api.MessageType {
 }
 
 // GetNodeGraphReply represents VPP binary API message 'get_node_graph_reply':
-//
-//     "get_node_graph_reply",
-//     [
-//         "u16",
-//         "_vl_msg_id"
-//     ],
-//     [
-//         "u32",
-//         "context"
-//     ],
-//     [
-//         "i32",
-//         "retval"
-//     ],
-//     [
-//         "u64",
-//         "reply_in_shmem"
-//     ],
-//     {
-//         "crc": "0x06d68297"
-//     }
-//
 type GetNodeGraphReply struct {
        Retval       int32
        ReplyInShmem uint64
@@ -551,29 +243,6 @@ func (*GetNodeGraphReply) GetMessageType() api.MessageType {
 }
 
 // GetNodeIndex represents VPP binary API message 'get_node_index':
-//
-//     "get_node_index",
-//     [
-//         "u16",
-//         "_vl_msg_id"
-//     ],
-//     [
-//         "u32",
-//         "client_index"
-//     ],
-//     [
-//         "u32",
-//         "context"
-//     ],
-//     [
-//         "u8",
-//         "node_name",
-//         64
-//     ],
-//     {
-//         "crc": "0x6c9a495d"
-//     }
-//
 type GetNodeIndex struct {
        NodeName []byte `struc:"[64]byte"`
 }
@@ -589,28 +258,6 @@ func (*GetNodeIndex) GetMessageType() api.MessageType {
 }
 
 // GetNodeIndexReply represents VPP binary API message 'get_node_index_reply':
-//
-//     "get_node_index_reply",
-//     [
-//         "u16",
-//         "_vl_msg_id"
-//     ],
-//     [
-//         "u32",
-//         "context"
-//     ],
-//     [
-//         "i32",
-//         "retval"
-//     ],
-//     [
-//         "u32",
-//         "node_index"
-//     ],
-//     {
-//         "crc": "0xa8600b89"
-//     }
-//
 type GetNodeIndexReply struct {
        Retval    int32
        NodeIndex uint32
@@ -627,24 +274,6 @@ func (*GetNodeIndexReply) GetMessageType() api.MessageType {
 }
 
 // ShowThreads represents VPP binary API message 'show_threads':
-//
-//     "show_threads",
-//     [
-//         "u16",
-//         "_vl_msg_id"
-//     ],
-//     [
-//         "u32",
-//         "client_index"
-//     ],
-//     [
-//         "u32",
-//         "context"
-//     ],
-//     {
-//         "crc": "0x51077d14"
-//     }
-//
 type ShowThreads struct{}
 
 func (*ShowThreads) GetMessageName() string {
@@ -658,34 +287,6 @@ func (*ShowThreads) GetMessageType() api.MessageType {
 }
 
 // ShowThreadsReply represents VPP binary API message 'show_threads_reply':
-//
-//     "show_threads_reply",
-//     [
-//         "u16",
-//         "_vl_msg_id"
-//     ],
-//     [
-//         "u32",
-//         "context"
-//     ],
-//     [
-//         "i32",
-//         "retval"
-//     ],
-//     [
-//         "u32",
-//         "count"
-//     ],
-//     [
-//         "vl_api_thread_data_t",
-//         "thread_data",
-//         0,
-//         "count"
-//     ],
-//     {
-//         "crc": "0x6942fb35"
-//     }
-//
 type ShowThreadsReply struct {
        Retval     int32
        Count      uint32 `struc:"sizeof=ThreadData"`
@@ -703,24 +304,6 @@ func (*ShowThreadsReply) GetMessageType() api.MessageType {
 }
 
 // ShowVersion represents VPP binary API message 'show_version':
-//
-//     "show_version",
-//     [
-//         "u16",
-//         "_vl_msg_id"
-//     ],
-//     [
-//         "u32",
-//         "client_index"
-//     ],
-//     [
-//         "u32",
-//         "context"
-//     ],
-//     {
-//         "crc": "0x51077d14"
-//     }
-//
 type ShowVersion struct{}
 
 func (*ShowVersion) GetMessageName() string {
@@ -734,40 +317,6 @@ func (*ShowVersion) GetMessageType() api.MessageType {
 }
 
 // ShowVersionReply represents VPP binary API message 'show_version_reply':
-//
-//     "show_version_reply",
-//     [
-//         "u16",
-//         "_vl_msg_id"
-//     ],
-//     [
-//         "u32",
-//         "context"
-//     ],
-//     [
-//         "i32",
-//         "retval"
-//     ],
-//     [
-//         "string",
-//         "program"
-//     ],
-//     [
-//         "string",
-//         "version"
-//     ],
-//     [
-//         "string",
-//         "build_date"
-//     ],
-//     [
-//         "string",
-//         "build_directory"
-//     ],
-//     {
-//         "crc": "0xb9bcf6df"
-//     }
-//
 type ShowVersionReply struct {
        Retval                int32
        XXX_ProgramLen        uint32 `struc:"sizeof=Program"`