Text   |  XML   |  ReML   |   Visible Warnings:

Ignored Return Value  at packet-tzsp.c:316

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

dissect_tzsp

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-tzsp.c)expand/collapse
Show more  
 280  dissect_tzsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 281  {
 282          proto_tree *tzsp_tree = NULL;
 283          proto_item *ti = NULL;
 284          int pos = 0;
 285          tvbuff_t *next_tvb;
 286          guint16 encapsulation = 0;
 287          int wtap_encap;
 288          dissector_handle_t encap_dissector;
 289          const char *encap_name;
 290          const char *info;
 291          guint8 type;
 292   
 293          if (check_col(pinfo->cinfo, COL_PROTOCOL))
 294                  col_set_str(pinfo->cinfo, COL_PROTOCOL, "TZSP");
 295          if (check_col(pinfo->cinfo, COL_INFO))
 296                  col_clear(pinfo->cinfo, COL_INFO);
 297   
 298          type = tvb_get_guint8(tvb, 1);
 299   
 300          /* Find the dissector. */
 301          encapsulation = tvb_get_ntohs(tvb, 2);
 302          if (encapsulation != 0) {
 303                  wtap_encap = tzsp_encap_to_wtap_encap(encapsulation);
 304                  if (wtap_encap != -1 &&
 305                      (encap_dissector = dissector_get_port_handle(encap_dissector_table, wtap_encap))) {
 306                          encap_name = dissector_handle_get_short_name(encap_dissector);
 307                  }
 308                  else {
 309                          encap_name = "Unknown";
 310                  }
 311                  info = encap_name;
 312          }
 313          else {
 314                  wtap_encap = -1;
 315                  encap_name = "Nothing";
 316                  info = val_to_str(type, tzsp_type, "Unknown (%u)");
 317          }
 318   
 319          if (check_col(pinfo->cinfo, COL_INFO))
 320                  col_set_str(pinfo->cinfo, COL_INFO, info);
 321   
 322          if (tree) {
 323                  /* Adding TZSP item and subtree */
 324                  ti = proto_tree_add_protocol_format(tree, proto_tzsp, tvb, 0,
 325                      -1, "TZSP: %s: ", info);
 326                  tzsp_tree = proto_item_add_subtree(ti, ett_tzsp);
 327   
 328                  proto_tree_add_item (tzsp_tree, hf_tzsp_version, tvb, 0, 1,
 329                                          FALSE);
 330                  proto_tree_add_uint (tzsp_tree, hf_tzsp_type, tvb, 1, 1,
 331                                          type);
 332                  proto_tree_add_uint_format (tzsp_tree, hf_tzsp_encap, tvb, 2, 2,
 333                                          encapsulation, "Encapsulates: %s (%d)",
 334                                          encap_name, encapsulation);
 335          }
 336   
 337          if (type != 4 && type != 5) {
 338                  pos = add_option_info(tvb, 4, tzsp_tree, ti);
 339   
 340                  if (tree)
 341                          proto_item_set_end(ti, tvb, pos);
 342                  next_tvb = tvb_new_subset(tvb, pos, -1, -1);
 343                  if (encapsulation != 0 
 344                      && (wtap_encap == -1
 345                          || !dissector_try_port(encap_dissector_table, wtap_encap,
 346                                  next_tvb, pinfo, tree))) {
 347   
 348                          if (check_col(pinfo->cinfo, COL_PROTOCOL))
 349                                  col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNKNOWN");
 350                          if (check_col(pinfo->cinfo, COL_INFO))
 351                                  col_add_fstr(pinfo->cinfo, COL_INFO, "TZSP_ENCAP = %u",
 352                                      encapsulation);
 353                          call_dissector(data_handle, next_tvb, pinfo, tree);
 354                  }
 355          }
 356  }
Show more  




Change Warning 5475.35746 : Ignored Return Value

Priority:
State:
Finding:
Owner:
Note: