HACK: pinfo->private_data points to smb_info again
[wireshark-wip.git] / epan / dissectors / packet-gsm_sms.h
blob6836ac76f7d11b084f70636df60745c493d38457
1 /* packet-gsm_sms.h
3 * $Id$
5 * Copyright 2004, Michael Lum <mlum [AT] telostech.com>,
6 * In association with Telos Technology Inc.
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1998 Gerald Combs
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 /* Convert a 7-bit GSM SMS packed string into an unpacked string.
29 * @param offset Bit offset of the start of the string.
30 * @param in_length Length of the packed string in bytes.
31 * @param out_length Length of the output string in bytes.
32 * @param input The string to unpack
33 * @param output The buffer for the output string. This buffer must
34 * be pre-allocated and be at least out_length characters
35 * long, or out_length + 1 if you're planning on adding a
36 * terminating '\0'.
37 * @return The number of unpacked characters.
40 extern int gsm_sms_char_7bit_unpack(unsigned int offset, unsigned int in_length, unsigned int out_length,
41 const guint8 *input, unsigned char *output);
43 /* Convert an unpacked SMS string to UTF-8.
45 * @param src The string to convert.
46 * @param len Length of the string to convert, in bytes.
47 * @return An ep_allocated UTF-8 string.
50 extern gchar *gsm_sms_chars_to_utf8(const unsigned char* src, int len);
52 void dis_field_udh(tvbuff_t *tvb, proto_tree *tree, guint32 *offset, guint32 *length,
53 guint8 *udl, gboolean uncomp_7bits, guint8 *fill_bits);