-   Programming (
-   -   API to iterate over available network connections (

gr3ymatt3r 03-20-2009 12:42 AM

API to iterate over available network connections
Dear All,

Is anybody aware of some API which lets me iterate over the network connections currently active on the Linux box?

I have this scenario:
My laptop running fedora is connected simultaneously through

1. Ethernet

My program communicates over UDP with other computer on the network. Now I want my program to be in control of which network connection is used for communication.



dwhitney67 03-21-2009 09:43 AM

Find the IP address assigned to the device you want to use, then bind() your port. Typically this is done by the server.

For the client application, it can perform a connect(), and then rely on send() to send messages. Alternatively, the client can use a sendto() and provide the server's IP address and port number.

All times are GMT -5. The time now is 08:06 PM.