Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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;
        }