protected NetworkInterface GetMatchingNetworkInterface(PcapInterface pcapInterface, NetworkInterface[] nics) { foreach (NetworkInterface adapter in nics) { // if the name and id match then we have found the NetworkInterface // that matches the PcapInterface if (pcapInterface.Name.Contains(adapter.Id)) { return adapter; } } return null; }
private int m_pcapPacketCount = Pcap.INFINITE; //Infinite #endregion Fields #region Constructors /// <summary> /// Constructs a new PcapDevice based on a 'pcapIf' struct /// /// <param name="pcapIf">A 'pcapIf' struct representing /// the pcap device</param> /// </summary> internal PcapDevice( PcapInterface pcapIf ) { m_pcapIf = pcapIf; }