Generator improvements and cleanup
[govpp.git] / examples / bin_api / tap / tap.ba.go
1 // Code generated by GoVPP binapi-generator. DO NOT EDIT.
2 //  source: tap.api.json
3
4 /*
5  Package tap is a generated from VPP binary API module 'tap'.
6
7  It contains following objects:
8           4 services
9           8 messages
10 */
11 package tap
12
13 import api "git.fd.io/govpp.git/api"
14 import struc "github.com/lunixbochs/struc"
15 import bytes "bytes"
16
17 // Reference imports to suppress errors if they are not otherwise used.
18 var _ = api.RegisterMessage
19 var _ = struc.Pack
20 var _ = bytes.NewBuffer
21
22 // Services represents VPP binary API services:
23 type Services interface {
24         DumpSwInterfaceTap(*SwInterfaceTapDump) ([]*SwInterfaceTapDetails, error)
25         TapConnect(*TapConnect) (*TapConnectReply, error)
26         TapDelete(*TapDelete) (*TapDeleteReply, error)
27         TapModify(*TapModify) (*TapModifyReply, error)
28 }
29
30 /* Messages */
31
32 // SwInterfaceTapDetails represents VPP binary API message 'sw_interface_tap_details':
33 type SwInterfaceTapDetails struct {
34         SwIfIndex uint32
35         DevName   []byte `struc:"[64]byte"`
36 }
37
38 func (*SwInterfaceTapDetails) GetMessageName() string {
39         return "sw_interface_tap_details"
40 }
41 func (*SwInterfaceTapDetails) GetCrcString() string {
42         return "76229a57"
43 }
44 func (*SwInterfaceTapDetails) GetMessageType() api.MessageType {
45         return api.ReplyMessage
46 }
47
48 // SwInterfaceTapDump represents VPP binary API message 'sw_interface_tap_dump':
49 type SwInterfaceTapDump struct{}
50
51 func (*SwInterfaceTapDump) GetMessageName() string {
52         return "sw_interface_tap_dump"
53 }
54 func (*SwInterfaceTapDump) GetCrcString() string {
55         return "51077d14"
56 }
57 func (*SwInterfaceTapDump) GetMessageType() api.MessageType {
58         return api.RequestMessage
59 }
60
61 // TapConnect represents VPP binary API message 'tap_connect':
62 type TapConnect struct {
63         UseRandomMac      uint8
64         TapName           []byte `struc:"[64]byte"`
65         MacAddress        []byte `struc:"[6]byte"`
66         Renumber          uint8
67         CustomDevInstance uint32
68         IP4AddressSet     uint8
69         IP4Address        []byte `struc:"[4]byte"`
70         IP4MaskWidth      uint8
71         IP6AddressSet     uint8
72         IP6Address        []byte `struc:"[16]byte"`
73         IP6MaskWidth      uint8
74         Tag               []byte `struc:"[64]byte"`
75 }
76
77 func (*TapConnect) GetMessageName() string {
78         return "tap_connect"
79 }
80 func (*TapConnect) GetCrcString() string {
81         return "9b9c396f"
82 }
83 func (*TapConnect) GetMessageType() api.MessageType {
84         return api.RequestMessage
85 }
86
87 // TapConnectReply represents VPP binary API message 'tap_connect_reply':
88 type TapConnectReply struct {
89         Retval    int32
90         SwIfIndex uint32
91 }
92
93 func (*TapConnectReply) GetMessageName() string {
94         return "tap_connect_reply"
95 }
96 func (*TapConnectReply) GetCrcString() string {
97         return "fda5941f"
98 }
99 func (*TapConnectReply) GetMessageType() api.MessageType {
100         return api.ReplyMessage
101 }
102
103 // TapDelete represents VPP binary API message 'tap_delete':
104 type TapDelete struct {
105         SwIfIndex uint32
106 }
107
108 func (*TapDelete) GetMessageName() string {
109         return "tap_delete"
110 }
111 func (*TapDelete) GetCrcString() string {
112         return "529cb13f"
113 }
114 func (*TapDelete) GetMessageType() api.MessageType {
115         return api.RequestMessage
116 }
117
118 // TapDeleteReply represents VPP binary API message 'tap_delete_reply':
119 type TapDeleteReply struct {
120         Retval int32
121 }
122
123 func (*TapDeleteReply) GetMessageName() string {
124         return "tap_delete_reply"
125 }
126 func (*TapDeleteReply) GetCrcString() string {
127         return "e8d4e804"
128 }
129 func (*TapDeleteReply) GetMessageType() api.MessageType {
130         return api.ReplyMessage
131 }
132
133 // TapModify represents VPP binary API message 'tap_modify':
134 type TapModify struct {
135         SwIfIndex         uint32
136         UseRandomMac      uint8
137         TapName           []byte `struc:"[64]byte"`
138         MacAddress        []byte `struc:"[6]byte"`
139         Renumber          uint8
140         CustomDevInstance uint32
141 }
142
143 func (*TapModify) GetMessageName() string {
144         return "tap_modify"
145 }
146 func (*TapModify) GetCrcString() string {
147         return "8047ae5c"
148 }
149 func (*TapModify) GetMessageType() api.MessageType {
150         return api.RequestMessage
151 }
152
153 // TapModifyReply represents VPP binary API message 'tap_modify_reply':
154 type TapModifyReply struct {
155         Retval    int32
156         SwIfIndex uint32
157 }
158
159 func (*TapModifyReply) GetMessageName() string {
160         return "tap_modify_reply"
161 }
162 func (*TapModifyReply) GetCrcString() string {
163         return "fda5941f"
164 }
165 func (*TapModifyReply) GetMessageType() api.MessageType {
166         return api.ReplyMessage
167 }
168
169 func init() {
170         api.RegisterMessage((*SwInterfaceTapDetails)(nil), "tap.SwInterfaceTapDetails")
171         api.RegisterMessage((*SwInterfaceTapDump)(nil), "tap.SwInterfaceTapDump")
172         api.RegisterMessage((*TapConnect)(nil), "tap.TapConnect")
173         api.RegisterMessage((*TapConnectReply)(nil), "tap.TapConnectReply")
174         api.RegisterMessage((*TapDelete)(nil), "tap.TapDelete")
175         api.RegisterMessage((*TapDeleteReply)(nil), "tap.TapDeleteReply")
176         api.RegisterMessage((*TapModify)(nil), "tap.TapModify")
177         api.RegisterMessage((*TapModifyReply)(nil), "tap.TapModifyReply")
178 }