Deleted Added
full compact
33c33
< "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.126.2.13 2005/08/29 21:05:45 guy Exp $ (LBL)";
---
> "@(#) $Header: /tcpdump/master/libpcap/savefile.c,v 1.126.2.30 2007/08/14 20:57:49 guy Exp $ (LBL)";
432a433,554
> /*
> * Multi Link Frame Relay (FRF.16)
> */
> #define LINKTYPE_MFR 182
>
> /*
> * Juniper-private data link type, as per request from
> * Hannes Gredler <hannes@juniper.net>.
> * The DLT_ is used for internal communication with a
> * voice Adapter Card (PIC)
> */
> #define LINKTYPE_JUNIPER_VP 183
>
> /*
> * Arinc 429 frames.
> * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
> * Every frame contains a 32bit A429 label.
> * More documentation on Arinc 429 can be found at
> * http://www.condoreng.com/support/downloads/tutorials/ARINCTutorial.pdf
> */
> #define LINKTYPE_A429 184
>
> /*
> * Arinc 653 Interpartition Communication messages.
> * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
> * Please refer to the A653-1 standard for more information.
> */
> #define LINKTYPE_A653_ICM 185
>
> /*
> * USB packets, beginning with a USB setup header; requested by
> * Paolo Abeni <paolo.abeni@email.it>.
> */
> #define LINKTYPE_USB 186
>
> /*
> * Bluetooth HCI UART transport layer (part H:4); requested by
> * Paolo Abeni.
> */
> #define LINKTYPE_BLUETOOTH_HCI_H4 187
>
> /*
> * IEEE 802.16 MAC Common Part Sublayer; requested by Maria Cruz
> * <cruz_petagay@bah.com>.
> */
> #define LINKTYPE_IEEE802_16_MAC_CPS 188
>
> /*
> * USB packets, beginning with a Linux USB header; requested by
> * Paolo Abeni <paolo.abeni@email.it>.
> */
> #define LINKTYPE_USB_LINUX 189
>
> /*
> * Controller Area Network (CAN) v. 2.0B packets.
> * DLT_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
> * Used to dump CAN packets coming from a CAN Vector board.
> * More documentation on the CAN v2.0B frames can be found at
> * http://www.can-cia.org/downloads/?269
> */
> #define LINKTYPE_CAN20B 190
>
> /*
> * IEEE 802.15.4, with address fields padded, as is done by Linux
> * drivers; requested by Juergen Schimmer.
> */
> #define LINKTYPE_IEEE802_15_4_LINUX 191
>
> /*
> * Per Packet Information encapsulated packets.
> * LINKTYPE_ requested by Gianluca Varenni <gianluca.varenni@cacetech.com>.
> */
> #define LINKTYPE_PPI 192
>
> /*
> * Header for 802.16 MAC Common Part Sublayer plus a radiotap radio header;
> * requested by Charles Clancy.
> */
> #define LINKTYPE_IEEE802_16_MAC_CPS_RADIO 193
>
> /*
> * Juniper-private data link type, as per request from
> * Hannes Gredler <hannes@juniper.net>.
> * The DLT_ is used for internal communication with a
> * integrated service module (ISM).
> */
> #define LINKTYPE_JUNIPER_ISM 194
>
> /*
> * IEEE 802.15.4, exactly as it appears in the spec (no padding, no
> * nothing); requested by Mikko Saarnivala <mikko.saarnivala@sensinode.com>.
> */
> #define LINKTYPE_IEEE802_15_4 195
>
> /*
> * Various link-layer types, with a pseudo-header, for SITA
> * (http://www.sita.aero/); requested by Fulko Hew (fulko.hew@gmail.com).
> */
> #define LINKTYPE_SITA 196
>
> /*
> * Various link-layer types, with a pseudo-header, for Endace DAG cards;
> * encapsulates Endace ERF records. Requested by Stephen Donnelly
> * <stephen@endace.com>.
> */
> #define LINKTYPE_ERF 197
>
> /*
> * Special header prepended to Ethernet packets when capturing from a
> * u10 Networks board. Requested by Phil Mulholland
> * <phil@u10networks.com>.
> */
> #define LINKTYPE_RAIF1 198
>
> /*
> * IPMB packet for IPMI, beginning with the I2C slave address, followed
> * by the netFn and LUN, etc.. Requested by Chanthy Toeung
> * <chanthy.toeung@ca.kontron.com>.
> */
> #define LINKTYPE_IPMB 199
>
>
637a760,761
> /* Multi Link Frame Relay (FRF.16) */
> { DLT_MFR, LINKTYPE_MFR },
638a763,813
> /* Juniper Voice PIC */
> { DLT_JUNIPER_VP, LINKTYPE_JUNIPER_VP },
>
> /* Controller Area Network (CAN) v2.0B */
> { DLT_A429, LINKTYPE_A429 },
>
> /* Arinc 653 Interpartition Communication messages */
> { DLT_A653_ICM, LINKTYPE_A653_ICM },
>
> /* USB */
> { DLT_USB, LINKTYPE_USB },
>
> /* Bluetooth HCI UART transport layer */
> { DLT_BLUETOOTH_HCI_H4, LINKTYPE_BLUETOOTH_HCI_H4 },
>
> /* IEEE 802.16 MAC Common Part Sublayer */
> { DLT_IEEE802_16_MAC_CPS, LINKTYPE_IEEE802_16_MAC_CPS },
>
> /* USB with Linux header */
> { DLT_USB_LINUX, LINKTYPE_USB_LINUX },
>
> /* Controller Area Network (CAN) v2.0B */
> { DLT_CAN20B, LINKTYPE_CAN20B },
>
> /* IEEE 802.15.4 with address fields padded */
> { DLT_IEEE802_15_4_LINUX, LINKTYPE_IEEE802_15_4_LINUX },
>
> /* Per Packet Information encapsulated packets */
> { DLT_PPI, LINKTYPE_PPI },
>
> /* IEEE 802.16 MAC Common Part Sublayer plus radiotap header */
> { DLT_IEEE802_16_MAC_CPS_RADIO, LINKTYPE_IEEE802_16_MAC_CPS_RADIO },
>
> /* Juniper Voice ISM */
> { DLT_JUNIPER_ISM, LINKTYPE_JUNIPER_ISM },
>
> /* IEEE 802.15.4 exactly as it appears in the spec */
> { DLT_IEEE802_15_4, LINKTYPE_IEEE802_15_4 },
>
> /* Various link-layer types for SITA */
> { DLT_SITA, LINKTYPE_SITA },
>
> /* Various link-layer types for Endace */
> { DLT_ERF, LINKTYPE_ERF },
>
> /* Special header for u10 Networks boards */
> { DLT_RAIF1, LINKTYPE_RAIF1 },
>
> /* IPMB */
> { DLT_IPMB, LINKTYPE_IPMB },
>
872a1048,1069
> if (magic == KUZNETZOV_TCPDUMP_MAGIC && p->linktype == DLT_EN10MB) {
> /*
> * This capture might have been done in raw mode or cooked
> * mode.
> *
> * If it was done in cooked mode, p->snapshot was passed
> * to recvfrom() as the buffer size, meaning that the
> * most packet data that would be copied would be
> * p->snapshot. However, a faked Ethernet header would
> * then have been added to it, so the most data that would
> * be in a packet in the file would be p->snapshot + 14.
> *
> * We can't easily tell whether the capture was done in
> * raw mode or cooked mode, so we'll assume it was
> * cooked mode, and add 14 to the snapshot length. That
> * means that, for a raw capture, the snapshot length will
> * be misleading if you use it to figure out why a capture
> * doesn't have all the packet data, but there's not much
> * we can do to avoid that.
> */
> p->snapshot += 14;
> }
1180c1377
< (void)fwrite((char *)sp, h->caplen, 1, f);
---
> (void)fwrite(sp, h->caplen, 1, f);