Back out use of ip.h IPTOS_DSCP_AF42 constant (missing on OS X)

This commit is contained in:
Keith Winstein
2012-10-22 10:47:50 -04:00
parent c53a174d0c
commit b99da057bb
+1 -2
View File
@@ -35,7 +35,6 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <arpa/inet.h>
#include <assert.h>
#include <errno.h>
@@ -158,7 +157,7 @@ Connection::Socket::Socket()
#endif
/* set diffserv values to AF42 + ECT */
int dscp = IPTOS_DSCP_AF42 | IPTOS_ECN_ECT0;
int dscp = 0x92; /* OS X does not have IPTOS_DSCP_AF42 constant */
if ( setsockopt( _fd, IPPROTO_IP, IP_TOS, &dscp, sizeof (dscp)) < 0 ) {
// perror( "setsockopt( IP_TOS )" );
}