summaryrefslogtreecommitdiffstats
path: root/userspace/ebtables2/extensions/ebt_802_3.c
diff options
context:
space:
mode:
Diffstat (limited to 'userspace/ebtables2/extensions/ebt_802_3.c')
-rw-r--r--userspace/ebtables2/extensions/ebt_802_3.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/userspace/ebtables2/extensions/ebt_802_3.c b/userspace/ebtables2/extensions/ebt_802_3.c
index f76b20a..e0b65ee 100644
--- a/userspace/ebtables2/extensions/ebt_802_3.c
+++ b/userspace/ebtables2/extensions/ebt_802_3.c
@@ -48,11 +48,11 @@ static int parse(int c, char **argv, int argc, const struct ebt_u_entry *entry,
info->invflags |= EBT_802_3_SAP;
if (optind > argc)
- print_error("Missing 802.3-sap argument");
+ ebt_print_error("Missing 802.3-sap argument");
i = strtoul(argv[optind - 1], &end, 16);
if (i > 255 || *end != '\0')
- print_error("Problem with specified "
- "sap hex value, %x",i);
+ ebt_print_error("Problem with specified "
+ "sap hex value, %x",i);
info->sap = i; /* one byte, so no byte order worries */
info->bitmask |= EBT_802_3_SAP;
break;
@@ -61,11 +61,11 @@ static int parse(int c, char **argv, int argc, const struct ebt_u_entry *entry,
if (ebt_check_inverse(optarg))
info->invflags |= EBT_802_3_TYPE;
if (optind > argc)
- print_error("Missing 802.3-type argument");
+ ebt_print_error("Missing 802.3-type argument");
i = strtoul(argv[optind - 1], &end, 16);
if (i > 65535 || *end != '\0') {
- print_error("Problem with the specified "
- "type hex value, %x",i);
+ ebt_print_error("Problem with the specified "
+ "type hex value, %x",i);
}
info->type = htons(i);
info->bitmask |= EBT_802_3_TYPE;
@@ -81,8 +81,8 @@ static void final_check(const struct ebt_u_entry *entry,
unsigned int hookmask, unsigned int time)
{
if (!(entry->bitmask & EBT_802_3))
- print_error("For 802.3 DSAP/SSAP filtering the protocol "
- "must be LENGTH");
+ ebt_print_error("For 802.3 DSAP/SSAP filtering the protocol "
+ "must be LENGTH");
}
static void print(const struct ebt_u_entry *entry,
@@ -138,8 +138,7 @@ static struct ebt_u_match _802_3_match =
.extra_ops = opts,
};
-static void _init(void) __attribute__ ((constructor));
-static void _init(void)
+void _init(void)
{
ebt_register_match(&_802_3_match);
}