1 /* vi: set sw=4 ts=4: */
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version
8 * 2 of the License, or (at your option) any later version.
10 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
13 #include <arpa/inet.h>
15 #include <linux/if_arp.h>
19 const char * ll_type_n2a(int type, char *buf, int len)
21 #define __PF(f,n) { ARPHRD_##f, #n },
32 #ifdef ARPHRD_IEEE802_TR
43 __PF(METRICOM,metricom)
44 #ifdef ARPHRD_IEEE1394
45 __PF(IEEE1394,ieee1394)
71 __PF(LOOPBACK,loopback)
87 __PF(FCFABRIC+1,fcfb1)
88 __PF(FCFABRIC+2,fcfb2)
89 __PF(FCFABRIC+3,fcfb3)
90 __PF(FCFABRIC+4,fcfb4)
91 __PF(FCFABRIC+5,fcfb5)
92 __PF(FCFABRIC+6,fcfb6)
93 __PF(FCFABRIC+7,fcfb7)
94 __PF(FCFABRIC+8,fcfb8)
95 __PF(FCFABRIC+9,fcfb9)
96 __PF(FCFABRIC+10,fcfb10)
97 __PF(FCFABRIC+11,fcfb11)
98 __PF(FCFABRIC+12,fcfb12)
99 #ifdef ARPHRD_IEEE802_TR
102 #ifdef ARPHRD_IEEE80211
103 __PF(IEEE80211,ieee802.11)
112 for (i=0; i<sizeof(arphrd_names)/sizeof(arphrd_names[0]); i++) {
113 if (arphrd_names[i].type == type)
114 return arphrd_names[i].name;
116 snprintf(buf, len, "[%d]", type);