
******************************************************

            PROPRIETARY PROGRAM MATERIAL

THIS MATERIAL IS PROPRIETARY TO UNISYS CORPORATION
AND IS NOT TO BE REPRODUCED, USED OR DISCLOSED EXCEPT 
IN ACCORDANCE WITH PROGRAM LICENSE OR UPON WRITTEN
AUTHORIZATION OF UNISYS CORPORATION.

COPYRIGHT  (C)  1991 Unisys CORPORATION


      @()netdb.h 1.2 861007 SMI; from UCB  

******************************************************

*
 * Structures returned by network
 * data base library.  All addresses
 * are supplied in host order, and
 * returned in network order (suitable
 * for use in system calls).
 *

struct  hostent {
        char    *h_name;        * official name of host *
        char    **h_aliases;    * alias list *
        int     h_addrtype;     * host address type *
        int     h_length;       * length of address *
        char    *h_addr;        * address *
};
 
*
 * Assumption here is that a network number
 * fits in 32 bits  probably a poor one.
 *
struct  netent {
        char    *n_name;        * official name of net *
        char    **n_aliases;    * alias list *
        int     n_addrtype;     * net address type *
        int     n_net;          * network  *
};
 
struct  servent {
        char    *s_name;        * official service name *
        char    **s_aliases;    * alias list *
        int     s_port;         * port  *
        char    *s_proto;       * protocol to use *
};
 
struct  protoent {
        char    *p_name;        * official protocol name *
        char    **p_aliases;    * alias list *
        int     p_proto;        * protocol  *
};
 
struct rpcent {
        char    *r_name;        * name of server for this rpc program *
        char    **r_aliases;    * alias list *
        int     r_number;       * rpc program number *
};


define MAXHOSTLISTLEN 20

struct hostlist {
		int		total;					* total number of hosts on the list *
		char	*host[MAXHOSTLISTLEN]; 	* array of pointers to host names   *
};


int 			 gethostlist	  plm far (int *offset, char *outbuf, int element);
int 			 gethostname      plm far (char *n, int sz);


void             sethostent       plm far ();
void             endhostent       plm far ();
ifdef CS
struct hostent  *_gethostbyname   (char *name), 
                *_gethostbyaddr   (char *, int, int), 
else
struct hostent  *gethostbyname    plm far (char *name), 
                *gethostbyaddr    plm far (char *, int, int), 
endif
                *gethostent       plm far ();

void             setnetent        plm far ();
void             endnetent        plm far ();
struct netent   *getnetbyname     plm far (char *name), 
                *getnetbyaddr     plm far (), 
                *getnetent        plm far ();

void             setservent       plm far ();
void             endservent       plm far ();
struct servent  *getservbyname    plm far (char *name), 
                *getservbyport    plm far (), 
                *getservent       plm far ();

void             setprotoent      plm far ();
void             endprotoent      plm far ();
struct protoent *getprotobyname   plm far (char *name), 
                *getprotobynumber plm far (), 
                *getprotoent      plm far ();

void             setrpcent        plm far ();
void             endrpcent        plm far ();
struct rpcent   *getrpcbyname     plm far (char *name), 
                *getrpcbynumber   plm far (), 
                *getrpcent        plm far ();
