This article is a mirror article of machine translation, please click here to jump to the original article.

View: 22664|Reply: 0

[Source] c# uses Sharppcap to implement the acquisition of the network adapter

[Copy link]
Posted on 6/23/2016 5:03:45 PM | | | |


c:\sharppcap\Examples\Example1.IfList\bin\Debug>Example1.IfList.exe
SharpPcap 3.5.0.0, Example1.IfList.cs

The following devices are available on this machine:
----------------------------------------------------

interface: Name: \Device\NPF_{D8B7C9B2-D53D-45DA-ACF0-2E2116F97314}
FriendlyName: Local Area Connection 2
Descrip{filter}tion: Intel(R) PRO/1000 MT Desktop Adapter
Addresses:
Addr:      fe80::b444:92d8:c882:8227
Netmask:
Broadaddr:

Addresses:
Addr:      10.0.2.15
Netmask:   255.255.255.0
Broadaddr: 255.255.255.255

Addresses:
Addr:      HW addr: 0800276AC792

Flags: 0

Hit 'Enter' to exit...


The above is an example given by the official, however, I just want to get the name of the adapter, so it won't work.

However, after my efforts, it was implemented to get only the name of the adapter,
Code Download:

代码.txt (763 Bytes, Number of downloads: 1)




Previous:Test your internet speed using the Linux command line
Next:Alipay RSA private key and public key one-click generation tool
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com