select ethernet card for socket?





how can i select an specific ethernet card for a
socket, when i have multiple ethernet-cards (lan,
wireless) installed?

i have two cards, configured for two different subnets:
wireless: 192.168.50.x
lan: 2.1.1.x
and want to open a socket and broadcast to 2.1.1.x but
without touching the wireless-settings. currently, i
do:

----------------------------------------------
my $sendsocket = new IO::Socket::INET(
LocalHost => '2.1.1.1',
LocalPort => '6454',
PeerAddr => '2.255.255.255',
PeerPort => '6454',
Proto => 'udp',
Broadcast => 1
) || die "[ERROR CREATING SOCKET] $!\n";
$sendsocket->sockopt(SO_BROADCAST, 1);
----------------------------------------------

which causes the wireless-connection to collapse...
i guess i can do something with 'bind' but can't
figure out how to identify the correct card...


thanks a ton!


.



Relevant Pages

  • Re: select ethernet card for socket?
    ... socket, when i have multiple ethernet-cards (lan, ... wireless: 192.168.50.x ...
    (comp.lang.perl.misc)
  • Re: select ethernet card for socket?
    ... socket, when i have multiple ethernet-cards (lan, ... wireless: 192.168.50.x ... gateway was added, the binding sequence of the cards kicked in, ...
    (comp.lang.perl.misc)
  • Re: Home Networking
    ... although my daughter insists on a wireless network being ... phone socket and an adjacent RJ-45 socket that I can connect a CAT5 ... so I don't need a filter at each phone outlet. ...
    (uk.telecom.broadband)
  • Re: Broadband on a second PC ??
    ... I am now very confused, i hear "wireless into main socket and USB dongles ... We want to be able to add broadband on the downstairs PC ... that's why i was hoping for a wireless solution. ...
    (uk.telecom.broadband)
  • Re: Two wireless routers wired together
    ... If the socket goes to the lan port on his WRT then u got just as much access ... as if you were on his wireless. ... Plug her into the wall via a LAN port and way u go. ... Then, on my floor, I connect my wall socket to my router, a Linksys ...
    (alt.internet.wireless)