/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* onc720 src/oncplus/usr/include/tirpc/netconfig.h 1.2.1.2               */
/*                                                                        */
/* Licensed Materials - Property of IBM                                   */
/*                                                                        */
/* COPYRIGHT International Business Machines Corp. 1996,2012              */
/* All Rights Reserved                                                    */
/*                                                                        */
/* US Government Users Restricted Rights - Use, duplication or            */
/* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.      */
/*                                                                        */
/* IBM_PROLOG_END_TAG                                                     */
/*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
/*	  All Rights Reserved  	*/

/*	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T	*/
/*	The copyright notice above does not evidence any   	*/
/*	actual or intended publication of such source code.	*/

#ifndef	_SYS_NETCONFIG_H
#define	_SYS_NETCONFIG_H

/*** #pragma ident	"@(#)netconfig.h	1.13	95/02/24 SMI" ***/	/* SVr4.0 1.4 */

#ifdef	__cplusplus
extern "C" {
#endif

#define	NETCONFIG "/etc/netconfig"
#define	NETPATH   "NETPATH"

struct  netconfig {
	char		*nc_netid;	/* network identifier		*/
	unsigned long	nc_semantics;	/* defined below		*/
	unsigned long	nc_flag;	/* defined below		*/
	char		*nc_protofmly;	/* protocol family name		*/
	char		*nc_proto;	/* protocol name		*/
	char		*nc_device;	/* device name for network id	*/
	unsigned long	nc_nlookups;	/* # of entries in nc_lookups	*/
	char		**nc_lookups;	/* list of lookup directories	*/
	unsigned long	nc_unused[8];
};

typedef struct {
	struct netconfig **nc_head;
	struct netconfig **nc_curr;
} NCONF_HANDLE;

/*
 *	Values of nc_semantics
 */

#define	NC_TPI_CLTS	1
#define	NC_TPI_COTS	2
#define	NC_TPI_COTS_ORD	3
#define	NC_TPI_RAW	4

/*
 *	Values of nc_flag
 */

#define	NC_NOFLAG	00
#define	NC_VISIBLE	01
#define	NC_BROADCAST	02

/*
 *	Values of nc_protofmly
 */

#define	NC_NOPROTOFMLY	"-"
#define	NC_LOOPBACK	"loopback"
#define	NC_INET		"inet"
#define NC_INET6        "inet6"
#define	NC_IMPLINK	"implink"
#define	NC_PUP		"pup"
#define	NC_CHAOS	"chaos"
#define	NC_NS		"ns"
#define	NC_NBS		"nbs"
#define	NC_ECMA		"ecma"
#define	NC_DATAKIT	"datakit"
#define	NC_CCITT	"ccitt"
#define	NC_SNA		"sna"
#define	NC_DECNET	"decnet"
#define	NC_DLI		"dli"
#define	NC_LAT		"lat"
#define	NC_HYLINK	"hylink"
#define	NC_APPLETALK	"appletalk"
#define	NC_NIT		"nit"
#define	NC_IEEE802	"ieee802"
#define	NC_OSI		"osi"
#define	NC_X25		"x25"
#define	NC_OSINET	"osinet"
#define	NC_GOSIP	"gosip"

/*
 *	Values for nc_proto
 */

#define	NC_NOPROTO	"-"
#define	NC_TCP		"tcp"
#define	NC_UDP		"udp"
#define	NC_ICMP		"icmp"

/*
 *      Values for nc_netid
 */
#define NC_TCP6		"tcp6"
#define NC_UDP6		"udp6"
#define NC_LOOPBACK6	"loopback6"

#if defined(__STDC__)

extern int		ip_exists(uchar_t, int);
extern void		*setnetconfig(void);
extern int		endnetconfig(void *);
extern struct netconfig	*getnetconfig(void *);
extern struct netconfig	*getnetconfig2(void *);
extern struct netconfig	*getnetconfigent(char *);
extern struct netconfig	*getnetconfigent2(char *);
extern void		freenetconfigent(struct netconfig *);
extern void		*setnetpath(void);
extern int		endnetpath(void *);
extern struct netconfig *getnetpath(void *);
extern struct netconfig *getnetpath2(void *);

#else	/* __STDC__ */

extern int		ip_exists();
extern void		*setnetconfig();
extern int		endnetconfig();
extern struct netconfig	*getnetconfig();
extern struct netconfig *getnetconfig2();
extern struct netconfig	*getnetconfigent();
extern struct netconfig	*getnetconfigent2();
extern void		freenetconfigent();
extern void		*setnetpath();
extern int		endnetpath();
extern struct netconfig *getnetpath();
extern struct netconfig *getnetpath2();

#endif	/* __STDC__ */

#ifdef	__cplusplus
}
#endif

#endif	/* _SYS_NETCONFIG_H */
