summaryrefslogtreecommitdiff
path: root/stun
diff options
context:
space:
mode:
authorYouness Alaoui <youness.alaoui@collabora.co.uk>2009-02-16 17:35:30 -0500
committerYouness Alaoui <youness.alaoui@collabora.co.uk>2009-02-16 17:35:30 -0500
commit1669d031c8a730819689989f4a4401321917e7b5 (patch)
tree276c4b85e2095dbe9b5e2a451fb5eaf8ab4b3f1d /stun
parent4e7c80a721ee3a448103f690500408392e6f333a (diff)
downloadlibnice-1669d031c8a730819689989f4a4401321917e7b5.tar.gz
Removing unused function
Diffstat (limited to 'stun')
-rw-r--r--stun/utils.c40
-rw-r--r--stun/utils.h2
2 files changed, 0 insertions, 42 deletions
diff --git a/stun/utils.c b/stun/utils.c
index e139a96..58ebf55 100644
--- a/stun/utils.c
+++ b/stun/utils.c
@@ -44,46 +44,6 @@
#include "utils.h"
-/** Compares two socket addresses
- * @return 0 if the addresses are equal, non-zero otherwise
- */
-int sockaddrcmp (const struct sockaddr *a, const struct sockaddr *b)
-{
- int res;
-
- res = a->sa_family - b->sa_family;
- if (res)
- return res;
-
- switch (a->sa_family)
- {
- case AF_INET:
- {
- const struct sockaddr_in *a4 = (const struct sockaddr_in *)a;
- const struct sockaddr_in *b4 = (const struct sockaddr_in *)b;
- res = memcmp (&a4->sin_addr, &b4->sin_addr, 4);
- if (res == 0)
- res = memcmp (&a4->sin_port, &b4->sin_port, 2);
- break;
- }
-
- case AF_INET6:
- {
- const struct sockaddr_in6 *a6 = (const struct sockaddr_in6 *)a;
- const struct sockaddr_in6 *b6 = (const struct sockaddr_in6 *)b;
- res = memcmp (&a6->sin6_addr, &b6->sin6_addr, 16);
- if (res == 0)
- res = a6->sin6_scope_id - b6->sin6_scope_id;
- if (res == 0)
- res = memcmp (&a6->sin6_port, &b6->sin6_port, 2);
- break;
- }
- }
-
- return res;
-}
-
-
bool stun_optional (uint16_t t)
{
diff --git a/stun/utils.h b/stun/utils.h
index 384fe18..f0f6c08 100644
--- a/stun/utils.h
+++ b/stun/utils.h
@@ -56,8 +56,6 @@ extern "C" {
# endif
-int sockaddrcmp (const struct sockaddr *a, const struct sockaddr *b);
-
bool stun_optional (uint16_t t);
size_t stun_padding (size_t l);