| 1 | /* $NetBSD: identd.h,v 1.11 2016/12/10 05:43:11 christos Exp $ */ |
| 2 | |
| 3 | /* |
| 4 | * identd.h - TCP/IP Ident protocol server. |
| 5 | * |
| 6 | * This software is in the public domain. |
| 7 | * Written by Peter Postma <peter@NetBSD.org> |
| 8 | */ |
| 9 | |
| 10 | #ifndef _IDENTD_H_ |
| 11 | #define _IDENTD_H_ |
| 12 | |
| 13 | #define satosin(sa) ((struct sockaddr_in *)(sa)) |
| 14 | #define satosin6(sa) ((struct sockaddr_in6 *)(sa)) |
| 15 | #define csatosin(sa) ((const struct sockaddr_in *)(sa)) |
| 16 | #define csatosin6(sa) ((const struct sockaddr_in6 *)(sa)) |
| 17 | #define in_hosteq(s,t) ((s).s_addr == (t).s_addr) |
| 18 | |
| 19 | void maybe_syslog(int, const char *, ...) __sysloglike(2, 3); |
| 20 | |
| 21 | #ifdef WITH_PF |
| 22 | int pf_natlookup(const struct sockaddr_storage *, struct sockaddr_storage *, |
| 23 | in_port_t *); |
| 24 | #endif |
| 25 | |
| 26 | #ifdef WITH_IPF |
| 27 | int ipf_natlookup(const struct sockaddr_storage *, struct sockaddr_storage *, |
| 28 | in_port_t *); |
| 29 | #endif |
| 30 | |
| 31 | #ifdef WITH_NPF |
| 32 | int npf_natlookup(const struct sockaddr_storage *, struct sockaddr_storage *, |
| 33 | in_port_t *); |
| 34 | #endif |
| 35 | |
| 36 | #endif /* !_IDENTD_H_ */ |
| 37 | |