Riferimenti per il file s_conf.c

#include "stdinc.h"
#include "ircd_defs.h"
#include "tools.h"
#include "s_conf.h"
#include "s_serv.h"
#include "resv.h"
#include "s_stats.h"
#include "channel.h"
#include "client.h"
#include "common.h"
#include "event.h"
#include "hash.h"
#include "hook.h"
#include "irc_string.h"
#include "sprintf_irc.h"
#include "s_bsd.h"
#include "irc_getnameinfo.h"
#include "irc_getaddrinfo.h"
#include "ircd.h"
#include "list.h"
#include "listener.h"
#include "hostmask.h"
#include "modules.h"
#include "numeric.h"
#include "fdlist.h"
#include "s_log.h"
#include "send.h"
#include "s_gline.h"
#include "fileio.h"
#include "memory.h"
#include "irc_res.h"
#include "userhost.h"
#include "s_user.h"
#include "channel_mode.h"

Vai al codice sorgente di questo file.

Strutture dati

struct  ip_entry
struct  oper_privs

Definizioni

#define IP_HASH_SIZE   0x1000
#define BAD_PING   (-1)

Funzioni

int yyparse ()
static void lookup_confhost (struct ConfItem *)
static void set_default_conf (void)
static void validate_conf (void)
static void read_conf (FBFILE *)
static void clear_out_old_conf (void)
static void flush_deleted_I_P (void)
static void expire_tklines (dlink_list *)
static void garbage_collect_ip_entries (void)
static int hash_ip (struct irc_ssaddr *)
static int verify_access (struct Client *, const char *)
static int attach_iline (struct Client *, struct ConfItem *)
static struct ip_entryfind_or_add_ip (struct irc_ssaddr *)
static void parse_conf_file (int, int)
static dlink_listmap_to_list (ConfType)
static struct AccessItemfind_regexp_kline (const char *[])
static int find_user_host (struct Client *, char *, char *, char *, unsigned int)
static int cidr_limit_reached (int, struct irc_ssaddr *, struct ClassItem *)
static void remove_from_cidr_check (struct irc_ssaddr *, struct ClassItem *)
static void destroy_cidr_class (struct ClassItem *)
static void flags_to_ascii (unsigned int, const unsigned int[], char *, int)
void * map_to_conf (struct ConfItem *aconf)
struct ConfItemunmap_conf_item (void *aconf)
static void conf_dns_callback (void *vptr, struct DNSReply *reply)
static void conf_dns_lookup (struct AccessItem *aconf)
struct ConfItemmake_conf_item (ConfType type)
void delete_conf_item (struct ConfItem *conf)
void free_access_item (struct AccessItem *aconf)
void report_confitem_types (struct Client *source_p, ConfType type, int temp)
static void * check_client (va_list args)
void init_ip_hash_table (void)
void remove_one_ip (struct irc_ssaddr *ip_in)
void count_ip_hash (int *number_ips_stored, unsigned long *mem_ips_stored)
int detach_conf (struct Client *client_p, ConfType type)
int attach_conf (struct Client *client_p, struct ConfItem *conf)
int attach_connect_block (struct Client *client_p, const char *name, const char *host)
struct ConfItemfind_conf_exact (ConfType type, const char *name, const char *user, const char *host)
struct ConfItemfind_conf_name (dlink_list *list, const char *name, ConfType type)
struct ConfItemfind_matching_name_conf (ConfType type, const char *name, const char *user, const char *host, int action)
struct ConfItemfind_exact_name_conf (ConfType type, const char *name, const char *user, const char *host)
int rehash (int sig)
int conf_connect_allowed (struct irc_ssaddr *addr, int aftype)
struct AccessItemfind_kill (struct Client *client_p)
struct AccessItemfind_gline (struct Client *client_p)
void add_temp_line (struct ConfItem *conf)
void cleanup_tklines (void *notused)
char * oper_privs_as_string (const unsigned int port)
char * get_oper_name (const struct Client *client_p)
void read_conf_files (int cold)
const char * get_conf_name (ConfType type)
static int get_conf_ping (struct ConfItem *conf, int *pingwarn)
const char * get_client_class (struct Client *target_p)
int get_client_ping (struct Client *target_p, int *pingwarn)
struct ConfItemfind_class (const char *classname)
void check_class (void)
void init_class (void)
unsigned long get_sendq (struct Client *client_p)
void conf_add_class_to_conf (struct ConfItem *conf, const char *class_name)
int conf_add_server (struct ConfItem *conf, const char *class_name)
void conf_add_d_conf (struct AccessItem *aconf)
void yyerror (const char *msg)
int conf_fbgets (char *lbuf, unsigned int max_size, FBFILE *fb)
int conf_yy_fatal_error (const char *msg)
time_t valid_tkline (char *p, int minutes)
int valid_wild_card (struct Client *source_p, int warn, int count,...)
int parse_aline (const char *cmd, struct Client *source_p, int parc, char **parv, int parse_flags, char **up_p, char **h_p, time_t *tkline_time, char **target_server, char **reason)
int valid_comment (struct Client *source_p, char *comment, int warn)
int match_conf_password (const char *password, const struct AccessItem *aconf)
void cluster_a_line (struct Client *source_p, const char *command, int capab, int cluster_type, const char *pattern,...)
void split_nuh (struct split_nuh_item *const iptr)
static void rebuild_cidr_list (int aftype, struct ConfItem *oldcl, struct ClassItem *newcl, dlink_list *old_list, dlink_list *new_list, int changed)
void rebuild_cidr_class (struct ConfItem *conf, struct ClassItem *new_class)
static void destroy_cidr_list (dlink_list *list)

