X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=examples%2Fbin_api%2Ftap%2Ftap.ba.go;h=f94f7be54ec6260366db8aaed296889384b21f2c;hb=refs%2Fchanges%2F59%2F16459%2F1;hp=36f5549bf3f62c7ecbe21f1b698888cc6c3a1aae;hpb=a3bb834db727a3ac9a1ffcfeae9265e5dead851f;p=govpp.git diff --git a/examples/bin_api/tap/tap.ba.go b/examples/bin_api/tap/tap.ba.go index 36f5549..f94f7be 100644 --- a/examples/bin_api/tap/tap.ba.go +++ b/examples/bin_api/tap/tap.ba.go @@ -1,15 +1,13 @@ // Code generated by GoVPP binapi-generator. DO NOT EDIT. -// source: tap.api.json +// source: tap.api.json /* -Package tap is a generated VPP binary API of the 'tap' VPP module. + Package tap is a generated from VPP binary API module 'tap'. -It is generated from this file: - tap.api.json + It contains following objects: + 8 messages + 4 services -It contains these VPP binary API objects: - 8 messages - 4 services */ package tap @@ -18,83 +16,108 @@ import "github.com/lunixbochs/struc" import "bytes" // Reference imports to suppress errors if they are not otherwise used. +var _ = api.RegisterMessage var _ = struc.Pack var _ = bytes.NewBuffer +// Services represents VPP binary API services: +// +// "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" +// } +// }, +// +type Services interface { + DumpSwInterfaceTap(*SwInterfaceTapDump) ([]*SwInterfaceTapDetails, error) + TapConnect(*TapConnect) (*TapConnectReply, error) + TapDelete(*TapDelete) (*TapDeleteReply, error) + TapModify(*TapModify) (*TapModifyReply, error) +} + /* Messages */ -// TapConnect represents the VPP binary API message 'tap_connect'. -// Generated from 'tap.api.json', line 4: +// TapConnect represents VPP binary API message 'tap_connect': // -// "tap_connect", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u8", -// "use_random_mac" -// ], -// [ -// "u8", -// "tap_name", -// 64 -// ], -// [ -// "u8", -// "mac_address", -// 6 -// ], -// [ -// "u8", -// "renumber" -// ], -// [ -// "u32", -// "custom_dev_instance" -// ], -// [ -// "u8", -// "ip4_address_set" -// ], -// [ -// "u8", -// "ip4_address", -// 4 -// ], -// [ -// "u8", -// "ip4_mask_width" -// ], -// [ -// "u8", -// "ip6_address_set" -// ], -// [ -// "u8", -// "ip6_address", -// 16 -// ], -// [ -// "u8", -// "ip6_mask_width" -// ], -// [ -// "u8", -// "tag", -// 64 -// ], -// { -// "crc": "0x9b9c396f" -// } +// "tap_connect", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u8", +// "use_random_mac" +// ], +// [ +// "u8", +// "tap_name", +// 64 +// ], +// [ +// "u8", +// "mac_address", +// 6 +// ], +// [ +// "u8", +// "renumber" +// ], +// [ +// "u32", +// "custom_dev_instance" +// ], +// [ +// "u8", +// "ip4_address_set" +// ], +// [ +// "u8", +// "ip4_address", +// 4 +// ], +// [ +// "u8", +// "ip4_mask_width" +// ], +// [ +// "u8", +// "ip6_address_set" +// ], +// [ +// "u8", +// "ip6_address", +// 16 +// ], +// [ +// "u8", +// "ip6_mask_width" +// ], +// [ +// "u8", +// "tag", +// 64 +// ], +// { +// "crc": "0x9b9c396f" +// } // type TapConnect struct { UseRandomMac uint8 @@ -120,33 +143,29 @@ func (*TapConnect) GetCrcString() string { func (*TapConnect) GetMessageType() api.MessageType { return api.RequestMessage } -func NewTapConnect() api.Message { - return &TapConnect{} -} -// TapConnectReply represents the VPP binary API message 'tap_connect_reply'. -// Generated from 'tap.api.json', line 75: +// TapConnectReply represents VPP binary API message 'tap_connect_reply': // -// "tap_connect_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// { -// "crc": "0xfda5941f" -// } +// "tap_connect_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0xfda5941f" +// } // type TapConnectReply struct { Retval int32 @@ -162,55 +181,51 @@ func (*TapConnectReply) GetCrcString() string { func (*TapConnectReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func NewTapConnectReply() api.Message { - return &TapConnectReply{} -} -// TapModify represents the VPP binary API message 'tap_modify'. -// Generated from 'tap.api.json', line 97: +// TapModify represents VPP binary API message 'tap_modify': // -// "tap_modify", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "use_random_mac" -// ], -// [ -// "u8", -// "tap_name", -// 64 -// ], -// [ -// "u8", -// "mac_address", -// 6 -// ], -// [ -// "u8", -// "renumber" -// ], -// [ -// "u32", -// "custom_dev_instance" -// ], -// { -// "crc": "0x8047ae5c" -// } +// "tap_modify", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "use_random_mac" +// ], +// [ +// "u8", +// "tap_name", +// 64 +// ], +// [ +// "u8", +// "mac_address", +// 6 +// ], +// [ +// "u8", +// "renumber" +// ], +// [ +// "u32", +// "custom_dev_instance" +// ], +// { +// "crc": "0x8047ae5c" +// } // type TapModify struct { SwIfIndex uint32 @@ -230,33 +245,29 @@ func (*TapModify) GetCrcString() string { func (*TapModify) GetMessageType() api.MessageType { return api.RequestMessage } -func NewTapModify() api.Message { - return &TapModify{} -} -// TapModifyReply represents the VPP binary API message 'tap_modify_reply'. -// Generated from 'tap.api.json', line 141: +// TapModifyReply represents VPP binary API message 'tap_modify_reply': // -// "tap_modify_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// { -// "crc": "0xfda5941f" -// } +// "tap_modify_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0xfda5941f" +// } // type TapModifyReply struct { Retval int32 @@ -272,33 +283,29 @@ func (*TapModifyReply) GetCrcString() string { func (*TapModifyReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func NewTapModifyReply() api.Message { - return &TapModifyReply{} -} -// TapDelete represents the VPP binary API message 'tap_delete'. -// Generated from 'tap.api.json', line 163: +// TapDelete represents VPP binary API message 'tap_delete': // -// "tap_delete", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// { -// "crc": "0x529cb13f" -// } +// "tap_delete", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// { +// "crc": "0x529cb13f" +// } // type TapDelete struct { SwIfIndex uint32 @@ -313,29 +320,25 @@ func (*TapDelete) GetCrcString() string { func (*TapDelete) GetMessageType() api.MessageType { return api.RequestMessage } -func NewTapDelete() api.Message { - return &TapDelete{} -} -// TapDeleteReply represents the VPP binary API message 'tap_delete_reply'. -// Generated from 'tap.api.json', line 185: +// TapDeleteReply represents VPP binary API message 'tap_delete_reply': // -// "tap_delete_reply", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "i32", -// "retval" -// ], -// { -// "crc": "0xe8d4e804" -// } +// "tap_delete_reply", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "i32", +// "retval" +// ], +// { +// "crc": "0xe8d4e804" +// } // type TapDeleteReply struct { Retval int32 @@ -350,29 +353,25 @@ func (*TapDeleteReply) GetCrcString() string { func (*TapDeleteReply) GetMessageType() api.MessageType { return api.ReplyMessage } -func NewTapDeleteReply() api.Message { - return &TapDeleteReply{} -} -// SwInterfaceTapDump represents the VPP binary API message 'sw_interface_tap_dump'. -// Generated from 'tap.api.json', line 203: +// SwInterfaceTapDump represents VPP binary API message 'sw_interface_tap_dump': // -// "sw_interface_tap_dump", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "client_index" -// ], -// [ -// "u32", -// "context" -// ], -// { -// "crc": "0x51077d14" -// } +// "sw_interface_tap_dump", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "client_index" +// ], +// [ +// "u32", +// "context" +// ], +// { +// "crc": "0x51077d14" +// } // type SwInterfaceTapDump struct{} @@ -385,34 +384,30 @@ func (*SwInterfaceTapDump) GetCrcString() string { func (*SwInterfaceTapDump) GetMessageType() api.MessageType { return api.RequestMessage } -func NewSwInterfaceTapDump() api.Message { - return &SwInterfaceTapDump{} -} -// SwInterfaceTapDetails represents the VPP binary API message 'sw_interface_tap_details'. -// Generated from 'tap.api.json', line 221: +// SwInterfaceTapDetails represents VPP binary API message 'sw_interface_tap_details': // -// "sw_interface_tap_details", -// [ -// "u16", -// "_vl_msg_id" -// ], -// [ -// "u32", -// "context" -// ], -// [ -// "u32", -// "sw_if_index" -// ], -// [ -// "u8", -// "dev_name", -// 64 -// ], -// { -// "crc": "0x76229a57" -// } +// "sw_interface_tap_details", +// [ +// "u16", +// "_vl_msg_id" +// ], +// [ +// "u32", +// "context" +// ], +// [ +// "u32", +// "sw_if_index" +// ], +// [ +// "u8", +// "dev_name", +// 64 +// ], +// { +// "crc": "0x76229a57" +// } // type SwInterfaceTapDetails struct { SwIfIndex uint32 @@ -428,18 +423,6 @@ func (*SwInterfaceTapDetails) GetCrcString() string { 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")