|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
Go to the source code of this file.
Typedefs | |
| typedef unsigned char | dtype |
Functions | |
| int | encode_rs (dtype data[], dtype bb[]) |
| Encodes data using Reed-Solomon error correction. | |
| int | eras_dec_rs (dtype data[], int eras_pos[], int no_eras) |
| Performs ERRORS+ERASURES decoding of Reed-Solomon codes. | |
Global definitions for Reed-Solomon encoder/decoder, by Phil Karn (karn@.nosp@m.ka9q.nosp@m..ampr.nosp@m..org) September 1996 Copyright 1999 Phil Karn, KA9Q
Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs
SPDX-License-Identifier: GPL-2.0-or-later
| int encode_rs | ( | dtype | data[], |
| dtype | bb[] | ||
| ) |
Encodes data using Reed-Solomon error correction.
Reed-Solomon encoding data[] is the input block, parity symbols are placed in bb[] bb[] may lie past the end of the data, e.g., for (255,223): encode_rs(&data[0],&data[223]);
| data | Input data array to be encoded. |
| bb | Output buffer for the encoded data. |
| int eras_dec_rs | ( | dtype | data[], |
| int | eras_pos[], | ||
| int | no_eras | ||
| ) |
Performs ERRORS+ERASURES decoding of Reed-Solomon codes.
Reed-Solomon erasures-and-errors decoding The received block goes into data[], and a list of zero-origin erasure positions, if any, goes in eras_pos[] with a count in no_eras.
The decoder corrects the symbols in place, if possible and returns the number of corrected symbols. If the codeword is illegal or uncorrectable, the data array is unchanged and -1 is returned
| data | Pointer to the input and output data array. |
| eras_pos | Array containing the positions of known erased symbols. |
| no_eras | Number of known erased symbols. |