File indexing completed on 2025-01-18 10:13:02
0001 #ifndef _NETCONFIG_H_
0002 #define _NETCONFIG_H_
0003
0004 #ifdef HAVE_FEATURES_H
0005 #include <features.h>
0006 #endif
0007
0008 #define NETCONFIG "/etc/netconfig"
0009 #define NETPATH "NETPATH"
0010
0011 struct netconfig {
0012 char *nc_netid;
0013 unsigned long nc_semantics;
0014 unsigned long nc_flag;
0015 char *nc_protofmly;
0016 char *nc_proto;
0017 char *nc_device;
0018 unsigned long nc_nlookups;
0019 char **nc_lookups;
0020 unsigned long nc_unused[9];
0021 };
0022
0023 typedef struct {
0024 struct netconfig **nc_head;
0025 struct netconfig **nc_curr;
0026 } NCONF_HANDLE;
0027
0028
0029
0030
0031 #define NC_TPI_CLTS 1
0032 #define NC_TPI_COTS 2
0033 #define NC_TPI_COTS_ORD 3
0034 #define NC_TPI_RAW 4
0035
0036
0037
0038
0039 #define NC_NOFLAG 0x00
0040 #define NC_VISIBLE 0x01
0041 #define NC_BROADCAST 0x02
0042
0043
0044
0045
0046 #define NC_NOPROTOFMLY "-"
0047 #define NC_LOOPBACK "loopback"
0048 #define NC_INET "inet"
0049 #define NC_INET6 "inet6"
0050 #define NC_IMPLINK "implink"
0051 #define NC_PUP "pup"
0052 #define NC_CHAOS "chaos"
0053 #define NC_NS "ns"
0054 #define NC_NBS "nbs"
0055 #define NC_ECMA "ecma"
0056 #define NC_DATAKIT "datakit"
0057 #define NC_CCITT "ccitt"
0058 #define NC_SNA "sna"
0059 #define NC_DECNET "decnet"
0060 #define NC_DLI "dli"
0061 #define NC_LAT "lat"
0062 #define NC_HYLINK "hylink"
0063 #define NC_APPLETALK "appletalk"
0064 #define NC_NIT "nit"
0065 #define NC_IEEE802 "ieee802"
0066 #define NC_OSI "osi"
0067 #define NC_X25 "x25"
0068 #define NC_OSINET "osinet"
0069 #define NC_GOSIP "gosip"
0070
0071
0072
0073
0074 #define NC_NOPROTO "-"
0075 #define NC_TCP "tcp"
0076 #define NC_UDP "udp"
0077 #define NC_ICMP "icmp"
0078
0079 #ifdef __cplusplus
0080 extern "C" {
0081 #endif
0082
0083 extern void *setnetconfig (void);
0084 extern struct netconfig *getnetconfig (void *);
0085 extern struct netconfig *getnetconfigent (const char *);
0086 extern void freenetconfigent (struct netconfig *);
0087 extern int endnetconfig (void *);
0088
0089 extern void *setnetpath (void);
0090 extern struct netconfig *getnetpath (void *);
0091 extern int endnetpath (void *);
0092
0093 extern void nc_perror (const char *);
0094 extern char *nc_sperror (void);
0095
0096 #ifdef __cplusplus
0097 }
0098 #endif
0099
0100 #endif