/// <summary> /// Parses MNM CaptureProcessor File Header and initialize all basic MNM properties of Sniff File Specification /// </summary> private void ParseTcpdHeader() { this._versionMaj = this.GetTcpdHdrVersionMaj(); this._versionMin = this.GetTcpdHdrVersionMin(); this._tcpdTimeZoneOffset = this.GetTcpdHdrTimezoneOffset(); this._sigfigs = this.GetTcpdHdrSigfigs(); this._snaplen = this.GetTcpdHdrSnapLength(); this._pcapLinkType = this.GetTcpdHdrNetwork(); //PrintTCPDGlobalHeader(sfs); }
/// <summary> /// Converts LibPcap L2 type to appropriate common suppored link type /// </summary> /// <param name="linkaType">Input enumartion LibPcap LinkType</param> /// <returns>Returns output enumarion common link type</returns> private static PmLinkType ConvertPcapLayer2ToCommonLayer2(TcpdLinkType linkaType) { switch (linkaType) { case TcpdLinkType.Ethernet: return(PmLinkType.Ethernet); case TcpdLinkType.Fddi: return(PmLinkType.Fddi); case TcpdLinkType.Raw: return(PmLinkType.Raw); case TcpdLinkType.Ieee80211: return(PmLinkType.Ieee80211); case TcpdLinkType.AtmRfc1483: return(PmLinkType.AtmRfc1483); default: return(PmLinkType.Null); } }