<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<blockquote
cite="mid:200801271200.m0RC0f9a001488@staphna2.securesites.net"
type="cite">
<pre wrap="">Date: Sat, 26 Jan 2008 12:17:20 -0800
From: Guy Harris <a class="moz-txt-link-rfc2396E" href="mailto:guy@alum.mit.edu"><guy@alum.mit.edu></a>
Subject: Re: [Winpcap-users] Getting a MAC Address
To: <a class="moz-txt-link-abbreviated" href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</a>
Message-ID: <a class="moz-txt-link-rfc2396E" href="mailto:479B9550.3080504@alum.mit.edu"><479B9550.3080504@alum.mit.edu></a>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
:: [F]usion[S]tream :: -- Gmail wrote:
</pre>
<blockquote type="cite">
<pre wrap="">How does one go about retrieving a MAC Address from a device that is not
on a local network. Spent 2 days working on ARP before realising that it
supposedly only works on the local network (even though wikipedia seems
to say otherwise).
Say the device is behind a NAT, when i want to start sending data down
the line, do i use the MAC of the device behind the NAT or the MAC of
the router itself?
</pre>
</blockquote>
<pre wrap=""><!---->
What do you mean by "sending data down the line"?
With IP, for example, if the IP implementation in a networking stack
wants to send data to a device that's not on the local network, it
checks its routing table to see where packets to that IP address should
be routed, and gets back the IP address of a machine that *is* on one of
the local networks to which the machine is attached. It then sends the
packet to that machine, under the expectation that said machine will
then either send the packet to the ultimate destination, if it's
directly connected to that machine, or to another router, if it's not.
If it's sending to the router, and it's connected to the router via a
LAN (rather than, say, a point-to-point link), it would send the packet
to the router's MAC address.
This means that the packets need to be sent via a routable protocol,
such as IPv4, IPv6, or IPX.
What protocol(s) do the packets you're trying to send use?
</pre>
</blockquote>
I'm trying to send a UDP packet via IPv4 to an IP Address which is a
router which port forwards to a computer. But if I don't enter the
correct MAC address of the target device (winpcap apaprently needs you
to input the mac address manually), the packet is not "understood".
Sorry, I'm still fairly green with network programming.<br>
<br>
Cheers,<br>
Shawn.<br>
</body>
</html>