Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ gethostent_r(3) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

endhostent(3N)

gethostent(3N)

sethostent(3N)

netdb(5)

socket(5)

stdio(5)

types(5)

gethostent_r(3)                                             gethostent_r(3)

NAME
     gethostentr, sethostentr, endhostentr - thread-safe get host name

SYNOPSIS
     #include <stdio.h>
     #include <sys/types.h>
     #include <sys/socket.h>
     #include <netdb.h>

     struct hostent *gethostentr(FILE **fp);

     sethostentr(int stayopen, FILE **fp);

     endhostentr(FILE **fp);

DESCRIPTION
     gethostentr(), sethostentr(), endhostentr() work exactly as
     gethostent(), sethostent(), endhostent(). To provide thread-safety,
     gethostentr(), sethostentr(), endhostentr() expect to be passed
     additionally the address fp of a file pointer as the last argument.
     The file pointer has to be NULL when used the first time. They will
     use this argument to keep track of the current file position being
     worked with.

RETURN VALUES
     gethostentr(), sethostentr(), endhostentr() return the same values
     as gethostent(), sethostent(), endhostent().

EXAMPLES
     FILE *fp = NULL;
     struct hostent *hp;
     hp = gethostentr(&fp);

SEE ALSO
     endhostent(3N), gethostent(3N), sethostent(3N), netdb(5), socket(5),
     stdio(5), types(5).



















Page 1                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026