简体   繁体   English

如何用Java或C#创建MAC连接?

[英]How Can I Create a MAC Connection in Java or C#?

Anyone knows how can I create a connection without help of IP? 谁知道在没有IP的情况下如何建立连接? Something like Winbox connection? 像Winbox连接一样? Is it possible to create socket connection by means of MAC address? 是否可以通过MAC地址创建套接字连接?

Well, this may be an overkill, and I'm sure there are much better opinions, but just to get some of the job done, you may look at WinPcap and it's perfect .NET wrapper Pcap.net. 好吧,这可能是一个矫kill过正,我敢肯定还有很多更好的意见,但是为了完成一些工作,您可以看看WinPcap,它是完美的.NET包装器Pcap.net。

You may inject (and capture) any packet using your network card, and you can easily build any packet that fits your need. 您可以使用网卡注入(并捕获)任何数据包,并且可以轻松构建满足您需要的任何数据包。 I'm sure such a thing would require something more low-level than, say, sockets programming, that's why I recommend using Pcap, if no better solution is found. 我敢肯定,这样的事情需要比套接字编程更底层的东西,这就是为什么我建议使用Pcap的原因,如果找不到更好的解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM