mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
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:
parent
a2423f7d43
commit
50cf694aae
19 changed files with 470 additions and 442 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue