35bdba2115
ARPHRD_NETROM was excluded, most likely just because it is protocol No. 0, and ARPHRD_CISCO was reported under its alias name "HDLC". Let's just allow defined aliases under the main name.
13 lines
276 B
Awk
13 lines
276 B
Awk
BEGIN{
|
|
print "const char *arphrd_to_name(int id) {"
|
|
print " switch(id) {"
|
|
}
|
|
!/^HDLC$/ {
|
|
printf " case ARPHRD_%s: return \"%s\";\n", $1, $1
|
|
}
|
|
END{
|
|
print " default: return NULL;"
|
|
print " }"
|
|
print "}"
|
|
}
|