1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0-dev
5 // source: .vppapi/core/l2tp.api.json
7 // Package l2tp contains generated bindings for API file l2tp.api.
24 api "git.fd.io/govpp.git/api"
25 codec "git.fd.io/govpp.git/codec"
28 // This is a compile-time assertion to ensure that this generated file
29 // is compatible with the GoVPP api package it is being compiled against.
30 // A compilation error at this line likely means your copy of the
31 // GoVPP api package needs to be updated.
32 const _ = api.GoVppAPIPackageIsVersion2
37 VersionCrc = 0x1ecf7730
40 // AddressFamily defines enum 'address_family'.
41 type AddressFamily uint32
44 ADDRESS_IP4 AddressFamily = 0
45 ADDRESS_IP6 AddressFamily = 1
49 AddressFamily_name = map[uint32]string{
53 AddressFamily_value = map[string]uint32{
59 func (x AddressFamily) String() string {
60 s, ok := AddressFamily_name[uint32(x)]
64 return "AddressFamily(" + strconv.Itoa(int(x)) + ")"
67 // IfStatusFlags defines enum 'if_status_flags'.
68 type IfStatusFlags uint32
71 IF_STATUS_API_FLAG_ADMIN_UP IfStatusFlags = 1
72 IF_STATUS_API_FLAG_LINK_UP IfStatusFlags = 2
76 IfStatusFlags_name = map[uint32]string{
77 1: "IF_STATUS_API_FLAG_ADMIN_UP",
78 2: "IF_STATUS_API_FLAG_LINK_UP",
80 IfStatusFlags_value = map[string]uint32{
81 "IF_STATUS_API_FLAG_ADMIN_UP": 1,
82 "IF_STATUS_API_FLAG_LINK_UP": 2,
86 func (x IfStatusFlags) String() string {
87 s, ok := IfStatusFlags_name[uint32(x)]
91 str := func(n uint32) string {
92 s, ok := IfStatusFlags_name[uint32(n)]
96 return "IfStatusFlags(" + strconv.Itoa(int(n)) + ")"
98 for i := uint32(0); i <= 32; i++ {
108 return str(uint32(x))
113 // IfType defines enum 'if_type'.
117 IF_API_TYPE_HARDWARE IfType = 1
118 IF_API_TYPE_SUB IfType = 2
119 IF_API_TYPE_P2P IfType = 3
120 IF_API_TYPE_PIPE IfType = 4
124 IfType_name = map[uint32]string{
125 1: "IF_API_TYPE_HARDWARE",
126 2: "IF_API_TYPE_SUB",
127 3: "IF_API_TYPE_P2P",
128 4: "IF_API_TYPE_PIPE",
130 IfType_value = map[string]uint32{
131 "IF_API_TYPE_HARDWARE": 1,
132 "IF_API_TYPE_SUB": 2,
133 "IF_API_TYPE_P2P": 3,
134 "IF_API_TYPE_PIPE": 4,
138 func (x IfType) String() string {
139 s, ok := IfType_name[uint32(x)]
143 return "IfType(" + strconv.Itoa(int(x)) + ")"
146 // IPDscp defines enum 'ip_dscp'.
150 IP_API_DSCP_CS0 IPDscp = 0
151 IP_API_DSCP_CS1 IPDscp = 8
152 IP_API_DSCP_AF11 IPDscp = 10
153 IP_API_DSCP_AF12 IPDscp = 12
154 IP_API_DSCP_AF13 IPDscp = 14
155 IP_API_DSCP_CS2 IPDscp = 16
156 IP_API_DSCP_AF21 IPDscp = 18
157 IP_API_DSCP_AF22 IPDscp = 20
158 IP_API_DSCP_AF23 IPDscp = 22
159 IP_API_DSCP_CS3 IPDscp = 24
160 IP_API_DSCP_AF31 IPDscp = 26
161 IP_API_DSCP_AF32 IPDscp = 28
162 IP_API_DSCP_AF33 IPDscp = 30
163 IP_API_DSCP_CS4 IPDscp = 32
164 IP_API_DSCP_AF41 IPDscp = 34
165 IP_API_DSCP_AF42 IPDscp = 36
166 IP_API_DSCP_AF43 IPDscp = 38
167 IP_API_DSCP_CS5 IPDscp = 40
168 IP_API_DSCP_EF IPDscp = 46
169 IP_API_DSCP_CS6 IPDscp = 48
170 IP_API_DSCP_CS7 IPDscp = 50
174 IPDscp_name = map[uint8]string{
175 0: "IP_API_DSCP_CS0",
176 8: "IP_API_DSCP_CS1",
177 10: "IP_API_DSCP_AF11",
178 12: "IP_API_DSCP_AF12",
179 14: "IP_API_DSCP_AF13",
180 16: "IP_API_DSCP_CS2",
181 18: "IP_API_DSCP_AF21",
182 20: "IP_API_DSCP_AF22",
183 22: "IP_API_DSCP_AF23",
184 24: "IP_API_DSCP_CS3",
185 26: "IP_API_DSCP_AF31",
186 28: "IP_API_DSCP_AF32",
187 30: "IP_API_DSCP_AF33",
188 32: "IP_API_DSCP_CS4",
189 34: "IP_API_DSCP_AF41",
190 36: "IP_API_DSCP_AF42",
191 38: "IP_API_DSCP_AF43",
192 40: "IP_API_DSCP_CS5",
193 46: "IP_API_DSCP_EF",
194 48: "IP_API_DSCP_CS6",
195 50: "IP_API_DSCP_CS7",
197 IPDscp_value = map[string]uint8{
198 "IP_API_DSCP_CS0": 0,
199 "IP_API_DSCP_CS1": 8,
200 "IP_API_DSCP_AF11": 10,
201 "IP_API_DSCP_AF12": 12,
202 "IP_API_DSCP_AF13": 14,
203 "IP_API_DSCP_CS2": 16,
204 "IP_API_DSCP_AF21": 18,
205 "IP_API_DSCP_AF22": 20,
206 "IP_API_DSCP_AF23": 22,
207 "IP_API_DSCP_CS3": 24,
208 "IP_API_DSCP_AF31": 26,
209 "IP_API_DSCP_AF32": 28,
210 "IP_API_DSCP_AF33": 30,
211 "IP_API_DSCP_CS4": 32,
212 "IP_API_DSCP_AF41": 34,
213 "IP_API_DSCP_AF42": 36,
214 "IP_API_DSCP_AF43": 38,
215 "IP_API_DSCP_CS5": 40,
216 "IP_API_DSCP_EF": 46,
217 "IP_API_DSCP_CS6": 48,
218 "IP_API_DSCP_CS7": 50,
222 func (x IPDscp) String() string {
223 s, ok := IPDscp_name[uint8(x)]
227 return "IPDscp(" + strconv.Itoa(int(x)) + ")"
230 // IPEcn defines enum 'ip_ecn'.
234 IP_API_ECN_NONE IPEcn = 0
235 IP_API_ECN_ECT0 IPEcn = 1
236 IP_API_ECN_ECT1 IPEcn = 2
237 IP_API_ECN_CE IPEcn = 3
241 IPEcn_name = map[uint8]string{
242 0: "IP_API_ECN_NONE",
243 1: "IP_API_ECN_ECT0",
244 2: "IP_API_ECN_ECT1",
247 IPEcn_value = map[string]uint8{
248 "IP_API_ECN_NONE": 0,
249 "IP_API_ECN_ECT0": 1,
250 "IP_API_ECN_ECT1": 2,
255 func (x IPEcn) String() string {
256 s, ok := IPEcn_name[uint8(x)]
260 return "IPEcn(" + strconv.Itoa(int(x)) + ")"
263 // IPProto defines enum 'ip_proto'.
267 IP_API_PROTO_HOPOPT IPProto = 0
268 IP_API_PROTO_ICMP IPProto = 1
269 IP_API_PROTO_IGMP IPProto = 2
270 IP_API_PROTO_TCP IPProto = 6
271 IP_API_PROTO_UDP IPProto = 17
272 IP_API_PROTO_GRE IPProto = 47
273 IP_API_PROTO_AH IPProto = 50
274 IP_API_PROTO_ESP IPProto = 51
275 IP_API_PROTO_EIGRP IPProto = 88
276 IP_API_PROTO_OSPF IPProto = 89
277 IP_API_PROTO_SCTP IPProto = 132
278 IP_API_PROTO_RESERVED IPProto = 255
282 IPProto_name = map[uint32]string{
283 0: "IP_API_PROTO_HOPOPT",
284 1: "IP_API_PROTO_ICMP",
285 2: "IP_API_PROTO_IGMP",
286 6: "IP_API_PROTO_TCP",
287 17: "IP_API_PROTO_UDP",
288 47: "IP_API_PROTO_GRE",
289 50: "IP_API_PROTO_AH",
290 51: "IP_API_PROTO_ESP",
291 88: "IP_API_PROTO_EIGRP",
292 89: "IP_API_PROTO_OSPF",
293 132: "IP_API_PROTO_SCTP",
294 255: "IP_API_PROTO_RESERVED",
296 IPProto_value = map[string]uint32{
297 "IP_API_PROTO_HOPOPT": 0,
298 "IP_API_PROTO_ICMP": 1,
299 "IP_API_PROTO_IGMP": 2,
300 "IP_API_PROTO_TCP": 6,
301 "IP_API_PROTO_UDP": 17,
302 "IP_API_PROTO_GRE": 47,
303 "IP_API_PROTO_AH": 50,
304 "IP_API_PROTO_ESP": 51,
305 "IP_API_PROTO_EIGRP": 88,
306 "IP_API_PROTO_OSPF": 89,
307 "IP_API_PROTO_SCTP": 132,
308 "IP_API_PROTO_RESERVED": 255,
312 func (x IPProto) String() string {
313 s, ok := IPProto_name[uint32(x)]
317 return "IPProto(" + strconv.Itoa(int(x)) + ")"
320 // L2tLookupKey defines enum 'l2t_lookup_key'.
321 type L2tLookupKey uint8
324 L2T_LOOKUP_KEY_API_SRC_ADDR L2tLookupKey = 0
325 L2T_LOOKUP_KEY_API_DST_ADDR L2tLookupKey = 1
326 L2T_LOOKUP_KEY_API_SESSION_ID L2tLookupKey = 2
330 L2tLookupKey_name = map[uint8]string{
331 0: "L2T_LOOKUP_KEY_API_SRC_ADDR",
332 1: "L2T_LOOKUP_KEY_API_DST_ADDR",
333 2: "L2T_LOOKUP_KEY_API_SESSION_ID",
335 L2tLookupKey_value = map[string]uint8{
336 "L2T_LOOKUP_KEY_API_SRC_ADDR": 0,
337 "L2T_LOOKUP_KEY_API_DST_ADDR": 1,
338 "L2T_LOOKUP_KEY_API_SESSION_ID": 2,
342 func (x L2tLookupKey) String() string {
343 s, ok := L2tLookupKey_name[uint8(x)]
347 return "L2tLookupKey(" + strconv.Itoa(int(x)) + ")"
350 // LinkDuplex defines enum 'link_duplex'.
351 type LinkDuplex uint32
354 LINK_DUPLEX_API_UNKNOWN LinkDuplex = 0
355 LINK_DUPLEX_API_HALF LinkDuplex = 1
356 LINK_DUPLEX_API_FULL LinkDuplex = 2
360 LinkDuplex_name = map[uint32]string{
361 0: "LINK_DUPLEX_API_UNKNOWN",
362 1: "LINK_DUPLEX_API_HALF",
363 2: "LINK_DUPLEX_API_FULL",
365 LinkDuplex_value = map[string]uint32{
366 "LINK_DUPLEX_API_UNKNOWN": 0,
367 "LINK_DUPLEX_API_HALF": 1,
368 "LINK_DUPLEX_API_FULL": 2,
372 func (x LinkDuplex) String() string {
373 s, ok := LinkDuplex_name[uint32(x)]
377 return "LinkDuplex(" + strconv.Itoa(int(x)) + ")"
380 // MtuProto defines enum 'mtu_proto'.
384 MTU_PROTO_API_L3 MtuProto = 1
385 MTU_PROTO_API_IP4 MtuProto = 2
386 MTU_PROTO_API_IP6 MtuProto = 3
387 MTU_PROTO_API_MPLS MtuProto = 4
388 MTU_PROTO_API_N MtuProto = 5
392 MtuProto_name = map[uint32]string{
393 1: "MTU_PROTO_API_L3",
394 2: "MTU_PROTO_API_IP4",
395 3: "MTU_PROTO_API_IP6",
396 4: "MTU_PROTO_API_MPLS",
397 5: "MTU_PROTO_API_N",
399 MtuProto_value = map[string]uint32{
400 "MTU_PROTO_API_L3": 1,
401 "MTU_PROTO_API_IP4": 2,
402 "MTU_PROTO_API_IP6": 3,
403 "MTU_PROTO_API_MPLS": 4,
404 "MTU_PROTO_API_N": 5,
408 func (x MtuProto) String() string {
409 s, ok := MtuProto_name[uint32(x)]
413 return "MtuProto(" + strconv.Itoa(int(x)) + ")"
416 // RxMode defines enum 'rx_mode'.
420 RX_MODE_API_UNKNOWN RxMode = 0
421 RX_MODE_API_POLLING RxMode = 1
422 RX_MODE_API_INTERRUPT RxMode = 2
423 RX_MODE_API_ADAPTIVE RxMode = 3
424 RX_MODE_API_DEFAULT RxMode = 4
428 RxMode_name = map[uint32]string{
429 0: "RX_MODE_API_UNKNOWN",
430 1: "RX_MODE_API_POLLING",
431 2: "RX_MODE_API_INTERRUPT",
432 3: "RX_MODE_API_ADAPTIVE",
433 4: "RX_MODE_API_DEFAULT",
435 RxMode_value = map[string]uint32{
436 "RX_MODE_API_UNKNOWN": 0,
437 "RX_MODE_API_POLLING": 1,
438 "RX_MODE_API_INTERRUPT": 2,
439 "RX_MODE_API_ADAPTIVE": 3,
440 "RX_MODE_API_DEFAULT": 4,
444 func (x RxMode) String() string {
445 s, ok := RxMode_name[uint32(x)]
449 return "RxMode(" + strconv.Itoa(int(x)) + ")"
452 // SubIfFlags defines enum 'sub_if_flags'.
453 type SubIfFlags uint32
456 SUB_IF_API_FLAG_NO_TAGS SubIfFlags = 1
457 SUB_IF_API_FLAG_ONE_TAG SubIfFlags = 2
458 SUB_IF_API_FLAG_TWO_TAGS SubIfFlags = 4
459 SUB_IF_API_FLAG_DOT1AD SubIfFlags = 8
460 SUB_IF_API_FLAG_EXACT_MATCH SubIfFlags = 16
461 SUB_IF_API_FLAG_DEFAULT SubIfFlags = 32
462 SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY SubIfFlags = 64
463 SUB_IF_API_FLAG_INNER_VLAN_ID_ANY SubIfFlags = 128
464 SUB_IF_API_FLAG_MASK_VNET SubIfFlags = 254
465 SUB_IF_API_FLAG_DOT1AH SubIfFlags = 256
469 SubIfFlags_name = map[uint32]string{
470 1: "SUB_IF_API_FLAG_NO_TAGS",
471 2: "SUB_IF_API_FLAG_ONE_TAG",
472 4: "SUB_IF_API_FLAG_TWO_TAGS",
473 8: "SUB_IF_API_FLAG_DOT1AD",
474 16: "SUB_IF_API_FLAG_EXACT_MATCH",
475 32: "SUB_IF_API_FLAG_DEFAULT",
476 64: "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY",
477 128: "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY",
478 254: "SUB_IF_API_FLAG_MASK_VNET",
479 256: "SUB_IF_API_FLAG_DOT1AH",
481 SubIfFlags_value = map[string]uint32{
482 "SUB_IF_API_FLAG_NO_TAGS": 1,
483 "SUB_IF_API_FLAG_ONE_TAG": 2,
484 "SUB_IF_API_FLAG_TWO_TAGS": 4,
485 "SUB_IF_API_FLAG_DOT1AD": 8,
486 "SUB_IF_API_FLAG_EXACT_MATCH": 16,
487 "SUB_IF_API_FLAG_DEFAULT": 32,
488 "SUB_IF_API_FLAG_OUTER_VLAN_ID_ANY": 64,
489 "SUB_IF_API_FLAG_INNER_VLAN_ID_ANY": 128,
490 "SUB_IF_API_FLAG_MASK_VNET": 254,
491 "SUB_IF_API_FLAG_DOT1AH": 256,
495 func (x SubIfFlags) String() string {
496 s, ok := SubIfFlags_name[uint32(x)]
500 str := func(n uint32) string {
501 s, ok := SubIfFlags_name[uint32(n)]
505 return "SubIfFlags(" + strconv.Itoa(int(n)) + ")"
507 for i := uint32(0); i <= 32; i++ {
517 return str(uint32(x))
522 // AddressWithPrefix defines alias 'address_with_prefix'.
523 type AddressWithPrefix Prefix
525 func ParseAddressWithPrefix(s string) (AddressWithPrefix, error) {
526 prefix, err := ParsePrefix(s)
528 return AddressWithPrefix{}, err
530 return AddressWithPrefix(prefix), nil
533 func (x AddressWithPrefix) String() string {
534 return Prefix(x).String()
537 func (x *AddressWithPrefix) MarshalText() ([]byte, error) {
538 return []byte(x.String()), nil
541 func (x *AddressWithPrefix) UnmarshalText(text []byte) error {
542 prefix, err := ParseAddressWithPrefix(string(text))
550 // InterfaceIndex defines alias 'interface_index'.
551 type InterfaceIndex uint32
553 // IP4Address defines alias 'ip4_address'.
554 type IP4Address [4]uint8
556 func ParseIP4Address(s string) (IP4Address, error) {
557 ip := net.ParseIP(s).To4()
559 return IP4Address{}, fmt.Errorf("invalid IP address: %s", s)
561 var ipaddr IP4Address
562 copy(ipaddr[:], ip.To4())
566 func (x IP4Address) ToIP() net.IP {
567 return net.IP(x[:]).To4()
570 func (x IP4Address) String() string {
571 return x.ToIP().String()
574 func (x *IP4Address) MarshalText() ([]byte, error) {
575 return []byte(x.String()), nil
578 func (x *IP4Address) UnmarshalText(text []byte) error {
579 ipaddr, err := ParseIP4Address(string(text))
587 // IP4AddressWithPrefix defines alias 'ip4_address_with_prefix'.
588 type IP4AddressWithPrefix IP4Prefix
590 // IP6Address defines alias 'ip6_address'.
591 type IP6Address [16]uint8
593 func ParseIP6Address(s string) (IP6Address, error) {
594 ip := net.ParseIP(s).To16()
596 return IP6Address{}, fmt.Errorf("invalid IP address: %s", s)
598 var ipaddr IP6Address
599 copy(ipaddr[:], ip.To16())
603 func (x IP6Address) ToIP() net.IP {
604 return net.IP(x[:]).To16()
607 func (x IP6Address) String() string {
608 return x.ToIP().String()
611 func (x *IP6Address) MarshalText() ([]byte, error) {
612 return []byte(x.String()), nil
615 func (x *IP6Address) UnmarshalText(text []byte) error {
616 ipaddr, err := ParseIP6Address(string(text))
624 // IP6AddressWithPrefix defines alias 'ip6_address_with_prefix'.
625 type IP6AddressWithPrefix IP6Prefix
627 // MacAddress defines alias 'mac_address'.
628 type MacAddress [6]uint8
630 func ParseMacAddress(s string) (MacAddress, error) {
631 var macaddr MacAddress
632 mac, err := net.ParseMAC(s)
636 copy(macaddr[:], mac[:])
640 func (x MacAddress) ToMAC() net.HardwareAddr {
641 return net.HardwareAddr(x[:])
644 func (x MacAddress) String() string {
645 return x.ToMAC().String()
648 func (x *MacAddress) MarshalText() ([]byte, error) {
649 return []byte(x.String()), nil
652 func (x *MacAddress) UnmarshalText(text []byte) error {
653 mac, err := ParseMacAddress(string(text))
661 // Address defines type 'address'.
662 type Address struct {
663 Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
664 Un AddressUnion `binapi:"address_union,name=un" json:"un,omitempty"`
667 func ParseAddress(s string) (Address, error) {
670 return Address{}, fmt.Errorf("invalid address: %s", s)
672 return AddressFromIP(ip), nil
675 func AddressFromIP(ip net.IP) Address {
678 addr.Af = ADDRESS_IP6
680 copy(ip6[:], ip.To16())
683 addr.Af = ADDRESS_IP4
685 copy(ip4[:], ip.To4())
691 func (x Address) ToIP() net.IP {
692 if x.Af == ADDRESS_IP6 {
694 return net.IP(ip6[:]).To16()
697 return net.IP(ip4[:]).To4()
701 func (x Address) String() string {
702 return x.ToIP().String()
705 func (x *Address) MarshalText() ([]byte, error) {
706 return []byte(x.String()), nil
709 func (x *Address) UnmarshalText(text []byte) error {
710 addr, err := ParseAddress(string(text))
718 // IP4Prefix defines type 'ip4_prefix'.
719 type IP4Prefix struct {
720 Address IP4Address `binapi:"ip4_address,name=address" json:"address,omitempty"`
721 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
724 func ParseIP4Prefix(s string) (prefix IP4Prefix, err error) {
725 hasPrefix := strings.Contains(s, "/")
727 ip, network, err := net.ParseCIDR(s)
729 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
731 maskSize, _ := network.Mask.Size()
732 prefix.Len = byte(maskSize)
733 prefix.Address, err = ParseIP4Address(ip.String())
735 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
739 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
741 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
743 prefix.Len = byte(defaultMaskSize)
744 prefix.Address, err = ParseIP4Address(ip.String())
746 return IP4Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
752 func (x IP4Prefix) ToIPNet() *net.IPNet {
753 mask := net.CIDRMask(int(x.Len), 32)
754 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
758 func (x IP4Prefix) String() string {
759 ip := x.Address.String()
760 return ip + "/" + strconv.Itoa(int(x.Len))
763 func (x *IP4Prefix) MarshalText() ([]byte, error) {
764 return []byte(x.String()), nil
767 func (x *IP4Prefix) UnmarshalText(text []byte) error {
768 prefix, err := ParseIP4Prefix(string(text))
776 // IP6Prefix defines type 'ip6_prefix'.
777 type IP6Prefix struct {
778 Address IP6Address `binapi:"ip6_address,name=address" json:"address,omitempty"`
779 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
782 func ParseIP6Prefix(s string) (prefix IP6Prefix, err error) {
783 hasPrefix := strings.Contains(s, "/")
785 ip, network, err := net.ParseCIDR(s)
787 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
789 maskSize, _ := network.Mask.Size()
790 prefix.Len = byte(maskSize)
791 prefix.Address, err = ParseIP6Address(ip.String())
793 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
797 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
799 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
801 prefix.Len = byte(defaultMaskSize)
802 prefix.Address, err = ParseIP6Address(ip.String())
804 return IP6Prefix{}, fmt.Errorf("invalid IP %s: %s", s, err)
810 func (x IP6Prefix) ToIPNet() *net.IPNet {
811 mask := net.CIDRMask(int(x.Len), 128)
812 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
816 func (x IP6Prefix) String() string {
817 ip := x.Address.String()
818 return ip + "/" + strconv.Itoa(int(x.Len))
821 func (x *IP6Prefix) MarshalText() ([]byte, error) {
822 return []byte(x.String()), nil
825 func (x *IP6Prefix) UnmarshalText(text []byte) error {
826 prefix, err := ParseIP6Prefix(string(text))
834 // Mprefix defines type 'mprefix'.
835 type Mprefix struct {
836 Af AddressFamily `binapi:"address_family,name=af" json:"af,omitempty"`
837 GrpAddressLength uint16 `binapi:"u16,name=grp_address_length" json:"grp_address_length,omitempty"`
838 GrpAddress AddressUnion `binapi:"address_union,name=grp_address" json:"grp_address,omitempty"`
839 SrcAddress AddressUnion `binapi:"address_union,name=src_address" json:"src_address,omitempty"`
842 // Prefix defines type 'prefix'.
844 Address Address `binapi:"address,name=address" json:"address,omitempty"`
845 Len uint8 `binapi:"u8,name=len" json:"len,omitempty"`
848 func ParsePrefix(ip string) (prefix Prefix, err error) {
849 hasPrefix := strings.Contains(ip, "/")
851 netIP, network, err := net.ParseCIDR(ip)
853 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
855 maskSize, _ := network.Mask.Size()
856 prefix.Len = byte(maskSize)
857 prefix.Address, err = ParseAddress(netIP.String())
859 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
862 netIP := net.ParseIP(ip)
863 defaultMaskSize, _ := net.CIDRMask(32, 32).Size()
864 if netIP.To4() == nil {
865 defaultMaskSize, _ = net.CIDRMask(128, 128).Size()
867 prefix.Len = byte(defaultMaskSize)
868 prefix.Address, err = ParseAddress(netIP.String())
870 return Prefix{}, fmt.Errorf("invalid IP %s: %s", ip, err)
876 func (x Prefix) ToIPNet() *net.IPNet {
878 if x.Address.Af == ADDRESS_IP4 {
879 mask = net.CIDRMask(int(x.Len), 32)
881 mask = net.CIDRMask(int(x.Len), 128)
883 ipnet := &net.IPNet{IP: x.Address.ToIP(), Mask: mask}
887 func (x Prefix) String() string {
888 ip := x.Address.String()
889 return ip + "/" + strconv.Itoa(int(x.Len))
892 func (x *Prefix) MarshalText() ([]byte, error) {
893 return []byte(x.String()), nil
896 func (x *Prefix) UnmarshalText(text []byte) error {
897 prefix, err := ParsePrefix(string(text))
905 // PrefixMatcher defines type 'prefix_matcher'.
906 type PrefixMatcher struct {
907 Le uint8 `binapi:"u8,name=le" json:"le,omitempty"`
908 Ge uint8 `binapi:"u8,name=ge" json:"ge,omitempty"`
911 // AddressUnion defines union 'address_union'.
912 type AddressUnion struct {
913 // AddressUnion can be one of:
916 XXX_UnionData [16]byte
919 func AddressUnionIP4(a IP4Address) (u AddressUnion) {
923 func (u *AddressUnion) SetIP4(a IP4Address) {
924 buf := codec.NewBuffer(u.XXX_UnionData[:])
925 buf.EncodeBytes(a[:], 4)
927 func (u *AddressUnion) GetIP4() (a IP4Address) {
928 buf := codec.NewBuffer(u.XXX_UnionData[:])
929 copy(a[:], buf.DecodeBytes(4))
933 func AddressUnionIP6(a IP6Address) (u AddressUnion) {
937 func (u *AddressUnion) SetIP6(a IP6Address) {
938 buf := codec.NewBuffer(u.XXX_UnionData[:])
939 buf.EncodeBytes(a[:], 16)
941 func (u *AddressUnion) GetIP6() (a IP6Address) {
942 buf := codec.NewBuffer(u.XXX_UnionData[:])
943 copy(a[:], buf.DecodeBytes(16))
947 // L2tpv3CreateTunnel defines message 'l2tpv3_create_tunnel'.
948 type L2tpv3CreateTunnel struct {
949 ClientAddress Address `binapi:"address,name=client_address" json:"client_address,omitempty"`
950 OurAddress Address `binapi:"address,name=our_address" json:"our_address,omitempty"`
951 LocalSessionID uint32 `binapi:"u32,name=local_session_id" json:"local_session_id,omitempty"`
952 RemoteSessionID uint32 `binapi:"u32,name=remote_session_id" json:"remote_session_id,omitempty"`
953 LocalCookie uint64 `binapi:"u64,name=local_cookie" json:"local_cookie,omitempty"`
954 RemoteCookie uint64 `binapi:"u64,name=remote_cookie" json:"remote_cookie,omitempty"`
955 L2SublayerPresent bool `binapi:"bool,name=l2_sublayer_present" json:"l2_sublayer_present,omitempty"`
956 EncapVrfID uint32 `binapi:"u32,name=encap_vrf_id" json:"encap_vrf_id,omitempty"`
959 func (m *L2tpv3CreateTunnel) Reset() { *m = L2tpv3CreateTunnel{} }
960 func (*L2tpv3CreateTunnel) GetMessageName() string { return "l2tpv3_create_tunnel" }
961 func (*L2tpv3CreateTunnel) GetCrcString() string { return "596892cb" }
962 func (*L2tpv3CreateTunnel) GetMessageType() api.MessageType {
963 return api.RequestMessage
966 func (m *L2tpv3CreateTunnel) Size() (size int) {
970 size += 4 // m.ClientAddress.Af
971 size += 1 * 16 // m.ClientAddress.Un
972 size += 4 // m.OurAddress.Af
973 size += 1 * 16 // m.OurAddress.Un
974 size += 4 // m.LocalSessionID
975 size += 4 // m.RemoteSessionID
976 size += 8 // m.LocalCookie
977 size += 8 // m.RemoteCookie
978 size += 1 // m.L2SublayerPresent
979 size += 4 // m.EncapVrfID
982 func (m *L2tpv3CreateTunnel) Marshal(b []byte) ([]byte, error) {
984 b = make([]byte, m.Size())
986 buf := codec.NewBuffer(b)
987 buf.EncodeUint32(uint32(m.ClientAddress.Af))
988 buf.EncodeBytes(m.ClientAddress.Un.XXX_UnionData[:], 16)
989 buf.EncodeUint32(uint32(m.OurAddress.Af))
990 buf.EncodeBytes(m.OurAddress.Un.XXX_UnionData[:], 16)
991 buf.EncodeUint32(m.LocalSessionID)
992 buf.EncodeUint32(m.RemoteSessionID)
993 buf.EncodeUint64(m.LocalCookie)
994 buf.EncodeUint64(m.RemoteCookie)
995 buf.EncodeBool(m.L2SublayerPresent)
996 buf.EncodeUint32(m.EncapVrfID)
997 return buf.Bytes(), nil
999 func (m *L2tpv3CreateTunnel) Unmarshal(b []byte) error {
1000 buf := codec.NewBuffer(b)
1001 m.ClientAddress.Af = AddressFamily(buf.DecodeUint32())
1002 copy(m.ClientAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1003 m.OurAddress.Af = AddressFamily(buf.DecodeUint32())
1004 copy(m.OurAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1005 m.LocalSessionID = buf.DecodeUint32()
1006 m.RemoteSessionID = buf.DecodeUint32()
1007 m.LocalCookie = buf.DecodeUint64()
1008 m.RemoteCookie = buf.DecodeUint64()
1009 m.L2SublayerPresent = buf.DecodeBool()
1010 m.EncapVrfID = buf.DecodeUint32()
1014 // L2tpv3CreateTunnelReply defines message 'l2tpv3_create_tunnel_reply'.
1015 type L2tpv3CreateTunnelReply struct {
1016 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1017 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1020 func (m *L2tpv3CreateTunnelReply) Reset() { *m = L2tpv3CreateTunnelReply{} }
1021 func (*L2tpv3CreateTunnelReply) GetMessageName() string { return "l2tpv3_create_tunnel_reply" }
1022 func (*L2tpv3CreateTunnelReply) GetCrcString() string { return "5383d31f" }
1023 func (*L2tpv3CreateTunnelReply) GetMessageType() api.MessageType {
1024 return api.ReplyMessage
1027 func (m *L2tpv3CreateTunnelReply) Size() (size int) {
1031 size += 4 // m.Retval
1032 size += 4 // m.SwIfIndex
1035 func (m *L2tpv3CreateTunnelReply) Marshal(b []byte) ([]byte, error) {
1037 b = make([]byte, m.Size())
1039 buf := codec.NewBuffer(b)
1040 buf.EncodeInt32(m.Retval)
1041 buf.EncodeUint32(uint32(m.SwIfIndex))
1042 return buf.Bytes(), nil
1044 func (m *L2tpv3CreateTunnelReply) Unmarshal(b []byte) error {
1045 buf := codec.NewBuffer(b)
1046 m.Retval = buf.DecodeInt32()
1047 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1051 // L2tpv3InterfaceEnableDisable defines message 'l2tpv3_interface_enable_disable'.
1052 type L2tpv3InterfaceEnableDisable struct {
1053 EnableDisable bool `binapi:"bool,name=enable_disable" json:"enable_disable,omitempty"`
1054 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1057 func (m *L2tpv3InterfaceEnableDisable) Reset() { *m = L2tpv3InterfaceEnableDisable{} }
1058 func (*L2tpv3InterfaceEnableDisable) GetMessageName() string {
1059 return "l2tpv3_interface_enable_disable"
1061 func (*L2tpv3InterfaceEnableDisable) GetCrcString() string { return "3865946c" }
1062 func (*L2tpv3InterfaceEnableDisable) GetMessageType() api.MessageType {
1063 return api.RequestMessage
1066 func (m *L2tpv3InterfaceEnableDisable) Size() (size int) {
1070 size += 1 // m.EnableDisable
1071 size += 4 // m.SwIfIndex
1074 func (m *L2tpv3InterfaceEnableDisable) Marshal(b []byte) ([]byte, error) {
1076 b = make([]byte, m.Size())
1078 buf := codec.NewBuffer(b)
1079 buf.EncodeBool(m.EnableDisable)
1080 buf.EncodeUint32(uint32(m.SwIfIndex))
1081 return buf.Bytes(), nil
1083 func (m *L2tpv3InterfaceEnableDisable) Unmarshal(b []byte) error {
1084 buf := codec.NewBuffer(b)
1085 m.EnableDisable = buf.DecodeBool()
1086 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1090 // L2tpv3InterfaceEnableDisableReply defines message 'l2tpv3_interface_enable_disable_reply'.
1091 type L2tpv3InterfaceEnableDisableReply struct {
1092 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1095 func (m *L2tpv3InterfaceEnableDisableReply) Reset() { *m = L2tpv3InterfaceEnableDisableReply{} }
1096 func (*L2tpv3InterfaceEnableDisableReply) GetMessageName() string {
1097 return "l2tpv3_interface_enable_disable_reply"
1099 func (*L2tpv3InterfaceEnableDisableReply) GetCrcString() string { return "e8d4e804" }
1100 func (*L2tpv3InterfaceEnableDisableReply) GetMessageType() api.MessageType {
1101 return api.ReplyMessage
1104 func (m *L2tpv3InterfaceEnableDisableReply) Size() (size int) {
1108 size += 4 // m.Retval
1111 func (m *L2tpv3InterfaceEnableDisableReply) Marshal(b []byte) ([]byte, error) {
1113 b = make([]byte, m.Size())
1115 buf := codec.NewBuffer(b)
1116 buf.EncodeInt32(m.Retval)
1117 return buf.Bytes(), nil
1119 func (m *L2tpv3InterfaceEnableDisableReply) Unmarshal(b []byte) error {
1120 buf := codec.NewBuffer(b)
1121 m.Retval = buf.DecodeInt32()
1125 // L2tpv3SetLookupKey defines message 'l2tpv3_set_lookup_key'.
1126 type L2tpv3SetLookupKey struct {
1127 Key L2tLookupKey `binapi:"l2t_lookup_key,name=key" json:"key,omitempty"`
1130 func (m *L2tpv3SetLookupKey) Reset() { *m = L2tpv3SetLookupKey{} }
1131 func (*L2tpv3SetLookupKey) GetMessageName() string { return "l2tpv3_set_lookup_key" }
1132 func (*L2tpv3SetLookupKey) GetCrcString() string { return "c9892c86" }
1133 func (*L2tpv3SetLookupKey) GetMessageType() api.MessageType {
1134 return api.RequestMessage
1137 func (m *L2tpv3SetLookupKey) Size() (size int) {
1144 func (m *L2tpv3SetLookupKey) Marshal(b []byte) ([]byte, error) {
1146 b = make([]byte, m.Size())
1148 buf := codec.NewBuffer(b)
1149 buf.EncodeUint8(uint8(m.Key))
1150 return buf.Bytes(), nil
1152 func (m *L2tpv3SetLookupKey) Unmarshal(b []byte) error {
1153 buf := codec.NewBuffer(b)
1154 m.Key = L2tLookupKey(buf.DecodeUint8())
1158 // L2tpv3SetLookupKeyReply defines message 'l2tpv3_set_lookup_key_reply'.
1159 type L2tpv3SetLookupKeyReply struct {
1160 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1163 func (m *L2tpv3SetLookupKeyReply) Reset() { *m = L2tpv3SetLookupKeyReply{} }
1164 func (*L2tpv3SetLookupKeyReply) GetMessageName() string { return "l2tpv3_set_lookup_key_reply" }
1165 func (*L2tpv3SetLookupKeyReply) GetCrcString() string { return "e8d4e804" }
1166 func (*L2tpv3SetLookupKeyReply) GetMessageType() api.MessageType {
1167 return api.ReplyMessage
1170 func (m *L2tpv3SetLookupKeyReply) Size() (size int) {
1174 size += 4 // m.Retval
1177 func (m *L2tpv3SetLookupKeyReply) Marshal(b []byte) ([]byte, error) {
1179 b = make([]byte, m.Size())
1181 buf := codec.NewBuffer(b)
1182 buf.EncodeInt32(m.Retval)
1183 return buf.Bytes(), nil
1185 func (m *L2tpv3SetLookupKeyReply) Unmarshal(b []byte) error {
1186 buf := codec.NewBuffer(b)
1187 m.Retval = buf.DecodeInt32()
1191 // L2tpv3SetTunnelCookies defines message 'l2tpv3_set_tunnel_cookies'.
1192 type L2tpv3SetTunnelCookies struct {
1193 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1194 NewLocalCookie uint64 `binapi:"u64,name=new_local_cookie" json:"new_local_cookie,omitempty"`
1195 NewRemoteCookie uint64 `binapi:"u64,name=new_remote_cookie" json:"new_remote_cookie,omitempty"`
1198 func (m *L2tpv3SetTunnelCookies) Reset() { *m = L2tpv3SetTunnelCookies{} }
1199 func (*L2tpv3SetTunnelCookies) GetMessageName() string { return "l2tpv3_set_tunnel_cookies" }
1200 func (*L2tpv3SetTunnelCookies) GetCrcString() string { return "b3f4faf7" }
1201 func (*L2tpv3SetTunnelCookies) GetMessageType() api.MessageType {
1202 return api.RequestMessage
1205 func (m *L2tpv3SetTunnelCookies) Size() (size int) {
1209 size += 4 // m.SwIfIndex
1210 size += 8 // m.NewLocalCookie
1211 size += 8 // m.NewRemoteCookie
1214 func (m *L2tpv3SetTunnelCookies) Marshal(b []byte) ([]byte, error) {
1216 b = make([]byte, m.Size())
1218 buf := codec.NewBuffer(b)
1219 buf.EncodeUint32(uint32(m.SwIfIndex))
1220 buf.EncodeUint64(m.NewLocalCookie)
1221 buf.EncodeUint64(m.NewRemoteCookie)
1222 return buf.Bytes(), nil
1224 func (m *L2tpv3SetTunnelCookies) Unmarshal(b []byte) error {
1225 buf := codec.NewBuffer(b)
1226 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1227 m.NewLocalCookie = buf.DecodeUint64()
1228 m.NewRemoteCookie = buf.DecodeUint64()
1232 // L2tpv3SetTunnelCookiesReply defines message 'l2tpv3_set_tunnel_cookies_reply'.
1233 type L2tpv3SetTunnelCookiesReply struct {
1234 Retval int32 `binapi:"i32,name=retval" json:"retval,omitempty"`
1237 func (m *L2tpv3SetTunnelCookiesReply) Reset() { *m = L2tpv3SetTunnelCookiesReply{} }
1238 func (*L2tpv3SetTunnelCookiesReply) GetMessageName() string { return "l2tpv3_set_tunnel_cookies_reply" }
1239 func (*L2tpv3SetTunnelCookiesReply) GetCrcString() string { return "e8d4e804" }
1240 func (*L2tpv3SetTunnelCookiesReply) GetMessageType() api.MessageType {
1241 return api.ReplyMessage
1244 func (m *L2tpv3SetTunnelCookiesReply) Size() (size int) {
1248 size += 4 // m.Retval
1251 func (m *L2tpv3SetTunnelCookiesReply) Marshal(b []byte) ([]byte, error) {
1253 b = make([]byte, m.Size())
1255 buf := codec.NewBuffer(b)
1256 buf.EncodeInt32(m.Retval)
1257 return buf.Bytes(), nil
1259 func (m *L2tpv3SetTunnelCookiesReply) Unmarshal(b []byte) error {
1260 buf := codec.NewBuffer(b)
1261 m.Retval = buf.DecodeInt32()
1265 // SwIfL2tpv3TunnelDetails defines message 'sw_if_l2tpv3_tunnel_details'.
1266 type SwIfL2tpv3TunnelDetails struct {
1267 SwIfIndex InterfaceIndex `binapi:"interface_index,name=sw_if_index" json:"sw_if_index,omitempty"`
1268 InterfaceName string `binapi:"string[64],name=interface_name" json:"interface_name,omitempty"`
1269 ClientAddress Address `binapi:"address,name=client_address" json:"client_address,omitempty"`
1270 OurAddress Address `binapi:"address,name=our_address" json:"our_address,omitempty"`
1271 LocalSessionID uint32 `binapi:"u32,name=local_session_id" json:"local_session_id,omitempty"`
1272 RemoteSessionID uint32 `binapi:"u32,name=remote_session_id" json:"remote_session_id,omitempty"`
1273 LocalCookie []uint64 `binapi:"u64[2],name=local_cookie" json:"local_cookie,omitempty"`
1274 RemoteCookie uint64 `binapi:"u64,name=remote_cookie" json:"remote_cookie,omitempty"`
1275 L2SublayerPresent bool `binapi:"bool,name=l2_sublayer_present" json:"l2_sublayer_present,omitempty"`
1278 func (m *SwIfL2tpv3TunnelDetails) Reset() { *m = SwIfL2tpv3TunnelDetails{} }
1279 func (*SwIfL2tpv3TunnelDetails) GetMessageName() string { return "sw_if_l2tpv3_tunnel_details" }
1280 func (*SwIfL2tpv3TunnelDetails) GetCrcString() string { return "1dab5c7e" }
1281 func (*SwIfL2tpv3TunnelDetails) GetMessageType() api.MessageType {
1282 return api.ReplyMessage
1285 func (m *SwIfL2tpv3TunnelDetails) Size() (size int) {
1289 size += 4 // m.SwIfIndex
1290 size += 64 // m.InterfaceName
1291 size += 4 // m.ClientAddress.Af
1292 size += 1 * 16 // m.ClientAddress.Un
1293 size += 4 // m.OurAddress.Af
1294 size += 1 * 16 // m.OurAddress.Un
1295 size += 4 // m.LocalSessionID
1296 size += 4 // m.RemoteSessionID
1297 size += 8 * 2 // m.LocalCookie
1298 size += 8 // m.RemoteCookie
1299 size += 1 // m.L2SublayerPresent
1302 func (m *SwIfL2tpv3TunnelDetails) Marshal(b []byte) ([]byte, error) {
1304 b = make([]byte, m.Size())
1306 buf := codec.NewBuffer(b)
1307 buf.EncodeUint32(uint32(m.SwIfIndex))
1308 buf.EncodeString(m.InterfaceName, 64)
1309 buf.EncodeUint32(uint32(m.ClientAddress.Af))
1310 buf.EncodeBytes(m.ClientAddress.Un.XXX_UnionData[:], 16)
1311 buf.EncodeUint32(uint32(m.OurAddress.Af))
1312 buf.EncodeBytes(m.OurAddress.Un.XXX_UnionData[:], 16)
1313 buf.EncodeUint32(m.LocalSessionID)
1314 buf.EncodeUint32(m.RemoteSessionID)
1315 for i := 0; i < 2; i++ {
1317 if i < len(m.LocalCookie) {
1318 x = uint64(m.LocalCookie[i])
1322 buf.EncodeUint64(m.RemoteCookie)
1323 buf.EncodeBool(m.L2SublayerPresent)
1324 return buf.Bytes(), nil
1326 func (m *SwIfL2tpv3TunnelDetails) Unmarshal(b []byte) error {
1327 buf := codec.NewBuffer(b)
1328 m.SwIfIndex = InterfaceIndex(buf.DecodeUint32())
1329 m.InterfaceName = buf.DecodeString(64)
1330 m.ClientAddress.Af = AddressFamily(buf.DecodeUint32())
1331 copy(m.ClientAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1332 m.OurAddress.Af = AddressFamily(buf.DecodeUint32())
1333 copy(m.OurAddress.Un.XXX_UnionData[:], buf.DecodeBytes(16))
1334 m.LocalSessionID = buf.DecodeUint32()
1335 m.RemoteSessionID = buf.DecodeUint32()
1336 m.LocalCookie = make([]uint64, 2)
1337 for i := 0; i < len(m.LocalCookie); i++ {
1338 m.LocalCookie[i] = buf.DecodeUint64()
1340 m.RemoteCookie = buf.DecodeUint64()
1341 m.L2SublayerPresent = buf.DecodeBool()
1345 // SwIfL2tpv3TunnelDump defines message 'sw_if_l2tpv3_tunnel_dump'.
1346 type SwIfL2tpv3TunnelDump struct{}
1348 func (m *SwIfL2tpv3TunnelDump) Reset() { *m = SwIfL2tpv3TunnelDump{} }
1349 func (*SwIfL2tpv3TunnelDump) GetMessageName() string { return "sw_if_l2tpv3_tunnel_dump" }
1350 func (*SwIfL2tpv3TunnelDump) GetCrcString() string { return "51077d14" }
1351 func (*SwIfL2tpv3TunnelDump) GetMessageType() api.MessageType {
1352 return api.RequestMessage
1355 func (m *SwIfL2tpv3TunnelDump) Size() (size int) {
1361 func (m *SwIfL2tpv3TunnelDump) Marshal(b []byte) ([]byte, error) {
1363 b = make([]byte, m.Size())
1365 buf := codec.NewBuffer(b)
1366 return buf.Bytes(), nil
1368 func (m *SwIfL2tpv3TunnelDump) Unmarshal(b []byte) error {
1372 func init() { file_l2tp_binapi_init() }
1373 func file_l2tp_binapi_init() {
1374 api.RegisterMessage((*L2tpv3CreateTunnel)(nil), "l2tpv3_create_tunnel_596892cb")
1375 api.RegisterMessage((*L2tpv3CreateTunnelReply)(nil), "l2tpv3_create_tunnel_reply_5383d31f")
1376 api.RegisterMessage((*L2tpv3InterfaceEnableDisable)(nil), "l2tpv3_interface_enable_disable_3865946c")
1377 api.RegisterMessage((*L2tpv3InterfaceEnableDisableReply)(nil), "l2tpv3_interface_enable_disable_reply_e8d4e804")
1378 api.RegisterMessage((*L2tpv3SetLookupKey)(nil), "l2tpv3_set_lookup_key_c9892c86")
1379 api.RegisterMessage((*L2tpv3SetLookupKeyReply)(nil), "l2tpv3_set_lookup_key_reply_e8d4e804")
1380 api.RegisterMessage((*L2tpv3SetTunnelCookies)(nil), "l2tpv3_set_tunnel_cookies_b3f4faf7")
1381 api.RegisterMessage((*L2tpv3SetTunnelCookiesReply)(nil), "l2tpv3_set_tunnel_cookies_reply_e8d4e804")
1382 api.RegisterMessage((*SwIfL2tpv3TunnelDetails)(nil), "sw_if_l2tpv3_tunnel_details_1dab5c7e")
1383 api.RegisterMessage((*SwIfL2tpv3TunnelDump)(nil), "sw_if_l2tpv3_tunnel_dump_51077d14")
1386 // Messages returns list of all messages in this module.
1387 func AllMessages() []api.Message {
1388 return []api.Message{
1389 (*L2tpv3CreateTunnel)(nil),
1390 (*L2tpv3CreateTunnelReply)(nil),
1391 (*L2tpv3InterfaceEnableDisable)(nil),
1392 (*L2tpv3InterfaceEnableDisableReply)(nil),
1393 (*L2tpv3SetLookupKey)(nil),
1394 (*L2tpv3SetLookupKeyReply)(nil),
1395 (*L2tpv3SetTunnelCookies)(nil),
1396 (*L2tpv3SetTunnelCookiesReply)(nil),
1397 (*SwIfL2tpv3TunnelDetails)(nil),
1398 (*SwIfL2tpv3TunnelDump)(nil),