List All Ethernet Devices and their info in C

Hi, Im using O22SIOMM in C to program several G432EB2 brains, I would like to implement a program that can use any present devices of that model.

At the moment I think that I can get the model using functions GetStatusHardwareEx() and GetStatusHardwareEx2() but for that I have to first open a conection to each of the devices and I will need to hardcode the IP address of all of them and then check each one.

Is there any function or a way to make my own listAllEthernetDevices() function. I was algo thinking on checking each of the 254 ips available for a network but there has to be a better way.

Thank you

I think you will need to have a list or scan for them like you were thinking.

If the devices are actively communicating AND they are NOT on a switched network AND you can run your host network interface in promiscuous mode, then you could probably sniff for OptoMMP traffic and discover them that way.

I don’t think there is any broadcast discovery mechanism for them.

Thank you Philip at the moment what I have done is to keep a list of X number of devices I will use and I make sure to set up their IPs before hand according to the list.

I guess is not too much of a problem to do this manually since I wont be changing devices that often.

Thank you for your answer!