llc: gprs_llc_fcs(): make the input data pointer const

Change-Id: If95210fe69f915ab1010fe5916cb6bee3faeb7b9
changes/80/29280/2
Vadim Yanitskiy 3 months ago committed by fixeria
parent d32852664d
commit 13ccbc1e61
  1. 2
      include/osmocom/sgsn/crc24.h
  2. 2
      include/osmocom/sgsn/gprs_llc.h
  3. 2
      src/gprs/crc24.c
  4. 2
      src/gprs/gprs_llc_parse.c

@ -5,6 +5,6 @@
#define INIT_CRC24 0xffffff
uint32_t crc24_calc(uint32_t fcs, uint8_t *cp, unsigned int len);
uint32_t crc24_calc(uint32_t fcs, const uint8_t *cp, unsigned int len);
#endif

@ -277,7 +277,7 @@ void gprs_llme_copy_key(struct sgsn_mm_ctx *mm, struct gprs_llc_llme *llme);
int gprs_llc_hdr_parse(struct gprs_llc_hdr_parsed *ghp,
uint8_t *llc_hdr, int len);
void gprs_llc_hdr_dump(struct gprs_llc_hdr_parsed *gph, struct gprs_llc_lle *lle);
int gprs_llc_fcs(uint8_t *data, unsigned int len);
int gprs_llc_fcs(const uint8_t *data, unsigned int len);
/* LLME handling routines */

@ -59,7 +59,7 @@ static const uint32_t tbl_crc24[256] = {
#define INIT_CRC24 0xffffff
uint32_t crc24_calc(uint32_t fcs, uint8_t *cp, unsigned int len)
uint32_t crc24_calc(uint32_t fcs, const uint8_t *cp, unsigned int len)
{
while (len--)
fcs = (fcs >> 8) ^ tbl_crc24[(fcs ^ *cp++) & 0xff];

@ -55,7 +55,7 @@ static const struct value_string llc_cmd_strs[] = {
#define N202 4
#define CRC24_LENGTH 3
int gprs_llc_fcs(uint8_t *data, unsigned int len)
int gprs_llc_fcs(const uint8_t *data, unsigned int len)
{
uint32_t fcs_calc;

Loading…
Cancel
Save