more decompress
[wireshark-sm.git] / epan / crc6-tvb.c
blob4496f82e66d1c2970925c46b30bd4fc3edaa34cc
1 /* crc6-tvb.c
2 * CRC-6 tvb routines
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
11 #include "config.h"
13 #include <glib.h>
14 #include <epan/tvbuff.h>
15 #include <wsutil/crc6.h>
16 #include <epan/crc6-tvb.h>
18 uint16_t
19 crc6_compute_tvb(tvbuff_t *tvb, int len)
21 const uint8_t *buf;
23 tvb_ensure_bytes_exist(tvb, 0, len); /* len == -1 not allowed */
24 buf = tvb_get_ptr(tvb, 0, len);
26 return crc6_0X6F(0, buf, len);
30 * Editor modelines - https://www.wireshark.org/tools/modelines.html
32 * Local variables:
33 * c-basic-offset: 4
34 * tab-width: 8
35 * indent-tabs-mode: nil
36 * End:
38 * vi: set shiftwidth=4 tabstop=8 expandtab:
39 * :indentSize=4:tabSize=8:noTabs=true: