X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=bgpd%2Fbgp_aspath.h;h=9df352fcd6a234a4356cb78de6161dfdd3503157;hb=9b222c1f1a9bb31c8d186505a40158a145c97649;hp=a4427714ba65377fcdbe6829088bb194898a25cb;hpb=5bc47da6b55e14f997e232a9b5d6771c7407a0c0;p=mirror_frr.git diff --git a/bgpd/bgp_aspath.h b/bgpd/bgp_aspath.h index a4427714b..9df352fcd 100644 --- a/bgpd/bgp_aspath.h +++ b/bgpd/bgp_aspath.h @@ -39,6 +39,7 @@ #define BGP_PRIVATE_AS4_MAX 4294967294U /* we leave BGP_AS_MAX as the 16bit AS MAX number. */ +#define BGP_AS_ZERO 0 #define BGP_AS_MAX 65535U #define BGP_AS4_MAX 4294967295U /* Transition 16Bit AS as defined by IANA */ @@ -87,7 +88,7 @@ extern struct aspath *aspath_add_seq_n(struct aspath *, as_t, unsigned); extern struct aspath *aspath_add_seq(struct aspath *, as_t); extern struct aspath *aspath_add_confed_seq(struct aspath *, as_t); extern bool aspath_cmp(const void *as1, const void *as2); -extern int aspath_cmp_left(const struct aspath *, const struct aspath *); +extern bool aspath_cmp_left(const struct aspath *, const struct aspath *); extern bool aspath_cmp_left_confed(const struct aspath *as1, const struct aspath *as2xs); extern struct aspath *aspath_delete_confed_seq(struct aspath *); @@ -106,8 +107,8 @@ extern unsigned int aspath_key_make(const void *); extern unsigned int aspath_get_first_as(struct aspath *); extern unsigned int aspath_get_last_as(struct aspath *); extern int aspath_loop_check(struct aspath *, as_t); -extern int aspath_private_as_check(struct aspath *); -extern int aspath_single_asn_check(struct aspath *, as_t asn); +extern bool aspath_private_as_check(struct aspath *); +extern bool aspath_single_asn_check(struct aspath *, as_t asn); extern struct aspath *aspath_replace_specific_asn(struct aspath *aspath, as_t target_asn, as_t our_asn); @@ -115,12 +116,13 @@ extern struct aspath *aspath_replace_private_asns(struct aspath *aspath, as_t asn, as_t peer_asn); extern struct aspath *aspath_remove_private_asns(struct aspath *aspath, as_t peer_asn); -extern int aspath_firstas_check(struct aspath *, as_t); -extern int aspath_confed_check(struct aspath *); -extern int aspath_left_confed_check(struct aspath *); +extern bool aspath_firstas_check(struct aspath *, as_t); +extern bool aspath_confed_check(struct aspath *); +extern bool aspath_left_confed_check(struct aspath *); extern unsigned long aspath_count(void); extern unsigned int aspath_count_hops(const struct aspath *); extern bool aspath_check_as_sets(struct aspath *aspath); +extern bool aspath_check_as_zero(struct aspath *aspath); extern unsigned int aspath_count_confeds(struct aspath *); extern unsigned int aspath_size(struct aspath *); extern as_t aspath_highest(struct aspath *); @@ -128,7 +130,7 @@ extern as_t aspath_leftmost(struct aspath *); extern size_t aspath_put(struct stream *, struct aspath *, int); extern struct aspath *aspath_reconcile_as4(struct aspath *, struct aspath *); -extern unsigned int aspath_has_as4(struct aspath *); +extern bool aspath_has_as4(struct aspath *); /* For SNMP BGP4PATHATTRASPATHSEGMENT, might be useful for debug */ extern uint8_t *aspath_snmp_pathseg(struct aspath *, size_t *);