是否可以确定WFP驱动程序中的流上启用了哪些套接字/TCP选项? [英] Is it possible to determine which socket / TCP options are enabled on a stream in a WFP driver?
问题描述
最重要的是,我需要知道如何处理加急数据(是否启用了TCP_EXPEDITED_1122/TCP_BSDURGENT).同样有用的是是否启用了保持活动(SO_KEEPALIVE),以及是否启用了Nagle(TCP_NODELAY).
Most importantly I need to know how expedited data is to be handled (whether or not TCP_EXPEDITED_1122/TCP_BSDURGENT are enabled). Also useful would be whether or not keepalives are enabled (SO_KEEPALIVE), and whether or not Nagle is enabled (TCP_NODELAY).
此致
Ryan
推荐答案
紧急标志位于TCP头中,可在TRANSPORT层使用.
The Urgent flag is in the TCP header and availiable at the TRANSPORT layers.
对于Stream,在layerData(FWPS_STREAM_CALLOUT_IO_PACKET)-> streamData(FWPS_STREAM_DATA)中指示与连接有关的某些标志
For Stream, you are indicated in the layerData (FWPS_STREAM_CALLOUT_IO_PACKET) ->streamData (FWPS_STREAM_DATA) certain flags pertaining to the connection
FWPS_STREAM_FLAG_RECEIVE_EXPEDITED
FWPS_STREAM_FLAG_SEND_EXPEDITED
FWPS_STREAM_FLAG_SEND_NODELAY
http://msdn.microsoft.com/en-us/library/ff552417 (v = VS.85).aspx
http://msdn.microsoft.com/en-us/library/ff552419 (v = VS.85).aspx
您应该能够使用WinSock API来查询套接字是否启用了SO_KEEPALIVE(尽管这可能需要一些工作并维护将套接字与流关联的表)
FWPS_STREAM_FLAG_RECEIVE_EXPEDITED
FWPS_STREAM_FLAG_SEND_EXPEDITED
FWPS_STREAM_FLAG_SEND_NODELAY
http://msdn.microsoft.com/en-us/library/ff552417(v=VS.85).aspx
http://msdn.microsoft.com/en-us/library/ff552419(v=VS.85).aspx
You should be able to use the WinSock APIs to query whether the socket has SO_KEEPALIVE enabled (although this will likely require a bit of work and maintaining a table associateing the socket with the stream)
希望这会有所帮助
这篇关于是否可以确定WFP驱动程序中的流上启用了哪些套接字/TCP选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!