Date: Mon, 9 Aug 1999 23:01:36 -0700 (PDT) From: Joe Groff <ognir@humboldt1.com> To: Wes Peters <wes@softweyr.com> Cc: ognir@humboldt1.com, dan@trinsec.com, hackers@FreeBSD.ORG Subject: Re: gethostbyaddr() and threads. Message-ID: <Pine.BSF.3.96.990809225950.353A-100000@shovel.groff> In-Reply-To: <37AFBBEC.7E078E26@softweyr.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 9 Aug 1999, Wes Peters wrote: > Here are the prototypes. Hosts: > > #include <sys/types.h> > #include <sys/socket.h> > #include <netinet/in.h> > #include <arpa/inet.h> > #include <netdb.h> > > struct hostent *gethostbyname_r(const char *name, > struct hostent *result, char *buffer, int buflen, > int *h_errnop); > > struct hostent *gethostbyaddr_r(const char *addr, > int length, int type, struct hostent *result, > char *buffer, int buflen, int *h_errnop); > > struct hostent *gethostent_r(struct hostent *result, > char *buffer, int buflen, int *h_errnop); > > Nets: > > #include <netdb.h> > > struct netent *getnetbyname_r(const char *name, > struct netent *result, char *buffer, int buflen); > > struct netent *getnetbyaddr_r(long net, int type, > struct netent *result, char *buffer, int buflen); > > struct netent *getnetent_r(struct netent *result, > char *buffer, int buflen); > > Protocols: > > #include <netdb.h> > > struct protoent *getprotobyname_r(const char *name, > struct protoent *result, char *buffer, int buflen); > > struct protoent *getprotobynumber_r(int proto, > struct protoent *result, char *buffer, int buflen); > > struct protoent *getprotoent_r(struct protoent *result, > char *buffer, int buflen); > > Services: > > #include <netdb.h> > > struct servent *getservbyname_r(const char *name, > const char *proto, struct servent *result, > char *buffer, int buflen); > > struct servent *getservbyport_r(int port, const char *proto, > struct servent *result, char *buffer, int buflen); > > struct servent *getservent_r(struct servent *result, > char *buffer, int buflen); > > RPC services: > > #include <rpc/rpcent.h> > > struct rpcent *getrpcbyname_r(const char * name, > struct rpcent *result, char *buffer, int buflen); > > struct rpcent *getrpcbynumber_r(const int number, > struct rpcent *result, char *buffer, int buflen); > > struct rpcent *getrpcent_r(struct rpcent *result, > char *buffer, int buflen); > > Any questions? Looks pretty close to the POSIX/GNU way. Good luck with it. -Joe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.990809225950.353A-100000>