예제 #1
0
 void deviceListForm_OnItemSelected(int itemIndex)
 {
     // close the device list form
     deviceListForm.Hide();
     //bắt capture theo thứ tự divice
     StartCapture(itemIndex);
 }
예제 #2
0
        void deviceListForm_OnItemSelected(int itemIndex)
        {
            // close the device list form
            deviceListForm.Hide();

            StartCapture(itemIndex);
        }
예제 #3
0
        void deviceListForm_OnItemSelected(int itemIndex)
        {
            // close the device list form
            deviceListForm.Hide();

            //StartCapture(itemIndex);
            device = devices[itemIndex];

            var interfaces = ((SharpPcap.LibPcap.PcapDevice)device).Interface;

            var addresses = interfaces.Addresses;

            foreach (var address in addresses)
            {
                if (address.Addr.ipAddress != null)
                {
                    if (address.Addr.ipAddress.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
                    {
                        textBoxTargetInterfaceIpAddress.Text = address.Addr.ipAddress.ToString();
                        textBoxTargetInterfaceName.Text      = interfaces.FriendlyName;
                    }
                }
            }
        }