forked from osmocom/wireshark
Constify wimax_mac_calc_crc32()
svn path=/trunk/; revision=30309
This commit is contained in:
parent
c33111a841
commit
70d977764c
|
@ -126,7 +126,7 @@ void wimax_mac_gen_crc8_table(void)
|
|||
SIDE EFFECTS:
|
||||
|
||||
*/
|
||||
guint32 wimax_mac_calc_crc32(guint8 *data, guint data_len)
|
||||
guint32 wimax_mac_calc_crc32(const guint8 *data, guint data_len)
|
||||
{
|
||||
guint32 crc=CRC32_INITIAL_VALUE;
|
||||
guint i, j;
|
||||
|
|
|
@ -40,7 +40,7 @@ void wimax_mac_gen_crc32_table(void);
|
|||
void wimax_mac_gen_crc8_table(void);
|
||||
#endif
|
||||
|
||||
guint32 wimax_mac_calc_crc32 (guint8 *data, guint data_len);
|
||||
guint32 wimax_mac_calc_crc32(const guint8 *data, guint data_len);
|
||||
guint16 wimax_mac_calc_crc16(guint8 *data, guint data_len);
|
||||
guint8 wimax_mac_calc_crc8 (guint8 *data, guint data_len);
|
||||
|
||||
|
|
|
@ -1252,7 +1252,7 @@ check_crc:
|
|||
{ /* get the CRC */
|
||||
mac_crc = tvb_get_ntohl(tvb, mac_len - sizeof(mac_crc));
|
||||
/* calculate the CRC */
|
||||
calculated_crc = wimax_mac_calc_crc32((guint8 *)tvb_get_ptr(tvb, 0, mac_len - sizeof(mac_crc)), mac_len - sizeof(mac_crc));
|
||||
calculated_crc = wimax_mac_calc_crc32(tvb_get_ptr(tvb, 0, mac_len - sizeof(mac_crc)), mac_len - sizeof(mac_crc));
|
||||
/* display the CRC */
|
||||
generic_item = proto_tree_add_item(tree, hf_mac_header_generic_crc, tvb, mac_len - sizeof(mac_crc), sizeof(mac_crc), FALSE);
|
||||
if (mac_crc != calculated_crc)
|
||||
|
|
|
@ -2168,7 +2168,7 @@ gint wimax_decode_dlmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tre
|
|||
{ /* get the CRC */
|
||||
mac_crc = tvb_get_ntohl(tvb, mac_len - sizeof(mac_crc));
|
||||
/* calculate the CRC */
|
||||
calculated_crc = wimax_mac_calc_crc32((guint8 *)tvb_get_ptr(tvb, 0, mac_len - sizeof(mac_crc)), mac_len - sizeof(mac_crc));
|
||||
calculated_crc = wimax_mac_calc_crc32(tvb_get_ptr(tvb, 0, mac_len - sizeof(mac_crc)), mac_len - sizeof(mac_crc));
|
||||
/* display the CRC */
|
||||
generic_item = proto_tree_add_item(base_tree, hf_mac_header_compress_dlmap_crc, tvb, mac_len - sizeof(mac_crc), sizeof(mac_crc), FALSE);
|
||||
if (mac_crc != calculated_crc)
|
||||
|
|
|
@ -167,7 +167,7 @@ void dissector_wimax_harq_map_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t
|
|||
/* get the CRC */
|
||||
harq_map_msg_crc = tvb_get_ntohl(tvb, length - sizeof(harq_map_msg_crc));
|
||||
/* calculate the HARQ MAM Message CRC */
|
||||
calculated_crc = wimax_mac_calc_crc32((guint8 *)tvb_get_ptr(tvb, 0, length - sizeof(harq_map_msg_crc)), length - sizeof(harq_map_msg_crc));
|
||||
calculated_crc = wimax_mac_calc_crc32(tvb_get_ptr(tvb, 0, length - sizeof(harq_map_msg_crc)), length - sizeof(harq_map_msg_crc));
|
||||
/* display the CRC */
|
||||
it = proto_tree_add_item(harq_map_tree, hf_harq_map_msg_crc, tvb, length - sizeof(harq_map_msg_crc), sizeof(harq_map_msg_crc), FALSE);
|
||||
/* verify the CRC */
|
||||
|
|
Loading…
Reference in New Issue