added files
[bcm963xx.git] / userapps / opensource / net-snmp / apps / snmpnetstat / winstub.h
1
2 #ifndef _WINSTUB_H_
3 #define _WINSTUB_H_
4
5 #if (defined(WIN32) || defined(cygwin))
6
7 /*
8  * database access functions for host, services, protocols, networks 
9  */
10
11 /*
12  * sets can open. ends must close. 
13  */
14 void            sethostent(int stay_open);
15 void            setservent(int stay_open);
16 void            setprotoent(int stay_open);
17 void            setnetent(int stay_open);
18 void            endhostent(void);
19 void            endservent(void);
20 void            endprotoent(void);
21 void            endnetent(void);
22
23 /*
24  * get next entry from data base file, or from NIS if possible. 
25  */
26 /*
27  * returns 0 if there are no more entries to read. 
28  */
29 struct hostent *gethostent(void);
30 struct servent *getservent(void);
31 struct protoent *getprotoent(void);
32 struct netent  *getnetent(void);
33
34 struct netent  *getnetbyaddr(long net, int type);
35
36 /*
37  * Return the network number from an internet address 
38  */
39 u_long          inet_netof(struct in_addr in);
40
41 /*
42  * Return the host number from an internet address 
43  */
44 u_long          inet_lnaof(struct in_addr in);
45
46 #endif                          /* WIN32 or cygwin */
47
48 #endif /*_WINSTUB_H_ */