     // not found, add it if there's still room
     if (unique_num < MAX_MAC) {
         memcpy(&unique_mac[unique_num], mac, 6);
+        unique_mac[unique_num].last_seen = now;
         unique_num++;
         return true;
     } else {

    }
}

// prints a mac address
static void print_mac(const uint8_t * mac)
{
    char text[32];
    sprintf(text, "%02X:%02X:%02X:%02X:%02X:%02X",
            mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
    Serial.println(text);
}

// callback for promiscuous mode

#include <user_interface.h>
}
// maximum number of unique mac addresses to remember
#define MAX_MAC 200

static int unique_num = 0;

typedef struct {
    uint8_t mac[6];
    unsigned long last_seen;
} mac_t;

static mac_t unique_mac[MAX_MAC];

// prints a mac address
static void print_mac(const uint8_t * mac)
{
    char text[32];
    sprintf(text, "%02X:%02X:%02X:%02X:%02X:%02X",
            mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
    Serial.print(text);
}

// returns true if a new mac was added to the table of unique mac addresses
static bool add_mac(unsigned long now, const uint8_t * mac)
{
    // try to find it
    int i;
    for (i = 0; i < unique_num; i++) {
        if (memcmp(mac, unique_mac[i].mac, 6) == 0) {
            // found it, update timestamp
            unique_mac[i].last_seen = now;
            return false;
        }
    }
