diff --git a/src/addrcache.c b/src/addrcache.c index edeed9d..bfbac7c 100644 --- a/src/addrcache.c +++ b/src/addrcache.c @@ -26,6 +26,8 @@ #include "common.h" #include "ipxwrapper.h" +#define ADDR_CACHE_TTL 30 + struct host_table_key { addr32_t netnum; addr48_t nodenum; @@ -123,7 +125,7 @@ int addr_cache_get(SOCKADDR_STORAGE *addr, size_t *addrlen, addr32_t net, addr48 host_table_t *host = host_table_find(net, node); - if(host && time(NULL) < host->time + main_config.addr_cache_ttl) + if(host && time(NULL) < host->time + ADDR_CACHE_TTL) { memcpy(addr, &(host->addr), host->addrlen); *addrlen = host->addrlen; diff --git a/src/config.c b/src/config.c index 305ab5f..cedc617 100644 --- a/src/config.c +++ b/src/config.c @@ -31,8 +31,6 @@ main_config_t get_main_config(void) config.w95_bug = true; config.bcast_all = false; config.src_filter = true; - config.addr_cache_ttl = 30; - config.iface_ttl = 5; HKEY reg = reg_open_main(false); DWORD version = reg_get_dword(reg, "config_version", 1); diff --git a/src/config.h b/src/config.h index c4d12ca..7a53b54 100644 --- a/src/config.h +++ b/src/config.h @@ -37,9 +37,6 @@ typedef struct main_config { enum ipx_log_level log_level; - unsigned int addr_cache_ttl; - unsigned int iface_ttl; - bool single_iface; addr32_t single_netnum; addr48_t single_nodenum; diff --git a/src/ipxwrapper.h b/src/ipxwrapper.h index e0b255e..ac9de0a 100644 --- a/src/ipxwrapper.h +++ b/src/ipxwrapper.h @@ -104,7 +104,6 @@ extern struct rclient g_rclient; ipx_socket *get_socket(SOCKET fd); void lock_sockets(void); void unlock_sockets(void); -BOOL ip_is_local(uint32_t ipaddr); INT APIENTRY r_EnumProtocolsA(LPINT,LPVOID,LPDWORD); INT APIENTRY r_EnumProtocolsW(LPINT,LPVOID,LPDWORD);