Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: darwin-development digest, Vol 3 #127 - 13 msgs



On 7-03-2002 14:37, "email@hidden"
>
> Message: 2
> From: Luke Howard <email@hidden>
> Organization: PADL Software Pty Ltd
> To: email@hidden
> Subject: Re: Lookupd
> Cc: email@hidden, email@hidden
> Reply-To: email@hidden
> Date: Thu, 7 Mar 2002 18:11:33 +1100
>
>> Most every application I use appears to use that mechanism... And
>> My syslog files seem to bear this out...
>
> That's because gethostbyname() talks to lookupd (over Mach IPC).
>
>> My impression was that gethostbyname would be the same as
>> lookupd -d
>>> getHostWithName: ?
>
> s/getHostWithName:/hostWithName:/

Oops sorry..

>
>> Otherwise can you turn it off? It appears to have default settings
>> built-in...
>
> DNSAgent is in the default lookup order.
>
>> My impression from using tcpdump and viewing the source code is that it
>> seems to be sending out 3 queries in order to make one lookup. It seems to
>
> I don't know about this problem; if you think you've found a bug,
> I suggest you file a bug report.
>

I9ve tried that ... And, honestly one could make a career out of testing
this thing and documenting all of its problems. But, I guess you know how I
feel about that already, so, to be concise and brief: in the particular
case, with this particular code... And given your corroboration
(gethostbyname()) above...

Getting off the soapbox back to the relevant... sigh, I would hesitate to
refer to this as a 3bug2. It seems to be a 3feature2. Apparently code was
added to the DNS section to provide functionality which does not seem to be
reflected anywhere else (including libinfo-89). It seems to make it
incompatible with the 3outside world2. It does not seem to 3play well2 with
outside network services and providers. Perhaps it is something required by
some server based product.. ?

>> Why does it seem so tightly coupled to dhcp? (XID?)
>
> Huh? I don't see what that has to do with DHCP. I can't find any
> references to DHCP in the NetInfo framework or lookupd source.
>

The error message I keep getting, semi-continuously is :
(besides the ubiquitous fairly continous timeout )

Mar 7 16:29:33 telaro lookupd[254]: DNSAgent: dns_read_reply - wrong XID in
reply (expected 31693 got 53916)

THE ONLY reference I could find to 3XID2 is in the DHCP documentation. No
where is it ever referred to in any DNS documentation I have looked at...

I really don9t understand why it is even needed...


To whit, from the source:

/* Check for wrong xid in reply */
^^^^^^^^^^^^^^^^^^
prxid = (u_int16_t *)*r;
rxid = ntohs(*prxid);

if ((qxid != 0) && (rxid != qxid))
{
free(*r);
dns_log_msg(dns, LOG_NOTICE,
"dns_read_reply - wrong XID in reply (expected %hu
got %
hu)",
qxid, rxid);
return DNS_STATUS_WRONG_XID;
}

/* Check for wrong question in reply */
if ((qname != NULL) && (dns_dname_cmp((*r) + DNS_HEADER_SIZE,
qname)))
{
free(*r);
dns_log_msg(dns, LOG_ERR, "dns_read_reply - bad query");
return DNS_STATUS_WRONG_QUESTION;
}



>> On the original theme: I did not see any indication that the libraries
>> Of netinfo-89 were used anywhere in lookupd... Or netinfo-234 ...
>
> I assume you mean libinfo-89. Libinfo is part of the C library
> (aka System framework). It does not need to be imported explicitly.

Okay. I still do not see where any of that code (libinfo-89) gets used when
lookupd seems primarily responsible for any and all 3lookups2... But it does
seem like it may provide a way to avoid lookupd and to 3do your own thing2
within your application..

THANKS again! It is appreciated!

-- pwb

>
> cheers,
>
> -- Luke
>
> --
> Luke Howard | lukehoward.com
> PADL Software | www.padl.com
>
> --__--__--
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.