Improve binapi generator
[govpp.git] / binapi / l2tp / l2tp.ba.go
1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
2 // versions:
3 //  binapi-generator: v0.4.0-dev
4 //  VPP:              20.05-release
5 // source: /usr/share/vpp/api/core/l2tp.api.json
6
7 // Package l2tp contains generated bindings for API file l2tp.api.
8 //
9 // Contents:
10 //   1 enum
11 //  10 messages
12 //
13 package l2tp
14
15 import (
16         api "git.fd.io/govpp.git/api"
17         _ "git.fd.io/govpp.git/binapi/ethernet_types"
18         interface_types "git.fd.io/govpp.git/binapi/interface_types"
19         ip_types "git.fd.io/govpp.git/binapi/ip_types"
20         codec "git.fd.io/govpp.git/codec"
21         "strconv"
22 )
23
24 // This is a compile-time assertion to ensure that this generated file
25 // is compatible with the GoVPP api package it is being compiled against.
26 // A compilation error at this line likely means your copy of the
27 // GoVPP api package needs to be updated.
28 const _ = api.GoVppAPIPackageIsVersion2
29
30 const (
31         APIFile    = "l2tp"
32         APIVersion = "2.0.0"
33         VersionCrc = 0xb018cef7
34 )
35
36 // L2tLookupKey defines enum 'l2t_lookup_key'.
37 type L2tLookupKey uint8
38
39 const (
40         L2T_LOOKUP_KEY_API_SRC_ADDR   L2tLookupKey = 0
41         L2T_LOOKUP_KEY_API_DST_ADDR   L2tLookupKey = 1
42         L2T_LOOKUP_KEY_API_SESSION_ID L2tLookupKey = 2
43 )
44
45 var (
46         L2tLookupKey_name = map[uint8]string{
47                 0: "L2T_LOOKUP_KEY_API_SRC_ADDR",
48                 1: "L2T_LOOKUP_KEY_API_DST_ADDR",
49                 2: "L2T_LOOKUP_KEY_API_SESSION_ID",
50         }
51         L2tLookupKey_value = map[string]uint8{
52                 "L2T_LOOKUP_KEY_API_SRC_ADDR":   0,
53                 "L2T_LOOKUP_KEY_API_DST_ADDR":   1,
54                 "L2T_LOOKUP_KEY_API_SESSION_ID": 2,
55         }
56 )
57
58 func (x L2tLookupKey) String() string {
59         s, ok := L2tLookupKey_name[uint8(x)]
60         if ok {
61                 return s
62         }
63         return "L2tLookupKey(" + strconv.Itoa(int(x)) + ")"
64 }
65
66 // L2tpv3CreateTunnel defines message 'l2tpv3_create_tunnel'.
67 type L2tpv3CreateTunnel struct {
68         ClientAddress     ip_types.Address `binapi:"address,name=client_address" json:"client_address,omitempty"`
69         OurAddress        ip_types.Address `binapi:"address,name=our_address" json:"our_address,omitempty"`
70         LocalSessionID    uint32           `binapi:"u32,name=local_session_id" json:"local_session_id,omitempty"`
71         RemoteSessionID   uint32           `binapi:"u32,name=remote_session_id" json:"remote_session_id,omitempty"`
72         LocalCookie       uint64           `binapi:"u64,name=local_cookie" json:"local_cookie,omitempty"`
73         RemoteCookie      uint64           `binapi:"u64,name=remote_cookie" json:"remote_cookie,omitempty"`
74         L2SublayerPresent bool             `binapi:"bool,name=l2_sublayer_present" json:"l2_sublayer_present,omitempty"`
75         EncapVrfID        uint32           `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
76 }
77
78 func (m *L2tpv3CreateTunnel) Reset()               { *m = L2tpv3CreateTunnel{} }
79 func (*L2tpv3CreateTunnel) GetMessageName() string { return "l2tpv3_create_tunnel" }
80 func (*L2tpv3CreateTunnel) GetCrcString() string   { return "596892cb" }
81 func (*L2tpv3CreateTunnel) GetMessageType() api.MessageType {
82         return api.RequestMessage
83 }
84
85 func (m *L2tpv3CreateTunnel) Size() int {
86         if m == nil {
87                 return 0
88         }
89         var size int
90         size += 1      // m.ClientAddress.Af
91         size += 1 * 16 // m.ClientAddress.Un
92         size += 1      // m.OurAddress.Af
93         size += 1 * 16 // m.OurAddress.Un
94         size += 4      // m.LocalSessionID
95         size += 4      // m.RemoteSessionID
96         size += 8      // m.LocalCookie
97         size += 8      // m.RemoteCookie
98         size += 1      // m.L2SublayerPresent
99         size += 4      // m.EncapVrfID
100         return size
101 }
102 func (m *L2tpv3CreateTunnel) Marshal(b []byte) ([]byte, error) {
103         var buf *codec.Buffer
104         if b == nil {
105                 buf = codec.NewBuffer(make([]byte, m.Size()))
106         } else {
107                 buf = codec.NewBuffer(b)
108         }
109         buf.EncodeUint8(uint8(m.ClientAddress.Af))
110         buf.EncodeBytes(m.ClientAddress.Un.XXX_UnionData[:], 0)
111         buf.EncodeUint8(uint8(m.OurAddress.Af))
112         buf.EncodeBytes(m.OurAddress.Un.XXX_UnionData[:], 0)
113         buf.EncodeUint32(uint32(m.LocalSessionID))
114         buf.EncodeUint32(uint32(m.RemoteSessionID))
115         buf.EncodeUint64(uint64(m.LocalCookie))
116         buf.EncodeUint64(uint64(m.RemoteCookie))
117         buf.EncodeBool(m.L2SublayerPresent)
118         buf.EncodeUint32(uint32(m.EncapVrfID))
119         return buf.Bytes(), nil
120 }
121 func (m *L2tpv3CreateTunnel) Unmarshal(b []byte) error {
122         buf := codec.NewBuffer(b)
123         m.ClientAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
124         copy(m.ClientAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
125         m.OurAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
126         copy(m.OurAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
127         m.LocalSessionID = buf.DecodeUint32()
128         m.RemoteSessionID = buf.DecodeUint32()
129         m.LocalCookie = buf.DecodeUint64()
130         m.RemoteCookie = buf.DecodeUint64()
131         m.L2SublayerPresent = buf.DecodeBool()
132         m.EncapVrfID = buf.DecodeUint32()
133         return nil
134 }
135
136 // L2tpv3CreateTunnelReply defines message 'l2tpv3_create_tunnel_reply'.
137 type L2tpv3CreateTunnelReply struct {
138         Retval    int32                          `binapi:"i32,name=retval" json:"retval,omitempty"`
139         SwIfIndex interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
140 }
141
142 func (m *L2tpv3CreateTunnelReply) Reset()               { *m = L2tpv3CreateTunnelReply{} }
143 func (*L2tpv3CreateTunnelReply) GetMessageName() string { return "l2tpv3_create_tunnel_reply" }
144 func (*L2tpv3CreateTunnelReply) GetCrcString() string   { return "5383d31f" }
145 func (*L2tpv3CreateTunnelReply) GetMessageType() api.MessageType {
146         return api.ReplyMessage
147 }
148
149 func (m *L2tpv3CreateTunnelReply) Size() int {
150         if m == nil {
151                 return 0
152         }
153         var size int
154         size += 4 // m.Retval
155         size += 4 // m.SwIfIndex
156         return size
157 }
158 func (m *L2tpv3CreateTunnelReply) Marshal(b []byte) ([]byte, error) {
159         var buf *codec.Buffer
160         if b == nil {
161                 buf = codec.NewBuffer(make([]byte, m.Size()))
162         } else {
163                 buf = codec.NewBuffer(b)
164         }
165         buf.EncodeUint32(uint32(m.Retval))
166         buf.EncodeUint32(uint32(m.SwIfIndex))
167         return buf.Bytes(), nil
168 }
169 func (m *L2tpv3CreateTunnelReply) Unmarshal(b []byte) error {
170         buf := codec.NewBuffer(b)
171         m.Retval = int32(buf.DecodeUint32())
172         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
173         return nil
174 }
175
176 // L2tpv3InterfaceEnableDisable defines message 'l2tpv3_interface_enable_disable'.
177 type L2tpv3InterfaceEnableDisable struct {
178         EnableDisable bool                           `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
179         SwIfIndex     interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
180 }
181
182 func (m *L2tpv3InterfaceEnableDisable) Reset() { *m = L2tpv3InterfaceEnableDisable{} }
183 func (*L2tpv3InterfaceEnableDisable) GetMessageName() string {
184         return "l2tpv3_interface_enable_disable"
185 }
186 func (*L2tpv3InterfaceEnableDisable) GetCrcString() string { return "3865946c" }
187 func (*L2tpv3InterfaceEnableDisable) GetMessageType() api.MessageType {
188         return api.RequestMessage
189 }
190
191 func (m *L2tpv3InterfaceEnableDisable) Size() int {
192         if m == nil {
193                 return 0
194         }
195         var size int
196         size += 1 // m.EnableDisable
197         size += 4 // m.SwIfIndex
198         return size
199 }
200 func (m *L2tpv3InterfaceEnableDisable) Marshal(b []byte) ([]byte, error) {
201         var buf *codec.Buffer
202         if b == nil {
203                 buf = codec.NewBuffer(make([]byte, m.Size()))
204         } else {
205                 buf = codec.NewBuffer(b)
206         }
207         buf.EncodeBool(m.EnableDisable)
208         buf.EncodeUint32(uint32(m.SwIfIndex))
209         return buf.Bytes(), nil
210 }
211 func (m *L2tpv3InterfaceEnableDisable) Unmarshal(b []byte) error {
212         buf := codec.NewBuffer(b)
213         m.EnableDisable = buf.DecodeBool()
214         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
215         return nil
216 }
217
218 // L2tpv3InterfaceEnableDisableReply defines message 'l2tpv3_interface_enable_disable_reply'.
219 type L2tpv3InterfaceEnableDisableReply struct {
220         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
221 }
222
223 func (m *L2tpv3InterfaceEnableDisableReply) Reset() { *m = L2tpv3InterfaceEnableDisableReply{} }
224 func (*L2tpv3InterfaceEnableDisableReply) GetMessageName() string {
225         return "l2tpv3_interface_enable_disable_reply"
226 }
227 func (*L2tpv3InterfaceEnableDisableReply) GetCrcString() string { return "e8d4e804" }
228 func (*L2tpv3InterfaceEnableDisableReply) GetMessageType() api.MessageType {
229         return api.ReplyMessage
230 }
231
232 func (m *L2tpv3InterfaceEnableDisableReply) Size() int {
233         if m == nil {
234                 return 0
235         }
236         var size int
237         size += 4 // m.Retval
238         return size
239 }
240 func (m *L2tpv3InterfaceEnableDisableReply) Marshal(b []byte) ([]byte, error) {
241         var buf *codec.Buffer
242         if b == nil {
243                 buf = codec.NewBuffer(make([]byte, m.Size()))
244         } else {
245                 buf = codec.NewBuffer(b)
246         }
247         buf.EncodeUint32(uint32(m.Retval))
248         return buf.Bytes(), nil
249 }
250 func (m *L2tpv3InterfaceEnableDisableReply) Unmarshal(b []byte) error {
251         buf := codec.NewBuffer(b)
252         m.Retval = int32(buf.DecodeUint32())
253         return nil
254 }
255
256 // L2tpv3SetLookupKey defines message 'l2tpv3_set_lookup_key'.
257 type L2tpv3SetLookupKey struct {
258         Key L2tLookupKey `binapi:"l2t_lookup_key,name=key" json:"key,omitempty"`
259 }
260
261 func (m *L2tpv3SetLookupKey) Reset()               { *m = L2tpv3SetLookupKey{} }
262 func (*L2tpv3SetLookupKey) GetMessageName() string { return "l2tpv3_set_lookup_key" }
263 func (*L2tpv3SetLookupKey) GetCrcString() string   { return "c9892c86" }
264 func (*L2tpv3SetLookupKey) GetMessageType() api.MessageType {
265         return api.RequestMessage
266 }
267
268 func (m *L2tpv3SetLookupKey) Size() int {
269         if m == nil {
270                 return 0
271         }
272         var size int
273         size += 1 // m.Key
274         return size
275 }
276 func (m *L2tpv3SetLookupKey) Marshal(b []byte) ([]byte, error) {
277         var buf *codec.Buffer
278         if b == nil {
279                 buf = codec.NewBuffer(make([]byte, m.Size()))
280         } else {
281                 buf = codec.NewBuffer(b)
282         }
283         buf.EncodeUint8(uint8(m.Key))
284         return buf.Bytes(), nil
285 }
286 func (m *L2tpv3SetLookupKey) Unmarshal(b []byte) error {
287         buf := codec.NewBuffer(b)
288         m.Key = L2tLookupKey(buf.DecodeUint8())
289         return nil
290 }
291
292 // L2tpv3SetLookupKeyReply defines message 'l2tpv3_set_lookup_key_reply'.
293 type L2tpv3SetLookupKeyReply struct {
294         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
295 }
296
297 func (m *L2tpv3SetLookupKeyReply) Reset()               { *m = L2tpv3SetLookupKeyReply{} }
298 func (*L2tpv3SetLookupKeyReply) GetMessageName() string { return "l2tpv3_set_lookup_key_reply" }
299 func (*L2tpv3SetLookupKeyReply) GetCrcString() string   { return "e8d4e804" }
300 func (*L2tpv3SetLookupKeyReply) GetMessageType() api.MessageType {
301         return api.ReplyMessage
302 }
303
304 func (m *L2tpv3SetLookupKeyReply) Size() int {
305         if m == nil {
306                 return 0
307         }
308         var size int
309         size += 4 // m.Retval
310         return size
311 }
312 func (m *L2tpv3SetLookupKeyReply) Marshal(b []byte) ([]byte, error) {
313         var buf *codec.Buffer
314         if b == nil {
315                 buf = codec.NewBuffer(make([]byte, m.Size()))
316         } else {
317                 buf = codec.NewBuffer(b)
318         }
319         buf.EncodeUint32(uint32(m.Retval))
320         return buf.Bytes(), nil
321 }
322 func (m *L2tpv3SetLookupKeyReply) Unmarshal(b []byte) error {
323         buf := codec.NewBuffer(b)
324         m.Retval = int32(buf.DecodeUint32())
325         return nil
326 }
327
328 // L2tpv3SetTunnelCookies defines message 'l2tpv3_set_tunnel_cookies'.
329 type L2tpv3SetTunnelCookies struct {
330         SwIfIndex       interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
331         NewLocalCookie  uint64                         `binapi:"u64,name=new_local_cookie" json:"new_local_cookie,omitempty"`
332         NewRemoteCookie uint64                         `binapi:"u64,name=new_remote_cookie" json:"new_remote_cookie,omitempty"`
333 }
334
335 func (m *L2tpv3SetTunnelCookies) Reset()               { *m = L2tpv3SetTunnelCookies{} }
336 func (*L2tpv3SetTunnelCookies) GetMessageName() string { return "l2tpv3_set_tunnel_cookies" }
337 func (*L2tpv3SetTunnelCookies) GetCrcString() string   { return "b3f4faf7" }
338 func (*L2tpv3SetTunnelCookies) GetMessageType() api.MessageType {
339         return api.RequestMessage
340 }
341
342 func (m *L2tpv3SetTunnelCookies) Size() int {
343         if m == nil {
344                 return 0
345         }
346         var size int
347         size += 4 // m.SwIfIndex
348         size += 8 // m.NewLocalCookie
349         size += 8 // m.NewRemoteCookie
350         return size
351 }
352 func (m *L2tpv3SetTunnelCookies) Marshal(b []byte) ([]byte, error) {
353         var buf *codec.Buffer
354         if b == nil {
355                 buf = codec.NewBuffer(make([]byte, m.Size()))
356         } else {
357                 buf = codec.NewBuffer(b)
358         }
359         buf.EncodeUint32(uint32(m.SwIfIndex))
360         buf.EncodeUint64(uint64(m.NewLocalCookie))
361         buf.EncodeUint64(uint64(m.NewRemoteCookie))
362         return buf.Bytes(), nil
363 }
364 func (m *L2tpv3SetTunnelCookies) Unmarshal(b []byte) error {
365         buf := codec.NewBuffer(b)
366         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
367         m.NewLocalCookie = buf.DecodeUint64()
368         m.NewRemoteCookie = buf.DecodeUint64()
369         return nil
370 }
371
372 // L2tpv3SetTunnelCookiesReply defines message 'l2tpv3_set_tunnel_cookies_reply'.
373 type L2tpv3SetTunnelCookiesReply struct {
374         Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
375 }
376
377 func (m *L2tpv3SetTunnelCookiesReply) Reset()               { *m = L2tpv3SetTunnelCookiesReply{} }
378 func (*L2tpv3SetTunnelCookiesReply) GetMessageName() string { return "l2tpv3_set_tunnel_cookies_reply" }
379 func (*L2tpv3SetTunnelCookiesReply) GetCrcString() string   { return "e8d4e804" }
380 func (*L2tpv3SetTunnelCookiesReply) GetMessageType() api.MessageType {
381         return api.ReplyMessage
382 }
383
384 func (m *L2tpv3SetTunnelCookiesReply) Size() int {
385         if m == nil {
386                 return 0
387         }
388         var size int
389         size += 4 // m.Retval
390         return size
391 }
392 func (m *L2tpv3SetTunnelCookiesReply) Marshal(b []byte) ([]byte, error) {
393         var buf *codec.Buffer
394         if b == nil {
395                 buf = codec.NewBuffer(make([]byte, m.Size()))
396         } else {
397                 buf = codec.NewBuffer(b)
398         }
399         buf.EncodeUint32(uint32(m.Retval))
400         return buf.Bytes(), nil
401 }
402 func (m *L2tpv3SetTunnelCookiesReply) Unmarshal(b []byte) error {
403         buf := codec.NewBuffer(b)
404         m.Retval = int32(buf.DecodeUint32())
405         return nil
406 }
407
408 // SwIfL2tpv3TunnelDetails defines message 'sw_if_l2tpv3_tunnel_details'.
409 type SwIfL2tpv3TunnelDetails struct {
410         SwIfIndex         interface_types.InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
411         InterfaceName     string                         `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
412         ClientAddress     ip_types.Address               `binapi:"address,name=client_address" json:"client_address,omitempty"`
413         OurAddress        ip_types.Address               `binapi:"address,name=our_address" json:"our_address,omitempty"`
414         LocalSessionID    uint32                         `binapi:"u32,name=local_session_id" json:"local_session_id,omitempty"`
415         RemoteSessionID   uint32                         `binapi:"u32,name=remote_session_id" json:"remote_session_id,omitempty"`
416         LocalCookie       []uint64                       `binapi:"u64[2],name=local_cookie" json:"local_cookie,omitempty"`
417         RemoteCookie      uint64                         `binapi:"u64,name=remote_cookie" json:"remote_cookie,omitempty"`
418         L2SublayerPresent bool                           `binapi:"bool,name=l2_sublayer_present" json:"l2_sublayer_present,omitempty"`
419 }
420
421 func (m *SwIfL2tpv3TunnelDetails) Reset()               { *m = SwIfL2tpv3TunnelDetails{} }
422 func (*SwIfL2tpv3TunnelDetails) GetMessageName() string { return "sw_if_l2tpv3_tunnel_details" }
423 func (*SwIfL2tpv3TunnelDetails) GetCrcString() string   { return "1dab5c7e" }
424 func (*SwIfL2tpv3TunnelDetails) GetMessageType() api.MessageType {
425         return api.ReplyMessage
426 }
427
428 func (m *SwIfL2tpv3TunnelDetails) Size() int {
429         if m == nil {
430                 return 0
431         }
432         var size int
433         size += 4      // m.SwIfIndex
434         size += 64     // m.InterfaceName
435         size += 1      // m.ClientAddress.Af
436         size += 1 * 16 // m.ClientAddress.Un
437         size += 1      // m.OurAddress.Af
438         size += 1 * 16 // m.OurAddress.Un
439         size += 4      // m.LocalSessionID
440         size += 4      // m.RemoteSessionID
441         size += 8 * 2  // m.LocalCookie
442         size += 8      // m.RemoteCookie
443         size += 1      // m.L2SublayerPresent
444         return size
445 }
446 func (m *SwIfL2tpv3TunnelDetails) Marshal(b []byte) ([]byte, error) {
447         var buf *codec.Buffer
448         if b == nil {
449                 buf = codec.NewBuffer(make([]byte, m.Size()))
450         } else {
451                 buf = codec.NewBuffer(b)
452         }
453         buf.EncodeUint32(uint32(m.SwIfIndex))
454         buf.EncodeString(m.InterfaceName, 64)
455         buf.EncodeUint8(uint8(m.ClientAddress.Af))
456         buf.EncodeBytes(m.ClientAddress.Un.XXX_UnionData[:], 0)
457         buf.EncodeUint8(uint8(m.OurAddress.Af))
458         buf.EncodeBytes(m.OurAddress.Un.XXX_UnionData[:], 0)
459         buf.EncodeUint32(uint32(m.LocalSessionID))
460         buf.EncodeUint32(uint32(m.RemoteSessionID))
461         for i := 0; i < 2; i++ {
462                 var x uint64
463                 if i < len(m.LocalCookie) {
464                         x = uint64(m.LocalCookie[i])
465                 }
466                 buf.EncodeUint64(uint64(x))
467         }
468         buf.EncodeUint64(uint64(m.RemoteCookie))
469         buf.EncodeBool(m.L2SublayerPresent)
470         return buf.Bytes(), nil
471 }
472 func (m *SwIfL2tpv3TunnelDetails) Unmarshal(b []byte) error {
473         buf := codec.NewBuffer(b)
474         m.SwIfIndex = interface_types.InterfaceIndex(buf.DecodeUint32())
475         m.InterfaceName = buf.DecodeString(64)
476         m.ClientAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
477         copy(m.ClientAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
478         m.OurAddress.Af = ip_types.AddressFamily(buf.DecodeUint8())
479         copy(m.OurAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
480         m.LocalSessionID = buf.DecodeUint32()
481         m.RemoteSessionID = buf.DecodeUint32()
482         m.LocalCookie = make([]uint64, 2)
483         for i := 0; i < len(m.LocalCookie); i++ {
484                 m.LocalCookie[i] = buf.DecodeUint64()
485         }
486         m.RemoteCookie = buf.DecodeUint64()
487         m.L2SublayerPresent = buf.DecodeBool()
488         return nil
489 }
490
491 // SwIfL2tpv3TunnelDump defines message 'sw_if_l2tpv3_tunnel_dump'.
492 type SwIfL2tpv3TunnelDump struct{}
493
494 func (m *SwIfL2tpv3TunnelDump) Reset()               { *m = SwIfL2tpv3TunnelDump{} }
495 func (*SwIfL2tpv3TunnelDump) GetMessageName() string { return "sw_if_l2tpv3_tunnel_dump" }
496 func (*SwIfL2tpv3TunnelDump) GetCrcString() string   { return "51077d14" }
497 func (*SwIfL2tpv3TunnelDump) GetMessageType() api.MessageType {
498         return api.RequestMessage
499 }
500
501 func (m *SwIfL2tpv3TunnelDump) Size() int {
502         if m == nil {
503                 return 0
504         }
505         var size int
506         return size
507 }
508 func (m *SwIfL2tpv3TunnelDump) Marshal(b []byte) ([]byte, error) {
509         var buf *codec.Buffer
510         if b == nil {
511                 buf = codec.NewBuffer(make([]byte, m.Size()))
512         } else {
513                 buf = codec.NewBuffer(b)
514         }
515         return buf.Bytes(), nil
516 }
517 func (m *SwIfL2tpv3TunnelDump) Unmarshal(b []byte) error {
518         return nil
519 }
520
521 func init() { file_l2tp_binapi_init() }
522 func file_l2tp_binapi_init() {
523         api.RegisterMessage((*L2tpv3CreateTunnel)(nil), "l2tpv3_create_tunnel_596892cb")
524         api.RegisterMessage((*L2tpv3CreateTunnelReply)(nil), "l2tpv3_create_tunnel_reply_5383d31f")
525         api.RegisterMessage((*L2tpv3InterfaceEnableDisable)(nil), "l2tpv3_interface_enable_disable_3865946c")
526         api.RegisterMessage((*L2tpv3InterfaceEnableDisableReply)(nil), "l2tpv3_interface_enable_disable_reply_e8d4e804")
527         api.RegisterMessage((*L2tpv3SetLookupKey)(nil), "l2tpv3_set_lookup_key_c9892c86")
528         api.RegisterMessage((*L2tpv3SetLookupKeyReply)(nil), "l2tpv3_set_lookup_key_reply_e8d4e804")
529         api.RegisterMessage((*L2tpv3SetTunnelCookies)(nil), "l2tpv3_set_tunnel_cookies_b3f4faf7")
530         api.RegisterMessage((*L2tpv3SetTunnelCookiesReply)(nil), "l2tpv3_set_tunnel_cookies_reply_e8d4e804")
531         api.RegisterMessage((*SwIfL2tpv3TunnelDetails)(nil), "sw_if_l2tpv3_tunnel_details_1dab5c7e")
532         api.RegisterMessage((*SwIfL2tpv3TunnelDump)(nil), "sw_if_l2tpv3_tunnel_dump_51077d14")
533 }
534
535 // Messages returns list of all messages in this module.
536 func AllMessages() []api.Message {
537         return []api.Message{
538                 (*L2tpv3CreateTunnel)(nil),
539                 (*L2tpv3CreateTunnelReply)(nil),
540                 (*L2tpv3InterfaceEnableDisable)(nil),
541                 (*L2tpv3InterfaceEnableDisableReply)(nil),
542                 (*L2tpv3SetLookupKey)(nil),
543                 (*L2tpv3SetLookupKeyReply)(nil),
544                 (*L2tpv3SetTunnelCookies)(nil),
545                 (*L2tpv3SetTunnelCookiesReply)(nil),
546                 (*SwIfL2tpv3TunnelDetails)(nil),
547                 (*SwIfL2tpv3TunnelDump)(nil),
548         }
549 }