Linux: network: tcp: SO_TIMESTAMP and SO_TIMESTAMPNS,不能同时用

从socket的手册里看这两个选项是mutually exclusive,排他使用。
要是不看代码,也不知道为什么排他的使用。看了代码,就理解了。因为这两个变量使用的结构体成员是一个,所以不能同时用,同时用,会导致困惑:

int sock_get_timestamp(struct sock *sk, struct timeval __user *userstamp)
{
   
    
    
	struct timeval tv;
	if (!

猜你喜欢

转载自blog.csdn.net/qq_36428903/article/details/131622874