仅使用以太网框架的Windows网络 [英] Windows networking using only Ethernet Frames

查看:86
本文介绍了仅使用以太网框架的Windows网络的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个项目,必须为连接到Windows计算机的设备编写网络库。复杂之处在于,我只能使用以太网帧与设备通信。因此根本没有TCP / UDP / IP。我认为无法在此处应用绑定/监听/接受方法,但也许我错了。而且,不涉及路由或交换。

I'm doing a project where I must write a network library for a device connected to a Windows machine. The complication comes in that I may only communicate with the device using ethernet frames. So there is no TCP/UDP/IP at all. I don't think the bind/listen/accept approach can be applied here, but maybe I am wrong. Also, there is no routing or switching involved.

我有几个问题。如何使用套接字与此设备通信? Winsock是否仅支持框架?我至今找不到很多资源。有人对我应该如何进行有任何想法吗?

I have a few questions. How do I use a socket to communicate with this device? Does winsock have any support for just frames? I haven't been able to find many resources on this. Does anyone have any ideas about how I should proceed?

使用套接字甚至是个好主意,还是可以只发送带有适当标题的信息?

Is using sockets even a good idea or can I just send out the information with the appropriate headers?

推荐答案

使用 WinPCap ,它具有一个用于发送和侦听原始数据的API。

您可以使用它来构建您的通信层。

Use WinPCap, it has an an API to send and listen to raw data.
You can build your communicate layer with it.

这篇关于仅使用以太网框架的Windows网络的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