diff options
-rw-r--r-- | zebra/api_type_string.go | 17 | ||||
-rw-r--r-- | zebra/link_type_string.go | 2 | ||||
-rw-r--r-- | zebra/nexthop_flag_string.go | 17 | ||||
-rw-r--r-- | zebra/route_type_string.go | 16 | ||||
-rw-r--r-- | zebra/safi_string.go | 39 | ||||
-rw-r--r-- | zebra/zapi.go | 6 |
6 files changed, 59 insertions, 38 deletions
diff --git a/zebra/api_type_string.go b/zebra/api_type_string.go new file mode 100644 index 00000000..26b35764 --- /dev/null +++ b/zebra/api_type_string.go @@ -0,0 +1,17 @@ +// Code generated by "stringer -type=API_TYPE"; DO NOT EDIT. + +package zebra + +import "fmt" + +const _API_TYPE_name = "INTERFACE_ADDINTERFACE_DELETEINTERFACE_ADDRESS_ADDINTERFACE_ADDRESS_DELETEINTERFACE_UPINTERFACE_DOWNIPV4_ROUTE_ADDIPV4_ROUTE_DELETEIPV6_ROUTE_ADDIPV6_ROUTE_DELETEREDISTRIBUTE_ADDREDISTRIBUTE_DELETEREDISTRIBUTE_DEFAULT_ADDREDISTRIBUTE_DEFAULT_DELETEIPV4_NEXTHOP_LOOKUPIPV6_NEXTHOP_LOOKUPIPV4_IMPORT_LOOKUPIPV6_IMPORT_LOOKUPINTERFACE_RENAMEROUTER_ID_ADDROUTER_ID_DELETEROUTER_ID_UPDATEHELLOIPV4_NEXTHOP_LOOKUP_MRIBVRF_UNREGISTERINTERFACE_LINK_PARAMSNEXTHOP_REGISTERNEXTHOP_UNREGISTERNEXTHOP_UPDATEMESSAGE_MAX" + +var _API_TYPE_index = [...]uint16{0, 13, 29, 50, 74, 86, 100, 114, 131, 145, 162, 178, 197, 221, 248, 267, 286, 304, 322, 338, 351, 367, 383, 388, 412, 426, 447, 463, 481, 495, 506} + +func (i API_TYPE) String() string { + i -= 1 + if i >= API_TYPE(len(_API_TYPE_index)-1) { + return fmt.Sprintf("API_TYPE(%d)", i+1) + } + return _API_TYPE_name[_API_TYPE_index[i]:_API_TYPE_index[i+1]] +} diff --git a/zebra/link_type_string.go b/zebra/link_type_string.go index 9265bf72..9db8544b 100644 --- a/zebra/link_type_string.go +++ b/zebra/link_type_string.go @@ -1,4 +1,4 @@ -// Code generated by "stringer -type LINK_TYPE"; DO NOT EDIT +// Code generated by "stringer -type=LINK_TYPE"; DO NOT EDIT. package zebra diff --git a/zebra/nexthop_flag_string.go b/zebra/nexthop_flag_string.go new file mode 100644 index 00000000..38f08b8a --- /dev/null +++ b/zebra/nexthop_flag_string.go @@ -0,0 +1,17 @@ +// Code generated by "stringer -type=NEXTHOP_FLAG"; DO NOT EDIT. + +package zebra + +import "fmt" + +const _NEXTHOP_FLAG_name = "NEXTHOP_IFINDEXNEXTHOP_IFNAMENEXTHOP_IPV4NEXTHOP_IPV4_IFINDEXNEXTHOP_IPV4_IFNAMENEXTHOP_IPV6NEXTHOP_IPV6_IFINDEXNEXTHOP_IPV6_IFNAMENEXTHOP_BLACKHOLE" + +var _NEXTHOP_FLAG_index = [...]uint8{0, 15, 29, 41, 61, 80, 92, 112, 131, 148} + +func (i NEXTHOP_FLAG) String() string { + i -= 1 + if i >= NEXTHOP_FLAG(len(_NEXTHOP_FLAG_index)-1) { + return fmt.Sprintf("NEXTHOP_FLAG(%d)", i+1) + } + return _NEXTHOP_FLAG_name[_NEXTHOP_FLAG_index[i]:_NEXTHOP_FLAG_index[i+1]] +} diff --git a/zebra/route_type_string.go b/zebra/route_type_string.go new file mode 100644 index 00000000..aea80ae3 --- /dev/null +++ b/zebra/route_type_string.go @@ -0,0 +1,16 @@ +// Code generated by "stringer -type=ROUTE_TYPE"; DO NOT EDIT. + +package zebra + +import "fmt" + +const _ROUTE_TYPE_name = "ROUTE_SYSTEMROUTE_KERNELROUTE_CONNECTROUTE_STATICROUTE_RIPROUTE_RIPNGROUTE_OSPFROUTE_OSPF6ROUTE_ISISROUTE_BGPROUTE_PIMROUTE_HSLSROUTE_OLSRROUTE_BABELROUTE_MAX" + +var _ROUTE_TYPE_index = [...]uint8{0, 12, 24, 37, 49, 58, 69, 79, 90, 100, 109, 118, 128, 138, 149, 158} + +func (i ROUTE_TYPE) String() string { + if i >= ROUTE_TYPE(len(_ROUTE_TYPE_index)-1) { + return fmt.Sprintf("ROUTE_TYPE(%d)", i) + } + return _ROUTE_TYPE_name[_ROUTE_TYPE_index[i]:_ROUTE_TYPE_index[i+1]] +} diff --git a/zebra/safi_string.go b/zebra/safi_string.go index 1bfcc506..ab491cb6 100644 --- a/zebra/safi_string.go +++ b/zebra/safi_string.go @@ -1,4 +1,4 @@ -// generated by stringer --type SAFI,API_TYPE,ROUTE_TYPE,NEXTHOP_FLAG; DO NOT EDIT +// Code generated by "stringer -type=SAFI"; DO NOT EDIT. package zebra @@ -10,43 +10,8 @@ var _SAFI_index = [...]uint8{0, 12, 26, 41, 54, 62} func (i SAFI) String() string { i -= 1 - if i+1 >= SAFI(len(_SAFI_index)) { + if i >= SAFI(len(_SAFI_index)-1) { return fmt.Sprintf("SAFI(%d)", i+1) } return _SAFI_name[_SAFI_index[i]:_SAFI_index[i+1]] } - -const _API_TYPE_name = "INTERFACE_ADDINTERFACE_DELETEINTERFACE_ADDRESS_ADDINTERFACE_ADDRESS_DELETEINTERFACE_UPINTERFACE_DOWNIPV4_ROUTE_ADDIPV4_ROUTE_DELETEIPV6_ROUTE_ADDIPV6_ROUTE_DELETEREDISTRIBUTE_ADDREDISTRIBUTE_DELETEREDISTRIBUTE_DEFAULT_ADDREDISTRIBUTE_DEFAULT_DELETEIPV4_NEXTHOP_LOOKUPIPV6_NEXTHOP_LOOKUPIPV4_IMPORT_LOOKUPIPV6_IMPORT_LOOKUPINTERFACE_RENAMEROUTER_ID_ADDROUTER_ID_DELETEROUTER_ID_UPDATEHELLOMESSAGE_MAX" - -var _API_TYPE_index = [...]uint16{0, 13, 29, 50, 74, 86, 100, 114, 131, 145, 162, 178, 197, 221, 248, 267, 286, 304, 322, 338, 351, 367, 383, 388, 399} - -func (i API_TYPE) String() string { - i -= 1 - if i+1 >= API_TYPE(len(_API_TYPE_index)) { - return fmt.Sprintf("API_TYPE(%d)", i+1) - } - return _API_TYPE_name[_API_TYPE_index[i]:_API_TYPE_index[i+1]] -} - -const _ROUTE_TYPE_name = "ROUTE_SYSTEMROUTE_KERNELROUTE_CONNECTROUTE_STATICROUTE_RIPROUTE_RIPNGROUTE_OSPFROUTE_OSPF6ROUTE_ISISROUTE_BGPROUTE_HSLSROUTE_OLSRROUTE_BABELROUTE_MAX" - -var _ROUTE_TYPE_index = [...]uint8{0, 12, 24, 37, 49, 58, 69, 79, 90, 100, 109, 119, 129, 140, 149} - -func (i ROUTE_TYPE) String() string { - if i+1 >= ROUTE_TYPE(len(_ROUTE_TYPE_index)) { - return fmt.Sprintf("ROUTE_TYPE(%d)", i) - } - return _ROUTE_TYPE_name[_ROUTE_TYPE_index[i]:_ROUTE_TYPE_index[i+1]] -} - -const _NEXTHOP_FLAG_name = "NEXTHOP_IFINDEXNEXTHOP_IFNAMENEXTHOP_IPV4NEXTHOP_IPV4_IFINDEXNEXTHOP_IPV4_IFNAMENEXTHOP_IPV6NEXTHOP_IPV6_IFINDEXNEXTHOP_IPV6_IFNAMENEXTHOP_BLACKHOLE" - -var _NEXTHOP_FLAG_index = [...]uint8{0, 15, 29, 41, 61, 80, 92, 112, 131, 148} - -func (i NEXTHOP_FLAG) String() string { - i -= 1 - if i+1 >= NEXTHOP_FLAG(len(_NEXTHOP_FLAG_index)) { - return fmt.Sprintf("NEXTHOP_FLAG(%d)", i+1) - } - return _NEXTHOP_FLAG_name[_NEXTHOP_FLAG_index[i]:_NEXTHOP_FLAG_index[i+1]] -} diff --git a/zebra/zapi.go b/zebra/zapi.go index fb5450b7..590bce4c 100644 --- a/zebra/zapi.go +++ b/zebra/zapi.go @@ -40,6 +40,8 @@ const ( INTERFACE_LINKDETECTION INTERFACE_STATUS = 0x04 ) +// Interface Link Layer Types. +//go:generate stringer -type=LINK_TYPE type LINK_TYPE uint32 const ( @@ -121,6 +123,7 @@ func (t INTERFACE_STATUS) String() string { } // Subsequent Address Family Identifier. +//go:generate stringer -type=SAFI type SAFI uint8 const ( @@ -133,6 +136,7 @@ const ( ) // API Types. +//go:generate stringer -type=API_TYPE type API_TYPE uint16 const ( @@ -170,6 +174,7 @@ const ( ) // Route Types. +//go:generate stringer -type=ROUTE_TYPE type ROUTE_TYPE uint8 const ( @@ -294,6 +299,7 @@ func (t FLAG) String() string { } // Nexthop Flags. +//go:generate stringer -type=NEXTHOP_FLAG type NEXTHOP_FLAG uint8 const ( |