/* Dump frame to outfile */
if (!wtap_dump(pdh, &phdr, buffer_start_ptr(buf), &err)) {
- printf("Error (%s) writing frame to outfile\n", wtap_strerror(err));
+ fprintf(stderr, "reordercap: Error (%s) writing frame to outfile\n",
+ wtap_strerror(err));
exit(1);
}
}
/* Open infile */
wth = wtap_open_offline(infile, &err, &err_info, TRUE);
if (wth == NULL) {
- printf("reorder: Can't open %s: %s\n", infile, wtap_strerror(err));
+ fprintf(stderr, "reordercap: Can't open %s: %s\n", infile,
+ wtap_strerror(err));
exit(1);
}
DEBUG_PRINT("file_type is %u\n", wtap_file_type(wth));
65535, FALSE, shb_hdr, idb_inf, &err);
g_free(idb_inf);
if (pdh == NULL) {
- printf("Failed to open output file: (%s) - error %s\n", outfile, wtap_strerror(err));
+ fprintf(stderr, "reordercap: Failed to open output file: (%s) - error %s\n",
+ outfile, wtap_strerror(err));
g_free(shb_hdr);
exit(1);
}
/* Close outfile */
if (!wtap_dump_close(pdh, &err)) {
- printf("Error closing %s: %s\n", outfile, wtap_strerror(err));
+ fprintf(stderr, "reordercap: Error closing %s: %s\n", outfile,
+ wtap_strerror(err));
g_free(shb_hdr);
exit(1);
}