Text   |  XML   |  ReML   |   Visible Warnings:

Ignored Return Value  at packet-ayiya.c:102

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

dissect_ayiya

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-ayiya.c)expand/collapse
Show more  
 94  dissect_ayiya(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 95  {
 96          proto_tree *ayiya_tree;
 97          int offset = 0;
 98          int idlen, siglen, ayiya_len;
 99          guint8 next_header, opcode;
 100          tvbuff_t *payload;
 101   
 102          idlen = 1 << tvb_get_bits8(tvb, 0, 4);
 103          siglen = tvb_get_bits8(tvb, 8, 4) * 4;
 104          opcode = tvb_get_bits8(tvb, 20, 4);
 105          next_header = tvb_get_guint8(tvb, 3);
 106   
 107          ayiya_len = 8+idlen+siglen;
 108   
 109          if (check_col(pinfo->cinfo, COL_PROTOCOL))
 110                  col_set_str(pinfo->cinfo, COL_PROTOCOL, "AYIYA");
 111   
 112          if (tree) {
 113                  proto_item *ti;
 114                  nstime_t tv;
 115                  ti = proto_tree_add_protocol_format( tree, proto_ayiya, tvb,
 116                                                                                           offset, ayiya_len, "AYIYA" );
 117                  ayiya_tree = proto_item_add_subtree(ti, ett_ayiya);
 118   
 119                  proto_tree_add_bits_item(ayiya_tree, hf_id_len, tvb, 0, 4, FALSE);
 120                  proto_tree_add_bits_item(ayiya_tree, hf_id_type, tvb, 4, 4, FALSE);
 121                  proto_tree_add_bits_item(ayiya_tree, hf_sig_len, tvb, 8, 4, FALSE);
 122                  proto_tree_add_bits_item(ayiya_tree, hf_hash_method, tvb, 12, 4, FALSE);
 123                  proto_tree_add_bits_item(ayiya_tree, hf_auth_method, tvb, 16, 4, FALSE);
 124                  proto_tree_add_bits_item(ayiya_tree, hf_opcode, tvb, 20, 4, FALSE);
 125                  proto_tree_add_uint_format(ayiya_tree, hf_next_header, tvb,
 126                                                                     3, 1, next_header,  
 127                                                                     "Next header: %s (0x%02x)",  
 128                                                                     ipprotostr(next_header), next_header);
 129                  tv.secs = tvb_get_ntohl(tvb, 4);
 130                  tv.nsecs = 0;
 131                  proto_tree_add_time(ayiya_tree, hf_epoch, tvb, 4, 4, &tv);
 132                  proto_tree_add_item(ayiya_tree, hf_identity, tvb, 8, idlen, FALSE);
 133                  proto_tree_add_item(ayiya_tree, hf_signature, tvb, 8+idlen, siglen, FALSE);
 134          }
 135          offset = ayiya_len;
 136          switch (opcode) {
 137          case OPCODE_FORWARD:
 138                  payload = tvb_new_subset(tvb, offset, -1, -1);
 139                  dissector_try_port(ip_dissector_table, next_header, payload, pinfo, tree);
 140                  break;
 141          }
 142  }
Show more  




Change Warning 5467.35687 : Ignored Return Value

Because they are very similar, this warning shares annotations with warning 5467.35688.

Priority:
State:
Finding:
Owner:
Note: