diff options
author | Pavel Tvrdik <pawel.tvrdik@gmail.com> | 2016-06-29 12:08:28 +0200 |
---|---|---|
committer | Jan Moskyto Matejka <mq@ucw.cz> | 2016-12-07 09:35:24 +0100 |
commit | 69ae5784509d51ee928c99b8b066f68a166bfe18 (patch) | |
tree | 21a0187736347359839f929305414cf6a0fad2b0 /lib/net.h | |
parent | f6e8e141df63cd86e344ca659637f23d638d47a2 (diff) |
Add `.asn' operator to all ROA prefixes in filters
Example:
bird> eval (1.2.0.0/16 max 20 as 1234).asn
1234
Todo: Should be described in user docs
Diffstat (limited to 'lib/net.h')
-rw-r--r-- | lib/net.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -171,6 +171,9 @@ static inline int net_type_match(const net_addr *a, u32 mask) static inline int net_is_ip(const net_addr *a) { return (a->type == NET_IP4) || (a->type == NET_IP6); } +static inline int net_is_roa(const net_addr *a) +{ return (a->type == NET_ROA4) || (a->type == NET_ROA6); } + static inline ip4_addr net4_prefix(const net_addr *a) { return ((net_addr_ip4 *) a)->prefix; } |