lprintf(T_OPENTRAC, "Unknown Element Type\r\n");
if (element_decode_ptr->pDecode(data, elen)) { lprintf(T_OPENTRAC, "Unable to decode\r\n"); }
void opentrac_dump(unsigned char *data, int length, int hexdump){	int elen;	int etype;	int decoded = 0;		lprintf(T_PROTOCOL, "OpenTRAC decode (%d bytes):\r\n", length);	strcpy(origin_call, "SENDER"); // Listen doesn't tell us the sender	origin_ssid = 0;	entity_serial = 0;	entity_sequence = 0;	while (decoded < length) {		elen = (int)*data;		decoded += (elen & 0x7f)+1;		if (elen & 0x80) { // See if it's got a 16-bit ID			elen = (elen & 0x7f) - 2; // Strip the extid flag			etype = get16(++data);		}		else {			elen--; // Don't count the type byte			etype = (int)*(data+1);		}		data+=2; // Skip to the body		lprintf(T_OPENTRAC, "EID 0x%0x len %d: ", etype, elen);		switch (etype) {			case (0x00): // Sequence				decode_sequence(data, elen);				break;			case (0x01): // Originating Station				decode_origination(data, elen);				break;			case (0x02): // Entity ID				decode_entityid(data, elen);				break;			case (0x10): // Position report				decode_position(data, elen);				break;			case (0x11): // Timestamp				decode_timestamp(data, elen);				break;			case (0x12): // Comment				decode_comment(data, elen);				break;			case (0x13): // Course and Speed				decode_courseandspeed(data, elen);				break;			case (0x14): // Positional Ambiguity				decode_ambiguity(data, elen);				break;			case (0x15): // Country Code				decode_country(data, elen);				break;			case (0x16): // Display Name				decode_displayname(data, elen);				break;			case (0x17): // Waypoint Name				decode_waypoint(data, elen);				break;			case (0x18): // Map Symbol				decode_symbol(data, elen);				break;			case (0x20): // Path Trace				decode_pathtrace(data, elen);				break;			case (0x21): // Heard-By List				decode_heardby(data, elen);				break;			case (0x22): // Available Networks				decode_availablenets(data, elen);				break;			case (0x32): // Maidenhead Locator				decode_maidenhead(data, elen);				break;			case (0x34): // GPS Data Quality				decode_gpsquality(data, elen);				break;			case (0x35): // Aircraft Registration				decode_acreg(data, elen);				break;			case (0x42): // River Flow Gauge				decode_rivergauge(data, elen);				break;			case (0x100): // Emergency/distress flag				flag_emergency();				break;			case (0x101): // Attention/ident flag				flag_attention();				break;			case (0x300): // Hazmat				decode_hazmat(data, elen);				break;			default: // Everything else				if ((etype & 0xff00) == 0x500) {					decode_units(etype & 0x00ff, data, elen);				}				else {					lprintf(T_OPENTRAC, "Unknown Element Type\r\n");				}		}		data+=elen;	}}