Go to the source code of this file.
|
| unsigned short | t10crc16 (const unsigned char *blk_adr, unsigned long blk_len, unsigned short crc) |
| | Calculate the T10 PI CRC guard value for a block. More...
|
| |
| unsigned short t10crc16 |
( |
const unsigned char * |
blk_adr, |
|
|
unsigned long |
blk_len, |
|
|
unsigned short |
crc |
|
) |
| |
Calculate the T10 PI CRC guard value for a block.
Code based on Rocksoft's public domain CRC code, refer to http://www.ross.net/crc/download/crc_v3.txt. Minimally altered to work with the ocs_dif API.
- Parameters
-
| blk_adr | Pointer to the data buffer. |
| blk_len | Number of bytes. |
| crc | Previously-calculated CRC, or crcseed for a new block. |
- Returns
- Returns the calculated CRC, which may be passed back in for partial blocks.
Definition at line 120 of file t10crc16.c.
| unsigned short crctable[256] |
|
static |