Re: Detecting host in the local network
- From: AndreasSander1@xxxxxxx
- Date: Thu, 12 Feb 2009 05:07:43 -0800 (PST)
The question is about devices that cannot be reached at the own IP
subnet (ipaddress/netmask definition) but are connected to the same
LAN. You can have multiple logical IP networks at the same physical
LAN. To send a frame to host at the other IP network you must send to
the limited broadcast address.
So when the target device is at the same LAN, you need the broadcast,
but you will send a unicast to any device behind the router. But for
this decision you need to detect, if the target is connected the
physical LAN.
Andreas
On Feb 11, 7:56 pm, "Paul G. Tobey [eMVP]" <p space tobey no spam AT
no instrument no spam DOT com> wrote:
I don't understand the question. You can ping things on the other side of a
router, if they're willing to respond to the ping and the router allows ARP
packets. You have a gateway set up for your network adapter. If the IP
address you specify for any sort of IP traffic is not on your local subnet
(mask you own IP with your subnet mask and mask the target IP with your
subnet mask; if the results are different, the address is not local, so the
router will be contacted to send the packet to the subnet where the target
IP actually is located)., the router gets it for forwarding.
Paul T.
<AndreasSand...@xxxxxxx> wrote in message
news:6e0a1c7e-dd86-4c11-b02f-7fbc8455a5b7@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The ICMP protocol is based on IP. The other device is in a different
logical network. Shouldn't I get a "host unreachable" error when I
dont twiddle with the routing table?
Andreas
On 11 Feb., 18:27, "Paul G. Tobey [eMVP]" <p space tobey no spam AT no
instrument no spam DOT com> wrote:
You can certainly ping a given IP address or host name. The source for
PING
is in Platform Builder at
\WINCE500\PUBLIC\COMMON\OAK\DRIVERS\NETSAMP\PING.
There's also a library that just does ping, not general ARP. Look at
\WINCE500\PUBLIC\COMMON\OAK\INC\pinglib.h. I've never used the latter, but
it looks like it should work.
Paul T.
<AndreasSand...@xxxxxxx> wrote in message
news:d81fab83-1b14-4d00-b861-d5ec0db0ccfe@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello,
is it possible to detect, if a ethernet device is connected to the
local LAN?
I have a scenario where a Windows CE 5.0 device is connected to a LAN..
There are probably other devices connected to the same physical
network that use a different subnet. I have to decide if the other
device is in the LAN.
Can I access the ARP layer in any way?
The information is required to decided if I should use the limited
broadcast address to send a UDP frame to the other device or a unicast
address that the next gateway will route.
Andreas- Hide quoted text -
- Show quoted text -
.
- Follow-Ups:
- Re: Detecting host in the local network
- From: superclass
- Re: Detecting host in the local network
- From: Paul G. Tobey [eMVP]
- Re: Detecting host in the local network
- References:
- Detecting host in the local network
- From: AndreasSander1
- Re: Detecting host in the local network
- From: Paul G. Tobey [eMVP]
- Re: Detecting host in the local network
- From: AndreasSander1
- Re: Detecting host in the local network
- From: Paul G. Tobey [eMVP]
- Detecting host in the local network
- Prev by Date: Re: Need simplest sample Windows CE application ever coded
- Next by Date: Re: Need simplest sample Windows CE application ever coded
- Previous by thread: Re: Detecting host in the local network
- Next by thread: Re: Detecting host in the local network
- Index(es):
Relevant Pages
|