Changeset 1770 in MondoRescue for branches/stable/mindi-busybox/networking/libiproute/ll_types.c
- Timestamp:
- Nov 6, 2007, 11:01:53 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi-busybox/networking/libiproute/ll_types.c
r821 r1770 1 /* vi: set sw=4 ts=4: */ 1 2 /* 2 3 * ll_types.c … … 9 10 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> 10 11 */ 11 #include <stdio.h>12 12 #include <arpa/inet.h> 13 14 13 #include <linux/if_arp.h> 15 14 15 #include "libbb.h" 16 16 #include "rt_names.h" 17 17 18 const char 18 const char* ll_type_n2a(int type, char *buf, int len) 19 19 { 20 20 #define __PF(f,n) { ARPHRD_##f, #n }, 21 static struct {21 static const struct { 22 22 int type; 23 c har *name;23 const char *name; 24 24 } arphrd_names[] = { 25 25 { 0, "generic" }, … … 109 109 110 110 int i; 111 for (i =0; i<sizeof(arphrd_names)/sizeof(arphrd_names[0]); i++) {111 for (i = 0; i < ARRAY_SIZE(arphrd_names); i++) { 112 112 if (arphrd_names[i].type == type) 113 113 return arphrd_names[i].name;
Note:
See TracChangeset
for help on using the changeset viewer.