diff options
author | Lou Berger <lberger@labn.net> | 2016-06-16 16:16:52 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-09-30 18:56:03 +0200 |
commit | 1a39c60a6a0202e06fd0a390416ab843527bda88 (patch) | |
tree | f3d5b0230a5f492e69fc311502e24cf5e0adfc65 /bgpd/bgp_encap.c | |
parent | zebra: support FIB override routes (diff) | |
download | frr-1a39c60a6a0202e06fd0a390416ab843527bda88.tar.xz frr-1a39c60a6a0202e06fd0a390416ab843527bda88.zip |
bgpd: eliminate RD related duplicate code in bgp_encap.c
decode_rd_... apis are declared global in bgp_mplsvpn.c
Diffstat (limited to 'bgpd/bgp_encap.c')
-rw-r--r-- | bgpd/bgp_encap.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/bgpd/bgp_encap.c b/bgpd/bgp_encap.c index 4b1b6757a..3f7712b24 100644 --- a/bgpd/bgp_encap.c +++ b/bgpd/bgp_encap.c @@ -45,51 +45,6 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "bgpd/bgp_vty.h" #include "bgpd/bgp_encap.h" -static u_int16_t -decode_rd_type (u_char *pnt) -{ - u_int16_t v; - - v = ((u_int16_t) *pnt++ << 8); - v |= (u_int16_t) *pnt; - return v; -} - - -static void -decode_rd_as (u_char *pnt, struct rd_as *rd_as) -{ - rd_as->as = (u_int16_t) *pnt++ << 8; - rd_as->as |= (u_int16_t) *pnt++; - - rd_as->val = ((u_int32_t) *pnt++) << 24; - rd_as->val |= ((u_int32_t) *pnt++) << 16; - rd_as->val |= ((u_int32_t) *pnt++) << 8; - rd_as->val |= (u_int32_t) *pnt; -} - -static void -decode_rd_as4 (u_char *pnt, struct rd_as *rd_as) -{ - rd_as->as = (u_int32_t) *pnt++ << 24; - rd_as->as |= (u_int32_t) *pnt++ << 16; - rd_as->as |= (u_int32_t) *pnt++ << 8; - rd_as->as |= (u_int32_t) *pnt++; - - rd_as->val = ((u_int32_t) *pnt++ << 8); - rd_as->val |= (u_int32_t) *pnt; -} - -static void -decode_rd_ip (u_char *pnt, struct rd_ip *rd_ip) -{ - memcpy (&rd_ip->ip, pnt, 4); - pnt += 4; - - rd_ip->val = ((u_int16_t) *pnt++ << 8); - rd_ip->val |= (u_int16_t) *pnt; -} - static void ecom2prd(struct ecommunity *ecom, struct prefix_rd *prd) { |