Tag: 以太网

如何在没有TCP / IP堆栈的情况下用Java发送以太网帧

我的Java应用程序应该控制直接连接到我的计算机(Ubuntu和Windows)的网络接口的外部设备(EtherCAT总线技术)。 没有连接其他网络设备。 通信已在标准IEEE 802.3以太网帧上完成,没有IP堆栈。 发送数据的示例: int etherType = 0x88A4; // the EtherType registered by IEEE byte[] macBroadcast = new byte[] {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; byte[] macSource = new byte[] … ; // MAC Address of my network interface card byte[] buffer = … // the data to send device.write(macSource, macBroadcast, etherType, buffer); 我尝试了使用pcap本机库的JNetPcap […]

你如何使用Java获得以太网地址?

我想检索用于访问特定网站的网络接口的以太网地址。 如何在Java中完成? 解决方案请注意, getHardwareAddress的公认解决方案仅在Java 6中可用。除了执行i(f | p)confing之外,似乎没有Java 5的解决方案。

原始以太网的Java库

我正在寻找一个Java库,它可以让我访问原始以太网帧,用于读取和发送它们。 我的最终目标是创建一个BACnet以太网网络扫描仪。 请注意,我不是在寻找TCP \ IP。 有人知道这是一个很好的图书馆吗?