4. check the mac header(6bytes des_mac_addr,6bytes src_mac_addr and 2bytes LLC len),and analyse the data from the 13th byte,if it's an IP packet,then make the copy of the data ,process it by the ip callback function which is registed in layer2 data process function.
2.winpcap
3.yes
4.数据链路帧里边封装的是IP报文?没听说过
我知道IP协议的实现肯定提供了一种钩子式的回调函数来处理IP报文。
因此我的问题是这个回调函数以什么形式存在?
怎么利用它?
将以太网卡改成混杂模式,网卡可以获取包括目的地址非本机MAC地址的MAC帧。
我的问题在于,现在设计的数据链路层协议并非MAC帧,以太网能接收,并放入到网卡缓存,并向上发出中断请求吗?