summaryrefslogtreecommitdiff
path: root/lib/flowspec.h
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2019-12-09 04:23:01 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2019-12-09 04:23:01 +0100
commitff2ca10cba9c5a3be690ec1a77a068e23395ef20 (patch)
treecd6b3d8f0a1b825755d5731e02925618725a0867 /lib/flowspec.h
parent21d09632a524c0d2a7f44a51f877370ad07b983c (diff)
Filter: Add support for src/dst accessors for Flowspec and SADR
Diffstat (limited to 'lib/flowspec.h')
-rw-r--r--lib/flowspec.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/flowspec.h b/lib/flowspec.h
index d486cda0..9bafc52e 100644
--- a/lib/flowspec.h
+++ b/lib/flowspec.h
@@ -83,6 +83,8 @@ const byte *flow4_first_part(const net_addr_flow4 *f);
const byte *flow6_first_part(const net_addr_flow6 *f);
const byte *flow4_next_part(const byte *pos, const byte *end);
const byte *flow6_next_part(const byte *pos, const byte *end);
+const byte *flow4_get_part(const net_addr_flow4 *f, uint type);
+const byte *flow6_get_part(const net_addr_flow6 *f, uint type);
/*
@@ -91,6 +93,7 @@ const byte *flow6_next_part(const byte *pos, const byte *end);
ip4_addr flow_read_ip4_part(const byte *part);
ip6_addr flow_read_ip6_part(const byte *part);
+static inline int flow_read_pxlen(const byte *part) { return part[1]; }
/*