diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2017-08-01 02:09:01 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2017-08-01 04:38:38 +0200 |
commit | a08ca0a7e101cbc44fc9300520bd0ab6a2c9b784 (patch) | |
tree | fc7a96bba33abeb7fb0f249837931efa05e0b8c1 /lib/zebra.h | |
parent | Merge pull request #881 from donaldsharp/ping_traceroute (diff) | |
download | frr-a08ca0a7e101cbc44fc9300520bd0ab6a2c9b784.tar.xz frr-a08ca0a7e101cbc44fc9300520bd0ab6a2c9b784.zip |
lib: remove SAFI_RESERVED_4 and SAFI_RESERVED_5
SAFI values have been a major source of confusion over the last few
years. That's because each SAFI needs to be represented in two different
ways:
* IANA's value used to send/receive packets over the network;
* Internal value used for array indexing.
In the second case, defining reserved values makes no sense because we
don't want to index SAFIs that simply don't exist. The sole purpose of
the internal SAFI values is to remove the gaps we have among the IANA
values, which would represent wasted memory in C arrays. With that said,
remove these reserved SAFIs to avoid further confusion in the future.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/zebra.h')
-rw-r--r-- | lib/zebra.h | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/lib/zebra.h b/lib/zebra.h index 8e1c4db80..7b705bb83 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -419,19 +419,10 @@ typedef enum { AFI_IP = 1, AFI_IP6 = 2, AFI_L2VPN = 3, AFI_MAX = 4 } afi_t; #define SAFI_UNICAST 1 #define SAFI_MULTICAST 2 #define SAFI_MPLS_VPN 3 -#define SAFI_RESERVED_4 4 -#define SAFI_ENCAP 5 -#define SAFI_RESERVED_5 5 -#define SAFI_EVPN 6 -#define SAFI_LABELED_UNICAST 7 -#define SAFI_MAX 8 - -#define IANA_SAFI_RESERVED 0 -#define IANA_SAFI_UNICAST 1 -#define IANA_SAFI_MULTICAST 2 -#define IANA_SAFI_LABELED_UNICAST 4 -#define IANA_SAFI_ENCAP 7 -#define IANA_SAFI_MPLS_VPN 128 +#define SAFI_ENCAP 4 +#define SAFI_EVPN 5 +#define SAFI_LABELED_UNICAST 6 +#define SAFI_MAX 7 /* * The above AFI and SAFI definitions are for internal use. The protocol @@ -454,6 +445,7 @@ typedef enum { #define IANA_SAFI_RESERVED 0 #define IANA_SAFI_UNICAST 1 #define IANA_SAFI_MULTICAST 2 +#define IANA_SAFI_LABELED_UNICAST 4 #define IANA_SAFI_ENCAP 7 #define IANA_SAFI_EVPN 70 #define IANA_SAFI_MPLS_VPN 128 |