X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/1cde6435df23876fb88998e38739def0dc7dca47..refs/pull/440/head:/print-cfm.c diff --git a/print-cfm.c b/print-cfm.c index 25fac19b..a85eec09 100644 --- a/print-cfm.c +++ b/print-cfm.c @@ -34,10 +34,10 @@ #include "af.h" struct cfm_common_header_t { - u_int8_t mdlevel_version; - u_int8_t opcode; - u_int8_t flags; - u_int8_t first_tlv_offset; + uint8_t mdlevel_version; + uint8_t opcode; + uint8_t flags; + uint8_t first_tlv_offset; }; #define CFM_VERSION 0 @@ -63,13 +63,13 @@ static const struct tok cfm_opcode_values[] = { * Message Formats. */ struct cfm_ccm_t { - u_int8_t sequence[4]; - u_int8_t ma_epi[2]; - u_int8_t md_nameformat; - u_int8_t md_namelength; - u_int8_t md_name[46]; /* md name and short ma name */ - u_int8_t reserved_itu[16]; - u_int8_t reserved[6]; + uint8_t sequence[4]; + uint8_t ma_epi[2]; + uint8_t md_nameformat; + uint8_t md_namelength; + uint8_t md_name[46]; /* md name and short ma name */ + uint8_t reserved_itu[16]; + uint8_t reserved[6]; }; /* @@ -114,17 +114,17 @@ static const struct tok cfm_ma_nameformat_values[] = { }; struct cfm_lbm_t { - u_int8_t transaction_id[4]; - u_int8_t reserved[4]; + uint8_t transaction_id[4]; + uint8_t reserved[4]; }; struct cfm_ltm_t { - u_int8_t transaction_id[4]; - u_int8_t egress_id[8]; - u_int8_t ttl; - u_int8_t original_mac[ETHER_ADDR_LEN]; - u_int8_t target_mac[ETHER_ADDR_LEN]; - u_int8_t reserved[3]; + uint8_t transaction_id[4]; + uint8_t egress_id[8]; + uint8_t ttl; + uint8_t original_mac[ETHER_ADDR_LEN]; + uint8_t target_mac[ETHER_ADDR_LEN]; + uint8_t reserved[3]; }; static const struct tok cfm_ltm_flag_values[] = { @@ -133,12 +133,12 @@ static const struct tok cfm_ltm_flag_values[] = { }; struct cfm_ltr_t { - u_int8_t transaction_id[4]; - u_int8_t last_egress_id[8]; - u_int8_t next_egress_id[8]; - u_int8_t ttl; - u_int8_t replay_action; - u_int8_t reserved[6]; + uint8_t transaction_id[4]; + uint8_t last_egress_id[8]; + uint8_t next_egress_id[8]; + uint8_t ttl; + uint8_t replay_action; + uint8_t reserved[6]; }; static const struct tok cfm_ltr_flag_values[] = { @@ -182,8 +182,8 @@ static const struct tok cfm_tlv_values[] = { */ struct cfm_tlv_header_t { - u_int8_t type; - u_int8_t length[2]; + uint8_t type; + uint8_t length[2]; }; /* FIXME define TLV formats */ @@ -227,8 +227,8 @@ static const struct tok cfm_tlv_senderid_chassisid_values[] = { static int cfm_mgmt_addr_print(netdissect_options *ndo, - register const u_char *tptr) { - + register const u_char *tptr) +{ u_int mgmt_addr_type; u_int hexdump = FALSE; @@ -268,7 +268,8 @@ cfm_mgmt_addr_print(netdissect_options *ndo, * The egress-ID string is a 16-Bit string plus a MAC address. */ static const char * -cfm_egress_id_string(netdissect_options *ndo, register const u_char *tptr) { +cfm_egress_id_string(netdissect_options *ndo, register const u_char *tptr) +{ static char egress_id_buffer[80]; snprintf(egress_id_buffer, sizeof(egress_id_buffer), @@ -281,11 +282,11 @@ cfm_egress_id_string(netdissect_options *ndo, register const u_char *tptr) { void cfm_print(netdissect_options *ndo, - register const u_char *pptr, register u_int length) { - + register const u_char *pptr, register u_int length) +{ const struct cfm_common_header_t *cfm_common_header; const struct cfm_tlv_header_t *cfm_tlv_header; - const u_int8_t *tptr, *tlv_ptr, *ma_name, *ma_nameformat, *ma_namelength; + const uint8_t *tptr, *tlv_ptr, *ma_name, *ma_nameformat, *ma_namelength; u_int hexdump, tlen, cfm_tlv_len, cfm_tlv_type, ccm_interval; @@ -371,7 +372,7 @@ cfm_print(netdissect_options *ndo, break; case CFM_CCM_MD_FORMAT_MAC: - ND_PRINT((ndo, "\n\t MAC %s", etheraddr_string(ndo, + ND_PRINT((ndo, "\n\t MAC %s", etheraddr_string(ndo, msg_ptr.cfm_ccm->md_name))); break;