#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-slow.c,v 1.5 2006-05-18 08:23:26 hannes Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-slow.c,v 1.8 2006-10-12 05:44:33 hannes Exp $";
#endif
#ifdef HAVE_CONFIG_H
u_int8_t revision[2];
u_int8_t state;
u_int8_t oam_config;
- u_int8_t oam_pdu_config;
+ u_int8_t oam_pdu_config[2];
u_int8_t oui[3];
u_int8_t vendor_private[4];
};
u_int8_t length;
};
+struct slow_oam_loopbackctrl_t {
+ u_int8_t command;
+};
+
static const struct tok slow_oam_loopbackctrl_cmd_values[] = {
{ 0x01, "Enable OAM Remote Loopback" },
{ 0x02, "Disable OAM Remote Loopback" },
const struct slow_oam_link_event_t *slow_oam_link_event;
const struct slow_oam_variablerequest_t *slow_oam_variablerequest;
const struct slow_oam_variableresponse_t *slow_oam_variableresponse;
+ const struct slow_oam_loopbackctrl_t *slow_oam_loopbackctrl;
} tlv;
ptr.slow_oam_common_header = (struct slow_oam_common_header_t *)tptr;
if (tlv.slow_oam_info->info_length !=
sizeof(struct slow_oam_info_t)) {
- printf("\n\t ERROR: illegal length - should be %u",
- sizeof(struct slow_oam_info_t));
+ printf("\n\t ERROR: illegal length - should be %lu",
+ (unsigned long) sizeof(struct slow_oam_info_t));
return;
}
tlv.slow_oam_info->oam_version,
EXTRACT_16BITS(&tlv.slow_oam_info->revision));
- printf("\n\t State-MUX-Action %s, State-Parser-Action %s",
+ printf("\n\t State-Parser-Action %s, State-MUX-Action %s",
tok2str(slow_oam_info_type_state_parser_values, "Reserved",
tlv.slow_oam_info->state & OAM_INFO_TYPE_PARSER_MASK),
tok2str(slow_oam_info_type_state_mux_values, "Reserved",
if (tlv.slow_oam_link_event->event_length !=
sizeof(struct slow_oam_link_event_t)) {
- printf("\n\t ERROR: illegal length - should be %u",
- sizeof(struct slow_oam_link_event_t));
+ printf("\n\t ERROR: illegal length - should be %lu",
+ (unsigned long) sizeof(struct slow_oam_link_event_t));
return;
}
tptr += ptr.slow_oam_tlv_header->length;
}
break;
+
+ case SLOW_OAM_CODE_LOOPBACK_CTRL:
+ tlv.slow_oam_loopbackctrl = (const struct slow_oam_loopbackctrl_t *)tptr;
+ printf("\n\t Command %s (%u)",
+ tok2str(slow_oam_loopbackctrl_cmd_values,
+ "Unknown",
+ tlv.slow_oam_loopbackctrl->command),
+ tlv.slow_oam_loopbackctrl->command);
+ tptr ++;
+ tlen --;
+ break;
/*
* FIXME those are the defined codes that lack a decoder
*/
case SLOW_OAM_CODE_VAR_REQUEST:
case SLOW_OAM_CODE_VAR_RESPONSE:
- case SLOW_OAM_CODE_LOOPBACK_CTRL:
case SLOW_OAM_CODE_PRIVATE:
default:
if (vflag <= 1) {