LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 01-29-2004, 08:53 AM   #1
macshark
LQ Newbie
 
Registered: Dec 2002
Posts: 18

Rep: Reputation: 0
2 network cards, sockets?


I have 2 network cards on my comp, and I intend to direct traffic from one network card to the other. Will be writing an application to handle this, but when i create the sockets, how am I able to specify which network card the socket will bind to? any suggestions?

thanks.
 
Old 01-29-2004, 09:09 AM   #2
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
try doing it by MAC address that should be unique enough to differentiate between the two cards
 
Old 01-29-2004, 09:39 AM   #3
macshark
LQ Newbie
 
Registered: Dec 2002
Posts: 18

Original Poster
Rep: Reputation: 0
i'm not trying to differentiate which socket is binded to which network card, What i would like to do is to specify that this socket A is binded to network card A, and socket B is binded to network card B.

Looking at the structure of the sockets, am i right that it can be specified in the struct sockaddr_in.in_addr ? which field in the sockets should be assigned?

thanks

kim k.c.
 
  


Reply



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
TCP Network Sockets Rakoon Red Hat 1 08-04-2005 12:36 AM
sockets blocked on local network, can't figure out why Dooberdoink Linux - Networking 5 07-07-2005 01:16 PM
2 network cards, single network, load balancing? tormentum Linux - Networking 1 02-13-2005 02:37 PM
two network cards - one for local network, one for http/vsftpd server scottster Linux - Networking 1 01-20-2005 08:52 PM
2 network cards, 2 network connections - routing problem tvojvodi Linux - Networking 4 02-24-2004 03:26 PM

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

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

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