summaryrefslogtreecommitdiff
path: root/networking/libiproute
diff options
context:
space:
mode:
Diffstat (limited to 'networking/libiproute')
-rw-r--r--networking/libiproute/ll_types.c9
-rw-r--r--networking/libiproute/rt_names.h7
2 files changed, 7 insertions, 9 deletions
diff --git a/networking/libiproute/ll_types.c b/networking/libiproute/ll_types.c
index a53c894..416ea6b 100644
--- a/networking/libiproute/ll_types.c
+++ b/networking/libiproute/ll_types.c
@@ -11,17 +11,16 @@
*/
#include <stdio.h>
#include <arpa/inet.h>
-
#include <linux/if_arp.h>
#include "rt_names.h"
-const char * ll_type_n2a(int type, char *buf, int len)
+const char* ll_type_n2a(int type, char *buf, int len)
{
#define __PF(f,n) { ARPHRD_##f, #n },
-static struct {
+static const struct {
int type;
- char *name;
+ const char *name;
} arphrd_names[] = {
{ 0, "generic" },
__PF(ETHER,ether)
@@ -109,7 +108,7 @@ __PF(VOID,void)
#undef __PF
int i;
- for (i=0; i<sizeof(arphrd_names)/sizeof(arphrd_names[0]); i++) {
+ for (i = 0; i < sizeof(arphrd_names)/sizeof(arphrd_names[0]); i++) {
if (arphrd_names[i].type == type)
return arphrd_names[i].name;
}
diff --git a/networking/libiproute/rt_names.h b/networking/libiproute/rt_names.h
index 92b807f..98c22b0 100644
--- a/networking/libiproute/rt_names.h
+++ b/networking/libiproute/rt_names.h
@@ -16,14 +16,13 @@ extern int rtnl_dsfield_a2n(uint32_t *id, char *arg);
extern int rtnl_rttable_a2n(uint32_t *id, char *arg);
-extern const char * ll_type_n2a(int type, char *buf, int len);
+extern const char* ll_type_n2a(int type, char *buf, int len);
-extern const char *ll_addr_n2a(unsigned char *addr, int alen, int type,
+extern const char* ll_addr_n2a(unsigned char *addr, int alen, int type,
char *buf, int blen);
extern int ll_addr_a2n(unsigned char *lladdr, int len, char *arg);
-extern const char * ll_proto_n2a(unsigned short id, char *buf, int len);
+extern const char* ll_proto_n2a(unsigned short id, char *buf, int len);
extern int ll_proto_a2n(unsigned short *id, char *buf);
-
#endif