break;
default:
- /*
- * XXX - report this as an error?
- *
- * Or provide a mechanism to allow file readers to report
- * a warning (an error that the reader tries to work
- * around and that the caller should report)?
- */
- ws_debug("I don't understand the flags 0x%x", flags);
- params->rec->tsprec = WTAP_TSPREC_NSEC;
- object_timestamp = 0;
+ if (flags == 0 && object_timestamp == 0) {
+ /* This is not an error, but is used for metadata at the beginning of the file. */
+ params->rec->tsprec = WTAP_TSPREC_NSEC;
+ object_timestamp = params->blf_data->start_offset_ns;
+ }
+ else {
+ /*
+ * XXX - report this as an error?
+ *
+ * Or provide a mechanism to allow file readers to report
+ * a warning (an error that the reader tries to work
+ * around and that the caller should report)?
+ *
+ * Set the timestamp to params->blf_data->start_offset_ns also here?
+ */
+ ws_debug("Unknown combination of flags and timestamp (0x%x, %" PRIu64 ")", flags, object_timestamp);
+ params->rec->tsprec = WTAP_TSPREC_NSEC;
+ object_timestamp = 0;
+ }
break;
}
params->rec->ts.secs = object_timestamp / (1000 * 1000 * 1000);