当前位置: 技术问答>linux和unix
如何从收到的IP包中取的DSCP值
来源: 互联网 发布时间:2016-06-08
本文导语: 好像用getsockopt函数不能取道,有其他的方法吗 | IP_TOS This option lets us set the type-of-service (TOS) field (which contains the DSCP and ECN fields, Figure A.1) in the IP header for a TCP, UDP, or SCTP so...
好像用getsockopt函数不能取道,有其他的方法吗
|
IP_TOS
This option lets us set the type-of-service (TOS) field (which contains the DSCP and ECN fields,
Figure A.1) in the IP header for a TCP, UDP, or SCTP socket. If we call getsockopt for this
option, the current value that would be placed into the DSCP and ECN fields in the IP header
(which defaults to 0) is returned. There is no way to fetch the value from a received IP datagram.
摘自《UNIX网络编程》第一卷
This option lets us set the type-of-service (TOS) field (which contains the DSCP and ECN fields,
Figure A.1) in the IP header for a TCP, UDP, or SCTP socket. If we call getsockopt for this
option, the current value that would be placed into the DSCP and ECN fields in the IP header
(which defaults to 0) is returned. There is no way to fetch the value from a received IP datagram.
摘自《UNIX网络编程》第一卷
|
To specify the traffic class for a given packet, include the ancillary data with that packet.
To specify the traffic class for all packets on a socket, specify the traffic class as an
integer to the IPV6_TCLASS socket option. The received traffic class is returned as ancillary
data by recvmsg only if the application has the IPV6_RECVTCLASS socket option enabled
To specify the traffic class for all packets on a socket, specify the traffic class as an
integer to the IPV6_TCLASS socket option. The received traffic class is returned as ancillary
data by recvmsg only if the application has the IPV6_RECVTCLASS socket option enabled
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。