public void ParseSingle(ref ListViewItem LItem) { PACKET_ITEM PItem; if (PacketCollection == null) { return; } if (PacketCollection.Count == 0) { return; } PItem = ( PACKET_ITEM )PacketCollection[Function.FindListIndex(LItem)]; Rtx.Text = ""; Rtx.AppendText(Function.GetHexString(PItem.Data)); WriteFRAMENode(ref mNode, PItem, ref LItem); PacketETHERNET.Parser(ref mNode, PItem.Data, ref LItem, ref PreviousHttpSequence, ref LastTftpPort); Function.ArrangeText(ref mNode, ":"); }
public bool WriteFRAMENode(ref TreeNodeCollection mNode, PACKET_ITEM PItem, ref ListViewItem LItem) { TreeNode mNodex; string Tmp = ""; mNode.Clear(); mNodex = new TreeNode(); try { Tmp = " Seconds : " + PItem.Seconds.ToString(); mNodex.Nodes.Add(Tmp); Tmp = " Microseconds : " + PItem.MicroSeconds.ToString(); mNodex.Nodes.Add(Tmp); Tmp = " Captured Length : " + PItem.CaptureLength.ToString(); mNodex.Nodes.Add(Tmp); Tmp = " Packet Length : " + PItem.PacketLength.ToString(); mNodex.Nodes.Add(Tmp); Tmp = "FRAME ( Captured : " + PItem.CaptureLength.ToString() + " , Original : " + PItem.PacketLength.ToString() + " )"; mNodex.Text = Tmp; mNodex.Tag = "0," + PItem.CaptureLength.ToString(); mNode.Add(mNodex); } catch { mNode.Add(mNodex); Tmp = "[ Malformed FRAME packet. Remaining bytes don't fit an FRAME packet. Possibly due to bad decoding ]"; mNode.Add(Tmp); LItem.SubItems[Const.LIST_VIEW_INFO_INDEX].Text = "[ Malformed FRAME packet. Remaining bytes don't fit an FRAME packet. Possibly due to bad decoding ]"; return(false); } return(true); }
public bool WriteFRAMENode( ref TreeNodeCollection mNode , PACKET_ITEM PItem , ref ListViewItem LItem ) { TreeNode mNodex; string Tmp = ""; mNode.Clear(); mNodex = new TreeNode(); try { Tmp = " Seconds : " + PItem.Seconds.ToString(); mNodex.Nodes.Add( Tmp ); Tmp = " Microseconds : " + PItem.MicroSeconds.ToString(); mNodex.Nodes.Add( Tmp ); Tmp = " Captured Length : " + PItem.CaptureLength.ToString(); mNodex.Nodes.Add( Tmp ); Tmp = " Packet Length : " + PItem.PacketLength.ToString(); mNodex.Nodes.Add( Tmp ); Tmp = "FRAME ( Captured : " + PItem.CaptureLength.ToString() + " , Original : " + PItem.PacketLength.ToString() + " )"; mNodex.Text = Tmp; mNodex.Tag = "0," + PItem.CaptureLength.ToString(); mNode.Add( mNodex ); } catch { mNode.Add( mNodex ); Tmp = "[ Malformed FRAME packet. Remaining bytes don't fit an FRAME packet. Possibly due to bad decoding ]"; mNode.Add( Tmp ); LItem.SubItems[ Const.LIST_VIEW_INFO_INDEX ].Text = "[ Malformed FRAME packet. Remaining bytes don't fit an FRAME packet. Possibly due to bad decoding ]"; return false; } return true; }
public void ParseSingle( ref ListViewItem LItem ) { PACKET_ITEM PItem; if( PacketCollection == null ) return; if( PacketCollection.Count == 0 ) return; PItem = ( PACKET_ITEM ) PacketCollection[ Function.FindListIndex( LItem ) ]; Rtx.Text = ""; Rtx.AppendText( Function.GetHexString( PItem.Data ) ); WriteFRAMENode( ref mNode , PItem , ref LItem ); PacketETHERNET.Parser( ref mNode , PItem.Data , ref LItem , ref PreviousHttpSequence , ref LastTftpPort ); Function.ArrangeText( ref mNode , ":" ); }