4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
9 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
12 #include <arpa/inet.h>
14 #include <linux/if_arp.h>
16 char * ll_type_n2a(int type, char *buf, int len)
18 #define __PF(f,n) { ARPHRD_##f, #n },
29 #ifdef ARPHRD_IEEE802_TR
38 __PF(METRICOM,metricom)
39 #ifdef ARPHRD_IEEE1394
40 __PF(IEEE1394,ieee1394)
62 __PF(LOOPBACK,loopback)
78 __PF(FCFABRIC+1,fcfb1)
79 __PF(FCFABRIC+2,fcfb2)
80 __PF(FCFABRIC+3,fcfb3)
81 __PF(FCFABRIC+4,fcfb4)
82 __PF(FCFABRIC+5,fcfb5)
83 __PF(FCFABRIC+6,fcfb6)
84 __PF(FCFABRIC+7,fcfb7)
85 __PF(FCFABRIC+8,fcfb8)
86 __PF(FCFABRIC+9,fcfb9)
87 __PF(FCFABRIC+10,fcfb10)
88 __PF(FCFABRIC+11,fcfb11)
89 __PF(FCFABRIC+12,fcfb12)
90 #ifdef ARPHRD_IEEE802_TR
93 #ifdef ARPHRD_IEEE80211
94 __PF(IEEE80211,ieee802.11)
103 for (i=0; i<sizeof(arphrd_names)/sizeof(arphrd_names[0]); i++) {
104 if (arphrd_names[i].type == type)
105 return arphrd_names[i].name;
107 snprintf(buf, len, "[%d]", type);