mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
import of dnsmasq-2.31.tar.gz
This commit is contained in:
14
src/util.c
14
src/util.c
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user