Variabili

struct Callbackclient_check_cb = NULL
struct config_server_hide ConfigServerHide
dlink_list server_items = { NULL, NULL, 0 }
dlink_list cluster_items = { NULL, NULL, 0 }
dlink_list hub_items = { NULL, NULL, 0 }
dlink_list leaf_items = { NULL, NULL, 0 }
dlink_list oconf_items = { NULL, NULL, 0 }
dlink_list uconf_items = { NULL, NULL, 0 }
dlink_list xconf_items = { NULL, NULL, 0 }
dlink_list rxconf_items = { NULL, NULL, 0 }
dlink_list rkconf_items = { NULL, NULL, 0 }
dlink_list nresv_items = { NULL, NULL, 0 }
dlink_list class_items = { NULL, NULL, 0 }
dlink_list gdeny_items = { NULL, NULL, 0 }
dlink_list temporary_klines = { NULL, NULL, 0 }
dlink_list temporary_dlines = { NULL, NULL, 0 }
dlink_list temporary_xlines = { NULL, NULL, 0 }
dlink_list temporary_rklines = { NULL, NULL, 0 }
dlink_list temporary_glines = { NULL, NULL, 0 }
dlink_list temporary_rxlines = { NULL, NULL, 0 }
dlink_list temporary_resv = { NULL, NULL, 0 }
unsigned int lineno
char linebuf []
char conffilebuf [IRCD_BUFSIZE]
char yytext []
int ypass = 1
FBFILEconf_fbfile_in = NULL
static struct ConfItemclass_default
static struct ip_entryip_hash_table [IP_HASH_SIZE]
static BlockHeapip_entry_heap = NULL
static int ip_entries_count = 0
static const unsigned int shared_bit_table []
static struct oper_privs flag_list []


Documentazione delle definizioni

#define BAD_PING   (-1)

Definizione alla linea 2791 del file s_conf.c.

Referenziato da get_conf_ping().

#define IP_HASH_SIZE   0x1000

Definizione alla linea 130 del file s_conf.c.

Referenziato da count_ip_hash(), garbage_collect_ip_entries(), e hash_ip().


Documentazione delle funzioni

void add_temp_line ( struct ConfItem conf  ) 

int attach_conf ( struct Client client_p,
struct ConfItem conf 
)

int attach_connect_block ( struct Client client_p,
const char *  name,
const char *  host 
)

static int attach_iline ( struct Client client_p,
struct ConfItem conf 
) [static]

void check_class ( void   ) 

static void* check_client ( va_list  args  )  [static]

static int cidr_limit_reached ( int  over_rule,
struct irc_ssaddr ip,
struct ClassItem aclass 
) [static]

void cleanup_tklines ( void *  notused  ) 

Definizione alla linea 2213 del file s_conf.c.

Riferimenti expire_tklines().

