summaryrefslogtreecommitdiff
path: root/src/libstrongswan/networking/host.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstrongswan/networking/host.h')
-rw-r--r--src/libstrongswan/networking/host.h31
1 files changed, 11 insertions, 20 deletions
diff --git a/src/libstrongswan/networking/host.h b/src/libstrongswan/networking/host.h
index 25f334779..4fc6cf35c 100644
--- a/src/libstrongswan/networking/host.h
+++ b/src/libstrongswan/networking/host.h
@@ -37,16 +37,6 @@ typedef struct host_t host_t;
#include <utils/chunk.h>
/**
- * Differences between two hosts. They differ in
- * address, port, or both.
- */
-enum host_diff_t {
- HOST_DIFF_NONE = 0,
- HOST_DIFF_ADDR = 1,
- HOST_DIFF_PORT = 2,
-};
-
-/**
* Representates a Host
*
* Host object, identifies a address:port pair and defines some
@@ -102,7 +92,7 @@ struct host_t {
*
* Returned chunk points to internal data.
*
- * @return address string,
+ * @return address blob
*/
chunk_t (*get_address) (host_t *this);
@@ -116,7 +106,7 @@ struct host_t {
/**
* Set the port of this host
*
- * @param port port numer
+ * @param port port number
*/
void (*set_port) (host_t *this, u_int16_t port);
@@ -137,14 +127,6 @@ struct host_t {
bool (*equals) (host_t *this, host_t *other);
/**
- * Compare two hosts and return the differences.
- *
- * @param other the other to compare
- * @return differences in a combination of host_diff_t's
- */
- host_diff_t (*get_differences) (host_t *this, host_t *other);
-
- /**
* Destroy this host object.
*/
void (*destroy) (host_t *this);
@@ -210,6 +192,15 @@ host_t *host_create_from_sockaddr(sockaddr_t *sockaddr);
host_t *host_create_from_subnet(char *string, int *bits);
/**
+ * Create a netmask host having the first netbits bits set.
+ *
+ * @param family family of the netmask host
+ * @param netbits number of leading bits set in the host
+ * @return netmask host
+ */
+host_t *host_create_netmask(int family, int netbits);
+
+/**
* Create a host without an address, a "any" host.
*
* @param family family of the any host