Change "lenght" to "length" and "decypt" to "decrypt"

svn path=/trunk/; revision=22356
This commit is contained in:
Jeff Morriss 2007-07-19 13:05:39 +00:00
parent 9dad88f94b
commit 794a933a2c
8 changed files with 1295 additions and 1295 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1387,7 +1387,7 @@ proto_register_gdsdb(void)
NULL, HFILL }
},
{ &hf_gdsdb_attach_dpb,
{ "Database parameter block", "gdsdb.attach.dpblenght",
{ "Database parameter block", "gdsdb.attach.dpblength",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
@ -1574,7 +1574,7 @@ proto_register_gdsdb(void)
NULL, HFILL }
},
{ &hf_gdsdb_info_buffer_length,
{ "Buffer lenght", "gdsdb.info.bufferlength",
{ "Buffer length", "gdsdb.info.bufferlength",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
@ -1655,7 +1655,7 @@ proto_register_gdsdb(void)
},
/* gdsdb_slice_response */
{ &hf_gdsdb_sliceresponse_length,
{ "Lenght", "gdsdb.sliceresponse.lenght",
{ "Lenght", "gdsdb.sliceresponse.length",
FT_UINT32, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},

File diff suppressed because it is too large Load Diff

View File

@ -180,16 +180,16 @@ static gint dissect_uleb128( tvbuff_t *tvb, gint offset, guint* size)
do {
tmp = tvb_get_guint8(tvb, offset);
offset += 1;
*size |= (tmp & 0x7F) << shift;
shift += 7;
shift += 7;
} while (tmp & 0x80);
return offset - start_offset;
}
static gint dissect_netsync_cmd_error( tvbuff_t *tvb, gint offset, proto_tree *tree, guint size _U_)
static gint dissect_netsync_cmd_error( tvbuff_t *tvb, gint offset, proto_tree *tree, guint size _U_)
{
guint len = 0;
@ -376,7 +376,7 @@ static gint dissect_netsync_cmd_send_delta(tvbuff_t *tvb, gint offset, proto_tr
static gint dissect_netsync_cmd_data(tvbuff_t *tvb, gint offset, proto_tree *tree, guint size _U_)
{
guint len = -1;
proto_tree_add_item(tree, hf_netsync_cmd_data_type, tvb,
offset, 1, FALSE );
offset += 1;
@ -449,19 +449,19 @@ get_netsync_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
/* skip version and command */
offset += 2;
size_bytes = dissect_uleb128( tvb, offset, &size );
/* the calculated size if for the data only, this doesn't
* include the version (1 byte), command (1 byte),
* lenght (size_bytes bytes) and checksum (4 bytes)
* include the version (1 byte), command (1 byte),
* length (size_bytes bytes) and checksum (4 bytes)
*/
return 1 + 1 + size_bytes + size + 4;
}
static void
dissect_netsync_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
dissect_netsync_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
gint offset = 0;
guint8 tmp;
@ -477,7 +477,7 @@ dissect_netsync_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (tree == NULL)
return;
while (tvb_reported_length_remaining(tvb, offset) > 0) {
ti = proto_tree_add_item(tree, proto_netsync, tvb, offset, -1, FALSE);
netsync_tree = proto_item_add_subtree(ti, ett_netsync);
@ -500,12 +500,12 @@ dissect_netsync_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
do {
tmp = tvb_get_guint8(tvb, offset + size_bytes);
size_bytes += 1;
size |= (tmp & 0x7F) << shift;
shift += 7;
shift += 7;
} while (tmp & 0x80);
proto_tree_add_uint(netsync_tree, hf_netsync_size, tvb,
offset, size_bytes, size );
offset += size_bytes;
@ -576,8 +576,8 @@ dissect_netsync_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 4;
proto_item_append_text(netsync_tree, " V%d, Cmd: %s (%d), Size: %d",
version, val_to_str(cmd, netsync_cmd_vals, "(0x%x)"), cmd, size );
proto_item_append_text(netsync_tree, " V%d, Cmd: %s (%d), Size: %d",
version, val_to_str(cmd, netsync_cmd_vals, "(0x%x)"), cmd, size );
proto_item_set_len(netsync_tree, 1+1+size_bytes+size+4);
}
@ -591,7 +591,7 @@ dissect_netsync(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
void
proto_register_netsync(void)
proto_register_netsync(void)
{
static hf_register_info hf[] = {
/* General */
@ -778,7 +778,7 @@ proto_register_netsync(void)
}
void
proto_reg_handoff_netsync(void)
proto_reg_handoff_netsync(void)
{
static gint initialized = 0;
@ -788,7 +788,7 @@ proto_reg_handoff_netsync(void)
initialized = 1;
}
tcp_port_netsync = global_tcp_port_netsync;
tcp_port_netsync = global_tcp_port_netsync;
dissector_add("tcp.port", global_tcp_port_netsync, netsync_handle);
}

View File

@ -1,6 +1,6 @@
/* packet-sebek.c
* Routines for Sebek - Kernel based data capture - packet dissection
* Modified to add sebek V3
* Modified to add sebek V3
* Copyright 2006, Camilo Viecco <cviecco@indiana.edu>
* Copyright 1999, Nathan Neulinger <nneul@umr.edu>
*
@ -170,8 +170,8 @@ dissect_sebek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ti = proto_tree_add_item(tree, proto_sebek, tvb, 0, -1, FALSE);
sebek_tree = proto_item_add_subtree(ti, ett_sebek);
/* check for minimum lenght before deciding where to go*/
if (tvb->length<6)
/* check for minimum length before deciding where to go*/
if (tvb->length<6)
sebek_ver = 0;
else
sebek_ver = tvb_get_ntohs(tvb, 4);
@ -230,7 +230,7 @@ dissect_sebek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ts.secs = tvb_get_ntohl(tvb, offset);
ts.nsecs = tvb_get_ntohl(tvb, offset+4);
proto_tree_add_time(sebek_tree, hf_sebek_time, tvb, offset, 8, &ts);
offset += 8;
offset += 8;
proto_tree_add_item(sebek_tree, hf_sebek_ppid, tvb, offset, 4, FALSE);
offset += 4;

View File

@ -1225,7 +1225,7 @@ snmp_variable_decode(tvbuff_t *tvb, proto_tree *snmp_tree, asn1_ctx_t *actx,tvbu
static void set_ue_keys(snmp_ue_assoc_t* n ) {
guint key_size = n->user.authModel->key_size;
n->user.authKey.data = se_alloc(key_size);
n->user.authKey.len = key_size;
n->user.authModel->pass2key(n->user.authPassword.data,
@ -1233,7 +1233,7 @@ static void set_ue_keys(snmp_ue_assoc_t* n ) {
n->engine.data,
n->engine.len,
n->user.authKey.data);
n->user.privKey.data = se_alloc(key_size);
n->user.privKey.len = key_size;
n->user.authModel->pass2key(n->user.privPassword.data,
@ -1245,29 +1245,29 @@ static void set_ue_keys(snmp_ue_assoc_t* n ) {
static snmp_ue_assoc_t* ue_se_dup(snmp_ue_assoc_t* o) {
snmp_ue_assoc_t* d = se_memdup(o,sizeof(snmp_ue_assoc_t));
d->user.authModel = o->user.authModel;
d->user.privProtocol = o->user.privProtocol;
d->user.userName.data = se_memdup(o->user.userName.data,o->user.userName.len);
d->user.userName.len = o->user.userName.len;
d->user.authPassword.data = o->user.authPassword.data ? se_memdup(o->user.authPassword.data,o->user.authPassword.len) : NULL;
d->user.authPassword.len = o->user.authPassword.len;
d->user.privPassword.data = o->user.privPassword.data ? se_memdup(o->user.privPassword.data,o->user.privPassword.len) : NULL;
d->user.privPassword.len = o->user.privPassword.len;
d->engine.len = o->engine.len;
if (d->engine.len) {
d->engine.data = se_memdup(o->engine.data,o->engine.len);
set_ue_keys(d);
}
return d;
}
@ -1276,7 +1276,7 @@ static snmp_ue_assoc_t* ue_se_dup(snmp_ue_assoc_t* o) {
static void renew_ue_cache(void) {
if (num_ueas) {
guint i;
localized_ues = NULL;
unlocalized_ues = NULL;
@ -1285,7 +1285,7 @@ static void renew_ue_cache(void) {
if (a->engine.len) {
CACHE_INSERT(localized_ues,a);
} else {
CACHE_INSERT(unlocalized_ues,a);
}
@ -1305,7 +1305,7 @@ static snmp_ue_assoc_t* localize_ue( snmp_ue_assoc_t* o, const guint8* engine, g
n->engine.len = engine_len;
set_ue_keys(n);
return n;
}
@ -1483,7 +1483,7 @@ static tvbuff_t* snmp_usm_priv_des(snmp_usm_params_t* p _U_, tvbuff_t* encrypted
salt_len = tvb_length_remaining(p->priv_tvb,0);
if (salt_len != 8) {
*error = "decryptionError: msgPrivacyParameters lenght != 8";
*error = "decryptionError: msgPrivacyParameters length != 8";
return NULL;
}
@ -1551,7 +1551,7 @@ static tvbuff_t* snmp_usm_priv_aes(snmp_usm_params_t* p _U_, tvbuff_t* encrypted
priv_len = tvb_length_remaining(p->priv_tvb,0);
if (priv_len != 8) {
*error = "decryptionError: msgPrivacyParameters lenght != 8";
*error = "decryptionError: msgPrivacyParameters length != 8";
return NULL;
}
@ -1662,7 +1662,7 @@ static int
dissect_snmp_Integer_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 343 "snmp.cnf"
guint length;
snmp_variable_decode(tvb, tree, actx, oid_tvb, offset, &length, NULL);
offset = offset + length;
@ -1680,7 +1680,7 @@ static int
dissect_snmp_String_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 337 "snmp.cnf"
guint length;
snmp_variable_decode(tvb, tree, actx, oid_tvb, offset, &length, &value_tvb);
offset = offset + length;
@ -1698,7 +1698,7 @@ static int
dissect_snmp_ObjectID_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 349 "snmp.cnf"
guint length;
snmp_variable_decode(tvb, tree, actx, oid_tvb, offset, &length, NULL);
offset = offset + length;
@ -1716,7 +1716,7 @@ static int
dissect_snmp_Empty(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 355 "snmp.cnf"
guint length;
snmp_variable_decode(tvb, tree, actx, oid_tvb, offset, &length, NULL);
offset = offset + length;
@ -1917,7 +1917,7 @@ dissect_snmp_T_internet(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
/* see http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1125 */
guint32 len;
int cur_offset;
cur_offset = get_ber_identifier(tvb, offset, NULL, NULL, NULL);
get_ber_length(NULL, tvb, cur_offset, &len, NULL);
@ -1926,7 +1926,7 @@ dissect_snmp_T_internet(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
case 16: offset = dissect_snmp_IpAddressIpv6(FALSE, tvb, offset, actx, tree, hf_snmp_internet_ipv6); break;
default: offset = dissect_snmp_IpAddressOther(FALSE, tvb, offset, actx, tree, hf_snmp_internet_other); break;
}
if (len != 4) {
proto_item* pi = get_ber_last_created_item();
proto_tree* pt = proto_item_add_subtree(pi,ett_internet);
@ -1943,7 +1943,7 @@ dissect_snmp_T_internet(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
expert_add_info_format( actx->pinfo, pi, PI_MALFORMED, PI_ERROR,
"Corrupt and Invalid packet" );
}
@ -2172,8 +2172,8 @@ dissect_snmp_VarBind(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U
VarBind_sequence, hf_index, ett_snmp_VarBind);
if (oid_tvb && value_tvb) {
next_tvb_add_string(&var_list, value_tvb, (snmp_var_in_tree) ? tree : NULL,
variable_oid_dissector_table,
next_tvb_add_string(&var_list, value_tvb, (snmp_var_in_tree) ? tree : NULL,
variable_oid_dissector_table,
oid_to_str(tvb_get_ptr(oid_tvb, 0, tvb_length(oid_tvb)), tvb_length(oid_tvb)));
}
@ -2844,11 +2844,11 @@ dissect_snmp_T_msgFlags(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
if (parameter_tvb){
guint8 v3_flags = tvb_get_guint8(parameter_tvb, 0);
proto_tree* flags_tree = proto_item_add_subtree(get_ber_last_created_item(),ett_msgFlags);
proto_tree_add_item(flags_tree, hf_snmp_v3_flags_report, parameter_tvb, 0, 1, FALSE);
proto_tree_add_item(flags_tree, hf_snmp_v3_flags_crypt, parameter_tvb, 0, 1, FALSE);
proto_tree_add_item(flags_tree, hf_snmp_v3_flags_auth, parameter_tvb, 0, 1, FALSE);
usm_p.encrypted = v3_flags & TH_CRYPT ? TRUE : FALSE;
usm_p.authenticated = v3_flags & TH_AUTH ? TRUE : FALSE;
}
@ -2901,7 +2901,7 @@ dissect_snmp_T_msgSecurityParameters(gboolean implicit_tag _U_, tvbuff_t *tvb _U
#line 250 "snmp.cnf"
switch(MsgSecurityModel){
case SNMP_SEC_USM: /* 3 */
case SNMP_SEC_USM: /* 3 */
offset = dissect_snmp_UsmSecurityParameters(FALSE, tvb, offset+2, actx, tree, -1);
usm_p.user_assoc = get_user_assoc(usm_p.engine_tvb, usm_p.user_tvb);
break;
@ -2953,7 +2953,7 @@ dissect_snmp_T_encryptedPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of
if( usm_p.encrypted && crypt_tvb
&& usm_p.user_assoc
&& usm_p.user_assoc->user.privProtocol ) {
const gchar* error = NULL;
proto_tree* encryptedpdu_tree = proto_item_add_subtree(get_ber_last_created_item(),ett_encryptedPDU);
tvbuff_t* cleartext_tvb = usm_p.user_assoc->user.privProtocol(&usm_p, crypt_tvb, &error );
@ -2961,10 +2961,10 @@ dissect_snmp_T_encryptedPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of
if (! cleartext_tvb) {
proto_item* cause = proto_tree_add_text(encryptedpdu_tree, cleartext_tvb, 0, -1,
"Failed to decrypt encryptedPDU: %s", error);
expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN,
"Failed to decrypt encryptedPDU: %s", error);
return offset;
} else {
proto_item* decrypted_item;
@ -2973,16 +2973,16 @@ dissect_snmp_T_encryptedPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of
if (! check_ScopedPdu(cleartext_tvb)) {
proto_item* cause = proto_tree_add_text(encryptedpdu_tree, cleartext_tvb, 0, -1,
"Decrypted data not formated as expected, wrong key?");
expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN,
"Decrypted data not formated as expected");
return offset;
}
add_new_data_source(actx->pinfo, cleartext_tvb, "Decrypted ScopedPDU");
tvb_set_child_real_data_tvbuff(tvb, cleartext_tvb);
decrypted_item = proto_tree_add_item(encryptedpdu_tree, hf_snmp_decryptedPDU,cleartext_tvb,0,-1,FALSE);
decrypted_tree = proto_item_add_subtree(decrypted_item,ett_decrypted);
dissect_snmp_ScopedPDU(FALSE, cleartext_tvb, 0, actx, decrypted_tree, -1);
@ -3046,7 +3046,7 @@ dissect_snmp_SNMPv3Message(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off
proto_tree* authen_tree = proto_item_add_subtree(usm_p.auth_item,ett_authParameters);
guint8* calc_auth;
guint calc_auth_len;
usm_p.authOK = usm_p.user_assoc->user.authModel->authenticate( &usm_p, &calc_auth, &calc_auth_len, &error );
if (error) {
@ -3055,11 +3055,11 @@ dissect_snmp_SNMPv3Message(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off
expert_add_info_format( actx->pinfo, authen_item, PI_MALFORMED, PI_ERROR, "Error while verifying Messsage authenticity: %s", error );
} else {
int severity;
gchar* fmt;
gchar* fmt;
authen_item = proto_tree_add_boolean(authen_tree, hf_snmp_msgAuthentication, tvb, 0, 0, usm_p.authOK);
PROTO_ITEM_SET_GENERATED(authen_item);
if (usm_p.authOK) {
fmt = "SNMP Authentication OK";
severity = PI_CHAT;
@ -3760,7 +3760,7 @@ static void* snmp_users_copy_cb(void* dest, const void* orig, unsigned len _U_)
d->auth_model = o->auth_model;
d->user.authModel = auth_models[o->auth_model];
d->priv_proto = o->priv_proto;
d->user.privProtocol = priv_protos[o->priv_proto];
@ -3772,18 +3772,18 @@ static void* snmp_users_copy_cb(void* dest, const void* orig, unsigned len _U_)
d->user.privPassword.data = o->user.privPassword.data ? g_memdup(o->user.privPassword.data,o->user.privPassword.len) : NULL;
d->user.privPassword.len = o->user.privPassword.len;
d->engine.len = o->engine.len;
if (o->engine.data) {
d->engine.data = g_memdup(o->engine.data,o->engine.len);
}
d->user.authKey.data = o->user.authKey.data ? g_memdup(o->user.authKey.data,o->user.authKey.len) : NULL;
d->user.authKey.len = o->user.authKey.len;
d->user.privKey.data = o->user.privKey.data ? g_memdup(o->user.privKey.data,o->user.privKey.len) : NULL;
d->user.privKey.len = o->user.privKey.len;
return d;
}
@ -3811,10 +3811,10 @@ static void snmp_users_update_cb(void* p _U_, const char** err) {
g_string_truncate(es,es->len-2);
*err = ep_strdup(es->str);
}
g_string_free(es,TRUE);
return;
return;
}
UAT_LSTRING_CB_DEF(snmp_users,userName,snmp_ue_assoc_t,user.userName.data,user.userName.len)
@ -4236,7 +4236,7 @@ void proto_register_snmp(void) {
&ett_decrypted,
&ett_authParameters,
&ett_internet,
/*--- Included file: packet-snmp-ettarr.c ---*/
#line 1 "packet-snmp-ettarr.c"
@ -4278,7 +4278,7 @@ void proto_register_snmp(void) {
UAT_FLD_LSTRING(snmp_users,privPassword,"The password used for encrypting packets for this entry"),
UAT_END_FIELDS
};
assocs_uat = uat_new("SNMP Users",
sizeof(snmp_ue_assoc_t),
"snmp_users",
@ -4290,7 +4290,7 @@ void proto_register_snmp(void) {
snmp_users_update_cb,
snmp_users_free_cb,
fields);
#ifdef HAVE_NET_SNMP
#ifdef _WIN32
@ -4368,7 +4368,7 @@ void proto_register_snmp(void) {
"Users Table",
"Table of engine-user associations used for authentication and decryption",
assocs_uat);
variable_oid_dissector_table =
register_dissector_table("snmp.variable_oid",
"SNMP Variable OID", FT_STRING, BASE_NONE);

File diff suppressed because it is too large Load Diff

View File

@ -44,11 +44,11 @@ static int proto_t30 = -1;
static int hf_t30_Address = -1;
static int hf_t30_Control = -1;
static int hf_t30_Facsimile_Control = -1;
static int hf_t30_fif_sm = -1;
static int hf_t30_fif_rtif = -1;
static int hf_t30_fif_3gmn = -1;
static int hf_t30_fif_v8c = -1;
static int hf_t30_fif_op = -1;
static int hf_t30_fif_sm = -1;
static int hf_t30_fif_rtif = -1;
static int hf_t30_fif_3gmn = -1;
static int hf_t30_fif_v8c = -1;
static int hf_t30_fif_op = -1;
static int hf_t30_fif_rtfc = -1;
static int hf_t30_fif_rfo = -1;
static int hf_t30_fif_dsr = -1;
@ -477,20 +477,20 @@ guint8 reverse_byte(guint8 val)
}
#define LENGTH_T30_NUM 20
gchar *
gchar *
t30_get_string_numbers(tvbuff_t *tvb, int offset, int len)
{
gchar *buf;
int i;
/* the lenght must be 20 bytes per T30 rec*/
/* the length must be 20 bytes per T30 rec*/
if (len != LENGTH_T30_NUM) return NULL;
buf=ep_alloc(LENGTH_T30_NUM+1);
for (i=0; i<LENGTH_T30_NUM; i++)
for (i=0; i<LENGTH_T30_NUM; i++)
buf[LENGTH_T30_NUM-i-1] = reverse_byte(tvb_get_guint8(tvb, offset+i));
/* add end of string */
buf[LENGTH_T30_NUM] = '\0';
@ -508,16 +508,16 @@ dissect_t30_numbers(tvbuff_t *tvb, int offset, packet_info *pinfo, int len, prot
proto_tree_add_string_format(tree, hf_t30_fif_number, tvb, offset, LENGTH_T30_NUM, str_num, "Number: %s", str_num);
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " - Number:%s", str_num );
col_append_fstr(pinfo->cinfo, COL_INFO, " - Number:%s", str_num );
if (pinfo->private_data)
if (pinfo->private_data)
g_snprintf(((t38_packet_info*)pinfo->private_data)->desc, MAX_T38_DESC, "Num: %s", str_num);
}
else {
proto_tree_add_text(tree, tvb, offset, tvb_reported_length_remaining(tvb, offset), "[MALFORMED OR SHORT PACKET: number of digits must be 20]");
if (check_col(pinfo->cinfo, COL_INFO))
col_append_str(pinfo->cinfo, COL_INFO, " [MALFORMED OR SHORT PACKET: number of digits must be 20]" );
col_append_str(pinfo->cinfo, COL_INFO, " [MALFORMED OR SHORT PACKET: number of digits must be 20]" );
}
}
@ -531,10 +531,10 @@ dissect_t30_facsimile_coded_data(tvbuff_t *tvb, int offset, packet_info *pinfo,
proto_tree_add_text(tree, tvb, offset, tvb_reported_length_remaining(tvb, offset), "[MALFORMED OR SHORT PACKET: FCD length must be at least 2 bytes]");
expert_add_info_format(pinfo, NULL, PI_MALFORMED, PI_ERROR, "T30 FCD length must be at least 2 bytes");
if (check_col(pinfo->cinfo, COL_INFO))
col_append_str(pinfo->cinfo, COL_INFO, " [MALFORMED OR SHORT PACKET]");
col_append_str(pinfo->cinfo, COL_INFO, " [MALFORMED OR SHORT PACKET]");
return;
}
octet = tvb_get_guint8(tvb, offset);
proto_tree_add_uint(tree, hf_t30_t4_frame_num, tvb, offset, 1, reverse_byte(octet));
offset++;
@ -542,7 +542,7 @@ dissect_t30_facsimile_coded_data(tvbuff_t *tvb, int offset, packet_info *pinfo,
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " - Frame num:%d", reverse_byte(octet));
if (pinfo->private_data)
if (pinfo->private_data)
g_snprintf(((t38_packet_info*)pinfo->private_data)->desc, MAX_T38_DESC, "Frm num: %d", reverse_byte(octet));
t4_data = ep_alloc(len-1);
@ -560,10 +560,10 @@ dissect_t30_non_standard_cap(tvbuff_t *tvb, int offset, packet_info *pinfo, int
proto_tree_add_text(tree, tvb, offset, tvb_reported_length_remaining(tvb, offset), "[MALFORMED OR SHORT PACKET: NSC length must be at least 2 bytes]");
expert_add_info_format(pinfo, NULL, PI_MALFORMED, PI_ERROR, "T30 NSC length must be at least 2 bytes");
if (check_col(pinfo->cinfo, COL_INFO))
col_append_str(pinfo->cinfo, COL_INFO, " [MALFORMED OR SHORT PACKET]");
col_append_str(pinfo->cinfo, COL_INFO, " [MALFORMED OR SHORT PACKET]");
return;
}
octet = tvb_get_guint8(tvb, offset);
proto_tree_add_uint(tree, hf_t30_fif_country_code, tvb, offset, 1, octet);
offset++;
@ -583,7 +583,7 @@ dissect_t30_partial_page_signal(tvbuff_t *tvb, int offset, packet_info *pinfo, i
proto_tree_add_text(tree, tvb, offset, tvb_reported_length_remaining(tvb, offset), "[MALFORMED OR SHORT PACKET: PPS length must be 4 bytes]");
expert_add_info_format(pinfo, NULL, PI_MALFORMED, PI_ERROR, "T30 PPS length must be 4 bytes");
if (check_col(pinfo->cinfo, COL_INFO))
col_append_str(pinfo->cinfo, COL_INFO, " [MALFORMED OR SHORT PACKET]");
col_append_str(pinfo->cinfo, COL_INFO, " [MALFORMED OR SHORT PACKET]");
return;
}
@ -609,7 +609,7 @@ dissect_t30_partial_page_signal(tvbuff_t *tvb, int offset, packet_info *pinfo, i
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " - PC:%d BC:%d FC:%d", page_count, block_count, frame_count);
if (pinfo->private_data)
if (pinfo->private_data)
g_snprintf(((t38_packet_info*)pinfo->private_data)->desc, MAX_T38_DESC, "PC:%d BC:%d FC:%d", page_count, block_count, frame_count);
}
@ -623,13 +623,13 @@ dissect_t30_dis_dtc(tvbuff_t *tvb, int offset, packet_info *pinfo, int len, prot
proto_tree_add_text(tree, tvb, offset, tvb_reported_length_remaining(tvb, offset), "[MALFORMED OR SHORT PACKET: DIS length must be at least 4 bytes]");
expert_add_info_format(pinfo, NULL, PI_MALFORMED, PI_ERROR, "T30 DIS length must be at least 4 bytes");
if (check_col(pinfo->cinfo, COL_INFO))
col_append_str(pinfo->cinfo, COL_INFO, " [MALFORMED OR SHORT PACKET]");
col_append_str(pinfo->cinfo, COL_INFO, " [MALFORMED OR SHORT PACKET]");
return;
}
/* bits 1 to 8 */
octet = tvb_get_guint8(tvb, offset);
proto_tree_add_boolean(tree, hf_t30_fif_sm, tvb, offset, 1, octet);
proto_tree_add_boolean(tree, hf_t30_fif_rtif, tvb, offset, 1, octet);
proto_tree_add_boolean(tree, hf_t30_fif_3gmn, tvb, offset, 1, octet);
@ -649,7 +649,7 @@ dissect_t30_dis_dtc(tvbuff_t *tvb, int offset, packet_info *pinfo, int len, prot
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " - DSR:%s", val_to_str((octet&0x3C) >> 2, t30_data_signalling_rate_vals, "<unknown>"));
if (pinfo->private_data)
if (pinfo->private_data)
g_snprintf(((t38_packet_info*)pinfo->private_data)->desc, MAX_T38_DESC, "DSR:%s", val_to_str((octet&0x3C) >> 2, t30_data_signalling_rate_vals, "<unknown>"));
}
else {
@ -658,7 +658,7 @@ dissect_t30_dis_dtc(tvbuff_t *tvb, int offset, packet_info *pinfo, int len, prot
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " - DSR:%s", val_to_str((octet&0x3C) >> 2, t30_data_signalling_rate_dcs_vals, "<unknown>"));
if (pinfo->private_data)
if (pinfo->private_data)
g_snprintf(((t38_packet_info*)pinfo->private_data)->desc, MAX_T38_DESC, "DSR:%s", val_to_str((octet&0x3C) >> 2, t30_data_signalling_rate_dcs_vals, "<unknown>"));
}
proto_tree_add_boolean(tree, hf_t30_fif_res, tvb, offset, 1, octet);
@ -691,7 +691,7 @@ dissect_t30_dis_dtc(tvbuff_t *tvb, int offset, packet_info *pinfo, int len, prot
proto_tree_add_boolean(tree, hf_t30_fif_t6, tvb, offset, 1, octet);
proto_tree_add_boolean(tree, hf_t30_fif_ext, tvb, offset, 1, octet);
if ( !(octet & 0x01) || (len < 5) ) return; /* no extension */
if ( !(octet & 0x01) || (len < 5) ) return; /* no extension */
/* bits 33 to 40 */
offset += 1;
@ -707,7 +707,7 @@ dissect_t30_dis_dtc(tvbuff_t *tvb, int offset, packet_info *pinfo, int len, prot
proto_tree_add_boolean(tree, hf_t30_fif_vc32k, tvb, offset, 1, octet);
proto_tree_add_boolean(tree, hf_t30_fif_ext, tvb, offset, 1, octet);
if ( !(octet & 0x01) || (len < 6) ) return; /* no extension */
if ( !(octet & 0x01) || (len < 6) ) return; /* no extension */
/* bits 41 to 48 */
offset += 1;
@ -726,7 +726,7 @@ dissect_t30_dis_dtc(tvbuff_t *tvb, int offset, packet_info *pinfo, int len, prot
}
proto_tree_add_boolean(tree, hf_t30_fif_ext, tvb, offset, 1, octet);
if ( !(octet & 0x01) || (len < 7) ) return; /* no extension */
if ( !(octet & 0x01) || (len < 7) ) return; /* no extension */
/* bits 49 to 56 */
offset += 1;
@ -744,7 +744,7 @@ dissect_t30_dis_dtc(tvbuff_t *tvb, int offset, packet_info *pinfo, int len, prot
proto_tree_add_boolean(tree, hf_t30_fif_edi, tvb, offset, 1, octet);
proto_tree_add_boolean(tree, hf_t30_fif_ext, tvb, offset, 1, octet);
if ( !(octet & 0x01) || (len < 8) ) return; /* no extension */
if ( !(octet & 0x01) || (len < 8) ) return; /* no extension */
/* bits 57 to 64 */
offset += 1;
@ -756,7 +756,7 @@ dissect_t30_dis_dtc(tvbuff_t *tvb, int offset, packet_info *pinfo, int len, prot
proto_tree_add_boolean(tree, hf_t30_fif_mm, tvb, offset, 1, octet);
proto_tree_add_boolean(tree, hf_t30_fif_ext, tvb, offset, 1, octet);
if ( !(octet & 0x01) || (len < 9) ) return; /* no extension */
if ( !(octet & 0x01) || (len < 9) ) return; /* no extension */
/* bits 65 to 72 */
offset += 1;
@ -771,7 +771,7 @@ dissect_t30_dis_dtc(tvbuff_t *tvb, int offset, packet_info *pinfo, int len, prot
proto_tree_add_boolean(tree, hf_t30_fif_12c, tvb, offset, 1, octet);
proto_tree_add_boolean(tree, hf_t30_fif_ext, tvb, offset, 1, octet);
if ( !(octet & 0x01) || (len < 10) ) return; /* no extension */
if ( !(octet & 0x01) || (len < 10) ) return; /* no extension */
/* bits 73 to 80 */
offset += 1;
@ -786,7 +786,7 @@ dissect_t30_dis_dtc(tvbuff_t *tvb, int offset, packet_info *pinfo, int len, prot
proto_tree_add_boolean(tree, hf_t30_fif_spsco, tvb, offset, 1, octet);
proto_tree_add_boolean(tree, hf_t30_fif_ext, tvb, offset, 1, octet);
if ( !(octet & 0x01) || (len < 11) ) return; /* no extension */
if ( !(octet & 0x01) || (len < 11) ) return; /* no extension */
/* bits 81 to 88 */
offset += 1;
@ -801,7 +801,7 @@ dissect_t30_dis_dtc(tvbuff_t *tvb, int offset, packet_info *pinfo, int len, prot
proto_tree_add_boolean(tree, hf_t30_fif_hfx40i, tvb, offset, 1, octet);
proto_tree_add_boolean(tree, hf_t30_fif_ext, tvb, offset, 1, octet);
if ( !(octet & 0x01) || (len < 12) ) return; /* no extension */
if ( !(octet & 0x01) || (len < 12) ) return; /* no extension */
/* bits 89 to 96 */
offset += 1;
@ -815,7 +815,7 @@ dissect_t30_dis_dtc(tvbuff_t *tvb, int offset, packet_info *pinfo, int len, prot
proto_tree_add_boolean(tree, hf_t30_fif_plmss, tvb, offset, 1, octet);
proto_tree_add_boolean(tree, hf_t30_fif_ext, tvb, offset, 1, octet);
if ( !(octet & 0x01) || (len < 13) ) return; /* no extension */
if ( !(octet & 0x01) || (len < 13) ) return; /* no extension */
/* bits 97 to 104 */
offset += 1;
@ -831,7 +831,7 @@ dissect_t30_dis_dtc(tvbuff_t *tvb, int offset, packet_info *pinfo, int len, prot
proto_tree_add_boolean(tree, hf_t30_fif_ira, tvb, offset, 1, octet);
proto_tree_add_boolean(tree, hf_t30_fif_ext, tvb, offset, 1, octet);
if ( !(octet & 0x01) || (len < 14) ) return; /* no extension */
if ( !(octet & 0x01) || (len < 14) ) return; /* no extension */
/* bits 105 to 112 */
offset += 1;
@ -846,7 +846,7 @@ dissect_t30_dis_dtc(tvbuff_t *tvb, int offset, packet_info *pinfo, int len, prot
proto_tree_add_boolean(tree, hf_t30_fif_cg1200x1200, tvb, offset, 1, octet);
proto_tree_add_boolean(tree, hf_t30_fif_ext, tvb, offset, 1, octet);
if ( !(octet & 0x01) || (len < 15) ) return; /* no extension */
if ( !(octet & 0x01) || (len < 15) ) return; /* no extension */
/* bits 113 to 120 */
offset += 1;
@ -859,8 +859,8 @@ dissect_t30_dis_dtc(tvbuff_t *tvb, int offset, packet_info *pinfo, int len, prot
proto_tree_add_uint(tree, hf_t30_fif_sdmc, tvb, offset, 1, octet);
proto_tree_add_boolean(tree, hf_t30_fif_ext, tvb, offset, 1, octet);
if ( !(octet & 0x01) ) return; /* no extension */
if ( !(octet & 0x01) ) return; /* no extension */
}
static int
@ -879,14 +879,14 @@ dissect_t30_hdlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_text(tree, tvb, offset, tvb_reported_length_remaining(tvb, offset), "[MALFORMED OR SHORT PACKET: hdlc T30 length must be at least 4 bytes]");
expert_add_info_format(pinfo, NULL, PI_MALFORMED, PI_ERROR, "T30 length must be at least 4 bytes");
if (check_col(pinfo->cinfo, COL_INFO))
col_append_str(pinfo->cinfo, COL_INFO, " (HDLC Reassembled: [MALFORMED OR SHORT PACKET])");
col_append_str(pinfo->cinfo, COL_INFO, " (HDLC Reassembled: [MALFORMED OR SHORT PACKET])");
return offset;
}
/* if (tree) {
proto_item *item;*/
if (check_col(pinfo->cinfo, COL_INFO))
col_append_str(pinfo->cinfo, COL_INFO, " (HDLC Reassembled:");
col_append_str(pinfo->cinfo, COL_INFO, " (HDLC Reassembled:");
it=proto_tree_add_protocol_format(tree, proto_t30, tvb, offset, -1,
"ITU-T Recommendation T.30");
@ -913,7 +913,7 @@ dissect_t30_hdlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (check_col(pinfo->cinfo, COL_INFO))
col_append_fstr(pinfo->cinfo, COL_INFO, " %s - %s", val_to_str(octet & 0x7F, t30_facsimile_control_field_vals_short, "<unknown>"),
val_to_str(octet & 0x7F, t30_facsimile_control_field_vals, "<unknown>") );
val_to_str(octet & 0x7F, t30_facsimile_control_field_vals, "<unknown>") );
switch (octet & 0x7F) {
case T30_FC_DIS:
@ -947,10 +947,10 @@ dissect_t30_hdlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
if (check_col(pinfo->cinfo, COL_INFO))
col_append_str(pinfo->cinfo, COL_INFO, ")");
col_append_str(pinfo->cinfo, COL_INFO, ")");
/* }*/
return offset;
}
@ -1220,7 +1220,7 @@ proto_register_t30(void)
{ &hf_t30_fif_ira,
{ "Internet Routing Address (IRA)", "t30.fif.ira", FT_BOOLEAN, 8,
TFS(&flags_set_truth), 0x04, "", HFILL }},
{ &hf_t30_fif_600x600,
{ "600 pels/25.4 mm x 600 lines/25.4 mm", "t30.fif.600x600", FT_BOOLEAN, 8,
TFS(&flags_set_truth), 0x80, "", HFILL }},
@ -1269,7 +1269,7 @@ proto_register_t30(void)
{ &hf_t30_fif_non_stand_bytes,
{ "Non-standard capabilities", "t30.fif.non_standard_cap", FT_BYTES, BASE_HEX,
NULL, 0, "Non-standard capabilities", HFILL }},
{ &hf_t30_t4_frame_num,
{ "T.4 Frame number", "t30.t4.frame_num", FT_UINT8, BASE_DEC,
NULL, 0, "T.4 Frame number", HFILL }},
@ -1279,7 +1279,7 @@ proto_register_t30(void)
{ &hf_t30_partial_page_fcf2,
{ "Post-message command", "t30.pps.fcf2", FT_UINT8, BASE_DEC,
VALS(t30_partial_page_fcf2_vals), 0, "Post-message command", HFILL }},
VALS(t30_partial_page_fcf2_vals), 0, "Post-message command", HFILL }},
{ &hf_t30_partial_page_i1,
{ "Page counter", "t30.t4.page_count", FT_UINT8, BASE_DEC,
NULL, 0, "Page counter", HFILL }},