|
Revision 919, 1.3 kB
(checked in by shawnw, 1 year ago)
|
1.8.3p3
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
#ifndef __IDENT_H__ |
|---|
| 10 |
#define __IDENT_H__ |
|---|
| 11 |
|
|---|
| 12 |
#include "config.h" |
|---|
| 13 |
|
|---|
| 14 |
#ifdef I_SYS_TYPES |
|---|
| 15 |
#include <sys/types.h> |
|---|
| 16 |
#endif |
|---|
| 17 |
|
|---|
| 18 |
#ifdef I_SYS_SELECT |
|---|
| 19 |
#include <sys/select.h> |
|---|
| 20 |
#endif |
|---|
| 21 |
|
|---|
| 22 |
#ifdef I_SYS_SOCKET |
|---|
| 23 |
#include <sys/socket.h> |
|---|
| 24 |
#endif |
|---|
| 25 |
|
|---|
| 26 |
#include "mysocket.h" |
|---|
| 27 |
|
|---|
| 28 |
#ifdef __cplusplus |
|---|
| 29 |
extern "C" { |
|---|
| 30 |
#endif |
|---|
| 31 |
|
|---|
| 32 |
#ifndef IDBUFSIZE |
|---|
| 33 |
#define IDBUFSIZE 2048 |
|---|
| 34 |
#endif |
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 |
|
|---|
| 39 |
#ifndef IDPORT |
|---|
| 40 |
#define IDPORT 113 |
|---|
| 41 |
#endif |
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
typedef struct { |
|---|
| 47 |
char *identifier; |
|---|
| 48 |
char *opsys; |
|---|
| 49 |
char *charset; |
|---|
| 50 |
} IDENT; |
|---|
| 51 |
|
|---|
| 52 |
|
|---|
| 53 |
|
|---|
| 54 |
extern char *ident_id(int fd, int *timeout); |
|---|
| 55 |
|
|---|
| 56 |
extern IDENT *ident_query(struct sockaddr *laddr, socklen_t llen, |
|---|
| 57 |
struct sockaddr *raddr, socklen_t rlen, |
|---|
| 58 |
int *timeout); |
|---|
| 59 |
|
|---|
| 60 |
void ident_free(IDENT * id); |
|---|
| 61 |
|
|---|
| 62 |
#ifdef __cplusplus |
|---|
| 63 |
} |
|---|
| 64 |
#endif |
|---|
| 65 |
#endif |
|---|
| 66 |
|
|---|