Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-20-2009, 01:42 AM   #1
LQ Newbie
Registered: Apr 2008
Posts: 2

Rep: Reputation: 0
Question 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.


Old 03-21-2009, 10:43 AM   #2
Senior Member
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,533

Rep: Reputation: 334Reputation: 334Reputation: 334Reputation: 334
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.


api, network, programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Control of Network Connections/network startup question Fedora 9 Gnome benkerndt Fedora 2 01-06-2009 08:14 PM
user space network driver api? jesshowe Programming 3 05-30-2008 03:22 PM
need help to iterate through PID's mcnkevin Programming 7 11-24-2007 06:08 PM
c: iterate an array of structs kpachopoulos Programming 2 08-15-2006 12:06 PM
2 network cards, 2 network connections - routing problem tvojvodi Linux - Networking 4 02-24-2004 04:26 PM

All times are GMT -5. The time now is 02:00 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration