forked from osmocom/wireshark
Remove trailing whitespace
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0 Reviewed-on: https://code.wireshark.org/review/385 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
This commit is contained in:
parent
c55c57ad72
commit
11b5c15fdb
|
@ -492,7 +492,7 @@ get_if_name(const char *if_text)
|
|||
*/
|
||||
if ((strncmp(if_name, "://", 3) != 0) && !isdigit(if_name[1])) {
|
||||
/*
|
||||
* OK, we've found a colon followed neither by "//" nor by digit.
|
||||
* OK, we've found a colon followed neither by "//" nor by digit.
|
||||
* Skip blanks following it.
|
||||
*/
|
||||
if_name++;
|
||||
|
|
|
@ -6,17 +6,17 @@
|
|||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
|
|
@ -50,7 +50,7 @@ static gboolean pong(echld_msg_type_t type, GByteArray* ba _U_, void* data) {
|
|||
long ret = -1;
|
||||
gettimeofday(&t,NULL);
|
||||
|
||||
|
||||
|
||||
switch (type) {
|
||||
case ECHLD_PONG:
|
||||
ret = timevaldiff(&(p->tv),&t);
|
||||
|
@ -95,7 +95,7 @@ static gboolean got_param(echld_msg_type_t type, GByteArray* ba _U_, void* data)
|
|||
char* err_msg;
|
||||
|
||||
switch (type) {
|
||||
case ECHLD_PARAM:
|
||||
case ECHLD_PARAM:
|
||||
if (g->cb) {
|
||||
char* param;
|
||||
char* value;
|
||||
|
@ -123,7 +123,7 @@ static gboolean got_param(echld_msg_type_t type, GByteArray* ba _U_, void* data)
|
|||
|
||||
extern echld_state_t echld_get_param(int chld_id, const char* param, echld_param_cb_t acb, void* cb_data) {
|
||||
struct _get_param* g = g_new0(struct _get_param,1);
|
||||
echld_parent_encoder_t* enc;
|
||||
echld_parent_encoder_t* enc;
|
||||
parent_decoder_t* dec;
|
||||
enc_msg_t* em;
|
||||
|
||||
|
@ -142,7 +142,7 @@ extern echld_state_t echld_get_param(int chld_id, const char* param, echld_param
|
|||
|
||||
extern echld_state_t echld_set_param(int chld_id, const char* param, const char* value, echld_param_cb_t acb, void* cb_data) {
|
||||
struct _get_param* g = g_new0(struct _get_param,1);
|
||||
echld_parent_encoder_t* enc;
|
||||
echld_parent_encoder_t* enc;
|
||||
parent_decoder_t* dec;
|
||||
enc_msg_t* em;
|
||||
|
||||
|
@ -200,7 +200,7 @@ static gboolean closed(echld_msg_type_t type, GByteArray* ba, void* data) {
|
|||
return TRUE;
|
||||
|
||||
}
|
||||
|
||||
|
||||
echld_state_t echld_close(int child_id, echld_close_cb_t pcb, void* cb_data) {
|
||||
close_t* c = g_new0(close_t,1);
|
||||
c->cb = pcb;
|
||||
|
|
|
@ -98,7 +98,7 @@ static char* psadd_cmd(char** params _U_, char** err) {
|
|||
echld_new_child_params_add_params(paramsets[ps_id], params[2], params[3], NULL);
|
||||
|
||||
return g_strdup_printf("PSAdd ps_id=%d %s='%s'", ps_id, params[2], params[3]);
|
||||
}
|
||||
}
|
||||
|
||||
static char* psmerge_cmd(char** params, char** err) {
|
||||
int ps1_id = (int) strtol(params[1], NULL, 10);
|
||||
|
@ -352,12 +352,12 @@ static int invoke_cmd(FILE* in_fp) {
|
|||
fprintf(stdout, "%s\n", str);
|
||||
g_free(str);
|
||||
}
|
||||
|
||||
|
||||
g_strfreev(params);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fprintf(stdout, "Error: no such command %s\n", cmd_line);
|
||||
return TRUE;
|
||||
} else {
|
||||
|
@ -380,7 +380,7 @@ int main(int argc _U_, char** argv _U_) {
|
|||
struct timeval tv;
|
||||
int tot_cycles = 0;
|
||||
echld_init_t init = {ECHLD_ENCODING_JSON,argv[0],main,NULL,NULL,NULL,NULL};
|
||||
|
||||
|
||||
|
||||
tv.tv_sec = 5;
|
||||
tv.tv_usec = 0;
|
||||
|
|
|
@ -302,10 +302,10 @@ static hashether_t *add_eth_name(const guint8 *addr, const gchar *name);
|
|||
static void add_serv_port_cb(const guint32 port);
|
||||
|
||||
|
||||
/* http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx#existing
|
||||
/* http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx#existing
|
||||
* One-at-a-Time hash
|
||||
*/
|
||||
static guint32
|
||||
static guint32
|
||||
ipv6_oat_hash(gconstpointer key)
|
||||
{
|
||||
int len = 16;
|
||||
|
|
|
@ -74,7 +74,7 @@ typedef struct serv_port {
|
|||
} serv_port_t;
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
#define DUMMY_ADDRESS_ENTRY 1<<0
|
||||
#define TRIED_RESOLVE_ADDRESS 1<<1
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* app_mem_usage.c
|
||||
*
|
||||
* $Id$
|
||||
|
@ -161,7 +161,7 @@ static const ws_mem_usage_t total_usage = { "Total", get_total_mem_used_by_app,
|
|||
static const ws_mem_usage_t rss_usage = { "RSS", get_rss_mem_used_by_app, NULL };
|
||||
#endif
|
||||
|
||||
static const ws_mem_usage_t *memory_components[MAX_COMPONENTS] = {
|
||||
static const ws_mem_usage_t *memory_components[MAX_COMPONENTS] = {
|
||||
#ifdef get_total_mem_used_by_app
|
||||
&total_usage,
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* app_mem_usage.h
|
||||
*
|
||||
* $Id$
|
||||
|
|
|
@ -12,12 +12,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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
|
|
@ -176,7 +176,7 @@ void rose_ctx_clean_data(rose_ctx_t *rctx) {
|
|||
asn1_ctx_t *get_asn1_ctx(void *ptr) {
|
||||
asn1_ctx_t *actx = (asn1_ctx_t*)ptr;
|
||||
|
||||
if (!asn1_ctx_check_signature(actx))
|
||||
if (!asn1_ctx_check_signature(actx))
|
||||
actx = NULL;
|
||||
|
||||
return actx;
|
||||
|
@ -186,13 +186,13 @@ rose_ctx_t *get_rose_ctx(void *ptr) {
|
|||
rose_ctx_t *rctx = (rose_ctx_t*)ptr;
|
||||
asn1_ctx_t *actx = (asn1_ctx_t*)ptr;
|
||||
|
||||
if (!asn1_ctx_check_signature(actx))
|
||||
if (!asn1_ctx_check_signature(actx))
|
||||
actx = NULL;
|
||||
|
||||
if (actx)
|
||||
rctx = actx->rose_ctx;
|
||||
|
||||
if (!rose_ctx_check_signature(rctx))
|
||||
if (!rose_ctx_check_signature(rctx))
|
||||
rctx = NULL;
|
||||
|
||||
return rctx;
|
||||
|
|
36
epan/asn1.h
36
epan/asn1.h
|
@ -92,11 +92,11 @@ typedef struct _asn1_ctx_t {
|
|||
tvbuff_t *data_value_descriptor;
|
||||
const char *direct_reference;
|
||||
gint32 indirect_reference;
|
||||
gint encoding;
|
||||
/*
|
||||
0 : single-ASN1-type,
|
||||
1 : octet-aligned,
|
||||
2 : arbitrary
|
||||
gint encoding;
|
||||
/*
|
||||
0 : single-ASN1-type,
|
||||
1 : octet-aligned,
|
||||
2 : arbitrary
|
||||
*/
|
||||
tvbuff_t *single_asn1_type;
|
||||
tvbuff_t *octet_aligned;
|
||||
|
@ -120,9 +120,9 @@ typedef struct _asn1_ctx_t {
|
|||
gboolean data_value_descr_present;
|
||||
tvbuff_t *data_value_descriptor;
|
||||
gint identification;
|
||||
/*
|
||||
0 : syntaxes,
|
||||
1 : syntax,
|
||||
/*
|
||||
0 : syntaxes,
|
||||
1 : syntax,
|
||||
2 : presentation-context-id,
|
||||
3 : context-negotiation,
|
||||
4 : transfer-syntax,
|
||||
|
@ -149,11 +149,11 @@ typedef struct _asn1_ctx_t {
|
|||
typedef struct _rose_ctx_t {
|
||||
guint32 signature;
|
||||
dissector_table_t arg_global_dissector_table;
|
||||
dissector_table_t arg_local_dissector_table;
|
||||
dissector_table_t arg_local_dissector_table;
|
||||
dissector_table_t res_global_dissector_table;
|
||||
dissector_table_t res_local_dissector_table;
|
||||
dissector_table_t res_local_dissector_table;
|
||||
dissector_table_t err_global_dissector_table;
|
||||
dissector_table_t err_local_dissector_table;
|
||||
dissector_table_t err_local_dissector_table;
|
||||
/* filling in description into tree, info column, any buffer */
|
||||
int apdu_depth;
|
||||
gboolean fillin_info;
|
||||
|
@ -161,17 +161,17 @@ typedef struct _rose_ctx_t {
|
|||
gsize fillin_buf_size;
|
||||
struct { /* "dynamic" data */
|
||||
gint pdu;
|
||||
/*
|
||||
1 : invoke,
|
||||
2 : returnResult,
|
||||
/*
|
||||
1 : invoke,
|
||||
2 : returnResult,
|
||||
3 : returnError,
|
||||
4 : reject
|
||||
*/
|
||||
gint code;
|
||||
/*
|
||||
gint code;
|
||||
/*
|
||||
-1 : none (optional in ReturnResult)
|
||||
0 : local,
|
||||
1 : global
|
||||
0 : local,
|
||||
1 : global
|
||||
*/
|
||||
gint32 code_local;
|
||||
const char *code_global;
|
||||
|
|
|
@ -180,7 +180,7 @@ conversation_create_from_template(conversation_t *conversation, const address *a
|
|||
* Compute the hash value for two given address/port pairs if the match
|
||||
* is to be exact.
|
||||
*/
|
||||
/* http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx#existing
|
||||
/* http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx#existing
|
||||
* One-at-a-Time hash
|
||||
*/
|
||||
static guint
|
||||
|
@ -691,7 +691,7 @@ conversation_new(const guint32 setup_frame, const address *addr1, const address
|
|||
new_key->port1 = port1;
|
||||
new_key->port2 = port2;
|
||||
|
||||
conversation = se_new(conversation_t);
|
||||
conversation = se_new(conversation_t);
|
||||
memset(conversation, 0, sizeof(conversation_t));
|
||||
|
||||
conversation->index = new_index;
|
||||
|
|
|
@ -99,7 +99,7 @@ guint16 crc16_plain_tvb_offset(tvbuff_t *tvb, guint offset, guint len)
|
|||
buf = tvb_get_ptr(tvb, offset, len);
|
||||
|
||||
crc = crc16_plain_update(crc, buf, len);
|
||||
|
||||
|
||||
return crc16_plain_finalize(crc);
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ guint16 crc16_plain_tvb_offset_seed(tvbuff_t *tvb, guint offset, guint len, guin
|
|||
buf = tvb_get_ptr(tvb, offset, len);
|
||||
|
||||
crc = crc16_plain_update(crc, buf, len);
|
||||
|
||||
|
||||
return crc16_plain_finalize(crc);
|
||||
}
|
||||
|
||||
|
|
|
@ -108,12 +108,12 @@ WS_DLL_PUBLIC guint16 crc16_plain_tvb_offset_seed(tvbuff_t *tvb, guint offset, g
|
|||
/** Compute CRC16 checksum of a tv buffer using the parameters
|
||||
* Width = 16 bits
|
||||
* Poly = 0x9949
|
||||
* Reflection = true
|
||||
* Algorithm = table-driven
|
||||
* Reflection = true
|
||||
* Algorithm = table-driven
|
||||
@param tvb The tv buffer containing the data.
|
||||
@param offset The offset into the tv buffer.
|
||||
@param len The number of bytes to include in the computation.
|
||||
@param seed The seed to use.
|
||||
@param seed The seed to use.
|
||||
@return The CRC16 checksum. */
|
||||
WS_DLL_PUBLIC guint16 crc16_0x9949_tvb_offset_seed(tvbuff_t *tvb, guint offset, guint len, guint16 seed);
|
||||
|
||||
|
|
|
@ -103,14 +103,14 @@ WS_DLL_PUBLIC guint32 crc32_mpeg2_tvb_offset_seed(tvbuff_t *tvb, guint offset,
|
|||
/** Compute CRC32 checksum of a tv buffer using the parameters
|
||||
* Width = 32 bits
|
||||
* Poly = 0x0AA725CF
|
||||
* Reflection = true
|
||||
* Algorithm = table-driven
|
||||
* Reflection = true
|
||||
* Algorithm = table-driven
|
||||
@param tvb The tv buffer containing the data.
|
||||
@param offset The offset into the tv buffer.
|
||||
@param len The number of bytes to include in the computation.
|
||||
@param seed The seed to use.
|
||||
@param seed The seed to use.
|
||||
@return The CRC32 checksum. */
|
||||
WS_DLL_PUBLIC guint32 crc32_0x0AA725CF_tvb_offset_seed(tvbuff_t *tvb,
|
||||
WS_DLL_PUBLIC guint32 crc32_0x0AA725CF_tvb_offset_seed(tvbuff_t *tvb,
|
||||
guint offset, guint len, guint32 seed);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -126,7 +126,7 @@ typedef struct _AIRPDCAP_SEC_ASSOCIATION_ID {
|
|||
} AIRPDCAP_SEC_ASSOCIATION_ID, *PAIRPDCAP_SEC_ASSOCIATION_ID;
|
||||
|
||||
typedef struct _AIRPDCAP_SEC_ASSOCIATION {
|
||||
/* This is for reassociations. A linked list of old security
|
||||
/* This is for reassociations. A linked list of old security
|
||||
* associations is kept. GCS
|
||||
*/
|
||||
struct _AIRPDCAP_SEC_ASSOCIATION* next;
|
||||
|
|
|
@ -211,7 +211,7 @@ typedef struct _AIRPDCAP_KEYS_COLLECTION {
|
|||
* - 01020304... (WPA + 256-bit raw key)
|
||||
* @param key_type [IN] Type of key used for string. Possibilities include:
|
||||
* - AIRPDCAP_KEY_TYPE_WEP (40/64-bit and 104/128-bit WEP)
|
||||
* - AIRPDCAP_KEY_TYPE_WPA_PWD (WPA + plaintext password + "wildcard" SSID or
|
||||
* - AIRPDCAP_KEY_TYPE_WPA_PWD (WPA + plaintext password + "wildcard" SSID or
|
||||
* WPA + plaintext password + specific SSID)
|
||||
* - AIRPDCAP_KEY_TYPE_WPA_PSK (WPA + 256-bit raw key)
|
||||
* @return A pointer to a freshly-g_malloc()ed decryption_key_t struct on
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/** @file
|
||||
/** @file
|
||||
*/
|
||||
|
||||
#define MAX_DECODE_AS_PROMPT_LEN 200
|
||||
|
|
|
@ -5,17 +5,17 @@
|
|||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* $Id$
|
||||
*
|
||||
* Wireshark - Network traffic analyzer
|
||||
*
|
||||
*
|
||||
* Copyright 2006 Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
@ -62,7 +62,7 @@ string_walk(GList* arg1list, GList **retval, gchar(*conv_func)(gchar))
|
|||
|
||||
arg1 = arg1list;
|
||||
while (arg1) {
|
||||
arg_fvalue = (fvalue_t *)arg1->data;
|
||||
arg_fvalue = (fvalue_t *)arg1->data;
|
||||
switch (fvalue_type_ftenum(arg_fvalue)) {
|
||||
case FT_STRING:
|
||||
case FT_STRINGZ:
|
||||
|
@ -82,7 +82,7 @@ string_walk(GList* arg1list, GList **retval, gchar(*conv_func)(gchar))
|
|||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
arg1 = arg1->next;
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ df_func_len(GList* arg1list, GList *arg2junk _U_, GList **retval)
|
|||
|
||||
arg1 = arg1list;
|
||||
while (arg1) {
|
||||
arg_fvalue = (fvalue_t *)arg1->data;
|
||||
arg_fvalue = (fvalue_t *)arg1->data;
|
||||
switch (fvalue_type_ftenum(arg_fvalue)) {
|
||||
case FT_STRING:
|
||||
case FT_STRINGZ:
|
||||
|
@ -127,7 +127,7 @@ df_func_len(GList* arg1list, GList *arg2junk _U_, GList **retval)
|
|||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
arg1 = arg1->next;
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,7 @@ df_func_size(GList* arg1list, GList *arg2junk _U_, GList **retval)
|
|||
|
||||
arg1 = arg1list;
|
||||
while (arg1) {
|
||||
arg_fvalue = (fvalue_t *)arg1->data;
|
||||
arg_fvalue = (fvalue_t *)arg1->data;
|
||||
|
||||
ft_len = fvalue_new(FT_UINT32);
|
||||
fvalue_set_uinteger(ft_len, fvalue_length(arg_fvalue));
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* $Id$
|
||||
*
|
||||
* Wireshark - Network traffic analyzer
|
||||
*
|
||||
*
|
||||
* Copyright 2006 Gilbert Ramirez <gram@alumni.rice.edu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
|
|
|
@ -99,7 +99,7 @@ dfvm_dump(FILE *f, dfilter_t *df)
|
|||
char *value_str;
|
||||
GSList *range_list;
|
||||
drange_node *range_item;
|
||||
|
||||
|
||||
/* First dump the constant initializations */
|
||||
fprintf(f, "Constants:\n");
|
||||
length = df->consts->len;
|
||||
|
|
|
@ -48,7 +48,7 @@ drange_node_dup(drange_node *org)
|
|||
|
||||
if (!org)
|
||||
return NULL;
|
||||
|
||||
|
||||
new_range_node = g_new(drange_node,1);
|
||||
new_range_node->start_offset = org->start_offset;
|
||||
new_range_node->length = org->length;
|
||||
|
|
|
@ -5,17 +5,17 @@
|
|||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/** @file
|
||||
/** @file
|
||||
*/
|
||||
|
||||
/** callback function definition: is a filter available for this packet? */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* dtd.h
|
||||
*
|
||||
* XML dissector for Wireshark
|
||||
* XML dissector for Wireshark
|
||||
* DTD import declarations
|
||||
*
|
||||
* Copyright 2005, Luis E. Garcia Ontanon <luis@ontanon.org>
|
||||
|
@ -16,12 +16,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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* dtd_parse.h
|
||||
* an XML dissector for Wireshark
|
||||
* an XML dissector for Wireshark
|
||||
* header file to declare functions defined in lexer and used in parser,
|
||||
* or vice versa
|
||||
*
|
||||
|
@ -15,12 +15,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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
@ -29,5 +29,5 @@
|
|||
extern void DtdParse(void*,int,dtd_token_data_t*,dtd_build_data_t*);
|
||||
extern void *DtdParseAlloc(void *(*)(gsize));
|
||||
extern void DtdParseFree( void*, void(*)(void*) );
|
||||
extern void DtdParseTrace(FILE *TraceFILE, char *zTracePrompt);
|
||||
extern void DtdParseTrace(FILE *TraceFILE, char *zTracePrompt);
|
||||
extern int Dtd_Parse_lex(void);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* ex-opt.c
|
||||
*
|
||||
*
|
||||
* Extension command line options
|
||||
*
|
||||
* (c) 2006, Luis E. Garcia Ontanon <luis@ontanon.org>
|
||||
|
@ -23,7 +23,7 @@
|
|||
*
|
||||
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -35,15 +35,15 @@ static GHashTable* ex_opts = NULL;
|
|||
|
||||
gboolean ex_opt_add(const gchar* optarg) {
|
||||
gchar** splitted;
|
||||
|
||||
if (!ex_opts)
|
||||
|
||||
if (!ex_opts)
|
||||
ex_opts = g_hash_table_new(g_str_hash,g_str_equal);
|
||||
|
||||
|
||||
splitted = g_strsplit(optarg,":",2);
|
||||
|
||||
|
||||
if (splitted[0] && splitted[1]) {
|
||||
GPtrArray* this_opts = (GPtrArray *)g_hash_table_lookup(ex_opts,splitted[0]);
|
||||
|
||||
|
||||
if (this_opts) {
|
||||
g_ptr_array_add(this_opts,splitted[1]);
|
||||
g_free(splitted[0]);
|
||||
|
@ -52,9 +52,9 @@ gboolean ex_opt_add(const gchar* optarg) {
|
|||
g_ptr_array_add(this_opts,splitted[1]);
|
||||
g_hash_table_insert(ex_opts,splitted[0],this_opts);
|
||||
}
|
||||
|
||||
|
||||
g_free(splitted);
|
||||
|
||||
|
||||
return TRUE;
|
||||
} else {
|
||||
g_strfreev(splitted);
|
||||
|
@ -64,12 +64,12 @@ gboolean ex_opt_add(const gchar* optarg) {
|
|||
|
||||
gint ex_opt_count(const gchar* key) {
|
||||
GPtrArray* this_opts;
|
||||
|
||||
|
||||
if (! ex_opts)
|
||||
return 0;
|
||||
|
||||
|
||||
this_opts = (GPtrArray *)g_hash_table_lookup(ex_opts,key);
|
||||
|
||||
|
||||
if (this_opts) {
|
||||
return this_opts->len;
|
||||
} else {
|
||||
|
@ -79,12 +79,12 @@ gint ex_opt_count(const gchar* key) {
|
|||
|
||||
const gchar* ex_opt_get_nth(const gchar* key, guint index) {
|
||||
GPtrArray* this_opts;
|
||||
|
||||
|
||||
if (! ex_opts)
|
||||
return 0;
|
||||
|
||||
|
||||
this_opts = (GPtrArray *)g_hash_table_lookup(ex_opts,key);
|
||||
|
||||
|
||||
if (this_opts) {
|
||||
if (this_opts->len > index) {
|
||||
return (const gchar *)g_ptr_array_index(this_opts,index);
|
||||
|
@ -95,21 +95,21 @@ const gchar* ex_opt_get_nth(const gchar* key, guint index) {
|
|||
} else {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
extern const gchar* ex_opt_get_next(const gchar* key) {
|
||||
GPtrArray* this_opts;
|
||||
|
||||
|
||||
if (! ex_opts)
|
||||
return 0;
|
||||
|
||||
|
||||
this_opts = (GPtrArray *)g_hash_table_lookup(ex_opts,key);
|
||||
|
||||
|
||||
if (this_opts) {
|
||||
if (this_opts->len)
|
||||
return (const gchar *)g_ptr_array_remove_index(this_opts,0);
|
||||
else
|
||||
else
|
||||
return NULL;
|
||||
} else {
|
||||
return NULL;
|
||||
|
|
|
@ -324,7 +324,7 @@ expert_set_info_vformat(packet_info *pinfo, proto_item *pi, int group, int sever
|
|||
expert_set_item_flags(pi, group, severity);
|
||||
}
|
||||
|
||||
if ((pi == NULL) || (PITEM_FINFO(pi) == NULL) ||
|
||||
if ((pi == NULL) || (PITEM_FINFO(pi) == NULL) ||
|
||||
((guint)severity >= FI_GET_FLAG(PITEM_FINFO(pi), PI_SEVERITY_MASK))) {
|
||||
col_add_str(pinfo->cinfo, COL_EXPERT, val_to_str(severity, expert_severity_vals, "Unknown (%u)"));
|
||||
}
|
||||
|
|
|
@ -143,7 +143,7 @@ expert_add_info_format(packet_info *pinfo, proto_item *pi, expert_field *eiindex
|
|||
|
||||
/** Add an expert info associated with some byte data
|
||||
Add an expert info tree to a protocol item using registered expert info item.
|
||||
This function is intended to replace places where
|
||||
This function is intended to replace places where
|
||||
proto_tree_add_text or proto_tree_add_none_format + expert_add_info
|
||||
would be used.
|
||||
@param tree Current protocol item (or NULL)
|
||||
|
@ -162,7 +162,7 @@ proto_tree_add_expert(proto_tree *tree, packet_info *pinfo, expert_field* eiinde
|
|||
/** Add an expert info associated with some byte data
|
||||
Add an expert info tree to a protocol item, using registered expert info item,
|
||||
but with a formatted message.
|
||||
This function is intended to replace places where
|
||||
This function is intended to replace places where
|
||||
proto_tree_add_text or proto_tree_add_none_format + expert_add_info_format
|
||||
would be used.
|
||||
@param tree Current protocol item (or NULL)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* exported_pdu.c
|
||||
* exported_pdu helper functions
|
||||
* Copyright 2013, Anders Broman <anders-broman@ericsson.com>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/*
|
||||
* exported_pdu.h
|
||||
* Routines for exported_pdu dissection
|
||||
* Copyright 2013, Anders Broman <anders-broman@ericsson.com>
|
||||
|
@ -72,10 +72,10 @@
|
|||
#define EXP_PDU_TAG_END_OF_OPT 0 /**< End-of-options Tag. */
|
||||
/* 1 - 9 reserved */
|
||||
#define EXP_PDU_TAG_OPTIONS_LENGTH 10 /**< Total length of the options excluding this TLV */
|
||||
#define EXP_PDU_TAG_LINKTYPE 11 /**< The value part is the linktype value defined by tcpdump
|
||||
#define EXP_PDU_TAG_LINKTYPE 11 /**< The value part is the linktype value defined by tcpdump
|
||||
* http://www.tcpdump.org/linktypes.html
|
||||
*/
|
||||
#define EXP_PDU_TAG_PROTO_NAME 12 /**< The value part should be an ASCII non NULL terminated string
|
||||
*/
|
||||
#define EXP_PDU_TAG_PROTO_NAME 12 /**< The value part should be an ASCII non NULL terminated string
|
||||
* of the short protocol name used by Wireshark e.g "sip"
|
||||
* Will be used to call the next dissector.
|
||||
*/
|
||||
|
@ -140,7 +140,7 @@ typedef struct _exp_pdu_data_t {
|
|||
*
|
||||
* The tags in the tag buffer SHOULD be added in numerical order.
|
||||
*/
|
||||
WS_DLL_PUBLIC exp_pdu_data_t *load_export_pdu_tags(packet_info *pinfo,
|
||||
WS_DLL_PUBLIC exp_pdu_data_t *load_export_pdu_tags(packet_info *pinfo,
|
||||
const char* proto_name, int wtap_encap, guint32 wanted_exp_tags);
|
||||
|
||||
#endif /* EXPORTED_PDU_H */
|
||||
|
|
|
@ -108,7 +108,7 @@ build_follow_conv_filter( packet_info *pi ) {
|
|||
} else if (!strcmp(proto_name, "udp")) {
|
||||
is_udp = TRUE;
|
||||
}
|
||||
|
||||
|
||||
protos = wmem_list_frame_next(protos);
|
||||
}
|
||||
|
||||
|
@ -249,8 +249,8 @@ static guint src_port[2] = { 0, 0 };
|
|||
|
||||
void
|
||||
reassemble_tcp( guint32 tcp_stream, guint32 sequence, guint32 acknowledgement,
|
||||
guint32 length, const char* data, guint32 data_length,
|
||||
int synflag, address *net_src, address *net_dst,
|
||||
guint32 length, const char* data, guint32 data_length,
|
||||
int synflag, address *net_src, address *net_dst,
|
||||
guint srcport, guint dstport, guint32 packet_num) {
|
||||
guint8 srcx[MAX_IPADDR_LEN], dstx[MAX_IPADDR_LEN];
|
||||
int src_index, j, first = 0, len;
|
||||
|
@ -337,7 +337,7 @@ reassemble_tcp( guint32 tcp_stream, guint32 sequence, guint32 acknowledgement,
|
|||
|
||||
/* Before adding data for this flow to the data_out_file, check whether
|
||||
* this frame acks fragments that were already seen. This happens when
|
||||
* frames are not in the capture file, but were actually seen by the
|
||||
* frames are not in the capture file, but were actually seen by the
|
||||
* receiving host (Fixes bug 592).
|
||||
*/
|
||||
if( frags[1-src_index] ) {
|
||||
|
@ -453,7 +453,7 @@ check_fragments( int idx, tcp_stream_chunk *sc, guint32 acknowledged ) {
|
|||
guint32 new_pos;
|
||||
|
||||
/* this one has more than we have seen. let's get the
|
||||
payload that we have not seen. This happens when
|
||||
payload that we have not seen. This happens when
|
||||
part of this frame has been retransmitted */
|
||||
|
||||
new_pos = seq[idx] - current->seq;
|
||||
|
@ -464,10 +464,10 @@ check_fragments( int idx, tcp_stream_chunk *sc, guint32 acknowledged ) {
|
|||
}
|
||||
|
||||
seq[idx] += (current->len - new_pos);
|
||||
}
|
||||
}
|
||||
|
||||
/* Remove the fragment from the list as the "new" part of it
|
||||
* has been processed or its data has been seen already in
|
||||
* has been processed or its data has been seen already in
|
||||
* another packet. */
|
||||
if( prev ) {
|
||||
prev->next = current->next;
|
||||
|
@ -511,7 +511,7 @@ check_fragments( int idx, tcp_stream_chunk *sc, guint32 acknowledged ) {
|
|||
seq[idx] = lowest_seq;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -551,7 +551,7 @@ write_packet_data( int idx, tcp_stream_chunk *sc, const char *data )
|
|||
|
||||
ret = fwrite( sc, 1, sizeof(tcp_stream_chunk), data_out_file );
|
||||
DISSECTOR_ASSERT(sizeof(tcp_stream_chunk) == ret);
|
||||
|
||||
|
||||
ret = fwrite( data, 1, sc->dlen, data_out_file );
|
||||
DISSECTOR_ASSERT(sc->dlen == ret);
|
||||
|
||||
|
|
|
@ -62,17 +62,17 @@ get_guid(const char *s, e_guid_t *guid)
|
|||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
p = s;
|
||||
strncpy(digits, p, 8);
|
||||
strncpy(digits, p, 8);
|
||||
digits[8] = '\0';
|
||||
guid->data1 = (guint32)strtoul(digits, NULL, 16);
|
||||
p += 9;
|
||||
strncpy(digits, p, 4);
|
||||
strncpy(digits, p, 4);
|
||||
digits[4] = '\0';
|
||||
guid->data2 = (guint16)strtoul(digits, NULL, 16);
|
||||
p += 5;
|
||||
strncpy(digits, p, 4);
|
||||
strncpy(digits, p, 4);
|
||||
digits[4] = '\0';
|
||||
guid->data3 = (guint16)strtoul(digits, NULL, 16);
|
||||
p += 5;
|
||||
|
|
|
@ -99,7 +99,7 @@ value_get(fvalue_t *fv)
|
|||
return fv->value.ipv6.addr.bytes;
|
||||
}
|
||||
|
||||
static const guint8 bitmasks[9] =
|
||||
static const guint8 bitmasks[9] =
|
||||
{ 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff };
|
||||
|
||||
static gint
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
*
|
||||
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -57,7 +57,7 @@ void funnel_register_menu(const char *name,
|
|||
m->callback_data = callback_data;
|
||||
m->retap = retap;
|
||||
m->next = NULL;
|
||||
|
||||
|
||||
if (!menus) {
|
||||
menus = m;
|
||||
} else {
|
||||
|
|
|
@ -9,17 +9,17 @@
|
|||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.org>
|
||||
* Copyright 2007 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
|
|
@ -148,7 +148,7 @@ typedef enum _gcp_wildcard_t {
|
|||
|
||||
typedef struct _gcp_term_t {
|
||||
const gchar* str;
|
||||
|
||||
|
||||
const guint8* buffer;
|
||||
guint len;
|
||||
|
||||
|
@ -157,7 +157,7 @@ typedef struct _gcp_term_t {
|
|||
gchar* nsap;
|
||||
|
||||
gcp_msg_t* start;
|
||||
|
||||
|
||||
} gcp_term_t;
|
||||
|
||||
typedef struct _gcp_terms_t {
|
||||
|
|
10
epan/golay.c
10
epan/golay.c
|
@ -169,7 +169,7 @@ gint32 golay_errors(guint32 codeword)
|
|||
|
||||
syndrome = received_parity ^ (golay_coding(received_data));
|
||||
w = weight12(syndrome);
|
||||
|
||||
|
||||
/*
|
||||
* The properties of the golay code are such that the Hamming distance (ie,
|
||||
* the minimum distance between codewords) is 8; that means that one bit of
|
||||
|
@ -184,14 +184,14 @@ gint32 golay_errors(guint32 codeword)
|
|||
if( w <= 3 ) {
|
||||
return ((gint32) syndrome)<<12;
|
||||
}
|
||||
|
||||
|
||||
/* the next thing to try is one error in the data bits.
|
||||
* we try each bit in turn and see if an error in that bit would have given
|
||||
* us anything like the parity bits we got. At this point, we tolerate two
|
||||
* errors in the parity bits, but three or more errors would give a total
|
||||
* error weight of 4 or more, which means it's actually uncorrectable or
|
||||
* closer to another codeword. */
|
||||
|
||||
|
||||
for( i = 0; i<12; i++ ) {
|
||||
guint error = 1<<i;
|
||||
guint coding_error = golay_encode_matrix[i];
|
||||
|
@ -237,7 +237,7 @@ gint32 golay_errors(guint32 codeword)
|
|||
/* uncorrectable error */
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* decode a received codeword. Up to 3 errors are corrected for; 4
|
||||
|
@ -249,7 +249,7 @@ gint golay_decode(guint32 w)
|
|||
guint data = (guint)w & 0xfff;
|
||||
gint32 errors = golay_errors(w);
|
||||
guint data_errors;
|
||||
|
||||
|
||||
if( errors == -1 )
|
||||
return -1;
|
||||
data_errors = (guint)errors & 0xfff;
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
/* The buffers returned by these functions are all allocated with a
|
||||
* packet lifetime or are static buffers and does not have have to be freed.
|
||||
/* The buffers returned by these functions are all allocated with a
|
||||
* packet lifetime or are static buffers and does not have have to be freed.
|
||||
* However, take into account that when the packet dissection
|
||||
* completes, these buffers will be automatically reclaimed/freed.
|
||||
* If you need the buffer to remain for a longer scope than packet lifetime
|
||||
|
|
|
@ -109,7 +109,7 @@ static void prepopulate_oids(void) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static oid_info_t* add_oid(const char* name, oid_kind_t kind, const oid_value_type_t* type, oid_key_t* key, guint oid_len, guint32 *subids) {
|
||||
guint i = 0;
|
||||
|
@ -1085,7 +1085,7 @@ guint oid_subid2encoded(guint subids_len, guint32* subids, guint8** bytes_p) {
|
|||
} else {
|
||||
bytelen += 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*bytes_p = b = (guint8 *)ep_alloc(bytelen);
|
||||
|
||||
|
@ -1107,7 +1107,7 @@ guint oid_subid2encoded(guint subids_len, guint32* subids, guint8** bytes_p) {
|
|||
case 2: *(b++) = ((subid & 0x00003F80) >> 7) | 0x80;
|
||||
case 1: *(b++) = subid & 0x0000007F ; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return bytelen;
|
||||
}
|
||||
|
|
|
@ -452,7 +452,7 @@ dissect_packet(epan_dissect_t *edt, struct wtap_pkthdr *phdr,
|
|||
frame_delta_abs_time(edt->session, fd, fd->frame_ref_num, &edt->pi.rel_ts);
|
||||
|
||||
/* pkt comment use first user, later from phdr */
|
||||
if (fd->flags.has_user_comment)
|
||||
if (fd->flags.has_user_comment)
|
||||
edt->pi.pkt_comment = epan_get_user_comment(edt->session, fd);
|
||||
else if (fd->flags.has_phdr_comment)
|
||||
edt->pi.pkt_comment = phdr->opt_comment;
|
||||
|
@ -517,7 +517,7 @@ dissect_file(epan_dissect_t *edt, struct wtap_pkthdr *phdr,
|
|||
frame_delta_abs_time(edt->session, fd, fd->frame_ref_num, &edt->pi.rel_ts);
|
||||
|
||||
/* pkt comment use first user, later from phdr */
|
||||
if (fd->flags.has_user_comment)
|
||||
if (fd->flags.has_user_comment)
|
||||
edt->pi.pkt_comment = epan_get_user_comment(edt->session, fd);
|
||||
else if (fd->flags.has_phdr_comment)
|
||||
edt->pi.pkt_comment = phdr->opt_comment;
|
||||
|
|
|
@ -1115,7 +1115,7 @@ prefs_register_uat_preference_qt(module_t *module, const char *name,
|
|||
pref_t* preference = register_preference(module, name, title, description, PREF_UAT);
|
||||
|
||||
preference->varp.uat = uat;
|
||||
|
||||
|
||||
preference->gui = GUI_QT;
|
||||
}
|
||||
|
||||
|
@ -2529,7 +2529,7 @@ prefs_register_modules(void)
|
|||
"measured. Longer window relative to burst rate resolution increases "
|
||||
"processing overhead. Will be truncated to a multiple of burst resolution.",
|
||||
10,&prefs.st_burst_windowlen);
|
||||
|
||||
|
||||
prefs_register_enum_preference(stats_module, "st_sort_defcolflag",
|
||||
"Default sort column for stats_tree stats",
|
||||
"Sets the default column by which stats based on the stats_tree "
|
||||
|
@ -2548,7 +2548,7 @@ prefs_register_modules(void)
|
|||
"system will be sorted taking case into account. Else the case of the name "
|
||||
"will be ignored.",
|
||||
&prefs.st_sort_casesensitve);
|
||||
|
||||
|
||||
prefs_register_bool_preference(stats_module, "st_sort_rng_nameonly",
|
||||
"Always sort 'range' nodes by name",
|
||||
"When selected, the stats_tree nodes representing a range of values "
|
||||
|
@ -2564,7 +2564,7 @@ prefs_register_modules(void)
|
|||
"the sort direction of the tree. Only effective if \"Always sort "
|
||||
"'range' nodes by name\" is also selected.",
|
||||
&prefs.st_sort_rng_fixorder);
|
||||
|
||||
|
||||
prefs_register_bool_preference(stats_module, "st_sort_showfullname",
|
||||
"Display the full stats_tree plug-in name",
|
||||
"When selected, the full name (including menu path) of the stats_tree "
|
||||
|
|
12
epan/prefs.h
12
epan/prefs.h
|
@ -128,7 +128,7 @@ typedef enum {
|
|||
pref_current
|
||||
} pref_source_t;
|
||||
|
||||
/*
|
||||
/*
|
||||
* Update channel.
|
||||
*/
|
||||
typedef enum {
|
||||
|
@ -209,7 +209,7 @@ typedef struct _e_prefs {
|
|||
software_update_channel_e gui_update_channel;
|
||||
gint gui_update_interval;
|
||||
gchar *saved_at_version;
|
||||
gboolean unknown_prefs; /* unknown or obsolete pref(s) */
|
||||
gboolean unknown_prefs; /* unknown or obsolete pref(s) */
|
||||
gboolean unknown_colorfilters; /* unknown or obsolete color filter(s) */
|
||||
guint gui_qt_language; /* Qt Translation language selection */
|
||||
gboolean gui_packet_editor; /* Enable Packet Editor */
|
||||
|
@ -471,8 +471,8 @@ WS_DLL_PUBLIC void prefs_register_uat_preference_qt(module_t *module,
|
|||
|
||||
/*
|
||||
* Register a color preference. Currently does not have any "GUI Dialog" support
|
||||
* so the color data needs to be managed independently. Currently used by the
|
||||
* "GUI preferences" to aid in reading/writing the preferences file, but the
|
||||
* so the color data needs to be managed independently. Currently used by the
|
||||
* "GUI preferences" to aid in reading/writing the preferences file, but the
|
||||
* "data" is still managed by the specific "GUI preferences" dialog.
|
||||
*/
|
||||
void prefs_register_color_preference(module_t *module, const char *name,
|
||||
|
@ -480,8 +480,8 @@ void prefs_register_color_preference(module_t *module, const char *name,
|
|||
|
||||
/*
|
||||
* Register a custom preference. Currently does not have any "GUI Dialog" support
|
||||
* so data needs to be managed independently. Currently used by the
|
||||
* "GUI preferences" to aid in reading/writing the preferences file, but the
|
||||
* so data needs to be managed independently. Currently used by the
|
||||
* "GUI preferences" to aid in reading/writing the preferences file, but the
|
||||
* "data" is still managed by the specific "GUI preferences" dialog.
|
||||
*/
|
||||
void prefs_register_custom_preference(module_t *module, const char *name,
|
||||
|
|
|
@ -412,7 +412,7 @@ struct _header_field_info {
|
|||
hf.hfinfo.parent = 0; \
|
||||
hf.hfinfo.ref_type = HF_REF_TYPE_NONE; \
|
||||
hf.hfinfo.same_name_prev_id = -1; \
|
||||
hf.hfinfo.same_name_next = NULL;
|
||||
hf.hfinfo.same_name_next = NULL;
|
||||
|
||||
/** Used when registering many fields at once, using proto_register_field_array() */
|
||||
typedef struct hf_register_info {
|
||||
|
|
|
@ -108,7 +108,7 @@ range_convert_str_work(range_t **rangep, const gchar *es, guint32 max_value,
|
|||
|
||||
if ( (rangep == NULL) || (es == NULL) )
|
||||
return CVT_SYNTAX_ERROR;
|
||||
|
||||
|
||||
/* Allocate a range; this has room for one subrange. */
|
||||
range = (range_t *)g_malloc(RANGE_HDR_SIZE + sizeof (range_admin_t));
|
||||
range->nranges = 0;
|
||||
|
@ -293,7 +293,7 @@ ranges_are_equal(range_t *a, range_t *b)
|
|||
|
||||
if ( (a == NULL) || (b == NULL) )
|
||||
return FALSE;
|
||||
|
||||
|
||||
if (a->nranges != b->nranges)
|
||||
return FALSE;
|
||||
|
||||
|
@ -316,7 +316,7 @@ void
|
|||
range_foreach(range_t *range, void (*callback)(guint32 val))
|
||||
{
|
||||
guint32 i, j;
|
||||
|
||||
|
||||
if (range && callback) {
|
||||
for (i=0; i < range->nranges; i++) {
|
||||
for (j = range->ranges[i].low; j <= range->ranges[i].high; j++)
|
||||
|
@ -357,7 +357,7 @@ range_copy(range_t *src)
|
|||
|
||||
if (src == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
range_size = RANGE_HDR_SIZE + src->nranges*sizeof (range_admin_t);
|
||||
dst = (range_t *)g_malloc(range_size);
|
||||
memcpy(dst, src, range_size);
|
||||
|
|
|
@ -589,7 +589,7 @@ fragment_delete(reassembly_table *table, const packet_info *pinfo,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
fd_tvb_data=fd_head->tvb_data;
|
||||
fd_tvb_data=fd_head->tvb_data;
|
||||
/* loop over all partial fragments and free any tvbuffs */
|
||||
for(fd=fd_head->next;fd;){
|
||||
fragment_item *tmp_fd;
|
||||
|
@ -920,7 +920,7 @@ fragment_add_work(fragment_head *fd_head, tvbuff_t *tvb, const int offset,
|
|||
* or later).
|
||||
*/
|
||||
g_slice_free(fragment_item, fd);
|
||||
|
||||
|
||||
/*
|
||||
* This is an attempt to add a fragment to a
|
||||
* reassembly that had already completed.
|
||||
|
@ -1795,7 +1795,7 @@ fragment_add_seq_work(fragment_head *fd_head, tvbuff_t *tvb, const int offset,
|
|||
static fragment_head *
|
||||
fragment_add_seq_common(reassembly_table *table, tvbuff_t *tvb,
|
||||
const int offset, const packet_info *pinfo,
|
||||
const guint32 id, const void *data,
|
||||
const guint32 id, const void *data,
|
||||
guint32 frag_number, const guint32 frag_data_len,
|
||||
const gboolean more_frags, const guint32 flags,
|
||||
gpointer *orig_keyp)
|
||||
|
@ -1922,7 +1922,7 @@ fragment_add_seq_common(reassembly_table *table, tvbuff_t *tvb,
|
|||
|
||||
fragment_head *
|
||||
fragment_add_seq(reassembly_table *table, tvbuff_t *tvb, const int offset,
|
||||
const packet_info *pinfo, const guint32 id, const void *data,
|
||||
const packet_info *pinfo, const guint32 id, const void *data,
|
||||
const guint32 frag_number, const guint32 frag_data_len,
|
||||
const gboolean more_frags, const guint32 flags)
|
||||
{
|
||||
|
@ -1968,7 +1968,7 @@ fragment_add_seq(reassembly_table *table, tvbuff_t *tvb, const int offset,
|
|||
static fragment_head *
|
||||
fragment_add_seq_check_work(reassembly_table *table, tvbuff_t *tvb,
|
||||
const int offset, const packet_info *pinfo,
|
||||
const guint32 id, const void *data,
|
||||
const guint32 id, const void *data,
|
||||
const guint32 frag_number,
|
||||
const guint32 frag_data_len,
|
||||
const gboolean more_frags, const guint32 flags)
|
||||
|
@ -1987,7 +1987,7 @@ fragment_add_seq_check_work(reassembly_table *table, tvbuff_t *tvb,
|
|||
return (fragment_head *)g_hash_table_lookup(table->reassembled_table, &reass_key);
|
||||
}
|
||||
|
||||
fd_head = fragment_add_seq_common(table, tvb, offset, pinfo, id, data,
|
||||
fd_head = fragment_add_seq_common(table, tvb, offset, pinfo, id, data,
|
||||
frag_number, frag_data_len,
|
||||
more_frags,
|
||||
flags|REASSEMBLE_FLAGS_CHECK_DATA_PRESENT,
|
||||
|
@ -2062,7 +2062,7 @@ fragment_add_seq_next(reassembly_table *table, tvbuff_t *tvb, const int offset,
|
|||
|
||||
void
|
||||
fragment_start_seq_check(reassembly_table *table, const packet_info *pinfo,
|
||||
const guint32 id, const void *data,
|
||||
const guint32 id, const void *data,
|
||||
const guint32 tot_len)
|
||||
{
|
||||
fragment_head *fd_head;
|
||||
|
|
|
@ -241,7 +241,7 @@ fragment_add_check(reassembly_table *table, tvbuff_t *tvb, const int offset,
|
|||
*/
|
||||
WS_DLL_PUBLIC fragment_head *
|
||||
fragment_add_seq(reassembly_table *table, tvbuff_t *tvb, const int offset,
|
||||
const packet_info *pinfo, const guint32 id, const void *data,
|
||||
const packet_info *pinfo, const guint32 id, const void *data,
|
||||
const guint32 frag_number, const guint32 frag_data_len,
|
||||
const gboolean more_frags, const guint32 flags);
|
||||
|
||||
|
@ -275,7 +275,7 @@ fragment_add_seq_next(reassembly_table *table, tvbuff_t *tvb, const int offset,
|
|||
|
||||
WS_DLL_PUBLIC void
|
||||
fragment_start_seq_check(reassembly_table *table, const packet_info *pinfo,
|
||||
const guint32 id, const void *data,
|
||||
const guint32 id, const void *data,
|
||||
const guint32 tot_len);
|
||||
|
||||
WS_DLL_PUBLIC fragment_head *
|
||||
|
|
|
@ -99,8 +99,8 @@ static char *data;
|
|||
static tvbuff_t *tvb;
|
||||
static packet_info pinfo;
|
||||
|
||||
/* fragment_table maps from datagram ids to fragment_head
|
||||
reassembled_table maps from <packet number,datagram id> to
|
||||
/* fragment_table maps from datagram ids to fragment_head
|
||||
reassembled_table maps from <packet number,datagram id> to
|
||||
fragment_head */
|
||||
static reassembly_table test_reassembly_table;
|
||||
|
||||
|
|
|
@ -256,7 +256,7 @@ gen_ldec(void)
|
|||
a(0) + a(1) @ + a(2) @^2 + ... + a(m-1) @^(m-1)
|
||||
we consider the integer "i" whose binary representation with a(0) being LSB
|
||||
and a(m-1) MSB is (a(0),a(1),...,a(m-1)) and locate the entry
|
||||
"index_of[i]". Now, @^index_of[i] is that element whose polynomial
|
||||
"index_of[i]". Now, @^index_of[i] is that element whose polynomial
|
||||
representation is (a(0),a(1),a(2),...,a(m-1)).
|
||||
NOTE:
|
||||
The element alpha_to[2^m-1] = 0 always signifying that the
|
||||
|
@ -264,7 +264,7 @@ gen_ldec(void)
|
|||
Similarily, the element index_of[0] = A0 always signifying
|
||||
that the power of alpha which has the polynomial representation
|
||||
(0,0,...,0) is "infinity".
|
||||
|
||||
|
||||
*/
|
||||
|
||||
static void
|
||||
|
@ -404,7 +404,7 @@ encode_rs(dtype data[KK], dtype bb[NN-KK])
|
|||
* Return number of symbols corrected, or -1 if codeword is illegal
|
||||
* or uncorrectable. If eras_pos is non-null, the detected error locations
|
||||
* are written back. NOTE! This array must be at least NN-KK elements long.
|
||||
*
|
||||
*
|
||||
* First "no_eras" erasures are declared by the calling program. Then, the
|
||||
* maximum # of errors correctable is t_after_eras = floor((NN-KK-no_eras)/2).
|
||||
* If the number of channel errors is not greater than "t_after_eras" the
|
||||
|
@ -453,7 +453,7 @@ eras_dec_rs(dtype data[NN], int eras_pos[NN-KK], int no_eras)
|
|||
if(RECEIVED(j) == 0)
|
||||
continue;
|
||||
tmp = Index_of[RECEIVED(j)];
|
||||
|
||||
|
||||
/* s[i] ^= Alpha_to[modnn(tmp + (B0+i-1)*j)]; */
|
||||
for(i=1;i<=NN-KK;i++)
|
||||
s[i] ^= Alpha_to[modnn(tmp + (B0+i-1)*PRIM*j)];
|
||||
|
@ -465,7 +465,7 @@ eras_dec_rs(dtype data[NN], int eras_pos[NN-KK], int no_eras)
|
|||
/*printf("syndrome %d = %x\n",i,s[i]);*/
|
||||
s[i] = Index_of[s[i]];
|
||||
}
|
||||
|
||||
|
||||
if (!syn_error) {
|
||||
/* if syndrome is zero, data[] is a codeword and there are no
|
||||
* errors to correct. So return data[] unmodified
|
||||
|
@ -490,7 +490,7 @@ eras_dec_rs(dtype data[NN], int eras_pos[NN-KK], int no_eras)
|
|||
#if DEBUG >= 1
|
||||
/* Test code that verifies the erasure locator polynomial just constructed
|
||||
Needed only for decoder debugging. */
|
||||
|
||||
|
||||
/* find roots of the erasure location polynomial */
|
||||
for(i=1;i<=no_eras;i++)
|
||||
reg[i] = Index_of[lambda[i]];
|
||||
|
@ -524,7 +524,7 @@ eras_dec_rs(dtype data[NN], int eras_pos[NN-KK], int no_eras)
|
|||
}
|
||||
for(i=0;i<NN-KK+1;i++)
|
||||
b[i] = Index_of[lambda[i]];
|
||||
|
||||
|
||||
/*
|
||||
* Begin Berlekamp-Massey algorithm to determine error+erasure
|
||||
* locator polynomial
|
||||
|
@ -627,7 +627,7 @@ eras_dec_rs(dtype data[NN], int eras_pos[NN-KK], int no_eras)
|
|||
omega[i] = Index_of[tmp];
|
||||
}
|
||||
omega[NN-KK] = A0;
|
||||
|
||||
|
||||
/*
|
||||
* Compute error values in poly-form. num1 = omega(inv(X(l))), num2 =
|
||||
* inv(X(l))**(B0-1) and den = lambda_pr(inv(X(l))) all in poly-form
|
||||
|
@ -640,7 +640,7 @@ eras_dec_rs(dtype data[NN], int eras_pos[NN-KK], int no_eras)
|
|||
}
|
||||
num2 = Alpha_to[modnn(root[j] * (B0 - 1) + NN)];
|
||||
den = 0;
|
||||
|
||||
|
||||
/* lambda[i+1] for i even is the formal derivative lambda_pr of lambda[i] */
|
||||
for (i = min_(deg_lambda,NN-KK-1) & ~1; i >= 0; i -=2) {
|
||||
if(lambda[i+1] != A0)
|
||||
|
|
|
@ -13,12 +13,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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
@ -36,7 +36,7 @@
|
|||
#define UDVM_MEMORY_SIZE 65536
|
||||
|
||||
extern tvbuff_t* decompress_sigcomp_message(tvbuff_t *bytecode_tvb, tvbuff_t *message_tvb, packet_info *pinfo,
|
||||
proto_tree *tree, gint destination,
|
||||
proto_tree *tree, gint destination,
|
||||
gint print_flags, gint hf_id, gint header_len,
|
||||
gint byte_code_state_len, gint byte_code_id_len,
|
||||
gint udvm_start_ip);
|
||||
|
@ -44,6 +44,6 @@ extern tvbuff_t* decompress_sigcomp_message(tvbuff_t *bytecode_tvb, tvbuff_t *me
|
|||
|
||||
|
||||
/* example: extern const value_string q931_cause_location_vals[]; */
|
||||
#endif
|
||||
#endif
|
||||
/* SIGCOMP_UDVM_H */
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* sigcomp_state_hdlr.c
|
||||
* Routines making up the State handler of the Univerasl Decompressor Virtual Machine (UDVM)
|
||||
* Routines making up the State handler of the Univerasl Decompressor Virtual Machine (UDVM)
|
||||
* used for Signaling Compression (SigComp) dissection.
|
||||
* Copyright 2004, Anders Broman <anders.broman@ericsson.com>
|
||||
*
|
||||
|
@ -13,12 +13,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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
@ -34,7 +34,7 @@
|
|||
#define SIGCOMP_STATE_HDLR_H
|
||||
|
||||
extern const value_string result_code_vals[];
|
||||
extern int udvm_state_access(tvbuff_t *tvb, proto_tree *tree,guint8 *buff,guint16 p_id_start, guint16 p_id_length, guint16 state_begin, guint16 *state_length,
|
||||
extern int udvm_state_access(tvbuff_t *tvb, proto_tree *tree,guint8 *buff,guint16 p_id_start, guint16 p_id_length, guint16 state_begin, guint16 *state_length,
|
||||
guint16 *state_address, guint16 *state_instruction, gint hf_id);
|
||||
|
||||
extern void udvm_state_create(guint8 *state_buff,guint8 *state_identifier_buff,guint16 p_id_length);
|
||||
|
@ -45,5 +45,5 @@ extern void sigcomp_init_udvm(void);
|
|||
#define STATE_BUFFER_SIZE 20
|
||||
#define STATE_MIN_ACCESS_LEN 6
|
||||
|
||||
#endif
|
||||
#endif
|
||||
/* SIGCOMP_STATE_HDLR_H */
|
||||
|
|
|
@ -7,17 +7,17 @@
|
|||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
|
|
@ -811,7 +811,7 @@ stats_tree_create_range_node(stats_tree *st, const gchar *name, int parent_id, .
|
|||
return rng_root->id;
|
||||
}
|
||||
|
||||
extern int
|
||||
extern int
|
||||
stats_tree_create_range_node_string(stats_tree *st, const gchar *name,
|
||||
int parent_id, int num_str_ranges,
|
||||
gchar** str_ranges)
|
||||
|
|
|
@ -7,17 +7,17 @@
|
|||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
@ -69,7 +69,7 @@ struct _burst_bucket {
|
|||
struct _stat_node {
|
||||
gchar* name;
|
||||
int id;
|
||||
|
||||
|
||||
/** the counter it keeps */
|
||||
gint counter;
|
||||
/** total of all values submitted - for computing averages */
|
||||
|
@ -86,10 +86,10 @@ struct _stat_node {
|
|||
|
||||
/** children nodes by name */
|
||||
GHashTable *hash;
|
||||
|
||||
|
||||
/** the owner of this node */
|
||||
stats_tree *st;
|
||||
|
||||
|
||||
/** relatives */
|
||||
stat_node *parent;
|
||||
stat_node *children;
|
||||
|
@ -97,7 +97,7 @@ struct _stat_node {
|
|||
|
||||
/** used to check if value is within range */
|
||||
range_pair_t *rng;
|
||||
|
||||
|
||||
/** node presentation data */
|
||||
st_node_pres *pr;
|
||||
};
|
||||
|
@ -105,9 +105,9 @@ struct _stat_node {
|
|||
struct _stats_tree {
|
||||
/** the "class" from which it's derived */
|
||||
stats_tree_cfg *cfg;
|
||||
|
||||
|
||||
char *filter;
|
||||
|
||||
|
||||
/* times */
|
||||
double start;
|
||||
double elapsed;
|
||||
|
@ -122,16 +122,16 @@ struct _stats_tree {
|
|||
* value: parent node
|
||||
*/
|
||||
GHashTable *names;
|
||||
|
||||
|
||||
/** used for quicker lookups of parent nodes */
|
||||
GPtrArray *parents;
|
||||
|
||||
|
||||
/**
|
||||
* tree representation
|
||||
* to be defined (if needed) by the implementations
|
||||
*/
|
||||
tree_pres *pr;
|
||||
|
||||
|
||||
/** every tree in nature has one */
|
||||
stat_node root;
|
||||
};
|
||||
|
@ -141,7 +141,7 @@ struct _stats_tree_cfg {
|
|||
gchar* name;
|
||||
gchar* tapname;
|
||||
register_stat_group_t stat_group;
|
||||
|
||||
|
||||
gboolean in_use;
|
||||
gboolean plugin;
|
||||
|
||||
|
@ -152,27 +152,27 @@ struct _stats_tree_cfg {
|
|||
|
||||
/** tap listener flags for the per-packet callback */
|
||||
guint flags;
|
||||
|
||||
|
||||
/*
|
||||
* node presentation callbacks
|
||||
*/
|
||||
|
||||
/** last to be called at node creation */
|
||||
void (*setup_node_pr)(stat_node*);
|
||||
|
||||
|
||||
/** last to be called at node destruction */
|
||||
void (*free_node_pr)(stat_node*);
|
||||
|
||||
|
||||
/** to be called for every node in the tree */
|
||||
void (*draw_node)(stat_node*);
|
||||
void (*reset_node)(stat_node*);
|
||||
|
||||
|
||||
/**
|
||||
* tree presentation callbacks
|
||||
*/
|
||||
tree_cfg_pres *pr;
|
||||
|
||||
|
||||
|
||||
|
||||
tree_pres *(*new_tree_pr)(stats_tree*);
|
||||
void (*free_tree_pr)(stats_tree*);
|
||||
void (*draw_tree)(stats_tree*);
|
||||
|
@ -215,7 +215,7 @@ WS_DLL_PUBLIC gchar *stats_tree_get_abbr(const gchar *optarg);
|
|||
/** obtains a stats tree from the registry given its abbr */
|
||||
WS_DLL_PUBLIC stats_tree_cfg *stats_tree_get_cfg_by_abbr(const char *abbr);
|
||||
|
||||
/** obtains a stats tree list from the registry
|
||||
/** obtains a stats tree list from the registry
|
||||
caller should free returned list with g_list_free() */
|
||||
WS_DLL_PUBLIC GList *stats_tree_get_cfg_list(void);
|
||||
|
||||
|
|
|
@ -361,7 +361,7 @@ stream_t *find_stream_conv ( const struct conversation *conv, int p2p_dir )
|
|||
|
||||
/* cleanup the stream routines */
|
||||
/* Note: stream_cleanup must only be called when seasonal memory
|
||||
* is also freed since the hash tables countain pointers to
|
||||
* is also freed since the hash tables countain pointers to
|
||||
* se_alloc'd memory.
|
||||
*/
|
||||
void stream_cleanup( void )
|
||||
|
|
|
@ -381,13 +381,13 @@ format_text_chr(const guchar *string, const size_t len, const guchar chr)
|
|||
fmtbuf_len[idx] = INITIAL_FMTBUF_SIZE;
|
||||
}
|
||||
column = 0;
|
||||
while (string < stringend)
|
||||
while (string < stringend)
|
||||
{
|
||||
/*
|
||||
* Is there enough room for this character,
|
||||
* Is there enough room for this character,
|
||||
* and also enough room for a terminating '\0'?
|
||||
*/
|
||||
if (column+1 >= fmtbuf_len[idx])
|
||||
if (column+1 >= fmtbuf_len[idx])
|
||||
{
|
||||
/*
|
||||
* Double the buffer's size if it's not big enough.
|
||||
|
@ -400,17 +400,17 @@ format_text_chr(const guchar *string, const size_t len, const guchar chr)
|
|||
}
|
||||
c = *string++;
|
||||
|
||||
if (g_ascii_isprint(c))
|
||||
if (g_ascii_isprint(c))
|
||||
{
|
||||
fmtbuf[idx][column] = c;
|
||||
column++;
|
||||
}
|
||||
else if (isspace(c))
|
||||
}
|
||||
else if (isspace(c))
|
||||
{
|
||||
fmtbuf[idx][column] = ' ';
|
||||
column++;
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
fmtbuf[idx][column] = chr;
|
||||
column++;
|
||||
|
|
36
epan/t35.c
36
epan/t35.c
|
@ -304,24 +304,24 @@ const value_string H221ManufacturerCode_vals[] = {
|
|||
{ 0xb4001d00, "GPT Video Systems" }, /* From Ref. 2 */
|
||||
{ 0xb4001e00, "GPT Video Systems" }, /* From Ref. 2 */
|
||||
{ 0xb4001f00, "GPT Video Systems" }, /* From Ref. 2 */
|
||||
{ 0xb4002000, "Marconi Communications" }, /* From Ref. 2 */
|
||||
{ 0xb4002100, "Indigo Active Vision Systems" }, /* From Ref. 2 */
|
||||
{ 0xb4002200, "LiveWorks Limited" }, /* From Ref. 2 */
|
||||
{ 0xb4002300, "ATL Telecom Limited" }, /* From Ref. 2 */
|
||||
{ 0xb4002a00, "Network Alchemy Limited" }, /* From Ref. 2 */
|
||||
{ 0xb4004200, "Motion Media Technology" }, /* From Ref. 2 */
|
||||
{ 0xb4004400, "Data Connection" }, /* From Ref. 2 */
|
||||
{ 0xb4004500, "Westbay Engineers" }, /* From Ref. 2 */
|
||||
{ 0xb4004600, "FarSite Communications" }, /* From Ref. 2 */
|
||||
{ 0xb4004900, "ImageCom" }, /* From Ref. 2 */
|
||||
{ 0xb4004d00, "Madge Networks" }, /* From Ref. 2 */
|
||||
{ 0xb4005200, "Ridgeway Systems and Software" }, /* From Ref. 2 */
|
||||
{ 0xb4005300, "SpliceCom" }, /* From Ref. 2 */
|
||||
{ 0xb4005400, "TeleWare" }, /* From Ref. 2 */
|
||||
{ 0xb4005600, "Vegastream" }, /* From Ref. 2 */
|
||||
{ 0xb4006600, "Westell" }, /* From Ref. 2 */
|
||||
{ 0xb4006900, "ISDN Communications" }, /* From Ref. 2 */
|
||||
{ 0xb400c000, "Codian" }, /* From Ref. 2 */
|
||||
{ 0xb4002000, "Marconi Communications" }, /* From Ref. 2 */
|
||||
{ 0xb4002100, "Indigo Active Vision Systems" }, /* From Ref. 2 */
|
||||
{ 0xb4002200, "LiveWorks Limited" }, /* From Ref. 2 */
|
||||
{ 0xb4002300, "ATL Telecom Limited" }, /* From Ref. 2 */
|
||||
{ 0xb4002a00, "Network Alchemy Limited" }, /* From Ref. 2 */
|
||||
{ 0xb4004200, "Motion Media Technology" }, /* From Ref. 2 */
|
||||
{ 0xb4004400, "Data Connection" }, /* From Ref. 2 */
|
||||
{ 0xb4004500, "Westbay Engineers" }, /* From Ref. 2 */
|
||||
{ 0xb4004600, "FarSite Communications" }, /* From Ref. 2 */
|
||||
{ 0xb4004900, "ImageCom" }, /* From Ref. 2 */
|
||||
{ 0xb4004d00, "Madge Networks" }, /* From Ref. 2 */
|
||||
{ 0xb4005200, "Ridgeway Systems and Software" }, /* From Ref. 2 */
|
||||
{ 0xb4005300, "SpliceCom" }, /* From Ref. 2 */
|
||||
{ 0xb4005400, "TeleWare" }, /* From Ref. 2 */
|
||||
{ 0xb4005600, "Vegastream" }, /* From Ref. 2 */
|
||||
{ 0xb4006600, "Westell" }, /* From Ref. 2 */
|
||||
{ 0xb4006900, "ISDN Communications" }, /* From Ref. 2 */
|
||||
{ 0xb400c000, "Codian" }, /* From Ref. 2 */
|
||||
|
||||
{ 0xb5000000, "Compression Labs" }, /* From Ref. 1 */
|
||||
{ 0xb5000001, "PictureTel" }, /* From Ref. 1 */
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
*/
|
||||
|
||||
#ifndef __T35_H__
|
||||
#define __T35_H__
|
||||
#define __T35_H__
|
||||
|
||||
#include <epan/value_string.h>
|
||||
|
||||
|
|
|
@ -6,17 +6,17 @@
|
|||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* helper functions for TPG
|
||||
*
|
||||
* (c) 2005, Luis E. Garcia Ontanon <luis@ontanon.org>
|
||||
*
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Wireshark - Network traffic analyzer
|
||||
|
@ -31,7 +31,7 @@
|
|||
#include <epan/wmem/wmem.h>
|
||||
#include <epan/packet.h>
|
||||
|
||||
extern guint32 tpg_ipv4(tvbparse_elem_t* e _U_) {
|
||||
extern guint32 tpg_ipv4(tvbparse_elem_t* e _U_) {
|
||||
/* XXX TO DO */
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Definitions of helper functions for TPG
|
||||
*
|
||||
* (c) 2005, Luis E. Garcia Ontanon <luis@ontanon.org>
|
||||
*
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Wireshark - Network traffic analyzer
|
||||
|
|
|
@ -1815,7 +1815,7 @@ tvb_format_stringzpad_wsp(tvbuff_t *tvb, const gint offset, const gint size)
|
|||
/*
|
||||
* All string functions below take a scope as an argument.
|
||||
*
|
||||
*
|
||||
*
|
||||
* If scope is NULL, memory is allocated with g_malloc() and user must
|
||||
* explicitly free it with g_free().
|
||||
* If scope is not NULL, memory is allocated with the corresponding pool
|
||||
|
@ -2054,7 +2054,7 @@ tvb_extract_utf_16_string(wmem_allocator_t *scope, tvbuff_t *tvb, const gint off
|
|||
} else {
|
||||
/*
|
||||
* Not a trail surrogate.
|
||||
* Ignore the entire pair.
|
||||
* Ignore the entire pair.
|
||||
* XXX - insert "substitute" character?
|
||||
* Report the error in some other
|
||||
* fashion?
|
||||
|
|
|
@ -12,17 +12,17 @@
|
|||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <glib.h>
|
||||
#include "ws_symbol_export.h"
|
||||
|
|
|
@ -233,7 +233,7 @@ typedef struct _wslua_distbl_t* DissectorTable;
|
|||
typedef dissector_handle_t Dissector;
|
||||
typedef GByteArray* ByteArray;
|
||||
typedef struct _wslua_tvb* Tvb;
|
||||
typedef struct _wslua_tvbrange* TvbRange;
|
||||
typedef struct _wslua_tvbrange* TvbRange;
|
||||
typedef struct _wslua_col_info* Column;
|
||||
typedef struct _wslua_cols* Columns;
|
||||
typedef struct _wslua_pinfo* Pinfo;
|
||||
|
@ -392,19 +392,19 @@ extern int wslua_reg_attributes(lua_State *L, const wslua_attribute_table *t, gb
|
|||
|
||||
#endif
|
||||
|
||||
#define WSLUA_FUNCTION extern int
|
||||
#define WSLUA_FUNCTION extern int
|
||||
|
||||
#define WSLUA_REGISTER_FUNCTION(name) { lua_pushcfunction(L, wslua_## name); lua_setglobal(L, #name); }
|
||||
|
||||
#define WSLUA_REGISTER extern int
|
||||
|
||||
#define WSLUA_METHOD static int
|
||||
#define WSLUA_CONSTRUCTOR static int
|
||||
#define WSLUA_ATTR_SET static int
|
||||
#define WSLUA_ATTR_GET static int
|
||||
#define WSLUA_METHOD static int
|
||||
#define WSLUA_CONSTRUCTOR static int
|
||||
#define WSLUA_ATTR_SET static int
|
||||
#define WSLUA_ATTR_GET static int
|
||||
#define WSLUA_METAMETHOD static int
|
||||
|
||||
#define WSLUA_METHODS static const luaL_Reg
|
||||
#define WSLUA_METHODS static const luaL_Reg
|
||||
#define WSLUA_META static const luaL_Reg
|
||||
#define WSLUA_CLASS_FNREG(class,name) { #name, class##_##name }
|
||||
#define WSLUA_CLASS_FNREG_ALIAS(class,aliasname,name) { #aliasname, class##_##name }
|
||||
|
@ -502,7 +502,7 @@ extern int wslua_reg_attributes(lua_State *L, const wslua_attribute_table *t, gb
|
|||
g_free(p); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
}
|
||||
|
||||
#define WSLUA_CLASS_DECLARE(C) \
|
||||
extern C to##C(lua_State* L, int idx); \
|
||||
|
|
|
@ -214,7 +214,7 @@ static int FieldInfo_get_display(lua_State* L) {
|
|||
if (!fi->ws_fi->rep) {
|
||||
label_ptr = label_str;
|
||||
proto_item_fill_label(fi->ws_fi, label_str);
|
||||
} else
|
||||
} else
|
||||
label_ptr = fi->ws_fi->rep->representation;
|
||||
|
||||
if (!label_ptr) return 0;
|
||||
|
@ -235,7 +235,7 @@ static int FieldInfo_get_display(lua_State* L) {
|
|||
static int FieldInfo_get_range(lua_State* L) {
|
||||
/* The TvbRange covering this field */
|
||||
FieldInfo fi = checkFieldInfo(L,1);
|
||||
|
||||
|
||||
if (push_TvbRange (L, fi->ws_fi->ds_tvb, fi->ws_fi->start, fi->ws_fi->length)) {
|
||||
return 1;
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ static int FieldInfo_get_range(lua_State* L) {
|
|||
static int FieldInfo_get_generated(lua_State* L) {
|
||||
/* Whether this field was marked as generated. */
|
||||
FieldInfo fi = checkFieldInfo(L,1);
|
||||
|
||||
|
||||
lua_pushboolean(L,FI_GET_FLAG(fi->ws_fi, FI_GENERATED));
|
||||
return 1;
|
||||
}
|
||||
|
@ -256,7 +256,7 @@ static int FieldInfo_get_generated(lua_State* L) {
|
|||
static int FieldInfo_get_name(lua_State* L) {
|
||||
/* The filter name of this field. */
|
||||
FieldInfo fi = checkFieldInfo(L,1);
|
||||
|
||||
|
||||
lua_pushstring(L,fi->ws_fi->hfinfo->abbrev);
|
||||
return 1;
|
||||
}
|
||||
|
@ -381,7 +381,7 @@ WSLUA_FUNCTION wslua_all_field_infos(lua_State* L) {
|
|||
FieldInfo fi = (FieldInfo)g_malloc(sizeof(struct _wslua_field_info));
|
||||
fi->ws_fi = (field_info *)g_ptr_array_index(found,i);
|
||||
fi->expired = FALSE;
|
||||
|
||||
|
||||
PUSH_FIELDINFO(L,fi);
|
||||
items_found++;
|
||||
}
|
||||
|
@ -400,9 +400,9 @@ WSLUA_CLASS_DEFINE(Field,FAIL_ON_NULL("Field"),NOP);
|
|||
static GPtrArray* wanted_fields = NULL;
|
||||
static dfilter_t* wslua_dfilter = NULL;
|
||||
|
||||
/* We use a fake dfilter for Lua field extractors, so that
|
||||
/* We use a fake dfilter for Lua field extractors, so that
|
||||
* epan_dissect_run() will populate the fields. This won't happen
|
||||
* if the passed-in edt->tree is NULL, which it will be if the
|
||||
* if the passed-in edt->tree is NULL, which it will be if the
|
||||
* proto_tree isn't created by epan_dissect_init(). But that's by
|
||||
* design - if shark doesn't pass in a proto_tree, it's probably for
|
||||
* a good reason and we shouldn't override that. (right?)
|
||||
|
@ -518,7 +518,7 @@ WSLUA_METAMETHOD Field__call (lua_State* L) {
|
|||
FieldInfo fi = (FieldInfo)g_malloc(sizeof(struct _wslua_field_info));
|
||||
fi->ws_fi = (field_info *)g_ptr_array_index(found,i);
|
||||
fi->expired = FALSE;
|
||||
|
||||
|
||||
PUSH_FIELDINFO(L,fi);
|
||||
items_found++;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
** $Id: struct.c,v 1.4 2012/07/04 18:54:29 roberto Exp $
|
||||
** See Copyright Notice above.
|
||||
**
|
||||
** Small changes were made by Hadriel Kaplan - those changes
|
||||
** Small changes were made by Hadriel Kaplan - those changes
|
||||
** are in the Public Domain.
|
||||
**
|
||||
** Some changes are based on a patch to struct.h from
|
||||
|
@ -94,8 +94,8 @@
|
|||
|
||||
/* The following line is here so that make-reg.pl does the right thing. This 'Struct' class
|
||||
isn't really a class, so it doesn't have the checkStruct/pushStruct/etc. functions
|
||||
the following macro would generate; but it does need to be registered and such.
|
||||
WSLUA_CLASS_DEFINE_BASE(Struct,NOP,NOP,0);
|
||||
the following macro would generate; but it does need to be registered and such.
|
||||
WSLUA_CLASS_DEFINE_BASE(Struct,NOP,NOP,0);
|
||||
*/
|
||||
|
||||
/* basic integer type - yes this is system-specific size - it's meant to be */
|
||||
|
@ -257,7 +257,7 @@ static void putinteger (lua_State *L, luaL_Buffer *b, int arg, int endian,
|
|||
luaL_addlstring(b, buff, size);
|
||||
}
|
||||
|
||||
/* corrects endiannes - usually done by other functions themselves, but is
|
||||
/* corrects endiannes - usually done by other functions themselves, but is
|
||||
* used for float/doubles, since on some platforms they're endian'ed as well
|
||||
*/
|
||||
static void correctbytes (gchar *b, int size, int endian) {
|
||||
|
@ -353,7 +353,7 @@ WSLUA_CONSTRUCTOR Struct_pack (lua_State *L) {
|
|||
return poscnt + 1;
|
||||
}
|
||||
|
||||
/* Decodes an integer from a string struct into a Lua number, based on
|
||||
/* Decodes an integer from a string struct into a Lua number, based on
|
||||
* given endianess and size. If the integer type is signed, this makes
|
||||
* the Lua number be +/- correctly as well.
|
||||
*/
|
||||
|
@ -386,7 +386,7 @@ static lua_Number getinteger (const gchar *buff, int endian,
|
|||
#define b_pushnumber(n) { if (!h.noassign) lua_pushnumber(L, (lua_Number)(n)); }
|
||||
|
||||
WSLUA_CONSTRUCTOR Struct_unpack (lua_State *L) {
|
||||
/* Unpacks/decodes multiple Lua values from a given struct-like binary Lua string.
|
||||
/* Unpacks/decodes multiple Lua values from a given struct-like binary Lua string.
|
||||
The number of returned values depends on the format given, plus an addtional value of the position where it stopped reading is returned. */
|
||||
#define WSLUA_ARG_Struct_unpack_FORMAT 1 /* The format string */
|
||||
#define WSLUA_ARG_Struct_unpack_STRUCT 2 /* The binary Lua string to unpack */
|
||||
|
|
|
@ -318,7 +318,7 @@ WSLUA_METHOD TreeItem_append_text(lua_State *L) {
|
|||
#define WSLUA_ARG_TreeItem_append_text_TEXT 2 /* The text to be appended. */
|
||||
TreeItem ti = checkTreeItem(L,1);
|
||||
const gchar* s = luaL_checkstring(L,WSLUA_ARG_TreeItem_append_text_TEXT);
|
||||
|
||||
|
||||
proto_item_append_text(ti->item,"%s",s);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -243,7 +243,7 @@ WSLUA_METHOD ByteArray_base64_decode(lua_State* L) {
|
|||
data = (gchar*)g_malloc (ba->len + 1);
|
||||
memcpy(data, ba->data, ba->len);
|
||||
data[ba->len] = '\0';
|
||||
|
||||
|
||||
len = ws_base64_decode_inplace(data);
|
||||
g_byte_array_append(ba2,data,(int)len);
|
||||
g_free(data);
|
||||
|
@ -1303,7 +1303,7 @@ static int TvbRange_uncompress(lua_State* L) {
|
|||
tvbuff_t *uncompr_tvb;
|
||||
|
||||
if (!(tvbr && tvbr->tvb)) return 0;
|
||||
|
||||
|
||||
if (tvbr->tvb->expired) {
|
||||
luaL_error(L,"expired tvb");
|
||||
return 0;
|
||||
|
|
|
@ -421,7 +421,7 @@ static char *get_file_extension(const char *pathname)
|
|||
extensionp = g_strdup(extensionp);
|
||||
g_strfreev(components);
|
||||
return extensionp;
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean heuristic_uses_extension(unsigned int i, const char *extension)
|
||||
{
|
||||
|
|
|
@ -212,7 +212,7 @@ frame_tvbuff_new(const frame_data *fd, const guint8 *buf)
|
|||
frame_tvb = (struct tvb_frame *) tvb;
|
||||
|
||||
/* XXX, wtap_can_seek() */
|
||||
if (cfile.wth && cfile.wth->random_fh
|
||||
if (cfile.wth && cfile.wth->random_fh
|
||||
#ifdef WANT_PACKET_EDITOR
|
||||
&& fd->file_off != -1 /* generic clone for modified packets */
|
||||
#endif
|
||||
|
@ -317,7 +317,7 @@ file_tvbuff_new(const frame_data *fd, const guint8 *buf)
|
|||
frame_tvb = (struct tvb_frame *) tvb;
|
||||
|
||||
/* XXX, wtap_can_seek() */
|
||||
if (cfile.wth && cfile.wth->random_fh
|
||||
if (cfile.wth && cfile.wth->random_fh
|
||||
#ifdef WANT_PACKET_EDITOR
|
||||
&& fd->file_off != -1 /* generic clone for modified packets */
|
||||
#endif
|
||||
|
|
54
mkcap.c
54
mkcap.c
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* $Id$
|
||||
*
|
||||
* By Ronnie Sahlberg and Richard Sharpe. From a program initially
|
||||
* By Ronnie Sahlberg and Richard Sharpe. From a program initially
|
||||
* written by Ronnie.
|
||||
* Copyright 2003 Ronnie Sahlberg and Richard Sharpe
|
||||
*
|
||||
|
@ -86,7 +86,7 @@ int ack_delay = 5000;
|
|||
int tcp_nodelay = 0;
|
||||
int tcp_delay_time = 1000; /* What is the real time here? */
|
||||
/*
|
||||
* If tcp_nodelay is set, then this is the amount of data left ...
|
||||
* If tcp_nodelay is set, then this is the amount of data left ...
|
||||
*/
|
||||
int remaining_data = 0;
|
||||
int snap_len = 1500;
|
||||
|
@ -106,7 +106,7 @@ struct seg_hist_s {
|
|||
int seg_num; /* Segment number sent. This can change */
|
||||
/* but a retransmit will have a new seg */
|
||||
int flags; /* Flags as above for ack and seg loss */
|
||||
int acks_first_seq; /* How many times we have seen an ack
|
||||
int acks_first_seq; /* How many times we have seen an ack
|
||||
for the first seq number in this seg */
|
||||
};
|
||||
|
||||
|
@ -127,7 +127,7 @@ makeseg(char *eth1, char *eth2, char *ip1, char *ip2, char *p1, char *p2, int *s
|
|||
printf("2002/01/07 00:00:%02d.%06d\n", ts/1000000, ts%1000000);
|
||||
printf("0000 %s %s 08 00\n", eth1, eth2);
|
||||
printf("000e 45 00 %02x %02x 00 00 00 00 40 06 00 00 %s %s\n", (len+40)>>8, (len+40)&0xff, ip1, ip2);
|
||||
printf("0022 %s %s %02x %02x %02x %02x %02x %02x %02x %02x 50 %s 80 00 00 00 00 00", p1, p2,
|
||||
printf("0022 %s %s %02x %02x %02x %02x %02x %02x %02x %02x 50 %s 80 00 00 00 00 00", p1, p2,
|
||||
((*s1)>>24)&0xff,
|
||||
((*s1)>>16)&0xff,
|
||||
((*s1)>>8)&0xff,
|
||||
|
@ -154,13 +154,13 @@ int next_ack_due()
|
|||
int slot = next_slot;
|
||||
int ack_lost = 0, seg_lost = 0;
|
||||
|
||||
if (next_slot == first_slot)
|
||||
if (next_slot == first_slot)
|
||||
return (((unsigned int)(1<<31)) - 1);
|
||||
|
||||
/*
|
||||
* Figure out if we need to issue an ACK. We skip all outstanding packets
|
||||
* that are marked as ack lost or packet lost.
|
||||
*
|
||||
*
|
||||
* We would not usually come in here with a frame marked as lost or ack lost
|
||||
* rather, we will come in here and specify that the ack was due at a
|
||||
* certain time, and gen_next_ack would then determine that the ack
|
||||
|
@ -179,10 +179,10 @@ int next_ack_due()
|
|||
slot = (slot + 1) % SEG_HIST_SIZE;
|
||||
}
|
||||
|
||||
if (slot == next_slot)
|
||||
if (slot == next_slot)
|
||||
return (((unsigned int)(1<<31)) - 1);
|
||||
|
||||
/*
|
||||
/*
|
||||
* If there is only one slot occupied, or a segment was lost then
|
||||
* an ACK is due after the last [good] segment left plus ack_delay
|
||||
*/
|
||||
|
@ -190,7 +190,7 @@ int next_ack_due()
|
|||
if (slot == first_slot && next_slot == ((first_slot + 1) % SEG_HIST_SIZE))
|
||||
return (seg_hist[first_slot].ts + ack_delay + jitter);
|
||||
|
||||
if (seg_lost)
|
||||
if (seg_lost)
|
||||
return (seg_hist[slot].ts + ack_delay + jitter);
|
||||
|
||||
/*
|
||||
|
@ -209,7 +209,7 @@ int next_ack_due()
|
|||
/* XXX: FIXME, what about when the window is closed */
|
||||
/* XXX: FIXME, use the correct value for this */
|
||||
return (((unsigned int)(1<<31)) - 1);
|
||||
else
|
||||
else
|
||||
return seg_hist[(first_slot + 1 + 2 * ack_lost) % SEG_HIST_SIZE].ts +
|
||||
ack_delay + jitter;
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ int next_ack_due()
|
|||
add_seg_sent(int seq, int len)
|
||||
{
|
||||
|
||||
/*
|
||||
/*
|
||||
* Should check we have not wrapped around and run into the unacked
|
||||
* stuff ...
|
||||
*/
|
||||
|
@ -250,7 +250,7 @@ add_seg_sent(int seq, int len)
|
|||
*/
|
||||
|
||||
next_slot = (next_slot + 1) % SEG_HIST_SIZE;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -269,7 +269,7 @@ gen_next_ack(int force, int spacing)
|
|||
{
|
||||
int seq_to_ack, new_ts, data_acked;
|
||||
|
||||
/*
|
||||
/*
|
||||
* We need to check if the segment that we are about to generate an
|
||||
* ack for is a segment that should be dropped ... or an ack that should
|
||||
* be dropped.
|
||||
|
@ -299,7 +299,7 @@ gen_next_ack(int force, int spacing)
|
|||
*/
|
||||
if (new_ts + jitter <= ts)
|
||||
ts++;
|
||||
else
|
||||
else
|
||||
ts = new_ts + jitter;
|
||||
|
||||
jitter = (rand() % 10 - 5); /* Update jitter ... */
|
||||
|
@ -311,13 +311,13 @@ gen_next_ack(int force, int spacing)
|
|||
if (cwnd >= ssthresh)
|
||||
cwnd += (1460*data_acked)/cwnd; /* is this right? */
|
||||
else
|
||||
cwnd = cwnd + data_acked;
|
||||
if (verbose) fprintf(stderr, "Ack rcvd. ts: %d, data_acked: %d, cwnd: %d, window: %d\n",
|
||||
cwnd = cwnd + data_acked;
|
||||
if (verbose) fprintf(stderr, "Ack rcvd. ts: %d, data_acked: %d, cwnd: %d, window: %d\n",
|
||||
ts, data_acked, cwnd, window);
|
||||
if (cwnd > window) cwnd = window;
|
||||
}
|
||||
|
||||
void
|
||||
void
|
||||
makeackedrun(int len, int spacing, int ackdelay)
|
||||
{
|
||||
int next_ack_ts=0;
|
||||
|
@ -351,7 +351,7 @@ makeackedrun(int len, int spacing, int ackdelay)
|
|||
* Now, if the window is closed, then we have to eject an
|
||||
* ack, otherwise we can eject more data.
|
||||
* Also, the other end will tend to ack two segments at
|
||||
* a time ... and that ack might fall between two
|
||||
* a time ... and that ack might fall between two
|
||||
* outgoing segments
|
||||
*/
|
||||
jitter = (rand()%10) - 5; /* What if spacing too small */
|
||||
|
@ -369,7 +369,7 @@ makeackedrun(int len, int spacing, int ackdelay)
|
|||
if (verbose) fprintf(stderr, "Non forced ACK ...ts + spacing + jitter:%d, jitter: %d\n", ts + spacing + jitter, jitter);
|
||||
gen_next_ack(NO_FORCE_ACK, spacing);
|
||||
/*
|
||||
* We don't want time to go backwards ...
|
||||
* We don't want time to go backwards ...
|
||||
*/
|
||||
if (old_ts + spacing + jitter <= ts)
|
||||
ts++;
|
||||
|
@ -377,9 +377,9 @@ makeackedrun(int len, int spacing, int ackdelay)
|
|||
ts = old_ts + spacing + jitter;
|
||||
|
||||
} else if (used_win == cwnd) {
|
||||
|
||||
|
||||
/*
|
||||
* We need an ACK, so generate it and retire the
|
||||
* We need an ACK, so generate it and retire the
|
||||
* segments and advance the ts to the time of the ack
|
||||
*/
|
||||
|
||||
|
@ -399,7 +399,7 @@ makeackedrun(int len, int spacing, int ackdelay)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
void
|
||||
makeackedrundroppedtail8kb(int len, int spacing, int ackdelay)
|
||||
{
|
||||
int old_seq1;
|
||||
|
@ -508,7 +508,7 @@ all_digits(char *str)
|
|||
if (!str || !(*str)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
for (i = 0; str[i]; i++) {
|
||||
if (!isdigit(str[i]))
|
||||
return 0;
|
||||
|
@ -522,7 +522,7 @@ all_digits(char *str)
|
|||
*
|
||||
* first_seg,seg_count[,first_seg,seg_count]*
|
||||
*/
|
||||
void
|
||||
void
|
||||
process_drop_list(char *drop_list)
|
||||
{
|
||||
int commas=0;
|
||||
|
@ -566,17 +566,17 @@ process_drop_list(char *drop_list)
|
|||
return;
|
||||
}
|
||||
if (num == 0) num = 1;
|
||||
if (commas % 2)
|
||||
if (commas % 2)
|
||||
drops[commas / 2].drop_seg_count = num;
|
||||
else
|
||||
drops[commas / 2].drop_seg_start = num;
|
||||
}
|
||||
|
||||
|
||||
g_free(save);
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
int i;
|
||||
|
|
4
pcapio.h
4
pcapio.h
|
@ -31,13 +31,13 @@
|
|||
Returns TRUE on success, FALSE on failure.
|
||||
Sets "*err" to an error code, or 0 for a short write, on failure*/
|
||||
extern gboolean
|
||||
libpcap_write_file_header(FILE* pfile, int linktype, int snaplen,
|
||||
libpcap_write_file_header(FILE* pfile, int linktype, int snaplen,
|
||||
gboolean ts_nsecs, guint64 *bytes_written, int *err);
|
||||
|
||||
/** Write a record for a packet to a dump file.
|
||||
Returns TRUE on success, FALSE on failure. */
|
||||
extern gboolean
|
||||
libpcap_write_packet(FILE* pfile,
|
||||
libpcap_write_packet(FILE* pfile,
|
||||
time_t sec, guint32 usec,
|
||||
guint32 caplen, guint32 len,
|
||||
const guint8 *pd,
|
||||
|
|
|
@ -417,7 +417,7 @@ asn1_null_decode ( ASN1_SCK *asn1, int enc_len)
|
|||
|
||||
asn1->offset += enc_len;
|
||||
/*
|
||||
* Check for integer overflows.
|
||||
* Check for integer overflows.
|
||||
* XXX - ASN1_ERR_LENGTH_MISMATCH seemed like the most appropriate
|
||||
* error from the ones available. Should we make a new one?
|
||||
*/
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
#define BER_UNI_TAG_EMBEDDED_PDV 11
|
||||
#define BER_UNI_TAG_UTF8String 12
|
||||
#define BER_UNI_TAG_RELATIVE_OID 13
|
||||
/* UNIVERSAL 14-15
|
||||
/* UNIVERSAL 14-15
|
||||
* Reserved for future editions of this
|
||||
* Recommendation | International Standard
|
||||
*/
|
||||
|
|
|
@ -117,10 +117,10 @@ proto_register_docsis_dccack (void)
|
|||
static hf_register_info hf[] = {
|
||||
{&hf_docsis_dccack_tran_id ,
|
||||
{
|
||||
"Transaction ID",
|
||||
"Transaction ID",
|
||||
"docsis_dccack.tran_id",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
|
|
|
@ -122,12 +122,12 @@ dissect_dccreq_ds_params (tvbuff_t * tvb, proto_tree * tree, int start, guint16
|
|||
pos = start;
|
||||
dcc_item = proto_tree_add_text ( tree, tvb, start, len, "2 DCC-REQ Downstream Params Encodings (Length = %u)", len);
|
||||
dcc_tree = proto_item_add_subtree ( dcc_item , ett_docsis_dccreq_ds_params);
|
||||
|
||||
while ( pos < ( start + len) )
|
||||
|
||||
while ( pos < ( start + len) )
|
||||
{
|
||||
type = tvb_get_guint8 (tvb, pos++);
|
||||
length = tvb_get_guint8 (tvb, pos++);
|
||||
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DCCREQ_DS_FREQ:
|
||||
|
@ -147,7 +147,7 @@ dissect_dccreq_ds_params (tvbuff_t * tvb, proto_tree * tree, int start, guint16
|
|||
proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_mod_type, tvb,
|
||||
pos, length, ENC_BIG_ENDIAN);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
THROW (ReportedBoundsError);
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ dissect_dccreq_ds_params (tvbuff_t * tvb, proto_tree * tree, int start, guint16
|
|||
proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_sym_rate, tvb,
|
||||
pos, length, ENC_BIG_ENDIAN);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
THROW (ReportedBoundsError);
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ dissect_dccreq_ds_params (tvbuff_t * tvb, proto_tree * tree, int start, guint16
|
|||
proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_intlv_depth_j, tvb,
|
||||
pos + 1, 1, ENC_BIG_ENDIAN);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
THROW (ReportedBoundsError);
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ dissect_dccreq_ds_params (tvbuff_t * tvb, proto_tree * tree, int start, guint16
|
|||
proto_tree_add_item (dcc_tree, hf_docsis_dccreq_ds_chan_id, tvb,
|
||||
pos, length, ENC_BIG_ENDIAN);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
THROW (ReportedBoundsError);
|
||||
}
|
||||
|
@ -203,16 +203,16 @@ dissect_dccreq_sf_sub (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len
|
|||
proto_item *dcc_item;
|
||||
proto_tree *dcc_tree;
|
||||
int pos;
|
||||
|
||||
|
||||
pos = start;
|
||||
dcc_item = proto_tree_add_text ( tree, tvb, start, len, "7 DCC-REQ Service Flow Substitution Encodings (Length = %u)", len);
|
||||
dcc_tree = proto_item_add_subtree ( dcc_item , ett_docsis_dccreq_sf_sub);
|
||||
|
||||
while ( pos < ( start + len) )
|
||||
|
||||
while ( pos < ( start + len) )
|
||||
{
|
||||
type = tvb_get_guint8 (tvb, pos++);
|
||||
length = tvb_get_guint8 (tvb, pos++);
|
||||
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DCCREQ_SF_SFID:
|
||||
|
@ -384,64 +384,64 @@ proto_register_docsis_dccreq (void)
|
|||
static hf_register_info hf[] = {
|
||||
{&hf_docsis_dccreq_tran_id ,
|
||||
{
|
||||
"Transaction ID",
|
||||
"Transaction ID",
|
||||
"docsis_dccreq.tran_id",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dccreq_up_chan_id ,
|
||||
{
|
||||
"Up Channel ID",
|
||||
"Up Channel ID",
|
||||
"docsis_dccreq.up_chan_id",
|
||||
FT_UINT8, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dccreq_ds_freq ,
|
||||
{
|
||||
"Frequency",
|
||||
"Frequency",
|
||||
"docsis_dccreq.ds_freq",
|
||||
FT_UINT32, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dccreq_ds_mod_type ,
|
||||
{
|
||||
"Modulation Type",
|
||||
"Modulation Type",
|
||||
"docsis_dccreq.ds_mod_type",
|
||||
FT_UINT8, BASE_DEC, VALS (ds_mod_type_vals), 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dccreq_ds_sym_rate ,
|
||||
{
|
||||
"Symbol Rate",
|
||||
"Symbol Rate",
|
||||
"docsis_dccreq.ds_sym_rate",
|
||||
FT_UINT8, BASE_DEC, VALS (ds_sym_rate_vals), 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dccreq_ds_intlv_depth_i ,
|
||||
{
|
||||
"Interleaver Depth I Value",
|
||||
"Interleaver Depth I Value",
|
||||
"docsis_dccreq.ds_intlv_depth_i",
|
||||
FT_UINT8, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dccreq_ds_intlv_depth_j ,
|
||||
{
|
||||
"Interleaver Depth J Value",
|
||||
"Interleaver Depth J Value",
|
||||
"docsis_dccreq.ds_intlv_depth_j",
|
||||
FT_UINT8, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
|
@ -465,19 +465,19 @@ proto_register_docsis_dccreq (void)
|
|||
},
|
||||
{&hf_docsis_dccreq_init_tech ,
|
||||
{
|
||||
"Initialization Technique",
|
||||
"Initialization Technique",
|
||||
"docsis_dccreq.init_tech",
|
||||
FT_UINT8, BASE_DEC, VALS (init_tech_vals), 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dccreq_ucd_sub ,
|
||||
{
|
||||
"UCD Substitution",
|
||||
"UCD Substitution",
|
||||
"docsis_dccreq.ucd_sub",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
|
|
|
@ -64,16 +64,16 @@ dissect_dccrsp_cm_jump_time (tvbuff_t * tvb, proto_tree * tree, int start, guint
|
|||
proto_item *dcc_item;
|
||||
proto_tree *dcc_tree;
|
||||
int pos;
|
||||
|
||||
|
||||
pos = start;
|
||||
dcc_item = proto_tree_add_text ( tree, tvb, start, len, "2 DCC-RSP CM Time Jump Encodings (Length = %u)", len);
|
||||
dcc_tree = proto_item_add_subtree ( dcc_item , ett_docsis_dccrsp_cm_jump_time);
|
||||
|
||||
while ( pos < ( start + len) )
|
||||
|
||||
while ( pos < ( start + len) )
|
||||
{
|
||||
type = tvb_get_guint8 (tvb, pos++);
|
||||
length = tvb_get_guint8 (tvb, pos++);
|
||||
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DCCRSP_CM_JUMP_TIME_LENGTH:
|
||||
|
@ -93,7 +93,7 @@ dissect_dccrsp_cm_jump_time (tvbuff_t * tvb, proto_tree * tree, int start, guint
|
|||
proto_tree_add_item (dcc_tree, hf_docsis_dccrsp_cm_jump_time_start, tvb,
|
||||
pos, length, ENC_BIG_ENDIAN);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
THROW (ReportedBoundsError);
|
||||
}
|
||||
|
@ -177,37 +177,37 @@ proto_register_docsis_dccrsp (void)
|
|||
static hf_register_info hf[] = {
|
||||
{&hf_docsis_dccrsp_tran_id ,
|
||||
{
|
||||
"Transaction ID",
|
||||
"Transaction ID",
|
||||
"docsis_dccrsp.tran_id",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dccrsp_conf_code ,
|
||||
{
|
||||
"Confirmation Code",
|
||||
"Confirmation Code",
|
||||
"docsis_dccrsp.conf_code",
|
||||
FT_UINT8, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dccrsp_cm_jump_time_length ,
|
||||
{
|
||||
"Jump Time Length",
|
||||
"Jump Time Length",
|
||||
"docsis_dccrsp.cm_jump_time_length",
|
||||
FT_UINT32, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dccrsp_cm_jump_time_start ,
|
||||
{
|
||||
"Jump Time Start",
|
||||
"Jump Time Start",
|
||||
"docsis_dccrsp.cm_jump_time_start",
|
||||
FT_UINT64, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
|
|
|
@ -134,16 +134,16 @@ dissect_dcd_dsg_cfg (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
|
|||
proto_item *dcd_item;
|
||||
proto_tree *dcd_tree;
|
||||
int pos;
|
||||
|
||||
|
||||
pos = start;
|
||||
dcd_item = proto_tree_add_text ( tree, tvb, start, len, "51 DCD DSG Config Encodings (Length = %u)", len);
|
||||
dcd_tree = proto_item_add_subtree ( dcd_item , ett_docsis_dcd_cfg);
|
||||
|
||||
while ( pos < ( start + len) )
|
||||
|
||||
while ( pos < ( start + len) )
|
||||
{
|
||||
type = tvb_get_guint8 (tvb, pos++);
|
||||
length = tvb_get_guint8 (tvb, pos++);
|
||||
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DCD_CFG_CHAN_LST:
|
||||
|
@ -163,7 +163,7 @@ dissect_dcd_dsg_cfg (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
|
|||
proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_tdsg1, tvb,
|
||||
pos, length, ENC_BIG_ENDIAN);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
THROW (ReportedBoundsError);
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ dissect_dcd_dsg_cfg (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
|
|||
proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_tdsg2, tvb,
|
||||
pos, length, ENC_BIG_ENDIAN);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
THROW (ReportedBoundsError);
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ dissect_dcd_dsg_cfg (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
|
|||
proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_tdsg3, tvb,
|
||||
pos, length, ENC_BIG_ENDIAN);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
THROW (ReportedBoundsError);
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ dissect_dcd_dsg_cfg (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
|
|||
proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfg_tdsg4, tvb,
|
||||
pos, length, ENC_BIG_ENDIAN);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
THROW (ReportedBoundsError);
|
||||
}
|
||||
|
@ -217,16 +217,16 @@ dissect_dcd_down_classifier_ip (tvbuff_t * tvb, proto_tree * tree, int start, gu
|
|||
proto_item *dcd_item;
|
||||
proto_tree *dcd_tree;
|
||||
int pos;
|
||||
|
||||
|
||||
pos = start;
|
||||
dcd_item = proto_tree_add_text ( tree, tvb, start, len, "23.9 DCD_CFR_IP Encodings (Length = %u)", len);
|
||||
dcd_tree = proto_item_add_subtree ( dcd_item , ett_docsis_dcd_cfr_ip);
|
||||
|
||||
while ( pos < ( start + len) )
|
||||
|
||||
while ( pos < ( start + len) )
|
||||
{
|
||||
type = tvb_get_guint8 (tvb, pos++);
|
||||
length = tvb_get_guint8 (tvb, pos++);
|
||||
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DCD_CFR_IP_SOURCE_ADDR:
|
||||
|
@ -328,16 +328,16 @@ dissect_dcd_clid (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
|
|||
proto_item *dcd_item;
|
||||
proto_tree *dcd_tree;
|
||||
int pos;
|
||||
|
||||
|
||||
pos = start;
|
||||
dcd_item = proto_tree_add_text ( tree, tvb, start, len, "50.4 DCD Rule ClientID Encodings (Length = %u)", len);
|
||||
dcd_tree = proto_item_add_subtree ( dcd_item , ett_docsis_dcd_clid);
|
||||
|
||||
while ( pos < ( start + len) )
|
||||
|
||||
while ( pos < ( start + len) )
|
||||
{
|
||||
type = tvb_get_guint8 (tvb, pos++);
|
||||
length = tvb_get_guint8 (tvb, pos++);
|
||||
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DCD_CLID_BCAST_ID:
|
||||
|
@ -394,16 +394,16 @@ dissect_dcd_dsg_rule (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
|
|||
proto_item *dcd_item;
|
||||
proto_tree *dcd_tree;
|
||||
int pos;
|
||||
|
||||
|
||||
pos = start;
|
||||
dcd_item = proto_tree_add_text ( tree, tvb, start, len, "50 DCD DSG Rule Encodings (Length = %u)", len);
|
||||
dcd_tree = proto_item_add_subtree ( dcd_item , ett_docsis_dcd_rule);
|
||||
|
||||
while ( pos < ( start + len) )
|
||||
|
||||
while ( pos < ( start + len) )
|
||||
{
|
||||
type = tvb_get_guint8 (tvb, pos++);
|
||||
length = tvb_get_guint8 (tvb, pos++);
|
||||
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DCD_RULE_ID:
|
||||
|
@ -423,7 +423,7 @@ dissect_dcd_dsg_rule (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
|
|||
proto_tree_add_item (dcd_tree, hf_docsis_dcd_rule_pri, tvb,
|
||||
pos, length, ENC_BIG_ENDIAN);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
THROW (ReportedBoundsError);
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ dissect_dcd_dsg_rule (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
|
|||
proto_tree_add_item (dcd_tree, hf_docsis_dcd_rule_tunl_addr, tvb,
|
||||
pos, length, ENC_NA);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
THROW (ReportedBoundsError);
|
||||
}
|
||||
|
@ -452,7 +452,7 @@ dissect_dcd_dsg_rule (tvbuff_t * tvb, proto_tree * tree, int start, guint16 len)
|
|||
proto_tree_add_item (dcd_tree, hf_docsis_dcd_rule_cfr_id, tvb,
|
||||
pos, length, ENC_BIG_ENDIAN);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
THROW (ReportedBoundsError);
|
||||
}
|
||||
|
@ -473,16 +473,16 @@ dissect_dcd_down_classifier (tvbuff_t * tvb, proto_tree * tree, int start, guint
|
|||
proto_item *dcd_item;
|
||||
proto_tree *dcd_tree;
|
||||
int pos;
|
||||
|
||||
|
||||
pos = start;
|
||||
dcd_item = proto_tree_add_text ( tree, tvb, start, len, "23 DCD_CFR Encodings (Length = %u)", len);
|
||||
dcd_tree = proto_item_add_subtree ( dcd_item , ett_docsis_dcd_cfr);
|
||||
|
||||
while ( pos < ( start + len) )
|
||||
|
||||
while ( pos < ( start + len) )
|
||||
{
|
||||
type = tvb_get_guint8 (tvb, pos++);
|
||||
length = tvb_get_guint8 (tvb, pos++);
|
||||
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DCD_CFR_ID:
|
||||
|
@ -502,7 +502,7 @@ dissect_dcd_down_classifier (tvbuff_t * tvb, proto_tree * tree, int start, guint
|
|||
proto_tree_add_item (dcd_tree, hf_docsis_dcd_cfr_rule_pri, tvb,
|
||||
pos, length, ENC_BIG_ENDIAN);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
THROW (ReportedBoundsError);
|
||||
}
|
||||
|
@ -575,145 +575,145 @@ proto_register_docsis_dcd (void)
|
|||
static hf_register_info hf[] = {
|
||||
{&hf_docsis_dcd_config_ch_cnt,
|
||||
{
|
||||
"Configuration Change Count",
|
||||
"Configuration Change Count",
|
||||
"docsis_dcd.config_ch_cnt",
|
||||
FT_UINT8, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_num_of_frag,
|
||||
{
|
||||
"Number of Fragments",
|
||||
"Number of Fragments",
|
||||
"docsis_dcd.num_of_frag",
|
||||
FT_UINT8, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_frag_sequence_num,
|
||||
{
|
||||
"Fragment Sequence Number",
|
||||
"Fragment Sequence Number",
|
||||
"docsis_dcd.frag_sequence_num",
|
||||
FT_UINT8, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_cfr_id,
|
||||
{
|
||||
"Downstream Classifier Id",
|
||||
"Downstream Classifier Id",
|
||||
"docsis_dcd.cfr_id",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_cfr_rule_pri,
|
||||
{
|
||||
"Downstream Classifier Rule Priority",
|
||||
"Downstream Classifier Rule Priority",
|
||||
"docsis_dcd.cfr_rule_pri",
|
||||
FT_UINT8, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_cfr_ip_source_addr,
|
||||
{
|
||||
"Downstream Classifier IP Source Address",
|
||||
"Downstream Classifier IP Source Address",
|
||||
"docsis_dcd.cfr_ip_source_addr",
|
||||
FT_IPv4, BASE_NONE, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_cfr_ip_source_mask,
|
||||
{
|
||||
"Downstream Classifier IP Source Mask",
|
||||
"Downstream Classifier IP Source Mask",
|
||||
"docsis_dcd.cfr_ip_source_mask",
|
||||
FT_IPv4, BASE_NONE, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_cfr_ip_dest_addr,
|
||||
{
|
||||
"Downstream Classifier IP Destination Address",
|
||||
"Downstream Classifier IP Destination Address",
|
||||
"docsis_dcd.cfr_ip_dest_addr",
|
||||
FT_IPv4, BASE_NONE, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_cfr_ip_dest_mask,
|
||||
{
|
||||
"Downstream Classifier IP Destination Mask",
|
||||
"Downstream Classifier IP Destination Mask",
|
||||
"docsis_dcd.cfr_ip_dest_mask",
|
||||
FT_IPv4, BASE_NONE, NULL, 0x0,
|
||||
"Downstream Classifier IP Destination Address",
|
||||
"Downstream Classifier IP Destination Address",
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_cfr_tcpudp_srcport_start,
|
||||
{
|
||||
"Downstream Classifier IP TCP/UDP Source Port Start",
|
||||
"Downstream Classifier IP TCP/UDP Source Port Start",
|
||||
"docsis_dcd.cfr_ip_tcpudp_srcport_start",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_cfr_tcpudp_srcport_end,
|
||||
{
|
||||
"Downstream Classifier IP TCP/UDP Source Port End",
|
||||
"Downstream Classifier IP TCP/UDP Source Port End",
|
||||
"docsis_dcd.cfr_ip_tcpudp_srcport_end",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_cfr_tcpudp_dstport_start,
|
||||
{
|
||||
"Downstream Classifier IP TCP/UDP Destination Port Start",
|
||||
"Downstream Classifier IP TCP/UDP Destination Port Start",
|
||||
"docsis_dcd.cfr_ip_tcpudp_dstport_start",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_cfr_tcpudp_dstport_end,
|
||||
{
|
||||
"Downstream Classifier IP TCP/UDP Destination Port End",
|
||||
"Downstream Classifier IP TCP/UDP Destination Port End",
|
||||
"docsis_dcd.cfr_ip_tcpudp_dstport_end",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_rule_id,
|
||||
{
|
||||
"DSG Rule Id",
|
||||
"DSG Rule Id",
|
||||
"docsis_dcd.rule_id",
|
||||
FT_UINT8, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_rule_pri,
|
||||
{
|
||||
"DSG Rule Priority",
|
||||
"DSG Rule Priority",
|
||||
"docsis_dcd.rule_pri",
|
||||
FT_UINT8, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_rule_ucid_list,
|
||||
{
|
||||
"DSG Rule UCID Range",
|
||||
"DSG Rule UCID Range",
|
||||
"docsis_dcd.rule_ucid_list",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
|
@ -728,109 +728,109 @@ proto_register_docsis_dcd (void)
|
|||
},
|
||||
{&hf_docsis_dcd_clid_known_mac_addr,
|
||||
{
|
||||
"DSG Rule Client ID Known MAC Address",
|
||||
"DSG Rule Client ID Known MAC Address",
|
||||
"docsis_dcd.clid_known_mac_addr",
|
||||
FT_ETHER, BASE_NONE, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_clid_ca_sys_id,
|
||||
{
|
||||
"DSG Rule Client ID CA System ID",
|
||||
"DSG Rule Client ID CA System ID",
|
||||
"docsis_dcd.clid_ca_sys_id",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_clid_app_id,
|
||||
{
|
||||
"DSG Rule Client ID Application ID",
|
||||
"DSG Rule Client ID Application ID",
|
||||
"docsis_dcd.clid_app_id",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_rule_tunl_addr,
|
||||
{
|
||||
"DSG Rule Tunnel MAC Address",
|
||||
"DSG Rule Tunnel MAC Address",
|
||||
"docsis_dcd.rule_tunl_addr",
|
||||
FT_ETHER, BASE_NONE, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_rule_cfr_id,
|
||||
{
|
||||
"DSG Rule Classifier ID",
|
||||
"DSG Rule Classifier ID",
|
||||
"docsis_dcd.rule_cfr_id",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_rule_vendor_spec,
|
||||
{
|
||||
"DSG Rule Vendor Specific Parameters",
|
||||
"DSG Rule Vendor Specific Parameters",
|
||||
"docsis_dcd.rule_vendor_spec",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_cfg_chan,
|
||||
{
|
||||
"DSG Configuration Channel",
|
||||
"DSG Configuration Channel",
|
||||
"docsis_dcd.cfg_chan",
|
||||
FT_UINT32, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_cfg_tdsg1,
|
||||
{
|
||||
"DSG Initialization Timeout (Tdsg1)",
|
||||
"DSG Initialization Timeout (Tdsg1)",
|
||||
"docsis_dcd.cfg_tdsg1",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_cfg_tdsg2,
|
||||
{
|
||||
"DSG Operational Timeout (Tdsg2)",
|
||||
"DSG Operational Timeout (Tdsg2)",
|
||||
"docsis_dcd.cfg_tdsg2",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_cfg_tdsg3,
|
||||
{
|
||||
"DSG Two-Way Retry Timer (Tdsg3)",
|
||||
"DSG Two-Way Retry Timer (Tdsg3)",
|
||||
"docsis_dcd.cfg_tdsg3",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_cfg_tdsg4,
|
||||
{
|
||||
"DSG One-Way Retry Timer (Tdsg4)",
|
||||
"DSG One-Way Retry Timer (Tdsg4)",
|
||||
"docsis_dcd.cfg_tdsg4",
|
||||
FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
{&hf_docsis_dcd_cfg_vendor_spec,
|
||||
{
|
||||
"DSG Configuration Vendor Specific Parameters",
|
||||
"DSG Configuration Vendor Specific Parameters",
|
||||
"docsis_dcd.cfg_vendor_spec",
|
||||
FT_BYTES, BASE_NONE, NULL, 0x0,
|
||||
NULL,
|
||||
NULL,
|
||||
HFILL
|
||||
}
|
||||
},
|
||||
|
|
|
@ -58,7 +58,7 @@ dissect_dpvreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
dschan = tvb_get_guint8 (tvb, 2);
|
||||
|
||||
col_add_fstr (pinfo->cinfo, COL_INFO,
|
||||
"DOCSIS Path Verify Request: Transaction-Id = %u DS-Ch %d",
|
||||
"DOCSIS Path Verify Request: Transaction-Id = %u DS-Ch %d",
|
||||
transid, dschan);
|
||||
|
||||
if (tree)
|
||||
|
@ -67,23 +67,23 @@ dissect_dpvreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
proto_tree_add_protocol_format (tree, proto_docsis_dpvreq, tvb, 0, -1,
|
||||
"DPV Request");
|
||||
dpvreq_tree = proto_item_add_subtree (it, ett_docsis_dpvreq);
|
||||
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_tranid, tvb,
|
||||
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_tranid, tvb,
|
||||
0, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_dschan, tvb,
|
||||
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_dschan, tvb,
|
||||
2, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_flags, tvb,
|
||||
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_flags, tvb,
|
||||
3, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_us_sf, tvb,
|
||||
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_us_sf, tvb,
|
||||
4, 4, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_n, tvb,
|
||||
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_n, tvb,
|
||||
8, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_start, tvb,
|
||||
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_start, tvb,
|
||||
10, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_end, tvb,
|
||||
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_end, tvb,
|
||||
11, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_ts_start, tvb,
|
||||
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_ts_start, tvb,
|
||||
12, 4, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_ts_end, tvb,
|
||||
proto_tree_add_item (dpvreq_tree, hf_docsis_dpvreq_ts_end, tvb,
|
||||
16, 4, ENC_BIG_ENDIAN);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ dissect_dpvrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
dschan = tvb_get_guint8 (tvb, 2);
|
||||
|
||||
col_add_fstr (pinfo->cinfo, COL_INFO,
|
||||
"DOCSIS Path Verify Response: Transaction-Id = %u DS-Ch %d",
|
||||
"DOCSIS Path Verify Response: Transaction-Id = %u DS-Ch %d",
|
||||
transid, dschan);
|
||||
|
||||
if (tree)
|
||||
|
@ -67,23 +67,23 @@ dissect_dpvrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
proto_tree_add_protocol_format (tree, proto_docsis_dpvrsp, tvb, 0, -1,
|
||||
"DPV Response");
|
||||
dpvrsp_tree = proto_item_add_subtree (it, ett_docsis_dpvrsp);
|
||||
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_tranid, tvb,
|
||||
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_tranid, tvb,
|
||||
0, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_dschan, tvb,
|
||||
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_dschan, tvb,
|
||||
2, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_flags, tvb,
|
||||
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_flags, tvb,
|
||||
3, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_us_sf, tvb,
|
||||
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_us_sf, tvb,
|
||||
4, 4, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_n, tvb,
|
||||
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_n, tvb,
|
||||
8, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_start, tvb,
|
||||
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_start, tvb,
|
||||
10, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_end, tvb,
|
||||
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_end, tvb,
|
||||
11, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_ts_start, tvb,
|
||||
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_ts_start, tvb,
|
||||
12, 4, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_ts_end, tvb,
|
||||
proto_tree_add_item (dpvrsp_tree, hf_docsis_dpvrsp_ts_end, tvb,
|
||||
16, 4, ENC_BIG_ENDIAN);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ static const value_string mdd_tlv_vals[] = {
|
|||
{CM_STATUS_EVENT_CONTROL , "CM-STATUS Event Control"},
|
||||
{UPSTREAM_TRANSMIT_POWER_REPORTING , "Upstream Transmit Power Reporting"},
|
||||
{DSG_DA_TO_DSID_ASSOCIATION_ENTRY , "DSG DA-to-DSID Association Entry"},
|
||||
{CM_STATUS_EVENT_ENABLE_NON_CHANNEL_SPECIFIC_EVENTS ,
|
||||
{CM_STATUS_EVENT_ENABLE_NON_CHANNEL_SPECIFIC_EVENTS ,
|
||||
"CM-STATUS Event Enable for Non-Channel-Specific-Events"},
|
||||
{0, NULL}
|
||||
};
|
||||
|
|
|
@ -49,7 +49,7 @@ static gint ett_docsis_regreqmp = -1;
|
|||
static void
|
||||
dissect_regreqmp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
||||
{
|
||||
|
||||
|
||||
proto_item *it;
|
||||
proto_tree *regreqmp_tree = NULL;
|
||||
tvbuff_t *next_tvb;
|
||||
|
@ -60,7 +60,7 @@ dissect_regreqmp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
{
|
||||
it = proto_tree_add_protocol_format (tree, proto_docsis_regreqmp, tvb, 0, -1,"REG-REQ-MP Message");
|
||||
regreqmp_tree = proto_item_add_subtree (it, ett_docsis_regreqmp);
|
||||
|
||||
|
||||
proto_tree_add_item (regreqmp_tree, hf_docsis_regreqmp_sid, tvb, 0, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (regreqmp_tree, hf_docsis_regreqmp_number_of_fragments, tvb, 2, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (regreqmp_tree, hf_docsis_regreqmp_fragment_sequence_number, tvb, 3, 1, ENC_BIG_ENDIAN);
|
||||
|
|
|
@ -55,22 +55,22 @@ dissect_regrspmp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
proto_item *it;
|
||||
proto_tree *regrspmp_tree = NULL;
|
||||
tvbuff_t *next_tvb;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
col_set_str(pinfo->cinfo, COL_INFO, "REG-RSP-MP Message:");
|
||||
|
||||
|
||||
if (tree)
|
||||
{
|
||||
it = proto_tree_add_protocol_format (tree, proto_docsis_regrspmp, tvb, 0, -1,"REG-RSP-MP Message");
|
||||
regrspmp_tree = proto_item_add_subtree (it, ett_docsis_regrspmp);
|
||||
|
||||
|
||||
proto_tree_add_item (regrspmp_tree, hf_docsis_regrspmp_sid, tvb, 0, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (regrspmp_tree, hf_docsis_regrspmp_response, tvb, 2, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (regrspmp_tree, hf_docsis_regrspmp_number_of_fragments, tvb, 3, 1, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (regrspmp_tree, hf_docsis_regrspmp_fragment_sequence_number, tvb, 4, 1, ENC_BIG_ENDIAN);
|
||||
|
||||
|
||||
}
|
||||
/* Call Dissector for Appendix C TLV's */
|
||||
next_tvb = tvb_new_subset_remaining (tvb, 5);
|
||||
|
@ -124,11 +124,11 @@ proto_register_docsis_regrspmp (void)
|
|||
proto_docsis_regrspmp =
|
||||
proto_register_protocol ("DOCSIS Registration Response Multipart",
|
||||
"DOCSIS Reg-Rsp-Mp", "docsis_regrspmp");
|
||||
|
||||
|
||||
/* Required function calls to register the header fields and subtrees used */
|
||||
proto_register_field_array (proto_docsis_regrspmp, hf, array_length (hf));
|
||||
proto_register_subtree_array (ett, array_length (ett));
|
||||
|
||||
|
||||
register_dissector ("docsis_regrspmp", dissect_regrspmp, proto_docsis_regrspmp);
|
||||
}
|
||||
|
||||
|
@ -141,7 +141,7 @@ void
|
|||
proto_reg_handoff_docsis_regrspmp (void)
|
||||
{
|
||||
dissector_handle_t docsis_regrspmp_handle;
|
||||
|
||||
|
||||
docsis_tlv_handle = find_dissector ("docsis_tlv");
|
||||
docsis_regrspmp_handle = find_dissector ("docsis_regrspmp");
|
||||
dissector_add_uint ("docsis_mgmt", 45, docsis_regrspmp_handle);
|
||||
|
|
|
@ -4499,7 +4499,7 @@ proto_register_docsis_tlv (void)
|
|||
"Ranging Hold-Off (ePS or eRouter)", HFILL}
|
||||
},
|
||||
{&hf_docsis_tlv_mcap_rnghoff_emta,
|
||||
{".16 Ranging Hold-Off (eMTA or EDVA)",
|
||||
{".16 Ranging Hold-Off (eMTA or EDVA)",
|
||||
"docsis_tlv.mcap.rnghoffemta",
|
||||
FT_UINT32, BASE_DEC, VALS (on_off_vals), 0x4,
|
||||
"Ranging Hold-Off (eMTA or EDVA)", HFILL}
|
||||
|
|
|
@ -270,7 +270,7 @@ dissect_type29ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
pos, length, ENC_NA);
|
||||
pos = pos + length;
|
||||
break;
|
||||
/* DOCSIS 2.0 UCD TLV definitions
|
||||
/* DOCSIS 2.0 UCD TLV definitions
|
||||
* #define type29ucd_EXT_PREAMBLE 6
|
||||
* #define type29ucd_SCDMA_MODE_ENABLE 7
|
||||
* #define type29ucd_SCDMA_SPREADING_INTERVAL 8
|
||||
|
@ -407,7 +407,7 @@ dissect_type29ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
THROW (ReportedBoundsError);
|
||||
}
|
||||
pos = pos + length;
|
||||
break;
|
||||
break;
|
||||
/* DOCSIS 1.1 BURST DESCRIPTOR */
|
||||
case type29ucd_BURST_DESCR:
|
||||
it =
|
||||
|
|
|
@ -147,7 +147,7 @@ value_string iuc_vals[] = {
|
|||
{IUC_RESERVED14, "Reserved"},
|
||||
{IUC_EXPANSION, "Expanded IUC"},
|
||||
{0, NULL}
|
||||
|
||||
|
||||
};
|
||||
|
||||
static const value_string last_cw_len_vals[] = {
|
||||
|
@ -168,10 +168,10 @@ static void
|
|||
proto_item *tlv_item;
|
||||
gint len;
|
||||
guint8 upchid, symrate;
|
||||
|
||||
|
||||
len = tvb_reported_length_remaining (tvb, 0);
|
||||
upchid = tvb_get_guint8 (tvb, 0);
|
||||
|
||||
|
||||
/* if the upstream Channel ID is 0 then this is for Telephony Return) */
|
||||
if (upchid > 0)
|
||||
col_add_fstr (pinfo->cinfo, COL_INFO,
|
||||
|
@ -181,7 +181,7 @@ static void
|
|||
col_add_fstr (pinfo->cinfo, COL_INFO,
|
||||
"UCD Message: Channel ID = %u (Telephony Return)",
|
||||
upchid);
|
||||
|
||||
|
||||
if (tree)
|
||||
{
|
||||
ucd_item =
|
||||
|
@ -196,7 +196,7 @@ static void
|
|||
ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item (ucd_tree, hf_docsis_ucd_down_chid, tvb, 3, 1,
|
||||
ENC_BIG_ENDIAN);
|
||||
|
||||
|
||||
pos = 4;
|
||||
while (pos < len)
|
||||
{
|
||||
|
@ -204,7 +204,7 @@ static void
|
|||
tlv_item = proto_tree_add_text (ucd_tree, tvb, pos, -1,
|
||||
"%s",
|
||||
val_to_str(type, channel_tlv_vals,
|
||||
"Unknown TLV (%u)"));
|
||||
"Unknown TLV (%u)"));
|
||||
tlv_tree = proto_item_add_subtree (tlv_item, ett_tlv);
|
||||
proto_tree_add_uint (tlv_tree, hf_docsis_ucd_type,
|
||||
tvb, pos, 1, type);
|
||||
|
@ -635,7 +635,7 @@ static void
|
|||
} /* switch(type) */
|
||||
} /* while (pos < len) */
|
||||
} /* if (tree) */
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* Register the protocol with Wireshark */
|
||||
|
@ -648,7 +648,7 @@ static void
|
|||
void
|
||||
proto_register_docsis_ucd (void)
|
||||
{
|
||||
|
||||
|
||||
/* Setup list of header fields See Section 1.6.1 for details*/
|
||||
static hf_register_info hf[] = {
|
||||
{&hf_docsis_ucd_upstream_chid,
|
||||
|
@ -792,22 +792,22 @@ proto_register_docsis_ucd (void)
|
|||
"TCM Enabled", HFILL}
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
/* Setup protocol subtree array */
|
||||
static gint *ett[] = {
|
||||
&ett_docsis_ucd,
|
||||
&ett_tlv,
|
||||
};
|
||||
|
||||
|
||||
/* Register the protocol name and description */
|
||||
proto_docsis_ucd =
|
||||
proto_register_protocol ("DOCSIS Upstream Channel Descriptor",
|
||||
"DOCSIS UCD", "docsis_ucd");
|
||||
|
||||
|
||||
/* Required function calls to register the header fields and subtrees used */
|
||||
proto_register_field_array (proto_docsis_ucd, hf, array_length (hf));
|
||||
proto_register_subtree_array (ett, array_length (ett));
|
||||
|
||||
|
||||
register_dissector ("docsis_ucd", dissect_ucd, proto_docsis_ucd);
|
||||
}
|
||||
|
||||
|
@ -820,8 +820,8 @@ void
|
|||
proto_reg_handoff_docsis_ucd (void)
|
||||
{
|
||||
dissector_handle_t docsis_ucd_handle;
|
||||
|
||||
|
||||
docsis_ucd_handle = find_dissector ("docsis_ucd");
|
||||
dissector_add_uint ("docsis_mgmt", 0x02, docsis_ucd_handle);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -12,12 +12,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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
@ -59,10 +59,10 @@ int codec_g722_decode(void *context, const void *input, int inputSizeBytes, void
|
|||
short *speech = (short*)output;
|
||||
int decodedBytes = 0;
|
||||
int i;
|
||||
|
||||
|
||||
if (!ctx) return 0;
|
||||
|
||||
if ((inputSizeBytes % L_G722_FRAME_COMPRESSED) != 0)
|
||||
if ((inputSizeBytes % L_G722_FRAME_COMPRESSED) != 0)
|
||||
return 0;
|
||||
|
||||
if (!output)
|
||||
|
@ -72,13 +72,13 @@ int codec_g722_decode(void *context, const void *input, int inputSizeBytes, void
|
|||
((*outputSizeBytes - decodedBytes) >= L_G722_FRAME / 2 * sizeof(short))) {
|
||||
if (EasyG722_decoder(ctx->handle, (unsigned char*)bitstream, ctx->speach_buffer)) {
|
||||
int write_index = 0;
|
||||
|
||||
|
||||
for(i = 0; i < L_G722_FRAME; i+=2) {
|
||||
ctx->speach_buffer[write_index] = ctx->speach_buffer[i];
|
||||
write_index++;
|
||||
}
|
||||
memcpy(speech, ctx->speach_buffer, L_G722_FRAME / 2 * sizeof(short));
|
||||
|
||||
|
||||
speech += L_G722_FRAME / 2;
|
||||
decodedBytes += L_G722_FRAME / 2 * sizeof(short);
|
||||
|
||||
|
|
|
@ -12,12 +12,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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
|
|
@ -12,12 +12,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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
@ -59,9 +59,9 @@ int codec_g7231_decode(void *context, const void *input, int inputSizeBytes, voi
|
|||
const unsigned char *bitstream = (const unsigned char*)input;
|
||||
short *speech = (short*)output;
|
||||
int decodedBytes = 0;
|
||||
|
||||
|
||||
if (!ctx) return 0;
|
||||
|
||||
|
||||
if ( ctx->handle == -1) {
|
||||
if ( bitstream[0] & 0x03 ) {
|
||||
ctx->handle=EasyG7231_init_decoder(FALSE);
|
||||
|
@ -69,10 +69,10 @@ int codec_g7231_decode(void *context, const void *input, int inputSizeBytes, voi
|
|||
} else {
|
||||
ctx->handle=EasyG7231_init_decoder(TRUE);
|
||||
ctx->l_g7231_frame_compressed = L_G7231_FRAME_COMPRESSED_63;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((inputSizeBytes % ctx->l_g7231_frame_compressed) != 0)
|
||||
|
||||
if ((inputSizeBytes % ctx->l_g7231_frame_compressed) != 0)
|
||||
return 0;
|
||||
|
||||
if (!output)
|
||||
|
@ -86,7 +86,7 @@ int codec_g7231_decode(void *context, const void *input, int inputSizeBytes, voi
|
|||
memcpy(speech, ctx->speach_buffer, L_G7231_FRAME * sizeof(short));
|
||||
speech += L_G7231_FRAME;
|
||||
decodedBytes += L_G7231_FRAME * sizeof(short);
|
||||
|
||||
|
||||
}
|
||||
bitstream += ctx->l_g7231_frame_compressed;
|
||||
inputSizeBytes -= ctx->l_g7231_frame_compressed;
|
||||
|
|
|
@ -12,12 +12,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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
|
|
@ -12,12 +12,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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
@ -61,7 +61,7 @@ int codec_g729a_decode(void *context, const void *input, int inputSizeBytes, voi
|
|||
|
||||
if (!ctx) return 0;
|
||||
|
||||
if ((inputSizeBytes % L_G729A_FRAME_COMPRESSED) != 0)
|
||||
if ((inputSizeBytes % L_G729A_FRAME_COMPRESSED) != 0)
|
||||
return 0;
|
||||
|
||||
if (!output)
|
||||
|
|
|
@ -12,12 +12,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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
|
|
@ -12,12 +12,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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
|
|
@ -7,17 +7,17 @@
|
|||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
@ -26,7 +26,7 @@
|
|||
#define _PACKET_ETHERCAT_DATAGRAM_
|
||||
|
||||
/* structure for decoding the header -----------------------------------------*/
|
||||
typedef union
|
||||
typedef union
|
||||
{
|
||||
struct
|
||||
{
|
||||
|
|
|
@ -7,17 +7,17 @@
|
|||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
|
|
@ -7,17 +7,17 @@
|
|||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
|
|
@ -7,17 +7,17 @@
|
|||
* Wireshark - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@wireshark.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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
|
|
@ -151,14 +151,14 @@
|
|||
|
||||
/* USDT (SD_IOPWR) target commands: */
|
||||
|
||||
#define CMD_IOPWR_GETINP (SD_IOPWR * 256 + 0x40) /* Read current digital inputs */
|
||||
#define CMD_IOPWR_GETLATCH (SD_IOPWR * 256 + 0x41) /* Read latched digital inputs */
|
||||
#define CMD_IOPWR_CLRLATCH (SD_IOPWR * 256 + 0x42) /* Read & clear latched inputs */
|
||||
#define CMD_IOPWR_GETOUT (SD_IOPWR * 256 + 0x43) /* Read digital outputs */
|
||||
#define CMD_IOPWR_SETOUT (SD_IOPWR * 256 + 0x44) /* Write digital outputs */
|
||||
#define CMD_IOPWR_SETBIT (SD_IOPWR * 256 + 0x45) /* Set indicated output bit(s) */
|
||||
#define CMD_IOPWR_CLRBIT (SD_IOPWR * 256 + 0x46) /* Clear indicated output bit(s)*/
|
||||
#define CMD_IOPWR_GETPOWER (SD_IOPWR * 256 + 0x47) /* Read inputs at power on time */
|
||||
#define CMD_IOPWR_GETINP (SD_IOPWR * 256 + 0x40) /* Read current digital inputs */
|
||||
#define CMD_IOPWR_GETLATCH (SD_IOPWR * 256 + 0x41) /* Read latched digital inputs */
|
||||
#define CMD_IOPWR_CLRLATCH (SD_IOPWR * 256 + 0x42) /* Read & clear latched inputs */
|
||||
#define CMD_IOPWR_GETOUT (SD_IOPWR * 256 + 0x43) /* Read digital outputs */
|
||||
#define CMD_IOPWR_SETOUT (SD_IOPWR * 256 + 0x44) /* Write digital outputs */
|
||||
#define CMD_IOPWR_SETBIT (SD_IOPWR * 256 + 0x45) /* Set indicated output bit(s) */
|
||||
#define CMD_IOPWR_CLRBIT (SD_IOPWR * 256 + 0x46) /* Clear indicated output bit(s)*/
|
||||
#define CMD_IOPWR_GETPOWER (SD_IOPWR * 256 + 0x47) /* Read inputs at power on time */
|
||||
|
||||
/* Miscellaneous (SD_UTIL) target commands: */
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue