Interface without IP connection status
up vote
-1
down vote
favorite
I'm on Win7 and Qt and I need to track local network interfaces. The problem is - some of them don't have IP layer but I want to know if they are connected or not.
I've tried
QNetworkInterface::allInterfaces() from Qt
and
GetInterfaceInfo() from iphlpapi.h
But both work only for interfaces with IP assigned. Duh.
I've also tried
pcap library
But pcap_if_t
has no fields to track connection status, only MAC and others.
I feel stuck between two layers and don't know how to handle this.
I suppose there is a way with WMI query
but it seems to be an overkill.
c++ qt winapi network-programming osi
add a comment |
up vote
-1
down vote
favorite
I'm on Win7 and Qt and I need to track local network interfaces. The problem is - some of them don't have IP layer but I want to know if they are connected or not.
I've tried
QNetworkInterface::allInterfaces() from Qt
and
GetInterfaceInfo() from iphlpapi.h
But both work only for interfaces with IP assigned. Duh.
I've also tried
pcap library
But pcap_if_t
has no fields to track connection status, only MAC and others.
I feel stuck between two layers and don't know how to handle this.
I suppose there is a way with WMI query
but it seems to be an overkill.
c++ qt winapi network-programming osi
What do you mean by "connected"? Do you mean physically present on your local machine? That sounds like something for device manager functions.
– o_weisman
Nov 7 at 12:10
Look at the Win32GetAdaptersInfo()
orGetAdaptersAddresses()
function. They will give you detailed information and statuses of every installed network adapter.
– Remy Lebeau
Nov 7 at 19:37
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I'm on Win7 and Qt and I need to track local network interfaces. The problem is - some of them don't have IP layer but I want to know if they are connected or not.
I've tried
QNetworkInterface::allInterfaces() from Qt
and
GetInterfaceInfo() from iphlpapi.h
But both work only for interfaces with IP assigned. Duh.
I've also tried
pcap library
But pcap_if_t
has no fields to track connection status, only MAC and others.
I feel stuck between two layers and don't know how to handle this.
I suppose there is a way with WMI query
but it seems to be an overkill.
c++ qt winapi network-programming osi
I'm on Win7 and Qt and I need to track local network interfaces. The problem is - some of them don't have IP layer but I want to know if they are connected or not.
I've tried
QNetworkInterface::allInterfaces() from Qt
and
GetInterfaceInfo() from iphlpapi.h
But both work only for interfaces with IP assigned. Duh.
I've also tried
pcap library
But pcap_if_t
has no fields to track connection status, only MAC and others.
I feel stuck between two layers and don't know how to handle this.
I suppose there is a way with WMI query
but it seems to be an overkill.
c++ qt winapi network-programming osi
c++ qt winapi network-programming osi
asked Nov 7 at 11:29
Alexandr
20111
20111
What do you mean by "connected"? Do you mean physically present on your local machine? That sounds like something for device manager functions.
– o_weisman
Nov 7 at 12:10
Look at the Win32GetAdaptersInfo()
orGetAdaptersAddresses()
function. They will give you detailed information and statuses of every installed network adapter.
– Remy Lebeau
Nov 7 at 19:37
add a comment |
What do you mean by "connected"? Do you mean physically present on your local machine? That sounds like something for device manager functions.
– o_weisman
Nov 7 at 12:10
Look at the Win32GetAdaptersInfo()
orGetAdaptersAddresses()
function. They will give you detailed information and statuses of every installed network adapter.
– Remy Lebeau
Nov 7 at 19:37
What do you mean by "connected"? Do you mean physically present on your local machine? That sounds like something for device manager functions.
– o_weisman
Nov 7 at 12:10
What do you mean by "connected"? Do you mean physically present on your local machine? That sounds like something for device manager functions.
– o_weisman
Nov 7 at 12:10
Look at the Win32
GetAdaptersInfo()
or GetAdaptersAddresses()
function. They will give you detailed information and statuses of every installed network adapter.– Remy Lebeau
Nov 7 at 19:37
Look at the Win32
GetAdaptersInfo()
or GetAdaptersAddresses()
function. They will give you detailed information and statuses of every installed network adapter.– Remy Lebeau
Nov 7 at 19:37
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
I found out that internal interface status can be checked with the Win32 GetIfTable()
function.
This example helped me a lot.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I found out that internal interface status can be checked with the Win32 GetIfTable()
function.
This example helped me a lot.
add a comment |
up vote
0
down vote
I found out that internal interface status can be checked with the Win32 GetIfTable()
function.
This example helped me a lot.
add a comment |
up vote
0
down vote
up vote
0
down vote
I found out that internal interface status can be checked with the Win32 GetIfTable()
function.
This example helped me a lot.
I found out that internal interface status can be checked with the Win32 GetIfTable()
function.
This example helped me a lot.
answered Nov 8 at 8:24
Alexandr
20111
20111
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53188615%2finterface-without-ip-connection-status%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What do you mean by "connected"? Do you mean physically present on your local machine? That sounds like something for device manager functions.
– o_weisman
Nov 7 at 12:10
Look at the Win32
GetAdaptersInfo()
orGetAdaptersAddresses()
function. They will give you detailed information and statuses of every installed network adapter.– Remy Lebeau
Nov 7 at 19:37