LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-26-2008, 02:02 AM   #1
citiz3n
LQ Newbie
 
Registered: Feb 2007
Posts: 8

Rep: Reputation: 0
Question UDP Socket Connection


Hi Guys,

Can we create a UDP Socket Connection by choosing our network interface?

Here is the description:

I have both my Ethernet and Wlan active. Both obtained unique IP address which each of them are valid IP Address. Now, i would like to write a program in which i will have to create a udp socket connection.

Will be able to create the socket connection 'WITH MY CHOICE' of Network Interface?


Please Advice.


Thank you.


Citiz3n
 
Old 05-26-2008, 03:17 AM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Sure - just use 'bind'; otherwise the routing will be left to the operating system and to a remote client they may see some packets come from one address and some from the other address (it depends on the routing rules). 'bind' is not a requirement for data sent via UDP, but it does have its uses.
 
Old 05-26-2008, 07:48 PM   #3
citiz3n
LQ Newbie
 
Registered: Feb 2007
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by pinniped View Post
Sure - just use 'bind'; otherwise the routing will be left to the operating system and to a remote client they may see some packets come from one address and some from the other address (it depends on the routing rules). 'bind' is not a requirement for data sent via UDP, but it does have its uses.
Thank you for the reply. The real question here is... i have obtained ip address for both the interfaces.. (Assume that we dont know the exact IP because it is derived from dhcp).

Now.. i would like to bind the connection to ie. Wlan network interface. Without knowing the Wlan interface IP address beforehand.. how can i bind the connection? Hope you understand what I am trying to mean here.


Tq lotz.


Citiz3n
 
  


Reply


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
UDP socket prgramming (DHCP) McBrain Programming 3 02-27-2012 06:17 PM
Poll() and UDP socket krizzz Programming 4 06-06-2006 10:55 AM
could not listen on UDP socket: address in use peaceofcrap2001 Linux - Networking 2 07-10-2004 12:18 PM
How to receive UDP and ICMP packets, by one UDP socket(PMTUD) myself_rajat Linux - Networking 0 05-28-2004 05:43 AM
Using Raw Socket for UDP myself_rajat Linux - Networking 0 05-17-2004 03:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:13 PM.

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