getsockopt returns different IP_TOS value from the one set in setsockopt
问题 I'm trying to use setsockopt to set IPTOS value to IPTOS_THROUGHPUT . The setsockopt call returned 0 . However the getsockopt shows the IP_TOS value is set to 1 , which is different from IPTOS_THROUGHPUT ( 0x8 ). Does anyone have idea what could have caused the mismatch of IPTOS value in the setsockopt and getsockopt ? Here's the log output: Set DSCP Marking on socket 26 setsockopt on socket 26 to 8 returns 0 DSCP marking on socket 26 is 1, different from expected 8 Below is the code: int