to_str.c
tvbparse.c
tvbuff.c
+ tvbuff_base64.c
tvbuff_composite.c
tvbuff_real.c
tvbuff_subset.c
tfs.c \
to_str.c \
tvbparse.c \
+ tvbuff_base64.c \
tvbuff_composite.c \
tvbuff_real.c \
tvbuff_subset.c \
d[i*3/4] = 0;
return i*3/4;
}
-
-/* Return a tvb that contains the binary representation of a base64
- string */
-
-tvbuff_t *
-base64_to_tvb(tvbuff_t *parent, const char *base64)
-{
- tvbuff_t *tvb;
- char *data = g_strdup(base64);
- gint len;
-
- len = (gint) epan_base64_decode(data);
- tvb = tvb_new_child_real_data(parent, (const guint8 *)data, len, len);
-
- tvb_set_free_cb(tvb, g_free);
-
- return tvb;
-}
#ifndef __BASE64_H__
#define __BASE64_H__
-#include <epan/tvbuff.h>
#include "ws_symbol_export.h"
#ifdef __cplusplus
WS_DLL_PUBLIC
size_t epan_base64_decode(char *s);
-extern tvbuff_t* base64_to_tvb(tvbuff_t *parent, const char *base64);
-
#ifdef __cplusplus
}
#endif /* __cplusplus */
#include <epan/strutil.h>
#include <epan/wmem/wmem.h>
#include <epan/expert.h>
-#include <epan/base64.h>
#include <epan/tfs.h>
#include "packet-mtp3.h"
#include <epan/addr_resolv.h>
#include <epan/prefs.h>
#include <epan/uat.h>
-#include <epan/base64.h>
#include <epan/expert.h>
#include <epan/wmem/wmem.h>
#include <epan/packet.h>
#include <epan/prefs.h>
-#include <epan/base64.h>
#include <epan/wmem/wmem.h>
#include "packet-imf.h"
#include <epan/exceptions.h>
#include <epan/strutil.h>
#include <epan/wmem/wmem.h>
-#include <epan/base64.h>
#include <epan/asn1.h>
#include <epan/prefs.h>
#include <epan/expert.h>
WS_DLL_PUBLIC gint tvb_find_tvb(tvbuff_t *haystack_tvb, tvbuff_t *needle_tvb,
const gint haystack_offset);
+/* From tvbuff_zlib.c */
+
/**
* Uncompresses a zlib compressed packet inside a tvbuff at offset with
* length comprlen. Returns an uncompressed tvbuffer if uncompression
extern tvbuff_t *tvb_child_uncompress(tvbuff_t *parent, tvbuff_t *tvb,
const int offset, int comprlen);
+/* From tvbuff_base64.c */
+
+/** Return a tvb that contains the binary representation of a base64
+ * string
+ */
+extern tvbuff_t* base64_to_tvb(tvbuff_t *parent, const char *base64);
+
/************** END OF ACCESSORS ****************/
/** @} */
--- /dev/null
+/* tvbuff_base64.c
+ * Base-64 tvbuff implementation (based on real tvb)
+ *
+ * $Id$
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include "config.h"
+
+#include <glib.h>
+
+#include <epan/tvbuff.h>
+#include <epan/base64.h>
+
+tvbuff_t *
+base64_to_tvb(tvbuff_t *parent, const char *base64)
+{
+ tvbuff_t *tvb;
+ char *data = g_strdup(base64);
+ gint len;
+
+ len = (gint) epan_base64_decode(data);
+ tvb = tvb_new_child_real_data(parent, (const guint8 *)data, len, len);
+
+ tvb_set_free_cb(tvb, g_free);
+
+ return tvb;
+}