import of dnsmasq-2.31.tar.gz

This commit is contained in:
Simon Kelley committed 2012-01-05 17:31:12 +00:00
1 parent 26d0dbaf24
commit 7cebd20fe7
32 files changed
+2294 -2141

No files matched your search

+14
View File
@@ -396,3 +396,17 @@ int expand_buf(struct iovec *iov, size_t size)
return 1;
}
char *print_mac(struct daemon *daemon, unsigned char *mac, int len)
{
char *p = daemon->namebuff;
int i;
if (len == 0)
sprintf(p, "<null>");
else
for (i = 0; i < len; i++)
p += sprintf(p, "%.2x%s", mac[i], (i == len - 1) ? "" : ":");
return daemon->namebuff;
}