Back out use of ip.h IPTOS_DSCP_AF42 constant (missing on OS X)
This commit is contained in:
@@ -35,7 +35,6 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <netinet/ip.h>
|
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@@ -158,7 +157,7 @@ Connection::Socket::Socket()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* set diffserv values to AF42 + ECT */
|
/* 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 ) {
|
if ( setsockopt( _fd, IPPROTO_IP, IP_TOS, &dscp, sizeof (dscp)) < 0 ) {
|
||||||
// perror( "setsockopt( IP_TOS )" );
|
// perror( "setsockopt( IP_TOS )" );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user