forked from osmocom/wireshark
From Joerg Mayer: remove unused variables and declarations of
non-existent functions. Remove the "filetype" argument from the "can_write_encap" functions for particular capture file types - the argument value is implicit, in that the routine being called is the routine for that particular file type. svn path=/trunk/; revision=4823
This commit is contained in:
parent
03e5890761
commit
cbf5c537c4
2
AUTHORS
2
AUTHORS
|
@ -82,6 +82,8 @@ Joerg Mayer <jmayer[AT]loplof.de> {
|
|||
Crank up the warning level in GCC
|
||||
Skinny (Official Name: SCCP)
|
||||
Remove trailing blanks from hex dump in print/Tethereal
|
||||
Remove unused variables and declarations of non-existent
|
||||
functions
|
||||
}
|
||||
|
||||
Martin Maciaszek <fastjack[AT]i-s-o.net> {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet.c
|
||||
* Routines for packet disassembly
|
||||
*
|
||||
* $Id: packet.c,v 1.64 2002/02/27 00:26:29 guy Exp $
|
||||
* $Id: packet.c,v 1.65 2002/02/27 08:57:23 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -734,7 +734,6 @@ dissector_table_foreach (char *name,
|
|||
void
|
||||
dissector_table_foreach_handle(char *name, DATFunc_handle func, gpointer user_data)
|
||||
{
|
||||
dissector_foreach_info_t info;
|
||||
dissector_table_t sub_dissectors = find_dissector_table( name);
|
||||
GSList *tmp;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* proto.c
|
||||
* Routines for protocol tree
|
||||
*
|
||||
* $Id: proto.c,v 1.53 2002/02/18 22:26:29 guy Exp $
|
||||
* $Id: proto.c,v 1.54 2002/02/27 08:57:23 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -67,8 +67,6 @@ static char* hfinfo_uint_format(header_field_info *hfinfo);
|
|||
static char* hfinfo_int_vals_format(header_field_info *hfinfo);
|
||||
static char* hfinfo_int_format(header_field_info *hfinfo);
|
||||
|
||||
static gboolean check_for_protocol_or_field_id(GNode *node, gpointer data);
|
||||
|
||||
static proto_item*
|
||||
proto_tree_add_node(proto_tree *tree, field_info *fi);
|
||||
|
||||
|
|
4
file.c
4
file.c
|
@ -1,7 +1,7 @@
|
|||
/* file.c
|
||||
* File I/O routines
|
||||
*
|
||||
* $Id: file.c,v 1.263 2002/02/24 06:45:12 guy Exp $
|
||||
* $Id: file.c,v 1.264 2002/02/27 08:57:14 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -623,7 +623,7 @@ add_packet_to_packet_list(frame_data *fdata, capture_file *cf,
|
|||
gboolean refilter)
|
||||
{
|
||||
apply_color_filter_args args;
|
||||
gint i, row;
|
||||
gint row;
|
||||
gboolean create_proto_tree = FALSE;
|
||||
epan_dissect_t *edt;
|
||||
GdkColor fg, bg;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* tethereal.c
|
||||
*
|
||||
* $Id: tethereal.c,v 1.127 2002/02/24 09:25:34 guy Exp $
|
||||
* $Id: tethereal.c,v 1.128 2002/02/27 08:57:14 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -1227,8 +1227,6 @@ fill_in_fdata(frame_data *fdata, capture_file *cf,
|
|||
const struct wtap_pkthdr *phdr,
|
||||
const union wtap_pseudo_header *pseudo_header, long offset)
|
||||
{
|
||||
int i;
|
||||
|
||||
fdata->next = NULL;
|
||||
fdata->prev = NULL;
|
||||
fdata->pfd = NULL;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for opening EtherPeek (and TokenPeek?) files
|
||||
* Copyright (c) 2001, Daniel Thompson <d.thompson@gmx.net>
|
||||
*
|
||||
* $Id: etherpeek.c,v 1.16 2002/02/15 11:35:13 guy Exp $
|
||||
* $Id: etherpeek.c,v 1.17 2002/02/27 08:57:24 guy Exp $
|
||||
*
|
||||
* Wiretap Library
|
||||
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
|
@ -138,11 +138,6 @@ int etherpeek_open(wtap *wth, int *err)
|
|||
{
|
||||
etherpeek_header_t ep_hdr;
|
||||
struct timeval reference_time;
|
||||
static const int etherpeek_v7_encap[] = {
|
||||
WTAP_ENCAP_ETHERNET,
|
||||
WTAP_ENCAP_TOKEN_RING,
|
||||
};
|
||||
#define NUM_ETHERPEEK_V7_ENCAPS (sizeof etherpeek_v7_encap / sizeof etherpeek_v7_encap[0])
|
||||
int file_encap;
|
||||
|
||||
/* EtherPeek files do not start with a magic value large enough
|
||||
|
@ -335,7 +330,6 @@ static gboolean etherpeek_read_v7(wtap *wth, int *err, long *data_offset)
|
|||
guint8 status;
|
||||
etherpeek_utime timestamp;
|
||||
double t;
|
||||
unsigned int i;
|
||||
|
||||
wtap_file_read_expected_bytes(ep_pkt, sizeof(ep_pkt), wth->fh, err);
|
||||
wth->data_offset += sizeof(ep_pkt);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* file.c
|
||||
*
|
||||
* $Id: file.c,v 1.80 2002/01/23 06:32:52 guy Exp $
|
||||
* $Id: file.c,v 1.81 2002/02/27 08:57:25 guy Exp $
|
||||
*
|
||||
* Wiretap Library
|
||||
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
|
@ -266,7 +266,7 @@ success:
|
|||
static const struct file_type_info {
|
||||
const char *name;
|
||||
const char *short_name;
|
||||
int (*can_write_encap)(int, int);
|
||||
int (*can_write_encap)(int);
|
||||
int (*dump_open)(wtap_dumper *, int *);
|
||||
} dump_open_table[WTAP_NUM_FILE_TYPES] = {
|
||||
/* WTAP_FILE_UNKNOWN */
|
||||
|
@ -441,7 +441,7 @@ gboolean wtap_dump_can_write_encap(int filetype, int encap)
|
|||
|| dump_open_table[filetype].can_write_encap == NULL)
|
||||
return FALSE;
|
||||
|
||||
if ((*dump_open_table[filetype].can_write_encap)(filetype, encap) != 0)
|
||||
if ((*dump_open_table[filetype].can_write_encap)(encap) != 0)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
|
@ -529,7 +529,7 @@ static gboolean wtap_dump_open_check(int filetype, int encap, int *err)
|
|||
|
||||
/* OK, we know how to write that type; can we write the specified
|
||||
encapsulation type? */
|
||||
*err = (*dump_open_table[filetype].can_write_encap)(filetype, encap);
|
||||
*err = (*dump_open_table[filetype].can_write_encap)(encap);
|
||||
if (*err != 0)
|
||||
return FALSE;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* libpcap.c
|
||||
*
|
||||
* $Id: libpcap.c,v 1.65 2002/02/07 20:41:28 guy Exp $
|
||||
* $Id: libpcap.c,v 1.66 2002/02/27 08:57:25 guy Exp $
|
||||
*
|
||||
* Wiretap Library
|
||||
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
|
@ -18,8 +18,8 @@
|
|||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
@ -983,7 +983,7 @@ static int wtap_wtap_encap_to_pcap_encap(int encap)
|
|||
|
||||
/* Returns 0 if we could write the specified encapsulation type,
|
||||
an error indication otherwise. */
|
||||
int libpcap_dump_can_write_encap(int filetype, int encap)
|
||||
int libpcap_dump_can_write_encap(int encap)
|
||||
{
|
||||
/* Per-packet encapsulations aren't supported. */
|
||||
if (encap == WTAP_ENCAP_PER_PACKET)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* libpcap.h
|
||||
*
|
||||
* $Id: libpcap.h,v 1.11 2001/11/13 23:55:43 gram Exp $
|
||||
* $Id: libpcap.h,v 1.12 2002/02/27 08:57:25 guy Exp $
|
||||
*
|
||||
* Wiretap Library
|
||||
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
|
@ -18,7 +18,6 @@
|
|||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __W_LIBPCAP_H__
|
||||
|
@ -94,6 +93,6 @@ struct pcaprec_nokia_hdr {
|
|||
|
||||
int libpcap_open(wtap *wth, int *err);
|
||||
gboolean libpcap_dump_open(wtap_dumper *wdh, int *err);
|
||||
int libpcap_dump_can_write_encap(int filetype, int encap);
|
||||
int libpcap_dump_can_write_encap(int encap);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* netmon.c
|
||||
*
|
||||
* $Id: netmon.c,v 1.47 2002/02/08 10:07:40 guy Exp $
|
||||
* $Id: netmon.c,v 1.48 2002/02/27 08:57:25 guy Exp $
|
||||
*
|
||||
* Wiretap Library
|
||||
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
|
@ -18,8 +18,8 @@
|
|||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
@ -542,7 +542,7 @@ static const int wtap_encap[] = {
|
|||
|
||||
/* Returns 0 if we could write the specified encapsulation type,
|
||||
an error indication otherwise. */
|
||||
int netmon_dump_can_write_encap(int filetype, int encap)
|
||||
int netmon_dump_can_write_encap(int encap)
|
||||
{
|
||||
/* Per-packet encapsulations aren't supported. */
|
||||
if (encap == WTAP_ENCAP_PER_PACKET)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* netmon.h
|
||||
*
|
||||
* $Id: netmon.h,v 1.8 2001/11/13 23:55:43 gram Exp $
|
||||
* $Id: netmon.h,v 1.9 2002/02/27 08:57:25 guy Exp $
|
||||
*
|
||||
* Wiretap Library
|
||||
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
|
@ -18,7 +18,6 @@
|
|||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __NETMON_H__
|
||||
|
@ -26,6 +25,6 @@
|
|||
|
||||
int netmon_open(wtap *wth, int *err);
|
||||
gboolean netmon_dump_open(wtap_dumper *wdh, int *err);
|
||||
int netmon_dump_can_write_encap(int filetype, int encap);
|
||||
int netmon_dump_can_write_encap(int encap);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* netxray.c
|
||||
*
|
||||
* $Id: netxray.c,v 1.44 2002/02/08 10:07:40 guy Exp $
|
||||
* $Id: netxray.c,v 1.45 2002/02/27 08:57:25 guy Exp $
|
||||
*
|
||||
* Wiretap Library
|
||||
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
|
@ -18,8 +18,8 @@
|
|||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
@ -340,7 +340,7 @@ static const int wtap_encap[] = {
|
|||
|
||||
/* Returns 0 if we could write the specified encapsulation type,
|
||||
an error indication otherwise. */
|
||||
int netxray_dump_can_write_encap(int filetype, int encap)
|
||||
int netxray_dump_can_write_encap(int encap)
|
||||
{
|
||||
/* Per-packet encapsulations aren't supported. */
|
||||
if (encap == WTAP_ENCAP_PER_PACKET)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* netxray.h
|
||||
*
|
||||
* $Id: netxray.h,v 1.6 2001/11/13 23:55:43 gram Exp $
|
||||
* $Id: netxray.h,v 1.7 2002/02/27 08:57:25 guy Exp $
|
||||
*
|
||||
* Wiretap Library
|
||||
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
|
@ -18,7 +18,6 @@
|
|||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __NETXRAY_H__
|
||||
|
@ -26,6 +25,6 @@
|
|||
|
||||
int netxray_open(wtap *wth, int *err);
|
||||
gboolean netxray_dump_open_1_1(wtap_dumper *wdh, int *err);
|
||||
int netxray_dump_can_write_encap(int filetype, int encap);
|
||||
int netxray_dump_can_write_encap(int encap);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ngsniffer.c
|
||||
*
|
||||
* $Id: ngsniffer.c,v 1.71 2002/02/08 10:07:40 guy Exp $
|
||||
* $Id: ngsniffer.c,v 1.72 2002/02/27 08:57:25 guy Exp $
|
||||
*
|
||||
* Wiretap Library
|
||||
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
|
@ -18,7 +18,6 @@
|
|||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/* The code in ngsniffer.c that decodes the time fields for each packet in the
|
||||
|
@ -1133,7 +1132,7 @@ static const int wtap_encap[] = {
|
|||
|
||||
/* Returns 0 if we could write the specified encapsulation type,
|
||||
an error indication otherwise. */
|
||||
int ngsniffer_dump_can_write_encap(int filetype, int encap)
|
||||
int ngsniffer_dump_can_write_encap(int encap)
|
||||
{
|
||||
/* Per-packet encapsulations aren't supported. */
|
||||
if (encap == WTAP_ENCAP_PER_PACKET)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ngsniffer.h
|
||||
*
|
||||
* $Id: ngsniffer.h,v 1.9 2001/11/13 23:55:44 gram Exp $
|
||||
* $Id: ngsniffer.h,v 1.10 2002/02/27 08:57:25 guy Exp $
|
||||
*
|
||||
* Wiretap Library
|
||||
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
|
@ -18,7 +18,6 @@
|
|||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __NGSNIFFER_H__
|
||||
|
@ -26,6 +25,6 @@
|
|||
|
||||
int ngsniffer_open(wtap *wth, int *err);
|
||||
gboolean ngsniffer_dump_open(wtap_dumper *wdh, int *err);
|
||||
int ngsniffer_dump_can_write_encap(int filetype, int encap);
|
||||
int ngsniffer_dump_can_write_encap(int encap);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* snoop.c
|
||||
*
|
||||
* $Id: snoop.c,v 1.40 2002/02/08 10:07:41 guy Exp $
|
||||
* $Id: snoop.c,v 1.41 2002/02/27 08:57:25 guy Exp $
|
||||
*
|
||||
* Wiretap Library
|
||||
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
|
@ -18,8 +18,8 @@
|
|||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
@ -504,7 +504,7 @@ static const int wtap_encap[] = {
|
|||
|
||||
/* Returns 0 if we could write the specified encapsulation type,
|
||||
an error indication otherwise. */
|
||||
int snoop_dump_can_write_encap(int filetype, int encap)
|
||||
int snoop_dump_can_write_encap(int encap)
|
||||
{
|
||||
/* Per-packet encapsulations aren't supported. */
|
||||
if (encap == WTAP_ENCAP_PER_PACKET)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* snoop.h
|
||||
*
|
||||
* $Id: snoop.h,v 1.9 2001/11/13 23:55:44 gram Exp $
|
||||
* $Id: snoop.h,v 1.10 2002/02/27 08:57:25 guy Exp $
|
||||
*
|
||||
* Wiretap Library
|
||||
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
|
@ -18,7 +18,6 @@
|
|||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __W_SNOOP_H__
|
||||
|
@ -26,6 +25,6 @@
|
|||
|
||||
int snoop_open(wtap *wth, int *err);
|
||||
gboolean snoop_dump_open(wtap_dumper *wdh, int *err);
|
||||
int snoop_dump_can_write_encap(int filetype, int encap);
|
||||
int snoop_dump_can_write_encap(int encap);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* File read and write routines for Visual Networks cap files.
|
||||
* Copyright (c) 2001, Tom Nisbet tnisbet@visualnetworks.com
|
||||
*
|
||||
* $Id: visual.c,v 1.1 2001/12/04 22:28:19 guy Exp $
|
||||
* $Id: visual.c,v 1.2 2002/02/27 08:57:25 guy Exp $
|
||||
*
|
||||
* Wiretap Library
|
||||
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
|
@ -220,7 +220,6 @@ static gboolean visual_read(wtap *wth, int *err, long *data_offset)
|
|||
int bytes_read;
|
||||
struct visual_pkt_hdr vpkt_hdr;
|
||||
int phdr_size = sizeof(vpkt_hdr);
|
||||
int rec_offset;
|
||||
time_t secs;
|
||||
guint32 usecs;
|
||||
double t;
|
||||
|
@ -376,7 +375,7 @@ static int visual_seek_read (wtap *wth, long seek_off,
|
|||
/* Check for media types that may be written in Visual file format.
|
||||
Returns 0 if the specified encapsulation type is supported,
|
||||
an error indication otherwise. */
|
||||
int visual_dump_can_write_encap(int filetype, int encap)
|
||||
int visual_dump_can_write_encap(int encap)
|
||||
{
|
||||
/* Per-packet encapsulations aren't supported. */
|
||||
if (encap == WTAP_ENCAP_PER_PACKET)
|
||||
|
@ -564,7 +563,6 @@ static gboolean visual_dump_close(wtap_dumper *wdh, int *err)
|
|||
struct visual_file_hdr vfile_hdr;
|
||||
const char *magicp;
|
||||
size_t magic_size;
|
||||
struct tm *tm;
|
||||
|
||||
/* If the visual structure was never allocated then nothing useful
|
||||
can be done. */
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* Based on the code that handles netmon files.
|
||||
*
|
||||
* $Id: visual.h,v 1.2 2001/12/05 21:42:42 guy Exp $
|
||||
* $Id: visual.h,v 1.3 2002/02/27 08:57:25 guy Exp $
|
||||
*
|
||||
* Wiretap Library
|
||||
* Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
|
@ -30,6 +30,6 @@
|
|||
|
||||
int visual_open(wtap *wth, int *err);
|
||||
gboolean visual_dump_open(wtap_dumper *wdh, int *err);
|
||||
int visual_dump_can_write_encap(int filetype, int encap);
|
||||
int visual_dump_can_write_encap(int encap);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue