Re: Networks and wireless etc



Alun Jones [MSFT] wrote:
> "Eugene Gershnik" <gershnik@xxxxxxxxxxx> wrote in message
> news:etrta3CeFHA.2688@xxxxxxxxxxxxxxxxxxxxxxx
>> Simon Jefferies wrote:
>>> Hello,
>>>
>>> Please can you tell me if I'm doing this right or not?
>>>
>>> I'm trying to get winsock to use the relevant network adapter to
>>> connect to an IP address. I have enumerated the list of devices and
>>> have e.g. network card, wireless network and loopback (using the
>>> GetAdaptersAddresses() WIN32 function). Do I simply use the SOCKADDR
>>> structure?
>>
>> bind() to a sepcific local address before connecting.
>
> Binding will not directly affect which NIC is chosen to route outgoing
> traffic.
>
> Changing the information in the routing table will do that. Binding
> is only an association between an IP network interface and a socket;
> while that IP network interface is associated with a NIC, the NIC
> that is chosen to send a packet out on depends on the _destination_
> of that packet.

So what interface is SYN-ACK going to come from? That is are you saying that
I can bind to 127.0.0.1 and have packets delivered to me that arrived on
192.168.2.1? The way I see it you need *both* to bind correctly and have a
workable routing table.


--
Eugene
http://www.gershnik.com




.



Relevant Pages

  • Re: Networks and wireless etc
    ... >> I'm trying to get winsock to use the relevant network adapter to ... an association between an IP network interface and a socket; ... packet out on depends on the _destination_ of that packet. ... packets for various network destinations. ...
    (microsoft.public.win32.programmer.networks)
  • problem with tun
    ... I used tcpdump to watch the network interface. ... Similarly no packet is seen on "tun0". ...
    (comp.os.linux.networking)
  • Tools for show %age network interface utilisation.
    ... I'm looking either for a tool or 'knowledge' regarding the network ... utilisation of a network interface. ... To give packet counts per second, but was wondering if there was an ... easier way of seeing interface utilisation. ...
    (comp.sys.sun.admin)
  • alt.2600 FAQ Revision .014 (2/4)
    ... One type of firewall is the packet filtering firewall. ... Dropping packets instead of rejecting them greatly increases the time required to scan your network. ... Port scanning UDP ports is much slower than port scanning TCP ports. ... Chartreuse Use the electricity from your phone line Cheese Connect two phones to create a diverter Chrome Manipulate Traffic Signals by Remote Control ...
    (alt.2600)
  • RE: Freebsd Theme Song
    ... from the network into the ethernet receiver. ... It takes a certain amount of time to get the packet out of ... At low data rates polling is less ... >Subject: Re: Freebsd Theme Song ...
    (freebsd-questions)

Loading