summaryrefslogtreecommitdiff
path: root/ot_accesslist.c
diff options
context:
space:
mode:
Diffstat (limited to 'ot_accesslist.c')
-rw-r--r--ot_accesslist.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/ot_accesslist.c b/ot_accesslist.c
index df084b8..945ddcf 100644
--- a/ot_accesslist.c
+++ b/ot_accesslist.c
@@ -503,34 +503,6 @@ void *accesslist_get_value_for_net(const ot_ip6 address, const ot_vector *vector
503 return (void *)net; 503 return (void *)net;
504} 504}
505 505
506#ifdef WANT_FULLLOG_NETWORKS
507static ot_vector g_lognets_list;
508ot_log *g_logchain_first, *g_logchain_last;
509static pthread_mutex_t g_lognets_list_mutex = PTHREAD_MUTEX_INITIALIZER;
510
511void loglist_add_network(const ot_net *net) {
512 pthread_mutex_lock(&g_lognets_list_mutex);
513 accesslist_set_value_for_net(net, &g_lognets_list, NULL, sizeof(ot_net));
514 pthread_mutex_unlock(&g_lognets_list_mutex);
515}
516
517void loglist_reset(void) {
518 pthread_mutex_lock(&g_lognets_list_mutex);
519 free(g_lognets_list.data);
520 g_lognets_list.data = 0;
521 g_lognets_list.size = g_lognets_list.space = 0;
522 pthread_mutex_unlock(&g_lognets_list_mutex);
523}
524
525int loglist_check_address(const ot_ip6 address) {
526 int result;
527 pthread_mutex_lock(&g_lognets_list_mutex);
528 result = (NULL != accesslist_get_value_for_net(address, &g_lognets_list, sizeof(ot_net)));
529 pthread_mutex_unlock(&g_lognets_list_mutex);
530 return result;
531}
532#endif
533
534#ifdef WANT_IP_FROM_PROXY 506#ifdef WANT_IP_FROM_PROXY
535typedef struct { 507typedef struct {
536 ot_net *proxy; 508 ot_net *proxy;