这是一个创建于 3476 天前的主题,其中的信息可能已经有所发展或是发生改变。
第 1 条附言 · 2015-05-25 18:57:02 +08:00
FreeBSD takes another approach. It *never* passes TCP or UDP packets to raw
sockets. Such packets need to be read directly at the datalink layer by using
libraries like libpcap or the bpf API. It also *never* passes any fragmented
datagram. Each datagram has to be completeley reassembled before it is passed
to a raw socket.
FreeBSD passes to a raw socket:
a) every IP datagram with a protocol field that is not registered in
the kernel
b) all IGMP packets after kernel finishes processing them
c) all ICMP packets (except echo request, timestamp request and address
mask request) after kernel finishes processes them
2 条回复 • 2018-10-25 00:12:15 +08:00
|
|
1
auser 2015-05-25 22:13:58 +08:00 via Android
可以在内核里头写扩展抓 ╯﹏╰
|
|
|
2
autogen 2018-10-25 00:12:15 +08:00
macOS 下居然能发 raw ip 包,不会[Error 22] invalid argument 吗
|