diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-12-03 22:13:38 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-12-03 22:13:38 +0100 |
commit | 66b80cc8f5ea4e99dab1b36f122d75395129a74e (patch) | |
tree | 9d856d508cc5625708d81163a7a405ede6cae1f2 /include | |
parent | fbdcf593f80d4fe5330376674136fd76fcef5ea2 (diff) |
client: Deal with external representation for pcap files
We need to convert the 64bit timeval on a 64bit userspace (or on
OpenBSD) into a 32bit truncated value for being able to write the
file. This means we have 2038 issue here?
Diffstat (limited to 'include')
-rw-r--r-- | include/osmo-pcap/wireformat.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/osmo-pcap/wireformat.h b/include/osmo-pcap/wireformat.h index f094051..3f92ee8 100644 --- a/include/osmo-pcap/wireformat.h +++ b/include/osmo-pcap/wireformat.h @@ -43,4 +43,16 @@ struct osmo_pcap_data { uint8_t data[0]; } __attribute__((packed)); +/** + * struct timeval is not the same across different + * architectures and for the external format it must + * be a 32bit value. We have a 2038 issue here? + */ +struct osmo_pcap_pkthdr { + uint32_t ts_sec; + uint32_t ts_usec; + uint32_t caplen; + uint32_t len; +} __attribute__((packed)); + #endif |