From 2f0d748e21037fe684efeac09048d17d1eec04c9 Mon Sep 17 00:00:00 2001 From: Bart De Schuymer Date: Wed, 4 Jun 2003 06:23:49 +0000 Subject: undo last change --- extensions/ebt_vlan.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'extensions/ebt_vlan.c') diff --git a/extensions/ebt_vlan.c b/extensions/ebt_vlan.c index e95a79d..f7bec62 100644 --- a/extensions/ebt_vlan.c +++ b/extensions/ebt_vlan.c @@ -76,6 +76,10 @@ static struct option opts[] = { struct ethertypeent *ethent; +/* + * Print out local help by "ebtables -h " + */ + static void print_help() { #define HELP_TITLE "802.1Q VLAN extension" @@ -93,19 +97,33 @@ static void print_help() OPT_VLAN_FLAGS & OPT_VLAN_ENCAP ? "[!] " : ""); } +/* + * Initialization function + */ static void init(struct ebt_entry_match *match) { struct ebt_vlan_info *vlaninfo = (struct ebt_vlan_info *) match->data; - + /* + * Set initial values + */ vlaninfo->id = 1; /* Default VID for VLAN-tagged 802.1Q frames */ vlaninfo->prio = 0; vlaninfo->encap = 0; vlaninfo->invflags = 0; vlaninfo->bitmask = 0; - match->version = VERSIONIZE(1,0); } + +/* + * Parse passed arguments values (ranges, flags, etc...) + * int c - parameter number from static struct option opts[] + * int argc - total amout of arguments (std argc value) + * int argv - arguments (std argv value) + * const struct ebt_u_entry *entry - default ebtables entry set + * unsigned int *flags - + * struct ebt_entry_match **match - + */ static int parse(int c, char **argv, @@ -166,6 +184,9 @@ parse(int c, return 1; } +/* + * Final check - logical conditions + */ static void final_check(const struct ebt_u_entry *entry, const struct ebt_entry_match *match, @@ -201,6 +222,9 @@ final_check(const struct ebt_u_entry *entry, } } +/* + * Print line when listing rules by ebtables -L + */ static void print(const struct ebt_u_entry *entry, const struct ebt_entry_match *match) { -- cgit v1.2.3