3 * Copyright (c) 2003 Endace Technology Ltd, Hamilton, New Zealand.
6 * This software and documentation has been developed by Endace Technology Ltd.
7 * along with the DAG PCI network capture cards. For further information please
8 * visit http://www.endace.com/.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions are met:
13 * 1. Redistributions of source code must retain the above copyright notice,
14 * this list of conditions and the following disclaimer.
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
20 * 3. The name of Endace Technology Ltd may not be used to endorse or promote
21 * products derived from this software without specific prior written
24 * THIS SOFTWARE IS PROVIDED BY ENDACE TECHNOLOGY LTD ``AS IS'' AND ANY EXPRESS
25 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
26 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
27 * EVENT SHALL ENDACE TECHNOLOGY LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
30 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
31 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 * POSSIBILITY OF SUCH DAMAGE.
42 #include <wiretap/wtap.h>
43 #include "ws_symbol_export.h"
45 /* Record type defines */
46 #define ERF_TYPE_LEGACY 0
47 #define ERF_TYPE_HDLC_POS 1
48 #define ERF_TYPE_ETH 2
49 #define ERF_TYPE_ATM 3
50 #define ERF_TYPE_AAL5 4
51 #define ERF_TYPE_MC_HDLC 5
52 #define ERF_TYPE_MC_RAW 6
53 #define ERF_TYPE_MC_ATM 7
54 #define ERF_TYPE_MC_RAW_CHANNEL 8
55 #define ERF_TYPE_MC_AAL5 9
56 #define ERF_TYPE_COLOR_HDLC_POS 10
57 #define ERF_TYPE_COLOR_ETH 11
58 #define ERF_TYPE_MC_AAL2 12
59 #define ERF_TYPE_IP_COUNTER 13
60 #define ERF_TYPE_TCP_FLOW_COUNTER 14
61 #define ERF_TYPE_DSM_COLOR_HDLC_POS 15
62 #define ERF_TYPE_DSM_COLOR_ETH 16
63 #define ERF_TYPE_COLOR_MC_HDLC_POS 17
64 #define ERF_TYPE_AAL2 18
65 #define ERF_TYPE_INFINIBAND 21
66 #define ERF_TYPE_IPV4 22
67 #define ERF_TYPE_IPV6 23
68 #define ERF_TYPE_RAW_LINK 24
69 #define ERF_TYPE_INFINIBAND_LINK 25
71 #define ERF_TYPE_PAD 48
73 #define ERF_TYPE_MIN 1 /* sanity checking */
74 #define ERF_TYPE_MAX 48 /* sanity checking */
77 * The timestamp is 64bit unsigned fixed point little-endian value with
78 * 32 bits for second and 32 bits for fraction.
80 typedef guint64 erf_timestamp_t
;
82 typedef struct erf_record
{
91 typedef struct erf_mc_hdr
{
95 typedef struct erf_eth_hdr
{
100 struct erf_mc_hdr mc_hdr
;
101 struct erf_eth_hdr eth_hdr
;
104 #define MIN_RECORDS_FOR_ERF_CHECK 3
105 #define RECORDS_FOR_ERF_CHECK 20
108 int erf_open(wtap
*wth
, int *err
, gchar
**err_info
);
109 int erf_dump_can_write_encap(int encap
);
110 int erf_dump_open(wtap_dumper
*wdh
, int *err
);
112 int erf_populate_interfaces(wtap
*wth
);
114 #endif /* __W_ERF_H__ */