2
* packETH - ethernet packet generator
3
* By Miha Jemec <jemcek@gmail.com>
4
* Copyright 2003 Miha Jemec, Iskratel
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
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.
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
/*----------------------------------------------------------------------
26
* Stuff for writing a PCap file
28
#define PCAP_MAGIC 0xa1b2c3d4
30
/* "libpcap" file header (minus magic number). */
32
guint32 magic; /* magic */
33
guint16 version_major; /* major version number */
34
guint16 version_minor; /* minor version number */
35
guint32 thiszone; /* GMT to local correction */
36
guint32 sigfigs; /* accuracy of timestamps */
37
guint32 snaplen; /* max length of captured packets, in octets */
38
guint32 network; /* data link type */
41
/* "libpcap" record header. */
43
gint32 ts_sec; /* timestamp seconds */
44
guint32 ts_usec; /* timestamp microseconds */
45
guint32 incl_len; /* number of octets of packet saved in file */
46
guint32 orig_len; /* actual length of packet */
49
/* Link-layer type; */
50
static unsigned long pcap_link_type = 1; /* Default is DLT-EN10MB */
52
/* struct for clist */
54
gint16 pnrb; /* packet number */
55
gint32 time; /* delay since previous packet */
56
gint16 plen; /* packet length */