mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 18:04:03 +00:00
Merge pull request #1173 from qlyoung/dedup-struct-ecomm
bgpd: deduplicate struct definition
This commit is contained in:
commit
469874c45a
@ -555,15 +555,8 @@ static int ecommunity_rt_soo_str(char *buf, u_int8_t *pnt, int type,
|
|||||||
const char *prefix;
|
const char *prefix;
|
||||||
|
|
||||||
/* For parse Extended Community attribute tupple. */
|
/* For parse Extended Community attribute tupple. */
|
||||||
struct ecommunity_as {
|
struct ecommunity_as eas;
|
||||||
as_t as;
|
struct ecommunity_ip eip;
|
||||||
u_int32_t val;
|
|
||||||
} eas;
|
|
||||||
|
|
||||||
struct ecommunity_ip {
|
|
||||||
struct in_addr ip;
|
|
||||||
u_int16_t val;
|
|
||||||
} eip;
|
|
||||||
|
|
||||||
|
|
||||||
/* Determine prefix for string, if any. */
|
/* Determine prefix for string, if any. */
|
||||||
|
@ -70,6 +70,16 @@ struct ecommunity {
|
|||||||
char *str;
|
char *str;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct ecommunity_as {
|
||||||
|
as_t as;
|
||||||
|
uint32_t val;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ecommunity_ip {
|
||||||
|
struct in_addr ip;
|
||||||
|
uint16_t val;
|
||||||
|
};
|
||||||
|
|
||||||
/* Extended community value is eight octet. */
|
/* Extended community value is eight octet. */
|
||||||
struct ecommunity_val {
|
struct ecommunity_val {
|
||||||
char val[ECOMMUNITY_SIZE];
|
char val[ECOMMUNITY_SIZE];
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
#include "bgpd/bgp_evpn_private.h"
|
#include "bgpd/bgp_evpn_private.h"
|
||||||
#include "bgpd/bgp_zebra.h"
|
#include "bgpd/bgp_zebra.h"
|
||||||
#include "bgpd/bgp_vty.h"
|
#include "bgpd/bgp_vty.h"
|
||||||
|
#include "bgpd/bgp_ecommunity.h"
|
||||||
|
|
||||||
#define SHOW_DISPLAY_STANDARD 0
|
#define SHOW_DISPLAY_STANDARD 0
|
||||||
#define SHOW_DISPLAY_TAGS 1
|
#define SHOW_DISPLAY_TAGS 1
|
||||||
@ -57,14 +58,8 @@ static void display_import_rt(struct vty *vty, struct irt_node *irt,
|
|||||||
{
|
{
|
||||||
u_char *pnt;
|
u_char *pnt;
|
||||||
u_char type, sub_type;
|
u_char type, sub_type;
|
||||||
struct ecommunity_as {
|
struct ecommunity_as eas;
|
||||||
as_t as;
|
struct ecommunity_ip eip;
|
||||||
u_int32_t val;
|
|
||||||
} eas;
|
|
||||||
struct ecommunity_ip {
|
|
||||||
struct in_addr ip;
|
|
||||||
u_int16_t val;
|
|
||||||
} eip;
|
|
||||||
struct listnode *node, *nnode;
|
struct listnode *node, *nnode;
|
||||||
struct bgpevpn *tmp_vpn;
|
struct bgpevpn *tmp_vpn;
|
||||||
json_object *json_rt = NULL;
|
json_object *json_rt = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user