From 6df83e8078aafe6b6dfa03cf1abc33cde0f6612d Mon Sep 17 00:00:00 2001 From: Evan Huus Date: Sat, 21 Sep 2013 17:04:41 +0000 Subject: Add _g_ to the names of functions that allocate glib memory. This is a bit more explicit, and frees up the "generic" names (like tvb_memdup) for new signatures that take the appropriate wmem pool. Majority of the conversion done with sed. svn path=/trunk/; revision=52164 --- asn1/c1222/packet-c1222-template.c | 8 ++++---- asn1/ldap/ldap.cnf | 2 +- asn1/t124/t124.cnf | 2 +- epan/dissectors/packet-9p.c | 12 ++++++------ epan/dissectors/packet-bmc.c | 2 +- epan/dissectors/packet-btavrcp.c | 10 +++++----- epan/dissectors/packet-bthcrp.c | 2 +- epan/dissectors/packet-c1222.c | 8 ++++---- epan/dissectors/packet-data.c | 2 +- epan/dissectors/packet-dcerpc-netlogon.c | 2 +- epan/dissectors/packet-dcerpc-nt.c | 2 +- epan/dissectors/packet-dcerpc-spoolss.c | 6 +++--- epan/dissectors/packet-dcerpc.c | 4 ++-- epan/dissectors/packet-icq.c | 2 +- epan/dissectors/packet-ieee802154.c | 2 +- epan/dissectors/packet-lapsat.c | 2 +- epan/dissectors/packet-ldap.c | 2 +- epan/dissectors/packet-ldss.c | 4 ++-- epan/dissectors/packet-mih.c | 8 ++++---- epan/dissectors/packet-nfs.c | 10 +++++----- epan/dissectors/packet-nlm.c | 2 +- epan/dissectors/packet-ntlmssp.c | 4 ++-- epan/dissectors/packet-ppcap.c | 2 +- epan/dissectors/packet-ppp.c | 2 +- epan/dissectors/packet-smb2.c | 2 +- epan/dissectors/packet-t124.c | 2 +- epan/dissectors/packet-tacacs.c | 2 +- epan/dissectors/packet-wsp.c | 2 +- epan/dissectors/packet-xml.c | 2 +- epan/dissectors/packet-xtp.c | 2 +- epan/proto.c | 2 +- epan/tvbuff.c | 14 +++++++------- epan/tvbuff.h | 12 ++++++------ epan/tvbuff_composite.c | 2 +- epan/wslua/wslua_field.c | 8 ++++---- epan/wslua/wslua_tvb.c | 2 +- 36 files changed, 77 insertions(+), 77 deletions(-) diff --git a/asn1/c1222/packet-c1222-template.c b/asn1/c1222/packet-c1222-template.c index e2617f89ff..4e5113cc97 100644 --- a/asn1/c1222/packet-c1222-template.c +++ b/asn1/c1222/packet-c1222-template.c @@ -301,11 +301,11 @@ static uat_t *c1222_uat; #define FILL_START int length, start_offset = offset; #define FILL_TABLE(fieldname) \ length = offset - start_offset; \ - fieldname = (guint8 *)tvb_memdup(tvb, start_offset, length); \ + fieldname = (guint8 *)tvb_g_memdup(tvb, start_offset, length); \ fieldname##_len = length; #define FILL_TABLE_TRUNCATE(fieldname, len) \ length = 1 + 2*(offset - start_offset); \ - fieldname = (guint8 *)tvb_memdup(tvb, start_offset, length); \ + fieldname = (guint8 *)tvb_g_memdup(tvb, start_offset, length); \ fieldname##_len = len; #else /* HAVE_LIBGCRYPT */ #define FILL_TABLE(fieldname) @@ -919,7 +919,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_ return offset; encrypted = TRUE; if (c1222_decrypt) { - buffer = (guchar *)tvb_memdup(tvb, offset, len2); + buffer = (guchar *)tvb_g_memdup(tvb, offset, len2); if (!decrypt_packet(buffer, len2, TRUE)) { g_free(buffer); crypto_bad = TRUE; @@ -938,7 +938,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_ len2 = tvb_length_remaining(tvb, offset); if (len2 <= 0) return offset; - buffer = (guchar *)tvb_memdup(tvb, offset, len2); + buffer = (guchar *)tvb_g_memdup(tvb, offset, len2); epsem_buffer = tvb_new_subset_remaining(tvb, offset); if (c1222_decrypt) { if (!decrypt_packet(buffer, len2, FALSE)) { diff --git a/asn1/ldap/ldap.cnf b/asn1/ldap/ldap.cnf index c1d76ce015..43e36dc115 100644 --- a/asn1/ldap/ldap.cnf +++ b/asn1/ldap/ldap.cnf @@ -194,7 +194,7 @@ char *mechanism = NULL; * different type and/or mechanism. */ if(!actx->pinfo->fd->flags.visited) { - mechanism = tvb_get_string(parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0)); + mechanism = tvb_get_g_string(parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0)); ldap_info->first_auth_frame = 0; /* not known until we see the bind reply */ /* * If the mechanism in this request is an empty string (which is diff --git a/asn1/t124/t124.cnf b/asn1/t124/t124.cnf index 0153e43385..a49e3820e0 100644 --- a/asn1/t124/t124.cnf +++ b/asn1/t124/t124.cnf @@ -154,7 +154,7 @@ RegistryAllocateHandleResponse/result AllocateHandleResponseResult if(next_tvb) { - ns = tvb_get_string(t124NSIdentifier, 0, tvb_length(t124NSIdentifier)); + ns = tvb_get_g_string(t124NSIdentifier, 0, tvb_length(t124NSIdentifier)); if(ns != NULL) { dissector_try_string(t124_ns_dissector_table, ns, next_tvb, actx->pinfo, top_tree); g_free(ns); diff --git a/epan/dissectors/packet-9p.c b/epan/dissectors/packet-9p.c index f3c2947f15..f99db251f3 100644 --- a/epan/dissectors/packet-9p.c +++ b/epan/dissectors/packet-9p.c @@ -1273,7 +1273,7 @@ static int dissect_9P(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void proto_tree_add_item(sub_tree, hf_9P_parmsz, tvb, offset, 2, ENC_LITTLE_ENDIAN); if (firstpass) { - tvb_s = tvb_get_string(tvb, offset+2, _9p_len); + tvb_s = tvb_get_g_string(tvb, offset+2, _9p_len); if (!strncmp(tvb_s, "9P2000.L", _9p_len)) { u32 = _9P2000_L; @@ -1363,7 +1363,7 @@ static int dissect_9P(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void sub_tree = proto_item_add_subtree(ti, ett_9P_aname); proto_tree_add_item(sub_tree, hf_9P_parmsz, tvb, offset, 2, ENC_LITTLE_ENDIAN); if(firstpass) { - tvb_s = tvb_get_string(tvb, offset+2, _9p_len); + tvb_s = tvb_get_g_string(tvb, offset+2, _9p_len); conv_set_fid(pinfo, fid, tvb_s, _9p_len+1); g_free(tvb_s); } @@ -1409,7 +1409,7 @@ static int dissect_9P(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void } if (firstpass) { - tvb_s = tvb_get_string(tvb, offset+2, _9p_len); + tvb_s = tvb_get_g_string(tvb, offset+2, _9p_len); wmem_strbuf_append_c(tmppath, '/'); wmem_strbuf_append(tmppath, tvb_s); g_free(tvb_s); @@ -1484,7 +1484,7 @@ static int dissect_9P(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void tmppath = wmem_strbuf_sized_new(wmem_packet_scope(), 0, MAXPATHLEN); wmem_strbuf_append(tmppath, fid_path); wmem_strbuf_append_c(tmppath, '/'); - tvb_s = tvb_get_string(tvb, offset+2, _9p_len); + tvb_s = tvb_get_g_string(tvb, offset+2, _9p_len); wmem_strbuf_append(tmppath, tvb_s); g_free(tvb_s); } @@ -1519,7 +1519,7 @@ static int dissect_9P(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void tmppath = wmem_strbuf_sized_new(wmem_packet_scope(), 0, MAXPATHLEN); wmem_strbuf_append(tmppath, fid_path); wmem_strbuf_append_c(tmppath, '/'); - tvb_s = tvb_get_string(tvb, offset+2, _9p_len); + tvb_s = tvb_get_g_string(tvb, offset+2, _9p_len); wmem_strbuf_append(tmppath, tvb_s); g_free(tvb_s); } @@ -1935,7 +1935,7 @@ static int dissect_9P(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void wmem_strbuf_append(tmppath, conv_get_fid(pinfo, dfid)); wmem_strbuf_append_c(tmppath, '/'); - tvb_s = tvb_get_string(tvb, offset+2, _9p_len); + tvb_s = tvb_get_g_string(tvb, offset+2, _9p_len); wmem_strbuf_append(tmppath, tvb_s); g_free(tvb_s); diff --git a/epan/dissectors/packet-bmc.c b/epan/dissectors/packet-bmc.c index e7ff73b6b3..35164a406a 100644 --- a/epan/dissectors/packet-bmc.c +++ b/epan/dissectors/packet-bmc.c @@ -103,7 +103,7 @@ dissect_bmc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) /* Needs bit-reversing. Create a new buffer, copy the message to it and bit-reverse */ len = tvb_length(tvb); - reversing_buffer = (guint8 *)tvb_memdup(tvb, offset, len); + reversing_buffer = (guint8 *)tvb_g_memdup(tvb, offset, len); p_rev = reversing_buffer; /* Entire message is bit reversed */ for (i=0; icinfo, COL_INFO, " - Title: \"%s\"", value); @@ -663,7 +663,7 @@ dissect_item_mediaplayer(tvbuff_t *tvb, proto_tree *tree, gint offset) item_length = tvb_get_ntohs(tvb, offset + 1); displayable_name_length = tvb_get_ntohs(tvb, offset + 1 + 2 + 1 + 1 + 4 + 16 + 1 + 2); - displayable_name = tvb_get_string(tvb, offset + 1 + 2 + 1 + 1 + 4 + 16 + 1 + 2 + 2, displayable_name_length); + displayable_name = tvb_get_g_string(tvb, offset + 1 + 2 + 1 + 1 + 4 + 16 + 1 + 2 + 2, displayable_name_length); pitem = proto_tree_add_text(tree, tvb, offset, 1 + 2 + item_length, "Player: %s", displayable_name); ptree = proto_item_add_subtree(pitem, ett_btavrcp_player); @@ -825,7 +825,7 @@ dissect_item_media_element(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, item_length = tvb_get_ntohs(tvb, offset + 1); displayable_name_length = tvb_get_ntohs(tvb, offset + 1 + 2 + 8 + 1 + 2); - displayable_name = tvb_get_string(tvb, offset + 1 + 2 + 8 + 1 + 2 + 2, displayable_name_length); + displayable_name = tvb_get_g_string(tvb, offset + 1 + 2 + 8 + 1 + 2 + 2, displayable_name_length); pitem = proto_tree_add_text(tree, tvb, offset, 1 + 2 + item_length, "Element: %s", displayable_name); ptree = proto_item_add_subtree(pitem, ett_btavrcp_element); @@ -877,7 +877,7 @@ dissect_item_folder(tvbuff_t *tvb, proto_tree *tree, gint offset) item_length = tvb_get_ntohs(tvb, offset + 1); displayable_name_length = tvb_get_ntohs(tvb, offset + 1 + 2 + 8 + 1 + 1 + 2); - displayable_name = tvb_get_string(tvb, offset + 1 + 2 + 8 + 1 + 1 + 2 + 2, displayable_name_length); + displayable_name = tvb_get_g_string(tvb, offset + 1 + 2 + 8 + 1 + 1 + 2 + 2, displayable_name_length); pitem = proto_tree_add_text(tree, tvb, offset, 1 + 2 + item_length, "Folder : %s", displayable_name); ptree = proto_item_add_subtree(pitem, ett_btavrcp_folder); @@ -1903,7 +1903,7 @@ dissect_browsing(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, folder_name_length = tvb_get_ntohs(tvb, offset); offset += 2; proto_tree_add_item(ptree, hf_btavrcp_folder_name, tvb, offset, folder_name_length, ENC_NA); - folder_name = tvb_get_string(tvb, offset, folder_name_length); + folder_name = tvb_get_g_string(tvb, offset, folder_name_length); offset += folder_name_length; proto_item_append_text(pitem, "%s/", folder_name); col_append_fstr(pinfo->cinfo, COL_INFO, "%s/", folder_name); diff --git a/epan/dissectors/packet-bthcrp.c b/epan/dissectors/packet-bthcrp.c index 91ad17ea13..f3085c7645 100644 --- a/epan/dissectors/packet-bthcrp.c +++ b/epan/dissectors/packet-bthcrp.c @@ -237,7 +237,7 @@ dissect_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 *id; proto_tree_add_item(tree, hf_bthcrp_control_1284_id, tvb, offset, -1, ENC_ASCII | ENC_NA); - id = tvb_get_string(tvb, offset, tvb_length_remaining(tvb, offset)); + id = tvb_get_g_string(tvb, offset, tvb_length_remaining(tvb, offset)); col_append_fstr(pinfo->cinfo, COL_INFO, " - 1284 ID: %s", id); offset += tvb_length_remaining(tvb, offset); } diff --git a/epan/dissectors/packet-c1222.c b/epan/dissectors/packet-c1222.c index e707d97342..ebc9041b43 100644 --- a/epan/dissectors/packet-c1222.c +++ b/epan/dissectors/packet-c1222.c @@ -349,11 +349,11 @@ static uat_t *c1222_uat; #define FILL_START int length, start_offset = offset; #define FILL_TABLE(fieldname) \ length = offset - start_offset; \ - fieldname = (guint8 *)tvb_memdup(tvb, start_offset, length); \ + fieldname = (guint8 *)tvb_g_memdup(tvb, start_offset, length); \ fieldname##_len = length; #define FILL_TABLE_TRUNCATE(fieldname, len) \ length = 1 + 2*(offset - start_offset); \ - fieldname = (guint8 *)tvb_memdup(tvb, start_offset, length); \ + fieldname = (guint8 *)tvb_g_memdup(tvb, start_offset, length); \ fieldname##_len = len; #else /* HAVE_LIBGCRYPT */ #define FILL_TABLE(fieldname) @@ -967,7 +967,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_ return offset; encrypted = TRUE; if (c1222_decrypt) { - buffer = (guchar *)tvb_memdup(tvb, offset, len2); + buffer = (guchar *)tvb_g_memdup(tvb, offset, len2); if (!decrypt_packet(buffer, len2, TRUE)) { g_free(buffer); crypto_bad = TRUE; @@ -986,7 +986,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_ len2 = tvb_length_remaining(tvb, offset); if (len2 <= 0) return offset; - buffer = (guchar *)tvb_memdup(tvb, offset, len2); + buffer = (guchar *)tvb_g_memdup(tvb, offset, len2); epsem_buffer = tvb_new_subset_remaining(tvb, offset); if (c1222_decrypt) { if (!decrypt_packet(buffer, len2, FALSE)) { diff --git a/epan/dissectors/packet-data.c b/epan/dissectors/packet-data.c index 1290cf3cc8..9a866619b0 100644 --- a/epan/dissectors/packet-data.c +++ b/epan/dissectors/packet-data.c @@ -74,7 +74,7 @@ dissect_data(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree) proto_item *ti; proto_tree *data_tree; if (new_pane) { - guint8 *real_data = (guint8 *)tvb_memdup(tvb, 0, bytes); + guint8 *real_data = (guint8 *)tvb_g_memdup(tvb, 0, bytes); data_tvb = tvb_new_child_real_data(tvb,real_data,bytes,bytes); tvb_set_free_cb(data_tvb, g_free); add_new_data_source(pinfo, data_tvb, "Not dissected data bytes"); diff --git a/epan/dissectors/packet-dcerpc-netlogon.c b/epan/dissectors/packet-dcerpc-netlogon.c index 17a84c87c1..b088cc1541 100644 --- a/epan/dissectors/packet-dcerpc-netlogon.c +++ b/epan/dissectors/packet-dcerpc-netlogon.c @@ -7982,7 +7982,7 @@ dissect_packet_data(tvbuff_t *tvb ,tvbuff_t *auth_tvb _U_, } crypt_rc4_init(&rc4state,vars->encryption_key,16); crypt_rc4(&rc4state,(guint8*)©confounder,8); - decrypted = (guint8*)tvb_memdup(tvb, offset,data_len); + decrypted = (guint8*)tvb_g_memdup(tvb, offset,data_len); crypt_rc4_init(&rc4state,vars->encryption_key,16); crypt_rc4(&rc4state,decrypted,data_len); buf = tvb_new_child_real_data(tvb, decrypted, data_len, data_len); diff --git a/epan/dissectors/packet-dcerpc-nt.c b/epan/dissectors/packet-dcerpc-nt.c index 8f5a1f1f67..72f2902a49 100644 --- a/epan/dissectors/packet-dcerpc-nt.c +++ b/epan/dissectors/packet-dcerpc-nt.c @@ -166,7 +166,7 @@ dissect_null_term_wstring(tvbuff_t *tvb, int offset, len = tmp_offset - offset; /* tvb_get_ephemeral_string didn't want the length with the 0*/ - s = tvb_get_unicode_string(tvb, offset, len, ENC_LITTLE_ENDIAN); + s = tvb_get_g_unicode_string(tvb, offset, len, ENC_LITTLE_ENDIAN); proto_tree_add_string(tree, hf_index, tvb, offset, len, s); g_free(s); diff --git a/epan/dissectors/packet-dcerpc-spoolss.c b/epan/dissectors/packet-dcerpc-spoolss.c index 1133642b24..899140db53 100644 --- a/epan/dissectors/packet-dcerpc-spoolss.c +++ b/epan/dissectors/packet-dcerpc-spoolss.c @@ -700,7 +700,7 @@ dissect_printerdata_data(tvbuff_t *tvb, int offset, switch(type) { case DCERPC_REG_SZ: { - char *data = tvb_get_unicode_string(tvb, offset - size, size, ENC_LITTLE_ENDIAN); + char *data = tvb_get_g_unicode_string(tvb, offset - size, size, ENC_LITTLE_ENDIAN); proto_item_append_text(item, ": %s", data); @@ -1099,7 +1099,7 @@ dissect_spoolss_uint16uni(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, return offset; } - text = tvb_get_unicode_string(tvb, offset, remaining, ENC_LITTLE_ENDIAN); + text = tvb_get_g_unicode_string(tvb, offset, remaining, ENC_LITTLE_ENDIAN); len = (int)strlen(text); proto_tree_add_text(tree, tvb, offset, len * 2, "%s: %s", @@ -5908,7 +5908,7 @@ cb_notify_str_postprocess(packet_info *pinfo _U_, len = tvb_get_letohl(tvb, start_offset); - s = tvb_get_unicode_string( + s = tvb_get_g_unicode_string( tvb, start_offset + 4, (end_offset - start_offset - 4), ENC_LITTLE_ENDIAN); /* Append string to upper-level proto_items */ diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c index c84f13a1d1..d6d86b4b55 100644 --- a/epan/dissectors/packet-dcerpc.c +++ b/epan/dissectors/packet-dcerpc.c @@ -4193,7 +4193,7 @@ dissect_dcerpc_cn_rts(tvbuff_t *tvb, gint offset, packet_info *pinfo, const guint32 conformance_count = dcerpc_tvb_get_ntohl(tvb, offset, hdr->drep); proto_tree_add_uint(cn_rts_command_tree, hf_dcerpc_cn_rts_command_conformancecount, tvb, offset, 4, conformance_count); offset += 4; - padding = (guint8 *)tvb_memdup(tvb, offset, conformance_count); + padding = (guint8 *)tvb_g_memdup(tvb, offset, conformance_count); proto_tree_add_bytes(cn_rts_command_tree, hf_dcerpc_cn_rts_command_padding, tvb, offset, conformance_count, padding); offset += conformance_count; } break; @@ -4219,7 +4219,7 @@ dissect_dcerpc_cn_rts(tvbuff_t *tvb, gint offset, packet_info *pinfo, offset += 16; } break; } - padding = (guint8 *)tvb_memdup(tvb, offset, 12); + padding = (guint8 *)tvb_g_memdup(tvb, offset, 12); proto_tree_add_bytes(cn_rts_command_tree, hf_dcerpc_cn_rts_command_padding, tvb, offset, 12, padding); offset += 12; } break; diff --git a/epan/dissectors/packet-icq.c b/epan/dissectors/packet-icq.c index af4adabde2..e992b1af0d 100644 --- a/epan/dissectors/packet-icq.c +++ b/epan/dissectors/packet-icq.c @@ -1106,7 +1106,7 @@ dissect_icqv5Client(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * bytes in the buffer. */ rounded_size = ((((capturedsize - ICQ5_CL_SESSIONID) + 3)/4)*4) + ICQ5_CL_SESSIONID; - /* rounded_size might exceed the tvb bounds so we can't just use tvb_memdup here. */ + /* rounded_size might exceed the tvb bounds so we can't just use tvb_g_memdup here. */ decr_pd = (guint8 *)g_malloc(rounded_size); tvb_memcpy(tvb, decr_pd, 0, capturedsize); decrypt_v5(decr_pd, rounded_size, key); diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c index 28289810f9..df3c0d394c 100644 --- a/epan/dissectors/packet-ieee802154.c +++ b/epan/dissectors/packet-ieee802154.c @@ -1882,7 +1882,7 @@ dissect_ieee802154_decrypt(tvbuff_t * tvb, guint offset, packet_info * pinfo, ie * We will decrypt the message in-place and then use the buffer as the * real data for the new tvb. */ - text = (guint8 *)tvb_memdup(tvb, offset, captured_len); + text = (guint8 *)tvb_g_memdup(tvb, offset, captured_len); /* Perform CTR-mode transformation. */ if (!ccm_ctr_encrypt(key, tmp, rx_mic, text, captured_len)) { diff --git a/epan/dissectors/packet-lapsat.c b/epan/dissectors/packet-lapsat.c index 5a2b9dfa58..fc8cacfe37 100644 --- a/epan/dissectors/packet-lapsat.c +++ b/epan/dissectors/packet-lapsat.c @@ -505,7 +505,7 @@ dissect_lapsat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if ((plen + hlen) == tvb_length(tvb)) { /* Need to integrate the last nibble */ - guint8 *data = (guint8 *)tvb_memdup(tvb, hlen, plen); + guint8 *data = (guint8 *)tvb_g_memdup(tvb, hlen, plen); data[plen-1] |= tvb_get_guint8(tvb, 2) << 4; payload = tvb_new_child_real_data(tvb, data, plen, plen); tvb_set_free_cb(payload, g_free); diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c index dcf400d3fb..9e60f1c0df 100644 --- a/epan/dissectors/packet-ldap.c +++ b/epan/dissectors/packet-ldap.c @@ -1291,7 +1291,7 @@ char *mechanism = NULL; * different type and/or mechanism. */ if(!actx->pinfo->fd->flags.visited) { - mechanism = tvb_get_string(parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0)); + mechanism = tvb_get_g_string(parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0)); ldap_info->first_auth_frame = 0; /* not known until we see the bind reply */ /* * If the mechanism in this request is an empty string (which is diff --git a/epan/dissectors/packet-ldss.c b/epan/dissectors/packet-ldss.c index c5ab0836a7..dcf7896861 100644 --- a/epan/dissectors/packet-ldss.c +++ b/epan/dissectors/packet-ldss.c @@ -288,7 +288,7 @@ dissect_ldss_broadcast(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) digest_type = tvb_get_guint8 (tvb, 2); compression = tvb_get_guint8 (tvb, 3); cookie = tvb_get_ntohl (tvb, 4); - digest = (guint8 *)tvb_memdup (tvb, 8, DIGEST_LEN); + digest = (guint8 *)tvb_g_memdup (tvb, 8, DIGEST_LEN); size = tvb_get_ntoh64 (tvb, 40); offset = tvb_get_ntoh64 (tvb, 48); targetTime = tvb_get_ntohl (tvb, 56); @@ -522,7 +522,7 @@ dissect_ldss_transfer (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) FALSE); /* Include new-line in line */ - line = (guint8 *)tvb_memdup(tvb, offset, linelen+1); /* XXX - memory leak? */ + line = (guint8 *)tvb_g_memdup(tvb, offset, linelen+1); /* XXX - memory leak? */ if (tree) { ti = proto_tree_add_text(ldss_tree, tvb, offset, linelen, diff --git a/epan/dissectors/packet-mih.c b/epan/dissectors/packet-mih.c index cf50dfbf18..d09cabb722 100644 --- a/epan/dissectors/packet-mih.c +++ b/epan/dissectors/packet-mih.c @@ -1948,7 +1948,7 @@ static void dissect_mih_tlv(tvbuff_t *tvb,int offset, proto_tree *tlv_tree, guin case VEND_SPECIFIC_TLV : /*Vendor specific tlv*/ - proto_tree_add_text(tlv_tree, tvb, offset, length, "Vendor Specific TLV :%s", tvb_get_string(tvb, offset, length)); + proto_tree_add_text(tlv_tree, tvb, offset, length, "Vendor Specific TLV :%s", tvb_get_g_string(tvb, offset, length)); break; default :/*did not match type*/ @@ -1956,15 +1956,15 @@ static void dissect_mih_tlv(tvbuff_t *tvb,int offset, proto_tree *tlv_tree, guin /*RESERVED TLVs*/ if(type > 63 && type < 100) - proto_tree_add_text(tlv_tree, tvb, offset, length, "Reserved TLV :%s", tvb_get_string(tvb, offset, length)); + proto_tree_add_text(tlv_tree, tvb, offset, length, "Reserved TLV :%s", tvb_get_g_string(tvb, offset, length)); /*EXPERIMENTAL TLVs*/ else if(type > 100 && type < 255) - proto_tree_add_text(tlv_tree, tvb, offset, length, "Experimental TLV :%s", tvb_get_string(tvb, offset, length)); + proto_tree_add_text(tlv_tree, tvb, offset, length, "Experimental TLV :%s", tvb_get_g_string(tvb, offset, length)); /*UNKNOWN TLVs*/ else - proto_tree_add_text(tlv_tree, tvb, offset, length, "UNKNOWN TLV :%s", tvb_get_string(tvb, offset, length)); + proto_tree_add_text(tlv_tree, tvb, offset, length, "UNKNOWN TLV :%s", tvb_get_g_string(tvb, offset, length)); } return; } diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c index f834c7d7a8..e5ad85b7a4 100644 --- a/epan/dissectors/packet-nfs.c +++ b/epan/dissectors/packet-nfs.c @@ -981,7 +981,7 @@ nfs_name_snoop_add_name(int xid, tvbuff_t *tvb, int name_offset, int name_len, i if(parent_len){ nns->parent_len=parent_len; - nns->parent=(unsigned char *)tvb_memdup(tvb, parent_offset, parent_len); + nns->parent=(unsigned char *)tvb_g_memdup(tvb, parent_offset, parent_len); } else { nns->parent_len=0; nns->parent=NULL; @@ -1042,7 +1042,7 @@ nfs_name_snoop_add_fh(int xid, tvbuff_t *tvb, int fh_offset, int fh_length) } /* oki, we have a new entry */ - fh=(unsigned char *)tvb_memdup(tvb, fh_offset, fh_length); + fh=(unsigned char *)tvb_g_memdup(tvb, fh_offset, fh_length); nns->fh=fh; nns->fh_length=fh_length; @@ -1158,7 +1158,7 @@ nfs_name_snoop_fh(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int fh_of fhlen=fh_length; /* align it */ - fhdata=(guint32 *)tvb_memdup(tvb, fh_offset, fh_length); + fhdata=(guint32 *)tvb_g_memdup(tvb, fh_offset, fh_length); fhkey[0].length=1; fhkey[0].key=&fhlen; fhkey[1].length=fhlen/4; @@ -2321,7 +2321,7 @@ dissect_fhandle_data(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree * guint8 *fh_array; proto_item *fh_item = NULL; - fh_array = tvb_get_string(tvb, offset, fhlen); + fh_array = tvb_get_g_string(tvb, offset, fhlen); fhhash = crc32_ccitt(fh_array, fhlen); g_free(fh_array); @@ -7963,7 +7963,7 @@ dissect_nfs4_stateid(tvbuff_t *tvb, int offset, proto_tree *tree, guint16 *hash) newftree = proto_item_add_subtree(fitem, ett_nfs4_stateid); } - sidh_array = tvb_get_string(tvb, offset, 16); + sidh_array = tvb_get_g_string(tvb, offset, 16); sid_hash = crc16_ccitt(sidh_array, 16); g_free(sidh_array); diff --git a/epan/dissectors/packet-nlm.c b/epan/dissectors/packet-nlm.c index aba8f53fd6..380b710aaa 100644 --- a/epan/dissectors/packet-nlm.c +++ b/epan/dissectors/packet-nlm.c @@ -282,7 +282,7 @@ nlm_register_unmatched_msg(packet_info *pinfo, tvbuff_t *tvb, int offset) umd->req_frame=pinfo->fd->num; umd->ns=pinfo->fd->abs_ts; umd->cookie_len=tvb_get_ntohl(tvb, offset); - umd->cookie=(const guint8 *)tvb_memdup(tvb, offset+4, umd->cookie_len); + umd->cookie=(const guint8 *)tvb_g_memdup(tvb, offset+4, umd->cookie_len); /* remove any old duplicates */ old_umd=(nlm_msg_res_unmatched_data *)g_hash_table_lookup(nlm_msg_res_unmatched, (gconstpointer)umd); diff --git a/epan/dissectors/packet-ntlmssp.c b/epan/dissectors/packet-ntlmssp.c index 58eb02cfc0..e49ed1d9c5 100644 --- a/epan/dissectors/packet-ntlmssp.c +++ b/epan/dissectors/packet-ntlmssp.c @@ -2079,7 +2079,7 @@ decrypt_data_payload(tvbuff_t *tvb, int offset, guint32 encrypted_block_length, /* Store the decrypted contents in the packet state struct (of course at this point, they aren't decrypted yet) */ - packet_ntlmssp_info->decrypted_payload = (guint8 *)tvb_memdup(tvb, offset, + packet_ntlmssp_info->decrypted_payload = (guint8 *)tvb_g_memdup(tvb, offset, encrypted_block_length); packet_ntlmssp_info->payload_len = encrypted_block_length; decrypted_payloads = g_slist_prepend(decrypted_payloads, @@ -2589,7 +2589,7 @@ dissect_ntlmssp_encrypted_payload(tvbuff_t *data_tvb, /* Store the decrypted contents in the packet state struct (of course at this point, they aren't decrypted yet) */ - packet_ntlmssp_info->decrypted_payload = tvb_memdup(data_tvb, offset, + packet_ntlmssp_info->decrypted_payload = tvb_g_memdup(data_tvb, offset, encrypted_block_length); decrypted_payloads = g_slist_prepend(decrypted_payloads, packet_ntlmssp_info->decrypted_payload); diff --git a/epan/dissectors/packet-ppcap.c b/epan/dissectors/packet-ppcap.c index e7778bc32c..5587d06f64 100644 --- a/epan/dissectors/packet-ppcap.c +++ b/epan/dissectors/packet-ppcap.c @@ -375,7 +375,7 @@ dissect_ppcap_destination_address(tvbuff_t *tvb, packet_info * pinfo, proto_tree else if (key2 == 4) { char *string; - string = tvb_get_string(tvb, offset, msg_len); + string = tvb_get_g_string(tvb, offset, msg_len); proto_tree_add_string(ppcap_tree1, hf_ppcap_destination_nodeid, tvb, offset, msg_len, string); TVB_SET_ADDRESS(&pinfo->net_dst, AT_STRINGZ, tvb, offset, msg_len); COPY_ADDRESS_SHALLOW(&pinfo->dst, &pinfo->net_dst); diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c index 54ea0d7cb7..816fc4d814 100644 --- a/epan/dissectors/packet-ppp.c +++ b/epan/dissectors/packet-ppp.c @@ -4604,7 +4604,7 @@ dissect_iphc_crtp_fh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tvb_ensure_bytes_exist (tvb, 0, hdr_len); /* ip_hdr_len + 8 */ /* allocate a copy of the IP packet */ - ip_packet = (guchar *)tvb_memdup(tvb, 0, length); + ip_packet = (guchar *)tvb_g_memdup(tvb, 0, length); /* restore the proper values to the IP and UDP length fields */ ip_packet[2] = length >> 8; diff --git a/epan/dissectors/packet-smb2.c b/epan/dissectors/packet-smb2.c index 5df8c8a026..d06ba8dc34 100644 --- a/epan/dissectors/packet-smb2.c +++ b/epan/dissectors/packet-smb2.c @@ -6593,7 +6593,7 @@ dissect_smb2_transform_header(packet_info *pinfo _U_, proto_tree *tree, memcpy(&A_1[1], sti->nonce, 15 - 4); - plain_data = (guint8 *)tvb_memdup(tvb, offset, sti->size); + plain_data = (guint8 *)tvb_g_memdup(tvb, offset, sti->size); /* Open the cipher. */ if (gcry_cipher_open(&cipher_hd, GCRY_CIPHER_AES128, GCRY_CIPHER_MODE_CTR, 0)) { diff --git a/epan/dissectors/packet-t124.c b/epan/dissectors/packet-t124.c index eaa1505663..a84d0d9508 100644 --- a/epan/dissectors/packet-t124.c +++ b/epan/dissectors/packet-t124.c @@ -583,7 +583,7 @@ dissect_t124_T_value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, pr if(next_tvb) { - ns = tvb_get_string(t124NSIdentifier, 0, tvb_length(t124NSIdentifier)); + ns = tvb_get_g_string(t124NSIdentifier, 0, tvb_length(t124NSIdentifier)); if(ns != NULL) { dissector_try_string(t124_ns_dissector_table, ns, next_tvb, actx->pinfo, top_tree); g_free(ns); diff --git a/epan/dissectors/packet-tacacs.c b/epan/dissectors/packet-tacacs.c index 14babdc45e..73e5bca8de 100644 --- a/epan/dissectors/packet-tacacs.c +++ b/epan/dissectors/packet-tacacs.c @@ -390,7 +390,7 @@ tacplus_decrypted_tvb_setup( tvbuff_t *tvb, tvbuff_t **dst_tvb, packet_info *pin tvb_memcpy(tvb, session_id, 4,4); - buff = (guint8 *)tvb_memdup(tvb, TAC_PLUS_HDR_SIZE, len); + buff = (guint8 *)tvb_g_memdup(tvb, TAC_PLUS_HDR_SIZE, len); md5_xor( buff, key, len, session_id,version, tvb_get_guint8(tvb,2) ); diff --git a/epan/dissectors/packet-wsp.c b/epan/dissectors/packet-wsp.c index f41553731f..76bc584eb2 100644 --- a/epan/dissectors/packet-wsp.c +++ b/epan/dissectors/packet-wsp.c @@ -1781,7 +1781,7 @@ add_headers (proto_tree *tree, tvbuff_t *tvb, int hf, packet_info *pinfo) tvb, offset, 2, codepage); offset += 2; } else if (hdr_id >= 0x20) { /* Textual header */ - /* Header name MUST be NUL-ended string ==> tvb_get_stringz() */ + /* Header name MUST be NUL-ended string ==> tvb_get_g_stringz() */ hdr_str = (gchar *)tvb_get_ephemeral_stringz(tvb, hdr_start, (gint *)&hdr_len); val_start = hdr_start + hdr_len; val_id = tvb_get_guint8(tvb, val_start); diff --git a/epan/dissectors/packet-xml.c b/epan/dissectors/packet-xml.c index 20d93fab70..f517270235 100644 --- a/epan/dissectors/packet-xml.c +++ b/epan/dissectors/packet-xml.c @@ -235,7 +235,7 @@ static gboolean dissect_xml_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree * dissect_xml(tvb, pinfo, tree); return TRUE; } else if (pref_heuristic_unicode) { - const guint8 *data_str = tvb_get_unicode_string(tvb, 0, tvb_length(tvb), ENC_LITTLE_ENDIAN); + const guint8 *data_str = tvb_get_g_unicode_string(tvb, 0, tvb_length(tvb), ENC_LITTLE_ENDIAN); tvbuff_t *unicode_tvb = tvb_new_child_real_data(tvb, data_str, tvb_length(tvb)/2, tvb_length(tvb)/2); tvb_set_free_cb(unicode_tvb, g_free); if (tvbparse_peek(tvbparse_init(unicode_tvb, 0, -1, NULL, want_ignore), want_heur)) { diff --git a/epan/dissectors/packet-xtp.c b/epan/dissectors/packet-xtp.c index 4e42394515..1d05b76133 100644 --- a/epan/dissectors/packet-xtp.c +++ b/epan/dissectors/packet-xtp.c @@ -878,7 +878,7 @@ dissect_xtp_diag(tvbuff_t *tvb, proto_tree *tree, guint32 offset) { offset += 4; /* message(n) */ msg_len = tvb_length_remaining(tvb, offset); - diag->msg = tvb_get_string(tvb, offset, msg_len); + diag->msg = tvb_get_g_string(tvb, offset, msg_len); /** display **/ offset = start; diff --git a/epan/proto.c b/epan/proto.c index a80ce026a0..3975584853 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -1471,7 +1471,7 @@ proto_tree_new_item(field_info *new_fi, proto_tree *tree, */ if (length == -1) { /* This can throw an exception */ - string = tvb_get_stringz_enc(tvb, start, &length, encoding); + string = tvb_get_g_stringz_enc(tvb, start, &length, encoding); } else if (length == 0) { string = "[Empty]"; } else { diff --git a/epan/tvbuff.c b/epan/tvbuff.c index e3e35e0dc6..23d0ed933f 100644 --- a/epan/tvbuff.c +++ b/epan/tvbuff.c @@ -758,7 +758,7 @@ tvb_memcpy(tvbuff_t *tvb, void *target, const gint offset, size_t length) * meaning "to the end of the buffer"? */ void * -tvb_memdup(tvbuff_t *tvb, const gint offset, size_t length) +tvb_g_memdup(tvbuff_t *tvb, const gint offset, size_t length) { guint abs_offset, abs_length; void *duped; @@ -1964,7 +1964,7 @@ tvb_format_stringzpad_wsp(tvbuff_t *tvb, const gint offset, const gint size) * Throws an exception if the tvbuff ends before the string does. */ guint8 * -tvb_get_string(tvbuff_t *tvb, const gint offset, const gint length) +tvb_get_g_string(tvbuff_t *tvb, const gint offset, const gint length) { const guint8 *ptr; guint8 *strbuf = NULL; @@ -1991,7 +1991,7 @@ tvb_get_string(tvbuff_t *tvb, const gint offset, const gint length) * Returns an UTF-8 string that must be freed by the caller */ gchar * -tvb_get_unicode_string(tvbuff_t *tvb, const gint offset, gint length, const guint encoding) +tvb_get_g_unicode_string(tvbuff_t *tvb, const gint offset, gint length, const guint encoding) { gunichar2 uchar; gint i; /* Byte counter for tvbuff */ @@ -2187,7 +2187,7 @@ tvb_get_seasonal_string(tvbuff_t *tvb, const gint offset, const gint length) * string (including the terminating null) through a pointer. */ guint8 * -tvb_get_stringz_enc(tvbuff_t *tvb, const gint offset, gint *lengthp, const guint encoding) +tvb_get_g_stringz_enc(tvbuff_t *tvb, const gint offset, gint *lengthp, const guint encoding) { guint size; guint8 *strptr; @@ -2203,9 +2203,9 @@ tvb_get_stringz_enc(tvbuff_t *tvb, const gint offset, gint *lengthp, const guint } guint8 * -tvb_get_stringz(tvbuff_t *tvb, const gint offset, gint *lengthp) +tvb_get_g_stringz(tvbuff_t *tvb, const gint offset, gint *lengthp) { - return tvb_get_stringz_enc(tvb, offset, lengthp, ENC_UTF_8|ENC_NA); + return tvb_get_g_stringz_enc(tvb, offset, lengthp, ENC_UTF_8|ENC_NA); } /* @@ -2990,7 +2990,7 @@ tvb_uncompress(tvbuff_t *tvb, const int offset, int comprlen) return NULL; } - compr = (guint8 *)tvb_memdup(tvb, offset, comprlen); + compr = (guint8 *)tvb_g_memdup(tvb, offset, comprlen); if (!compr) return NULL; diff --git a/epan/tvbuff.h b/epan/tvbuff.h index 4739ff598b..4bdfc5d8f5 100644 --- a/epan/tvbuff.h +++ b/epan/tvbuff.h @@ -338,8 +338,8 @@ guint8 *ep_tvb_get_bits(tvbuff_t *tvb, guint bit_offset, gint no_of_bits, gboole WS_DLL_PUBLIC void* tvb_memcpy(tvbuff_t*, void* target, const gint offset, size_t length); /** It is the user's responsibility to g_free() the memory allocated by - * tvb_memdup(). Calls tvb_memcpy() */ -WS_DLL_PUBLIC void* tvb_memdup(tvbuff_t*, const gint offset, size_t length); + * tvb_g_memdup(). Calls tvb_memcpy() */ +WS_DLL_PUBLIC void* tvb_g_memdup(tvbuff_t*, const gint offset, size_t length); /* Same as above but the buffer returned from this function does not have to * be freed. It will be automatically freed after the packet is dissected. @@ -485,8 +485,8 @@ extern gchar *tvb_format_stringzpad_wsp(tvbuff_t *tvb, const gint offset, const * instead it will automatically be freed when a new capture * or file is opened. */ -WS_DLL_PUBLIC guint8 *tvb_get_string(tvbuff_t *tvb, const gint offset, const gint length); -WS_DLL_PUBLIC gchar *tvb_get_unicode_string(tvbuff_t *tvb, const gint offset, gint length, const guint encoding); +WS_DLL_PUBLIC guint8 *tvb_get_g_string(tvbuff_t *tvb, const gint offset, const gint length); +WS_DLL_PUBLIC gchar *tvb_get_g_unicode_string(tvbuff_t *tvb, const gint offset, gint length, const guint encoding); WS_DLL_PUBLIC guint8 *tvb_get_ephemeral_string(tvbuff_t *tvb, const gint offset, const gint length); WS_DLL_PUBLIC guint8 *tvb_get_ephemeral_string_enc(tvbuff_t *tvb, const gint offset, const gint length, const guint encoding); @@ -529,8 +529,8 @@ extern guint8 *tvb_get_seasonal_string(tvbuff_t *tvb, const gint offset, const g * instead it will automatically be freed when a new capture * or file is opened. */ -WS_DLL_PUBLIC guint8 *tvb_get_stringz(tvbuff_t *tvb, const gint offset, gint *lengthp); -WS_DLL_PUBLIC guint8 *tvb_get_stringz_enc(tvbuff_t *tvb, const gint offset, gint *lengthp, const guint encoding); +WS_DLL_PUBLIC guint8 *tvb_get_g_stringz(tvbuff_t *tvb, const gint offset, gint *lengthp); +WS_DLL_PUBLIC guint8 *tvb_get_g_stringz_enc(tvbuff_t *tvb, const gint offset, gint *lengthp, const guint encoding); WS_DLL_PUBLIC const guint8 *tvb_get_const_stringz(tvbuff_t *tvb, const gint offset, gint *lengthp); WS_DLL_PUBLIC guint8 *tvb_get_ephemeral_stringz(tvbuff_t *tvb, const gint offset, gint *lengthp); WS_DLL_PUBLIC guint8 *tvb_get_ephemeral_stringz_enc(tvbuff_t *tvb, const gint offset, gint *lengthp, const guint encoding); diff --git a/epan/tvbuff_composite.c b/epan/tvbuff_composite.c index 62ca4fdefe..05032ddf80 100644 --- a/epan/tvbuff_composite.c +++ b/epan/tvbuff_composite.c @@ -116,7 +116,7 @@ composite_get_ptr(tvbuff_t *tvb, guint abs_offset, guint abs_length) return tvb_get_ptr(member_tvb, member_offset, abs_length); } else { - tvb->real_data = (guint8 *)tvb_memdup(tvb, 0, -1); + tvb->real_data = (guint8 *)tvb_g_memdup(tvb, 0, -1); return tvb->real_data + abs_offset; } diff --git a/epan/wslua/wslua_field.c b/epan/wslua/wslua_field.c index 08cf577828..8fa5f0cc3b 100644 --- a/epan/wslua/wslua_field.c +++ b/epan/wslua/wslua_field.c @@ -100,7 +100,7 @@ WSLUA_METAMETHOD FieldInfo__call(lua_State* L) { Address eth = (Address)g_malloc(sizeof(address)); eth->type = AT_ETHER; eth->len = fi->length; - eth->data = tvb_memdup(fi->ds_tvb,fi->start,fi->length); + eth->data = tvb_g_memdup(fi->ds_tvb,fi->start,fi->length); pushAddress(L,eth); return 1; } @@ -108,7 +108,7 @@ WSLUA_METAMETHOD FieldInfo__call(lua_State* L) { Address ipv4 = (Address)g_malloc(sizeof(address)); ipv4->type = AT_IPv4; ipv4->len = fi->length; - ipv4->data = tvb_memdup(fi->ds_tvb,fi->start,fi->length); + ipv4->data = tvb_g_memdup(fi->ds_tvb,fi->start,fi->length); pushAddress(L,ipv4); return 1; } @@ -116,7 +116,7 @@ WSLUA_METAMETHOD FieldInfo__call(lua_State* L) { Address ipv6 = (Address)g_malloc(sizeof(address)); ipv6->type = AT_IPv6; ipv6->len = fi->length; - ipv6->data = tvb_memdup(fi->ds_tvb,fi->start,fi->length); + ipv6->data = tvb_g_memdup(fi->ds_tvb,fi->start,fi->length); pushAddress(L,ipv6); return 1; } @@ -124,7 +124,7 @@ WSLUA_METAMETHOD FieldInfo__call(lua_State* L) { Address ipx = (Address)g_malloc(sizeof(address)); ipx->type = AT_IPX; ipx->len = fi->length; - ipx->data = tvb_memdup(fi->ds_tvb,fi->start,fi->length); + ipx->data = tvb_g_memdup(fi->ds_tvb,fi->start,fi->length); pushAddress(L,ipx); return 1; } diff --git a/epan/wslua/wslua_tvb.c b/epan/wslua/wslua_tvb.c index d25d49d220..1d4b94c30e 100644 --- a/epan/wslua/wslua_tvb.c +++ b/epan/wslua/wslua_tvb.c @@ -1024,7 +1024,7 @@ WSLUA_METHOD TvbRange_ether(lua_State* L) { addr = g_new(address,1); - buff = (guint8 *)tvb_memdup(tvbr->tvb->ws_tvb,tvbr->offset,tvbr->len); + buff = (guint8 *)tvb_g_memdup(tvbr->tvb->ws_tvb,tvbr->offset,tvbr->len); SET_ADDRESS(addr, AT_ETHER, 6, buff); pushAddress(L,addr); -- cgit v1.2.3