#include <linux/if_ether.h>
#endif
-#ifdef UNUSED
+#warning de-bloat
/* Before re-enabling this, please (1) conditionalize exotic protocols
* on CONFIG_something, and (2) decouple strings and numbers
* (use llproto_ids[] = n,n,n..; and llproto_names[] = "loop\0" "pup\0" ...;)
const char *ll_proto_n2a(unsigned short id, char *buf, int len)
{
- int i;
-
+ unsigned i;
id = ntohs(id);
-
for (i = 0; i < ARRAY_SIZE(llproto_names); i++) {
if (llproto_names[i].id == id)
return llproto_names[i].name;
int ll_proto_a2n(unsigned short *id, char *buf)
{
- int i;
+ unsigned i;
for (i = 0; i < ARRAY_SIZE(llproto_names); i++) {
if (strcasecmp(llproto_names[i].name, buf) == 0) {
*id = htons(llproto_names[i].id);
return 0;
}
-#endif /* UNUSED */