Frame numbers are unsigned, print them as such

svn path=/trunk/; revision=21443
This commit is contained in:
Jeff Morriss 2007-04-16 04:52:51 +00:00
parent 1295039ee9
commit 00cf2ec89c
7 changed files with 27 additions and 27 deletions

View File

@ -413,7 +413,7 @@ camelsrt_begin_call_matching(packet_info *pinfo,
/* look up the request */
#ifdef DEBUG_CAMELSRT
dbg(10,"\n Session begin #%d\n", pinfo->fd->num);
dbg(10,"\n Session begin #%u\n", pinfo->fd->num);
dbg(11,"Search key %lu ",camelsrt_call_key.SessionIdKey);
#endif
p_camelsrt_call = (struct camelsrt_call_t *)g_hash_table_lookup(srt_calls, &camelsrt_call_key);
@ -452,7 +452,7 @@ camelsrt_request_call_matching(tvbuff_t *tvb, packet_info *pinfo,
proto_item *ti;
#ifdef DEBUG_CAMELSRT
dbg(10,"\n %s #%d\n", val_to_str(srt_type, camelSRTtype_naming, "Unk"),pinfo->fd->num);
dbg(10,"\n %s #%u\n", val_to_str(srt_type, camelSRTtype_naming, "Unk"),pinfo->fd->num);
#endif
/* look only for matching request, if matching conversation is available. */
@ -507,7 +507,7 @@ camelsrt_request_call_matching(tvbuff_t *tvb, packet_info *pinfo,
/* We have not yet seen a request to that call, so this must be the first request
remember its frame number. */
#ifdef DEBUG_CAMELSRT
dbg(5,"Set reqlink #%d ", pinfo->fd->num);
dbg(5,"Set reqlink #%u ", pinfo->fd->num);
#endif
update_camelsrt_call(p_camelsrt_call, pinfo, srt_type);
} else {
@ -528,7 +528,7 @@ camelsrt_request_call_matching(tvbuff_t *tvb, packet_info *pinfo,
if (pinfo->fd->num > p_camelsrt_call->category[srt_type].req_num) {
p_camelsrt_call->category[srt_type].req_num = pinfo->fd->num;
#ifdef DEBUG_CAMELSRT
dbg(5,"DISC Set reqlink #%d ", pinfo->fd->num);
dbg(5,"DISC Set reqlink #%u ", pinfo->fd->num);
#endif
update_camelsrt_call(p_camelsrt_call, pinfo, srt_type);
} /* greater frame */
@ -571,7 +571,7 @@ camelsrt_report_call_matching(tvbuff_t *tvb, packet_info *pinfo,
proto_item *ti;
#ifdef DEBUG_CAMELSRT
dbg(10,"\n %s #%d\n", val_to_str(srt_type, camelSRTtype_naming, "Unk"),pinfo->fd->num);
dbg(10,"\n %s #%u\n", val_to_str(srt_type, camelSRTtype_naming, "Unk"),pinfo->fd->num);
#endif
camelsrt_call_key.SessionIdKey = p_camelsrt_info->tcap_session_id;
/* look only for matching request, if matching conversation is available. */
@ -610,13 +610,13 @@ camelsrt_report_call_matching(tvbuff_t *tvb, packet_info *pinfo,
/* We have not yet seen a response to that call, so this must be the first response;
remember its frame number only if response comes after request */
#ifdef DEBUG_CAMELSRT
dbg(14,"Set reslink #%d req %d ",pinfo->fd->num, p_camelsrt_call->category[srt_type].req_num);
dbg(14,"Set reslink #%d req %u ",pinfo->fd->num, p_camelsrt_call->category[srt_type].req_num);
#endif
p_camelsrt_call->category[srt_type].rsp_num = pinfo->fd->num;
} else {
#ifdef DEBUG_CAMELSRT
dbg(2,"badreslink #%d req %u ",pinfo->fd->num, p_camelsrt_call->category[srt_type].req_num);
dbg(2,"badreslink #%u req %u ",pinfo->fd->num, p_camelsrt_call->category[srt_type].req_num);
#endif
} /* req_num != 0 */
} else { /* rsp_num != 0 */
@ -678,7 +678,7 @@ camelsrt_close_call_matching(packet_info *pinfo,
p_camelsrt_info->bool_msginfo[CAMELSRT_SESSION]=TRUE;
#ifdef DEBUG_CAMELSRT
dbg(10,"\n Session end #%d\n", pinfo->fd->num);
dbg(10,"\n Session end #%u\n", pinfo->fd->num);
#endif
/* look only for matching request, if matching conversation is available. */
camelsrt_call_key.SessionIdKey = p_camelsrt_info->tcap_session_id;

View File

@ -1797,7 +1797,7 @@ printf("CHOICE dissect_ber_choice(%s) entered len:%d\n",name,tvb_length_remainin
break;
default:
proto_tree_add_text(tree, tvb, offset, len,"dissect_ber_choice(): Was passed a HF field that was not integer type : %s",hfinfo->abbrev);
fprintf(stderr,"dissect_ber_choice(): frame:%d offset:%d Was passed a HF field that was not integer type : %s\n",pinfo->fd->num,offset,hfinfo->abbrev);
fprintf(stderr,"dissect_ber_choice(): frame:%u offset:%d Was passed a HF field that was not integer type : %s\n",pinfo->fd->num,offset,hfinfo->abbrev);
return end_offset;
}
}

View File

@ -112,7 +112,7 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
int cap_len = 0, frame_len = 0;
proto_tree *volatile tree;
proto_item *item;
int frame_number;
guint32 frame_number;
frame_number=pinfo->fd->num; /* dummy so that the buildbot crashdumps
will show the packetnumber where the

View File

@ -383,10 +383,10 @@ add_encryption_key(packet_info *pinfo, int keytype, int keylength, const char *k
if(pinfo->fd->flags.visited){
return;
}
printf("added key in %d\n",pinfo->fd->num);
printf("added key in %u\n",pinfo->fd->num);
new_key=g_malloc(sizeof(enc_key_t));
g_snprintf(new_key->key_origin, KRB_MAX_ORIG_LEN, "%s learnt from frame %d",origin,pinfo->fd->num);
g_snprintf(new_key->key_origin, KRB_MAX_ORIG_LEN, "%s learnt from frame %u",origin,pinfo->fd->num);
new_key->next=enc_key_list;
enc_key_list=new_key;
new_key->keytype=keytype;
@ -514,7 +514,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
if((ret == 0) && (length>0)){
char *user_data;
printf("woohoo decrypted keytype:%d in frame:%d\n", keytype, pinfo->fd->num);
printf("woohoo decrypted keytype:%d in frame:%u\n", keytype, pinfo->fd->num);
proto_tree_add_text(tree, NULL, 0, 0, "[Decrypted using: %s]", ek->key_origin);
/* return a private g_malloced blob to the caller */
user_data=g_malloc(data.length);
@ -649,7 +649,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
if((ret == 0) && (length>0)){
char *user_data;
printf("woohoo decrypted keytype:%d in frame:%d\n", keytype, pinfo->fd->num);
printf("woohoo decrypted keytype:%d in frame:%u\n", keytype, pinfo->fd->num);
proto_tree_add_text(tree, NULL, 0, 0, "[Decrypted using: %s]", ek->key_origin);
krb5_crypto_destroy(context, crypto);
/* return a private g_malloced blob to the caller */
@ -685,7 +685,7 @@ add_encryption_key(packet_info *pinfo, int keytype, int keylength, const char *k
if(pinfo->fd->flags.visited){
return;
}
printf("added key in %d\n",pinfo->fd->num);
printf("added key in %u\n",pinfo->fd->num);
new_key = g_malloc(sizeof(service_key_t));
new_key->kvno = 0;
@ -693,7 +693,7 @@ printf("added key in %d\n",pinfo->fd->num);
new_key->length = keylength;
new_key->contents = g_malloc(keylength);
memcpy(new_key->contents, keyvalue, keylength);
g_snprintf(new_key->origin, KRB_MAX_ORIG_LEN, "%s learnt from frame %d", origin, pinfo->fd->num);
g_snprintf(new_key->origin, KRB_MAX_ORIG_LEN, "%s learnt from frame %u", origin, pinfo->fd->num);
service_key_list = g_slist_append(service_key_list, (gpointer) new_key);
}
@ -840,7 +840,7 @@ decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
md5_finish(&md5s, digest);
if (tvb_memeql (encr_tvb, 8, digest, 16) == 0) {
g_warning("woohoo decrypted keytype:%d in frame:%d\n", keytype, pinfo->fd->num);
g_warning("woohoo decrypted keytype:%d in frame:%u\n", keytype, pinfo->fd->num);
plaintext = g_malloc(data_len);
tvb_memcpy(encr_tvb, plaintext, CONFOUNDER_PLUS_CHECKSUM, data_len);
tvb_free(encr_tvb);

View File

@ -67,7 +67,7 @@ static gint ett_per_sequence_of_item = -1;
/*
#define DEBUG_ENTRY(x) \
printf("#%d %s tvb:0x%08x\n",actx->pinfo->fd->num,x,(int)tvb);
printf("#%u %s tvb:0x%08x\n",actx->pinfo->fd->num,x,(int)tvb);
*/
#define DEBUG_ENTRY(x) \
;

View File

@ -472,7 +472,7 @@ tcp_analyze_sequence_number(packet_info *pinfo, guint32 seq, guint32 ack, guint3
int ackcount;
#ifdef REMOVED
printf("analyze_sequence numbers frame:%d direction:%s\n",pinfo->fd->num,direction>=0?"FWD":"REW");
printf("analyze_sequence numbers frame:%u direction:%s\n",pinfo->fd->num,direction>=0?"FWD":"REW");
printf("FWD list lastflags:0x%04x base_seq:0x%08x:\n",tcpd->fwd->lastsegmentflags,tcpd->fwd->base_seq);for(ual=tcpd->fwd->segments;ual;ual=ual->next)printf("Frame:%d Seq:%d Nextseq:%d\n",ual->frame,ual->seq,ual->nextseq);
printf("REV list lastflags:0x%04x base_seq:0x%08x:\n",tcpd->rev->lastsegmentflags,tcpd->rev->base_seq);for(ual=tcpd->rev->segments;ual;ual=ual->next)printf("Frame:%d Seq:%d Nextseq:%d\n",ual->frame,ual->seq,ual->nextseq);
#endif

View File

@ -830,7 +830,7 @@ tcaphash_begin_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* look up the request */
#ifdef DEBUG_TCAPSRT
dbg(10,"\n Hbegin #%d ", pinfo->fd->num);
dbg(10,"\n Hbegin #%u ", pinfo->fd->num);
dbg(11,"key %lx ",tcaphash_begin_key.hashKey);
dbg(51,"PC %s %s ",address_to_str(&pinfo->src), address_to_str(&pinfo->dst));
dbg(51,"Tid %lx ",tcaphash_begin_key.tid);
@ -874,7 +874,7 @@ tcaphash_begin_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Append new record to the list */
#ifdef DEBUG_TCAPSRT
dbg(12,"(timeout) Append key %lx ",tcaphash_begin_key.hashKey);
dbg(12,"Frame %d rsp %d ",pinfo->fd->num,p_tcaphash_begincall->context->last_frame );
dbg(12,"Frame %u rsp %u ",pinfo->fd->num,p_tcaphash_begincall->context->last_frame );
#endif
tcaphash_context_key.session_id = tcapsrt_global_SessionId++;
p_tcaphash_context = new_tcaphash_context(&tcaphash_context_key, pinfo);
@ -894,7 +894,7 @@ tcaphash_begin_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if ( p_tcaphash_begincall->context->closed) {
#ifdef DEBUG_TCAPSRT
dbg(12,"(closed) Append key %lu ",tcaphash_begin_key.hashKey);
dbg(12,"Frame %d rsp %d ",pinfo->fd->num,p_tcaphash_begincall->context->last_frame );
dbg(12,"Frame %u rsp %u ",pinfo->fd->num,p_tcaphash_begincall->context->last_frame );
#endif
tcaphash_context_key.session_id = tcapsrt_global_SessionId++;
p_tcaphash_context = new_tcaphash_context(&tcaphash_context_key, pinfo);
@ -936,7 +936,7 @@ tcaphash_begin_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
#ifdef DEBUG_TCAPSRT
dbg(11,"Update key %lx ",tcaphash_begin_key.hashKey);
dbg(11,"Frame reqlink #%d ", pinfo->fd->num);
dbg(11,"Frame reqlink #%u ", pinfo->fd->num);
#endif
update_tcaphash_begincall(p_tcaphash_begincall, pinfo);
}
@ -976,7 +976,7 @@ tcaphash_cont_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
struct tcaphash_cont_info_key_t tcaphash_cont_key;
#ifdef DEBUG_TCAPSRT
dbg(10,"\n Hcont #%d ", pinfo->fd->num);
dbg(10,"\n Hcont #%u ", pinfo->fd->num);
#endif
/* look only for matching request, if matching conversation is available. */
@ -1034,7 +1034,7 @@ tcaphash_cont_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
#ifdef DEBUG_TCAPSRT
dbg(11,"Update Ckey %lx ",tcaphash_begin_key.hashKey);
dbg(11,"Frame reqlink #%d ", pinfo->fd->num);
dbg(11,"Frame reqlink #%u ", pinfo->fd->num);
#endif
tcaphash_end_key.tid = p_tcapsrt_info->src_tid;
tcaphash_end_key.opc_hash=mtp3_pc_hash( ((address*)(&pinfo->src))->data);
@ -1049,7 +1049,7 @@ tcaphash_cont_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
#ifdef DEBUG_TCAPSRT
dbg(11,"Update Ekey %lx ",tcaphash_end_key.hashKey);
dbg(11,"Frame reqlink #%d ", pinfo->fd->num);
dbg(11,"Frame reqlink #%u ", pinfo->fd->num);
#endif
} else { /* Begin not found */
#ifdef DEBUG_TCAPSRT
@ -1088,7 +1088,7 @@ tcaphash_end_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
#ifdef DEBUG_TCAPSRT
dbg(10,"\n Hend #%d ", pinfo->fd->num);
dbg(10,"\n Hend #%u ", pinfo->fd->num);
#endif
/* look only for matching request, if matching conversation is available. */
tcaphash_end_key.tid = p_tcapsrt_info->dst_tid;