Skip to content

Commit

Permalink
Remove fragment_data, add fragment_head, fragment_item - for now alia…
Browse files Browse the repository at this point in the history
…s it to the same structure.

This is begin of work to split fragment head and fragments items.

svn path=/trunk/; revision=50708
  • Loading branch information
jwzawadzki committed Jul 17, 2013
1 parent f3a2aba commit a181721
Show file tree
Hide file tree
Showing 85 changed files with 244 additions and 239 deletions.
2 changes: 1 addition & 1 deletion asn1/idmp/packet-idmp-template.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ static void dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t
struct SESSION_DATA_STRUCTURE session;
gboolean idmp_final;
guint32 idmp_length;
fragment_data *fd_head;
fragment_head *fd_head;
conversation_t *conv;
guint32 dst_ref = 0;

Expand Down
2 changes: 1 addition & 1 deletion asn1/rtse/packet-rtse-template.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
proto_tree *next_tree=NULL;
tvbuff_t *next_tvb = NULL;
tvbuff_t *data_tvb = NULL;
fragment_data *frag_msg = NULL;
fragment_head *frag_msg = NULL;
guint32 fragment_length;
guint32 rtse_id = 0;
gboolean data_handled = FALSE;
Expand Down
8 changes: 4 additions & 4 deletions asn1/t38/packet-t38-template.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,12 @@ void t38_add_address(packet_info *pinfo,
}


