|
||||||||
|
|
#1
|
|
Hi,
I would appreciate if someone can guide me towards MAC Address to IP Address Translation. Source code, preferably in C or VC++ or Win32 API will be very helpful. TIA, Sanjeev Kumar http://www.coolcampus.8k.com Sanjeev Kumar |
|
#2
|
|||
|
|||
|
I may be mistaken - but I do not think that there is such a thing --- if
there is or if you find one or write one please forward a copy to me. The MAC address is hard-coded by the manufacture, where the IP is assigned more or less adhoc by anyone at any time. If my understanding is incorrect - someone please correct me, but this is how I understand it. Overbey "Sanjeev Kumar" <(E-Mail Removed)> wrote in message news:(E-Mail Removed) om... > Hi, > I would appreciate if someone can guide me towards MAC Address to IP > Address Translation. Source code, preferably in C or VC++ or Win32 API > will be very helpful. > > TIA, > Sanjeev Kumar > http://www.coolcampus.8k.com |
|
#3
|
|||
|
|||
|
On 26 Jul 2004 06:41:54 -0700, Sanjeev Kumar wrote:
> Hi, > I would appreciate if someone can guide me towards MAC Address to IP > Address Translation. Source code, preferably in C or VC++ or Win32 API > will be very helpful. > > TIA, > Sanjeev Kumar > http://www.coolcampus.8k.com "arp -n" will give a table of IP addresses and MAC addresses, so maybe a look at the source for that will give you an idea. |
|
#4
|
|||
|
|||
|
Cool --- I had forgotten about the arp and rarp commands.
Thanks Overbey "John Armstrong" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)... > On 26 Jul 2004 06:41:54 -0700, Sanjeev Kumar wrote: > > > Hi, > > I would appreciate if someone can guide me towards MAC Address to IP > > Address Translation. Source code, preferably in C or VC++ or Win32 API > > will be very helpful. > > > > TIA, > > Sanjeev Kumar > > http://www.coolcampus.8k.com > > "arp -n" will give a table of IP addresses and MAC addresses, so maybe a > look at the source for that will give you an idea. |
|
#5
|
|||
|
|||
|
Sanjeev Kumar wrote:
> Hi, > I would appreciate if someone can guide me towards MAC Address to IP > Address Translation. Source code, preferably in C or VC++ or Win32 API > will be very helpful. > > TIA, > Sanjeev Kumar > http://www.coolcampus.8k.com Do you understand what you're asking for??? An analogy would be the relationship between phone numbers and street addresses. There is absolutely no relationship between a MAC address and an IP address, except as implemented on a network. The MAC addresses should be considered a random number, though NICs purchased from a single vendor may have similar MACs. An IP address is assigned to an interface. In that manner alone, is a relationship between MAC & IP and it will change, as soon as either the NIC or IP address is changes. You can determine the current relationship on a network, by examining the arp cache or by using a network analyzer. Incidentally, a MAC address is irrelevant beyond the local network. That is, as soon as a packet passes through a router, the MAC from the originating computer will be replaced by that of the router and this will be repeated at every router along the path to the destination. -- (This space intentionally left blank) |
|
#6
|
|||
|
|||
|
In article <(E-Mail Removed) >,
Sanjeev Kumar wrote: >Hi, >I would appreciate if someone can guide me towards MAC Address to IP >Address Translation. Did you install the Linux kernel source? >Source code, preferably in C locate arp.c locate arp.h >or VC++ or Win32 API will be very helpful. Wrong news group. Old guy |
|
#7
|
|||
|
|||
|
On Mon, 26 Jul 2004 14:58:56 +0000, Overbey wrote:
> I may be mistaken - but I do not think that there is such a thing --- if > there is or if you find one or write one please forward a copy to me. > The MAC address is hard-coded by the manufacture, where the IP is assigned > more or less adhoc by anyone at any time. > If my understanding is incorrect - someone please correct me, but this is > how I understand it. There are a number of services that can do the lookup, usually for booting up workstations, esp. diskless workstations (in the old days) or for doing network installs, etc. Do some research on DHCP, bootparamd, bootp, etc. The usual sequence is that the workstations sends its MAC address, often in a broadcast. A server running one of the appropriate services (does a table/file lookup and) sends back the IP address that the workstation is supposed to use, together with some parameters (required for booting and/or installation), and (if appropriate) a kernel to boot. e.g. Sun workstations can do a network boot/install from ROM. PCs can do network boot/install but that usually requires boot from floppy. -- Juhan Leemet Logicognosis, Inc. |
![]() |
| Tags |
| mac, translation |
| Thread Tools | |
| Display Modes | |
|
|