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: Problem (socket connect failing) with DNSServiceDiscovery API on FreeBSD4



Hi Michael,

I don't know why it's failing, but to answer your question...

I looked at the code and it is passing in (as the pathname for the AF_LOCAL family ) "/var/run/mDNSResponder"

This is about as far as I got. What's the path for?

That path is for the Unix domain socket which is created so that applications can communicate with mdnsd. Maybe you don't have permission to create the unix domain socket in that directory?


-Marc





On Jul 22, 2004, at 6:16 PM, Michael Bishop wrote:

I'm using the latest (as of two days ago) CVS Sources from Apple for mDSNResponder on FreeBSD4.

I tweaked it a little bit so it would compile on FreeBSD4 (for some reason, our compile system wasn't setting __FreeBSD_version.

Anyway, I built it and it consistently fails at connect_to_network()

it fails when calling connect() and errno is 2: ENOENT /* No such file or directory */

I looked at the code and it is passing in (as the pathname for the AF_LOCAL family ) "/var/run/mDNSResponder"

This is about as far as I got. What's the path for?

I really don't know anything about network programming, I'm just trying to use Rendezvous on a FreeBSD4 machine. Can anyone piece together these errors or help me understand what's going on?

Thanks!

_ michael


Here is the code from the heart of the routine...


int clientServerLookup( int argc, char **argv, Error *e ) {

	signal(SIGINT, HandleSIG);	// SIGINT is what you get for a Ctrl-C
	signal(SIGTERM, HandleSIG);

printf( "\nHit Control-C when you are through searching...\n\n" );

DNSServiceErrorType err = DNSServiceBrowse( &gBrowseRef, 0, 0, "_our_protocol._tcp", "local.", &ServiceBrowseReply, NULL );
if ( err != kDNSServiceErr_NoError )
{
fprintf( stderr, "DSN err = %d; errno = %d", err, errno );
}

while (gBrowseRef)
DNSServiceProcessResult( gBrowseRef );


	printf( "...done.\n" );
	return 0;
}



Here is the output....


Hit Control-C when you are through searching...

DSN err = -65537; errno = 2...done.
_______________________________________________
rendezvous mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/rendezvous
Do not post admin requests to the list. They will be ignored.
_______________________________________________
rendezvous mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/rendezvous
Do not post admin requests to the list. They will be ignored.


References: 
 >Problem (socket connect failing) with DNSServiceDiscovery API on FreeBSD4 (From: Michael Bishop <email@hidden>)



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.