作者热门文章
- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在为 Win7 及更高版本开发一个内核模式驱动程序。我想在驱动程序中发送自定义 IP 数据包(我想为 IP 层指定所有字段)。我找到了 Winsock Kernel (WSK) 技术,但它只说明了如何发送和接收 TCP 和 UDP 数据包。我知道在用户模式下,WinSock API 中有原始套接字。所以我想知道是否也有用于Winsock 内核的原始套接字接口(interface)?谢谢。
最佳答案
WskSocket
支持 TCP
、UDP
和自定义 IP 包的“原始套接字”:https://msdn.microsoft.com/en-us/library/windows/hardware/ff571149%28v=vs.85%29.aspx
SocketType [in]
The type of socket that is being created. The following socket types are supported:
SOCK_STREAM
Supports reliable connection-oriented byte stream communication.
SOCK_DGRAM
Supports unreliable connectionless datagram communication.
SOCK_RAW
Supports raw access to the transport protocol.
关于c - 如何在内核模式驱动程序中使用 Winsock 内核 (WSK) 发送原始套接字数据包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31557005/
我需要将 Windows 内核模式驱动程序从 IPV4 升级到 IPV4/IPV6,但使用 TDI 的现有内核模式套接字库不支持 IPV6。 所以我想将套接字库更改为“Winsock Kernel”h
我正在为 Win7 及更高版本开发一个内核模式驱动程序。我想在驱动程序中发送自定义 IP 数据包(我想为 IP 层指定所有字段)。我找到了 Winsock Kernel (WSK) 技术,但它只说明了
我是一名优秀的程序员,十分优秀!