Text   |  XML   |  ReML   |   Visible Warnings:

Ignored Return Value  at packet-cmpp.c:571

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

dissect_cmpp_tcp_pdu

(/home/sate/Testcases/c/cve/wireshark-1.2.0/epan/dissectors/packet-cmpp.c)expand/collapse
Show more  
 544  dissect_cmpp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 545  {
 546   
 547  /* Set up structures needed to add the protocol subtree and manage it */
 548          proto_item *ti;
 549          proto_tree *cmpp_tree;
 550          guint command_id;
 551          guint tvb_len;
 552          guint total_length;
 553          const gchar *command_str; /* Header command string */
 554   
 555          /* Get the length of the PDU */
 556          tvb_len = tvb_length(tvb);
 557          /* if the length of the tvb is shorder then the cmpp header length exit */
 558          if (tvb_len < CMPP_FIX_HEADER_LENGTH)
 559                  return;
 560   
 561          total_length = tvb_get_ntohl(tvb, 0); /* Get the pdu length */
 562          command_id = tvb_get_ntohl(tvb, 4); /* get the pdu command id */
 563   
 564          if (match_strval(command_id, vals_command_Id) == NULL)
 565          {
 566                  /* Should never happen: we checked this in dissect_cmpp() */
 567                  return;
 568          }
 569   
 570          command_str = val_to_str(command_id, vals_command_Id,
 571                                   "(Unknown CMPP Operation 0x%08X)");
 572   
 573          /* tvb has less data then the PDU Header status, return */
 574          if (tvb_len < total_length)
 575          {
 576                  /* Should never happen: TCP should have desegmented for us */
 577                  return;
 578          }
 579   
 580          /* Make entries in Protocol column and Info column on summary display */
 581          if (check_col(pinfo->cinfo, COL_PROTOCOL))
 582                  col_set_str(pinfo->cinfo, COL_PROTOCOL, "CMPP");
 583   
 584          if (check_col(pinfo->cinfo, COL_INFO))
 585          {
 586                  col_append_fstr(pinfo->cinfo, COL_INFO, "%s. ", command_str);
 587          }
 588   
 589          if (tree)
 590          {
 591                  ti = proto_tree_add_item(tree, proto_cmpp, tvb, 0, -1, FALSE);
 592   
 593                  cmpp_tree = proto_item_add_subtree(ti, ett_cmpp);
 594   
 595                  /* Add the fix header informations to the tree */
 596                  cmpp_uint4(cmpp_tree, tvb, hf_cmpp_Total_Length, 0);
 597                  cmpp_uint4(cmpp_tree, tvb, hf_cmpp_Command_Id, 4);
 598                  cmpp_uint4(cmpp_tree, tvb, hf_cmpp_Sequence_Id, 8);
 599   
 600                  switch(command_id)
 601                  {
 602                          case CMPP_CONNECT:
 603                                  cmpp_connect(cmpp_tree, tvb);
 604                                  break;
 605                          case CMPP_CONNECT_RESP:
 606                                  cmpp_connect_resp(cmpp_tree, tvb);
 607                                  break;
 608                          /* CMPP_TERMINATE and CMPP_TERMINATE_RESP don't have msg body */
 609                          case CMPP_TERMINATE:
 610                          case CMPP_TERMINATE_RESP:
 611                                  break;
 612                          case CMPP_SUBMIT:
 613                                  cmpp_submit(cmpp_tree, tvb);
 614                                  break;
 615                          case CMPP_SUBMIT_RESP:
 616                                  cmpp_submit_resp(cmpp_tree, tvb);
 617                                  break;
 618                          case CMPP_DELIVER:
 619                                  cmpp_deliver(cmpp_tree, tvb);
 620                                  break;
 621                          case CMPP_DELIVER_RESP:
 622                                  cmpp_deliver_resp(cmpp_tree, tvb);
 623                                  break;
 624                          default:
 625                                  /* Implement the rest of the protocol here */
 626                                  break;
 627                  }
 628          }
 629  }
Show more  




Change Warning 12541.35725 : Ignored Return Value

Priority:
State:
Finding:
Owner:
Note: