Use g_get_charset instead of g_get_codeset.
[metze/wireshark/wip.git] / epan / crc10-tvb.c
1 /* crc10-tvb.c
2  * CRC-10 tvb routines
3  *
4  * Wireshark - Network traffic analyzer
5  * By Gerald Combs <gerald@wireshark.org>
6  * Copyright 1998 Gerald Combs
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  */
22
23 #include "config.h"
24
25 #include <glib.h>
26 #include <epan/tvbuff.h>
27 #include <wsutil/crc10.h>
28 #include <epan/crc10-tvb.h>
29
30 /* update the data block's CRC-10 remainder one byte at a time */
31 guint16
32 update_crc10_by_bytes_tvb(guint16 crc10, tvbuff_t *tvb, int offset, int len)
33 {
34     const guint8 *buf;
35
36     tvb_ensure_bytes_exist(tvb, offset, len);  /* len == -1 not allowed */
37     buf = tvb_get_ptr(tvb, offset, len);
38
39     return update_crc10_by_bytes(crc10, buf, len);
40 }
41
42 /*
43  * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
44  *
45  * Local variables:
46  * c-basic-offset: 4
47  * tab-width: 8
48  * indent-tabs-mode: nil
49  * End:
50  *
51  * vi: set shiftwidth=4 tabstop=8 expandtab:
52  * :indentSize=4:tabSize=8:noTabs=true:
53  */