[ksh93-integration-discuss] Re: Trouble with SCTP and |getservbyname()|/|getaddressinfo()| ...

Richard L. Hamilton rlhamil at smart.net
Sun Dec 3 21:05:41 PST 2006


given

int
main(int argc, char **argv)
{
        struct servent *s;

        s=getservbyname("bogus","sctp");
        if (s==NULL)
                fprintf(stderr,"getservbyname(\"bogus\",\"sctp\") failed\n");
        else
                print_service(s);

        s=getservbyport(9999,"sctp");
        if (s==NULL)
                fprintf(stderr,"getservbyport(9999,\"sctp\") failed\n");
        else
                print_service(s);

        return 0;
}

and an /etc/services entry like

bogus           9999/sctp

on a system:

$ /usr/bin/uname -a
SunOS paradox 5.11 snv_41 sun4u sparc SUNW,Sun-Blade-1000

I get the expected output, i.e.

bogus   9999/sctp
bogus   9999/sctp

That's with nsswitch.conf entry

services:   files nis

If I take it out of the local /etc/services file, and add the same entry to the
NIS master, it still works.

So I'm just not seeing the problem.
 
 
This message posted from opensolaris.org



More information about the ksh93-integration-discuss mailing list