]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_ecommunity.h
Merge pull request #9453 from LabNConsulting/chopps/fix-netns-vrfs
[mirror_frr.git] / bgpd / bgp_ecommunity.h
index e9c52287f1e52e5c4b5880b6a8cf4c18c280caf9..a9dc2aeaa1f5a3c15e7880d0842dbb992d5fe845 100644 (file)
 /* Extended Communities type flag.  */
 #define ECOMMUNITY_FLAG_NON_TRANSITIVE      0x40
 
+/* Extended Community readable string length */
+#define ECOMMUNITY_STRLEN 64
+
 /* Extended Communities attribute.  */
 struct ecommunity {
        /* Reference counter.  */
@@ -114,7 +117,7 @@ struct ecommunity {
        uint8_t unit_size;
 
        /* Size of Extended Communities attribute.  */
-       int size;
+       uint32_t size;
 
        /* Extended Communities value.  */
        uint8_t *val;
@@ -148,6 +151,12 @@ struct ecommunity_val_ipv6 {
        char val[IPV6_ECOMMUNITY_SIZE];
 };
 
+enum ecommunity_lb_type {
+       EXPLICIT_BANDWIDTH,
+       CUMULATIVE_BANDWIDTH,
+       COMPUTED_BANDWIDTH
+};
+
 #define ecom_length_size(X, Y)    ((X)->size * (Y))
 
 /*
@@ -227,7 +236,7 @@ extern struct ecommunity *ecommunity_merge(struct ecommunity *,
 extern struct ecommunity *ecommunity_uniq_sort(struct ecommunity *);
 extern struct ecommunity *ecommunity_intern(struct ecommunity *);
 extern bool ecommunity_cmp(const void *arg1, const void *arg2);
-extern void ecommunity_unintern(struct ecommunity **);
+extern void ecommunity_unintern(struct ecommunity **ecommunity);
 extern unsigned int ecommunity_hash_make(const void *);
 extern struct ecommunity *ecommunity_str2com(const char *, int, int);
 extern struct ecommunity *ecommunity_str2com_ipv6(const char *str, int type,