diff options
author | TingPing <tingping@tingping.se> | 2014-12-28 13:28:19 -0500 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2014-12-28 13:28:19 -0500 |
commit | 9cb73f839ffddb1479f0ee1c8a89acebafd31045 (patch) | |
tree | 3b224105778534140d6bf7109d3b6b0c321c44c2 /src/common/network.c | |
parent | 330e31c70fdf42731ac8cd74b94aaeaf9a01e7fd (diff) |
Remove MSProxy support
It's not enabled anywhere, certainly not maintained
Diffstat (limited to 'src/common/network.c')
-rw-r--r-- | src/common/network.c | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/src/common/network.c b/src/common/network.c index f5cfce58..c026116e 100644 --- a/src/common/network.c +++ b/src/common/network.c @@ -295,87 +295,4 @@ udp_sockets (int *sok4, int *sok6) *sok6 = socket (AF_INET6, SOCK_DGRAM, IPPROTO_UDP); } -/* the following functions are used only by MSPROXY and are not - proper ipv6 implementations - do not use in new code! */ - -void -net_store_fill_any (netstore *ns) -{ - struct addrinfo *ai; - struct sockaddr_in *sin; - - ai = ns->ip6_hostent; - if (ai == NULL) - { - ai = g_new0 (struct addrinfo, 1); - ns->ip6_hostent = ai; - } - sin = (struct sockaddr_in *)ai->ai_addr; - if (sin == NULL) - { - sin = g_new0 (struct sockaddr_in, 1); - ai->ai_addr = (struct sockaddr *)sin; - } - ai->ai_family = AF_INET; - ai->ai_addrlen = sizeof(struct sockaddr_in); - sin->sin_family = AF_INET; - sin->sin_addr.s_addr = INADDR_ANY; - sin->sin_port = 0; - ai->ai_next = NULL; -} - -void -net_store_fill_v4 (netstore *ns, guint32 addr, int port) -{ - struct addrinfo *ai; - struct sockaddr_in *sin; - - ai = ns->ip6_hostent; - if (ai == NULL) - { - ai = g_new0 (struct addrinfo, 1); - ns->ip6_hostent = ai; - } - sin = (struct sockaddr_in *)ai->ai_addr; - if (sin == NULL) - { - sin = g_new0 (struct sockaddr_in, 1); - ai->ai_addr = (struct sockaddr *)sin; - } - ai->ai_family = AF_INET; - ai->ai_addrlen = sizeof(struct sockaddr_in); - sin->sin_family = AF_INET; - sin->sin_addr.s_addr = addr; - sin->sin_port = port; - ai->ai_next = NULL; -} - -guint32 -net_getsockaddr_v4 (netstore *ns) -{ - struct addrinfo *ai; - struct sockaddr_in *sin; - - ai = ns->ip6_hostent; - - while (ai->ai_family != AF_INET) { - ai = ai->ai_next; - if (!ai) - return 0; - } - sin = (struct sockaddr_in *)ai->ai_addr; - return sin->sin_addr.s_addr; -} - -int -net_getsockport (int sok4, int sok6) -{ - struct sockaddr_in addr; - int len = sizeof (addr); - - if (getsockname (sok4, (struct sockaddr *)&addr, &len) == -1) - return -1; - return addr.sin_port; -} - #endif |