summaryrefslogtreecommitdiff
path: root/src/libstrongswan/selectors/traffic_selector.h
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@debian.org>2013-02-07 13:27:27 +0100
committerYves-Alexis Perez <corsac@debian.org>2013-02-07 13:27:27 +0100
commit7585facf05d927eb6df3929ce09ed5e60d905437 (patch)
treee4d14b4dc180db20356b6b01ce0112f3a2d7897e /src/libstrongswan/selectors/traffic_selector.h
parentc1343b3278cdf99533b7902744d15969f9d6fdc1 (diff)
downloadvyos-strongswan-7585facf05d927eb6df3929ce09ed5e60d905437.tar.gz
vyos-strongswan-7585facf05d927eb6df3929ce09ed5e60d905437.zip
Imported Upstream version 5.0.2
Diffstat (limited to 'src/libstrongswan/selectors/traffic_selector.h')
-rw-r--r--src/libstrongswan/selectors/traffic_selector.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/libstrongswan/selectors/traffic_selector.h b/src/libstrongswan/selectors/traffic_selector.h
index 7a81521e9..b6da391aa 100644
--- a/src/libstrongswan/selectors/traffic_selector.h
+++ b/src/libstrongswan/selectors/traffic_selector.h
@@ -27,7 +27,7 @@ typedef enum ts_type_t ts_type_t;
typedef struct traffic_selector_t traffic_selector_t;
#include <library.h>
-#include <utils/host.h>
+#include <networking/host.h>
/**
* Traffic selector types.
@@ -231,6 +231,19 @@ traffic_selector_t *traffic_selector_create_from_string(
char *from_addr, u_int16_t from_port,
char *to_addr, u_int16_t to_port);
+
+
+/**
+ * Create a traffic selector from a CIDR string.
+ *
+ * @param string CIDR string, such as 10.1.0.0/16
+ * @param protocol protocol for this ts, such as TCP or UDP
+ * @param port single port for this TS, 0 for any port
+ * @return traffic selector, NULL if string invalid
+ */
+traffic_selector_t *traffic_selector_create_from_cidr(char *string,
+ u_int8_t protocol, u_int16_t port);
+
/**
* Create a new traffic selector using data read from the net.
*