|
Monero
|
#include "config.h"#include "../macros.h"#include <sys/param.h>#include <sys/types.h>#include <sys/file.h>#include <sys/uio.h>#include <sys/time.h>#include <sys/socket.h>#include <sys/syslog.h>#include <sys/ioctl.h>#include <net/if.h>#include <netinet/in.h>#include <netinet/in_systm.h>#include <netinet/ip.h>#include <netinet/ip_icmp.h>#include <netinet/tcp.h>#include <netinet/udp.h>#include <arpa/inet.h>#include <sys/queue.h>#include <errno.h>#include <limits.h>#include <netdb.h>#include <stdlib.h>#include <fcntl.h>#include <syslog.h>#include <stddef.h>#include <stdio.h>#include <strings.h>#include <string.h>#include <unistd.h>#include <netinet/ip_fw.h>#include "ipfwaux.h"#include "ipfwrdr.h"#include "../upnpglobalvars.h"
Classes | |
| struct | mapping_desc_time |
Macros | |
| #define | ADD_KERNEL |
| #define | _KERNEL |
| #define | KERNEL |
Functions | |
| int | init_redirect (void) |
| void | shutdown_redirect (void) |
| static void | add_desc_time (unsigned short eport, int proto, const char *desc, unsigned int timestamp) |
| static void | del_desc_time (unsigned short eport, int proto) |
| static void | get_desc_time (unsigned short eport, int proto, char *desc, int desclen, unsigned int *timestamp) |
| int | add_redirect_rule2 (const char *ifname, const char *rhost, unsigned short eport, const char *iaddr, unsigned short iport, int proto, const char *desc, unsigned int timestamp) |
| int | get_redirect_rule (const char *ifname, unsigned short eport, int proto, char *iaddr, int iaddrlen, unsigned short *iport, char *desc, int desclen, char *rhost, int rhostlen, unsigned int *timestamp, u_int64_t *packets, u_int64_t *bytes) |
| int | delete_redirect_rule (const char *ifname, unsigned short eport, int proto) |
| int | add_filter_rule2 (const char *ifname, const char *rhost, const char *iaddr, unsigned short eport, unsigned short iport, int proto, const char *desc) |
| int | delete_filter_rule (const char *ifname, unsigned short eport, int proto) |
| int | get_redirect_rule_by_index (int index, char *ifname, unsigned short *eport, char *iaddr, int iaddrlen, unsigned short *iport, int *proto, char *desc, int desclen, char *rhost, int rhostlen, unsigned int *timestamp, u_int64_t *packets, u_int64_t *bytes) |
| unsigned short * | get_portmappings_in_range (unsigned short startport, unsigned short endport, int proto, unsigned int *number) |
| int | update_portmapping_desc_timestamp (const char *ifname, unsigned short eport, int proto, const char *desc, unsigned int timestamp) |
| int | update_portmapping (const char *ifname, unsigned short eport, int proto, unsigned short iport, const char *desc, unsigned int timestamp) |
Variables | |
| static struct mapping_desc_time * | mappings_list = NULL |
| #define _KERNEL |
| #define ADD_KERNEL |
| #define KERNEL |
|
static |
| int add_filter_rule2 | ( | const char * | ifname, |
| const char * | rhost, | ||
| const char * | iaddr, | ||
| unsigned short | eport, | ||
| unsigned short | iport, | ||
| int | proto, | ||
| const char * | desc ) |
| int add_redirect_rule2 | ( | const char * | ifname, |
| const char * | rhost, | ||
| unsigned short | eport, | ||
| const char * | iaddr, | ||
| unsigned short | iport, | ||
| int | proto, | ||
| const char * | desc, | ||
| unsigned int | timestamp ) |
|
static |
| int delete_filter_rule | ( | const char * | ifname, |
| unsigned short | eport, | ||
| int | proto ) |
| int delete_redirect_rule | ( | const char * | ifname, |
| unsigned short | eport, | ||
| int | proto ) |
|
static |
| unsigned short * get_portmappings_in_range | ( | unsigned short | startport, |
| unsigned short | endport, | ||
| int | proto, | ||
| unsigned int * | number ) |
| int get_redirect_rule | ( | const char * | ifname, |
| unsigned short | eport, | ||
| int | proto, | ||
| char * | iaddr, | ||
| int | iaddrlen, | ||
| unsigned short * | iport, | ||
| char * | desc, | ||
| int | desclen, | ||
| char * | rhost, | ||
| int | rhostlen, | ||
| unsigned int * | timestamp, | ||
| u_int64_t * | packets, | ||
| u_int64_t * | bytes ) |
| int get_redirect_rule_by_index | ( | int | index, |
| char * | ifname, | ||
| unsigned short * | eport, | ||
| char * | iaddr, | ||
| int | iaddrlen, | ||
| unsigned short * | iport, | ||
| int * | proto, | ||
| char * | desc, | ||
| int | desclen, | ||
| char * | rhost, | ||
| int | rhostlen, | ||
| unsigned int * | timestamp, | ||
| u_int64_t * | packets, | ||
| u_int64_t * | bytes ) |
| int init_redirect | ( | void | ) |
| void shutdown_redirect | ( | void | ) |
| int update_portmapping | ( | const char * | ifname, |
| unsigned short | eport, | ||
| int | proto, | ||
| unsigned short | iport, | ||
| const char * | desc, | ||
| unsigned int | timestamp ) |
| int update_portmapping_desc_timestamp | ( | const char * | ifname, |
| unsigned short | eport, | ||
| int | proto, | ||
| const char * | desc, | ||
| unsigned int | timestamp ) |
|
static |