以太网类型 0xBEEF
以太网标头中有一个字段称为以太网类型。 我正在使用原始以太网帧在 Windows 中编写通信库。 我应该怎么做才能考虑以太网类型? 我必须使用的是 0xBEEF。 这是否意味着我不能使用 NDIS 之类的东西?
There is a field in the ethernet header called the ethernet type. I am writing a communication library in windows using raw ethernet frames. What should I do to take the Ethernet type into consideration? The one I must use is 0xBEEF. Does this mean I can't use anything like NDIS?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
最好的办法是了解 EtherType 字段。
这意味着如果您使用
0xBEEF
,运行标准软件的其他机器将无法识别该帧的有效负载。当然,您可以在帧中发送任何类型的数据。 您只需在接收端安装软件即可解释数据。
The best thing to do is to read about EtherType field.
This means that if you use
0xBEEF
, other machines running standard software will not recognize the frame's payload.You can, of course, send any kind of data in the frame. You will merely have to have your software installed on the receiving end to interpret the data.
以太网类型基本上是特定以太网帧中包含的数据的协议类型。
Ethernet type is basically the type of the protocol of the data that is contained in that particular Ethernet frame .
如果没有充分的理由这样做,我永远不会使用原始以太网帧。 使用 UDP 数据包通常更简单且更面向未来。
If there aren't very good reasons for doing so, I would never use raw Ethernet frames. It's usually much simpler and more futureproof to e.g. use UDP packets.