Clean up the "unknown per-packet encapsulation" message.

Report the file name, report the frame number as unsigned (which it is),
and make it look more like other error messages.

Change-Id: Ia5281da1c94d55c745da8a8b20dafdb74dd13f92
Reviewed-on: https://code.wireshark.org/review/5793
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2014-12-16 22:08:03 -08:00
parent 625ba02b69
commit b56d4d0187
1 changed files with 2 additions and 1 deletions

View File

@ -884,7 +884,8 @@ process_cap_file(wtap *wth, const char *filename)
if ((phdr->pkt_encap > 0) && (phdr->pkt_encap < WTAP_NUM_ENCAP_TYPES)) {
cf_info.encap_counts[phdr->pkt_encap] += 1;
} else {
fprintf(stderr, "capinfos: Unknown per-packet encapsulation: %d [frame number: %d]\n", phdr->pkt_encap, packet);
fprintf(stderr, "capinfos: Unknown per-packet encapsulation %d in frame %u of file \"%s\"\n",
phdr->pkt_encap, packet, filename);
}
}
}