#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-slow.c,v 1.6 2006-06-23 01:53:28 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 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;
}
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) {