ieee802_15_4_crc32(const u_char *p,
uint16_t data_len)
{
- uint32_t crc, mask, byte;
- u_char x, y;
+ uint32_t crc, byte;
+ u_char x;
int b;
crc = 0x00000000; /* Note, initial value is 0x00000000 not 0xffffffff */
*
* Returns number of byts consumed from the packet or -1 in case of error.
*/
-static int
+static int16_t
ieee802_15_4_print_pending_addresses(netdissect_options *ndo,
const u_char *p,
uint16_t data_len)
if (ie_len < 2) {
ND_PRINT("[ERROR: Truncated DSME PAN IE]");
} else {
- uint16_t ss, ptr;
- int len, hopping_present;
+ uint16_t ss, ptr, len;
+ int hopping_present;
hopping_present = 0;
uint16_t caplen,
int *payload_ie_present)
{
- int len, ie, ie_len, element_id, i;
+ int len, ie, element_id, i;
+ uint16_t ie_len;
*payload_ie_present = 0;
len = 0;
const u_char *p,
uint16_t ie_len)
{
- int ie, sub_ie_len, sub_id, i, type;
+ int ie, sub_id, i, type;
+ uint16_t sub_ie_len;
do {
if (ie_len < 2) {
int fragment_number, data_start;
int i;
+ data_start = 0;
if (ie_len < 1) {
ND_PRINT("[ERROR: Transaction control byte missing]");
return;
const u_char *p,
uint16_t caplen)
{
- int len, ie, ie_len, group_id, i;
+ int len, ie, group_id, i;
+ uint16_t ie_len;
len = 0;
do {
const u_char *mic_start = NULL;
payload_ie_present = 0;
-
+
+ crc_check = 0;
/* Assume 2 octet FCS, the FCS length depends on the PHY, and we do not
know about that. */
if (caplen < 4) {
ie_present = 0;
payload_ie_present = 0;
security_enabled = 0;
+ crc_check = 0;
/* Assume 2 octet FCS, the FCS length depends on the PHY, and we do not
know about that. */