Referenziato da main().

static void clear_out_old_conf ( void   )  [static]

void cluster_a_line ( struct Client source_p,
const char *  command,
int  capab,
int  cluster_type,
const char *  pattern,
  ... 
)

void conf_add_class_to_conf ( struct ConfItem conf,
const char *  class_name 
)

void conf_add_d_conf ( struct AccessItem aconf  ) 

int conf_add_server ( struct ConfItem conf,
const char *  class_name 
)

int conf_connect_allowed ( struct irc_ssaddr addr,
int  aftype 
)

static void conf_dns_callback ( void *  vptr,
struct DNSReply reply 
) [static]

static void conf_dns_lookup ( struct AccessItem aconf  )  [static]

int conf_fbgets ( char *  lbuf,
unsigned int  max_size,
FBFILE fb 
)

Definizione alla linea 3144 del file s_conf.c.

Riferimenti fbgets().

int conf_yy_fatal_error ( const char *  msg  ) 

Definizione alla linea 3153 del file s_conf.c.

void count_ip_hash ( int *  number_ips_stored,
unsigned long *  mem_ips_stored 
)

Definizione alla linea 1241 del file s_conf.c.

Riferimenti IP_HASH_SIZE, e ip_entry::next.

Referenziato da count_memory().

void delete_conf_item ( struct ConfItem conf  ) 

static void destroy_cidr_class ( struct ClassItem aclass  )  [static]

Definizione alla linea 3929 del file s_conf.c.

Riferimenti destroy_cidr_list(), ClassItem::list_ipv4, e ClassItem::list_ipv6.

Referenziato da check_class(), e rebuild_cidr_class().

static void destroy_cidr_list ( dlink_list list  )  [static]

Definizione alla linea 3910 del file s_conf.c.

Riferimenti _dlink_node::data, DLINK_FOREACH_SAFE, dlinkDelete(), _dlink_list::head, e MyFree().

Referenziato da destroy_cidr_class().

int detach_conf ( struct Client client_p,
ConfType  type 
)

static void expire_tklines ( dlink_list tklist  )  [static]

struct ConfItem* find_class ( const char *  classname  )  [read]

Definizione alla linea 2892 del file s_conf.c.

Riferimenti CLASS_TYPE, e find_exact_name_conf().

Referenziato da conf_add_class_to_conf().

struct ConfItem* find_conf_exact ( ConfType  type,
const char *  name,
const char *  user,
const char *  host 
) [read]

struct ConfItem* find_conf_name ( dlink_list list,
const char *  name,
ConfType  type 
) [read]

struct ConfItem* find_exact_name_conf ( ConfType  type,
const char *  name,
const char *  user,
const char *  host 
) [read]

struct AccessItem* find_gline ( struct Client client_p  )  [read]

struct AccessItem* find_kill ( struct Client client_p  )  [read]

struct ConfItem* find_matching_name_conf ( ConfType  type,
const char *  name,
const char *  user,
const char *  host,
int  action 
) [read]

static struct ip_entry * find_or_add_ip ( struct irc_ssaddr ip_in  )  [static, read]

static struct AccessItem * find_regexp_kline ( const char *  uhi[]  )  [static, read]

static int find_user_host ( struct Client source_p,
char *  user_host_or_nick,
char *  luser,
char *  lhost,
unsigned int  flags 
) [static]

static void flags_to_ascii ( unsigned int  flags,
const unsigned int  bit_table[],
char *  p,
int  lowerit 
) [static]

Definizione alla linea 3695 del file s_conf.c.

Riferimenti ToLower.

Referenziato da report_confitem_types().

static void flush_deleted_I_P ( void   )  [static]

void free_access_item ( struct AccessItem aconf  ) 

Definizione alla linea 562 del file s_conf.c.

Riferimenti delete_conf_item(), e unmap_conf_item().

Referenziato da clear_out_address_conf(), conf_add_d_conf(), e delete_one_address_conf().

static void garbage_collect_ip_entries ( void   )  [static]

const char* get_client_class ( struct Client target_p  ) 

int get_client_ping ( struct Client target_p,
int *  pingwarn 
)

const char* get_conf_name ( ConfType  type  ) 

static int get_conf_ping ( struct ConfItem conf,
int *  pingwarn 
) [static]

