summaryrefslogtreecommitdiffstats
path: root/runtime/net.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-11-17 08:11:31 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2009-11-17 08:11:31 +0100
commit8c29f2843591376f8a1abca5f09a9740927f1000 (patch)
treee606312593700d4dda370879b3ec16cd0faf48d0 /runtime/net.h
parent4d93afabe9b10f2f60ab52b2a5134d6c37050e1b (diff)
downloadrsyslog-8c29f2843591376f8a1abca5f09a9740927f1000.tar.gz
rsyslog-8c29f2843591376f8a1abca5f09a9740927f1000.tar.xz
rsyslog-8c29f2843591376f8a1abca5f09a9740927f1000.zip
moved DNS resolution code out of imudp and into the backend processing
Most importantly, DNS resolution now never happens if the resolved name is not required. Note that this applies to imudp - for the other inputs, DNS resolution almost comes for free, so we do not do it there. However, the new method has been implemented in a generic way and as such may also be used by other modules in the future.
Diffstat (limited to 'runtime/net.h')
-rw-r--r--runtime/net.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/net.h b/runtime/net.h
index a50b6fcb..9e6fb9da 100644
--- a/runtime/net.h
+++ b/runtime/net.h
@@ -139,7 +139,7 @@ BEGINinterface(net) /* name must also be changed in ENDinterface macro! */
void (*debugListenInfo)(int fd, char *type);
int *(*create_udp_socket)(uchar *hostname, uchar *LogPort, int bIsServer);
void (*closeUDPListenSockets)(int *finet);
- int (*isAllowedSender)(uchar *pszType, struct sockaddr *pFrom, const char *pszFromHost);
+ int __attribute__((deprecated)) (*isAllowedSender)(uchar *pszType, struct sockaddr *pFrom, const char *pszFromHost);
rsRetVal (*getLocalHostname)(uchar**);
int (*should_use_so_bsdcompat)(void);
/* permitted peer handling should be replaced by something better (see comments above) */
@@ -148,11 +148,14 @@ BEGINinterface(net) /* name must also be changed in ENDinterface macro! */
rsRetVal (*PermittedPeerWildcardMatch)(permittedPeers_t *pPeer, uchar *pszNameToMatch, int *pbIsMatching);
/* v5 interface additions */
int (*CmpHost)(struct sockaddr_storage *, struct sockaddr_storage*, size_t);
+ /* v6 interface additions - 2009-11-16 */
+ rsRetVal (*HasRestrictions)(uchar *, int *bHasRestrictions);
+ int (*isAllowedSender2)(uchar *pszType, struct sockaddr *pFrom, const char *pszFromHost, int bChkDNS);
/* data members - these should go away over time... TODO */
int pACLAddHostnameOnFail; /* add hostname to acl when DNS resolving has failed */
int pACLDontResolve; /* add hostname to acl instead of resolving it to IP(s) */
ENDinterface(net)
-#define netCURR_IF_VERSION 5 /* increment whenever you change the interface structure! */
+#define netCURR_IF_VERSION 6 /* increment whenever you change the interface structure! */
/* prototypes */
PROTOTYPEObj(net);