Wireshark  4.3.0
The Wireshark network protocol analyzer
golay.h
Go to the documentation of this file.
1 
18 #ifndef __GOLAY_H__
19 #define __GOLAY_H__
20 
21 #include "ws_symbol_export.h"
22 
23 /* encodes a 12-bit word to a 24-bit codeword
24  */
25 WS_DLL_PUBLIC
26 guint32 golay_encode(guint w);
27 
28 /* return a mask showing the bits which are in error in a received
29  * 24-bit codeword, or -1 if 4 errors were detected.
30  */
31 WS_DLL_PUBLIC
32 gint32 golay_errors(guint32 codeword);
33 
34 /* decode a received codeword. Up to 3 errors are corrected for; 4
35  errors are detected as uncorrectable (return -1); 5 or more errors
36  cause an incorrect correction.
37 */
38 WS_DLL_PUBLIC
39 gint golay_decode(guint32 w);
40 
41 #endif
42 
43 /*
44  * Editor modelines
45  *
46  * Local Variables:
47  * c-basic-offset: 4
48  * tab-width: 8
49  * indent-tabs-mode: nil
50  * End:
51  *
52  * ex: set shiftwidth=4 tabstop=8 expandtab:
53  * :indentSize=4:tabSize=8:noTabs=true:
54  */