Skip to Content.
Sympa Menu

ndt-dev - [ndt-dev] [ndt] r821 committed - Remove some print statements and get rid of the AF_INET6 requirement (...

Subject: NDT-DEV email list created

List archive

[ndt-dev] [ndt] r821 committed - Remove some print statements and get rid of the AF_INET6 requirement (...


Chronological Thread 
  • From:
  • To:
  • Subject: [ndt-dev] [ndt] r821 committed - Remove some print statements and get rid of the AF_INET6 requirement (...
  • Date: Sun, 21 Apr 2013 19:27:18 +0000
  • Authentication-results: sfpop-ironport03.merit.edu; dkim=neutral (message not signed) header.i=none

Revision: 821
Author:

Date: Sun Apr 21 12:27:02 2013
Log: Remove some print statements and get rid of the AF_INET6 requirement (stupid as I think not requiring it is...)


http://code.google.com/p/ndt/source/detail?r=821

Modified:
/trunk/src/network.c

=======================================
--- /trunk/src/network.c Sun Apr 21 12:21:48 2013
+++ /trunk/src/network.c Sun Apr 21 12:27:02 2013
@@ -27,10 +27,6 @@
* -2 : Unable to set socket options
*/

-#ifndef AF_INET6
-#error This file assumes AF_INET6 is defined.
-#endif
-
static int OpenSocket(I2Addr addr, char* serv, int family, int options) {
int fd = -1;
int return_code = 0;
@@ -62,14 +58,10 @@
}
// end trying to set socket option to reuse local address

- log_println(1, "Family is %s", (family == AF_INET6?"ipv6":"ipv4"));
-
#ifdef AF_INET6
#ifdef IPV6_V6ONLY
if (family == AF_INET6 && (options & OPT_IPV6_ONLY)) {
on = 1;
-
- log_print(1, "Setting ipv6 only on socket");
// the IPv6 version socket option setup
if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on)) != 0) {
return_code = -2;
@@ -271,9 +263,11 @@
}

int family = AF_UNSPEC;
+#ifdef AF_INET6
// options provided by user indicate V6 or V4 only
if ((options & OPT_IPV6_ONLY) != 0)
family = AF_INET6;
+#endif
else if ((options & OPT_IPV4_ONLY) != 0)
family = AF_INET;



  • [ndt-dev] [ndt] r821 committed - Remove some print statements and get rid of the AF_INET6 requirement (..., ndt, 04/21/2013

Archive powered by MHonArc 2.6.16.

Top of Page