1 /*
2 ** Copyright (C) 2014-2021 Cisco and/or its affiliates. All rights reserved.
3 ** Copyright (C) 2007-2013 Sourcefire, Inc.
4 **
5 ** This program is free software; you can redistribute it and/or modify
6 ** it under the terms of the GNU General Public License Version 2 as
7 ** published by the Free Software Foundation.  You may not use, modify or
8 ** distribute this program under any other version of the GNU General
9 ** Public License.
10 **
11 ** This program is distributed in the hope that it will be useful,
12 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ** GNU General Public License for more details.
15 **
16 ** You should have received a copy of the GNU General Public License
17 ** along with this program; if not, write to the Free Software
18 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19 */
20 
21 #ifndef __PCAP_PKTHDR32_H__
22 #define __PCAP_PKTHDR32_H__
23 
24 #include "sf_types.h"
25 
26 /* we must use fixed size of 32 bits, because on-disk
27  * format of savefiles uses 32-bit tv_sec (and tv_usec)
28  */
29 struct sf_timeval32
30 {
31     uint32_t tv_sec;      /* seconds */
32     uint32_t tv_usec;     /* microseconds */
33 };
34 
35 /* this is equivalent to the pcap pkthdr struct, but we need
36  * a 32 bit one for unified output
37  */
38 struct pcap_pkthdr32
39 {
40     struct sf_timeval32 ts;   /* packet timestamp */
41     uint32_t caplen;          /* packet capture length */
42     uint32_t len;             /* packet "real" length */
43 };
44 
45 
46 #endif // __PCAP_PKTHDR32_H__
47 
48