Re: How to know if a network adapter is connected
- From: "Helge Kruse" <Helge.Kruse-nospam@xxxxxxx>
- Date: Sun, 12 Oct 2008 09:56:38 +0200
"fred_d" <duchassin@xxxxxxxxx> wrote in message news:gcnevp$neg$1@xxxxxxxxxxxxxxxxxxxxx
Bind is not working after recv().Fred,
Because after receiving network packets i would like to bind to usb network and if it's ok, i give USB address.
Excuse me if it's not very clear.
If i use bind before recv(), and i give an IP address to bind(), it's not working if the interface is not connected !
I'm turning and turning .... but i found no good solution (and simple ;-))))
Help!
Binding a socket to an adapter instructs the NDIS to receive only from this socket. This is the only way I know to identify the network adapter, where a packet is received. You have to bind the adapter before calling any send/receive function. Sorry.
When you write a service (http://msdn.microsoft.com/en-us/library/aa446909.aspx) you get an IOCTL call (http://msdn.microsoft.com/en-us/library/ms891090.aspx), when the adapter state has changed. You can use this notification to update your sockets and bind to newly connected adapters.
/Helge
.
- Follow-Ups:
- Re: How to know if a network adapter is connected
- From: fred_d
- Re: How to know if a network adapter is connected
- References:
- How to know if a network adapter is connected
- From: fred_d
- Re: How to know if a network adapter is connected
- From: Helge Kruse
- Re: How to know if a network adapter is connected
- From: fred_d
- Re: How to know if a network adapter is connected
- From: fred_d
- How to know if a network adapter is connected
- Prev by Date: Re: fatal error C1083
- Next by Date: Problem in adding menu to dialog
- Previous by thread: Re: How to know if a network adapter is connected
- Next by thread: Re: How to know if a network adapter is connected
- Index(es):
Relevant Pages
|
Loading