Hi Alexander,

yeah ... I already thought about that ... the "arp -a" does work, after I sort 
of had some form of communication prior to that lookup. My S7 is very 
uncommunicative if I just turn it on. Having fixed IP not much chatter leaving 
the grey box which my client could catch and remember. Some people say: Ping 
the box, then it's in the arp cache, but I would ping it, if it had an IP 
address ... if there was any "Hey guys I'm new to the network, please introduce 
yourselves" type of package, that would be awesome (HGINTTNPIY Protocol ;-) ) 

I had to do a cli-parsing option for my RawIpSocket as I needed to find the 
default gateway if I'm connecting to a device not on the same physical network 
and I need to go through a router or gateway. It worked but I had to implement 
parsers for all sorts of OSes and it doesn't really feel good to rely on that. 
So that's sort of a measure of last resort for me.

Chris


Am 12.03.18, 15:13 schrieb "Alexander Wellbrock" 
<alexander.wellbr...@othermo.de>:

    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
    

Reply via email to