Index: src/core/snmp/mib2.c
===================================================================
RCS file: /sources/lwip/lwip/src/core/snmp/mib2.c,v
retrieving revision 1.28
diff -w -b -u -3 -p -r1.28 mib2.c
--- src/core/snmp/mib2.c	25 Nov 2007 13:57:19 -0000	1.28
+++ src/core/snmp/mib2.c	27 Nov 2007 05:05:07 -0000
@@ -2692,7 +2692,7 @@ atentry_get_object_def(u8_t ident_len, s
         od->instance = MIB_OBJECT_TAB;
         od->access = MIB_OBJECT_READ_WRITE;
         od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR);
-        od->v_len = sizeof(struct eth_addr);
+        od->v_len = 6; /** @todo try to use netif::hwaddr_len */
         break;
       case 3: /* atNetAddress */
         od->instance = MIB_OBJECT_TAB;
@@ -2716,9 +2716,11 @@ atentry_get_object_def(u8_t ident_len, s
 static void
 atentry_get_value(struct obj_def *od, u16_t len, void *value)
 {
+#if LWIP_ARP
   u8_t id;
   struct eth_addr* ethaddr_ret;
   struct ip_addr* ipaddr_ret;
+#endif /* LWIP_ARP */
   struct ip_addr ip;
   struct netif *netif;
 
@@ -2728,6 +2730,7 @@ atentry_get_value(struct obj_def *od, u1
   snmp_oidtoip(&od->id_inst_ptr[2], &ip);
   ip.addr = htonl(ip.addr);
 
+#if LWIP_ARP /** @todo implement a netif_find_addr */
   if (etharp_find_addr(netif, &ip, &ethaddr_ret, &ipaddr_ret) > -1)
   {
     id = od->id_inst_ptr[0];
@@ -2755,6 +2758,7 @@ atentry_get_value(struct obj_def *od, u1
         break;
     }
   }
+#endif /* LWIP_ARP */
 }
 
 static void
@@ -3372,7 +3376,7 @@ ip_ntomentry_get_object_def(u8_t ident_l
         od->instance = MIB_OBJECT_TAB;
         od->access = MIB_OBJECT_READ_WRITE;
         od->asn_type = (SNMP_ASN1_UNIV | SNMP_ASN1_PRIMIT | SNMP_ASN1_OC_STR);
-        od->v_len = sizeof(struct eth_addr);
+        od->v_len = 6; /** @todo try to use netif::hwaddr_len */
         break;
       case 3: /* ipNetToMediaNetAddress */
         od->instance = MIB_OBJECT_TAB;
@@ -3396,9 +3400,11 @@ ip_ntomentry_get_object_def(u8_t ident_l
 static void
 ip_ntomentry_get_value(struct obj_def *od, u16_t len, void *value)
 {
+#if LWIP_ARP
   u8_t id;
   struct eth_addr* ethaddr_ret;
   struct ip_addr* ipaddr_ret;
+#endif /* LWIP_ARP */
   struct ip_addr ip;
   struct netif *netif;
 
@@ -3408,6 +3414,7 @@ ip_ntomentry_get_value(struct obj_def *o
   snmp_oidtoip(&od->id_inst_ptr[2], &ip);
   ip.addr = htonl(ip.addr);
 
+#if LWIP_ARP /** @todo implement a netif_find_addr */
   if (etharp_find_addr(netif, &ip, &ethaddr_ret, &ipaddr_ret) > -1)
   {
     id = od->id_inst_ptr[0];
@@ -3442,6 +3449,7 @@ ip_ntomentry_get_value(struct obj_def *o
         break;
     }
   }
+#endif /* LWIP_ARP */
 }
 
 static void

