internal NetworkHost(IPAddress ipAddress) { this.ipAddress = ipAddress; this.macAddress = null; this.recentMacAdresses = new PopularityList <string, PhysicalAddress>(255); this.ttlCount = new SortedList <byte, int>(); this.ttlDistanceCount = new SortedList <byte, int>(); this.operatingSystemCounterList = new SortedList <string, SortedList <string, double> >(); this.hostNameList = new List <string>(); this.domainNameList = new List <string>(); this.openTcpPortList = new List <ushort>(); this.networkServiceMetadataList = new SortedList <ushort, NetworkServiceMetadata>(); this.sentPackets = new NetworkPacketList(); this.receivedPackets = new NetworkPacketList(); this.incomingSessionList = new List <NetworkTcpSession>(); this.outgoingSessionList = new List <NetworkTcpSession>(); this.queriedIpList = new List <IPAddress>(); this.queriedNetBiosNameList = new List <string>(); this.queriedDnsNameList = new List <string>(); this.httpUserAgentBannerList = new List <string>(); this.httpServerBannerList = new List <string>(); this.ftpServerBannerList = new List <string>(); this.dhcpVendorCodeList = new List <string>(); this.extraDetailsList = new SortedList <string, string>(); this.universalPlugAndPlayFieldList = null;//I could just as well set this to null 'cause it is not often used. I'll initialize it when it is needed. this.acceptedSmbDialectsList = null; this.preferredSmbDialect = null; }
public NetworkPacketList GetSubset(System.Net.IPAddress sourceIp, System.Net.IPAddress destinationIp) { NetworkPacketList list = new NetworkPacketList(); foreach (NetworkPacket p in this) { if (p.SourceHost.IPAddress.Equals(sourceIp) && p.DestinationHost.IPAddress.Equals(destinationIp)) { list.Add(p); } } return(list); }
} //for serialization purposes public NetworkHost(IPAddress ipAddress) { this.ipAddress = ipAddress; this.macAddress = null; this.recentMacAdresses = new PopularityList <string, PhysicalAddress>(255); this.ttlCount = new SortedList <byte, int>(); this.ttlDistanceCount = new SortedList <byte, int>(); //this.operatingSystemCounterList=new SortedList<string, SortedList<string, double>>(); this.fingerprinterOsCounterList = new SortedList <Fingerprints.IOsFingerprinter, SortedList <string, double> >(); this.fingerprintedDeviceCategory = new KeyValuePair <double, string>(0.0, ""); this.fingerprintedDeviceFamily = new KeyValuePair <double, string>(0.0, ""); this.hostNameList = new List <string>(); this.domainNameList = new List <string>(); this.openTcpPortList = new List <ushort>(); this.networkServiceMetadataList = new SortedList <ushort, NetworkServiceMetadata>(); this.vlanIdList = new List <ushort>(); this.sentPackets = new NetworkPacketList(); this.receivedPackets = new NetworkPacketList(); this.incomingSessionList = new List <NetworkTcpSession>(); this.outgoingSessionList = new List <NetworkTcpSession>(); this.queriedIpList = new List <IPAddress>(); this.queriedNetBiosNameList = new List <string>(); this.queriedDnsNameList = new List <string>(); this.httpUserAgentBannerList = new List <string>(); this.httpServerBannerList = new List <string>(); this.ftpServerBannerList = new List <string>(); this.dhcpVendorCodeList = new List <string>(); this.extraDetailsList = new SortedList <string, string>(); this.FaviconPerHost = new System.Collections.Concurrent.ConcurrentDictionary <string, string>(); this.universalPlugAndPlayFieldList = null;//I could just as well set this to null 'cause it is not often used. I'll initialize it when it is needed. this.acceptedSmbDialectsList = null; this.preferredSmbDialect = null; }