#include "include/ebtables_u.h"
#include "include/ethernetdb.h"
#include <stdio.h>
#include <netinet/ether.h>
#include <string.h>
#include <stdlib.h>
#include <getopt.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
Functions | |
void | ebt_print_mac (const unsigned char *mac) |
void | ebt_print_mac_and_mask (const unsigned char *mac, const unsigned char *mask) |
struct ethertypeent * | parseethertypebynumber (int type) |
int | ebt_get_mac_and_mask (const char *from, unsigned char *to, unsigned char *mask) |
int | _ebt_check_inverse (const char option[], int argc, char **argv) |
void | ebt_check_option (unsigned int *flags, unsigned int mask) |
void | ebt_parse_ip_address (char *address, uint32_t *addr, uint32_t *msk) |
char * | ebt_mask_to_dotted (uint32_t mask) |
int | string_to_number_ll (const char *s, unsigned long long min, unsigned long long max, unsigned long long *ret) |
int | string_to_number_l (const char *s, unsigned long min, unsigned long max, unsigned long *ret) |
int | string_to_number (const char *s, unsigned int min, unsigned int max, unsigned int *ret) |
void | ebt_parse_ip6_address (char *address, struct in6_addr *addr, struct in6_addr *msk) |
char * | ebt_ip6_to_numeric (const struct in6_addr *addrp) |
char * | ebt_ip6_mask_to_string (const struct in6_addr *msk) |
Variables | |
const unsigned char | mac_type_unicast [ETH_ALEN] = {0,0,0,0,0,0} |
const unsigned char | msk_type_unicast [ETH_ALEN] = {1,0,0,0,0,0} |
const unsigned char | mac_type_multicast [ETH_ALEN] = {1,0,0,0,0,0} |
const unsigned char | msk_type_multicast [ETH_ALEN] = {1,0,0,0,0,0} |
const unsigned char | mac_type_broadcast [ETH_ALEN] = {255,255,255,255,255,255} |
const unsigned char | msk_type_broadcast [ETH_ALEN] = {255,255,255,255,255,255} |
const unsigned char | mac_type_bridge_group [ETH_ALEN] = {0x01,0x80,0xc2,0,0,0} |
const unsigned char | msk_type_bridge_group [ETH_ALEN] = {255,255,255,255,255,255} |
int | ebt_printstyle_mac |
int | ebt_invert = 0 |
int _ebt_check_inverse | ( | const char | option[], |
int | argc, | ||
char ** | argv | ||
) |
References ebt_invert, ebt_print_error, and NULL.
References ebt_print_error, and mask.
References ETH_ALEN, mac_type_bridge_group, mac_type_broadcast, mac_type_multicast, mac_type_unicast, msk_type_bridge_group, msk_type_broadcast, msk_type_multicast, msk_type_unicast, and NULL.
Referenced by do_command().
char* ebt_ip6_mask_to_string | ( | const struct in6_addr * | msk | ) |
char* ebt_ip6_to_numeric | ( | const struct in6_addr * | addrp | ) |
char* ebt_mask_to_dotted | ( | uint32_t | mask | ) |
References buf.
References buf, ebt_print_error, and NULL.
void ebt_parse_ip_address | ( | char * | address, |
uint32_t * | addr, | ||
uint32_t * | msk | ||
) |
References ebt_print_error, and NULL.
void ebt_print_mac | ( | const unsigned char * | mac | ) |
References ebt_printstyle_mac, and ETH_ALEN.
Referenced by ebt_print_mac_and_mask().
References ebt_print_mac(), mac_type_bridge_group, mac_type_broadcast, mac_type_multicast, mac_type_unicast, msk_type_bridge_group, msk_type_broadcast, msk_type_multicast, and msk_type_unicast.
struct ethertypeent* parseethertypebynumber | ( | int | type | ) |
int string_to_number_l | ( | const char * | s, |
unsigned long | min, | ||
unsigned long | max, | ||
unsigned long * | ret | ||
) |
References string_to_number_ll().
Referenced by string_to_number().
int string_to_number_ll | ( | const char * | s, |
unsigned long long | min, | ||
unsigned long long | max, | ||
unsigned long long * | ret | ||
) |
Referenced by ipset_parse_timeout(), ipset_parse_uint64(), and string_to_number_l().
int ebt_invert = 0 |
Referenced by _ebt_check_inverse(), and do_command().
int ebt_printstyle_mac |
Referenced by ebt_print_mac().
Referenced by ebt_get_mac_and_mask(), and ebt_print_mac_and_mask().
Referenced by ebt_get_mac_and_mask(), and ebt_print_mac_and_mask().
Referenced by ebt_get_mac_and_mask(), and ebt_print_mac_and_mask().
Referenced by ebt_get_mac_and_mask(), and ebt_print_mac_and_mask().
Referenced by ebt_get_mac_and_mask(), and ebt_print_mac_and_mask().
Referenced by ebt_get_mac_and_mask(), and ebt_print_mac_and_mask().
Referenced by ebt_get_mac_and_mask(), and ebt_print_mac_and_mask().
Referenced by ebt_get_mac_and_mask(), and ebt_print_mac_and_mask().