# include <sys/stat.h>
#endif
-#ifdef HAVE_GETOPT_H
-#include <getopt.h>
-#else
+#ifndef HAVE_GETOPT
#include "wsutil/wsgetopt.h"
#endif
fprintf(output, " -F <field> field to display\n");
fprintf(output, " -n disable all name resolution (def: all enabled)\n");
fprintf(output, " -N <name resolve flags> enable specific name resolution(s): \"mntC\"\n");
- fprintf(output, " -p use the system's packet header format (which may have 64-bit timestamps)\n");
+ fprintf(output, " -p use the system's packet header format\n");
+ fprintf(output, " (which may have 64-bit timestamps)\n");
fprintf(output, " -R <read filter> packet filter in Wireshark display filter syntax\n");
fprintf(output, " -s skip PCAP header on input\n");
- /*fprintf(output, "\n");*/
+ fprintf(output, "\n");
fprintf(output, "Output:\n");
fprintf(output, " -l flush output after each packet\n");
- fprintf(output, " -S format string for fields (%%D - name, %%S - stringval, %%N numval)\n");
+ fprintf(output, " -S format string for fields\n");
+ fprintf(output, " (%%D - name, %%S - stringval, %%N numval)\n");
fprintf(output, " -t ad|a|r|d|dd|e output format of time stamps (def: r: rel. to first)\n");
fprintf(output, "\n");
printf("len: %d (%04x)\n", hdr.len, hdr.len);
#endif
if (bytes_needed > WTAP_MAX_PACKET_SIZE) {
- *err = WTAP_ERR_BAD_RECORD;
+ *err = WTAP_ERR_BAD_FILE;
g_snprintf(err_str, 100, "Bad packet length: %d (%04x)", bytes_needed, bytes_needed);
*err_info = err_str;
return FALSE;
cf->filename);
break;
- case WTAP_ERR_BAD_RECORD:
+ case WTAP_ERR_BAD_FILE:
cmdarg_err("The file \"%s\" appears to be damaged or corrupt.\n(%s)",
cf->filename, err_info);
break;
* indent-tabs-mode: nil
* End:
*
- * ex: set shiftwidth=4 tabstop=8 expandtab
+ * ex: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/