#include <stdio.h>
#include <syslog.h>
#include <getopt.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <linux/types.h>
#include <linux/filter.h>
#include <linux/if_ether.h>
#include <linux/sockios.h>
#include <net/if.h>
#include <netinet/ip.h>
#include <netinet/ip_icmp.h>
#include <netpacket/packet.h>
Include dependency graph for ipsetd.c:
Go to the source code of this file.
Defines | |
#define | min(a, b) (a < b ? a : b) |
#define | IP_ICMP_HEADERS_SIZE (20 + 8) |
#define | MIN_ICMP_PAYLOAD_SIZE (ICMP_MINLEN + 4) |
#define | MAX_ICMP_PAYLOAD_SIZE (ETH_DATA_LEN - IP_ICMP_HEADERS_SIZE) |
#define | IGNORE_PING_PAYLOAD_SIZE -1 |
#define | IFACE_DEFAULT "eth0" |
Functions | |
void | usage (FILE *where, char *pgm) |
void | ipsetd_timeout (int arg) |
void | set_ip (int sockfd, unsigned int ipaddr, char *ifr_name_str) |
int | is_local_ip (int sockfd, in_addr_t new_addr) |
int | main (int argc, char **argv) |
Variables | |
static int | ping_timeout = -1 |
#define MAX_ICMP_PAYLOAD_SIZE (ETH_DATA_LEN - IP_ICMP_HEADERS_SIZE) |
#define min | ( | a, | |||
b | ) | (a < b ? a : b) |
Definition at line 70 of file ipsetd.c.
Referenced by addDirEntry(), create_target_filesystem(), main(), nand_rw(), padblock(), and read_bbt().
#define MIN_ICMP_PAYLOAD_SIZE (ICMP_MINLEN + 4) |
void ipsetd_timeout | ( | int | arg | ) |
Definition at line 157 of file ipsetd.c.
References buf, IFACE_DEFAULT, IGNORE_PING_PAYLOAD_SIZE, IP_ICMP_HEADERS_SIZE, ipsetd_timeout(), is_local_ip(), MAX_ICMP_PAYLOAD_SIZE, memcpy(), memset(), min, MIN_ICMP_PAYLOAD_SIZE, ping_timeout, set_ip(), snprintf(), stderr, stdout, and usage.
int ping_timeout = -1 [static] |