#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <ctype.h>
#include "ipobj.h"
Go to the source code of this file.
Functions | |
int | ip_familysize (int family) |
int | ip4_sprintx (char *s, int slen, void *ip4) |
int | ip6_sprintx (char *s, int slen, void *ip6) |
int | ip_sprint (char *s, int slen, IPADDRESS *p) |
int | ip_fprint (FILE *fp, IPADDRESS *p) |
static void | ip_init (IPADDRESS *p, int family) |
IPADDRESS * | ip_new (int family) |
void | ip_free (IPADDRESS *p) |
int | ip_family (IPADDRESS *p) |
int | ip_size (IPADDRESS *p) |
int | ip_set (IPADDRESS *ia, void *ip, int family) |
int | ip_get (IPADDRESS *ia, void *ip, int family) |
int | ip_equal (IPADDRESS *ia, void *ip, int family) |
int | ip_eq (IPADDRESS *ia, IPADDRESS *ib) |
static void | ipset_init (IPSET *ipc) |
static void | ipset6_init (IPSET *ipc) |
IPSET * | ipset_new (int family) |
IPSET * | ipset_copy (IPSET *ipsp) |
void | ipset_free (IPSET *ipc) |
int | ipset_family (IPSET *ipset) |
int | ipset_add (IPSET *ipc, void *vip, void *vmask, int notflag, int family) |
int | ipset_contains (IPSET *ipc, void *ip, int family) |
int | ipset_print (IPSET *ipc) |
int | ip4_parse (char *ipstr, int network_order, int *not_flag, unsigned *host, unsigned *mask) |
int | ip4_setparse (IPSET *ipset, char *ipstr) |
|
Break an IP4 Address down into its components
Definition at line 538 of file ipobj.c. References memcpy, and strstr(). Referenced by ip4_setparse(). |
|
Definition at line 687 of file ipobj.c. References ip4_parse(), ipset_add(), and IPV4_FAMILY. Referenced by FlowPSParseOption(), and ParseIpList(). |
|
Definition at line 43 of file ipobj.c. References snprintf. Referenced by ip_sprint(), ipset_print(), and PrintPortscanConf(). |
|
Definition at line 60 of file ipobj.c. References snprintf. Referenced by ip_sprint(), and ipset_print(). |
|
Definition at line 226 of file ipobj.c. References IPADDRESS::family, IPADDRESS::ip, IPV4_FAMILY, IPV4_LEN, IPV6_FAMILY, IPV6_LEN, and memcmp(). |
|
Definition at line 206 of file ipobj.c. References IPADDRESS::family, IPADDRESS::ip, IPV4_FAMILY, IPV4_LEN, IPV6_LEN, and memcmp(). |
|
Definition at line 157 of file ipobj.c. References IPADDRESS::family. |
|
Definition at line 36 of file ipobj.c. References IPV4_FAMILY, IPV4_LEN, IPV6_FAMILY, and IPV6_LEN. Referenced by ip_size(). |
|
Definition at line 99 of file ipobj.c. References ip_sprint(). |
|
|
|
Definition at line 189 of file ipobj.c. References IPADDRESS::family, IPADDRESS::ip, IPV4_FAMILY, IPV4_LEN, IPV6_FAMILY, IPV6_LEN, and memcpy. |
|
Definition at line 118 of file ipobj.c. References IPADDRESS::family. Referenced by ip_new(). |
|
Definition at line 129 of file ipobj.c. References ip_init(), IPV4_FAMILY, IPV4_LEN, IPV6_FAMILY, IPV6_LEN, and NULL. |
|
Definition at line 173 of file ipobj.c. References IPADDRESS::family, IPADDRESS::ip, IPV4_FAMILY, IPV4_LEN, IPV6_FAMILY, IPV6_LEN, and memcpy. |
|
Definition at line 165 of file ipobj.c. References IPADDRESS::family, and ip_familysize(). Referenced by MakePortscanPkt(). |
|
Definition at line 80 of file ipobj.c. References IPADDRESS::family, IPADDRESS::ip, ip4_sprintx(), ip6_sprintx(), IPV4_FAMILY, and IPV6_FAMILY. Referenced by ip_fprint(). |
|
Definition at line 280 of file ipobj.c. References IPSET::cidr_list, IPSET::family, IPV6_FAMILY, and sflist_init(). Referenced by ipset_new(). |
|
Definition at line 362 of file ipobj.c. References IPSET::cidr_list, IPSET::family, CIDRBLOCK::ip, CIDRBLOCK6::ip, IPV4_FAMILY, IPV6_FAMILY, IPV6_LEN, CIDRBLOCK::mask, CIDRBLOCK6::mask, memcpy, CIDRBLOCK::notflag, CIDRBLOCK6::notflag, sflist_add_head(), and sflist_add_tail(). Referenced by ip4_setparse(), and ipset_copy(). |
|
Definition at line 410 of file ipobj.c. References IPSET::cidr_list, IPSET::family, CIDRBLOCK::ip, CIDRBLOCK6::ip, IPV4_FAMILY, IPV6_FAMILY, IPV6_LEN, CIDRBLOCK::mask, CIDRBLOCK6::mask, memcmp(), CIDRBLOCK::notflag, CIDRBLOCK6::notflag, sflist_first(), and sflist_next(). Referenced by flowps_is_ignored_ipv4(), ps_filter_ignore(), ps_ignore_ip(), server_stats_add_ipv4(), server_stats_contains(), and server_stats_hitcount_ipv4(). |
|
Definition at line 305 of file ipobj.c. References IPSET::cidr_list, CIDRBLOCK::ip, CIDRBLOCK6::ip, ipset_add(), ipset_family(), ipset_new(), IPV4_FAMILY, CIDRBLOCK::mask, CIDRBLOCK6::mask, CIDRBLOCK::notflag, CIDRBLOCK6::notflag, NULL, sflist_first(), and sflist_next(). Referenced by server_stats_init(). |
|
Definition at line 354 of file ipobj.c. References IPSET::family. Referenced by ipset_copy(), and server_stats_init(). |
|
Definition at line 346 of file ipobj.c. References IPSET::cidr_list, and sflist_free(). Referenced by server_stats_destroy(). |
|
Definition at line 271 of file ipobj.c. References IPSET::cidr_list, IPSET::family, IPV4_FAMILY, and sflist_init(). Referenced by ipset_new(). |
|
Definition at line 289 of file ipobj.c. References ipset6_init(), ipset_init(), and IPV4_FAMILY. Referenced by FlowPSParseOption(), ipset_copy(), and ParseIpList(). |
|
Definition at line 470 of file ipobj.c. References IPSET::cidr_list, IPSET::family, CIDRBLOCK::ip, CIDRBLOCK6::ip, ip4_sprintx(), ip6_sprintx(), IPV4_FAMILY, IPV6_FAMILY, CIDRBLOCK::mask, CIDRBLOCK6::mask, CIDRBLOCK::notflag, CIDRBLOCK6::notflag, sflist_first(), and sflist_next(). |