aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-batadv.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2021-07-16 11:36:34 -0400
committerEvan Huus <eapache@gmail.com>2021-07-21 09:54:57 -0400
commit8ee8808876191e1b398fced6a1712d2fded6da23 (patch)
tree93c10e5c7397c4e94a0c250080ac34654efdf8d6 /epan/dissectors/packet-batadv.c
parent9ed273e5da0b8b3f62e021a255d7b98203d1c165 (diff)
First pass pinfo->pool conversion, part 2
Automated find/replace of wmem_packet_scope() with pinfo->pool in all files where it didn't cause a build failure.
Diffstat (limited to 'epan/dissectors/packet-batadv.c')
-rw-r--r--epan/dissectors/packet-batadv.c140
1 files changed, 70 insertions, 70 deletions
diff --git a/epan/dissectors/packet-batadv.c b/epan/dissectors/packet-batadv.c
index a1c4bea020..c15d879312 100644
--- a/epan/dissectors/packet-batadv.c
+++ b/epan/dissectors/packet-batadv.c
@@ -1121,7 +1121,7 @@ static int dissect_batadv_batman_v5(tvbuff_t *tvb, int offset, packet_info *pinf
tvbuff_t *next_tvb;
- batman_packeth = wmem_new(wmem_packet_scope(), struct batman_packet_v5);
+ batman_packeth = wmem_new(pinfo->pool, struct batman_packet_v5);
type = tvb_get_guint8(tvb, offset+0);
batman_packeth->version = tvb_get_guint8(tvb, offset+1);
@@ -1150,7 +1150,7 @@ static int dissect_batadv_batman_v5(tvbuff_t *tvb, int offset, packet_info *pinf
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, offset, BATMAN_PACKET_V5_SIZE,
"B.A.T.M.A.N., Orig: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &batman_packeth->orig));
+ address_with_resolution_to_str(pinfo->pool, &batman_packeth->orig));
batadv_batman_tree = proto_item_add_subtree(ti, ett_batadv_batman);
/* items */
@@ -1216,7 +1216,7 @@ static int dissect_batadv_batman_v7(tvbuff_t *tvb, int offset, packet_info *pinf
tvbuff_t *next_tvb;
- batman_packeth = wmem_new(wmem_packet_scope(), struct batman_packet_v7);
+ batman_packeth = wmem_new(pinfo->pool, struct batman_packet_v7);
type = tvb_get_guint8(tvb, offset+0);
batman_packeth->version = tvb_get_guint8(tvb, offset+1);
@@ -1242,7 +1242,7 @@ static int dissect_batadv_batman_v7(tvbuff_t *tvb, int offset, packet_info *pinf
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, offset, BATMAN_PACKET_V7_SIZE,
"B.A.T.M.A.N., Orig: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &batman_packeth->orig));
+ address_with_resolution_to_str(pinfo->pool, &batman_packeth->orig));
batadv_batman_tree = proto_item_add_subtree(ti, ett_batadv_batman);
/* items */
@@ -1301,7 +1301,7 @@ static int dissect_batadv_batman_v9(tvbuff_t *tvb, int offset, packet_info *pinf
tvbuff_t *next_tvb;
- batman_packeth = wmem_new(wmem_packet_scope(), struct batman_packet_v9);
+ batman_packeth = wmem_new(pinfo->pool, struct batman_packet_v9);
type = tvb_get_guint8(tvb, offset+0);
batman_packeth->version = tvb_get_guint8(tvb, offset+1);
@@ -1328,7 +1328,7 @@ static int dissect_batadv_batman_v9(tvbuff_t *tvb, int offset, packet_info *pinf
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, offset, BATMAN_PACKET_V9_SIZE,
"B.A.T.M.A.N., Orig: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &batman_packeth->orig));
+ address_with_resolution_to_str(pinfo->pool, &batman_packeth->orig));
batadv_batman_tree = proto_item_add_subtree(ti, ett_batadv_batman);
/* items */
@@ -1394,7 +1394,7 @@ static int dissect_batadv_batman_v10(tvbuff_t *tvb, int offset, packet_info *pin
tvbuff_t *next_tvb;
- batman_packeth = wmem_new(wmem_packet_scope(), struct batman_packet_v10);
+ batman_packeth = wmem_new(pinfo->pool, struct batman_packet_v10);
type = tvb_get_guint8(tvb, offset+0);
batman_packeth->version = tvb_get_guint8(tvb, offset+1);
@@ -1421,7 +1421,7 @@ static int dissect_batadv_batman_v10(tvbuff_t *tvb, int offset, packet_info *pin
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, offset, BATMAN_PACKET_V10_SIZE,
"B.A.T.M.A.N., Orig: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &batman_packeth->orig));
+ address_with_resolution_to_str(pinfo->pool, &batman_packeth->orig));
batadv_batman_tree = proto_item_add_subtree(ti, ett_batadv_batman);
/* items */
@@ -1487,7 +1487,7 @@ static int dissect_batadv_batman_v11(tvbuff_t *tvb, int offset, packet_info *pin
tvbuff_t *next_tvb;
- batman_packeth = wmem_new(wmem_packet_scope(), struct batman_packet_v11);
+ batman_packeth = wmem_new(pinfo->pool, struct batman_packet_v11);
type = tvb_get_guint8(tvb, offset+0);
batman_packeth->version = tvb_get_guint8(tvb, offset+1);
@@ -1513,7 +1513,7 @@ static int dissect_batadv_batman_v11(tvbuff_t *tvb, int offset, packet_info *pin
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, offset, BATMAN_PACKET_V11_SIZE,
"B.A.T.M.A.N., Orig: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &batman_packeth->orig));
+ address_with_resolution_to_str(pinfo->pool, &batman_packeth->orig));
batadv_batman_tree = proto_item_add_subtree(ti, ett_batadv_batman);
/* items */
@@ -1573,7 +1573,7 @@ static int dissect_batadv_batman_v14(tvbuff_t *tvb, int offset, packet_info *pin
tvbuff_t *next_tvb;
gint length_remaining;
- batman_packeth = wmem_new(wmem_packet_scope(), struct batman_packet_v14);
+ batman_packeth = wmem_new(pinfo->pool, struct batman_packet_v14);
type = tvb_get_guint8(tvb, offset+0);
batman_packeth->version = tvb_get_guint8(tvb, offset+1);
@@ -1602,7 +1602,7 @@ static int dissect_batadv_batman_v14(tvbuff_t *tvb, int offset, packet_info *pin
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, offset, BATMAN_PACKET_V14_SIZE,
"B.A.T.M.A.N., Orig: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &batman_packeth->orig));
+ address_with_resolution_to_str(pinfo->pool, &batman_packeth->orig));
batadv_batman_tree = proto_item_add_subtree(ti, ett_batadv_batman);
/* items */
@@ -1712,7 +1712,7 @@ static int dissect_batadv_iv_ogm_v15(tvbuff_t *tvb, int offset,
if (version == 0 || type != BATADV_IV_OGM_V15)
return -1;
- iv_ogm_packeth = wmem_new(wmem_packet_scope(), struct iv_ogm_packet_v15);
+ iv_ogm_packeth = wmem_new(pinfo->pool, struct iv_ogm_packet_v15);
/* Set info column */
col_clear(pinfo->cinfo, COL_INFO);
@@ -1722,7 +1722,7 @@ static int dissect_batadv_iv_ogm_v15(tvbuff_t *tvb, int offset,
tvb, offset,
IV_OGM_PACKET_V15_SIZE + iv_ogm_packeth->tvlv_len,
"B.A.T.M.A.N. IV OGM, Orig: %s",
- tvb_address_with_resolution_to_str(wmem_packet_scope(), tvb, AT_ETHER, offset + 8));
+ tvb_address_with_resolution_to_str(pinfo->pool, tvb, AT_ETHER, offset + 8));
batadv_iv_ogm_tree = proto_item_add_subtree(ti, ett_batadv_iv_ogm);
/* items */
@@ -1807,7 +1807,7 @@ static void dissect_batadv_tt(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, 0, 6,
"B.A.T.M.A.N. TT: %s",
- tvb_address_with_resolution_to_str(wmem_packet_scope(), tvb, AT_ETHER, 0));
+ tvb_address_with_resolution_to_str(pinfo->pool, tvb, AT_ETHER, 0));
batadv_batman_tt_tree = proto_item_add_subtree(ti, ett_batadv_batman_tt);
proto_tree_add_item(batadv_batman_tt_tree, hf_batadv_batman_tt, tvb, 0, 6, ENC_NA);
@@ -1855,7 +1855,7 @@ static void dissect_batadv_bcast_v6(tvbuff_t *tvb, packet_info *pinfo, proto_tre
proto_tree *batadv_bcast_tree;
proto_item *ti;
- bcast_packeth = wmem_new(wmem_packet_scope(), struct bcast_packet_v6);
+ bcast_packeth = wmem_new(pinfo->pool, struct bcast_packet_v6);
bcast_packeth->version = tvb_get_guint8(tvb, 1);
set_address_tvb(&bcast_packeth->orig, AT_ETHER, 6, tvb, 2);
@@ -1869,7 +1869,7 @@ static void dissect_batadv_bcast_v6(tvbuff_t *tvb, packet_info *pinfo, proto_tre
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, 0, BCAST_PACKET_V6_SIZE,
"B.A.T.M.A.N. Bcast, Orig: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &bcast_packeth->orig));
+ address_with_resolution_to_str(pinfo->pool, &bcast_packeth->orig));
batadv_bcast_tree = proto_item_add_subtree(ti, ett_batadv_bcast);
/* items */
@@ -1909,7 +1909,7 @@ static void dissect_batadv_bcast_v10(tvbuff_t *tvb, packet_info *pinfo, proto_tr
proto_tree *batadv_bcast_tree;
proto_item *ti;
- bcast_packeth = wmem_new(wmem_packet_scope(), struct bcast_packet_v10);
+ bcast_packeth = wmem_new(pinfo->pool, struct bcast_packet_v10);
bcast_packeth->version = tvb_get_guint8(tvb, 1);
set_address_tvb(&bcast_packeth->orig, AT_ETHER, 6, tvb, 2);
@@ -1924,7 +1924,7 @@ static void dissect_batadv_bcast_v10(tvbuff_t *tvb, packet_info *pinfo, proto_tr
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, 0, BCAST_PACKET_V10_SIZE,
"B.A.T.M.A.N. Bcast, Orig: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &bcast_packeth->orig));
+ address_with_resolution_to_str(pinfo->pool, &bcast_packeth->orig));
batadv_bcast_tree = proto_item_add_subtree(ti, ett_batadv_bcast);
/* items */
@@ -1968,7 +1968,7 @@ static void dissect_batadv_bcast_v14(tvbuff_t *tvb, packet_info *pinfo, proto_tr
proto_tree *batadv_bcast_tree;
proto_item *ti;
- bcast_packeth = wmem_new(wmem_packet_scope(), struct bcast_packet_v14);
+ bcast_packeth = wmem_new(pinfo->pool, struct bcast_packet_v14);
bcast_packeth->packet_type = tvb_get_guint8(tvb, 0);
bcast_packeth->version = tvb_get_guint8(tvb, 1);
@@ -1985,7 +1985,7 @@ static void dissect_batadv_bcast_v14(tvbuff_t *tvb, packet_info *pinfo, proto_tr
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, 0, BCAST_PACKET_V14_SIZE,
"B.A.T.M.A.N. Bcast, Orig: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &bcast_packeth->orig));
+ address_with_resolution_to_str(pinfo->pool, &bcast_packeth->orig));
batadv_bcast_tree = proto_item_add_subtree(ti, ett_batadv_bcast);
/* items */
@@ -2068,7 +2068,7 @@ static void dissect_batadv_icmp_v6(tvbuff_t *tvb, packet_info *pinfo, proto_tree
proto_tree *batadv_icmp_tree;
proto_item *ti;
- icmp_packeth = wmem_new(wmem_packet_scope(), struct icmp_packet_v6);
+ icmp_packeth = wmem_new(pinfo->pool, struct icmp_packet_v6);
icmp_packeth->version = tvb_get_guint8(tvb, 1);
icmp_packeth->msg_type = tvb_get_guint8(tvb, 2);
@@ -2091,8 +2091,8 @@ static void dissect_batadv_icmp_v6(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, 0, ICMP_PACKET_V6_SIZE,
"B.A.T.M.A.N. ICMP, Orig: %s, Dst: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &icmp_packeth->orig),
- address_with_resolution_to_str(wmem_packet_scope(), &icmp_packeth->dst));
+ address_with_resolution_to_str(pinfo->pool, &icmp_packeth->orig),
+ address_with_resolution_to_str(pinfo->pool, &icmp_packeth->dst));
batadv_icmp_tree = proto_item_add_subtree(ti, ett_batadv_icmp);
/* items */
@@ -2191,7 +2191,7 @@ static void dissect_batadv_icmp_v7(tvbuff_t *tvb, packet_info *pinfo, proto_tree
gint length_remaining;
int offset = 0;
- icmp_packeth = wmem_new(wmem_packet_scope(), struct icmp_packet_v7);
+ icmp_packeth = wmem_new(pinfo->pool, struct icmp_packet_v7);
icmp_packeth->version = tvb_get_guint8(tvb, 1);
icmp_packeth->msg_type = tvb_get_guint8(tvb, 2);
@@ -2215,8 +2215,8 @@ static void dissect_batadv_icmp_v7(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, 0, ICMP_PACKET_V7_SIZE,
"B.A.T.M.A.N. ICMP, Orig: %s, Dst: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &icmp_packeth->orig),
- address_with_resolution_to_str(wmem_packet_scope(), &icmp_packeth->dst));
+ address_with_resolution_to_str(pinfo->pool, &icmp_packeth->orig),
+ address_with_resolution_to_str(pinfo->pool, &icmp_packeth->dst));
batadv_icmp_tree = proto_item_add_subtree(ti, ett_batadv_icmp);
/* items */
@@ -2271,7 +2271,7 @@ static void dissect_batadv_icmp_v14(tvbuff_t *tvb, packet_info *pinfo, proto_tre
gint length_remaining;
int offset = 0;
- icmp_packeth = wmem_new(wmem_packet_scope(), struct icmp_packet_v14);
+ icmp_packeth = wmem_new(pinfo->pool, struct icmp_packet_v14);
icmp_packeth->version = tvb_get_guint8(tvb, 1);
icmp_packeth->ttl = tvb_get_guint8(tvb, 2);
@@ -2296,8 +2296,8 @@ static void dissect_batadv_icmp_v14(tvbuff_t *tvb, packet_info *pinfo, proto_tre
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, 0, ICMP_PACKET_V14_SIZE,
"B.A.T.M.A.N. ICMP, Orig: %s, Dst: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &icmp_packeth->orig),
- address_with_resolution_to_str(wmem_packet_scope(), &icmp_packeth->dst));
+ address_with_resolution_to_str(pinfo->pool, &icmp_packeth->orig),
+ address_with_resolution_to_str(pinfo->pool, &icmp_packeth->dst));
batadv_icmp_tree = proto_item_add_subtree(ti, ett_batadv_icmp);
/* items */
@@ -2357,7 +2357,7 @@ static void dissect_batadv_icmp_tp_v15(tvbuff_t *tvb, packet_info *pinfo,
guint32 msg_type;
int offset = 0;
- icmp_packeth = wmem_new(wmem_packet_scope(), struct icmp_tp_packet_v15);
+ icmp_packeth = wmem_new(pinfo->pool, struct icmp_tp_packet_v15);
/* Set info column */
col_clear(pinfo->cinfo, COL_INFO);
@@ -2366,8 +2366,8 @@ static void dissect_batadv_icmp_tp_v15(tvbuff_t *tvb, packet_info *pinfo,
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin,
tvb, 0, ICMP_PACKET_V14_SIZE,
"B.A.T.M.A.N. ICMP TP, Orig: %s, Dst: %s",
- tvb_address_with_resolution_to_str(wmem_packet_scope(), tvb, AT_ETHER, 10),
- tvb_address_with_resolution_to_str(wmem_packet_scope(), tvb, AT_ETHER, 4));
+ tvb_address_with_resolution_to_str(pinfo->pool, tvb, AT_ETHER, 10),
+ tvb_address_with_resolution_to_str(pinfo->pool, tvb, AT_ETHER, 4));
batadv_icmp_tree = proto_item_add_subtree(ti, ett_batadv_icmp);
/* items */
@@ -2460,7 +2460,7 @@ static void dissect_batadv_icmp_simple_v15(tvbuff_t *tvb, packet_info *pinfo,
int offset = 0;
guint32 seqno;
- icmp_packeth = wmem_new(wmem_packet_scope(), struct icmp_packet_v15);
+ icmp_packeth = wmem_new(pinfo->pool, struct icmp_packet_v15);
/* Set info column */
col_clear(pinfo->cinfo, COL_INFO);
@@ -2469,8 +2469,8 @@ static void dissect_batadv_icmp_simple_v15(tvbuff_t *tvb, packet_info *pinfo,
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin,
tvb, 0, ICMP_PACKET_V14_SIZE,
"B.A.T.M.A.N. ICMP, Orig: %s, Dst: %s",
- tvb_address_with_resolution_to_str(wmem_packet_scope(), tvb, AT_ETHER, 10),
- tvb_address_with_resolution_to_str(wmem_packet_scope(), tvb, AT_ETHER, 4));
+ tvb_address_with_resolution_to_str(pinfo->pool, tvb, AT_ETHER, 10),
+ tvb_address_with_resolution_to_str(pinfo->pool, tvb, AT_ETHER, 4));
batadv_icmp_tree = proto_item_add_subtree(ti, ett_batadv_icmp);
/* items */
@@ -2604,7 +2604,7 @@ static void dissect_batadv_unicast_v6(tvbuff_t *tvb, packet_info *pinfo, proto_t
proto_tree *batadv_unicast_tree;
proto_item *ti;
- unicast_packeth = wmem_new(wmem_packet_scope(), struct unicast_packet_v6);
+ unicast_packeth = wmem_new(pinfo->pool, struct unicast_packet_v6);
unicast_packeth->version = tvb_get_guint8(tvb, 1);
set_address_tvb(&unicast_packeth->dest, AT_ETHER, 6, tvb, 2);
@@ -2619,7 +2619,7 @@ static void dissect_batadv_unicast_v6(tvbuff_t *tvb, packet_info *pinfo, proto_t
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, 0, UNICAST_PACKET_V6_SIZE,
"B.A.T.M.A.N. Unicast, Dst: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &unicast_packeth->dest));
+ address_with_resolution_to_str(pinfo->pool, &unicast_packeth->dest));
batadv_unicast_tree = proto_item_add_subtree(ti, ett_batadv_unicast);
/* items */
@@ -2660,7 +2660,7 @@ static void dissect_batadv_unicast_v14(tvbuff_t *tvb, packet_info *pinfo, proto_
proto_tree *batadv_unicast_tree;
proto_item *ti;
- unicast_packeth = wmem_new(wmem_packet_scope(), struct unicast_packet_v14);
+ unicast_packeth = wmem_new(pinfo->pool, struct unicast_packet_v14);
unicast_packeth->packet_type = tvb_get_guint8(tvb, 0);
unicast_packeth->version = tvb_get_guint8(tvb, 1);
@@ -2676,7 +2676,7 @@ static void dissect_batadv_unicast_v14(tvbuff_t *tvb, packet_info *pinfo, proto_
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, 0, UNICAST_PACKET_V14_SIZE,
"B.A.T.M.A.N. Unicast, Dst: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &unicast_packeth->dest));
+ address_with_resolution_to_str(pinfo->pool, &unicast_packeth->dest));
batadv_unicast_tree = proto_item_add_subtree(ti, ett_batadv_unicast);
/* items */
@@ -2744,7 +2744,7 @@ static void dissect_batadv_unicast_4addr_v14(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *batadv_unicast_4addr_tree;
proto_item *ti;
- unicast_4addr_packeth = wmem_new(wmem_packet_scope(), struct unicast_4addr_packet_v14);
+ unicast_4addr_packeth = wmem_new(pinfo->pool, struct unicast_4addr_packet_v14);
unicast_4addr_packeth->packet_type = tvb_get_guint8(tvb, 0);
unicast_4addr_packeth->version = tvb_get_guint8(tvb, 1);
@@ -2767,7 +2767,7 @@ static void dissect_batadv_unicast_4addr_v14(tvbuff_t *tvb, packet_info *pinfo,
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, 0, UNICAST_4ADDR_PACKET_V14_SIZE,
"B.A.T.M.A.N. Unicast 4Addr, Dst: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &unicast_4addr_packeth->dest));
+ address_with_resolution_to_str(pinfo->pool, &unicast_4addr_packeth->dest));
batadv_unicast_4addr_tree = proto_item_add_subtree(ti, ett_batadv_unicast_4addr);
/* items */
@@ -2852,7 +2852,7 @@ static void dissect_batadv_unicast_frag_v12(tvbuff_t *tvb, packet_info *pinfo, p
int head = 0;
gint length_remaining;
- unicast_frag_packeth = wmem_new(wmem_packet_scope(), struct unicast_frag_packet_v12);
+ unicast_frag_packeth = wmem_new(pinfo->pool, struct unicast_frag_packet_v12);
unicast_frag_packeth->version = tvb_get_guint8(tvb, 1);
set_address_tvb(&unicast_frag_packeth->dest, AT_ETHER, 6, tvb, 2);
@@ -2874,7 +2874,7 @@ static void dissect_batadv_unicast_frag_v12(tvbuff_t *tvb, packet_info *pinfo, p
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, 0, UNICAST_FRAG_PACKET_V12_SIZE,
"B.A.T.M.A.N. Unicast Fragment, Dst: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &unicast_frag_packeth->dest));
+ address_with_resolution_to_str(pinfo->pool, &unicast_frag_packeth->dest));
batadv_unicast_frag_tree = proto_item_add_subtree(ti, ett_batadv_unicast_frag);
/* items */
@@ -2941,7 +2941,7 @@ static void dissect_batadv_unicast_frag_v14(tvbuff_t *tvb, packet_info *pinfo, p
int head = 0;
gint length_remaining;
- unicast_frag_packeth = wmem_new(wmem_packet_scope(), struct unicast_frag_packet_v14);
+ unicast_frag_packeth = wmem_new(pinfo->pool, struct unicast_frag_packet_v14);
unicast_frag_packeth->version = tvb_get_guint8(tvb, 1);
unicast_frag_packeth->ttl = tvb_get_guint8(tvb, 2);
@@ -2965,7 +2965,7 @@ static void dissect_batadv_unicast_frag_v14(tvbuff_t *tvb, packet_info *pinfo, p
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, 0, UNICAST_FRAG_PACKET_V14_SIZE,
"B.A.T.M.A.N. Unicast Fragment, Dst: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &unicast_frag_packeth->dest));
+ address_with_resolution_to_str(pinfo->pool, &unicast_frag_packeth->dest));
batadv_unicast_frag_tree = proto_item_add_subtree(ti, ett_batadv_unicast_frag);
/* items */
@@ -3039,7 +3039,7 @@ static void dissect_batadv_unicast_frag_v15(tvbuff_t *tvb, packet_info *pinfo,
int frag_no = 0;
gint length_remaining;
- unicast_frag_packeth = wmem_new(wmem_packet_scope(), struct unicast_frag_packet_v15);
+ unicast_frag_packeth = wmem_new(pinfo->pool, struct unicast_frag_packet_v15);
save_fragmented = pinfo->fragmented;
pinfo->fragmented = TRUE;
@@ -3052,7 +3052,7 @@ static void dissect_batadv_unicast_frag_v15(tvbuff_t *tvb, packet_info *pinfo,
tvb, 0,
UNICAST_FRAG_PACKET_V15_SIZE,
"B.A.T.M.A.N. Unicast Fragment, Dst: %s",
- tvb_address_with_resolution_to_str(wmem_packet_scope(), tvb, AT_ETHER, 4));
+ tvb_address_with_resolution_to_str(pinfo->pool, tvb, AT_ETHER, 4));
batadv_unicast_frag_tree = proto_item_add_subtree(ti,
ett_batadv_unicast_frag);
@@ -3187,7 +3187,7 @@ static void dissect_batadv_vis_v6(tvbuff_t *tvb, packet_info *pinfo, proto_tree
gint length_remaining;
int offset = 0, i;
- vis_packeth = wmem_new(wmem_packet_scope(), struct vis_packet_v6);
+ vis_packeth = wmem_new(pinfo->pool, struct vis_packet_v6);
vis_packeth->version = tvb_get_guint8(tvb, 1);
vis_packeth->vis_type = tvb_get_guint8(tvb, 2);
@@ -3211,7 +3211,7 @@ static void dissect_batadv_vis_v6(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, 0, VIS_PACKET_V6_SIZE,
"B.A.T.M.A.N. Vis, Orig: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &vis_packeth->vis_orig));
+ address_with_resolution_to_str(pinfo->pool, &vis_packeth->vis_orig));
batadv_vis_tree = proto_item_add_subtree(ti, ett_batadv_vis);
/* items */
@@ -3303,7 +3303,7 @@ static void dissect_batadv_vis_v10(tvbuff_t *tvb, packet_info *pinfo, proto_tree
gint length_remaining;
int offset = 0, i;
- vis_packeth = wmem_new(wmem_packet_scope(), struct vis_packet_v10);
+ vis_packeth = wmem_new(pinfo->pool, struct vis_packet_v10);
vis_packeth->version = tvb_get_guint8(tvb, 1);
vis_packeth->vis_type = tvb_get_guint8(tvb, 2);
@@ -3328,7 +3328,7 @@ static void dissect_batadv_vis_v10(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, 0, VIS_PACKET_V10_SIZE,
"B.A.T.M.A.N. Vis, Orig: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &vis_packeth->vis_orig));
+ address_with_resolution_to_str(pinfo->pool, &vis_packeth->vis_orig));
batadv_vis_tree = proto_item_add_subtree(ti, ett_batadv_vis);
/* items */
@@ -3395,7 +3395,7 @@ static void dissect_batadv_vis_v14(tvbuff_t *tvb, packet_info *pinfo, proto_tree
gint length_remaining;
int offset = 0, i;
- vis_packeth = wmem_new(wmem_packet_scope(), struct vis_packet_v14);
+ vis_packeth = wmem_new(pinfo->pool, struct vis_packet_v14);
vis_packeth->version = tvb_get_guint8(tvb, 1);
vis_packeth->ttl = tvb_get_guint8(tvb, 2);
@@ -3420,7 +3420,7 @@ static void dissect_batadv_vis_v14(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, 0, VIS_PACKET_V14_SIZE,
"B.A.T.M.A.N. Vis, Orig: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &vis_packeth->vis_orig));
+ address_with_resolution_to_str(pinfo->pool, &vis_packeth->vis_orig));
batadv_vis_tree = proto_item_add_subtree(ti, ett_batadv_vis);
/* items */
@@ -3487,7 +3487,7 @@ static void dissect_vis_entry_v6(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, 0, VIS_ENTRY_V6_SIZE,
"VIS Entry: %s",
- tvb_address_with_resolution_to_str(wmem_packet_scope(), tvb, AT_ETHER, 0));
+ tvb_address_with_resolution_to_str(pinfo->pool, tvb, AT_ETHER, 0));
batadv_vis_entry_tree = proto_item_add_subtree(ti, ett_batadv_vis_entry);
proto_tree_add_item(batadv_vis_entry_tree, hf_batadv_vis_entry_dst, tvb, 0, 6, ENC_NA);
@@ -3501,7 +3501,7 @@ static void dissect_vis_entry_v8(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, 0, VIS_ENTRY_V8_SIZE,
"VIS Entry: %s",
- tvb_address_with_resolution_to_str(wmem_packet_scope(), tvb, AT_ETHER, 6));
+ tvb_address_with_resolution_to_str(pinfo->pool, tvb, AT_ETHER, 6));
batadv_vis_entry_tree = proto_item_add_subtree(ti, ett_batadv_vis_entry);
proto_tree_add_item(batadv_vis_entry_tree, hf_batadv_vis_entry_src, tvb, 0, 6, ENC_NA);
@@ -3539,7 +3539,7 @@ static void dissect_batadv_tt_query_v14(tvbuff_t *tvb, packet_info *pinfo, proto
int offset = 0, i;
int tt_type;
- tt_query_packeth = wmem_new(wmem_packet_scope(), struct tt_query_packet_v14);
+ tt_query_packeth = wmem_new(pinfo->pool, struct tt_query_packet_v14);
tt_query_packeth->version = tvb_get_guint8(tvb, 1);
tt_query_packeth->ttl = tvb_get_guint8(tvb, 2);
@@ -3574,7 +3574,7 @@ static void dissect_batadv_tt_query_v14(tvbuff_t *tvb, packet_info *pinfo, proto
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, 0, TT_QUERY_PACKET_V14_SIZE,
"B.A.T.M.A.N. TT Query, Dst: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &tt_query_packeth->dst));
+ address_with_resolution_to_str(pinfo->pool, &tt_query_packeth->dst));
batadv_tt_query_tree = proto_item_add_subtree(ti, ett_batadv_tt_query);
/* items */
@@ -3647,7 +3647,7 @@ static void dissect_tt_entry_v14(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, 0, TT_ENTRY_V14_SIZE,
"TT Entry: %s",
- tvb_address_with_resolution_to_str(wmem_packet_scope(), tvb, AT_ETHER, 1));
+ tvb_address_with_resolution_to_str(pinfo->pool, tvb, AT_ETHER, 1));
batadv_tt_entry_tree = proto_item_add_subtree(ti, ett_batadv_tt_entry);
proto_tree_add_bitmask(batadv_tt_entry_tree, tvb, 0, hf_batadv_tt_entry_flags,
@@ -3684,7 +3684,7 @@ static void dissect_batadv_roam_adv_v14(tvbuff_t *tvb, packet_info *pinfo, proto
gint length_remaining;
int offset = 0;
- roam_adv_packeth = wmem_new(wmem_packet_scope(), struct roam_adv_packet_v14);
+ roam_adv_packeth = wmem_new(pinfo->pool, struct roam_adv_packet_v14);
roam_adv_packeth->version = tvb_get_guint8(tvb, 1);
roam_adv_packeth->ttl = tvb_get_guint8(tvb, 2);
@@ -3697,12 +3697,12 @@ static void dissect_batadv_roam_adv_v14(tvbuff_t *tvb, packet_info *pinfo, proto
set_address_tvb(&roam_adv_packeth->client, AT_ETHER, 6, tvb, 16);
/* Set info column */
- col_add_fstr(pinfo->cinfo, COL_INFO, "Client %s", address_with_resolution_to_str(wmem_packet_scope(), &roam_adv_packeth->client));
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Client %s", address_with_resolution_to_str(pinfo->pool, &roam_adv_packeth->client));
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin, tvb, 0, ROAM_ADV_PACKET_V14_SIZE,
"B.A.T.M.A.N. Roam: %s",
- address_with_resolution_to_str(wmem_packet_scope(), &roam_adv_packeth->client));
+ address_with_resolution_to_str(pinfo->pool, &roam_adv_packeth->client));
batadv_roam_adv_tree = proto_item_add_subtree(ti, ett_batadv_roam_adv);
/* items */
@@ -3772,7 +3772,7 @@ static void dissect_batadv_coded_v15(tvbuff_t *tvb, packet_info *pinfo,
gint length_remaining;
int offset = 0;
- coded_packeth = wmem_new(wmem_packet_scope(), struct coded_packet_v15);
+ coded_packeth = wmem_new(pinfo->pool, struct coded_packet_v15);
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin,
@@ -3906,7 +3906,7 @@ static void dissect_batadv_elp_v15(tvbuff_t *tvb, packet_info *pinfo,
gint length_remaining;
int offset = 0;
- elp_packeth = wmem_new(wmem_packet_scope(), struct elp_packet_v15);
+ elp_packeth = wmem_new(pinfo->pool, struct elp_packet_v15);
/* Set tree info */
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin,
@@ -4003,7 +4003,7 @@ static int dissect_batadv_ogm2_v15(tvbuff_t *tvb, int offset,
if (version == 0 || type != BATADV_OGM2_V15)
return -1;
- ogm2_packeth = wmem_new(wmem_packet_scope(), struct ogm2_packet_v15);
+ ogm2_packeth = wmem_new(pinfo->pool, struct ogm2_packet_v15);
/* Set tree info */
ogm2_packeth->tvlv_len = tvb_get_ntohs(tvb, 16);
@@ -4011,7 +4011,7 @@ static int dissect_batadv_ogm2_v15(tvbuff_t *tvb, int offset,
tvb, offset,
OGM2_PACKET_V15_SIZE + ogm2_packeth->tvlv_len,
"B.A.T.M.A.N. OGM2, Orig: %s",
- tvb_address_with_resolution_to_str(wmem_packet_scope(), tvb, AT_ETHER, offset + 8));
+ tvb_address_with_resolution_to_str(pinfo->pool, tvb, AT_ETHER, offset + 8));
batadv_ogm2_tree = proto_item_add_subtree(ti, ett_batadv_ogm2);
/* items */
@@ -4113,7 +4113,7 @@ static void dissect_batadv_unicast_tvlv_v15(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *batadv_unicast_tvlv_tree;
proto_item *ti;
- unicast_tvlv_packeth = wmem_new(wmem_packet_scope(), struct unicast_tvlv_packet_v15);
+ unicast_tvlv_packeth = wmem_new(pinfo->pool, struct unicast_tvlv_packet_v15);
/* Set info column */
col_clear(pinfo->cinfo, COL_INFO);
@@ -4124,8 +4124,8 @@ static void dissect_batadv_unicast_tvlv_v15(tvbuff_t *tvb, packet_info *pinfo,
tvb, 0,
UNICAST_TVLV_PACKET_V15_SIZE + unicast_tvlv_packeth->tvlv_len,
"B.A.T.M.A.N. Unicast TVLV, Src: %s Dst: %s",
- tvb_address_with_resolution_to_str(wmem_packet_scope(), tvb, AT_ETHER, 10),
- tvb_address_with_resolution_to_str(wmem_packet_scope(), tvb, AT_ETHER, 4));
+ tvb_address_with_resolution_to_str(pinfo->pool, tvb, AT_ETHER, 10),
+ tvb_address_with_resolution_to_str(pinfo->pool, tvb, AT_ETHER, 4));
batadv_unicast_tvlv_tree = proto_item_add_subtree(ti, ett_batadv_unicast_tvlv);
/* items */
@@ -4555,7 +4555,7 @@ static int dissect_batadv_tvlv_v15_tt_change(tvbuff_t *tvb,
ti = proto_tree_add_protocol_format(tree, proto_batadv_plugin,
tvb, offset, 12,
"Entry, %s",
- tvb_address_with_resolution_to_str(wmem_packet_scope(), tvb, AT_ETHER, offset + 4));
+ tvb_address_with_resolution_to_str(pinfo->pool, tvb, AT_ETHER, offset + 4));
change_tree = proto_item_add_subtree(ti, ett_batadv_tvlv_tt_change);
proto_tree_add_bitmask(change_tree, tvb, offset,