Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (20 sloc) 0.508 kb
#include <stdio.h>
#include <string.h>
#include "macaddress.h"
static void plan(int num) {
printf("1..%d\n", num);
}
static void ok(int ok, const char* msg) {
static int testnum = 0;
printf("%s %d - %s\n", ok ? "ok" : "not ok", ++testnum, msg);
}
int main(void) {
plan(2);
unsigned char* macaddr = NULL;
size_t len = 0;
len = macaddress("en0", &macaddr);
ok(macaddr != NULL, "address allocated ok");
ok(len == 6, "length ok");
free(macaddr);
return 0;
}
Jump to Line
Something went wrong with that request. Please try again.