get IP + MAC address from Socket connection
samdeg17
Posts: 9
Is there a way to obtain the IP address and MAC address from a socket connection to a server device?
Obviously I have to already know the IP address in order to connect to it, but it would still be handy to programmatically query these connection properties, especially MAC address.
Sam
Obviously I have to already know the IP address in order to connect to it, but it would still be handy to programmatically query these connection properties, especially MAC address.
Sam
0
Comments
this from the help file...
We cannot access data from that layer in an IP conversation from within code. But you might be able to cobble together a SNMP message to request the MAC if SNMP is enabled on the device you're hitting.
Paul
Pretty useless but I did have a couple hours of programming fun.
Paul
I wish we could inject Java code into Netlinx code with a delimiter similar to the way you can inject Java code into HTML with JSP. That would have been easier than dealing with Duet modules, and all the ancillary stuff.
Paul
Oh geez yes!
Then the JVM loads if it finds the delimiter in the Netlinx code at compile time, and doesn't if it doesn't. You can still have lightweight Netlinx programs, but can include Java should you need more library functions. Instead of loading Duet modules separately, you would just have Netlinx modules that might include or be completely comprised of Java code. I'm a hopeless dreamer, I know.
Paul