Re: question about socket with link local addr

"Jim Busse" <[email protected]>
Newsgroups gmane.ietf.zeroconf
Message-ID <001001c357b6$0de85460$6701a8c0@upstairs>
Hi, Philip!

Thanks so much for responding.  I'd love to make sure I understand, I
apologize for being so stupid.  So please let me follow-up:

If I can go back to the original question, paraphrasing slightly, I think it
was
"I created a socket, trying to connect to a linklocal addr (169.254.80.220)
but in the socket creation, I am using  IP "10.1.1.157" to connect.
Question is how do I create a socket such that the packet I send out uses my
IP  LL addr?"

So Mark's assigned or acquired a 169.254.x.x address ("my IP LL addr") in
addition to his DHCP-assigned "10.1.1.157" address.  His question is how
does he create a socket to send out using that 169.254.x.x LinkLocal address
so he can connect to his target (169.254.80.220).

The answer is "I don't think he can do this", and without a LL aware router,
he can never interconnect his 10.1.1.x address to his 169.254.x.x address
using sockets

I think it's not a stack issue at all, it's a sockets issue.  A generic
sockets issue, not a "Mac-only" sockets issue.  And, I think all sockets
apps will fail this interconnectivity as a result.

I think it is possible to accomplish the communication, but you cannot use
sockets.

Maybe an alternative is for someone (more knowledgable than I, I tried it
and failed) to write an arp cache update program such that routes are
discovered and added to the arp cache dynamically.  It could run in the
background and just add hosts as they are found....But again, I think you
can't arp using sockets, because there's no way (that I know of) to pass a
MAC address through a socket.  (That's MAC, not Mac......)

Jim


----- Original Message -----
From: "Philip Nye" <[email protected]>
To: "Jim Busse" <[email protected]>; <[email protected]>
Sent: Thursday, July 31, 2003 9:26 AM
Subject: Re: question about socket with link local addr


> Jim,
>
> Your issue is not with the socket interface but with the behaviour of the
> stack.
>
> A stack which conforms to the current spec will know to ARP for the LL
> destination and send the packet directly to the destination even if the
> source has a routable address. If there is no response to the ARP the
packet
> will be discarded.
>
> However, since this is a draft spec which has been changing recently, it
is
> very likely that mainstream stacks such as Mac, Windows or Linux will not
> conform to these rules. To find which rules they do follow, you would have
> to investigate each stack individually. I would expect to find a wide
> variety of behaviours - remember all of these operating systems have been
> through many versions and revisions of TCP/IP stack.
>
> Philip Nye
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.