summaryrefslogtreecommitdiff
path: root/useful_functions.c
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2006-01-23 18:50:54 +0000
committerBart De Schuymer <bdschuym@pandora.be>2006-01-23 18:50:54 +0000
commit510c9ce916464d6958c4394169fb5e885f4d3a06 (patch)
tree8cc6d20db5724c7a2c120306cbd70ec90ab8adfd /useful_functions.c
parent639bbe9d2f41b776bc3384590151265367de01d9 (diff)
downloadebtables-510c9ce916464d6958c4394169fb5e885f4d3a06.tar.gz
ebtables-510c9ce916464d6958c4394169fb5e885f4d3a06.tar.bz2
ebtables-510c9ce916464d6958c4394169fb5e885f4d3a06.zip
remove unsigned char * warning with gcc 4.0
Diffstat (limited to 'useful_functions.c')
-rw-r--r--useful_functions.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/useful_functions.c b/useful_functions.c
index 0cd3d51..131851a 100644
--- a/useful_functions.c
+++ b/useful_functions.c
@@ -44,18 +44,18 @@ const unsigned char msk_type_bridge_group[ETH_ALEN] = {255,255,255,255,255,255};
* then always has the same length */
int ebt_printstyle_mac;
-void ebt_print_mac(const char *mac)
+void ebt_print_mac(const unsigned char *mac)
{
if (ebt_printstyle_mac == 2) {
int j;
for (j = 0; j < ETH_ALEN; j++)
- printf("%02x%s", (unsigned char)mac[j],
+ printf("%02x%s", mac[j],
(j==ETH_ALEN-1) ? "" : ":");
} else
printf("%s", ether_ntoa((struct ether_addr *) mac));
}
-void ebt_print_mac_and_mask(const char *mac, const char *mask)
+void ebt_print_mac_and_mask(const unsigned char *mac, const unsigned char *mask)
{
char hlpmsk[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
@@ -91,7 +91,8 @@ struct ethertypeent *parseethertypebynumber(int type)
}
/* Put the mac address into 6 (ETH_ALEN) bytes returns 0 on success. */
-int ebt_get_mac_and_mask(char *from, char *to, char *mask)
+int ebt_get_mac_and_mask(const char *from, unsigned char *to,
+ unsigned char *mask)
{
char *p;
int i;