◆ find_devices()

int CCEthernet::find_devices ( ceth_device_type  type,
int  num,
ceth_device list 
)

This function broadcasts a request for all devices to identify themselves. A series of udp broadcast packets are sent out on a special port. Sealevel devices listening on this port will respond with device configuration information including IP, Netmask, Gateway, Name, and MAC address. NOTE: In order to support multiple ethernet interfaces, this function must use the SO_BINDTODEVICE socket option. This option requires elevated privileges.

Parameters
[in]typeSearch for SeaLink or SeaIO devices.
[in]numThe maximum number of devices to find. Size of list.
[out]*listInformation about found devices will be stored here.
Returns
int Error code.
Return values
>=0Number of devices found.
-EPERMInsufficent privileges.
-EINVALIncorrect parameters.
-ENOTCONNError establishing socket connection.
-EBADMSGReceived a response from an unknown port.

References CEthernet_find_devices().

 
 
Generated on Tue Sep 19 2017.