Moved link-layer addresses into endpoints.

The link-layer addresses are now part of the connection endpoints
following the originator-responder-pattern. The addresses are printed
with leading zeros. Additionally link-layer addresses are also extracted
for 802.11 plus RadioTap.
This commit is contained in:
Jan Grashoefer 2016-06-02 01:46:26 +02:00
parent a2423f7d43
commit 50cf694aae
19 changed files with 470 additions and 442 deletions

View file

@ -152,13 +152,13 @@ char* fmt_mac(const unsigned char* m, int len)
{
char* buf = new char[25];
if ( len < 8 )
if ( len < 8 && len != 6 )
{
*buf = '\0';
return buf;
}
if ( m[6] == 0 && m[7] == 0 ) // EUI-48
if ( (len == 6) || (m[6] == 0 && m[7] == 0) ) // EUI-48
snprintf(buf, 19, "%02x:%02x:%02x:%02x:%02x:%02x",
m[0], m[1], m[2], m[3], m[4], m[5]);
else