File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -9540,8 +9540,23 @@ network_interface_list (bool full, unsigned short match)
95409540 switch (adapter -> IfType )
95419541 {
95429542 case IF_TYPE_ETHERNET_CSMACD :
9543- ifmt_idx = ETHERNET ;
9544- if_num = eth_count ++ ;
9543+ /* Windows before Vista reports wireless adapters as
9544+ Ethernet. Work around by looking at the Description
9545+ string. */
9546+ {
9547+ char description [MAX_UTF8_PATH ];
9548+ if (filename_from_utf16 (adapter -> Description , description ) == 0
9549+ && strstr (description , "Wireless " ))
9550+ {
9551+ ifmt_idx = WLAN ;
9552+ if_num = wlan_count ++ ;
9553+ }
9554+ else
9555+ {
9556+ ifmt_idx = ETHERNET ;
9557+ if_num = eth_count ++ ;
9558+ }
9559+ }
95459560 break ;
95469561 case IF_TYPE_ISO88025_TOKENRING :
95479562 ifmt_idx = TOKENRING ;
You can’t perform that action at this time.
0 commit comments