Definizione alla linea 2801 del file s_conf.c.

Riferimenti BAD_PING, AccessItem::class_ptr, map_to_conf(), PingFreq, e PingWarning.

Referenziato da get_client_ping().

char* get_oper_name ( const struct Client client_p  ) 

unsigned long get_sendq ( struct Client client_p  ) 

static int hash_ip ( struct irc_ssaddr addr  )  [static]

Definizione alla linea 1200 del file s_conf.c.

Riferimenti IP_HASH_SIZE, irc_ssaddr::ss, e u_int32_t.

Referenziato da find_or_add_ip(), e remove_one_ip().

void init_class ( void   ) 

void init_ip_hash_table ( void   ) 

Definizione alla linea 1075 del file s_conf.c.

Riferimenti BlockHeapCreate(), e hard_fdlimit.

Referenziato da main().

static void lookup_confhost ( struct ConfItem conf  )  [static]

struct ConfItem* make_conf_item ( ConfType  type  )  [read]

void* map_to_conf ( struct ConfItem aconf  )  [inline]

static dlink_list * map_to_list ( ConfType  type  )  [static]

int match_conf_password ( const char *  password,
const struct AccessItem aconf 
)

char* oper_privs_as_string ( const unsigned int  port  ) 

Definizione alla linea 2360 del file s_conf.c.

Riferimenti oper_privs::c, flag_list, oper_privs::oprivs, e ToLowerTab.

Referenziato da oper_up(), report_confitem_types(), e stats_operedup().

int parse_aline ( const char *  cmd,
struct Client source_p,
int  parc,
char **  parv,
int  parse_flags,
char **  up_p,
char **  h_p,
time_t *  tkline_time,
char **  target_server,
char **  reason 
)

static void parse_conf_file ( int  type,
int  cold 
) [static]

Definizione alla linea 2512 del file s_conf.c.

Riferimenti fbclose(), fbopen(), get_conf_name(), ilog(), L_ALL, L_ERROR, parse_csv_file(), sendto_realops_flags(), e UMODE_ALL.

Referenziato da read_conf_files().

static void read_conf ( FBFILE file  )  [static]

Definizione alla linea 1956 del file s_conf.c.

Riferimenti check_class(), fbrewind(), lineno, set_default_conf(), validate_conf(), ypass, e yyparse().

Referenziato da read_conf_files().

void read_conf_files ( int  cold  ) 

void rebuild_cidr_class ( struct ConfItem conf,
struct ClassItem new_class 
)

static void rebuild_cidr_list ( int  aftype,
struct ConfItem oldcl,
struct ClassItem newcl,
dlink_list old_list,
dlink_list new_list,
int  changed 
) [static]

int rehash ( int  sig  ) 

static void remove_from_cidr_check ( struct irc_ssaddr ip,
struct ClassItem aclass 
) [static]

void remove_one_ip ( struct irc_ssaddr ip_in  ) 

void report_confitem_types ( struct Client source_p,
ConfType  type,
int  temp 
)

static void set_default_conf ( void   )  [static]

Definizione alla linea 1813 del file s_conf.c.

Riferimenti AdminInfo, config_file_entry::anti_nick_flood, config_file_entry::anti_spam_exit_message_time, config_file_entry::burst_away, config_channel_entry::burst_topicwho, config_file_entry::caller_id_wait, CipherTable, config_file_entry::client_flood, CLIENT_FLOOD_DEFAULT, config_file_entry::compression_level, ConfigChannel, ConfigFileEntry, ConfigLoggingEntry, ConfigServerHide, _dlink_node::data, config_file_entry::default_cipher_preference, config_file_entry::default_floodcount, config_channel_entry::default_split_server_count, config_channel_entry::default_split_user_count, admin_info::description, server_info::description, config_file_entry::disable_auth, config_channel_entry::disable_fake_channels, config_server_hide::disable_hidden, config_channel_entry::disable_local_channels, config_file_entry::disable_remote, server_info::dns_host, config_file_entry::dot_in_ip6_addr, config_file_entry::dots_in_ident, DupString, config_file_entry::egdpool_path, admin_info::email, config_file_entry::failed_oper_notice, logging_entry::failed_operlog, config_server_hide::flatten_links, config_file_entry::gline_min_cidr, config_file_entry::gline_min_cidr6, config_file_entry::gline_time, logging_entry::glinelog, config_file_entry::glines, config_server_hide::hidden, config_server_hide::hidden_name, config_server_hide::hide_server_ips, config_server_hide::hide_servers, config_file_entry::hide_spoof_ips, config_file_entry::idletime, config_file_entry::ignore_bogus_ts, config_file_entry::invisible_on_connect, logging_entry::ioerrlog, server_info::ip, server_info::ip6, config_file_entry::kill_chase_time_limit, logging_entry::killlog, config_file_entry::kline_reason, config_file_entry::kline_with_reason, logging_entry::klinelog, config_channel_entry::knock_delay, config_channel_entry::knock_delay_channel, L_NOTICE, config_server_hide::links_delay, config_file_entry::max_accept, config_channel_entry::max_bans, config_channel_entry::max_chans_per_user, server_info::max_clients, config_file_entry::max_nick_changes, config_file_entry::max_nick_time, config_file_entry::max_targets, MAX_TARGETS_DEFAULT, MAXCLIENTS_MAX, config_file_entry::min_nonwildcard, config_file_entry::min_nonwildcard_simple, admin_info::name, server_info::network_desc, NETWORK_DESC_DEFAULT, server_info::network_name, NETWORK_NAME_DEFAULT, NO, config_channel_entry::no_create_on_split, config_channel_entry::no_join_on_split, config_file_entry::no_oper_flood, config_file_entry::oper_only_umodes, config_file_entry::oper_pass_resv, config_file_entry::oper_umodes, logging_entry::operlog, config_file_entry::opers_bypass_callerid, logging_entry::operspylog, config_file_entry::pace_wait, config_file_entry::pace_wait_simple, config_file_entry::ping_cookie, config_channel_entry::quiet_on_ban, config_channel_entry::restrict_channels, server_info::rsa_private_key, server_info::rsa_private_key_file, ServerInfo, config_file_entry::servlink_path, set_log_level(), config_file_entry::short_motd, SLPATH, server_info::specific_ipv4_vhost, server_info::specific_ipv6_vhost, config_file_entry::stats_i_oper_only, config_file_entry::stats_k_oper_only, config_file_entry::stats_o_oper_only, config_file_entry::stats_P_oper_only, _dlink_list::tail, config_file_entry::throttle_time, config_file_entry::tkline_expire_notices, config_file_entry::true_no_oper_flood, config_file_entry::ts_max_delta, TS_MAX_DELTA_DEFAULT, config_file_entry::ts_warn_delta, TS_WARN_DELTA_DEFAULT, UMODE_BOTS, UMODE_DEBUG, UMODE_LOCOPS, UMODE_OPERWALL, UMODE_SERVNOTICE, UMODE_WALLOP, config_file_entry::use_egd, config_channel_entry::use_except, config_channel_entry::use_invex, config_channel_entry::use_knock, logging_entry::use_logging, config_file_entry::use_whois_actually, logging_entry::userlog, config_file_entry::warn_no_nline, e YES.

Referenziato da read_conf().

void split_nuh ( struct split_nuh_item *const   iptr  ) 

struct ConfItem* unmap_conf_item ( void *  aconf  )  [read]

int valid_comment ( struct Client source_p,
char *  comment,
int  warn 
)

Definizione alla linea 3512 del file s_conf.c.

Riferimenti me, Client::name, REASONLEN, e sendto_one().

Referenziato da mo_dline(), e parse_aline().

time_t valid_tkline ( char *  p,
int  minutes 
)

Definizione alla linea 3169 del file s_conf.c.

Riferimenti IsDigit, e MAX_TDKLINE_TIME.

Referenziato da me_kline(), me_rkline(), e parse_aline().

int valid_wild_card ( struct Client source_p,
int  warn,
int  count,
  ... 
)

static void validate_conf ( void   )  [static]

static int verify_access ( struct Client client_p,
const char *  username 
) [static]

void yyerror ( const char *  msg  ) 

int yyparse (  ) 

Referenziato da read_conf().


Documentazione delle variabili

struct ConfItem* class_default [static]

Definizione alla linea 124 del file s_conf.c.

