summaryrefslogtreecommitdiff
path: root/print-cfm.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-12-12 10:36:21 -0800
committerGuy Harris <guy@alum.mit.edu>2017-12-12 10:36:21 -0800
commit7068209574374db8934ceaaac8f92e5eb5c62880 (patch)
treee967726d8cba09b29b68e09b77a9be62ff92be7a /print-cfm.c
parenta95802aa0d8731412a9b5e621692e594046605bd (diff)
downloadtcpdump-7068209574374db8934ceaaac8f92e5eb5c62880.tar.gz
Use nd_ types in 802.x and FDDI headers.
Use EXTRACT_U_1() as required by those changes. Remove no-longer-necessary & operators from other EXTRACT_ calls. While we're at it, add MAC_ADDR_LEN to netdissect.h, and use it instead of ETHER_ADDR_LEN; eliminate ETHER_ADDR_LEN. Move the maximum Ethernet length field value to ethertype.h, under the name MAX_ETHERNET_LENGTH_VAL. Move the Ethernet header structure, and the #define for the Ethernet header length, to print-ether.c; in non-Ethernet dissectors that were using the Ethernet header structure, just declare two nd_mac_addr variables for the source and destination MAC addresses and use them instead of the Ethernet header (we don't need the type field there). These changes leave nothing in ether.h, so eliminate it.
Diffstat (limited to 'print-cfm.c')
-rw-r--r--print-cfm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/print-cfm.c b/print-cfm.c
index 94624564..0a666478 100644
--- a/print-cfm.c
+++ b/print-cfm.c
@@ -27,7 +27,6 @@
#include "netdissect.h"
#include "extract.h"
-#include "ether.h"
#include "addrtoname.h"
#include "oui.h"
#include "af.h"
@@ -116,8 +115,8 @@ struct cfm_lbm_t {
struct cfm_ltm_t {
uint8_t transaction_id[4];
uint8_t ttl;
- uint8_t original_mac[ETHER_ADDR_LEN];
- uint8_t target_mac[ETHER_ADDR_LEN];
+ nd_mac_addr original_mac;
+ nd_mac_addr target_mac;
};
static const struct tok cfm_ltm_flag_values[] = {
@@ -638,7 +637,7 @@ cfm_print(netdissect_options *ndo,
/* IEEE 802.1Q-2014 Section 21.5.3.3: Chassis ID */
switch (chassis_id_type) {
case CFM_CHASSIS_ID_MAC_ADDRESS:
- if (chassis_id_length != ETHER_ADDR_LEN) {
+ if (chassis_id_length != MAC_ADDR_LEN) {
ND_PRINT((ndo, " (invalid MAC address length)"));
hexdump = TRUE;
break;