 #include "Cosa/IOStream/Driver/UART.hh"
 #define PRINT_PDU // Comment this out to remove some tracing and reduce memory usage
 
+// Network configuration
+// If WS5100 board has a MAC sticker then use here instead of this default
+static const uint8_t mac[6] __PROGMEM = { 0xde, 0xad, 0xbe, 0xef, 0xfe, 0xed };
+// If no DHCP on network set these
+// #define USE_FIXED_IP 192,168,1,100
+// #define SUBNET 255,255,255,0
+
+// Disable SD on Ethernet Shield
+#define USE_ETHERNET_SHIELD
+#if defined(USE_ETHERNET_SHIELD)
+#include "Cosa/OutputPin.hh"
+OutputPin sd(Board::D4, 1);
+#endif
+
+W5100 ethernet(mac);
+
+// SNMP MIB-2 System configuration
+static const char descr[] __PROGMEM = "<service description>";
+static const char contact[] __PROGMEM = "<contact information>";
+static const char name[] __PROGMEM = "<device name>";
+static const char location[] __PROGMEM = "<device location>";
+
+SNMP::MIB2_SYSTEM mib2(descr, contact, name, location);
+SNMP snmp;
+
 /**
  * Arduino MIB OID(1.3.6.1.4.1.36582)
  */
 class ARDUINO_MIB : public SNMP::MIB {
 private:
   enum {
-    ardDigitalPin = 1,	      // Digital pin[0..19](0..1), read-only
-    ardAnalogPin = 2,	      // Analog pin[0..5](0..1023), read-only
-    ardVcc = 3,		      // Power supply[0](0..VCC), mV, read-only
+    ardDigitalPin = 1,        // Digital pin[0..19](0..1), read-only
+    ardAnalogPin = 2,         // Analog pin[0..5](0..1023), read-only
+    ardVcc = 3,               // Power supply[0](0..VCC), mV, read-only
   } __attribute__((packed));
 
 public:

 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * @section Description
 * W5100 Ethernet Controller device driver example code; SNMP agent
 * with support for GET/GETNEXT/SET for MIB-2 SYSTEM and Arduino MIB. 
 *
 * @section Circuit
 * This sketch is designed for the Ethernet Shield.
 * 
 *                       W5100/ethernet
 *                       +------------+
 * (D10)--------------29-|CSN         |

  Watchdog::begin();

  // Start ethernet controller and request network address for hostname
#if defined(USE_FIXED_IP)
  ASSERT(ethernet.begin(ip, subnet);
#else
  ASSERT(ethernet.begin_P(PSTR("CosaSNMPAgent")));
#endif

  // Print the given or default network address
  ethernet.get_addr(ip, subnet);
  trace << PSTR("IP = ");
  INET::print_addr(trace, ip);
  trace << endl;

  // Print some memory statistics
  TRACE(free_memory());
  TRACE(sizeof(W5100));
