| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
crc.h
1/* crc.h
2 * header file of crc.c
3 *
4 * Copyright (c) 2007 by Intel Corporation.
5 *
6 * Author: Mike Harvey <michael.harvey@intel.com>
7 *
8 * Wireshark - Network traffic analyzer
9 * By Gerald Combs <gerald@wireshark.org>
10 * Copyright 1999 Gerald Combs
11 *
12 * SPDX-License-Identifier: GPL-2.0-or-later
13 */
14
15#ifndef CRC_H
16#define CRC_H
17
18#include <glib.h>
19#include <stdint.h>
20
21/* use lookup tables to compute CRC values */
22#ifdef STATIC_DATA
23extern uint8_t crc8_table[];
24extern uint32_t crc32_table[];
25#else
26void wimax_mac_gen_crc32_table(void);
27void wimax_mac_gen_crc8_table(void);
28#endif
29
30uint32_t wimax_mac_calc_crc32(const uint8_t *data, unsigned data_len);
31uint16_t wimax_mac_calc_crc16(const uint8_t *data, unsigned data_len);
32uint8_t wimax_mac_calc_crc8(const uint8_t *data, unsigned data_len);
33
34#endif /* CRC_H */