File src/dinoex_badip.c

* by Dirk Meyer (dinoex) * Copyright (C) 2004-2011 Dirk Meyer * * By using this file, you agree to the terms and conditions set * forth in the GNU General Public License. More information is * available in the LICENSE file. * * If you received this file without documentation, it can be * downloaded from http://iroffer.dinoex.net/ * * $Id: dinoex_badip.c,v 1.14 2011/05/13 16:16:30 cvs Exp $ *


Included Files

include the headers


Preprocessor definitions

#define _LONGLONG 1

Global Function count_badip()

update counters for abusive ips

void count_badip ( ir_sockaddr_union_t* sa )

Prototyped in: src/dinoex_badip.h
Calls: count_badip4() src/dinoex_badip.c
  count_badip6() src/dinoex_badip.c
  __bswap32()
Called by: h_parse() src/dinoex_http.c
  parsedccchat() src/iroffer_dccchat.c

Global Function expire_badip()

reset counters for abusive ips

void expire_badip ( void )

Prototyped in: src/dinoex_badip.h
Calls: expire_badip4() src/dinoex_badip.c
  expire_badip6() src/dinoex_badip.c
Called by: mainloop() src/iroffer_main.c

Global Function is_in_badip()

check if ip is allowed return: 0 = not blocked return: 1 = blacklisted return: -1 = blocked by GeoIP

unsigned int is_in_badip ( ir_sockaddr_union_t* sa )

Prototyped in: src/dinoex_badip.h
Calls: is_in_badip4() src/dinoex_badip.c
  is_in_badip6() src/dinoex_badip.c
  __bswap32()
Called by: h_accept() src/dinoex_http.c
  setupdccchat() src/iroffer_dccchat.c
  setupdccchataccept() src/iroffer_dccchat.c
  telnet_accept() src/dinoex_telnet.c

Local Function count_badip4()

static void count_badip4 ( ir_uint32 remoteip )
Calls: irlist_add2() src/iroffer_utilities.c
  irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
Called by: count_badip() src/dinoex_badip.c
References Variables: gdata src/dinoex_main.c

Local Function count_badip6()

static void count_badip6 ( struct in6_addr* remoteip )
Calls: irlist_add2() src/iroffer_utilities.c
  irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  memcmp()
Called by: count_badip() src/dinoex_badip.c
References Variables: gdata src/dinoex_main.c

Local Function expire_badip4()

static void expire_badip4 ( void )
Calls: irlist_delete() src/iroffer_utilities.c
  irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
Called by: expire_badip() src/dinoex_badip.c
References Variables: gdata src/dinoex_main.c

Local Function expire_badip6()

static void expire_badip6 ( void )
Calls: irlist_delete() src/iroffer_utilities.c
  irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
Called by: expire_badip() src/dinoex_badip.c
References Variables: gdata src/dinoex_main.c

Local Function is_in_badip4()

static unsigned int is_in_badip4 ( ir_uint32 remoteip )
Calls: http_check_geoip() src/dinoex_geoip.c
  irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
Called by: is_in_badip() src/dinoex_badip.c
References Variables: gdata src/dinoex_main.c

Local Function is_in_badip6()

static unsigned int is_in_badip6 ( struct in6_addr* remoteip )
Calls: http_check_geoip6() src/dinoex_geoip.c
  irlist_get_head() src/iroffer_utilities.c
  irlist_get_next() src/iroffer_utilities.c
  memcmp()
Called by: is_in_badip() src/dinoex_badip.c
References Variables: gdata src/dinoex_main.c