smbnetfs  0.6.3
About: SMBNetFS is a Linux/FreeBSD filesystem that allow you to use samba/microsoft network in the same manner as the network neighborhood in Microsoft Windows.
  Fossies Dox: smbnetfs-0.6.3.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

neg_cache.c File Reference
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <pthread.h>
#include "common.h"
#include "list.h"
#include "neg_cache.h"
Include dependency graph for neg_cache.c:

Go to the source code of this file.

Data Structures

struct  neg_cache
 

Functions

static void neg_cache_remove_outdate_tv (struct timeval *tv)
 
static struct neg_cacheneg_cache_find_by_name (const char *name, size_t len)
 
static void neg_cache_remove_outdate (void)
 
int neg_cache_set_timeout (int timeout)
 
int neg_cache_enable (int status)
 
int neg_cache_check (const char *url)
 
int neg_cache_store (const char *url, int errno_value)
 
void neg_cache_flush (void)
 

Variables

static int neg_cache_timeout = 3000
 
static int neg_cache_enabled = 1
 
static LIST neg_cache_usage_list = { &( neg_cache_usage_list ), &( neg_cache_usage_list ) }
 
static LIST neg_cache_time_list = { &( neg_cache_time_list ), &( neg_cache_time_list ) }
 
static pthread_mutex_t m_neg_cache = PTHREAD_MUTEX_INITIALIZER
 

Function Documentation

◆ neg_cache_check()

◆ neg_cache_enable()

int neg_cache_enable ( int  status)

Definition at line 80 of file neg_cache.c.

References DPRINTF, m_neg_cache, neg_cache_enabled, and neg_cache_flush().

Referenced by reconfigure_analyse_simple_option().

◆ neg_cache_find_by_name()

static struct neg_cache* neg_cache_find_by_name ( const char *  name,
size_t  len 
)
static

◆ neg_cache_flush()

◆ neg_cache_remove_outdate()

static void neg_cache_remove_outdate ( void  )
inlinestatic

Definition at line 63 of file neg_cache.c.

References neg_cache_remove_outdate_tv().

Referenced by neg_cache_check(), and neg_cache_set_timeout().

◆ neg_cache_remove_outdate_tv()

static void neg_cache_remove_outdate_tv ( struct timeval *  tv)
static

◆ neg_cache_set_timeout()

int neg_cache_set_timeout ( int  timeout)

◆ neg_cache_store()

Variable Documentation

◆ m_neg_cache

pthread_mutex_t m_neg_cache = PTHREAD_MUTEX_INITIALIZER
static

◆ neg_cache_enabled

int neg_cache_enabled = 1
static

Definition at line 20 of file neg_cache.c.

Referenced by neg_cache_check(), neg_cache_enable(), and neg_cache_store().

◆ neg_cache_time_list

LIST neg_cache_time_list = { &( neg_cache_time_list ), &( neg_cache_time_list ) }
static

Definition at line 23 of file neg_cache.c.

Referenced by neg_cache_flush(), neg_cache_remove_outdate_tv(), and neg_cache_store().

◆ neg_cache_timeout

int neg_cache_timeout = 3000
static

Definition at line 19 of file neg_cache.c.

Referenced by neg_cache_remove_outdate_tv(), and neg_cache_set_timeout().

◆ neg_cache_usage_list

LIST neg_cache_usage_list = { &( neg_cache_usage_list ), &( neg_cache_usage_list ) }
static