Commit 4dbda0f4 authored by Stephen Hemminger's avatar Stephen Hemminger

Update ARP header type table

Add all current values. Since if_arp.h is included, get rid
of ifdefs'. Make table constant.
parent 9ec0e899
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
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 }, #define __PF(f,n) { ARPHRD_##f, #n },
static struct { static const struct {
int type; int type;
const char *name; const char *name;
} arphrd_names[] = { } arphrd_names[] = {
...@@ -40,25 +40,14 @@ __PF(EETHER,eether) ...@@ -40,25 +40,14 @@ __PF(EETHER,eether)
__PF(AX25,ax25) __PF(AX25,ax25)
__PF(PRONET,pronet) __PF(PRONET,pronet)
__PF(CHAOS,chaos) __PF(CHAOS,chaos)
#ifdef ARPHRD_IEEE802_TR
__PF(IEEE802,ieee802) __PF(IEEE802,ieee802)
#else
__PF(IEEE802,tr)
#endif
__PF(ARCNET,arcnet) __PF(ARCNET,arcnet)
__PF(APPLETLK,atalk) __PF(APPLETLK,atalk)
__PF(DLCI,dlci) __PF(DLCI,dlci)
#ifdef ARPHRD_ATM
__PF(ATM,atm) __PF(ATM,atm)
#endif
__PF(METRICOM,metricom) __PF(METRICOM,metricom)
#ifdef ARPHRD_IEEE1394
__PF(IEEE1394,ieee1394) __PF(IEEE1394,ieee1394)
#endif
#ifdef ARPHRD_INFINIBAND
__PF(INFINIBAND,infiniband) __PF(INFINIBAND,infiniband)
#endif
__PF(SLIP,slip) __PF(SLIP,slip)
__PF(CSLIP,cslip) __PF(CSLIP,cslip)
__PF(SLIP6,slip6) __PF(SLIP6,slip6)
...@@ -67,20 +56,13 @@ __PF(RSRVD,rsrvd) ...@@ -67,20 +56,13 @@ __PF(RSRVD,rsrvd)
__PF(ADAPT,adapt) __PF(ADAPT,adapt)
__PF(ROSE,rose) __PF(ROSE,rose)
__PF(X25,x25) __PF(X25,x25)
#ifdef ARPHRD_HWX25
__PF(HWX25,hwx25) __PF(HWX25,hwx25)
#endif
__PF(CAN,can) __PF(CAN,can)
__PF(PPP,ppp) __PF(PPP,ppp)
__PF(HDLC,hdlc) __PF(HDLC,hdlc)
__PF(LAPB,lapb) __PF(LAPB,lapb)
#ifdef ARPHRD_DDCMP
__PF(DDCMP,ddcmp) __PF(DDCMP,ddcmp)
#endif
#ifdef ARPHRD_RAWHDLC
__PF(RAWHDLC,rawhdlc) __PF(RAWHDLC,rawhdlc)
#endif
__PF(TUNNEL,ipip) __PF(TUNNEL,ipip)
__PF(TUNNEL6,tunnel6) __PF(TUNNEL6,tunnel6)
__PF(FRAD,frad) __PF(FRAD,frad)
...@@ -113,24 +95,17 @@ __PF(FCFABRIC+9,fcfb9) ...@@ -113,24 +95,17 @@ __PF(FCFABRIC+9,fcfb9)
__PF(FCFABRIC+10,fcfb10) __PF(FCFABRIC+10,fcfb10)
__PF(FCFABRIC+11,fcfb11) __PF(FCFABRIC+11,fcfb11)
__PF(FCFABRIC+12,fcfb12) __PF(FCFABRIC+12,fcfb12)
#ifdef ARPHRD_IEEE802_TR
__PF(IEEE802_TR,tr) __PF(IEEE802_TR,tr)
#endif
#ifdef ARPHRD_IEEE80211
__PF(IEEE80211,ieee802.11) __PF(IEEE80211,ieee802.11)
#endif
#ifdef ARPHRD_IEEE80211_PRISM
__PF(IEEE80211_PRISM,ieee802.11/prism) __PF(IEEE80211_PRISM,ieee802.11/prism)
#endif
#ifdef ARPHRD_IEEE80211_RADIOTAP
__PF(IEEE80211_RADIOTAP,ieee802.11/radiotap) __PF(IEEE80211_RADIOTAP,ieee802.11/radiotap)
#endif __PF(IEEE802154, ieee802.15.4)
#ifdef ARPHRD_NONE __PF(PHONET, phonet)
__PF(PHONET_PIPE, phonet_pipe)
__PF(CAIF, caif)
__PF(NONE, none) __PF(NONE, none)
#endif
#ifdef ARPHRD_VOID
__PF(VOID,void) __PF(VOID,void)
#endif
}; };
#undef __PF #undef __PF
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment