Wireshark  4.3.0
The Wireshark network protocol analyzer
crc7.h
Go to the documentation of this file.
1 
23 #ifndef __CRC7__H__
24 #define __CRC7__H__
25 
26 #include <wireshark.h>
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 
36 #define CRC_ALGO_TABLE_DRIVEN 1
37 
43 static inline uint8_t crc7init(void)
44 {
45  return 0x00 << 1;
46 }
47 
48 
57 WS_DLL_PUBLIC uint8_t crc7update(uint8_t crc, const unsigned char *data, int data_len);
58 
59 
66 static inline uint8_t crc7finalize(uint8_t crc)
67 {
68  return (crc >> 1) ^ 0x00;
69 }
70 
71 
72 #ifdef __cplusplus
73 } /* closing brace for extern "C" */
74 #endif
75 
76 #endif /* __CRC7__H__ */
WS_DLL_PUBLIC uint8_t crc7update(uint8_t crc, const unsigned char *data, int data_len)
Definition: crc7.c:60