| 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
23 extern uint8_t crc8_table[];
24 extern uint32_t crc32_table[];
25#else
26
32 void wimax_mac_gen_crc32_table(void);
33
39 void wimax_mac_gen_crc8_table(void);
40#endif
41
49uint32_t wimax_mac_calc_crc32(const uint8_t *data, unsigned data_len);
50
60uint16_t wimax_mac_calc_crc16(const uint8_t *data, unsigned data_len);
61
69uint8_t wimax_mac_calc_crc8(const uint8_t *data, unsigned data_len);
70
71#endif /* CRC_H */