Hey Christofer, with your MAC-Address problem a hackish way could be to implement a small adapter for a native query of the arp-table and a little parser to parse the information which contains mac-addresses and corresponding network interfaces. On unix systems that would be 'arp -a' and splitting the result by whitespace. You retrieve hostname, ipaddress, mac-address and interface.
Alex > Christofer Dutz <christofer.d...@c-ware.de> hat am 12. März 2018 um 14:12 > geschrieben: > > > Hi all, > > after realizing that Beckhoff seems to use ADS inside of EtherCat frames sent > directly inside Ethernet frames (which seems to take only a fraction of the > protocol overhead a normal TCP packet requires. I renamed the RawSocket to > RawIpSocket and added a new type RawEthernetSocket, which allows to send and > receive raw Ethernet frames and would allow implementing protocols like > EtherCat and Profinet IO. > > The one problem I’m having with this, is that right now you need to pass in > the MAC addresses of the target as well as that of the source. The problem > without this I can’t seem to be able to find out which network device is able > to communicate with the given MAC address. I tried several things, but none > of them seemed to work without knowing the IP address of the target. Having a > Ethernet level connection sounded bad to require an IP. It anyone here has an > Idea how I could check which local network device can be used to send data to > a remote mac address, I would be super happy. > > Next thing I definitely need to do, is to implement the “Raw socket” -> Netty > integration … sort of a little hesitant to do that as this API is really > quite a mess :-( > > Chris