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