#include <netinet/in.h>
#include <linux/netfilter_bridge/ebtables.h>
#include <linux/netfilter/x_tables.h>
Data Structures | |
struct | ebt_u_entries |
struct | ebt_cntchanges |
struct | ebt_u_replace |
struct | ebt_u_table |
struct | ebt_u_match_list |
struct | ebt_u_watcher_list |
struct | ebt_u_entry |
struct | ebt_u_match |
struct | ebt_u_watcher |
struct | ebt_u_target |
Macros | |
#define | IPPROTO_SCTP 132 |
#define | IPPROTO_DCCP 33 |
#define | EXEC_STYLE_PRG 0 |
#define | EXEC_STYLE_DAEMON 1 |
#define | EBT_MIN_ALIGN (__alignof__(struct _xt_align)) |
#define | EBT_ALIGN(s) (((s) + (EBT_MIN_ALIGN-1)) & ~(EBT_MIN_ALIGN-1)) |
#define | ERRORMSG_MAXLEN 128 |
#define | EBT_ORI_MAX_CHAINS 10 |
#define | ebt_check_inverse(arg) _ebt_check_inverse(arg, argc, argv) |
#define | ebt_to_chain(repl) |
#define | ebt_print_bug(format, args...) __ebt_print_bug(__FILE__, __LINE__, format, ##args) |
#define | ebt_print_error(format, args...) __ebt_print_error(format, ##args); |
#define | ebt_print_error2(format, args...) |
#define | ebt_check_option2(flags, mask) |
#define | ebt_check_inverse2(option) |
#define | ebt_print_memory() |
#define | CNT_NORM 0 |
#define | CNT_DEL 1 |
#define | CNT_ADD 2 |
#define | CNT_CHANGE 3 |
#define | FILL_TARGET(_str, _pos) |
#define | TARGET_INDEX(_value) (-_value - 1) |
#define | TARGET_NAME(_value) (ebt_standard_targets[TARGET_INDEX(_value)]) |
#define | BASE_CHAIN (hookmask & (1 << NF_BR_NUMHOOKS)) |
#define | CLEAR_BASE_CHAIN_BIT (hookmask &= ~(1 << NF_BR_NUMHOOKS)) |
#define | PRINT_VERSION printf(PROGNAME" v"PROGVERSION" ("PROGDATE")\n") |
#define | PROC_SYS_MODPROBE "/proc/sys/kernel/modprobe" |
#define | ATOMIC_ENV_VARIABLE "EBTABLES_ATOMIC_FILE" |
#define | ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
Variables | |
struct ebt_u_table * | ebt_tables |
struct ebt_u_match * | ebt_matches |
struct ebt_u_watcher * | ebt_watchers |
struct ebt_u_target * | ebt_targets |
int | use_lockfd |
int | ebt_invert |
const char * | ebt_hooknames [NF_BR_NUMHOOKS] |
const char * | ebt_standard_targets [NUM_STANDARD_TARGETS] |
char | ebt_errormsg [ERRORMSG_MAXLEN] |
char * | ebt_modprobe |
int | ebt_silent |
int | ebt_printstyle_mac |
#define ARRAY_SIZE | ( | x | ) | (sizeof(x) / sizeof((x)[0])) |
#define ATOMIC_ENV_VARIABLE "EBTABLES_ATOMIC_FILE" |
Referenced by do_command().
#define BASE_CHAIN (hookmask & (1 << NF_BR_NUMHOOKS)) |
#define CLEAR_BASE_CHAIN_BIT (hookmask &= ~(1 << NF_BR_NUMHOOKS)) |
#define CNT_ADD 2 |
Referenced by ebt_add_rule(), ebt_change_counters(), ebt_delete_cc(), and ebt_deliver_counters().
#define CNT_CHANGE 3 |
Referenced by ebt_change_counters(), ebt_deliver_counters(), and ebt_zero_counters().
#define CNT_DEL 1 |
Referenced by ebt_delete_cc(), and ebt_deliver_counters().
#define CNT_NORM 0 |
Referenced by ebt_change_counters(), ebt_deliver_counters(), ebt_get_table(), and ebt_zero_counters().
#define EBT_ALIGN | ( | s | ) | (((s) + (EBT_MIN_ALIGN-1)) & ~(EBT_MIN_ALIGN-1)) |
Referenced by ebt_register_match(), ebt_register_target(), ebt_register_watcher(), and ebt_reinit_extensions().
#define ebt_check_inverse | ( | arg | ) | _ebt_check_inverse(arg, argc, argv) |
#define ebt_check_inverse2 | ( | option | ) |
Referenced by do_command().
Referenced by do_command().
#define EBT_ORI_MAX_CHAINS 10 |
Referenced by ebt_get_table().
#define ebt_print_bug | ( | format, | |
args... | |||
) | __ebt_print_bug(__FILE__, __LINE__, format, ##args) |
#define ebt_print_error | ( | format, | |
args... | |||
) | __ebt_print_error(format, ##args); |
#define ebt_print_error2 | ( | format, | |
args... | |||
) |
Referenced by do_command(), and ebt_get_kernel_table().
#define ebt_print_memory | ( | ) |
Referenced by do_command(), ebt_add_match(), ebt_add_rule(), ebt_add_watcher(), ebt_check_for_loops(), ebt_deliver_counters(), ebt_double_chains(), ebt_get_table(), ebt_new_chain(), ebt_register_match(), ebt_register_target(), ebt_register_watcher(), and ebt_reinit_extensions().
#define ebt_to_chain | ( | repl | ) |
Referenced by do_command(), ebt_add_rule(), ebt_change_counters(), ebt_change_policy(), ebt_check_rule_exists(), ebt_delete_rule(), ebt_flush_chains(), ebt_rename_chain(), and ebt_zero_counters().
#define ERRORMSG_MAXLEN 128 |
Referenced by __ebt_print_error().
#define EXEC_STYLE_DAEMON 1 |
Referenced by do_command(), and main().
#define EXEC_STYLE_PRG 0 |
Referenced by do_command(), and main().
#define FILL_TARGET | ( | _str, | |
_pos | |||
) |
#define IPPROTO_DCCP 33 |
#define IPPROTO_SCTP 132 |
#define PRINT_VERSION printf(PROGNAME" v"PROGVERSION" ("PROGDATE")\n") |
Referenced by do_command(), and ebt_list_extensions().
#define PROC_SYS_MODPROBE "/proc/sys/kernel/modprobe" |
#define TARGET_INDEX | ( | _value | ) | (-_value - 1) |
#define TARGET_NAME | ( | _value | ) | (ebt_standard_targets[TARGET_INDEX(_value)]) |
void __ebt_print_bug | ( | char * | file, |
int | line, | ||
char * | format, | ||
... | |||
) |
References PROGNAME.
void __ebt_print_error | ( | char * | format, |
... | |||
) |
References ERRORMSG_MAXLEN.
int _ebt_check_inverse | ( | const char | option[], |
int | argc, | ||
char ** | argv | ||
) |
References ebt_invert, ebt_print_error, and NULL.
int do_command | ( | int | argc, |
char * | argv[], | ||
int | exec_style, | ||
struct ebt_u_replace * | replace_ | ||
) |
References _PATH_ETHERTYPES, ATOMIC_ENV_VARIABLE, ebt_counter::bcnt, ebt_u_entry::bitmask, buffer, ebt_u_replace::chains, ebt_u_table::check, ebt_u_entry::cnt, ebt_u_entry::cnt_surplus, ebt_u_replace::command, ebt_u_entry::destmac, ebt_u_entry::destmsk, ethertypeent::e_ethertype, EBT_802_3, EBT_ACCEPT, ebt_add_match(), ebt_add_rule(), ebt_add_watcher(), EBT_CHAIN_MAXNAMELEN, ebt_change_counters(), ebt_change_policy(), ebt_check_for_loops(), ebt_check_inverse2, ebt_check_option2, EBT_CONTINUE, ebt_delete_chain(), ebt_delete_rule(), ebt_deliver_counters(), ebt_deliver_table(), EBT_DESTMAC, ebt_do_final_checks(), ebt_errormsg, ebt_find_match(), ebt_find_table(), ebt_find_target(), ebt_find_watcher(), ebt_flush_chains(), ebt_get_chainnr(), ebt_get_kernel_table(), ebt_get_mac_and_mask(), ebt_get_table(), EBT_IDEST, EBT_IIN, EBT_ILOGICALIN, EBT_ILOGICALOUT, ebt_initialize_entry(), ebt_invert, EBT_IOUT, EBT_IPROTO, EBT_ISOURCE, ebt_list_extensions(), ebt_matches, ebt_modprobe, ebt_new_chain(), EBT_NOPROTO, ebt_print_bug, ebt_print_error, ebt_print_error2, ebt_print_memory, ebt_rename_chain(), EBT_RETURN, EBT_SOURCEMAC, EBT_STANDARD_TARGET, ebt_standard_targets, EBT_TABLE_MAXNAMELEN, ebt_to_chain, ebt_watchers, ebt_zero_counters(), ebt_u_entries::entries, entries, ebt_u_entry::ethproto, EXEC_STYLE_DAEMON, EXEC_STYLE_PRG, ebt_u_replace::filename, ebt_u_match::final_check, ebt_u_watcher::final_check, ebt_u_target::final_check, ebt_u_replace::flags, ebt_u_match::flags, ebt_u_watcher::flags, ebt_u_target::flags, getethertypebyname(), ebt_u_entries::hook_mask, IFNAMSIZ, ebt_u_entry::in, ebt_u_entry::invflags, LIST_C, LIST_MAC2, LIST_N, LIST_X, ebt_u_entry::logical_in, ebt_u_entry::logical_out, ebt_u_match_list::m, ebt_u_match::m, ebt_u_entry::m_list, ebt_u_replace::name, ebt_entry_target::name, ebt_u_target::name, ebt_u_replace::nentries, ebt_u_match_list::next, ebt_u_watcher_list::next, ebt_u_entry::next, ebt_u_match::next, ebt_u_watcher::next, NF_BR_BROUTING, NF_BR_NUMHOOKS, NULL, ebt_u_replace::num_chains, ebt_u_replace::num_counters, NUM_STANDARD_TARGETS, OPT_COMMAND, OPT_COMMANDS, OPT_COUNT, OPT_DEST, OPT_IN, OPT_JUMP, OPT_KERNELDATA, OPT_LOGICALIN, OPT_LOGICALOUT, OPT_OUT, OPT_PROTOCOL, OPT_SOURCE, OPT_TABLE, OPT_ZERO, ebt_u_match::option_offset, ebt_u_watcher::option_offset, ebt_u_target::option_offset, ebt_u_entry::out, ebt_u_match::parse, ebt_u_watcher::parse, ebt_u_target::parse, ebt_counter::pcnt, PRINT_VERSION, PROGNAME, ebt_u_entry::replace, ebt_u_replace::selected_chain, ebt_u_entry::sourcemac, ebt_u_entry::sourcemsk, ebt_u_entry::t, ebt_u_target::t, ebt_entry_target::u, use_lockfd, ebt_u_match::used, ebt_u_watcher::used, ebt_u_target::used, ebt_u_watcher_list::w, ebt_u_watcher::w, and ebt_u_entry::w_list.
void ebt_add_match | ( | struct ebt_u_entry * | new_entry, |
struct ebt_u_match * | m | ||
) |
References ebt_print_memory, ebt_u_entry::m_list, ebt_u_match_list::next, and NULL.
Referenced by do_command().
void ebt_add_rule | ( | struct ebt_u_replace * | replace, |
struct ebt_u_entry * | new_entry, | ||
int | rule_nr | ||
) |
References ebt_u_replace::cc, ebt_u_entry::cc, ebt_u_replace::chains, ebt_cntchanges::change, CNT_ADD, ebt_u_entries::counter_offset, ebt_print_error, ebt_print_memory, ebt_to_chain, ebt_u_entries::entries, entries, ebt_u_match_list::m, ebt_u_entry::m_list, ebt_u_entries::nentries, ebt_u_replace::nentries, ebt_cntchanges::next, ebt_u_match_list::next, ebt_u_watcher_list::next, ebt_u_entry::next, ebt_u_replace::num_chains, ebt_cntchanges::prev, ebt_u_entry::prev, ebt_u_replace::selected_chain, ebt_u_entry::t, ebt_cntchanges::type, ebt_u_watcher_list::w, and ebt_u_entry::w_list.
Referenced by do_command().
void ebt_add_watcher | ( | struct ebt_u_entry * | new_entry, |
struct ebt_u_watcher * | w | ||
) |
References ebt_print_memory, ebt_u_watcher_list::next, NULL, and ebt_u_entry::w_list.
Referenced by do_command().
void ebt_change_counters | ( | struct ebt_u_replace * | replace, |
struct ebt_u_entry * | new_entry, | ||
int | begin, | ||
int | end, | ||
struct ebt_counter * | cnt, | ||
int | mask | ||
) |
References ebt_counter::bcnt, ebt_u_entry::cc, ebt_cntchanges::change, ebt_u_entry::cnt, CNT_ADD, CNT_CHANGE, CNT_NORM, ebt_u_entry::cnt_surplus, ebt_print_bug, ebt_to_chain, ebt_u_entries::entries, mask, ebt_u_entry::next, ebt_counter::pcnt, and ebt_cntchanges::type.
Referenced by do_command().
void ebt_change_policy | ( | struct ebt_u_replace * | replace, |
int | policy | ||
) |
References EBT_CONTINUE, ebt_print_bug, ebt_to_chain, entries, NUM_STANDARD_TARGETS, and ebt_u_entries::policy.
Referenced by do_command().
void ebt_check_for_loops | ( | struct ebt_u_replace * | replace | ) |
References ebt_u_stack::chain_nr, ebt_u_replace::chains, ebt_u_stack::e, ebt_print_error, ebt_print_memory, EBT_STANDARD_TARGET, ebt_u_entries::entries, entries, ebt_u_stack::entries, ebt_u_entries::hook_mask, ebt_u_stack::n, ebt_u_entries::name, ebt_entry_target::name, ebt_u_entries::nentries, ebt_u_entry::next, NF_BR_NUMHOOKS, NULL, ebt_u_replace::num_chains, ebt_u_entry::t, ebt_entry_target::u, and verdict.
Referenced by do_command().
int ebt_check_for_references | ( | struct ebt_u_replace * | replace, |
int | print_err | ||
) |
int ebt_check_for_references2 | ( | struct ebt_u_replace * | replace, |
int | chain_nr, | ||
int | print_err | ||
) |
References ebt_u_replace::selected_chain.
References ebt_print_error, and mask.
int ebt_check_rule_exists | ( | struct ebt_u_replace * | replace, |
struct ebt_u_entry * | new_entry | ||
) |
References ebt_counter::bcnt, ebt_u_entry::bitmask, ebt_u_entry::cnt, ebt_u_match::compare, ebt_u_watcher::compare, ebt_u_target::compare, ebt_u_entry::destmac, EBT_DESTMAC, EBT_SOURCEMAC, ebt_to_chain, entries, ETH_ALEN, ebt_u_entry::ethproto, ebt_u_replace::flags, ebt_u_entry::in, ebt_u_entry::invflags, ebt_u_entry::logical_in, ebt_u_entry::logical_out, ebt_u_match_list::m, ebt_u_match::m, ebt_u_entry::m_list, ebt_entry_match::name, ebt_entry_watcher::name, ebt_entry_target::name, ebt_u_match_list::next, ebt_u_watcher_list::next, ebt_u_entry::next, OPT_COUNT, ebt_u_entry::out, ebt_counter::pcnt, ebt_u_entry::sourcemac, ebt_u_entry::t, ebt_u_target::t, ebt_entry_match::u, ebt_entry_watcher::u, ebt_entry_target::u, ebt_u_watcher_list::w, ebt_u_watcher::w, and ebt_u_entry::w_list.
void ebt_cleanup_replace | ( | struct ebt_u_replace * | replace | ) |
References ebt_u_replace::cc, ebt_u_replace::chains, ebt_u_replace::command, ebt_u_replace::counters, ebt_free_u_entry(), ebt_u_entries::entries, entries, ebt_u_replace::filename, ebt_u_replace::flags, ebt_u_replace::name, ebt_u_replace::nentries, ebt_cntchanges::next, ebt_u_entry::next, NULL, ebt_u_replace::num_chains, ebt_u_replace::num_counters, ebt_cntchanges::prev, ebt_u_replace::selected_chain, and ebt_u_replace::valid_hooks.
Referenced by main().
void ebt_delete_chain | ( | struct ebt_u_replace * | replace | ) |
References ebt_print_bug, NF_BR_NUMHOOKS, and ebt_u_replace::selected_chain.
Referenced by do_command().
void ebt_delete_rule | ( | struct ebt_u_replace * | replace, |
struct ebt_u_entry * | new_entry, | ||
int | begin, | ||
int | end | ||
) |
References ebt_u_entry::cc, ebt_u_replace::chains, ebt_u_entries::counter_offset, ebt_delete_cc(), ebt_free_u_entry(), ebt_to_chain, ebt_u_entries::entries, ebt_u_entries::nentries, ebt_u_replace::nentries, ebt_u_entry::next, ebt_u_entry::prev, and ebt_u_replace::selected_chain.
Referenced by do_command().
void ebt_deliver_counters | ( | struct ebt_u_replace * | repl | ) |
References ebt_counter::bcnt, ebt_u_replace::cc, ebt_u_replace::chains, ebt_cntchanges::change, ebt_u_entry::cnt, CNT_ADD, CNT_CHANGE, CNT_DEL, CNT_NORM, ebt_u_entry::cnt_surplus, ebt_replace::counters, ebt_u_replace::counters, ebt_print_bug, ebt_print_memory, EBT_SO_SET_COUNTERS, ebt_u_entries::entries, ebt_u_replace::filename, ebt_replace::name, ebt_u_replace::name, ebt_u_replace::nentries, ebt_cntchanges::next, ebt_u_entry::next, NULL, ebt_u_replace::num_chains, ebt_replace::num_counters, ebt_u_replace::num_counters, ebt_counter::pcnt, ebt_cntchanges::prev, sockfd, sparc_cast, and ebt_cntchanges::type.
Referenced by do_command(), and main().
void ebt_deliver_table | ( | struct ebt_u_replace * | repl | ) |
References ebt_u_replace::command, ebt_print_error, EBT_SO_SET_ENTRIES, ebtables_insmod(), ebt_replace::entries, ebt_u_replace::filename, NULL, and sockfd.
Referenced by do_command(), and main().
void ebt_do_final_checks | ( | struct ebt_u_replace * | replace, |
struct ebt_u_entry * | e, | ||
struct ebt_u_entries * | entries | ||
) |
References ebt_errormsg, ebt_find_match(), ebt_find_target(), ebt_find_watcher(), ebt_u_match::final_check, ebt_u_watcher::final_check, ebt_u_target::final_check, ebt_u_entries::hook_mask, ebt_u_match_list::m, ebt_u_match::m, ebt_u_entry::m_list, ebt_u_replace::name, ebt_entry_match::name, ebt_entry_watcher::name, ebt_entry_target::name, ebt_u_match_list::next, ebt_u_watcher_list::next, ebt_u_entry::t, ebt_u_target::t, ebt_entry_match::u, ebt_entry_watcher::u, ebt_entry_target::u, ebt_u_watcher_list::w, ebt_u_watcher::w, and ebt_u_entry::w_list.
Referenced by do_command().
void ebt_double_chains | ( | struct ebt_u_replace * | replace | ) |
References ebt_u_replace::chains, ebt_print_memory, and ebt_u_replace::max_chains.
Referenced by ebt_new_chain().
struct ebt_u_match* ebt_find_match | ( | const char * | name | ) |
References ebt_matches, ebt_u_match::m, ebt_u_match::name, and ebt_u_match::next.
Referenced by do_command(), and ebt_do_final_checks().
struct ebt_u_table* ebt_find_table | ( | const char * | name | ) |
References ebt_tables, ebt_u_table::name, and ebt_u_table::next.
Referenced by do_command(), and ebt_get_kernel_table().
struct ebt_u_target* ebt_find_target | ( | const char * | name | ) |
References ebt_targets, ebt_u_target::name, ebt_u_target::next, and ebt_u_target::t.
Referenced by do_command(), ebt_do_final_checks(), and ebt_initialize_entry().
struct ebt_u_watcher* ebt_find_watcher | ( | const char * | name | ) |
References ebt_watchers, ebt_u_watcher::name, ebt_u_watcher::next, and ebt_u_watcher::w.
Referenced by do_command(), and ebt_do_final_checks().
void ebt_flush_chains | ( | struct ebt_u_replace * | replace | ) |
References ebt_u_replace::chains, ebt_u_entries::counter_offset, ebt_empty_chain(), ebt_to_chain, entries, ebt_u_entries::nentries, ebt_u_replace::nentries, ebt_u_replace::num_chains, and ebt_u_replace::selected_chain.
Referenced by do_command().
void ebt_free_u_entry | ( | struct ebt_u_entry * | e | ) |
References ebt_u_match_list::m, ebt_u_entry::m_list, ebt_u_match_list::next, ebt_u_watcher_list::next, ebt_u_entry::t, ebt_u_watcher_list::w, and ebt_u_entry::w_list.
Referenced by ebt_cleanup_replace(), ebt_delete_rule(), and ebt_empty_chain().
int ebt_get_chainnr | ( | const struct ebt_u_replace * | replace, |
const char * | arg | ||
) |
References ebt_u_replace::chains, ebt_u_entries::name, and ebt_u_replace::num_chains.
Referenced by do_command(), and main().
int ebt_get_kernel_table | ( | struct ebt_u_replace * | replace, |
int | init | ||
) |
References ebt_errormsg, ebt_find_table(), ebt_get_table(), ebt_print_error, ebt_print_error2, ebtables_insmod(), LOCKFILE, ebt_u_replace::name, and use_lockfd.
Referenced by do_command(), and main().
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().
int ebt_get_table | ( | struct ebt_u_replace * | repl, |
int | init | ||
) |
References ebt_u_replace::cc, ebt_u_replace::chains, ebt_cntchanges::change, CNT_NORM, ebt_u_replace::command, ebt_replace::counters, ebt_u_replace::counters, EBT_ENTRY_ITERATE, EBT_ORI_MAX_CHAINS, ebt_print_bug, ebt_print_memory, ebt_replace::entries, ebt_replace::entries_size, ebt_u_replace::filename, hook, ebt_u_replace::max_chains, ebt_replace::name, ebt_u_replace::name, ebt_replace::nentries, ebt_u_replace::nentries, ebt_cntchanges::next, NF_BR_NUMHOOKS, NULL, ebt_u_replace::num_chains, ebt_replace::num_counters, ebt_u_replace::num_counters, ebt_cntchanges::prev, ebt_cntchanges::type, ebt_replace::valid_hooks, and ebt_u_replace::valid_hooks.
Referenced by do_command(), and ebt_get_kernel_table().
void ebt_initialize_entry | ( | struct ebt_u_entry * | e | ) |
References ebt_counter::bcnt, ebt_u_entry::bitmask, ebt_u_entry::cnt, ebt_u_entry::cnt_surplus, EBT_CONTINUE, ebt_find_target(), EBT_NOPROTO, ebt_print_bug, EBT_STANDARD_TARGET, ebt_u_entry::ethproto, ebt_u_entry::in, ebt_u_entry::invflags, ebt_u_entry::logical_in, ebt_u_entry::logical_out, ebt_u_entry::m_list, NULL, ebt_u_entry::out, ebt_counter::pcnt, ebt_u_entry::t, ebt_u_target::used, and ebt_u_entry::w_list.
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 | ) |
void ebt_iterate_matches | ( | void(*)(struct ebt_u_match *) | f | ) |
References ebt_u_match::next.
Referenced by ebt_early_init_once().
void ebt_iterate_targets | ( | void(*)(struct ebt_u_target *) | f | ) |
References ebt_u_target::next.
Referenced by ebt_early_init_once().
void ebt_iterate_watchers | ( | void(*)(struct ebt_u_watcher *) | f | ) |
References ebt_u_watcher::next.
Referenced by ebt_early_init_once().
void ebt_list_extensions | ( | ) |
References ebt_matches, ebt_tables, ebt_targets, ebt_watchers, ebt_u_match::m, ebt_u_table::name, ebt_u_match::name, ebt_u_watcher::name, ebt_u_target::name, ebt_u_table::next, ebt_u_match::next, ebt_u_watcher::next, ebt_u_target::next, PRINT_VERSION, ebt_u_target::t, and ebt_u_watcher::w.
Referenced by do_command().
char* ebt_mask_to_dotted | ( | uint32_t | mask | ) |
References buf.
struct ebt_u_entries * ebt_name_to_chain | ( | const struct ebt_u_replace * | replace, |
const char * | arg | ||
) |
References ebt_u_replace::chains, ebt_u_entries::name, NULL, and ebt_u_replace::num_chains.
void ebt_new_chain | ( | struct ebt_u_replace * | replace, |
const char * | name, | ||
int | policy | ||
) |
References ebt_u_replace::chains, ebt_double_chains(), ebt_print_memory, ebt_u_replace::max_chains, ebt_u_entries::nentries, ebt_u_replace::nentries, new, NULL, ebt_u_replace::num_chains, and ebt_u_entries::policy.
Referenced by do_command(), and main().
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.
void ebt_register_match | ( | struct ebt_u_match * | ) |
References EBT_ALIGN, ebt_print_memory, ebt_u_match::init, ebt_u_match::m, ebt_entry_match::match_size, ebt_entry_match::name, ebt_u_match::name, ebt_u_match::next, NULL, ebt_u_match::size, size, and ebt_entry_match::u.
Referenced by _init().
void ebt_register_table | ( | struct ebt_u_table * | ) |
References ebt_tables, and ebt_u_table::next.
Referenced by _init().
void ebt_register_target | ( | struct ebt_u_target * | t | ) |
References EBT_ALIGN, ebt_print_memory, ebt_u_target::init, ebt_entry_target::name, ebt_u_target::name, ebt_u_target::next, NULL, size, ebt_u_target::size, ebt_u_target::t, ebt_entry_target::target_size, and ebt_entry_target::u.
Referenced by _init().
void ebt_register_watcher | ( | struct ebt_u_watcher * | ) |
References EBT_ALIGN, ebt_print_memory, ebt_u_watcher::init, ebt_entry_watcher::name, ebt_u_watcher::name, ebt_u_watcher::next, NULL, ebt_u_watcher::size, size, ebt_entry_watcher::u, ebt_u_watcher::w, and ebt_entry_watcher::watcher_size.
Referenced by _init().
void ebt_reinit_extensions | ( | ) |
References EBT_ALIGN, ebt_print_memory, ebt_u_match::flags, ebt_u_watcher::flags, ebt_u_target::flags, ebt_u_match::init, ebt_u_watcher::init, ebt_u_target::init, ebt_u_match::m, ebt_entry_match::match_size, ebt_entry_match::name, ebt_entry_watcher::name, ebt_entry_target::name, ebt_u_match::name, ebt_u_watcher::name, ebt_u_target::name, ebt_u_match::next, ebt_u_watcher::next, ebt_u_target::next, ebt_u_match::size, ebt_u_watcher::size, size, ebt_u_target::size, ebt_u_target::t, ebt_entry_target::target_size, ebt_entry_match::u, ebt_entry_watcher::u, ebt_entry_target::u, ebt_u_match::used, ebt_u_watcher::used, ebt_u_target::used, ebt_u_watcher::w, and ebt_entry_watcher::watcher_size.
Referenced by main().
void ebt_rename_chain | ( | struct ebt_u_replace * | replace, |
const char * | name | ||
) |
References ebt_print_bug, ebt_to_chain, and ebt_u_entries::name.
Referenced by do_command().
void ebt_zero_counters | ( | struct ebt_u_replace * | replace | ) |
References ebt_counter::bcnt, ebt_u_entry::cc, ebt_u_replace::chains, ebt_cntchanges::change, ebt_u_entry::cnt, CNT_CHANGE, CNT_NORM, ebt_to_chain, ebt_u_entries::entries, ebt_u_entries::nentries, ebt_u_entry::next, ebt_u_replace::num_chains, ebt_counter::pcnt, and ebt_cntchanges::type.
Referenced by do_command().
int ebtables_insmod | ( | const char * | modname | ) |
Referenced by ebt_deliver_table(), and ebt_get_kernel_table().
struct ethertypeent* parseethertypebynumber | ( | int | type | ) |
char ebt_errormsg[ERRORMSG_MAXLEN] |
Referenced by do_command(), ebt_do_final_checks(), ebt_get_kernel_table(), and main().
const char* ebt_hooknames[NF_BR_NUMHOOKS] |
int ebt_invert |
Referenced by _ebt_check_inverse(), and do_command().
struct ebt_u_match* ebt_matches |
Referenced by do_command(), ebt_find_match(), and ebt_list_extensions().
char* ebt_modprobe |
Referenced by do_command().
int ebt_printstyle_mac |
Referenced by ebt_print_mac().
int ebt_silent |
Referenced by main().
const char* ebt_standard_targets[NUM_STANDARD_TARGETS] |
Referenced by do_command(), and main().
struct ebt_u_table* ebt_tables |
Referenced by ebt_find_table(), ebt_list_extensions(), and ebt_register_table().
struct ebt_u_target* ebt_targets |
Referenced by ebt_find_target(), and ebt_list_extensions().
struct ebt_u_watcher* ebt_watchers |
Referenced by do_command(), ebt_find_watcher(), and ebt_list_extensions().
int use_lockfd |
Referenced by __attribute__(), do_command(), and ebt_get_kernel_table().