WTAP_ENCAP_ENC was, in fact, intended for use for DLT_ENC, so just

rename WTAP_ENCAP_ENC0 to WTAP_ENCAP_ENC.

un-#if 0 out the code to handle the value 109 for DLT_ENC, as I've just
checked in support for DLT_ENC in tcpdump.org libpcap and tcpdump, which
maps DLT_ENC to 109 in the file header.

Give packet-enc.c an RCS ID.

svn path=/trunk/; revision=7323
This commit is contained in:
Guy Harris 2003-03-08 09:11:53 +00:00
parent c6f038a787
commit ad8856029b
3 changed files with 8 additions and 7 deletions

View File

@ -1,6 +1,8 @@
/*
* Copyright (c) 2003 Markus Friedl. All rights reserved.
*
* $Id: packet-enc.c,v 1.2 2003/03/08 09:11:51 guy Exp $
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@ -55,7 +57,6 @@ struct enchdr {
# define BSD_ENC_M_COMP 0x1000 /* payload compressed */
# define BSD_ENC_M_AUTH_AH 0x2000 /* header authenticated */
static dissector_handle_t data_handle, ip_handle, ipv6_handle;
/* header fields */
@ -201,5 +202,5 @@ proto_reg_handoff_enc(void)
data_handle = find_dissector("data");
enc_handle = create_dissector_handle(dissect_enc, proto_enc);
dissector_add("wtap_encap", WTAP_ENCAP_ENC0, enc_handle);
dissector_add("wtap_encap", WTAP_ENCAP_ENC, enc_handle);
}

View File

@ -1,6 +1,6 @@
/* libpcap.c
*
* $Id: libpcap.c,v 1.93 2003/03/07 16:52:46 gerald Exp $
* $Id: libpcap.c,v 1.94 2003/03/08 09:11:53 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@ -213,8 +213,8 @@ static const struct {
{ 106, WTAP_ENCAP_LINUX_ATM_CLIP },
{ 107, WTAP_ENCAP_FRELAY }, /* Frame Relay */
{ 108, WTAP_ENCAP_NULL }, /* OpenBSD loopback */
#if 0
{ 109, WTAP_ENCAP_ENC }, /* OpenBSD IPSEC enc */
#if 0
{ 110, WTAP_ENCAP_LANE_802_3 },/* ATM LANE 802.3 */
{ 111, WTAP_ENCAP_HIPPI }, /* NetBSD HIPPI */
#endif
@ -324,7 +324,7 @@ static const struct {
#if defined(DLT_ATM_RFC1483) && (DLT_ATM_RFC1483 == 13)
{ 13, WTAP_ENCAP_ATM_RFC1483 },
#elif defined(DLT_ENC) && (DLT_ENC == 13)
{ 13, WTAP_ENCAP_ENC0 },
{ 13, WTAP_ENCAP_ENC },
#endif
/*

View File

@ -1,6 +1,6 @@
/* wtap.h
*
* $Id: wtap.h,v 1.135 2003/03/07 16:52:46 gerald Exp $
* $Id: wtap.h,v 1.136 2003/03/08 09:11:53 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
@ -126,7 +126,7 @@
#define WTAP_ENCAP_WFLEET_HDLC 34
#define WTAP_ENCAP_SDLC 35
#define WTAP_ENCAP_TZSP 36
#define WTAP_ENCAP_ENC0 37
#define WTAP_ENCAP_ENC 37
/* last WTAP_ENCAP_ value + 1 */
#define WTAP_NUM_ENCAP_TYPES 38