180 lines
4.6 KiB
C
180 lines
4.6 KiB
C
/***************************************************************************
|
|
*
|
|
* File Name: ./hprrm/rpcnetdb.h
|
|
*
|
|
* Copyright (C) 1993-1996 Hewlett-Packard Company.
|
|
* All rights reserved.
|
|
*
|
|
* 11311 Chinden Blvd.
|
|
* Boise, Idaho 83714
|
|
*
|
|
* This is a part of the HP JetAdmin Printer Utility
|
|
*
|
|
* This source code is only intended as a supplement for support and
|
|
* localization of HP JetAdmin by 3rd party Operating System vendors.
|
|
* Modification of source code cannot be made without the express written
|
|
* consent of Hewlett-Packard.
|
|
*
|
|
*
|
|
* Description:
|
|
*
|
|
* Author: Name
|
|
*
|
|
*
|
|
* Modification history:
|
|
*
|
|
* date initials change description
|
|
*
|
|
* mm-dd-yy MJB
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
*
|
|
***************************************************************************/
|
|
|
|
#ifndef _RPC_NETDB_INC
|
|
#define _RPC_NETDB_INC
|
|
|
|
#include "nfsdefs.h"
|
|
|
|
#ifndef PRINTER
|
|
|
|
#ifdef HPUX_NFS2CLIENT
|
|
#include <netdb.h>
|
|
#else /* not HPUX_NFS2CLIENT */
|
|
|
|
/*
|
|
* .unsupp/sys/_ became sxu
|
|
* machine/ became sxm
|
|
* sys/ became sx
|
|
* arpa/ became sx
|
|
* netinet/ became sx
|
|
* net/ became sx
|
|
* rpc/ became
|
|
* auth_ became aut
|
|
* auth became aut
|
|
* clnt_ became clnt
|
|
* nfsv3_ became nfs
|
|
* nfsv3 became nfs
|
|
* getrpc became gr
|
|
* pmap_ became pmap
|
|
* rpc_ became rpc
|
|
* svc_ became svc
|
|
* unix_ became ux
|
|
* unix became ux
|
|
* xdr_ became xdr
|
|
* reference became rf
|
|
* commondata became cd
|
|
* tablesize became tsz
|
|
* get_myaddress became gmyad
|
|
* bindresvport became brvp
|
|
* generic became gnc
|
|
* getmaps became map
|
|
* getport became port
|
|
* _prot became pro
|
|
* prot became pro
|
|
* simple became simp
|
|
* callmsg became call
|
|
* error became err
|
|
* stdsyms became syms
|
|
* socket became sock
|
|
* sysmacros became macs
|
|
* if_arp became ifarp
|
|
* errno became ern
|
|
* ioctl became ioct
|
|
* signal became sig
|
|
* param became parm
|
|
* types became typs
|
|
*/
|
|
/* @(#)netdb.h 2.1 88/07/29 3.9 RPCSRC */
|
|
/*
|
|
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
|
|
* unrestricted use provided that this legend is included on all tape
|
|
* media and as a part of the software program in whole or part. Users
|
|
* may copy or modify Sun RPC without charge, but are not authorized
|
|
* to license or distribute it to anyone else except as part of a product or
|
|
* program developed by the user.
|
|
*
|
|
* SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
|
|
* WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
|
|
* PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
|
|
*
|
|
* Sun RPC is provided with no support and without any obligation on the
|
|
* part of Sun Microsystems, Inc. to assist in its use, correction,
|
|
* modification or enhancement.
|
|
*
|
|
* SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
|
|
* INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
|
|
* OR ANY PART THEREOF.
|
|
*
|
|
* In no event will Sun Microsystems, Inc. be liable for any lost revenue
|
|
* or profits or other special, indirect and consequential damages, even if
|
|
* Sun has been advised of the possibility of such damages.
|
|
*
|
|
* Sun Microsystems, Inc.
|
|
* 2550 Garcia Avenue
|
|
* Mountain View, California 94043
|
|
*/
|
|
/* @(#)rpc.h 1.8 87/07/24 SMI */
|
|
|
|
/* Really belongs in "netdb.h" */
|
|
|
|
/*
|
|
* 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).
|
|
*/
|
|
|
|
|
|
#ifndef USING_WINSOCKETS
|
|
|
|
|
|
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_list; /* list of addresses from name server */
|
|
#define h_addr h_addr_list[0] /* address, for backward compatiblity */
|
|
};
|
|
|
|
struct protoent {
|
|
char *p_name; /* official protocol name */
|
|
char **p_aliases; /* alias list */
|
|
int p_proto; /* protocol # */
|
|
};
|
|
|
|
|
|
|
|
/*
|
|
* Error return codes from gethostbyname() and gethostbyaddr()
|
|
* (left in extern int h_errno).
|
|
*/
|
|
|
|
#define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */
|
|
#define TRY_AGAIN 2 /* Non-Authoritive Host not found, or SERVERFAIL */
|
|
#define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */
|
|
#define NO_DATA 4 /* Valid name, no data record of requested type */
|
|
#define NO_ADDRESS NO_DATA /* no address, look for MX record */
|
|
|
|
|
|
#endif /* not USING_WINSOCKETS */
|
|
|
|
|
|
struct rpcent {
|
|
char *r_name; /* name of server for this rpc program */
|
|
char **r_aliases; /* alias list */
|
|
int r_number; /* rpc program number */
|
|
};
|
|
|
|
|
|
#endif /* not HPUX_NFS2CLIENT */
|
|
#endif /* not PRINTER */
|
|
|
|
#endif
|
|
|