dlink_list class_items = { NULL, NULL, 0 }

Definizione alla linea 76 del file s_conf.c.

Referenziato da count_memory(), do_actual_trace(), e mo_classlist().

struct Callback* client_check_cb = NULL

Definizione alla linea 62 del file s_conf.c.

Referenziato da register_local_user().

dlink_list cluster_items = { NULL, NULL, 0 }

Definizione alla linea 67 del file s_conf.c.

Definizione alla linea 121 del file s_conf.c.

char conffilebuf[IRCD_BUFSIZE]

Referenziato da read_conf_files(), e yyerror().

struct oper_privs flag_list[] [static]

Referenziato da oper_privs_as_string().

dlink_list gdeny_items = { NULL, NULL, 0 }

Definizione alla linea 77 del file s_conf.c.

dlink_list hub_items = { NULL, NULL, 0 }

Definizione alla linea 68 del file s_conf.c.

Referenziato da check_server(), ms_server(), e ms_sid().

int ip_entries_count = 0 [static]

Definizione alla linea 142 del file s_conf.c.

Referenziato da find_or_add_ip(), garbage_collect_ip_entries(), e remove_one_ip().

BlockHeap* ip_entry_heap = NULL [static]

Definizione alla linea 141 del file s_conf.c.

struct ip_entry* ip_hash_table[IP_HASH_SIZE] [static]

Definizione alla linea 140 del file s_conf.c.

dlink_list leaf_items = { NULL, NULL, 0 }

Definizione alla linea 69 del file s_conf.c.

Referenziato da check_server(), ms_server(), e ms_sid().

char linebuf[]

unsigned int lineno

Referenziato da read_conf(), e yyerror().

dlink_list nresv_items = { NULL, NULL, 0 }

Definizione alla linea 75 del file s_conf.c.

Referenziato da count_memory(), e report_resv().

dlink_list oconf_items = { NULL, NULL, 0 }

Definizione alla linea 70 del file s_conf.c.

dlink_list rkconf_items = { NULL, NULL, 0 }

Definizione alla linea 74 del file s_conf.c.

Referenziato da already_placed_rkline().

dlink_list rxconf_items = { NULL, NULL, 0 }

Definizione alla linea 73 del file s_conf.c.

Referenziato da already_placed_rxline().

dlink_list server_items = { NULL, NULL, 0 }

Definizione alla linea 66 del file s_conf.c.

Referenziato da check_server(), e try_connections().

const unsigned int shared_bit_table[] [static]

Valore iniziale:

  { 'K', 'k', 'U', 'X', 'x', 'Y', 'Q', 'q', 'R', 'L', 0}

Definizione alla linea 572 del file s_conf.c.

Referenziato da report_confitem_types().

dlink_list temporary_dlines = { NULL, NULL, 0 }

Definizione alla linea 80 del file s_conf.c.

Referenziato da remove_tdline_match().

dlink_list temporary_glines = { NULL, NULL, 0 }

Definizione alla linea 83 del file s_conf.c.

Referenziato da remove_gline_match().

dlink_list temporary_klines = { NULL, NULL, 0 }

Definizione alla linea 79 del file s_conf.c.

Referenziato da remove_tkline_match().

dlink_list temporary_resv = { NULL, NULL, 0 }

Definizione alla linea 85 del file s_conf.c.

dlink_list temporary_rklines = { NULL, NULL, 0 }

Definizione alla linea 82 del file s_conf.c.

Referenziato da remove_trkline_match().

dlink_list temporary_rxlines = { NULL, NULL, 0 }

Definizione alla linea 84 del file s_conf.c.

Referenziato da remove_txline().

dlink_list temporary_xlines = { NULL, NULL, 0 }

Definizione alla linea 81 del file s_conf.c.

Referenziato da remove_txline_match().

dlink_list uconf_items = { NULL, NULL, 0 }

Definizione alla linea 71 del file s_conf.c.

dlink_list xconf_items = { NULL, NULL, 0 }

Definizione alla linea 72 del file s_conf.c.

int ypass = 1

Definizione alla linea 92 del file s_conf.c.

Referenziato da read_conf(), e yyerror().

char yytext[]


Generato il Wed Apr 15 00:19:22 2009 per ircd-hybrid da  doxygen 1.5.6