From 9cb73f839ffddb1479f0ee1c8a89acebafd31045 Mon Sep 17 00:00:00 2001 From: TingPing Date: Sun, 28 Dec 2014 13:28:19 -0500 Subject: Remove MSProxy support It's not enabled anywhere, certainly not maintained --- src/common/network.c | 83 ---------------------------------------------------- 1 file changed, 83 deletions(-) (limited to 'src/common/network.c') 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 -- cgit 1.4.1