Unix Technical Forum

getaddrinfo fails is syslogd is down

This is a discussion on getaddrinfo fails is syslogd is down within the AIX Operating System forums, part of the Unix Operating Systems category; --> Platform: AIX 5.1 on a P650 We have just discovered that if I call getaddrinfo() in the following manner ...


Go Back   Unix Technical Forum > Unix Operating Systems > AIX Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-05-2008, 04:35 AM
T.R.Bennett
 
Posts: n/a
Default getaddrinfo fails is syslogd is down

Platform: AIX 5.1 on a P650

We have just discovered that if I call getaddrinfo()
in the following manner when syslogd is down:
struct addrinfo *ai_list;
struct addrinfo hints;
char hostname[255] = "myhost.cnf.com";
char servname[10];
int error;

memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;

sprintf(servname, "%d", 10003);
error = getaddrinfo(hostname, servname, &hints, &ai_list);

That it will fail with a return code of 11 and errno set to 9.
return code of 11 means "system error returned in errno" and
errno of 9 is EBADF.

If syslogd is NOT down making the above call will result in
the following syslog message:
syslog: The user option is different from the address family passed into the API.

Note: the /etc/netsvc.conf file contains the following:
hosts = local=auth, bind4

Does anyone know why we get the syslog message
or why the call fails when syslogd is down ???

Thanks,
-tony
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:04 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com