fragment_data *
fragment_head *
force_reassemble_seq(reassembly_table *table, packet_info *pinfo, guint32 id)
{
fragment_data *fd_head;
fragment_data *fd_i;
fragment_data *last_fd;
fragment_head *fd_head;
fragment_item *fd_i;
fragment_item *last_fd;
guint32 dfpos, size, packet_lost, burst_lost, seq_num;
guint8 *data;

Expand Down
4 changes: 2 additions & 2 deletions asn1/t38/t38.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ VAL_PTR=&Data_Field_field_type_value
/* TODO: reassemble all the Items in one frame */
if (primary_part && (Data_Field_item_num<2)) {
if (Data_Field_field_type_value == 2 || Data_Field_field_type_value == 4 || Data_Field_field_type_value == 7) {/* hdlc-fcs-OK or hdlc-fcs-OK-sig-end or t4-non-ecm-sig-end*/
fragment_data *frag_msg = NULL;
fragment_head *frag_msg = NULL;
tvbuff_t* new_tvb = NULL;
gboolean save_fragmented = actx->pinfo->fragmented;

Expand Down Expand Up @@ -176,7 +176,7 @@ VAL_PTR=&Data_Field_field_type_value
/* using the current ressaemble functions. */
/* TODO: reassemble all the Items in one frame */
if (primary_part && (Data_Field_item_num<2)) {
fragment_data *frag_msg = NULL;
fragment_head *frag_msg = NULL;

/* HDLC Data or t4-non-ecm-data */
if (Data_Field_field_type_value == 0 || Data_Field_field_type_value == 6) { /* 0=HDLC Data or 6=t4-non-ecm-data*/
Expand Down
4 changes: 2 additions & 2 deletions epan/dissectors/packet-6lowpan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2260,7 +2260,7 @@ dissect_6lowpan_frag_first(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Reassembly parameters. */
tvbuff_t * new_tvb = NULL;
tvbuff_t * frag_tvb = NULL;
fragment_data * frag_data = NULL;
fragment_head * frag_data = NULL;
gboolean save_fragmented;

/* Create a tree for the fragmentation header. */
Expand Down Expand Up @@ -2378,7 +2378,7 @@ dissect_6lowpan_frag_middle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item * ti = NULL;
/* Reassembly parameters. */
tvbuff_t * new_tvb = NULL;
fragment_data * frag_data = NULL;
fragment_head * frag_data = NULL;
gboolean save_fragmented;

/* Create a tree for the fragmentation header. */
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-atalk.c
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ dissect_atp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
move asp back in atp?
*/
if (atp_defragment && aspinfo.reply && (more_fragment || frag_number != 0)) {
fragment_data *fd_head;
fragment_head *fd_head;
int hdr;

hdr = ATP_HDRSIZE -1;
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-bacapp.c
Original file line number Diff line number Diff line change
Expand Up @@ -10797,7 +10797,7 @@ dissect_bacapp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* not resetting the offset so the remaining can be done */

if (fragment) { /* fragmented */
fragment_data *frag_msg;
fragment_head *frag_msg;

pinfo->fragmented = TRUE;

Expand Down
4 changes: 2 additions & 2 deletions epan/dissectors/packet-batadv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2240,7 +2240,7 @@ static void dissect_batadv_unicast_frag_v12(tvbuff_t *tvb, packet_info *pinfo, p
struct unicast_frag_packet_v12 *unicast_frag_packeth;
const guint8 *dest_addr, *orig_addr;
gboolean save_fragmented = FALSE;
fragment_data *frag_msg = NULL;
fragment_head *frag_msg = NULL;
proto_tree *batadv_unicast_frag_tree = NULL, *flag_tree;

tvbuff_t *new_tvb;
Expand Down Expand Up @@ -2346,7 +2346,7 @@ static void dissect_batadv_unicast_frag_v14(tvbuff_t *tvb, packet_info *pinfo, p
struct unicast_frag_packet_v14 *unicast_frag_packeth;
const guint8 *dest_addr, *orig_addr;
gboolean save_fragmented = FALSE;
fragment_data *frag_msg = NULL;
fragment_head *frag_msg = NULL;
proto_tree *batadv_unicast_frag_tree = NULL, *flag_tree;

tvbuff_t *new_tvb;
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-ber.c
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@ static void ber_defragment_init(void) {
static int
reassemble_octet_string(asn1_ctx_t *actx, proto_tree *tree, gint hf_id, tvbuff_t *tvb, int offset, guint32 con_len, gboolean ind, tvbuff_t **out_tvb)
{
fragment_data *fd_head = NULL;
fragment_head *fd_head = NULL;
tvbuff_t *next_tvb = NULL;
tvbuff_t *reassembled_tvb = NULL;
guint16 dst_ref = 0;
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-btobex.c
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@ dissect_headers(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo,
static void
dissect_btobex(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
fragment_data *frag_msg = NULL;
fragment_head *frag_msg = NULL;
gboolean save_fragmented, complete;
tvbuff_t* new_tvb = NULL;
tvbuff_t* next_tvb = NULL;
Expand Down
4 changes: 2 additions & 2 deletions epan/dissectors/packet-capwap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,7 @@ dissect_capwap_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
gboolean fragment_more;
guint32 fragment_id;
guint32 fragment_offset;
fragment_data *frag_msg = NULL;
fragment_head *frag_msg = NULL;
gboolean save_fragmented;

/* Make entries in Protocol column and Info column on summary display */
Expand Down Expand Up @@ -1461,7 +1461,7 @@ dissect_capwap_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gboolean fragment_more;
guint32 fragment_id;
guint32 fragment_offset;
fragment_data *frag_msg = NULL;
fragment_head *frag_msg = NULL;
gboolean save_fragmented;

/* Make entries in Protocol column and Info column on summary display */
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-cell_broadcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ dissect_gsm_cell_broadcast(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 serial_number, message_id;
tvbuff_t *cbs_page_tvb = NULL;
tvbuff_t *cbs_msg_tvb = NULL;
fragment_data * frag_data = NULL;
fragment_head * frag_data = NULL;

len = tvb_length(tvb);

Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-clnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ dissect_clnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint next_length;
proto_tree *discpdu_tree;
gboolean save_in_error_pkt;
fragment_data *fd_head;
fragment_head *fd_head;
tvbuff_t *next_tvb;
gboolean update_col_info = TRUE;
gboolean save_fragmented;
Expand Down
6 changes: 3 additions & 3 deletions epan/dissectors/packet-dcerpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3257,7 +3257,7 @@ dissect_dcerpc_cn_stub(tvbuff_t *tvb, int offset, packet_info *pinfo,
{
gint length, reported_length;
gboolean save_fragmented;
fragment_data *fd_head = NULL;
fragment_head *fd_head = NULL;

tvbuff_t *auth_tvb, *payload_tvb, *decrypted_tvb;
proto_item *pi;
Expand Down Expand Up @@ -4056,7 +4056,7 @@ dissect_dcerpc_cn_fault(tvbuff_t *tvb, gint offset, packet_info *pinfo,
}
} else if (hdr->flags&PFC_LAST_FRAG) { /* LAST fragment */
if ( value->rep_frame ) {
fragment_data *fd_head;
fragment_head *fd_head;

fd_head = fragment_add_seq_next(&dcerpc_co_reassembly_table,
tvb, offset,
Expand Down Expand Up @@ -4990,7 +4990,7 @@ dissect_dcerpc_dg_stub(tvbuff_t *tvb, int offset, packet_info *pinfo,
{
int length, reported_length, stub_length;
gboolean save_fragmented;
fragment_data *fd_head;
fragment_head *fd_head;
tvbuff_t *next_tvb;
proto_item *pi;
proto_item *parent_pi;
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-dcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -6640,7 +6640,7 @@ dissect_dcm_pdv_fragmented(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
dcm_state_pdv_t *pdv = NULL;

tvbuff_t *next_tvb = NULL;
fragment_data *head = NULL;
fragment_head *head = NULL;

guint32 reassembly_id;
guint32 pdv_body_len;
Expand Down
10 changes: 5 additions & 5 deletions epan/dissectors/packet-dcp-etsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ dissect_pft_fec_detailed(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
gboolean fec _U_,
guint16 rsk,
guint16 rsz,
fragment_data *fdx
fragment_head *fdx
)
{
guint32 decoded_size;
Expand All @@ -281,8 +281,8 @@ dissect_pft_fec_detailed(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
else {
guint fragments=0;
guint32 *got;
fragment_data *fd;
fragment_data *fd_head;
fragment_item *fd;
fragment_head *fd_head;

if(tree)
proto_tree_add_text (tree, tvb, 0, -1, "want %d, got %d need %d",
Expand All @@ -300,7 +300,7 @@ dissect_pft_fec_detailed(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
/* have we got enough for Reed Solomon to try to correct ? */
if(fragments>=rx_min) { /* yes, in theory */
guint i,current_findex;
fragment_data *frag=NULL;
fragment_head *frag=NULL;
guint8 *dummy_data = (guint8*) ep_alloc0 (plen);
tvbuff_t *dummytvb = tvb_new_real_data(dummy_data, plen, plen);
/* try and decode with missing fragments */
Expand Down Expand Up @@ -393,7 +393,7 @@ dissect_pft_fragmented(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
{
gboolean first, last;
tvbuff_t *new_tvb=NULL;
fragment_data *frag_edcp = NULL;
fragment_head *frag_edcp = NULL;
pinfo->fragmented = TRUE;
first = findex == 0;
last = fcount == (findex+1);
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-dnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -3025,7 +3025,7 @@ dissect_dnp3_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (! (tr_fir && tr_fin))
{
guint conv_seq_number;
fragment_data *frag_msg;
fragment_head *frag_msg;
conversation_t *conversation;
dnp3_conv_t *conv_data_ptr;
dl_conversation_key_t dl_conversation_key;
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-dtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@ dissect_dtls_handshake(tvbuff_t *tvb, packet_info *pinfo,
for (; offset < record_length; offset += fragment_length,
first_iteration = FALSE) /* set up for next pass, if any */
{
fragment_data *frag_msg = NULL;
fragment_head *frag_msg = NULL;
tvbuff_t *new_tvb = NULL;
const gchar *frag_str = NULL;
gboolean fragmented;
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-dtn.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ dissect_tcp_bundle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)

conv_hdr = tvb_get_guint8(tvb, frame_offset);
if((conv_hdr & TCP_CONVERGENCE_TYPE_MASK) == TCP_CONVERGENCE_DATA_SEGMENT) {
fragment_data *frag_msg;
fragment_head *frag_msg;
tvbuff_t *new_tvb;
proto_tree *bundle_tree;
proto_tree *conv_proto_tree;
Expand Down
4 changes: 2 additions & 2 deletions epan/dissectors/packet-dvbci.c
Original file line number Diff line number Diff line change
Expand Up @@ -4207,7 +4207,7 @@ dissect_dvbci_tpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
guint8 hdr_tag = NO_TAG;
tvbuff_t *body_tvb, *payload_tvb = NULL;
proto_item *pi;
fragment_data *frag_msg = NULL;
fragment_head *frag_msg = NULL;


tpdu_len = tvb_reported_length(tvb);
Expand Down Expand Up @@ -4282,7 +4282,7 @@ dissect_dvbci_lpdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
guint8 tcid, more_last;
proto_item *pi;
tvbuff_t *payload_tvb = NULL;
fragment_data *frag_msg = NULL;
fragment_head *frag_msg = NULL;


payload_len = tvb_reported_length(tvb);
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-eap.c
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ dissect_eap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
otherwise we just call dissector.
*/
if (needs_reassembly) {
fragment_data *fd_head;
fragment_head *fd_head;

/*
* Yes, this frame contains a fragment that requires
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-fc.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ dissect_fc_helper (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean
int vft_offset = -1;
gboolean is_lastframe_inseq, is_1frame_inseq/*, is_valid_frame*/;
gboolean is_exchg_resp = 0;
fragment_data *fcfrag_head;
fragment_head *fcfrag_head;
guint32 frag_id;
guint32 frag_size;
guint8 df_ctl, seq_id;
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-gsm_cbch.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ dissect_schedule_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree
static void
dissect_cbch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
fragment_data *frag_data = NULL;
fragment_head *frag_data = NULL;
guint8 octet, lb, lpd, seq_num;
guint32 offset;
guint32 len;
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-gsm_sms.c
Original file line number Diff line number Diff line change
Expand Up @@ -2643,7 +2643,7 @@ dis_field_ud(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint32 offset
proto_item *item;
proto_tree *subtree = NULL;
tvbuff_t *sm_tvb = NULL;
fragment_data *fd_sm = NULL;
fragment_head *fd_sm = NULL;
guint8 fill_bits;
guint32 out_len, total_sms_len, len_sms, length_ucs2, i;
char *ustr;
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-gsm_sms_ud.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ parse_gsm_sms_ud_message(proto_tree *sm_tree, tvbuff_t *tvb, packet_info *pinfo,
guint32 i = 0;
/* Multiple Messages UDH */
gboolean is_fragmented = FALSE;
fragment_data *fd_sm = NULL;
fragment_head *fd_sm = NULL;
guint16 sm_id = 0;
guint16 frags = 0;
guint16 frag = 0;
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-gssapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ dissect_gssapi_work(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
gint32 tag;
guint32 len1;
const char *oid;
fragment_data *fd_head=NULL;
fragment_head *fd_head=NULL;
gssapi_frag_info_t *fi;
tvbuff_t *volatile gss_tvb=NULL;
asn1_ctx_t asn1_ctx;
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-hci_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ dissect_hci_usb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
hci_data_t *hci_data;
gint p2p_dir_save;
guint32 session_id;
fragment_data *reassembled;
fragment_head *reassembled;

if (tvb_length_remaining(tvb, offset) <= 0)
return 0;
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-iax2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2147,7 +2147,7 @@ static void desegment_iax(tvbuff_t *tvb, packet_info *pinfo, proto_tree *iax2_tr
iax_call_dirdata *dirdata;
gpointer value = NULL;
guint32 frag_offset = 0;
fragment_data *fd_head;
fragment_head *fd_head;
gboolean must_desegment = FALSE;

DISSECTOR_ASSERT(iax_call);
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-idmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ static void dissect_idmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_t
struct SESSION_DATA_STRUCTURE session;
gboolean idmp_final;
guint32 idmp_length;
fragment_data *fd_head;
fragment_head *fd_head;
conversation_t *conv;
guint32 dst_ref = 0;

Expand Down
4 changes: 2 additions & 2 deletions epan/dissectors/packet-ieee80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -5921,7 +5921,7 @@ dissect_gas_comeback_response(proto_tree *tree, tvbuff_t *tvb, packet_info *pinf
if (anqp && (frag == 0) && !more)
dissect_anqp(query, tvb, pinfo, offset, FALSE);
else {
fragment_data *frag_msg;
fragment_head *frag_msg;
gboolean save_fragmented;
tvbuff_t *new_tvb;

Expand Down Expand Up @@ -14296,7 +14296,7 @@ dissect_ieee80211_common (tvbuff_t *tvb, packet_info *pinfo,
*/
save_fragmented = pinfo->fragmented;
if (wlan_defragment && (more_frags || (frag_number != 0))) {
fragment_data *fd_head;
fragment_head *fd_head;

/*
* If we've already seen this frame, look it up in the
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-ip.c
Original file line number Diff line number Diff line change
Expand Up @@ -1928,7 +1928,7 @@ dissect_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
guint16 flags;
guint8 nxt;
guint16 ipsum;
fragment_data *ipfd_head = NULL;
fragment_head *ipfd_head = NULL;
tvbuff_t *next_tvb;
gboolean update_col_info = TRUE;
gboolean save_fragmented;
Expand Down
2 changes: 1 addition & 1 deletion epan/dissectors/packet-ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,7 @@ dissect_ipv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint16 offlg;
guint32 ident;
int offset;
fragment_data *ipfd_head;
fragment_head *ipfd_head;
tvbuff_t *next_tvb;
gboolean update_col_info = TRUE;
gboolean save_fragmented = FALSE;
Expand Down
Loading

0 comments on commit a181721

Please sign in to comment.