Removed trailing whitespaces from .h and .c files using the

winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6116
This commit is contained in:
Jörg Mayer 2002-08-28 20:41:00 +00:00
parent 64b6acac6d
commit 48be4e530d
99 changed files with 2000 additions and 2000 deletions

View File

@ -1,23 +1,23 @@
/* acconfig.h
* #ifdefs to be controlled by "configure"
*
* $Id: acconfig.h,v 1.2 2001/10/28 01:27:59 guy Exp $
* $Id: acconfig.h,v 1.3 2002/08/28 20:40:43 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,7 +1,7 @@
/* atalk-utils.c
* Routines for Appletalk utilities (DDP, currently).
*
* $Id: atalk-utils.c,v 1.2 2002/06/28 20:13:03 guy Exp $
* $Id: atalk-utils.c,v 1.3 2002/08/28 20:40:44 jmayer Exp $
*
* Simon Wilkinson <sxw@dcs.ed.ac.uk>
*
@ -9,12 +9,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,18 +1,18 @@
/* atalk-utils.h
* Definitions for Appletalk utilities (DDP, currently).
*
* $Id: atalk-utils.h,v 1.2 2002/06/28 20:13:03 guy Exp $
* $Id: atalk-utils.h,v 1.3 2002/08/28 20:40:44 jmayer Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,23 +1,23 @@
/* bitswap.c
* Table of bit-swapped values of bytes
*
* $Id: bitswap.c,v 1.1 2000/11/15 09:37:51 guy Exp $
* $Id: bitswap.c,v 1.2 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,23 +1,23 @@
/* bitswap.h
* Macro to bitswap a byte by looking it up in a table
*
* $Id: bitswap.h,v 1.1 2000/11/15 09:37:51 guy Exp $
* $Id: bitswap.h,v 1.2 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,22 +1,22 @@
/* column-utils.c
* Routines for column utilities.
*
* $Id: column-utils.c,v 1.17 2002/08/02 21:29:39 jmayer Exp $
* $Id: column-utils.c,v 1.18 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -41,7 +41,7 @@
#include "packet_info.h"
#include "pint.h"
#include "resolv.h"
#include "ipv6-utils.h"
#include "ipv6-utils.h"
#include "osi-utils.h"
/* Allocate all the data structures for constructing column data, given
@ -62,7 +62,7 @@ col_init(column_info *col_info, gint num_cols)
#if 0
/*
* This function does not appear to be used anywhere...
* This function does not appear to be used anywhere...
*/
gboolean
col_get_writable(column_info *cinfo)
@ -120,7 +120,7 @@ col_clear(column_info *cinfo, gint el) {
void
col_set_str(column_info *cinfo, gint el, gchar* str) {
int i;
for (i = 0; i < cinfo->num_cols; i++) {
if (cinfo->fmt_matx[i][el])
cinfo->col_data[i] = str;
@ -138,7 +138,7 @@ col_add_fstr(column_info *cinfo, gint el, gchar *format, ...) {
max_len = COL_MAX_INFO_LEN;
else
max_len = COL_MAX_LEN;
va_start(ap, format);
for (i = 0; i < cinfo->num_cols; i++) {
if (cinfo->fmt_matx[i][el]) {
@ -155,12 +155,12 @@ col_append_fstr(column_info *cinfo, gint el, gchar *format, ...) {
va_list ap;
int i;
size_t len, max_len;
if (el == COL_INFO)
max_len = COL_MAX_INFO_LEN;
else
max_len = COL_MAX_LEN;
va_start(ap, format);
for (i = 0; i < cinfo->num_cols; i++) {
if (cinfo->fmt_matx[i][el]) {
@ -189,12 +189,12 @@ col_prepend_fstr(column_info *cinfo, gint el, gchar *format, ...)
char orig_buf[COL_BUF_MAX_LEN];
char *orig;
size_t max_len;
if (el == COL_INFO)
max_len = COL_MAX_INFO_LEN;
else
max_len = COL_MAX_LEN;
va_start(ap, format);
for (i = 0; i < cinfo->num_cols; i++) {
if (cinfo->fmt_matx[i][el]) {
@ -226,7 +226,7 @@ col_add_str(column_info *cinfo, gint el, const gchar* str) {
max_len = COL_MAX_INFO_LEN;
else
max_len = COL_MAX_LEN;
for (i = 0; i < cinfo->num_cols; i++) {
if (cinfo->fmt_matx[i][el]) {
strncpy(cinfo->col_buf[i], str, max_len);
@ -245,7 +245,7 @@ col_append_str(column_info *cinfo, gint el, gchar* str) {
max_len = COL_MAX_INFO_LEN;
else
max_len = COL_MAX_LEN;
for (i = 0; i < cinfo->num_cols; i++) {
if (cinfo->fmt_matx[i][el]) {
if (cinfo->col_data[i] != cinfo->col_buf[i]) {
@ -496,7 +496,7 @@ col_set_port(packet_info *pinfo, int col, port_type ptype, guint32 port,
else
snprintf(pinfo->cinfo->col_buf[col], COL_MAX_LEN, "%u", port);
break;
case PT_TCP:
if (is_res)
strncpy(pinfo->cinfo->col_buf[col], get_tcp_port(port), COL_MAX_LEN);

View File

@ -1,22 +1,22 @@
/* column-utils.h
* Definitions for column utility structures and routines
*
* $Id: column-utils.h,v 1.6 2002/01/29 08:44:49 guy Exp $
* $Id: column-utils.h,v 1.7 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,23 +1,23 @@
/* column.h
* Definitions for column structures and routines
*
* $Id: column_info.h,v 1.2 2002/01/11 08:21:00 guy Exp $
* $Id: column_info.h,v 1.3 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,22 +1,22 @@
/* conversation.c
* Routines for building lists of packets that are part of a "conversation"
*
* $Id: conversation.c,v 1.19 2002/08/02 21:29:39 jmayer Exp $
* $Id: conversation.c,v 1.20 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -56,7 +56,7 @@ static GHashTable *conversation_hashtable_no_addr2_or_port2 = NULL;
static GMemChunk *conversation_key_chunk = NULL;
static GMemChunk *conversation_chunk = NULL;
#ifdef __NOT_USED__
#ifdef __NOT_USED__
typedef struct conversation_key {
struct conversation_key *next;
address addr1;
@ -91,7 +91,7 @@ static GMemChunk *conv_proto_data_area = NULL;
* Compute the hash value for two given address/port pairs if the match
* is to be exact.
*/
static guint
static guint
conversation_hash_exact(gconstpointer v)
{
conversation_key *key = (conversation_key *)v;
@ -160,7 +160,7 @@ conversation_match_exact(gconstpointer v, gconstpointer w)
/*
* The addresses or the ports don't match.
*/
*/
return 0;
}
@ -168,7 +168,7 @@ conversation_match_exact(gconstpointer v, gconstpointer w)
* Compute the hash value for two given address/port pairs if the match
* has a wildcard address 2.
*/
static guint
static guint
conversation_hash_no_addr2(gconstpointer v)
{
conversation_key *key = (conversation_key *)v;
@ -218,7 +218,7 @@ conversation_match_no_addr2(gconstpointer v, gconstpointer w)
/*
* The addresses or the ports don't match.
*/
*/
return 0;
}
@ -226,7 +226,7 @@ conversation_match_no_addr2(gconstpointer v, gconstpointer w)
* Compute the hash value for two given address/port pairs if the match
* has a wildcard port 2.
*/
static guint
static guint
conversation_hash_no_port2(gconstpointer v)
{
conversation_key *key = (conversation_key *)v;
@ -277,7 +277,7 @@ conversation_match_no_port2(gconstpointer v, gconstpointer w)
/*
* The addresses or the ports don't match.
*/
*/
return 0;
}
@ -285,7 +285,7 @@ conversation_match_no_port2(gconstpointer v, gconstpointer w)
* Compute the hash value for two given address/port pairs if the match
* has a wildcard address 2 and port 2.
*/
static guint
static guint
conversation_hash_no_addr2_or_port2(gconstpointer v)
{
conversation_key *key = (conversation_key *)v;
@ -331,7 +331,7 @@ conversation_match_no_addr2_or_port2(gconstpointer v, gconstpointer w)
/*
* The addresses or the ports don't match.
*/
*/
return 0;
}
@ -512,7 +512,7 @@ conversation_set_port2(conversation_t *conv, guint32 port)
g_hash_table_insert(conversation_hashtable_exact,
conv->key_ptr, conv);
}
}
}
/*
* Set the address 2 value in a key. Remove the original from
@ -566,7 +566,7 @@ conversation_lookup_hashtable(GHashTable *hashtable, address *addr1, address *ad
key.port2 = port2;
return g_hash_table_lookup(hashtable, &key);
}
/*
* Given two address/port pairs for a packet, search for a conversation
@ -655,7 +655,7 @@ find_conversation(address *addr_a, address *addr_b, port_type ptype,
* oriented protocols, the endpoints of a connection
* have only one address each, i.e. you don't get
* packets in a given direction coming from more than
* one address.)
* one address.)
*/
if (!(options & NO_ADDR_B) && ptype != PT_UDP)
conversation_set_addr2(conversation, addr_b);
@ -922,7 +922,7 @@ try_conversation_dissector(address *addr_a, address *addr_b, port_type ptype,
conversation = find_conversation(addr_a, addr_b, ptype, port_a,
port_b, 0);
if (conversation != NULL) {
if (conversation->dissector_handle == NULL){
pinfo->can_desegment=saved_can_desegment;

View File

@ -1,22 +1,22 @@
/* conversation.h
* Routines for building lists of packets that are part of a "conversation"
*
* $Id: conversation.h,v 1.9 2001/11/27 07:13:32 guy Exp $
* $Id: conversation.h,v 1.10 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -25,14 +25,14 @@
#ifndef __CONVERSATION_H__
#define __CONVERSATION_H__
/*
/*
* Flags to pass to "conversation_new()" to indicate that the address 2
* and/or port 2 values for the conversation should be wildcards.
*/
#define NO_ADDR2 0x01
#define NO_PORT2 0x02
/*
/*
* Flags to pass to "find_conversation()" to indicate that the address B
* and/or port B search arguments are wildcards.
*/

View File

@ -1,20 +1,20 @@
/*
* $Id: dfilter-int.h,v 1.6 2002/04/29 07:55:32 guy Exp $
* $Id: dfilter-int.h,v 1.7 2002/08/28 20:40:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 2001 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,20 +1,20 @@
/*
* $Id: dfilter.c,v 1.10 2002/05/09 23:50:30 gram Exp $
* $Id: dfilter.c,v 1.11 2002/08/28 20:40:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 2001 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -245,7 +245,7 @@ dfilter_compile(gchar *text, dfilter_t **dfp)
/* Create bytecode */
dfw_gencode(dfw);
/* Tuck away the bytecode in the dfilter_t */
dfilter = dfilter_new();
dfilter->insns = dfw->insns;
@ -305,7 +305,7 @@ dfilter_prime_proto_tree(dfilter_t *df, proto_tree *tree)
proto_tree_prime_hfid(tree, df->interesting_fields[i]);
}
}
void
dfilter_dump(dfilter_t *df)

View File

@ -1,20 +1,20 @@
/*
* $Id: dfilter.h,v 1.5 2002/05/09 23:50:30 gram Exp $
* $Id: dfilter.h,v 1.6 2002/08/28 20:40:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 2001 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,21 +1,21 @@
/*
* $Id: dfvm.c,v 1.7 2002/05/09 23:50:30 gram Exp $
* $Id: dfvm.c,v 1.8 2002/08/28 20:40:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 2001 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,20 +1,20 @@
/*
* $Id: dfvm.h,v 1.6 2002/05/09 23:50:30 gram Exp $
* $Id: dfvm.h,v 1.7 2002/08/28 20:40:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 2001 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -67,7 +67,7 @@ typedef enum {
ANY_LT,
ANY_LE,
MK_RANGE
} dfvm_opcode_t;
typedef struct {

View File

@ -1,8 +1,8 @@
/* drange.c
* Routines for providing general range support to the dfilter library
*
* $Id: drange.c,v 1.3 2002/03/02 20:48:11 guy Exp $
*
* $Id: drange.c,v 1.4 2002/08/28 20:40:55 jmayer Exp $
*
* Copyright (c) 2000 by Ed Warnicke <hagbard@physics.rutgers.edu>
*
* Ethereal - Network traffic analyzer
@ -46,7 +46,7 @@ drange_node_free(drange_node* drnode)
g_free(drnode);
}
/* drange_node accessors */
/* drange_node accessors */
gint
drange_node_get_start_offset(drange_node* drnode)
{
@ -136,7 +136,7 @@ drange_new_from_list(GSList *list)
return new_drange;
}
static void
drange_node_free_wrapper(gpointer data, gpointer userdata _U_)
{
@ -163,7 +163,7 @@ gboolean drange_has_total_length(drange* dr){ return dr->has_total_length; }
gint drange_get_total_length(drange* dr) { return dr->total_length; }
gint drange_get_min_start_offset(drange* dr) { return dr->min_start_offset; }
gint drange_get_max_start_offset(drange* dr) { return dr->max_start_offset; }
static void
update_drange_with_node(drange *dr, drange_node *drnode)
{
@ -188,7 +188,7 @@ drange_prepend_drange_node(drange* dr, drange_node* drnode)
if(drnode != NULL){
dr->range_list = g_slist_prepend(dr->range_list,drnode);
update_drange_with_node(dr, drnode);
}
}
}
void
@ -197,7 +197,7 @@ drange_append_drange_node(drange* dr, drange_node* drnode)
if(drnode != NULL){
dr->range_list = g_slist_append(dr->range_list,drnode);
update_drange_with_node(dr, drnode);
}
}
}
void

View File

@ -1,8 +1,8 @@
/* drange.h
* Routines for providing general range support to the dfilter library
*
* $Id: drange.h,v 1.2 2001/03/02 17:04:23 gram Exp $
*
* $Id: drange.h,v 1.3 2002/08/28 20:40:55 jmayer Exp $
*
* Copyright (c) 2000 by Ed Warnicke <hagbard@physics.rutgers.edu>
*
* Ethereal - Network traffic analyzer
@ -23,16 +23,16 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __DRANGE_H__
#ifndef __DRANGE_H__
#define __DRANGE_H__
#include <glib.h>
/* Please don't directly manipulate these structs. Please use
* the methods provided. If you REALLY can't do what you need to
* do with the methods provided please write new methods that do
* what you need, put them into the drange object here, and limit
* your direct manipulation of the drange and drange_node structs to
/* Please don't directly manipulate these structs. Please use
* the methods provided. If you REALLY can't do what you need to
* do with the methods provided please write new methods that do
* what you need, put them into the drange object here, and limit
* your direct manipulation of the drange and drange_node structs to
* here.
*/
@ -67,7 +67,7 @@ void drange_node_free(drange_node* drnode);
/* Call drange_node destructor on all list items */
void drange_node_free_list(GSList* list);
/* drange_node accessors */
/* drange_node accessors */
gint drange_node_get_start_offset(drange_node* drnode);
gint drange_node_get_length(drange_node* drnode);
gint drange_node_get_end_offset(drange_node* drnode);
@ -83,7 +83,7 @@ void drange_node_set_to_the_end(drange_node* drnode);
drange* drange_new();
drange* drange_new_from_list(GSList *list);
/* drange destructor, only use this if you used drange_new() to creat
/* drange destructor, only use this if you used drange_new() to creat
* the drange
*/
void drange_free(drange* dr);

View File

@ -1,20 +1,20 @@
/*
* $Id: gencode.c,v 1.6 2002/03/02 20:48:11 guy Exp $
* $Id: gencode.c,v 1.7 2002/08/28 20:40:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 2001 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -331,7 +331,7 @@ typedef struct {
int i;
int *fields;
} hash_key_iterator;
static void
get_hash_key(gpointer key, gpointer value _U_, gpointer user_data)
{
@ -356,7 +356,7 @@ dfw_interesting_fields(dfwork_t *dfw, int *caller_num_fields)
hki.fields = g_new(int, num_fields);
hki.i = 0;
g_hash_table_foreach(dfw->interesting_fields, get_hash_key, &hki);
*caller_num_fields = num_fields;
return hki.fields;

View File

@ -1,4 +1,4 @@
/* $Id: glib-util.c,v 1.1 2001/02/01 20:21:18 gram Exp $ */
/* $Id: glib-util.c,v 1.2 2002/08/28 20:40:55 jmayer Exp $ */
#include <string.h>
#include <glib.h>
@ -44,4 +44,4 @@ g_substrdup(const char *s, int start, int len)
newstring[abs_len] = 0;
return newstring;
}
}

View File

@ -1,20 +1,20 @@
/*
* $Id: semcheck.c,v 1.12 2002/08/24 19:45:26 guy Exp $
* $Id: semcheck.c,v 1.13 2002/08/28 20:40:55 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 2001 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -86,7 +86,7 @@ compatible_ftypes(ftenum_t a, ftenum_t b)
default:
return FALSE;
}
case FT_STRING:
case FT_STRINGZ:
case FT_UINT_STRING:
@ -161,7 +161,7 @@ mk_fvalue_from_val_string(header_field_info *hfinfo, char *s)
case FT_INT24:
case FT_INT32:
break;
case FT_NUM_TYPES:
g_assert_not_reached();
}
@ -243,7 +243,7 @@ is_bytes_type(enum ftenum type)
case FT_INT32:
case FT_INT64:
return FALSE;
case FT_NUM_TYPES:
g_assert_not_reached();
}
@ -348,7 +348,7 @@ check_relation_LHS_STRING(FtypeCanFunc can_func _U_, stnode_t *st_node,
type1 = stnode_type_id(st_arg1);
type2 = stnode_type_id(st_arg2);
if (type2 == STTYPE_FIELD) {
hfinfo2 = stnode_data(st_arg2);
ftype2 = hfinfo2->type;

View File

@ -1,21 +1,21 @@
/*
* $Id: semcheck.h,v 1.2 2001/02/01 20:31:18 gram Exp $
* $Id: semcheck.h,v 1.3 2002/08/28 20:40:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 2001 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,21 +1,21 @@
/*
* $Id: sttype-integer.c,v 1.1 2001/02/27 19:23:28 gram Exp $
* $Id: sttype-integer.c,v 1.2 2002/08/28 20:40:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 2001 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,21 +1,21 @@
/*
* $Id: sttype-pointer.c,v 1.2 2001/02/01 20:31:18 gram Exp $
* $Id: sttype-pointer.c,v 1.3 2002/08/28 20:40:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 2001 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,20 +1,20 @@
/*
* $Id: sttype-range.c,v 1.4 2002/01/21 07:37:37 guy Exp $
* $Id: sttype-range.c,v 1.5 2002/08/28 20:40:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 2001 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,21 +1,21 @@
/*
* $Id: sttype-range.h,v 1.3 2001/02/27 19:23:28 gram Exp $
* $Id: sttype-range.h,v 1.4 2002/08/28 20:40:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 2001 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,21 +1,21 @@
/*
* $Id: sttype-string.c,v 1.2 2001/02/01 20:31:18 gram Exp $
* $Id: sttype-string.c,v 1.3 2002/08/28 20:40:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 2001 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,21 +1,21 @@
/*
* $Id: sttype-test.c,v 1.2 2001/02/01 20:31:18 gram Exp $
* $Id: sttype-test.c,v 1.3 2002/08/28 20:40:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 2001 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,21 +1,21 @@
/*
* $Id: sttype-test.h,v 1.2 2001/02/01 20:31:18 gram Exp $
* $Id: sttype-test.h,v 1.3 2002/08/28 20:40:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 2001 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,21 +1,21 @@
/*
* $Id: syntax-tree.c,v 1.4 2001/10/26 17:29:11 gram Exp $
* $Id: syntax-tree.c,v 1.5 2002/08/28 20:40:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 2001 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,21 +1,21 @@
/*
* $Id: syntax-tree.h,v 1.3 2001/02/27 19:23:28 gram Exp $
* $Id: syntax-tree.h,v 1.4 2002/08/28 20:40:56 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 2001 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -114,7 +114,7 @@ stnode_value(stnode_t *node);
assert_magic(value, magicnum); \
return value->attr; \
}
#define STTYPE_ACCESSOR_PROTOTYPE(ret,type,attr) \
ret \
CONCAT(CONCAT(CONCAT(sttype_,type),_),attr) (stnode_t *node);

View File

@ -1,21 +1,21 @@
/* epan.h
*
* $Id: epan.h,v 1.12 2001/12/18 19:09:03 gram Exp $
* $Id: epan.h,v 1.13 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal Protocol Analyzer Library
*
* Copyright (c) 2001 by Gerald Combs <gerald@ethereal.com>
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,21 +1,21 @@
/* epan_dissect.h
*
* $Id: epan_dissect.h,v 1.1 2001/12/18 19:09:03 gram Exp $
* $Id: epan_dissect.h,v 1.2 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal Protocol Analyzer Library
*
* Copyright (c) 2001 by Gerald Combs <gerald@ethereal.com>
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -13,7 +13,7 @@
* This source code may be translated into executable form and incorporated
* into proprietary software; there is no requirement for such software to
* contain a copyright notice related to this source.
* $Id: except.c,v 1.2 2001/07/27 16:20:39 gram Exp $
* $Id: except.c,v 1.3 2002/08/28 20:40:44 jmayer Exp $
* $Name: $
*/
@ -27,7 +27,7 @@
#define XCEPT_BUFFER_SIZE 1024
#ifdef KAZLIB_RCSID
static const char rcsid[] = "$Id: except.c,v 1.2 2001/07/27 16:20:39 gram Exp $";
static const char rcsid[] = "$Id: except.c,v 1.3 2002/08/28 20:40:44 jmayer Exp $";
#endif
#define group except_group
@ -96,7 +96,7 @@ int except_init(void)
int uh_ok = (pthread_key_create(&uh_key, 0) == 0);
int alloc_ok = (pthread_key_create(&alloc_key, 0) == 0);
int dealloc_ok = (pthread_key_create(&dealloc_key, 0) == 0);
if (!top_ok || !uh_ok || !alloc_ok || !dealloc_ok) {
retval = 0;
init_counter = 0;
@ -187,7 +187,7 @@ static void do_throw(except_t *except)
struct except_catch *catcher = top->info.catcher;
const except_id_t *pi = catcher->id;
size_t i;
assert (top->type == XCEPT_CATCHER);
except_free(catcher->obj.dyndata);

View File

@ -14,7 +14,7 @@
* into proprietary software; there is no requirement for such software to
* contain a copyright notice related to this source.
*
* $Id: except.h,v 1.3 2002/08/14 19:18:15 guy Exp $
* $Id: except.h,v 1.4 2002/08/28 20:40:44 jmayer Exp $
* $Name: $
*/
@ -66,7 +66,7 @@ struct except_stacknode {
struct except_stacknode *except_down;
enum except_stacktype except_type;
union {
struct except_catch *except_catcher;
struct except_catch *except_catcher;
struct except_cleanup *except_cleanup;
} except_info;
};
@ -105,7 +105,7 @@ extern void except_free(void *);
#endif
/*
* void except_cleanup_push(void (*)(void *), void *);
* void except_cleanup_push(void (*)(void *), void *);
* void except_cleanup_pop(int);
* void except_checked_cleanup_pop(void (*)(void *), int);
* void except_try_push(const except_id_t [], size_t, except_t **);
@ -130,7 +130,7 @@ extern void except_free(void *);
if (E) \
except_cl.except_func(except_cl.except_context); \
}
#define except_try_push(ID, NUM, PPE) \
{ \
struct except_stacknode except_sn; \
@ -144,6 +144,6 @@ extern void except_free(void *);
#define except_try_pop() \
except_free(except_ch.except_obj.except_dyndata); \
except_pop(); \
}
}
#endif

View File

@ -1,22 +1,22 @@
/* filesystem.c
* Filesystem utility routines
*
* $Id: filesystem.c,v 1.19 2002/08/02 21:29:39 jmayer Exp $
* $Id: filesystem.c,v 1.20 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,22 +1,22 @@
/* filesystem.h
* Filesystem utility definitions
*
* $Id: filesystem.h,v 1.11 2002/06/23 21:33:09 guy Exp $
* $Id: filesystem.h,v 1.12 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,23 +1,23 @@
/* frame_data.c
* Routines for packet disassembly
*
* $Id: frame_data.c,v 1.2 2002/08/02 21:29:39 jmayer Exp $
* $Id: frame_data.c,v 1.3 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -41,8 +41,8 @@ typedef struct _frame_proto_data {
static GMemChunk *frame_proto_data_area = NULL;
/*
* Free up any space allocated for frame proto data areas and then
/*
* Free up any space allocated for frame proto data areas and then
* allocate a new area.
*
* We can free the area, as the structures it contains are pointed to by
@ -68,7 +68,7 @@ frame_data_init(void)
register_init_routine(&packet_init_protocol);
}
void
void
frame_data_cleanup(void)
{
/* this function intentionally left blank :) */
@ -94,7 +94,7 @@ void
p_add_proto_data(frame_data *fd, int proto, void *proto_data)
{
frame_proto_data *p1 = g_mem_chunk_alloc(frame_proto_data_area);
g_assert(p1 != NULL);
p1 -> proto = proto;

View File

@ -1,22 +1,22 @@
/* frame_data.h
* Definitions for frame_data structures and routines
*
* $Id: frame_data.h,v 1.6 2002/08/14 19:18:15 guy Exp $
* $Id: frame_data.h,v 1.7 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,20 +1,20 @@
/*
* $Id: ftype-bytes.c,v 1.12 2002/05/10 02:44:08 gram Exp $
/*
* $Id: ftype-bytes.c,v 1.13 2002/08/28 20:41:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 2001 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -96,7 +96,7 @@ is_byte_sep(guint8 c)
{
return (c == '-' || c == ':' || c == '.');
}
static gboolean
val_from_string(fvalue_t *fv, char *s, LogFunc logfunc)
{
@ -319,7 +319,7 @@ cmp_gt(fvalue_t *fv_a, fvalue_t *fv_b)
if (a->len < b->len) {
return FALSE;
}
return (memcmp(a->data, b->data, a->len) > 0);
}
@ -336,7 +336,7 @@ cmp_ge(fvalue_t *fv_a, fvalue_t *fv_b)
if (a->len < b->len) {
return FALSE;
}
return (memcmp(a->data, b->data, a->len) >= 0);
}
@ -353,7 +353,7 @@ cmp_lt(fvalue_t *fv_a, fvalue_t *fv_b)
if (a->len > b->len) {
return FALSE;
}
return (memcmp(a->data, b->data, a->len) < 0);
}
@ -370,7 +370,7 @@ cmp_le(fvalue_t *fv_a, fvalue_t *fv_b)
if (a->len > b->len) {
return FALSE;
}
return (memcmp(a->data, b->data, a->len) <= 0);
}
@ -387,7 +387,7 @@ cmp_gt_i64(fvalue_t *fv_a, fvalue_t *fv_b)
if (a->len < b->len) {
return FALSE;
}
if ((a->data[0] & 0x80) == 0) {
/*
* "a" is positive.
@ -430,7 +430,7 @@ cmp_ge_i64(fvalue_t *fv_a, fvalue_t *fv_b)
if (a->len < b->len) {
return FALSE;
}
if ((a->data[0] & 0x80) == 0) {
/*
* "a" is positive.
@ -473,7 +473,7 @@ cmp_lt_i64(fvalue_t *fv_a, fvalue_t *fv_b)
if (a->len > b->len) {
return FALSE;
}
if (a->data[0] & 0x80) {
/*
* "a" is negative.
@ -516,7 +516,7 @@ cmp_le_i64(fvalue_t *fv_a, fvalue_t *fv_b)
if (a->len > b->len) {
return FALSE;
}
if (a->data[0] & 0x80) {
/*
* "a" is negative.

View File

@ -1,20 +1,20 @@
/*
* $Id: ftype-double.c,v 1.6 2002/08/24 19:45:28 guy Exp $
* $Id: ftype-double.c,v 1.7 2002/08/28 20:41:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 2001 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,20 +1,20 @@
/*
* $Id: ftype-integer.c,v 1.9 2002/07/17 00:42:54 guy Exp $
* $Id: ftype-integer.c,v 1.10 2002/08/28 20:41:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 2001 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,20 +1,20 @@
/*
* $Id: ftype-ipv4.c,v 1.8 2002/02/05 22:50:17 guy Exp $
* $Id: ftype-ipv4.c,v 1.9 2002/08/28 20:41:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 2001 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,21 +1,21 @@
/*
* $Id: ftype-none.c,v 1.3 2001/07/13 00:55:56 guy Exp $
* $Id: ftype-none.c,v 1.4 2002/08/28 20:41:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 2001 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,20 +1,20 @@
/*
* $Id: ftype-string.c,v 1.6 2002/03/02 20:48:13 guy Exp $
* $Id: ftype-string.c,v 1.7 2002/08/28 20:41:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 2001 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,20 +1,20 @@
/*
* $Id: ftype-time.c,v 1.16 2002/02/05 22:50:17 guy Exp $
* $Id: ftype-time.c,v 1.17 2002/08/28 20:41:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 2001 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,20 +1,20 @@
/*
* $Id: ftype-tvbuff.c,v 1.6 2002/01/21 07:37:39 guy Exp $
* $Id: ftype-tvbuff.c,v 1.7 2002/08/28 20:41:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 2001 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,20 +1,20 @@
/*
* $Id: ftypes-int.h,v 1.5 2002/01/21 07:37:39 guy Exp $
* $Id: ftypes-int.h,v 1.6 2002/08/28 20:41:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 2001 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,20 +1,20 @@
/*
* $Id: ftypes.c,v 1.6 2002/02/05 22:50:17 guy Exp $
* $Id: ftypes.c,v 1.7 2002/08/28 20:41:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 2001 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,22 +1,22 @@
/* ftypes.h
* Definitions for field types
*
* $Id: ftypes.h,v 1.13 2002/08/24 19:45:28 guy Exp $
* $Id: ftypes.h,v 1.14 2002/08/28 20:41:00 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 2001 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -2,23 +2,23 @@
*
* Useful macro for use during development.
*
* $Id: gdebug.h,v 1.2 2001/02/01 20:31:17 gram Exp $
* $Id: gdebug.h,v 1.3 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 2001 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -59,7 +59,7 @@ static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93";
#include "inet_aton.h"
/*
/*
* Check whether "cp" is a valid ascii representation
* of an Internet address and convert to a binary address.
* Returns 1 if the address is valid, 0 if not.
@ -98,7 +98,7 @@ inet_aton(cp_arg, addr)
continue;
}
if (base == 16 && isascii(c) && isxdigit(c)) {
val = (val << 4) +
val = (val << 4) +
(c + 10 - (islower(c) ? 'a' : 'A'));
cp++;
continue;

View File

@ -1,6 +1,6 @@
/* inet_aton.h
*
* $Id: inet_aton.h,v 1.1 2000/10/14 04:31:26 gram Exp $
* $Id: inet_aton.h,v 1.2 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -10,12 +10,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -20,7 +20,7 @@
#endif
#if defined(LIBC_SCCS) && !defined(lint)
static char rcsid[] = "$Id: inet_ntop.c,v 1.5 2002/08/04 00:45:59 jmayer Exp $";
static char rcsid[] = "$Id: inet_ntop.c,v 1.6 2002/08/28 20:40:44 jmayer Exp $";
#endif /* LIBC_SCCS and not lint */
#ifdef HAVE_SYS_PARAM_H
@ -220,7 +220,7 @@ inet_ntop6(src, dst, size)
tp += sprintf(tp, "%x", words[i]);
}
/* Was it a trailing run of 0x00's? */
if (best.base != -1 && (best.base + best.len) ==
if (best.base != -1 && (best.base + best.len) ==
(NS_IN6ADDRSZ / NS_INT16SZ))
*tp++ = ':';
*tp++ = '\0';

View File

@ -1,6 +1,6 @@
/* inet_v6defs.h
*
* $Id: inet_v6defs.h,v 1.1 2000/10/14 04:31:26 gram Exp $
* $Id: inet_v6defs.h,v 1.2 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -10,12 +10,12 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -2,22 +2,22 @@
* Routines for handling of 64-bit integers
* 2001 Ronnie Sahlberg
*
* $Id: int-64bit.c,v 1.2 2002/03/02 20:48:10 guy Exp $
* $Id: int-64bit.c,v 1.3 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -30,11 +30,11 @@
#include <string.h>
#include "int-64bit.h"
/* all functions take the 64bit integer parameter as a
/* all functions take the 64bit integer parameter as a
pointer to a 64bit integer in network order.
that is ptr[0] is the most significant byte and
ptr[7] is the least significant byte.
*/
*/
#define U64STRLEN 21
@ -112,11 +112,11 @@ static const signed char u64val[64][U64STRLEN] =
/* convert an unsigned 64 bit integer into a string
it is important that this function is efficient
it is important that this function is efficient
since it will be used for every 64bit integer in
any capture.
It is much less important that the inverse: atou64
be efficient since it is only called when
be efficient since it is only called when
diplayfilters are entered.
"neg" should be 1 if the number should have a "-" put in
@ -154,7 +154,7 @@ n64toa(const unsigned char *u64ptr, int neg)
since othevise the signed char in acc will
owerflow/wrap, but we dont need to do it
for every iteration. its enough if we
do it halfway through and at the end
do it halfway through and at the end
and we will prevent any overflow.
*/
if((i%4)==0){
@ -162,7 +162,7 @@ n64toa(const unsigned char *u64ptr, int neg)
for(j=0;j<U64STRLEN-1;j++){
if(acc[j]>9){
int x;
x=acc[j]/10;
x=acc[j]/10;
acc[j+1]+=x;
acc[j]-=x*10;
}
@ -312,7 +312,7 @@ atou64(const char *u64str, unsigned char *u64int)
/* clear the residual string and copy the
original to it (subtracting '0')
*/
*/
for(i=0;i<U64STRLEN;i++){
res[i]=0;
}
@ -324,7 +324,7 @@ atou64(const char *u64str, unsigned char *u64int)
res[i]=u64str[len]-'0';
}
/* go through all bits and subtract their
/* go through all bits and subtract their
value */
for(i=63;i>=0;i--){
if(revcmp(u64val[i], res, U64STRLEN)<=0){
@ -425,7 +425,7 @@ ntoh(unsigned char h)
if((h>='A')&&(h<='F')){
return h+10-'A';
}
if((h>='a')&&(h<='f')){
return h+10-'a';
}
@ -490,7 +490,7 @@ htou64(const char *u64str, unsigned char *u64int)
for(i=0;i<len;i++){
str[15-i]=u64str[len+1-i];
}
for(i=0;i<8;i++){
u64int[i]=(ntoh(str[i*2])<<4)

View File

@ -1,18 +1,18 @@
/* int-64bit.h
* Handling of 64-bit integers
* Handling of 64-bit integers
*
* $Id: int-64bit.h,v 1.1 2001/11/22 03:07:06 hagbard Exp $
* $Id: int-64bit.h,v 1.2 2002/08/28 20:40:44 jmayer Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -5,23 +5,23 @@
*
* Gilbert Ramirez <gram@alumni.rice.edu>
*
* $Id: ipv4.c,v 1.3 2002/08/02 21:29:39 jmayer Exp $
* $Id: ipv4.c,v 1.4 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -5,23 +5,23 @@
*
* Gilbert Ramirez <gram@alumni.rice.edu>
*
* $Id: ipv4.h,v 1.3 2001/11/13 23:55:37 gram Exp $
* $Id: ipv4.h,v 1.4 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,7 +1,7 @@
/* ipv6-utils.h
* Definitions for IPv6 packet disassembly
* Definitions for IPv6 packet disassembly
*
* $Id: ipv6-utils.h,v 1.1 2001/04/01 07:06:23 hagbard Exp $
* $Id: ipv6-utils.h,v 1.2 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -9,17 +9,17 @@
* Copyright 1998 Gerald Combs
*
* MobileIPv6 support added by Tomislav Borosa <tomislav.borosa@siemens.hr>
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,22 +1,22 @@
/* nstime.h
* Definition of data structure to hold time values with nanosecond resolution
*
* $Id: nstime.h,v 1.1 2001/09/14 07:33:04 guy Exp $
* $Id: nstime.h,v 1.2 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -2,7 +2,7 @@
* Routines for ISO/OSI network and transport protocol packet disassembly
* Main entrance point and common functions
*
* $Id: osi-utils.c,v 1.7 2002/08/02 21:29:39 jmayer Exp $
* $Id: osi-utils.c,v 1.8 2002/08/28 20:40:44 jmayer Exp $
* Laurent Deniel <deniel@worldnet.fr>
* Ralf Schneider <Ralf.Schneider@t-online.de>
*
@ -10,17 +10,17 @@
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -51,9 +51,9 @@ gchar *print_nsap_net( const guint8 *buffer, int length)
}
if ( ( length == RFC1237_NSAP_LEN ) || ( length == RFC1237_NSAP_LEN + 1 ) ) {
cur += sprintf( cur, "%s", print_area( buffer, RFC1237_FULLAREA_LEN ) );
cur += sprintf( cur, "%s", print_system_id( buffer + RFC1237_FULLAREA_LEN,
cur += sprintf( cur, "%s", print_system_id( buffer + RFC1237_FULLAREA_LEN,
RFC1237_SYSTEMID_LEN ) );
cur += sprintf( cur, "[%02x]",
cur += sprintf( cur, "[%02x]",
buffer[ RFC1237_FULLAREA_LEN + RFC1237_SYSTEMID_LEN ] );
if ( length == RFC1237_NSAP_LEN + 1 ) {
cur += sprintf( cur, "-%02x", buffer[ length -1 ] );
@ -68,14 +68,14 @@ gchar *print_nsap_net( const guint8 *buffer, int length)
gchar *print_system_id( const guint8 *buffer, int length ) {
int tmp;
gchar *cur;
static gchar str[MAX_SYSTEMID_LEN * 3 + 5]; /* Don't trust exact matching */
gchar *cur;
static gchar str[MAX_SYSTEMID_LEN * 3 + 5]; /* Don't trust exact matching */
if ( ( length <= 0 ) || ( length > MAX_SYSTEMID_LEN ) ) {
sprintf( str, "<Invalid length of SYSTEM ID>");
return( str );
}
}
cur = str;
if ( ( 6 == length ) || ( 7 == length ) ) { /* Special case, print as MAC */
cur += sprintf(cur, "%02x%02x.%02x%02x.%02x%02x", buffer[0], buffer[1],
@ -109,7 +109,7 @@ gchar *print_area(const guint8 *buffer, int length)
/* to do : all real area decoding now: NET is assumed if id len is 1 more byte
* and take away all these stupid resource consuming local statics
*/
static gchar str[MAX_AREA_LEN * 3 + 20]; /* reserve space for nice layout */
gchar *cur;
int tmp = 0;
@ -120,23 +120,23 @@ gchar *print_area(const guint8 *buffer, int length)
sprintf( str, "<Invalid length of AREA>");
return( str );
}
if ( ( ( NSAP_IDI_ISODCC == *buffer )
if ( ( ( NSAP_IDI_ISODCC == *buffer )
|| ( NSAP_IDI_GOSIP2 == *buffer )
)
&&
( ( RFC1237_FULLAREA_LEN == length )
&&
( ( RFC1237_FULLAREA_LEN == length )
|| ( RFC1237_FULLAREA_LEN + 1 == length )
)
)
) { /* AFI is good and length is long enough */
if ( length > RFC1237_FULLAREA_LEN + 1 ) { /* Special Case Designated IS */
sprintf( str, "<Invalid length of AREA for DCC / GOSIP AFI>");
return( str );
}
cur += sprintf( cur, "[%02x|%02x:%02x][%02x|%02x:%02x:%02x|%02x:%02x]",
buffer[0], buffer[1], buffer[2], buffer[3], buffer[4],
cur += sprintf( cur, "[%02x|%02x:%02x][%02x|%02x:%02x:%02x|%02x:%02x]",
buffer[0], buffer[1], buffer[2], buffer[3], buffer[4],
buffer[5], buffer[6], buffer[7], buffer[8] );
cur += sprintf( cur, "[%02x:%02x|%02x:%02x]",
buffer[9], buffer[10], buffer[11], buffer[12] );
@ -151,7 +151,7 @@ gchar *print_area(const guint8 *buffer, int length)
buffer[2] );
return( str );
}
if ( 4 < length ) {
if ( 4 < length ) {
while ( tmp < length / 4 ) { /* 16/4==4 > four Octets left to print */
cur += sprintf( cur, "%02x", buffer[tmp++] );
cur += sprintf( cur, "%02x", buffer[tmp++] );
@ -162,10 +162,10 @@ gchar *print_area(const guint8 *buffer, int length)
sprintf( --cur, "-%02x", buffer[tmp] );
}
else {
for ( ; tmp < length; ) { /* print the rest without dot */
for ( ; tmp < length; ) { /* print the rest without dot */
cur += sprintf( cur, "%02x", buffer[tmp++] );
}
}
}
}
return( str );
}

View File

@ -1,22 +1,22 @@
/* osi-utils.h
*
* $Id: osi-utils.h,v 1.3 2001/04/02 10:41:19 guy Exp $
* $Id: osi-utils.h,v 1.4 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -27,9 +27,9 @@
/* OSI Global defines, common for all OSI protocols */
#define MAX_NSAP_LEN 30
#define MAX_SYSTEMID_LEN 15
#define MAX_AREA_LEN 30
#define MAX_NSAP_LEN 30
#define MAX_SYSTEMID_LEN 15
#define MAX_AREA_LEN 30
#define RFC1237_NSAP_LEN 20
#define RFC1237_FULLAREA_LEN 13

View File

@ -1,22 +1,22 @@
/* packet.c
* Routines for packet disassembly
*
* $Id: packet.c,v 1.77 2002/08/24 10:41:40 guy Exp $
* $Id: packet.c,v 1.78 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -63,7 +63,7 @@ static gint proto_malformed = -1;
static dissector_handle_t frame_handle = NULL;
static dissector_handle_t data_handle = NULL;
const true_false_string flags_set_truth = {
const true_false_string flags_set_truth = {
"Set",
"Not set"
};
@ -589,7 +589,7 @@ dissector_try_port(dissector_table_t sub_dissectors, guint32 port,
* we return TRUE.
*/
return ret != 0;
}
}
return FALSE;
}
@ -1035,7 +1035,7 @@ register_dissector(const char *name, dissector_t dissector, int proto)
handle->is_new = FALSE;
handle->dissector.old = dissector;
handle->proto_index = proto;
g_hash_table_insert(registered_dissectors, (gpointer)name,
(gpointer) handle);
}
@ -1059,7 +1059,7 @@ new_register_dissector(const char *name, new_dissector_t dissector, int proto)
handle->is_new = TRUE;
handle->dissector.new = dissector;
handle->proto_index = proto;
g_hash_table_insert(registered_dissectors, (gpointer)name,
(gpointer) handle);
}

View File

@ -1,22 +1,22 @@
/* packet.h
* Definitions for packet disassembly structures and routines
*
* $Id: packet.h,v 1.59 2002/08/21 21:25:21 tpot Exp $
* $Id: packet.h,v 1.60 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,22 +1,22 @@
/* packet_info.h
* Definitions for packet info structures and routines
*
* $Id: packet_info.h,v 1.18 2002/08/22 18:53:54 guy Exp $
* $Id: packet_info.h,v 1.19 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -2,23 +2,23 @@
* Definitions for extracting and translating integers safely and portably
* via pointers.
*
* $Id: pint.h,v 1.5 2002/08/02 21:29:39 jmayer Exp $
* $Id: pint.h,v 1.6 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -62,7 +62,7 @@
(guint32)*((guint8 *)(p)+0)<<0)
/* Macros to byte-swap 32-bit and 16-bit quantities. */
#define BSWAP32(x) \
((((x)&0xFF000000)>>24) | \

View File

@ -1,22 +1,22 @@
/* plugins.c
* plugin routines
*
* $Id: plugins.c,v 1.58 2002/08/14 19:18:15 guy Exp $
* $Id: plugins.c,v 1.59 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1999 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -46,7 +46,7 @@
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <errno.h>
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>

View File

@ -1,23 +1,23 @@
/* plugins.h
* definitions for plugins structures
*
* $Id: plugins.h,v 1.8 2001/03/31 22:36:21 hagbard Exp $
* $Id: plugins.h,v 1.9 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1999 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,22 +1,22 @@
/* proto.c
* Routines for protocol tree
*
* $Id: proto.c,v 1.73 2002/08/24 19:45:24 guy Exp $
* $Id: proto.c,v 1.74 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -483,7 +483,7 @@ proto_tree_add_text(proto_tree *tree, tvbuff_t *tvb, gint start, gint length,
/* Add a text-only node to the proto_tree (va_list version) */
proto_item *
proto_tree_add_text_valist(proto_tree *tree, tvbuff_t *tvb, gint start,
proto_tree_add_text_valist(proto_tree *tree, tvbuff_t *tvb, gint start,
gint length, const char *format, va_list ap)
{
proto_item *pi;
@ -802,7 +802,7 @@ proto_tree_add_none_format(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint st
return pi;
}
static void
proto_tree_set_protocol_tvb(field_info *fi, tvbuff_t *tvb)
{
@ -1930,7 +1930,7 @@ void
proto_item_set_len(proto_item *pi, gint length)
{
field_info *fi;
if (pi == NULL)
return;
fi = PITEM_FINFO(pi);
@ -1967,7 +1967,7 @@ proto_tree_create_root(void)
return (proto_tree*) g_node_new(pnode);
}
/* "prime" a proto_tree with a single hfid that a dfilter
* is interested in. */
void
@ -2084,14 +2084,14 @@ static protocol_t *
find_protocol_by_id(int proto_id)
{
GList *list_entry;
list_entry = g_list_find_custom(protocols, &proto_id, compare_proto_id);
if (list_entry == NULL)
return NULL;
return list_entry->data;
}
static gint compare_filter_name(gconstpointer proto_arg,
static gint compare_filter_name(gconstpointer proto_arg,
gconstpointer filter_name)
{
const protocol_t *protocol = proto_arg;
@ -2106,7 +2106,7 @@ int proto_get_id_by_filter_name(gchar* filter_name)
protocol_t *protocol;
list_entry = g_list_find_custom(protocols, filter_name,
compare_filter_name);
compare_filter_name);
if (list_entry == NULL)
return -1;
protocol = list_entry->data;
@ -2160,7 +2160,7 @@ proto_can_disable_protocol(int proto_id)
return protocol->can_disable;
}
void
void
proto_set_decoding(int proto_id, gboolean enabled)
{
protocol_t *protocol;
@ -2170,7 +2170,7 @@ proto_set_decoding(int proto_id, gboolean enabled)
protocol->is_enabled = enabled;
}
void
void
proto_set_cant_disable(int proto_id)
{
protocol_t *protocol;
@ -2304,7 +2304,7 @@ proto_item_fill_label(field_info *fi, gchar *label_str)
bytes = fvalue_get(fi->value);
if (bytes) {
snprintf(label_str, ITEM_LABEL_LENGTH,
"%s: %s", hfinfo->name,
"%s: %s", hfinfo->name,
bytes_to_str(bytes, fvalue_length(fi->value)));
}
else {
@ -2415,7 +2415,7 @@ proto_item_fill_label(field_info *fi, gchar *label_str)
get_hostname6((struct e_in6_addr *)bytes),
ip6_to_str((struct e_in6_addr*)bytes));
break;
case FT_STRING:
case FT_STRINGZ:
case FT_UINT_STRING:
@ -3456,7 +3456,7 @@ proto_alloc_dfilter_string(field_info *finfo, guint8 *pd)
/* XXX - bytes_to_str_punct() will truncate long strings with '...' */
bytes_to_str_punct(fvalue_get(finfo->value),
fvalue_length(finfo->value),':'));
break;
break;
default:
c = pd + finfo->start;

View File

@ -1,22 +1,22 @@
/* proto.h
* Definitions for protocol display
*
* $Id: proto.h,v 1.35 2002/08/24 19:45:24 guy Exp $
* $Id: proto.h,v 1.36 2002/08/28 20:40:44 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -122,7 +122,7 @@ typedef struct {
/* Each GNode (proto_tree, proto_item) points to one of
* these. */
typedef struct {
field_info *finfo;
field_info *finfo;
tree_data_t *tree_data;
} proto_node;
@ -171,7 +171,7 @@ extern int proto_item_get_len(proto_item *ti);
/* Creates new proto_tree root */
extern proto_tree* proto_tree_create_root(void);
/* Mark a field/protocol ID as "interesting". */
/* Mark a field/protocol ID as "interesting". */
extern void
proto_tree_prime_hfid(proto_tree *tree, int hfid);

View File

@ -1,24 +1,24 @@
/* resolv.c
* Routines for network object lookup
*
* $Id: resolv.c,v 1.24 2002/08/02 21:29:40 jmayer Exp $
* $Id: resolv.c,v 1.25 2002/08/28 20:40:45 jmayer Exp $
*
* Laurent Deniel <deniel@worldnet.fr>
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -175,7 +175,7 @@ gchar *g_pipxnets_path = NULL; /* personal ipxnets file */
/* first resolving call */
/*
* Local function definitions
* Local function definitions
*/
static guchar *serv_name_lookup(guint port, port_type proto)
@ -205,13 +205,13 @@ static guchar *serv_name_lookup(guint port, port_type proto)
/*NOTREACHED*/
break;
} /* proto */
hash_idx = HASH_PORT(port);
tp = table[hash_idx];
if( tp == NULL ) {
tp = table[hash_idx] = (hashname_t *)g_malloc(sizeof(hashname_t));
} else {
} else {
while(1) {
if( tp->addr == port ) {
return tp->name;
@ -224,12 +224,12 @@ static guchar *serv_name_lookup(guint port, port_type proto)
tp = tp->next;
}
}
/* fill in a new entry */
tp->addr = port;
tp->next = NULL;
if (!(g_resolv_flags & RESOLV_TRANSPORT) ||
if (!(g_resolv_flags & RESOLV_TRANSPORT) ||
(servp = getservbyport(g_htons(port), serv_proto)) == NULL) {
/* unknown port */
sprintf(tp->name, "%d", port);
@ -268,7 +268,7 @@ static guchar *host_name_lookup(guint addr, gboolean *found)
if( tp == NULL ) {
tp = host_table[hash_idx] = (hashname_t *)g_malloc(sizeof(hashname_t));
} else {
} else {
while(1) {
if( tp->addr == addr ) {
if (tp->is_dummy_entry)
@ -283,7 +283,7 @@ static guchar *host_name_lookup(guint addr, gboolean *found)
tp = tp->next;
}
}
/* fill in a new entry */
tp->addr = addr;
tp->next = NULL;
@ -296,9 +296,9 @@ static guchar *host_name_lookup(guint addr, gboolean *found)
*/
if (addr != 0 && (g_resolv_flags & RESOLV_NETWORK)) {
#ifdef AVOID_DNS_TIMEOUT
/* Quick hack to avoid DNS/YP timeout */
if (!setjmp(hostname_env)) {
signal(SIGALRM, abort_network_query);
alarm(DNS_TIMEOUT);
@ -336,9 +336,9 @@ static guchar *host_name_lookup6(struct e_in6_addr *addr, gboolean *found)
if (g_resolv_flags & RESOLV_NETWORK) {
#ifdef AVOID_DNS_TIMEOUT
/* Quick hack to avoid DNS/YP timeout */
if (!setjmp(hostname_env)) {
signal(SIGALRM, abort_network_query);
alarm(DNS_TIMEOUT);
@ -361,7 +361,7 @@ static guchar *host_name_lookup6(struct e_in6_addr *addr, gboolean *found)
/* unknown host or DNS timeout */
#endif /* INET6 */
*found = FALSE;
sprintf(name, "%s", ip6_to_str(addr));
sprintf(name, "%s", ip6_to_str(addr));
return (name);
}
@ -378,16 +378,16 @@ static int fgetline(char **buf, int *size, FILE *fp)
return -1;
if (*buf == NULL) {
if (*size == 0)
if (*size == 0)
*size = BUFSIZ;
if ((*buf = g_malloc(*size)) == NULL)
return -1;
}
if (feof(fp))
return -1;
len = 0;
while ((c = getc(fp)) != EOF && c != '\n') {
if (len+1 >= *size) {
@ -399,9 +399,9 @@ static int fgetline(char **buf, int *size, FILE *fp)
if (len == 0 && c == EOF)
return -1;
(*buf)[len] = '\0';
return len;
} /* fgetline */
@ -411,15 +411,15 @@ static int fgetline(char **buf, int *size, FILE *fp)
* Ethernet / manufacturer resolution
*
* The following functions implement ethernet address resolution and
* ethers files parsing (see ethers(4)).
* ethers files parsing (see ethers(4)).
*
* The manuf file has the same format as ethers(4) except that names are
* truncated to MAXMANUFLEN-1 characters and that an address contains
* The manuf file has the same format as ethers(4) except that names are
* truncated to MAXMANUFLEN-1 characters and that an address contains
* only 3 bytes (instead of 6).
*
* Notes:
*
* I decide to not use the existing functions (see ethers(3) on some
* I decide to not use the existing functions (see ethers(3) on some
* operating systems) for the following reasons:
* - performance gains (use of hash tables and some other enhancements),
* - use of two ethers files (system-wide and per user),
@ -443,10 +443,10 @@ static int parse_ether_line(char *line, ether_t *eth, int six_bytes)
gchar *cp;
int a0, a1, a2, a3, a4, a5;
if ((cp = strchr(line, '#')))
*cp = '\0';
if ((cp = strtok(line, " \t\n")) == NULL)
return -1;
@ -509,12 +509,12 @@ static void end_ethent(void)
static ether_t *get_ethent(int six_bytes)
{
static ether_t eth;
static int size = 0;
static char *buf = NULL;
if (eth_p == NULL)
if (eth_p == NULL)
return NULL;
while (fgetline(&buf, &size, eth_p) >= 0) {
@ -522,7 +522,7 @@ static ether_t *get_ethent(int six_bytes)
return &eth;
}
}
return NULL;
} /* get_ethent */
@ -530,7 +530,7 @@ static ether_t *get_ethent(int six_bytes)
static ether_t *get_ethbyname(const guchar *name)
{
ether_t *eth;
set_ethent(g_ethers_path);
while ((eth = get_ethent(1)) && strncmp(name, eth->name, MAXNAMELEN) != 0)
@ -538,7 +538,7 @@ static ether_t *get_ethbyname(const guchar *name)
if (eth == NULL) {
end_ethent();
set_ethent(g_pethers_path);
while ((eth = get_ethent(1)) && strncmp(name, eth->name, MAXNAMELEN) != 0)
@ -555,7 +555,7 @@ static ether_t *get_ethbyaddr(const guint8 *addr)
{
ether_t *eth;
set_ethent(g_ethers_path);
while ((eth = get_ethent(1)) && memcmp(addr, eth->addr, 6) != 0)
@ -563,12 +563,12 @@ static ether_t *get_ethbyaddr(const guint8 *addr)
if (eth == NULL) {
end_ethent();
set_ethent(g_pethers_path);
while ((eth = get_ethent(1)) && memcmp(addr, eth->addr, 6) != 0)
;
end_ethent();
}
@ -587,7 +587,7 @@ static void add_manuf_name(guint8 *addr, guchar *name)
if( tp == NULL ) {
tp = manuf_table[hash_idx] = (hashmanuf_t *)g_malloc(sizeof(hashmanuf_t));
} else {
} else {
while(1) {
if (tp->next == NULL) {
tp->next = (hashmanuf_t *)g_malloc(sizeof(hashmanuf_t));
@ -597,7 +597,7 @@ static void add_manuf_name(guint8 *addr, guchar *name)
tp = tp->next;
}
}
memcpy(tp->addr, addr, sizeof(tp->addr));
strncpy(tp->name, name, MAXMANUFLEN);
tp->name[MAXMANUFLEN-1] = '\0';
@ -613,14 +613,14 @@ static hashmanuf_t *manuf_name_lookup(const guint8 *addr)
hash_idx = HASH_ETH_MANUF(addr);
tp = manuf_table[hash_idx];
while(tp != NULL) {
if (memcmp(tp->addr, addr, sizeof(tp->addr)) == 0) {
return tp;
}
tp = tp->next;
}
return NULL;
} /* manuf_name_lookup */
@ -651,7 +651,7 @@ static void initialize_ethers(void)
strlen(ENAME_MANUF) + 2);
sprintf(manuf_path, "%s" G_DIR_SEPARATOR_S "%s", get_datafile_dir(),
ENAME_MANUF);
/* Read it and initialize the hash table */
set_ethent(manuf_path);
@ -676,7 +676,7 @@ static hashether_t *add_eth_name(const guint8 *addr, const guchar *name)
if( tp == NULL ) {
tp = eth_table[hash_idx] = (hashether_t *)g_malloc(sizeof(hashether_t));
} else {
} else {
while(1) {
if (memcmp(tp->addr, addr, sizeof(tp->addr)) == 0) {
/* address already known */
@ -695,7 +695,7 @@ static hashether_t *add_eth_name(const guint8 *addr, const guchar *name)
tp = tp->next;
}
}
memcpy(tp->addr, addr, sizeof(tp->addr));
strncpy(tp->name, name, MAXNAMELEN);
tp->name[MAXNAMELEN-1] = '\0';
@ -719,7 +719,7 @@ static guchar *eth_name_lookup(const guint8 *addr)
if( tp == NULL ) {
tp = eth_table[hash_idx] = (hashether_t *)g_malloc(sizeof(hashether_t));
} else {
} else {
while(1) {
if (memcmp(tp->addr, addr, sizeof(tp->addr)) == 0) {
return tp->name;
@ -732,7 +732,7 @@ static guchar *eth_name_lookup(const guint8 *addr)
tp = tp->next;
}
}
/* fill in a new entry */
memcpy(tp->addr, addr, sizeof(tp->addr));
@ -744,7 +744,7 @@ static guchar *eth_name_lookup(const guint8 *addr)
if ((manufp = manuf_name_lookup(addr)) == NULL)
sprintf(tp->name, "%s", ether_to_str((guint8 *)addr));
else
sprintf(tp->name, "%s_%02x:%02x:%02x",
sprintf(tp->name, "%s_%02x:%02x:%02x",
manufp->name, addr[3], addr[4], addr[5]);
tp->is_dummy_entry = TRUE;
@ -801,10 +801,10 @@ static int parse_ipxnets_line(char *line, ipxnet_t *ipxnet)
gchar *cp;
guint32 a, a0, a1, a2, a3;
gboolean found_single_number = FALSE;
if ((cp = strchr(line, '#')))
*cp = '\0';
if ((cp = strtok(line, " \t\n")) == NULL)
return -1;
@ -862,12 +862,12 @@ static void end_ipxnetent(void)
static ipxnet_t *get_ipxnetent(void)
{
static ipxnet_t ipxnet;
static int size = 0;
static char *buf = NULL;
if (ipxnet_p == NULL)
if (ipxnet_p == NULL)
return NULL;
while (fgetline(&buf, &size, ipxnet_p) >= 0) {
@ -875,7 +875,7 @@ static ipxnet_t *get_ipxnetent(void)
return &ipxnet;
}
}
return NULL;
} /* get_ipxnetent */
@ -883,7 +883,7 @@ static ipxnet_t *get_ipxnetent(void)
static ipxnet_t *get_ipxnetbyname(const guchar *name)
{
ipxnet_t *ipxnet;
set_ipxnetent(g_ipxnets_path);
while ((ipxnet = get_ipxnetent()) && strncmp(name, ipxnet->name, MAXNAMELEN) != 0)
@ -891,7 +891,7 @@ static ipxnet_t *get_ipxnetbyname(const guchar *name)
if (ipxnet == NULL) {
end_ipxnetent();
set_ipxnetent(g_pipxnets_path);
while ((ipxnet = get_ipxnetent()) && strncmp(name, ipxnet->name, MAXNAMELEN) != 0)
@ -908,19 +908,19 @@ static ipxnet_t *get_ipxnetbyaddr(guint32 addr)
{
ipxnet_t *ipxnet;
set_ipxnetent(g_ipxnets_path);
while ((ipxnet = get_ipxnetent()) && (addr != ipxnet->addr) ) ;
if (ipxnet == NULL) {
end_ipxnetent();
set_ipxnetent(g_pipxnets_path);
while ((ipxnet = get_ipxnetent()) && (addr != ipxnet->addr) )
;
end_ipxnetent();
}
@ -963,7 +963,7 @@ static hashipxnet_t *add_ipxnet_name(guint addr, const guchar *name)
if( tp == NULL ) {
tp = ipxnet_table[hash_idx] = (hashipxnet_t *)g_malloc(sizeof(hashipxnet_t));
} else {
} else {
while(1) {
if (tp->next == NULL) {
tp->next = (hashipxnet_t *)g_malloc(sizeof(hashipxnet_t));
@ -973,7 +973,7 @@ static hashipxnet_t *add_ipxnet_name(guint addr, const guchar *name)
tp = tp->next;
}
}
tp->addr = addr;
strncpy(tp->name, name, MAXNAMELEN);
tp->name[MAXNAMELEN-1] = '\0';
@ -995,7 +995,7 @@ static guchar *ipxnet_name_lookup(const guint addr)
if( tp == NULL ) {
tp = ipxnet_table[hash_idx] = (hashipxnet_t *)g_malloc(sizeof(hashipxnet_t));
} else {
} else {
while(1) {
if (tp->addr == addr) {
return tp->name;
@ -1008,7 +1008,7 @@ static guchar *ipxnet_name_lookup(const guint addr)
tp = tp->next;
}
}
/* fill in a new entry */
tp->addr = addr;
@ -1061,11 +1061,11 @@ static guint ipxnet_addr_lookup(const guchar *name, gboolean *success)
} /* ipxnet_addr_lookup */
/*
/*
* External Functions
*/
extern guchar *get_hostname(guint addr)
extern guchar *get_hostname(guint addr)
{
gboolean found;
@ -1104,7 +1104,7 @@ extern void add_host_name(guint addr, const guchar *name)
if( tp == NULL ) {
tp = host_table[hash_idx] = (hashname_t *)g_malloc(sizeof(hashname_t));
} else {
} else {
while(1) {
if (tp->addr == addr) {
/* address already known */
@ -1123,7 +1123,7 @@ extern void add_host_name(guint addr, const guchar *name)
tp = tp->next;
}
}
strncpy(tp->name, name, MAXNAMELEN);
tp->name[MAXNAMELEN-1] = '\0';
tp->addr = addr;
@ -1140,9 +1140,9 @@ extern guchar *get_udp_port(guint port)
if (!(g_resolv_flags & RESOLV_TRANSPORT)) {
if (cur == &str[0][0]) {
cur = &str[1][0];
} else if (cur == &str[1][0]) {
} else if (cur == &str[1][0]) {
cur = &str[2][0];
} else {
} else {
cur = &str[0][0];
}
sprintf(cur, "%u", port);
@ -1153,7 +1153,7 @@ extern guchar *get_udp_port(guint port)
} /* get_udp_port */
extern guchar *get_tcp_port(guint port)
extern guchar *get_tcp_port(guint port)
{
static gchar str[3][MAXNAMELEN];
static gchar *cur;
@ -1161,9 +1161,9 @@ extern guchar *get_tcp_port(guint port)
if (!(g_resolv_flags & RESOLV_TRANSPORT)) {
if (cur == &str[0][0]) {
cur = &str[1][0];
} else if (cur == &str[1][0]) {
} else if (cur == &str[1][0]) {
cur = &str[2][0];
} else {
} else {
cur = &str[0][0];
}
sprintf(cur, "%u", port);
@ -1174,7 +1174,7 @@ extern guchar *get_tcp_port(guint port)
} /* get_tcp_port */
extern guchar *get_sctp_port(guint port)
extern guchar *get_sctp_port(guint port)
{
static gchar str[3][MAXNAMELEN];
static gchar *cur;
@ -1182,9 +1182,9 @@ extern guchar *get_sctp_port(guint port)
if (!(g_resolv_flags & RESOLV_TRANSPORT)) {
if (cur == &str[0][0]) {
cur = &str[1][0];
} else if (cur == &str[1][0]) {
} else if (cur == &str[1][0]) {
cur = &str[2][0];
} else {
} else {
cur = &str[0][0];
}
sprintf(cur, "%u", port);
@ -1222,7 +1222,7 @@ guchar *get_ether_name_if_known(const guint8 *addr)
* ether-related function called */
if (!(g_resolv_flags & RESOLV_MAC))
return NULL;
if (!eth_resolution_initialized) {
initialize_ethers();
eth_resolution_initialized = 1;
@ -1243,7 +1243,7 @@ guchar *get_ether_name_if_known(const guint8 *addr)
(void) eth_name_lookup(addr);
return get_ether_name_if_known(addr); /* a well-placed goto would suffice */
}
else {
else {
while(1) {
if (memcmp(tp->addr, addr, sizeof(tp->addr)) == 0) {
if (!tp->is_dummy_entry) {
@ -1292,7 +1292,7 @@ extern void add_ether_byip(guint ip, const guint8 *eth)
if ((host = host_name_lookup(ip, &found)) == NULL)
return;
/* ok, we can add this entry in the ethers hashtable */
if (found)
@ -1349,15 +1349,15 @@ extern const guchar *get_manuf_name(const guint8 *addr)
if (!(g_resolv_flags & RESOLV_MAC) || ((manufp = manuf_name_lookup(addr)) == NULL)) {
if (cur == &str[0][0]) {
cur = &str[1][0];
} else if (cur == &str[1][0]) {
} else if (cur == &str[1][0]) {
cur = &str[2][0];
} else {
} else {
cur = &str[0][0];
}
sprintf(cur, "%02x:%02x:%02x", addr[0], addr[1], addr[2]);
return cur;
}
return manufp->name;
} /* get_manuf_name */

View File

@ -1,24 +1,24 @@
/* resolv.h
* Definitions for network object lookup
*
* $Id: resolv.h,v 1.8 2002/01/13 20:35:10 guy Exp $
* $Id: resolv.h,v 1.9 2002/08/28 20:40:45 jmayer Exp $
*
* Laurent Deniel <deniel@worldnet.fr>
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -2,23 +2,23 @@
* Routines for SNA
* Gilbert Ramirez <gram@alumni.rice.edu>
*
* $Id: sna-utils.c,v 1.3 2001/11/13 23:55:37 gram Exp $
* $Id: sna-utils.c,v 1.4 2002/08/28 20:40:45 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,18 +1,18 @@
/* sna-utils.h
* Definitions for SNA dissection.
*
* $Id: sna-utils.h,v 1.2 2001/04/01 07:06:24 hagbard Exp $
* $Id: sna-utils.h,v 1.3 2002/08/28 20:40:45 jmayer Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,23 +1,23 @@
/* strutil.c
* String utility routines
*
* $Id: strutil.c,v 1.8 2002/08/02 21:29:40 jmayer Exp $
* $Id: strutil.c,v 1.9 2002/08/28 20:40:45 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -112,7 +112,7 @@ get_token_len(const guchar *linep, const guchar *lineend,
int token_len;
tokenp = linep;
/*
* Search for a blank, a CR or an LF, or the end of the buffer.
*/
@ -249,7 +249,7 @@ bytes_to_str(const guint8 *bd, int bd_len) {
return bytes_to_str_punct(bd,bd_len,'\0');
}
/* Turn an array of bytes into a string showing the bytes in hex with
/* Turn an array of bytes into a string showing the bytes in hex with
* punct as a bytes separator.
*/
gchar *

View File

@ -1,22 +1,22 @@
/* strutil.h
* String utility definitions
*
* $Id: strutil.h,v 1.8 2002/08/02 21:29:40 jmayer Exp $
* $Id: strutil.h,v 1.9 2002/08/28 20:40:45 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,23 +1,23 @@
/* timestamp.h
* Defines for packet timestamps
*
* $Id: timestamp.h,v 1.1 2001/04/01 06:11:25 hagbard Exp $
* $Id: timestamp.h,v 1.2 2002/08/28 20:40:45 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,22 +1,22 @@
/* to_str.c
* Routines for utilities to convert various other types to strings.
*
* $Id: to_str.c,v 1.16 2002/08/03 19:35:16 guy Exp $
* $Id: to_str.c,v 1.17 2002/08/28 20:40:45 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -85,9 +85,9 @@ ether_to_str_punct(const guint8 *ad, char punct) {
if (cur == &str[0][0]) {
cur = &str[1][0];
} else if (cur == &str[1][0]) {
} else if (cur == &str[1][0]) {
cur = &str[2][0];
} else {
} else {
cur = &str[0][0];
}
p = &cur[18];
@ -118,7 +118,7 @@ ip_to_str(const guint8 *ad) {
cur = &str[2][0];
} else if (cur == &str[2][0]) {
cur = &str[3][0];
} else {
} else {
cur = &str[0][0];
}
ip_to_str_buf(ad, cur);
@ -216,9 +216,9 @@ ipxnet_to_str_punct(const guint32 ad, char punct)
if (cur == &str[0][0]) {
cur = &str[1][0];
} else if (cur == &str[1][0]) {
} else if (cur == &str[1][0]) {
cur = &str[2][0];
} else {
} else {
cur = &str[0][0];
}
p = &cur[12];
@ -325,9 +325,9 @@ time_secs_to_str(guint32 time)
if (cur == &str[0][0]) {
cur = &str[1][0];
} else if (cur == &str[1][0]) {
} else if (cur == &str[1][0]) {
cur = &str[2][0];
} else {
} else {
cur = &str[0][0];
}
@ -349,9 +349,9 @@ time_msecs_to_str(guint32 time)
if (cur == &str[0][0]) {
cur = &str[1][0];
} else if (cur == &str[1][0]) {
} else if (cur == &str[1][0]) {
cur = &str[2][0];
} else {
} else {
cur = &str[0][0];
}

View File

@ -1,22 +1,22 @@
/* to_str.h
* Definitions for utilities to convert various other types to strings.
*
* $Id: to_str.h,v 1.7 2002/08/02 21:29:40 jmayer Exp $
* $Id: to_str.h,v 1.8 2002/08/28 20:40:45 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -38,9 +38,9 @@ typedef enum {
NSECS /* nanoseconds */
} time_res_t;
/*
/*
* These are utility functions which convert various types to strings,
* but for which no more specific module applies.
* but for which no more specific module applies.
*/
extern gchar* ether_to_str(const guint8 *);

View File

@ -2,20 +2,20 @@
*
* tvbtest : tvbtest.o tvbuff.o except.o
*
* $Id: tvbtest.c,v 1.2 2001/11/13 23:55:37 gram Exp $
* $Id: tvbtest.c,v 1.3 2002/08/28 20:40:45 jmayer Exp $
*
* Copyright (c) 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -364,7 +364,7 @@ run_tests(void)
/* 4 composites */
printf("Making Composite 5\n");
tvb_comp[5] = tvb_new_composite();
comp_length[5] = comp_length[0] +
comp_length[5] = comp_length[0] +
comp_length[1] +
comp_length[2] +
comp_length[3];

View File

@ -1,7 +1,7 @@
/* tvbuff.c
*
* Testy, Virtual(-izable) Buffer of guint8*'s
*
*
* "Testy" -- the buffer gets mad when an attempt to access data
* beyond the bounds of the buffer. An exception is thrown.
*
@ -9,7 +9,7 @@
* the data of a backing tvbuff, or can be a composite of
* other tvbuffs.
*
* $Id: tvbuff.c,v 1.39 2002/08/02 21:29:40 jmayer Exp $
* $Id: tvbuff.c,v 1.40 2002/08/28 20:40:45 jmayer Exp $
*
* Copyright (c) 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
*
@ -19,17 +19,17 @@
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -1021,7 +1021,7 @@ tvb_memdup(tvbuff_t *tvb, gint offset, gint length)
}
const guint8*
tvb_get_ptr(tvbuff_t *tvb, gint offset, gint length)
{
@ -1635,7 +1635,7 @@ tvb_format_text(tvbuff_t *tvb, gint offset, gint size)
}
return format_text(ptr, len);
}
/* Looks for a stringz (NUL-terminated string) in tvbuff and copies
@ -1934,7 +1934,7 @@ tvb_find_line_end_unquoted(tvbuff_t *tvb, gint offset, int len,
*next_offset = eob_offset;
break;
}
if (is_quoted) {
/*
* We're processing a quoted string.

View File

@ -1,7 +1,7 @@
/* tvbuff.h
*
* Testy, Virtual(-izable) Buffer of guint8*'s
*
*
* "Testy" -- the buffer gets mad when an attempt is made to access data
* beyond the bounds of the buffer. An exception is thrown.
*
@ -9,24 +9,24 @@
* the data of a backing tvbuff, or can be a composite of
* other tvbuffs.
*
* $Id: tvbuff.h,v 1.28 2002/07/17 06:55:24 guy Exp $
* $Id: tvbuff.h,v 1.29 2002/08/28 20:40:45 jmayer Exp $
*
* Copyright (c) 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,23 +1,23 @@
/* value_string.c
* Routines for value_strings
*
* $Id: value_string.c,v 1.3 2001/09/14 07:23:33 guy Exp $
* $Id: value_string.c,v 1.4 2002/08/28 20:40:45 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -49,9 +49,9 @@ val_to_str(guint32 val, const value_string *vs, const char *fmt) {
return ret;
if (cur == &str[0][0]) {
cur = &str[1][0];
} else if (cur == &str[1][0]) {
} else if (cur == &str[1][0]) {
cur = &str[2][0];
} else {
} else {
cur = &str[0][0];
}
snprintf(cur, 64, fmt, val);
@ -63,7 +63,7 @@ val_to_str(guint32 val, const value_string *vs, const char *fmt) {
gchar*
match_strval(guint32 val, const value_string *vs) {
gint i = 0;
while (vs[i].strptr) {
if (vs[i].value == val)
return(vs[i].strptr);

View File

@ -1,23 +1,23 @@
/* value_string.h
* Definitions for value_string structures and routines
*
* $Id: value_string.h,v 1.2 2001/11/04 03:55:52 guy Exp $
* $Id: value_string.h,v 1.3 2002/08/28 20:40:45 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -2,7 +2,7 @@
* Routines for docsis dissection
* Copyright 2002, Anand V. Narwani <anarwani@cisco.com>
*
* $Id: packet-docsis.c,v 1.7 2002/08/20 22:44:25 guy Exp $
* $Id: packet-docsis.c,v 1.8 2002/08/28 20:38:59 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -26,14 +26,14 @@
/* This code is based on the DOCSIS 1.1 specification available at:
* http://www.cablemodem.com/specifications.html
*
* DOCSIS Captures can be facilitated using the Cable Monitor Feature
*
* DOCSIS Captures can be facilitated using the Cable Monitor Feature
* available on Cisco Cable Modem Termination Systems :
* http://www.cisco.com/univercd/cc/td/doc/product/cable/cab_rout/cmtsfg/ufg_cmon.htm
*
* This dissector depends on the presence of a DOCSIS enapsulation type.
* There is no simple way to distinguish DOCSIS Frames from Ethernet frames,
* since the frames are copied from the RF interface on the CMTS to
* since the frames are copied from the RF interface on the CMTS to
* a Fast Ethernet interface; Thus a preference was needed to enable
* the DOCSIS encapsulation type.
*/
@ -252,7 +252,7 @@ dissect_ehdr (tvbuff_t * tvb, proto_tree * tree, gboolean isfrag)
FALSE);
proto_tree_add_item (ehdr_tree, hf_docsis_mini_slots, tvb, pos + 4,
1, FALSE);
if (isfrag)
if (isfrag)
{
proto_tree_add_item (ehdr_tree, hf_docsis_frag_rsvd, tvb, pos+5,
1, FALSE);
@ -303,7 +303,7 @@ dissect_docsis (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
tvbuff_t *next_tvb, *mgt_tvb;
guint16 pdulen, captured_length, framelen;
gboolean isfrag = FALSE;
/* Set up structures needed to add the protocol subtree and manage it */
proto_item *ti;
proto_tree *docsis_tree;
@ -488,7 +488,7 @@ dissect_docsis (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
}
}
if ((fctype == FCTYPE_PACKET) && (pdulen == 0))
if ((fctype == FCTYPE_PACKET) && (pdulen == 0))
{
if (concatlen > 0)
{
@ -514,7 +514,7 @@ dissect_docsis (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
/* Don't do anything for a Request Frame */
break;
case 0x03:
/* For Fragmentation Frames simply dissect using the data
/* For Fragmentation Frames simply dissect using the data
* dissector as we don't handle them yet
*/
mgt_tvb = tvb_new_subset (tvb, hdrlen, captured_length, pdulen);
@ -526,10 +526,10 @@ dissect_docsis (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
}
break;
case 0x1c:
/* call the docsis dissector on the same frame
/* call the docsis dissector on the same frame
* to dissect DOCSIS frames within the concatenated
* frame. concatpos and concatlen are declared
* static and are decremented and incremented
* frame. concatpos and concatlen are declared
* static and are decremented and incremented
* respectively when the inner
* docsis frames are dissected. */
while (concatlen > 0)

View File

@ -1,21 +1,21 @@
/* packet-docsis.h
*
* $Id: packet-docsis.h,v 1.2 2002/08/02 22:04:13 jmayer Exp $
* $Id: packet-docsis.h,v 1.3 2002/08/28 20:38:59 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -155,7 +155,7 @@ dissect_map (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
proto_tree_add_item_hidden(map_tree, hf_docsis_map_sid, tvb, pos, 4, FALSE);
proto_tree_add_item_hidden(map_tree, hf_docsis_map_iuc, tvb, pos, 4, FALSE);
proto_tree_add_item_hidden(map_tree, hf_docsis_map_offset, tvb, pos, 4, FALSE);
if (sid == 0x3FFF)
if (sid == 0x3FFF)
proto_tree_add_uint_format (map_tree, hf_docsis_map_ie, tvb, pos, 4,
ie, "SID = 0x%x (All CM's), IUC = %s, Offset = %u",
sid, val_to_str (iuc, iuc_vals, "%s"),

View File

@ -42,7 +42,7 @@
/* This module will dissect the Appendix C TLV's. Please see:
* http://www.cablemodem.com/specifications.html
*
* The main dissector is dissect_tlv. This routine will dissect
* The main dissector is dissect_tlv. This routine will dissect
* top level TLV's and call sub-dissectors for the sub-TLV's.
*/
@ -1725,17 +1725,17 @@ dissect_svc_unavail(tvbuff_t * tvb, proto_tree * tree, guint16 pos, guint16 leng
proto_item *svc_unavail_it;
proto_tree *svc_unavail_tree;
svc_unavail_it = proto_tree_add_item (tree,
hf_docsis_tlv_svc_unavail,
svc_unavail_it = proto_tree_add_item (tree,
hf_docsis_tlv_svc_unavail,
tvb, pos, length, FALSE);
svc_unavail_tree = proto_item_add_subtree(svc_unavail_it, ett_docsis_tlv_svc_unavail );
proto_tree_add_item (svc_unavail_tree,
proto_tree_add_item (svc_unavail_tree,
hf_docsis_tlv_svc_unavail_classid, tvb,
pos, 1, FALSE);
proto_tree_add_item (svc_unavail_tree,
proto_tree_add_item (svc_unavail_tree,
hf_docsis_tlv_svc_unavail_type, tvb,
pos+1, 1, FALSE);
proto_tree_add_item (svc_unavail_tree,
proto_tree_add_item (svc_unavail_tree,
hf_docsis_tlv_svc_unavail_code, tvb,
pos+2, 1, FALSE);
@ -1748,22 +1748,22 @@ dissect_snmpv3_kickstart(tvbuff_t * tvb, proto_tree *tree, guint16 start, guint1
guint8 type, length;
guint16 pos = start;
snmpv3_it = proto_tree_add_item (tree,
hf_docsis_tlv_snmpv3_kick,
snmpv3_it = proto_tree_add_item (tree,
hf_docsis_tlv_snmpv3_kick,
tvb, start, len, FALSE);
snmpv3_tree = proto_item_add_subtree(snmpv3_it, ett_docsis_tlv_snmpv3_kick);
while (pos < (start + len)) {
type = tvb_get_guint8 (tvb, pos++);
length = tvb_get_guint8 (tvb, pos++);
switch (type) {
case SNMPV3_SEC_NAME:
proto_tree_add_item (snmpv3_tree,
proto_tree_add_item (snmpv3_tree,
hf_docsis_tlv_snmpv3_kick_name, tvb,
pos, length, FALSE);
break;
case SNMPV3_MGR_PUB_NUM:
proto_tree_add_item (snmpv3_tree,
proto_tree_add_item (snmpv3_tree,
hf_docsis_tlv_snmpv3_kick_publicnum, tvb,
pos, length, FALSE);
break;
@ -1800,7 +1800,7 @@ dissect_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
{
case TLV_DOWN_FREQ:
/* This is ugly. There are multiple type 1 TLV's that may appear
* in the TLV data, the problem is that they are dependent on
* in the TLV data, the problem is that they are dependent on
* message type. */
if (length == 4)
proto_tree_add_item (tlv_tree, hf_docsis_tlv_down_freq, tvb,
@ -1877,11 +1877,11 @@ dissect_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
length, FALSE);
break;
case TLV_SNMP_WRITE_CTRL:
proto_tree_add_item (tlv_tree, hf_docsis_tlv_snmp_access, tvb,
proto_tree_add_item (tlv_tree, hf_docsis_tlv_snmp_access, tvb,
pos, length, FALSE);
break;
case TLV_SNMP_OBJECT:
proto_tree_add_item (tlv_tree, hf_docsis_tlv_snmp_obj, tvb,
proto_tree_add_item (tlv_tree, hf_docsis_tlv_snmp_obj, tvb,
pos, length, FALSE);
break;
case TLV_MODEM_IP:
@ -1896,7 +1896,7 @@ dissect_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
}
break;
case TLV_SVC_UNAVAIL:
if (length == 3)
if (length == 3)
{
dissect_svc_unavail(tvb, tlv_tree, pos, length);
}
@ -1980,7 +1980,7 @@ dissect_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
dissect_phs (tvb, tlv_tree, pos, length);
break;
case TLV_HMAC_DIGEST:
if (length == 20)
if (length == 20)
{
proto_tree_add_item (tlv_tree,
hf_docsis_tlv_hmac_digest, tvb,
@ -2045,24 +2045,24 @@ dissect_tlv (tvbuff_t * tvb, packet_info * pinfo _U_, proto_tree * tree)
tvb, pos, length, FALSE);
break;
case TLV_SUBS_MGMT_CPE:
if ((length % 4) == 0)
if ((length % 4) == 0)
{
proto_tree_add_item (tlv_tree, hf_docsis_tlv_subs_mgmt_ip_table,
tvb, pos, length, FALSE);
for (x = 0; x < length; x+=4)
for (x = 0; x < length; x+=4)
{
proto_tree_add_item (tlv_tree,
proto_tree_add_item (tlv_tree,
hf_docsis_tlv_subs_mgmt_ip_entry,
tvb, pos + x, 4, FALSE);
}
}
}
else
{
{
THROW (ReportedBoundsError);
}
break;
case TLV_SUBS_MGMT_FLTR:
proto_tree_add_item (tlv_tree,
proto_tree_add_item (tlv_tree,
hf_docsis_tlv_subs_mgmt_filter_grps,
tvb, pos, length, FALSE);
break;

View File

@ -67,7 +67,7 @@
#define TLV_VENDOR_SPEC 43
#define TLV_END 255
/* Define DOCSIS 1.0 Class Of Service Configuration Types
/* Define DOCSIS 1.0 Class Of Service Configuration Types
* These are subtypes of TLV_COS (4)
*/
#define COS_CLASSID 1
@ -193,7 +193,7 @@
#define SFW_MAX_DOWN_LAT 14
/* Define Service Flow Error sub-subtypes
* These are subtypes of
* These are subtypes of
* SFW_ERRORS ([24/25].5)
*/
#define SFW_ERR_PARAM 1

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -3,22 +3,22 @@
* By Steve Limkemann <stevelim@dgtech.com>
* Copyright 1998 Steve Limkemann
*
* $Id: packet-gryphon.c,v 1.34 2002/08/02 22:04:20 jmayer Exp $
* $Id: packet-gryphon.c,v 1.35 2002/08/28 20:39:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
* Copyright 1998
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -50,7 +50,7 @@ G_MODULE_EXPORT const gchar version[] = VERSION;
#ifndef G_HAVE_GINT64
#error "Sorry, this won't compile without 64-bit integer support"
#endif
#endif
/*
* See
@ -421,7 +421,7 @@ static const value_string responses[] = {
{RESP_NO_SUCH_JOB, "No such job"},
{0, NULL},
};
static const value_string filter_data_types[] = {
{FILTER_DATA_TYPE_HEADER_FRAME, "frame header"},
{FILTER_DATA_TYPE_HEADER, "data message header"},
@ -626,7 +626,7 @@ decode_response(tvbuff_t *tvb, int offset, int src, proto_tree *pt)
proto_tree_add_text (pt, tvb, offset, 4, "Command: %s", cmds[i].strptr);
offset += 4;
msglen -= 4;
resp = tvb_get_ntohl (tvb, offset);
proto_tree_add_text (pt, tvb, offset, 4, "Status: %s",
val_to_str(resp, responses, "Unknown (0x%08x)"));
@ -767,7 +767,7 @@ static int
cmd_init(tvbuff_t *tvb, int offset, proto_tree *pt)
{
char *ptr;
if (tvb_get_guint8(tvb, offset) == 0)
ptr = "Always initialize";
else
@ -782,7 +782,7 @@ static int
eventnum(tvbuff_t *tvb, int offset, proto_tree *pt)
{
guint8 event = tvb_get_guint8(tvb, offset);
if (event)
proto_tree_add_text(pt, tvb, offset, 1, "Event number: %u", event);
else
@ -802,7 +802,7 @@ resp_time(tvbuff_t *tvb, int offset, proto_tree *pt)
} ts;
unsigned int timestamp;
unsigned char date[45];
ts.lng[1] = tvb_get_ntohl(tvb, offset);
ts.lng[0] = tvb_get_ntohl(tvb, offset + 4);
timestamp = ts.lnglng / 100000L;
@ -825,7 +825,7 @@ cmd_setfilt(tvbuff_t *tvb, int offset, proto_tree *pt)
int flag = tvb_get_ntohl(tvb, offset);
int length, padding;
unsigned char mode[30];
length = tvb_get_guint8(tvb, offset+4) + tvb_get_guint8(tvb, offset+5)
+ tvb_get_ntohs(tvb, offset+6);
if (flag)
@ -936,7 +936,7 @@ resp_filthan(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int handles = tvb_get_guint8(tvb, offset);
int i, padding;
proto_tree_add_text(pt, tvb, offset, 1, "Number of filter handles: %d", handles);
for (i = 1; i <= handles; i++){
proto_tree_add_text(pt, tvb, offset+i, 1, "Handle %d: %u", i,
@ -953,7 +953,7 @@ static int
dfiltmode(tvbuff_t *tvb, int offset, proto_tree *pt)
{
unsigned char mode;
mode = tvb_get_guint8(tvb, offset);
proto_tree_add_text(pt, tvb, offset, 1, "Filter mode: %s",
val_to_str(mode, dmodes, "Unknown (%u)"));
@ -966,7 +966,7 @@ static int
filtmode(tvbuff_t *tvb, int offset, proto_tree *pt)
{
unsigned char mode;
mode = tvb_get_guint8(tvb, offset);
proto_tree_add_text(pt, tvb, offset, 1, "Filter mode: %s",
val_to_str(mode, dmodes, "Unknown (%u)"));
@ -982,7 +982,7 @@ resp_events(tvbuff_t *tvb, int offset, proto_tree *pt)
unsigned int i;
proto_tree *tree;
proto_item *item;
msglen = tvb_reported_length_remaining(tvb, offset);
i = 1;
while (msglen != 0) {
@ -1030,7 +1030,7 @@ resp_getspeeds(tvbuff_t *tvb, int offset, proto_tree *pt)
int size;
int number;
int index;
proto_tree_add_text(pt, tvb, offset, 4, "Set Speed IOCTL");
proto_tree_add_text(pt, tvb, offset+4, 4, "Get Speed IOCTL");
size = tvb_get_guint8(tvb, offset+8);
@ -1050,7 +1050,7 @@ static int
cmd_sort(tvbuff_t *tvb, int offset, proto_tree *pt)
{
char *which;
which = tvb_get_guint8(tvb, offset) ?
"Sort into blocks of up to 16 messages" :
"Do not sort messages";
@ -1063,8 +1063,8 @@ static int
cmd_optimize(tvbuff_t *tvb, int offset, proto_tree *pt)
{
char *which;
which = tvb_get_guint8(tvb, offset) ?
which = tvb_get_guint8(tvb, offset) ?
"Optimize for latency (Nagle algorithm disabled)" :
"Optimize for throughput (Nagle algorithm enabled)";
proto_tree_add_text(pt, tvb, offset, 1, "Set optimization: %s", which);
@ -1080,7 +1080,7 @@ resp_config(tvbuff_t *tvb, int offset, proto_tree *pt)
int devices;
int i;
unsigned int x;
static const value_string protocol_types[] = {
{GDUMMY * 256 + GDGDMARKONE, "Dummy device driver"},
{GCAN * 256 + G82527, "CAN, 82527 subtype"},
@ -1153,7 +1153,7 @@ cmd_sched(tvbuff_t *tvb, int offset, proto_tree *pt)
int save_offset;
unsigned int i, x, length;
unsigned char def_chan = tvb_get_guint8(tvb, offset-9);
msglen = tvb_reported_length_remaining(tvb, offset);
x = tvb_get_ntohl(tvb, offset);
if (x == 0xFFFFFFFF)
@ -1406,7 +1406,7 @@ resp_resphan(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int handles = tvb_get_guint8(tvb, offset);
int i, padding;
proto_tree_add_text(pt, tvb, offset, 1, "Number of response handles: %d", handles);
for (i = 1; i <= handles; i++){
proto_tree_add_text(pt, tvb, offset+i, 1, "Handle %d: %u", i,
@ -1450,7 +1450,7 @@ resp_desc(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_item *item;
proto_tree *tree;
guint8 flags;
flags = tvb_get_guint8(tvb, offset);
item = proto_tree_add_text(pt, tvb, offset, 1, "Flags: 0x%02x", flags);
tree = proto_item_add_subtree (item, ett_gryphon_flags);
@ -1470,7 +1470,7 @@ cmd_upload(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int msglen;
unsigned int length;
msglen = tvb_reported_length_remaining(tvb, offset);
proto_tree_add_text(pt, tvb, offset, 2, "Block number: %u",
tvb_get_ntohs(tvb, offset));
@ -1516,7 +1516,7 @@ resp_list(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_item *item;
proto_tree *tree;
unsigned int i, count;
count = tvb_get_guint8(tvb, offset);
proto_tree_add_text(pt, tvb, offset, 1, "Number of programs in this response: %u", count);
proto_tree_add_text(pt, tvb, offset+1, 1, "reserved");
@ -1542,7 +1542,7 @@ cmd_start(tvbuff_t *tvb, int offset, proto_tree *pt)
{
char string[120];
gint length;
offset = cmd_delete(tvb, offset, pt);
length = tvb_get_nstringz0(tvb, offset, 120, string) + 1;
proto_tree_add_text(pt, tvb, offset, length, "Arguments: %s", string);
@ -1571,7 +1571,7 @@ resp_status(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_item *item;
proto_tree *tree;
unsigned int i, copies, length;
copies = tvb_get_guint8(tvb, offset);
item = proto_tree_add_text(pt, tvb, offset, 1, "Number of running copies: %u", copies);
tree = proto_item_add_subtree (item, ett_gryphon_pgm_status);
@ -1599,7 +1599,7 @@ cmd_options(tvbuff_t *tvb, int offset, proto_tree *pt)
proto_tree *tree;
unsigned int i, size, padding, option, option_length, option_value;
unsigned char *string, *string1;
msglen = tvb_reported_length_remaining(tvb, offset);
item = proto_tree_add_text(pt, tvb, offset, 1, "Handle: %u",
tvb_get_guint8(tvb, offset));
@ -1667,13 +1667,13 @@ cmd_files(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int msglen;
guchar *which;
msglen = tvb_reported_length_remaining(tvb, offset);
if (tvb_get_guint8(tvb, offset) == 0)
which = "First group of names";
else
which = "Subsequent group of names";
proto_tree_add_text(pt, tvb, offset, 1, "%s", which);
proto_tree_add_text(pt, tvb, offset+1, msglen-1, "Directory: %.*s",
msglen-1, tvb_get_ptr(tvb, offset+1, msglen-1));
@ -1686,7 +1686,7 @@ resp_files(tvbuff_t *tvb, int offset, proto_tree *pt)
{
int msglen;
guchar *flag;
msglen = tvb_reported_length_remaining(tvb, offset);
flag = tvb_get_guint8(tvb, offset) ? "Yes": "No";
proto_tree_add_text(pt, tvb, offset, 1, "More filenames to return: %s", flag);
@ -1700,19 +1700,19 @@ cmd_usdt(tvbuff_t *tvb, int offset, proto_tree *pt)
{
guchar *desc;
guint8 assemble_flag;
if (tvb_get_guint8(tvb, offset))
desc = "Register with gusdt";
else
desc = "Unregister with gusdt";
proto_tree_add_text(pt, tvb, offset, 1, "%s", desc);
if (tvb_get_guint8(tvb, offset+1))
desc = "Echo long transmit messages back to the client";
else
desc = "Do not echo long transmit messages back to the client";
proto_tree_add_text(pt, tvb, offset+1, 1, "%s", desc);
assemble_flag = tvb_get_guint8(tvb, offset+2);
if (assemble_flag == 2)
desc = "Assemble long received messages but do not send them to the client";
@ -1721,7 +1721,7 @@ cmd_usdt(tvbuff_t *tvb, int offset, proto_tree *pt)
else
desc = "Do not assemble long received messages on behalf of the client";
proto_tree_add_text(pt, tvb, offset+2, 1, "%s", desc);
offset += 4;
return offset;
}
@ -1741,7 +1741,7 @@ filter_block(tvbuff_t *tvb, int offset, proto_tree *pt)
{
unsigned int type, operator;
int length, padding;
proto_tree_add_text(pt, tvb, offset, 2, "Filter field starts at byte %u",
tvb_get_ntohs(tvb, offset));
length = tvb_get_ntohs(tvb, offset+2);
@ -1755,7 +1755,7 @@ filter_block(tvbuff_t *tvb, int offset, proto_tree *pt)
val_to_str(operator, operators, "Unknown (%u)"));
proto_tree_add_text(pt, tvb, offset+6, 2, "reserved");
offset += 8;
if (operator == BIT_FIELD_CHECK) {
proto_tree_add_text(pt, tvb, offset, length, "Pattern");
proto_tree_add_text(pt, tvb, offset+length, length, "Mask");
@ -1791,7 +1791,7 @@ blm_mode(tvbuff_t *tvb, int offset, proto_tree *pt)
{
char *mode, line[50];
int x, y, seconds;
x = tvb_get_ntohl(tvb, offset);
y = tvb_get_ntohl(tvb, offset+4);
switch (x) {

View File

@ -1,22 +1,22 @@
/* packet-gryphon.c
* Definitions for Gryphon packet disassembly structures and routines
*
* $Id: packet-gryphon.h,v 1.6 2002/05/01 06:56:16 guy Exp $
* $Id: packet-gryphon.h,v 1.7 2002/08/28 20:39:05 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* By Steve Limkemann <stevelim@dgtech.com>
* Copyright 1998 Steve Limkemann
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -294,18 +294,18 @@
#define GHONSLEEP 0x11600001
#define GHONSILENCE 0x11600002
#define GKWPSETPTIMES 0x11700011
#define GKWPSETWTIMES 0x11700010
#define GKWPDOWAKEUP 0x11700008
#define GKWPGETBITTIME 0x11700101
#define GKWPSETBITTIME 0x11700102
#define GKWPSETNODEADDR 0x11700104
#define GKWPGETNODETYPE 0x11700105
#define GKWPSETNODETYPE 0x11700106
#define GKWPSETWAKETYPE 0x11700108
#define GKWPSETTARGADDR 0x1170010a
#define GKWPSETKEYBYTES 0x1170010c
#define GKWPSETSTARTREQ 0x1170010e
#define GKWPSETPTIMES 0x11700011
#define GKWPSETWTIMES 0x11700010
#define GKWPDOWAKEUP 0x11700008
#define GKWPGETBITTIME 0x11700101
#define GKWPSETBITTIME 0x11700102
#define GKWPSETNODEADDR 0x11700104
#define GKWPGETNODETYPE 0x11700105
#define GKWPSETNODETYPE 0x11700106
#define GKWPSETWAKETYPE 0x11700108
#define GKWPSETTARGADDR 0x1170010a
#define GKWPSETKEYBYTES 0x1170010c
#define GKWPSETSTARTREQ 0x1170010e
#define GKWPSETSTARTRESP 0x11700110
#define GKWPSETPROTOCOL 0x11700112
#define GKWPGETLASTKEYBYTES 0x11700201

View File

@ -2,8 +2,8 @@
* Routines for mgcp packet disassembly
* RFC 2705
*
* $Id: packet-mgcp.c,v 1.34 2002/08/02 22:04:22 jmayer Exp $
*
* $Id: packet-mgcp.c,v 1.35 2002/08/28 20:39:07 jmayer Exp $
*
* Copyright (c) 2000 by Ed Warnicke <hagbard@physics.rutgers.edu>
*
* Ethereal - Network traffic analyzer
@ -98,7 +98,7 @@ static int hf_mgcp_param_extention = -1;
static int hf_mgcp_param_invalid = -1;
static int hf_mgcp_messagecount = -1;
/*
/*
* Define the trees for mgcp
* We need one for MGCP itself and one for the MGCP paramters
*/
@ -106,14 +106,14 @@ static int ett_mgcp = -1;
static int ett_mgcp_param = -1;
/*
* Here are the global variables associated with
/*
* Here are the global variables associated with
* the various user definable characteristics of the dissection
*
* MGCP has two kinds of "agents", gateways and callagents. Callagents
* control gateways in a master/slave sort of arrangement. Since gateways
* and callagents have different well known ports and could both
* operate under either udp or tcp we have rather a lot of port info to
* and callagents have different well known ports and could both
* operate under either udp or tcp we have rather a lot of port info to
* specify.
*
* global_mgcp_raw_text determines whether we are going to display
@ -132,8 +132,8 @@ static gboolean global_mgcp_dissect_tree = TRUE;
static gboolean global_mgcp_message_count = FALSE;
/*
* Variables to allow for proper deletion of dissector registration when
* the user changes port from the gui.
* Variables to allow for proper deletion of dissector registration when
* the user changes port from the gui.
*/
static int gateway_tcp_port = 0;
static int gateway_udp_port = 0;
@ -149,33 +149,33 @@ typedef enum _mgcp_type {
} mgcp_type_t;
/* Some basic utility functions that are specific to this dissector */
static gboolean is_mgcp_verb(tvbuff_t *tvb, gint offset, gint maxlength);
static gboolean is_mgcp_verb(tvbuff_t *tvb, gint offset, gint maxlength);
static gboolean is_mgcp_rspcode(tvbuff_t *tvb, gint offset, gint maxlength);
static gint tvb_parse_param(tvbuff_t *tvb, gint offset, gint maxlength,
static gint tvb_parse_param(tvbuff_t *tvb, gint offset, gint maxlength,
int** hf);
/*
* The various functions that either dissect some
* subpart of MGCP. These aren't really proto dissectors but they
/*
* The various functions that either dissect some
* subpart of MGCP. These aren't really proto dissectors but they
* are written in the same style.
*/
static void dissect_mgcp_message(tvbuff_t *tvb, packet_info *pinfo,
*/
static void dissect_mgcp_message(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree,proto_tree *mgcp_tree, proto_tree *ti);
static void dissect_mgcp_firstline(tvbuff_t *tvb,
static void dissect_mgcp_firstline(tvbuff_t *tvb,
proto_tree *tree);
static void dissect_mgcp_params(tvbuff_t *tvb,
static void dissect_mgcp_params(tvbuff_t *tvb,
proto_tree *tree);
static void mgcp_raw_text_add(tvbuff_t *tvb,
proto_tree *tree);
/*
* Some functions which should be moved to a library
* as I think that people may find them of general usefulness.
/*
* Some functions which should be moved to a library
* as I think that people may find them of general usefulness.
*/
static gint tvb_skip_wsp(tvbuff_t* tvb, gint offset, gint maxlength);
static gint tvb_find_null_line(tvbuff_t* tvb, gint offset, gint len,
gint* next_offset);
static gint tvb_find_dot_line(tvbuff_t* tvb, gint offset,
gint* next_offset);
static gint tvb_find_dot_line(tvbuff_t* tvb, gint offset,
gint len, gint* next_offset);
static gboolean is_rfc2234_alpha(guint8 c);
@ -202,7 +202,7 @@ dissect_mgcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
num_messages = 0;
mgcp_tree = NULL;
ti = NULL;
/*
* Set the columns now, so that they'll be set correctly if we throw
* an exception. We can set them later as well....
@ -212,17 +212,17 @@ dissect_mgcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (check_col(pinfo->cinfo, COL_INFO))
col_clear(pinfo->cinfo, COL_INFO);
/*
* Check to see whether we're really dealing with MGCP by looking
/*
* Check to see whether we're really dealing with MGCP by looking
* for a valid MGCP verb or response code. This isn't infallible,
* but its cheap and its better than nothing.
*/
if(is_mgcp_verb(tvb,0,tvb_len) || is_mgcp_rspcode(tvb,0,tvb_len)){
/* Build the info tree if we've been given a root */
if (tree || global_mgcp_message_count == TRUE) {
/*
* Loop through however many mgcp messages may be stuck in
if (tree || global_mgcp_message_count == TRUE) {
/*
* Loop through however many mgcp messages may be stuck in
* this packet using piggybacking
*/
do{
@ -236,7 +236,7 @@ dissect_mgcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
sectionlen = tvb_find_dot_line(tvb, tvb_sectionbegin, -1,
&tvb_sectionend);
if( sectionlen != -1){
dissect_mgcp_message(tvb_new_subset(tvb, tvb_sectionbegin,
dissect_mgcp_message(tvb_new_subset(tvb, tvb_sectionbegin,
sectionlen, -1),
pinfo, tree, mgcp_tree,ti);
tvb_sectionbegin = tvb_sectionend;
@ -246,13 +246,13 @@ dissect_mgcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
} while(tvb_sectionend < tvb_len );
if(mgcp_tree){
proto_tree_add_uint_hidden(mgcp_tree, hf_mgcp_messagecount, tvb,
0 ,0 , num_messages);
proto_tree_add_uint_hidden(mgcp_tree, hf_mgcp_messagecount, tvb,
0 ,0 , num_messages);
}
}
}
/*
* Add our column information we do this after dissecting SDP
/*
* Add our column information we do this after dissecting SDP
* in order to prevent the column info changing to reflect the SDP.
*/
tvb_sectionbegin = 0;
@ -269,18 +269,18 @@ dissect_mgcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_add_str(pinfo->cinfo, COL_PROTOCOL, "MGCP");
}
}
if (check_col(pinfo->cinfo, COL_INFO) ){
sectionlen = tvb_find_line_end(tvb, tvb_sectionbegin,-1,
&tvb_sectionend,FALSE);
col_add_fstr(pinfo->cinfo, COL_INFO, "%s",
col_add_fstr(pinfo->cinfo, COL_INFO, "%s",
tvb_format_text(tvb,tvb_sectionbegin,sectionlen));
}
}
}
}
}
static void
dissect_mgcp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
static void
dissect_mgcp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_tree *mgcp_tree, proto_tree *ti){
/* Declare variables */
@ -295,16 +295,16 @@ dissect_mgcp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
tvb_len = tvb_length(tvb);
tvb_current_len = tvb_len;
/*
* Check to see whether we're really dealing with MGCP by looking
/*
* Check to see whether we're really dealing with MGCP by looking
* for a valid MGCP verb or response code. This isn't infallible,
* but its cheap and its better than nothing.
*/
if(is_mgcp_verb(tvb,0,tvb_len) || is_mgcp_rspcode(tvb,0,tvb_len)){
/* Build the info tree if we've been given a root */
if (tree && mgcp_tree) {
if (tree && mgcp_tree) {
/* dissect first line */
tvb_sectionbegin = 0;
tvb_current_len = tvb_len;
@ -312,7 +312,7 @@ dissect_mgcp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
sectionlen = tvb_find_line_end(tvb,0,-1,&tvb_sectionend,FALSE);
if( sectionlen > 0){
dissect_mgcp_firstline(tvb_new_subset(tvb, tvb_sectionbegin,
sectionlen,-1),
sectionlen,-1),
mgcp_tree);
}
tvb_sectionbegin = tvb_sectionend;
@ -321,13 +321,13 @@ dissect_mgcp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if(tvb_sectionbegin < tvb_len){
sectionlen = tvb_find_null_line(tvb, tvb_sectionbegin, -1,
&tvb_sectionend);
dissect_mgcp_params(tvb_new_subset(tvb, tvb_sectionbegin,
dissect_mgcp_params(tvb_new_subset(tvb, tvb_sectionbegin,
sectionlen, -1),
mgcp_tree);
tvb_sectionbegin = tvb_sectionend;
}
/* set the mgcp payload length correctly so we don't include the
/* set the mgcp payload length correctly so we don't include the
* encapsulated SDP
*/
sectionlen = tvb_sectionend;
@ -342,8 +342,8 @@ dissect_mgcp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
}
/* dissect sdp payload */
if( tvb_sectionend < tvb_len && global_mgcp_dissect_tree == TRUE){
next_tvb = tvb_new_subset(tvb, tvb_sectionend, -1, -1);
if( tvb_sectionend < tvb_len && global_mgcp_dissect_tree == TRUE){
next_tvb = tvb_new_subset(tvb, tvb_sectionend, -1, -1);
call_dissector(sdp_handle, next_tvb, pinfo, tree);
}
}
@ -351,8 +351,8 @@ dissect_mgcp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
}
/*
* Add the raw text of the message to the dissect tree if appropriate
/*
* Add the raw text of the message to the dissect tree if appropriate
* preferences are specified.
*/
@ -366,8 +366,8 @@ static void mgcp_raw_text_add(tvbuff_t *tvb, proto_tree *tree){
do {
tvb_find_line_end(tvb,tvb_linebegin,-1,&tvb_lineend,FALSE);
linelen = tvb_lineend - tvb_linebegin;
proto_tree_add_text(tree, tvb, tvb_linebegin, linelen,
"%s", tvb_format_text(tvb,tvb_linebegin,
proto_tree_add_text(tree, tvb, tvb_linebegin, linelen,
"%s", tvb_format_text(tvb,tvb_linebegin,
linelen));
tvb_linebegin = tvb_lineend;
} while ( tvb_lineend < tvb_len );
@ -375,18 +375,18 @@ static void mgcp_raw_text_add(tvbuff_t *tvb, proto_tree *tree){
/* Register all the bits needed with the filtering engine */
void
void
proto_register_mgcp(void)
{
static hf_register_info hf[] = {
{ &hf_mgcp_req,
{ "Request", "mgcp.req", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
{ "Request", "mgcp.req", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"True if MGCP request", HFILL }},
{ &hf_mgcp_rsp,
{ "Response", "mgcp.rsp", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
{ "Response", "mgcp.rsp", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
"TRUE if MGCP response", HFILL }},
{ &hf_mgcp_req_verb,
{ "Verb", "mgcp.req.verb", FT_STRING, BASE_DEC, NULL, 0x0,
{ "Verb", "mgcp.req.verb", FT_STRING, BASE_DEC, NULL, 0x0,
"Name of the verb", HFILL }},
{ &hf_mgcp_req_endpoint,
{ "Endpoint", "mgcp.req.endpoint", FT_STRING, BASE_DEC, NULL, 0x0,
@ -394,29 +394,29 @@ proto_register_mgcp(void)
{ &hf_mgcp_transid,
{ "Transaction ID", "mgcp.transid", FT_STRING, BASE_DEC, NULL, 0x0,
"Transaction ID of this message", HFILL }},
{ &hf_mgcp_version,
{ &hf_mgcp_version,
{ "Version", "mgcp.version", FT_STRING, BASE_DEC, NULL, 0x0,
"MGCP Version", HFILL }},
{ &hf_mgcp_rsp_rspcode,
{ &hf_mgcp_rsp_rspcode,
{ "Response Code", "mgcp.rsp.rspcode", FT_STRING, BASE_DEC, NULL, 0x0,
"Response Code", HFILL }},
{ &hf_mgcp_rsp_rspstring,
{ "Response String", "mgcp.rsp.rspstring", FT_STRING, BASE_DEC, NULL,
{ "Response String", "mgcp.rsp.rspstring", FT_STRING, BASE_DEC, NULL,
0x0, "Response String", HFILL }},
{ &hf_mgcp_param_rspack,
{ "ResponseAck (K)", "mgcp.param.rspack", FT_STRING, BASE_DEC, NULL,
0x0, "Response Ack", HFILL }},
{ &hf_mgcp_param_bearerinfo,
{ "BearerInformation (B)", "mgcp.param.bearerinfo", FT_STRING, BASE_DEC,
{ "BearerInformation (B)", "mgcp.param.bearerinfo", FT_STRING, BASE_DEC,
NULL, 0x0, "Bearer Information", HFILL }},
{ &hf_mgcp_param_callid,
{ "CallId (C)", "mgcp.param.callid", FT_STRING, BASE_DEC, NULL, 0x0,
"Call Id", HFILL }},
{ &hf_mgcp_param_connectionid,
{"ConnectionIdentifier (I)", "mgcp.param.connectionid", FT_STRING,
{"ConnectionIdentifier (I)", "mgcp.param.connectionid", FT_STRING,
BASE_DEC, NULL, 0x0, "Connection Identifier", HFILL }},
{ &hf_mgcp_param_secondconnectionid,
{ "SecondConnectionID (I2)", "mgcp.param.secondconnectionid", FT_STRING,
{ "SecondConnectionID (I2)", "mgcp.param.secondconnectionid", FT_STRING,
BASE_DEC, NULL, 0x0, "Second Connection Identifier", HFILL }},
{ &hf_mgcp_param_notifiedentity,
{ "NotifiedEntity (N)", "mgcp.param.notifiedentity", FT_STRING, BASE_DEC,
@ -425,7 +425,7 @@ proto_register_mgcp(void)
{ "RequestIdentifier (X)", "mgcp.param.requestid", FT_STRING, BASE_DEC,
NULL, 0x0, "Request Identifier", HFILL }},
{ &hf_mgcp_param_localconnoptions,
{ "LocalConnectionOptions (L)", "mgcp.param.localconnectionoptions",
{ "LocalConnectionOptions (L)", "mgcp.param.localconnectionoptions",
FT_STRING, BASE_DEC, NULL, 0x0, "Local Connection Options", HFILL }},
{ &hf_mgcp_param_connectionmode,
{ "ConnectionMode (M)", "mgcp.param.connectionmode", FT_STRING, BASE_DEC,
@ -436,20 +436,20 @@ proto_register_mgcp(void)
{ &hf_mgcp_param_signalreq,
{ "SignalRequests (S)", "mgcp.param.signalreq", FT_STRING, BASE_DEC,
NULL, 0x0, "Signal Request", HFILL }},
{ &hf_mgcp_param_restartmethod,
{ &hf_mgcp_param_restartmethod,
{ "RestartMethod (RM)", "mgcp.param.restartmethod", FT_STRING, BASE_DEC,
NULL, 0x0, "Restart Method", HFILL }},
{ &hf_mgcp_param_restartdelay,
{ "RestartDelay (RD)", "mgcp.param.restartdelay", FT_STRING, BASE_DEC,
NULL, 0x0, "Restart Delay", HFILL }},
{ &hf_mgcp_param_digitmap,
{ &hf_mgcp_param_digitmap,
{ "DigitMap (D)", "mgcp.param.digitmap", FT_STRING, BASE_DEC, NULL, 0x0,
"Digit Map", HFILL }},
{ &hf_mgcp_param_observedevent,
{ "ObservedEvents (O)", "mgcp.param.observedevents", FT_STRING,
{ &hf_mgcp_param_observedevent,
{ "ObservedEvents (O)", "mgcp.param.observedevents", FT_STRING,
BASE_DEC, NULL, 0x0, "Observed Events", HFILL }},
{ &hf_mgcp_param_connectionparam,
{ "ConnectionParameters (P)", "mgcp.param.connectionparam", FT_STRING,
{ "ConnectionParameters (P)", "mgcp.param.connectionparam", FT_STRING,
BASE_DEC, NULL, 0x0, "Connection Parameters", HFILL }},
{ &hf_mgcp_param_reasoncode,
{ "ReasonCode (E)", "mgcp.param.reasoncode", FT_STRING, BASE_DEC,
@ -464,9 +464,9 @@ proto_register_mgcp(void)
{ "SecondEndpointID (Z2)", "mgcp.param.secondendpointid", FT_STRING,
BASE_DEC, NULL, 0x0, "Second Endpoing ID", HFILL }},
{ &hf_mgcp_param_reqinfo,
{ "RequestedInfo (F)", "mgcp.param.reqinfo", FT_STRING, BASE_DEC,
{ "RequestedInfo (F)", "mgcp.param.reqinfo", FT_STRING, BASE_DEC,
NULL, 0x0,"Requested Info", HFILL }},
{ &hf_mgcp_param_quarantinehandling,
{ &hf_mgcp_param_quarantinehandling,
{ "QuarantineHandling (Q)", "mgcp.param.quarantinehandling", FT_STRING,
BASE_DEC, NULL, 0x0, "Quarantine Handling", HFILL }},
{ &hf_mgcp_param_detectedevents,
@ -476,13 +476,13 @@ proto_register_mgcp(void)
{ "Capabilities (A)", "mgcp.param.capabilities", FT_STRING, BASE_DEC,
NULL, 0x0, "Capabilities", HFILL }},
{ &hf_mgcp_param_extention,
{ "Extention Parameter (X-*)", "mgcp.param.extention", FT_STRING,
{ "Extention Parameter (X-*)", "mgcp.param.extention", FT_STRING,
BASE_DEC, NULL, 0x0, "Extension Parameter", HFILL }},
{ &hf_mgcp_param_invalid,
{ "Invalid Parameter", "mgcp.param.invalid", FT_STRING,
{ "Invalid Parameter", "mgcp.param.invalid", FT_STRING,
BASE_DEC, NULL, 0x0, "Invalid Parameter", HFILL }},
{ &hf_mgcp_messagecount,
{ "MGCP Message Count", "mgcp.messagecount", FT_UINT32,
{ &hf_mgcp_messagecount,
{ "MGCP Message Count", "mgcp.messagecount", FT_UINT32,
BASE_DEC, NULL, 0x0, "Number of MGCP message in a packet", HFILL }},
/* Add more fields here */
};
@ -490,7 +490,7 @@ proto_register_mgcp(void)
&ett_mgcp,
&ett_mgcp_param,
};
module_t *mgcp_module;
module_t *mgcp_module;
proto_mgcp = proto_register_protocol("Media Gateway Control Protocol",
"MGCP", "mgcp");
@ -502,49 +502,49 @@ proto_register_mgcp(void)
mgcp_module = prefs_register_protocol(proto_mgcp, proto_reg_handoff_mgcp);
prefs_register_uint_preference(mgcp_module, "tcp.gateway_port",
prefs_register_uint_preference(mgcp_module, "tcp.gateway_port",
"MGCP Gateway TCP Port",
"Set the UDP port for gateway messages "
"(if other than the default of 2427)",
10, &global_mgcp_gateway_tcp_port);
prefs_register_uint_preference(mgcp_module, "udp.gateway_port",
prefs_register_uint_preference(mgcp_module, "udp.gateway_port",
"MGCP Gateway UDP Port",
"Set the TCP port for gateway messages "
"(if other than the default of 2427)",
10, &global_mgcp_gateway_udp_port);
prefs_register_uint_preference(mgcp_module, "tcp.callagent_port",
prefs_register_uint_preference(mgcp_module, "tcp.callagent_port",
"MGCP Callagent TCP Port",
"Set the TCP port for callagent messages "
"(if other than the default of 2727)",
10, &global_mgcp_callagent_tcp_port);
prefs_register_uint_preference(mgcp_module, "udp.callagent_port",
prefs_register_uint_preference(mgcp_module, "udp.callagent_port",
"MGCP Callagent UDP Port",
"Set the UDP port for callagent messages "
"(if other than the default of 2727)",
10, &global_mgcp_callagent_udp_port);
prefs_register_bool_preference(mgcp_module, "display_raw_text",
"Display raw text for MGCP message",
prefs_register_bool_preference(mgcp_module, "display_raw_text",
"Display raw text for MGCP message",
"Specifies that the raw text of the "
"MGCP message should be displayed "
"instead of (or in addition to) the "
"dissection tree",
&global_mgcp_raw_text);
prefs_register_bool_preference(mgcp_module, "display_dissect_tree",
"Display tree dissection for MGCP message",
prefs_register_bool_preference(mgcp_module, "display_dissect_tree",
"Display tree dissection for MGCP message",
"Specifies that the dissection tree of the "
"MGCP message should be displayed "
"instead of (or in addition to) the "
"raw text",
&global_mgcp_dissect_tree);
prefs_register_bool_preference(mgcp_module, "display_mgcp_message_count",
"Display the number of MGCP messages",
prefs_register_bool_preference(mgcp_module, "display_mgcp_message_count",
"Display the number of MGCP messages",
"Display the number of MGCP messages "
"found in a packet in the protocol column.",
&global_mgcp_message_count);
@ -588,15 +588,15 @@ proto_reg_handoff_mgcp(void)
}
/*
* is_mgcp_verb - A function for determining whether there is a
/*
* is_mgcp_verb - A function for determining whether there is a
* MGCP verb at offset in tvb
*
* Parameter:
* tvb - The tvbuff in which we are looking for an MGCP verb
* offset - The offset in tvb at which we are looking for a MGCP verb
* maxlength - The maximum distance from offset we may look for the
* characters that make up a MGCP verb.
* maxlength - The maximum distance from offset we may look for the
* characters that make up a MGCP verb.
*
* Return: TRUE if there is an MGCP verb at offset in tvb, otherwise FALSE
*/
@ -621,7 +621,7 @@ static gboolean is_mgcp_verb(tvbuff_t *tvb, gint offset, gint maxlength){
returnvalue = TRUE;
}
}
if( returnvalue && maxlength >= 5 &&
if( returnvalue && maxlength >= 5 &&
(word[0] = tvb_get_guint8(tvb,4)) != ' ' && word[0] != '\t'){
returnvalue = FALSE;
}
@ -629,32 +629,32 @@ static gboolean is_mgcp_verb(tvbuff_t *tvb, gint offset, gint maxlength){
}
/*
* is_mgcp_rspcode - A function for determining whether something which
* looks roughly like a MGCP response code is at
* is_mgcp_rspcode - A function for determining whether something which
* looks roughly like a MGCP response code is at
* offset in tvb
*
* Parameters:
* tvb - The tvbuff in which we are looking for an MGCP response code
* offset - The offset in tvb at which we are looking for a MGCP response code
* maxlength - The maximum distance from offset we may look for the
* characters that make up a MGCP response code.
* maxlength - The maximum distance from offset we may look for the
* characters that make up a MGCP response code.
*
* Return: TRUE if there is an MGCP response code at offset in tvb,
* Return: TRUE if there is an MGCP response code at offset in tvb,
* otherwise FALSE
*/
static gboolean is_mgcp_rspcode(tvbuff_t *tvb, gint offset, gint maxlength){
int returnvalue = FALSE;
guint8 word[4];
if(maxlength >= 3){
if(maxlength >= 3){
tvb_get_nstringz0(tvb,offset,3,word);
if( isdigit(word[0]) &&
isdigit(word[1]) &&
isdigit(word[2])){
isdigit(word[2])){
returnvalue = TRUE;
}
}
if( returnvalue && maxlength >= 4 &&
if( returnvalue && maxlength >= 4 &&
(word[0] = tvb_get_guint8(tvb,3)) != ' ' && word[0] != '\t'){
returnvalue = FALSE;
}
@ -662,11 +662,11 @@ static gboolean is_mgcp_rspcode(tvbuff_t *tvb, gint offset, gint maxlength){
}
/*
* is_rfc2234_alpha - Indicates whether the character c is an alphabetical
* character. This function is used instead of
* is_rfc2234_alpha - Indicates whether the character c is an alphabetical
* character. This function is used instead of
* isalpha because isalpha may deviate from the rfc2234
* definition of ALPHA in some locales.
*
*
* Parameter:
* c - The character being checked for being an alphabetical character.
*
@ -681,20 +681,20 @@ static gboolean is_rfc2234_alpha(guint8 c){
}
return returnvalue;
}
/*
* tvb_parse_param - Parse the MGCP param into a type and a value.
*
* Parameters:
* tvb - The tvbuff containing the MGCP param we are to parse.
* offset - The offset in tvb at which we will begin looking for a
* offset - The offset in tvb at which we will begin looking for a
* MGCP parameter to parse.
* len - The maximum distance from offset in tvb that we can look for
* an MGCP parameter to parse.
* hf - The place to write a pointer to the integer representing the
* hf - The place to write a pointer to the integer representing the
* header field associated with the MGCP parameter parsed.
*
* Returns: The offset in tvb where the value of the MGCP parameter
* Returns: The offset in tvb where the value of the MGCP parameter
* begins.
*/
static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf){
@ -717,8 +717,8 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf){
break;
case 'I':
tvb_current_offset++;
if(len > (tvb_current_offset - offset) &&
(tempchar = tvb_get_guint8(tvb,tvb_current_offset)) == ':'){
if(len > (tvb_current_offset - offset) &&
(tempchar = tvb_get_guint8(tvb,tvb_current_offset)) == ':'){
*hf = &hf_mgcp_param_connectionid;
tvb_current_offset--;
}
@ -731,17 +731,17 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf){
break;
case 'X':
tvb_current_offset++;
if(len > (tvb_current_offset - offset) &&
if(len > (tvb_current_offset - offset) &&
(tempchar = tvb_get_guint8(tvb,tvb_current_offset)) == ':'){
*hf = &hf_mgcp_param_requestid;
}
else if(len > (tvb_current_offset - offset) && (
(tempchar = tvb_get_guint8(tvb,tvb_current_offset)) == '-' ||
(tempchar = tvb_get_guint8(tvb,tvb_current_offset)) == '-' ||
tempchar == '+')){
tvb_current_offset++;
for(counter = 1;(counter <= 6) && (len > (counter + tvb_current_offset
- offset))
&& ( is_rfc2234_alpha(tempchar =
&& ( is_rfc2234_alpha(tempchar =
tvb_get_guint8(tvb,
tvb_current_offset+counter))
|| isdigit(tempchar));counter++);
@ -749,7 +749,7 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf){
tvb_current_offset += counter;
*hf = &hf_mgcp_param_extention;
}
}
}
tvb_current_offset--;
break;
case 'L':
@ -760,8 +760,8 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf){
break;
case 'R':
tvb_current_offset++;
if(len > (tvb_current_offset - offset) &&
(tempchar = tvb_get_guint8(tvb,tvb_current_offset)) == ':'){
if(len > (tvb_current_offset - offset) &&
(tempchar = tvb_get_guint8(tvb,tvb_current_offset)) == ':'){
*hf = &hf_mgcp_param_reqevents;
tvb_current_offset--;
}
@ -786,8 +786,8 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf){
break;
case 'E':
tvb_current_offset++;
if(len > (tvb_current_offset - offset) &&
(tempchar = tvb_get_guint8(tvb,tvb_current_offset)) == ':'){
if(len > (tvb_current_offset - offset) &&
(tempchar = tvb_get_guint8(tvb,tvb_current_offset)) == ':'){
*hf = &hf_mgcp_param_reasoncode;
tvb_current_offset--;
}
@ -797,8 +797,8 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf){
break;
case 'Z':
tvb_current_offset++;
if(len > (tvb_current_offset - offset) &&
(tempchar = tvb_get_guint8(tvb,tvb_current_offset)) == ':'){
if(len > (tvb_current_offset - offset) &&
(tempchar = tvb_get_guint8(tvb,tvb_current_offset)) == ':'){
*hf = &hf_mgcp_param_specificendpoint;
tvb_current_offset--;
}
@ -825,9 +825,9 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf){
*hf = &hf_mgcp_param_invalid;
break;
}
tvb_current_offset++;
if(*hf != NULL && len > (tvb_current_offset - offset) &&
if(*hf != NULL && len > (tvb_current_offset - offset) &&
(tempchar = tvb_get_guint8(tvb,tvb_current_offset)) == ':'){
tvb_current_offset++;
tvb_current_offset = tvb_skip_wsp(tvb,tvb_current_offset,
@ -848,23 +848,23 @@ static gint tvb_parse_param(tvbuff_t* tvb, gint offset, gint len, int** hf){
}
/*
/*
* dissect_mgcp_firstline - Dissects the firstline of an MGCP message.
* Adds the appropriate headers fields to
* tree for the dissection of the first line
* Adds the appropriate headers fields to
* tree for the dissection of the first line
* of an MGCP message.
*
*
* Parameters:
* tvb - The tvb containing the first line of an MGCP message. This
* tvb is presumed to ONLY contain the first line of the MGCP
* tvb - The tvb containing the first line of an MGCP message. This
* tvb is presumed to ONLY contain the first line of the MGCP
* message.
* pinfo - The packet info for the packet. This is not really used
* by this function but is passed through so as to retain the
* pinfo - The packet info for the packet. This is not really used
* by this function but is passed through so as to retain the
* style of a dissector.
* tree - The tree from which to hang the structured information parsed
* tree - The tree from which to hang the structured information parsed
* from the first line of the MGCP message.
*/
static void dissect_mgcp_firstline(tvbuff_t *tvb,
static void dissect_mgcp_firstline(tvbuff_t *tvb,
proto_tree *tree){
gint tvb_current_offset,tvb_previous_offset,tvb_len,tvb_current_len;
gint tokennum, tokenlen;
@ -893,15 +893,15 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb,
if(tvb_current_offset == -1){
tvb_current_offset = tvb_len;
tokenlen = tvb_current_len;
}
}
else{
tokenlen = tvb_current_offset - tvb_previous_offset;
}
if(tokennum == 0){
if(is_mgcp_verb(tvb,tvb_previous_offset,tvb_current_len)){
mgcp_type = MGCP_REQUEST;
my_proto_tree_add_string(tree,hf_mgcp_req_verb, tvb,
tvb_previous_offset, tokenlen,
my_proto_tree_add_string(tree,hf_mgcp_req_verb, tvb,
tvb_previous_offset, tokenlen,
tvb_format_text(tvb,tvb_previous_offset
,tokenlen));
}
@ -918,7 +918,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb,
}
if(tokennum == 1){
my_proto_tree_add_string(tree,hf_mgcp_transid, tvb,
tvb_previous_offset, tokenlen,
tvb_previous_offset, tokenlen,
tvb_format_text(tvb,tvb_previous_offset,
tokenlen));
}
@ -931,7 +931,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb,
}
else if(mgcp_type == MGCP_RESPONSE){
if(tvb_current_offset < tvb_len){
tokenlen = tvb_find_line_end(tvb, tvb_previous_offset,
tokenlen = tvb_find_line_end(tvb, tvb_previous_offset,
-1,&tvb_current_offset,FALSE);
}
else{
@ -946,7 +946,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb,
}
if( (tokennum == 3 && mgcp_type == MGCP_REQUEST) ){
if(tvb_current_offset < tvb_len ){
tokenlen = tvb_find_line_end(tvb, tvb_previous_offset,
tokenlen = tvb_find_line_end(tvb, tvb_previous_offset,
-1,&tvb_current_offset,FALSE);
}
else{
@ -963,7 +963,7 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb,
tvb_current_len);
}
tokennum++;
} while( tvb_current_offset < tvb_len && tvb_previous_offset < tvb_len
} while( tvb_current_offset < tvb_len && tvb_previous_offset < tvb_len
&& tokennum <= 3);
switch (mgcp_type){
case MGCP_RESPONSE:
@ -978,20 +978,20 @@ static void dissect_mgcp_firstline(tvbuff_t *tvb,
}
}
/*
/*
* dissect_mgcp_params - Dissects the parameters of an MGCP message.
* Adds the appropriate headers fields to
* tree for the dissection of the parameters
* Adds the appropriate headers fields to
* tree for the dissection of the parameters
* of an MGCP message.
*
*
* Parameters:
* tvb - The tvb containing the parameters of an MGCP message. This
* tvb is presumed to ONLY contain the part of the MGCP
* tvb - The tvb containing the parameters of an MGCP message. This
* tvb is presumed to ONLY contain the part of the MGCP
* message which contains the MGCP parameters.
* pinfo - The packet info for the packet. This is not really used
* by this function but is passed through so as to retain the
* pinfo - The packet info for the packet. This is not really used
* by this function but is passed through so as to retain the
* style of a dissector.
* tree - The tree from which to hang the structured information parsed
* tree - The tree from which to hang the structured information parsed
* from the parameters of the MGCP message.
*/
static void dissect_mgcp_params(tvbuff_t *tvb, proto_tree *tree){
@ -1010,7 +1010,7 @@ static void dissect_mgcp_params(tvbuff_t *tvb, proto_tree *tree){
if(tree){
if(global_mgcp_dissect_tree){
my_proto_tree_add_string = proto_tree_add_string;
mgcp_param_ti = proto_tree_add_item(tree, proto_mgcp, tvb,
mgcp_param_ti = proto_tree_add_item(tree, proto_mgcp, tvb,
tvb_linebegin, tvb_len, FALSE);
proto_item_set_text(mgcp_param_ti, "Parameters");
mgcp_param_tree = proto_item_add_subtree(mgcp_param_ti, ett_mgcp_param);
@ -1024,32 +1024,32 @@ static void dissect_mgcp_params(tvbuff_t *tvb, proto_tree *tree){
/* Parse the parameters */
while(tvb_lineend < tvb_len){
linelen = tvb_find_line_end(tvb, tvb_linebegin, -1,&tvb_lineend,FALSE);
tvb_tokenbegin = tvb_parse_param(tvb, tvb_linebegin, linelen,
tvb_tokenbegin = tvb_parse_param(tvb, tvb_linebegin, linelen,
&my_param);
if( my_param != NULL ){
tokenlen = tvb_find_line_end(tvb,tvb_tokenbegin,-1,&tvb_lineend,FALSE);
my_proto_tree_add_string(mgcp_param_tree,*my_param, tvb,
tvb_linebegin, linelen,
tvb_linebegin, linelen,
tvb_format_text(tvb,tvb_tokenbegin,
tokenlen));
}
tvb_linebegin = tvb_lineend;
}
}
}
}
}
/*
* tvb_skip_wsp - Returns the position in tvb of the first non-whitespace
* tvb_skip_wsp - Returns the position in tvb of the first non-whitespace
* character following offset or offset + maxlength -1 whichever
* is smaller.
*
* Parameters:
* Parameters:
* tvb - The tvbuff in which we are skipping whitespace.
* offset - The offset in tvb from which we begin trying to skip whitespace.
* maxlength - The maximum distance from offset that we may try to skip
* maxlength - The maximum distance from offset that we may try to skip
* whitespace.
*
* Returns: The position in tvb of the first non-whitespace
* Returns: The position in tvb of the first non-whitespace
* character following offset or offset + maxlength -1 whichever
* is smaller.
*/
@ -1062,33 +1062,33 @@ static gint tvb_skip_wsp(tvbuff_t* tvb, gint offset, gint maxlength){
if(end >= tvb_len){
end = tvb_len;
}
for(counter = offset; counter < end &&
((tempchar = tvb_get_guint8(tvb,counter)) == ' ' ||
for(counter = offset; counter < end &&
((tempchar = tvb_get_guint8(tvb,counter)) == ' ' ||
tempchar == '\t');counter++);
return (counter);
}
/*
* tvb_find_null_line - Returns the length from offset to the first null
* line found (a null line is a line that begins
* line found (a null line is a line that begins
* with a CR or LF. The offset to the first character
* after the null line is written into the gint pointed
* to by next_offset.
*
* Parameters:
* Parameters:
* tvb - The tvbuff in which we are looking for a null line.
* offset - The offset in tvb at which we will begin looking for
* offset - The offset in tvb at which we will begin looking for
* a null line.
* len - The maximum distance from offset in tvb that we will look for
* len - The maximum distance from offset in tvb that we will look for
* a null line. If it is -1 we will look to the end of the buffer.
*
* next_offset - The location to write the offset of first character
* FOLLOWING the null line.
* next_offset - The location to write the offset of first character
* FOLLOWING the null line.
*
* Returns: The length from offset to the first character BEFORE
* Returns: The length from offset to the first character BEFORE
* the null line..
*/
static gint tvb_find_null_line(tvbuff_t* tvb, gint offset,
static gint tvb_find_null_line(tvbuff_t* tvb, gint offset,
gint len, gint* next_offset){
gint tvb_lineend,tvb_current_len,tvb_linebegin,maxoffset;
guint tempchar;
@ -1096,12 +1096,12 @@ static gint tvb_find_null_line(tvbuff_t* tvb, gint offset,
tvb_linebegin = offset;
tvb_lineend = tvb_linebegin;
/* Simple setup to allow for the traditional -1 search to the end
* of the tvbuff
/* Simple setup to allow for the traditional -1 search to the end
* of the tvbuff
*/
if(len != -1){
tvb_current_len = len;
}
}
else{
tvb_current_len = tvb_length_remaining(tvb,offset);
}
@ -1116,7 +1116,7 @@ static gint tvb_find_null_line(tvbuff_t* tvb, gint offset,
tvb_current_len = tvb_length_remaining(tvb,tvb_linebegin);
tvb_find_line_end(tvb, tvb_linebegin, tvb_current_len, &tvb_lineend,FALSE);
tempchar = tvb_get_guint8(tvb,tvb_linebegin);
}
}
while( tempchar != '\r' && tempchar != '\n' &&
tvb_lineend <= maxoffset);
@ -1133,27 +1133,27 @@ static gint tvb_find_null_line(tvbuff_t* tvb, gint offset,
}
/*
* tvb_find_dot_line - Returns the length from offset to the first line
* containing only a dot (.) character. A line
* containing only a dot is used to indicate a
* separation between multiple MGCP messages
* tvb_find_dot_line - Returns the length from offset to the first line
* containing only a dot (.) character. A line
* containing only a dot is used to indicate a
* separation between multiple MGCP messages
* piggybacked in the same UDP packet.
*
* Parameters:
* Parameters:
* tvb - The tvbuff in which we are looking for a dot line.
* offset - The offset in tvb at which we will begin looking for
* offset - The offset in tvb at which we will begin looking for
* a dot line.
* len - The maximum distance from offset in tvb that we will look for
* len - The maximum distance from offset in tvb that we will look for
* a dot line. If it is -1 we will look to the end of the buffer.
*
* next_offset - The location to write the offset of first character
* FOLLOWING the dot line.
* next_offset - The location to write the offset of first character
* FOLLOWING the dot line.
*
* Returns: The length from offset to the first character BEFORE
* the dot line or -1 if the character at offset is a .
* Returns: The length from offset to the first character BEFORE
* the dot line or -1 if the character at offset is a .
* followed by a newline or a carriage return.
*/
static gint tvb_find_dot_line(tvbuff_t* tvb, gint offset,
static gint tvb_find_dot_line(tvbuff_t* tvb, gint offset,
gint len, gint* next_offset){
gint tvb_current_offset, tvb_current_len, maxoffset,tvb_len;
guint8 tempchar;
@ -1165,7 +1165,7 @@ static gint tvb_find_dot_line(tvbuff_t* tvb, gint offset,
if(len == -1){
maxoffset = ( tvb_len - 1 );
}
else {
else {
maxoffset = (len - 1 ) + offset;
}
tvb_current_offset = offset -1;
@ -1173,17 +1173,17 @@ static gint tvb_find_dot_line(tvbuff_t* tvb, gint offset,
tvb_current_offset = tvb_find_guint8(tvb, tvb_current_offset+1,
tvb_current_len, '.');
tvb_current_len = maxoffset - tvb_current_offset + 1;
/*
/*
* if we didn't find a . then break out of the loop
*/
if(tvb_current_offset == -1){
break;
}
/* do we have and characters following the . ? */
if( tvb_current_offset < maxoffset ) {
if( tvb_current_offset < maxoffset ) {
tempchar = tvb_get_guint8(tvb,tvb_current_offset+1);
/*
* are the characters that follow the dot a newline or carriage return ?
/*
* are the characters that follow the dot a newline or carriage return ?
*/
if(tempchar == '\r' || tempchar == '\n'){
/*
@ -1195,7 +1195,7 @@ static gint tvb_find_dot_line(tvbuff_t* tvb, gint offset,
else {
tempchar = tvb_get_guint8(tvb,tvb_current_offset-1);
/*
* are the characters that follow the dot a newline or a carriage
* are the characters that follow the dot a newline or a carriage
* return ?
*/
if(tempchar == '\r' || tempchar == '\n'){
@ -1214,10 +1214,10 @@ static gint tvb_find_dot_line(tvbuff_t* tvb, gint offset,
break;
}
}
}
}
} while (tvb_current_offset < maxoffset);
/*
* so now we either have the tvb_current_offset of a . in a dot line
/*
* so now we either have the tvb_current_offset of a . in a dot line
* or a tvb_current_offset of -1
*/
if(tvb_current_offset == -1){
@ -1230,11 +1230,11 @@ static gint tvb_find_dot_line(tvbuff_t* tvb, gint offset,
if( tvb_current_offset == offset ){
tvb_current_len = -1;
}
}
else {
tvb_current_len = tvb_current_offset - offset;
}
return tvb_current_len;
return tvb_current_len;
}
/* Start the functions we need for the plugin stuff */

View File

@ -1,21 +1,21 @@
/* plugin_api.c
* Routines for Ethereal plugins.
*
* $Id: plugin_api.c,v 1.41 2002/08/14 19:18:20 guy Exp $
* $Id: plugin_api.c,v 1.42 2002/08/28 20:38:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -144,7 +144,7 @@ plugin_address_table_init(plugin_address_table_t *pat)
p_register_giop_user = pat->p_register_giop_user;
p_is_big_endian = pat->p_is_big_endian;
p_get_CDR_encap_info = pat->p_get_CDR_encap_info;
p_get_CDR_any = pat->p_get_CDR_any;
p_get_CDR_boolean = pat->p_get_CDR_boolean;
p_get_CDR_char = pat->p_get_CDR_char;
@ -174,11 +174,11 @@ plugin_address_table_init(plugin_address_table_t *pat)
p_decode_enumerated_bitfield = pat->p_decode_enumerated_bitfield;
p_register_dissector_table = pat->p_register_dissector_table;
p_except_throw = pat->p_except_throw;
p_dissector_try_port = pat->p_dissector_try_port;
p_dissector_try_port = pat->p_dissector_try_port;
p_conversation_add_proto_data = pat->p_conversation_add_proto_data;
p_conversation_get_proto_data = pat->p_conversation_get_proto_data;
p_conversation_delete_proto_data = pat->p_conversation_delete_proto_data;
p_p_add_proto_data = pat->p_p_add_proto_data;
p_p_get_proto_data = pat->p_p_get_proto_data;
p_conversation_add_proto_data = pat->p_conversation_add_proto_data;
p_conversation_get_proto_data = pat->p_conversation_get_proto_data;
p_conversation_delete_proto_data = pat->p_conversation_delete_proto_data;
p_p_add_proto_data = pat->p_p_add_proto_data;
p_p_get_proto_data = pat->p_p_get_proto_data;
}

View File

@ -1,21 +1,21 @@
/* plugin_api.h
* Routines for Ethereal plugins.
*
* $Id: plugin_api.h,v 1.42 2002/08/14 19:18:20 guy Exp $
* $Id: plugin_api.h,v 1.43 2002/08/28 20:38:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -2,21 +2,21 @@
* Declarations of a list of "p_" names; included in various places
* to declare them as variables or as function members.
*
* $Id: plugin_api_decls.h,v 1.4 2002/08/14 19:18:20 guy Exp $
* $Id: plugin_api_decls.h,v 1.5 2002/08/28 20:38:57 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,21 +1,21 @@
/* plugin_api_defs.h
* Define the variables that hold pointers to plugin API functions
*
* $Id: plugin_api_defs.h,v 1.14 2002/05/05 00:16:36 guy Exp $
* $Id: plugin_api_defs.h,v 1.15 2002/08/28 20:38:58 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.

View File

@ -1,21 +1,21 @@
/* plugin_table.h
* Table of exported addresses for Ethereal plugins.
*
* $Id: plugin_table.h,v 1.52 2002/08/14 19:18:20 guy Exp $
* $Id: plugin_table.h,v 1.53 2002/08/28 20:38:58 jmayer Exp $
*
* Ethereal - Network traffic analyzer
* Copyright 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*
* 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.
@ -46,9 +46,9 @@ typedef void (*addr_register_postseq_cleanup_routine)(void (*func)(void));
typedef gchar* (*addr_match_strval)(guint32, const value_string*);
typedef gchar* (*addr_val_to_str)(guint32, const value_string *, const char *);
typedef conversation_t *(*addr_conversation_new)(address *, address *,
typedef conversation_t *(*addr_conversation_new)(address *, address *,
port_type, guint32, guint32, guint);
typedef conversation_t *(*addr_find_conversation)(address *, address *,
typedef conversation_t *(*addr_find_conversation)(address *, address *,
port_type, guint32, guint32, guint);
typedef void (*addr_conversation_set_dissector)(conversation_t *,
dissector_handle_t);