summaryrefslogtreecommitdiff
path: root/zebra/kernel_socket.c
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@opensourcerouting.org>2017-12-18 13:19:08 -0200
committerRafael Zalamena <rzalamena@opensourcerouting.org>2017-12-18 13:19:08 -0200
commit12386e86db93502bdcd3ec6c2ae24bcef0ba8ca3 (patch)
treea11521ac716a746ca06d3b3b314bc045949a7273 /zebra/kernel_socket.c
parentacf43bea0d927b9a223fdc92753ccf48692e0898 (diff)
Revert "isisd: bpf: ETHER_HDR_LEN -> ETH_ALEN"
This reverts commit d9e5b009554f99230be1eee62daf098403c3cadf. ETH_ALEN is not equivalent to ETHER_HDR_LEN. ETHER_HDR_LEN is the definition for the length of the full ethernet header, meanwhile ETH_ALEN is just the length of the ethernet address. Here is the OpenBSD/FreeBSD definition for ETHER_HDR_LEN: #define ETHER_ADDR_LEN 6 /* Ethernet address length */ #define ETHER_TYPE_LEN 2 /* Ethernet type field length */ #define ETHER_HDR_LEN ((ETHER_ADDR_LEN * 2) + ETHER_TYPE_LEN) (OpenBSD's definition is at net/if_ether.h, FreeBSD's is at net/ethernet.h) Linux definitions can be found at: net/ethernet.h #define ETHER_ADDR_LEN ETH_ALEN /* size of ethernet addr */ #define ETHER_TYPE_LEN 2 /* bytes in type field */ #define ETHER_HDR_LEN ETH_HLEN /* total octets in header */ net/if_ether.h: #define ETH_HLEN 14 /* Total octets in header. */ #define ETH_ALEN 6 /* Octets in one ethernet addr */ Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'zebra/kernel_socket.c')
0 files changed, 0 insertions, 0 deletions