internal void PrintInterfacesList()
        {
            PmConsolePrinter.PrintDebug("PCAP-NG INTERFACES FOR FILE " + this.PmCapture.FileInfo.FullName);

            var sectionId = 0;

            foreach (var section in this._ifaces)
            {
                PmConsolePrinter.PrintDebug("SECTION #" + sectionId);
                foreach (var iface in section)
                {
                    "ID> {0}".PrintInfoEol(iface.Id);
                    "SNAPLEN> {0}".PrintInfoEol(iface.SnapLen);
                    "LINKTYPE> {0} \"{1}\"".PrintInfoEol(iface.LinkType, (PcapNgLinkType)iface.LinkType);
                    "IF NAME> \"{0}\"".PrintInfoEol(iface.IfName);
                    "IF DESCRIPTION> \"{0}\"".PrintInfoEol(iface.IfDescription);
                    "ADDRESSES> ".PrintInfoEol();
                    foreach (var address in iface.Addresses)
                    {
                        ("\t\t" + address).PrintInfoEol();
                    }
                    ("MAC ADDRESSES> " + this.MacAddressToString(iface.MacAddress)).PrintInfoEol();
                    "SPEED> {0}".PrintInfoEol(iface.Speed);
                    "OS> \"{0}\"".PrintInfoEol(iface.Os);
                }
                sectionId++;
            }
        }
Exemple #2
0
 /// <summary>
 ///     Prints whole frame table from TCPD PCAP file
 /// </summary>
 internal void PrintTcpdFrameTable()
 {
     foreach (var fr in this.PmCapture.Frames)
     {
         PmConsolePrinter.PrintDebug("FRAME " + fr.FrameIndex + " OFFSET " + fr.FrameOffset);
         this.PrintTcpdPacketHeaderRecord(fr);
     }
 }
Exemple #3
0
 /// <summary>
 ///     Prints all information in TCPD Global Header
 /// </summary>
 internal void PrintTcpdGlobalHeader()
 {
     PmConsolePrinter.PrintDebug("GLOBAL HEADER INFORMATION FOR " + this.PmCapture.FileInfo.FullName);
     "Version> {0}.{1}".PrintInfoEol(this._versionMaj, this._versionMin);
     "Correction for UTC> {0}".PrintInfoEol(this._tcpdTimeZoneOffset);
     "Sigfigs> {0}".PrintInfoEol(this._sigfigs);
     "Snapshot Length> {0}".PrintInfoEol(this._snaplen);
     "Data link type> {0}".PrintInfoEol(this._pcapLinkType);
 }