diff options
| author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2020-08-26 12:50:07 -0300 |
|---|---|---|
| committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2020-08-26 12:50:07 -0300 |
| commit | 0ed507dda081856952065b5d9cb5862742b017f3 (patch) | |
| tree | 0be58d0f8eeda1a85d388de277398ba0ddbfe794 /lib/filter.h | |
| parent | 070783e69323b3c6401d9b6dff4ab8e74656d02d (diff) | |
lib: refactory cisco access list net wildcard
Wildcards bits have the opposite representation of a network mask,
example:
192.168.0.0/24 has the following netmask 255.255.0.0 and the wildcard
representation is 0.0.255.255.
To avoid future confusion lets put those definitions into a macro so we
know for sure which form to use.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'lib/filter.h')
| -rw-r--r-- | lib/filter.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/filter.h b/lib/filter.h index d41f3b65cd..623fb94527 100644 --- a/lib/filter.h +++ b/lib/filter.h @@ -32,6 +32,16 @@ extern "C" { /* Maximum ACL name length */ #define ACL_NAMSIZ 128 +/** Cisco host wildcard mask. */ +#define CISCO_HOST_WILDCARD_MASK "0.0.0.0" +/** Cisco host wildcard binary mask. */ +#define CISCO_BIN_HOST_WILDCARD_MASK INADDR_ANY + +/** Cisco any wildcard mask. */ +#define CISCO_ANY_WILDCARD_MASK "255.255.255.255" +/** Cisco binary any wildcard mask. */ +#define CISCO_BIN_ANY_WILDCARD_MASK INADDR_NONE + /* Filter direction. */ #define FILTER_IN 0 #define FILTER_OUT 1 |
