From 7c137dfb7018462fd30c2d60b884bfca811b72a7 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Mon, 15 Apr 2013 16:27:31 +0200 Subject: [PATCH] host: remove unused host_t.get_differences() method --- src/libstrongswan/networking/host.c | 21 --------------------- src/libstrongswan/networking/host.h | 18 ------------------ 2 files changed, 39 deletions(-) diff --git a/src/libstrongswan/networking/host.c b/src/libstrongswan/networking/host.c index 2a9c58b2f6..28e0b11b65 100644 --- a/src/libstrongswan/networking/host.c +++ b/src/libstrongswan/networking/host.c @@ -264,26 +264,6 @@ static bool ip_equals(private_host_t *this, private_host_t *other) return FALSE; } -/** - * Implements host_t.get_differences - */ -static host_diff_t get_differences(host_t *this, host_t *other) -{ - host_diff_t ret = HOST_DIFF_NONE; - - if (!this->ip_equals(this, other)) - { - ret |= HOST_DIFF_ADDR; - } - - if (this->get_port(this) != other->get_port(other)) - { - ret |= HOST_DIFF_PORT; - } - - return ret; -} - /** * Implements host_t.equals */ @@ -332,7 +312,6 @@ static private_host_t *host_create_empty(void) .get_address = _get_address, .get_port = _get_port, .set_port = _set_port, - .get_differences = get_differences, .ip_equals = (bool (*)(host_t *,host_t *))ip_equals, .equals = (bool (*)(host_t *,host_t *)) equals, .is_anyaddr = _is_anyaddr, diff --git a/src/libstrongswan/networking/host.h b/src/libstrongswan/networking/host.h index 25f334779b..b36a131d1f 100644 --- a/src/libstrongswan/networking/host.h +++ b/src/libstrongswan/networking/host.h @@ -36,16 +36,6 @@ typedef struct host_t host_t; #include -/** - * 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 * @@ -136,14 +126,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. */ -- 2.47.2