*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include "config.h"
#ifdef HAVE_LIBPCAP
/* XXX - try to remove this later */
#include <epan/prefs.h>
/* XXX - try to remove this later */
-#include <epan/filesystem.h>
#include "capture_info.h"
#include <epan/dissectors/packet-ap1394.h>
#include <epan/dissectors/packet-atalk.h>
#include <epan/dissectors/packet-atm.h>
+#include <epan/dissectors/packet-ax25.h>
#include <epan/dissectors/packet-clip.h>
#include <epan/dissectors/packet-eth.h>
#include <epan/dissectors/packet-fddi.h>
#include <epan/dissectors/packet-sll.h>
#include <epan/dissectors/packet-tr.h>
#include <epan/dissectors/packet-ieee80211.h>
-#include <epan/dissectors/packet-radiotap.h>
+#include <epan/dissectors/packet-ieee80211-radiotap.h>
#include <epan/dissectors/packet-chdlc.h>
#include <epan/dissectors/packet-ipfc.h>
#include <epan/dissectors/packet-arcnet.h>
#include <epan/dissectors/packet-enc.h>
#include <epan/dissectors/packet-i2c.h>
+#include <epan/dissectors/packet-ax25-kiss.h>
+
+#include <wsutil/filesystem.h>
static void capture_info_packet(
packet_counts *counts, gint wtap_linktype, const guchar *pd, guint32 caplen, union wtap_pseudo_header *pseudo_header);
/* open the info */
-void capture_info_open(capture_options *capture_opts)
+void capture_info_open(capture_session *cap_session)
{
info_data.counts.total = 0;
info_data.counts.sctp = 0;
info_data.wtap = NULL;
info_data.ui.counts = &info_data.counts;
- capture_info_ui_create(&info_data.ui, capture_opts);
+ capture_info_ui_create(&info_data.ui, cap_session);
}
/* Seen only when opening a capture file for writing. */
g_snprintf(errmsg_errno, sizeof(errmsg_errno),
"The file \"%%s\" is a pipe, and %s capture files can't be "
- "written to a pipe.", wtap_file_type_string(file_type));
+ "written to a pipe.", wtap_file_type_subtype_string(file_type));
errmsg = errmsg_errno;
break;
info_data.wtap = wtap_open_offline(new_filename, &err, &err_info, FALSE);
if (!info_data.wtap) {
- err_msg = g_strdup_printf(cf_open_error_message(err, err_info, FALSE, WTAP_FILE_PCAP),
+ err_msg = g_strdup_printf(cf_open_error_message(err, err_info, FALSE, WTAP_FILE_TYPE_SUBTYPE_UNKNOWN),
new_filename);
g_warning("capture_info_new_file: %d (%s)", err, err_msg);
g_free (err_msg);
int err;
gchar *err_info;
gint64 data_offset;
- const struct wtap_pkthdr *phdr;
+ struct wtap_pkthdr *phdr;
union wtap_pseudo_header *pseudo_header;
int wtap_linktype;
const guchar *buf;
wtap_cleareof(info_data.wtap);
if (wtap_read(info_data.wtap, &err, &err_info, &data_offset)) {
phdr = wtap_phdr(info_data.wtap);
- pseudo_header = wtap_pseudoheader(info_data.wtap);
+ pseudo_header = &phdr->pseudo_header;
wtap_linktype = phdr->pkt_encap;
buf = wtap_buf_ptr(info_data.wtap);
case WTAP_ENCAP_FDDI_BITSWAPPED:
capture_fddi(pd, caplen, counts);
break;
- case WTAP_ENCAP_PRISM_HEADER:
+ case WTAP_ENCAP_IEEE_802_11_PRISM:
capture_prism(pd, 0, caplen, counts);
break;
case WTAP_ENCAP_TOKEN_RING:
case WTAP_ENCAP_IEEE_802_11_WITH_RADIO:
capture_ieee80211(pd, 0, caplen, counts);
break;
- case WTAP_ENCAP_IEEE_802_11_WLAN_RADIOTAP:
+ case WTAP_ENCAP_IEEE_802_11_RADIOTAP:
capture_radiotap(pd, 0, caplen, counts);
break;
- case WTAP_ENCAP_IEEE_802_11_WLAN_AVS:
+ case WTAP_ENCAP_IEEE_802_11_AVS:
capture_wlancap(pd, 0, caplen, counts);
break;
case WTAP_ENCAP_CHDLC:
case WTAP_ENCAP_I2C:
capture_i2c(pseudo_header, counts);
break;
+ case WTAP_ENCAP_AX25_KISS:
+ capture_ax25_kiss(pd, 0, caplen, counts);
+ break;
+ case WTAP_ENCAP_AX25:
+ capture_ax25(pd, 0, caplen, counts);
+ break;
/* XXX - some ATM drivers on FreeBSD might prepend a 4-byte ATM
pseudo-header to DLT_ATM_RFC1483, with LLC header following;
we might have to implement that at some point. */