]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Lib: Change prefix for VPN route targets to vrt_
authorOndrej Zajicek <santiago@crfreenet.org>
Wed, 24 Jun 2026 17:03:12 +0000 (19:03 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Tue, 7 Jul 2026 19:16:07 +0000 (21:16 +0200)
The old prefix (rt_) is already used by route functions.

lib/ip.h

index a8bd28279d11f638577ebb62e333687aa95f6279..5fbfd68f5e4095f84d68760f40d034235a1f9dfc 100644 (file)
--- a/lib/ip.h
+++ b/lib/ip.h
@@ -541,33 +541,33 @@ typedef struct vpn_rt {
   u32 lo;
 } vpn_rt;
 
-#define RT_NONE                (vpn_rt){}
+#define VPN_RT_NONE            (vpn_rt){}
 
-static inline vpn_rt rt_from_u64(u64 val)
+static inline vpn_rt vrt_from_u64(u64 val)
 { return (vpn_rt) { .hi = val >> 32, .lo = val }; }
 
-static inline u64 rt_to_u64(vpn_rt rt)
+static inline u64 vrt_to_u64(vpn_rt rt)
 { return (((u64)rt.hi) << 32) | rt.lo; }
 
-static inline int rt_equal(vpn_rt a, vpn_rt b)
+static inline int vrt_equal(vpn_rt a, vpn_rt b)
 { return a.hi == b.hi && a.lo == b.lo; }
 
-static inline int rt_zero(vpn_rt a)
+static inline int vrt_zero(vpn_rt a)
 { return !a.hi && !a.lo; }
 
-static inline int rt_nonzero(vpn_rt a)
+static inline int vrt_nonzero(vpn_rt a)
 { return a.hi || a.lo; }
 
-static inline int rt_compare(vpn_rt a, vpn_rt b)
+static inline int vrt_compare(vpn_rt a, vpn_rt b)
 { return uint_cmp(a.hi, b.hi) ?: uint_cmp(a.lo, b.lo); }
 
-static inline u64 rt_hash0(vpn_rt rt, u32 p, u64 acc)
+static inline u64 vrt_hash0(vpn_rt rt, u32 p, u64 acc)
 { return u32_hash0(rt.hi, p, u32_hash0(rt.lo, p, acc)); }
 
-static inline vpn_rt get_rt(const void *buf)
+static inline vpn_rt get_vrt(const void *buf)
 { return (vpn_rt) { .hi = get_u32(buf), .lo = get_u32(buf + 4) }; }
 
-static inline void *put_rt(void *buf, vpn_rt rt)
+static inline void *put_vrt(void *buf, vpn_rt rt)
 {
   put_u32(buf, rt.hi);
   put_u32(buf + 4, rt.lo);