diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32.c | 19 |
1 files changed, 17 insertions, 2 deletions
| @@ -9540,8 +9540,23 @@ network_interface_list (bool full, unsigned short match) | |||
| 9540 | switch (adapter->IfType) | 9540 | switch (adapter->IfType) |
| 9541 | { | 9541 | { |
| 9542 | case IF_TYPE_ETHERNET_CSMACD: | 9542 | case IF_TYPE_ETHERNET_CSMACD: |
| 9543 | ifmt_idx = ETHERNET; | 9543 | /* Windows before Vista reports wireless adapters as |
| 9544 | if_num = eth_count++; | 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 | } | ||
| 9545 | break; | 9560 | break; |
| 9546 | case IF_TYPE_ISO88025_TOKENRING: | 9561 | case IF_TYPE_ISO88025_TOKENRING: |
| 9547 | ifmt_idx = TOKENRING; | 9562 | ifmt_idx = TOKENRING; |