Skip to content

Commit

Permalink
Back out use of ip.h IPTOS_DSCP_AF42 constant (missing on OS X)
Browse files Browse the repository at this point in the history
  • Loading branch information
keithw committed Oct 22, 2012
1 parent c53a174 commit b99da05
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/network/network.cc
Expand Up @@ -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>
Expand Down Expand Up @@ -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 )" );
}
Expand Down

0 comments on commit b99da05

Please sign in to comment.