Resolving MAC address

From: Olivier Nicole (on_at_cs.ait.ac.th)
Date: 03/24/05

  • Next message: Charlie Schluting: "Re: Resolving MAC address"
    Date: Thu, 24 Mar 2005 10:39:51 +0700 (ICT)
    To: freebsd-net@freebsd.org
    
    

    Hi,

    Is there a command, or a short C code that I could use to resolve the
    MAC address for a given IP address?

    # ping -c 1 10.0.0.1
    PING 10.0.0.1 (10.0.0.1): 56 data bytes
    64 bytes from 10.0.0.1: icmp_seq=0 ttl=64 time=0.974 ms

    --- 10.0.0.1 ping statistics ---
    1 packets transmitted, 1 packets received, 0% packet loss
    round-trip min/avg/max/stddev = 0.974/0.974/0.974/0.000 ms
    # arp 10.0.0.1
    ? (10.0.0.1) at 00:e0:29:ad:5a:aa on em0 [ethernet]

    will do the trick, but it is a bit too heavy for the purpose, I'd
    prefer a solution that only send an ARP request.

    Best regards,

    olivier
    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


  • Next message: Charlie Schluting: "Re: Resolving MAC address"

    Relevant Pages

    • Re: Mac OS X Server & VPC
      ... Ping 4.2.2.2: works I'm able to ping out ... What I've is that the packets get sent out from the VM ... through Mac OS X out on the network. ... Windows guest OS) ...
      (microsoft.public.mac.virtualpc)
    • Re: Cant ping router.
      ... packets transmitted, 0 packets received, 100% packet loss ... and the router has replied with its own hardware ... ping, to the router. ... Mac (but not the reverse for the same reason the Macs won't ping ...
      (comp.sys.acorn.networking)
    • problem with gethostbyaddr with intranet addresses on MAC
      ... fine on my MAC for ip addresses on the LAN. ... PING 192.168.4.123: 56 data bytes ... packets transmitted, 3 packets received, 0% packet loss ...
      (comp.lang.python)
    • [UNIX] Bug in Linux 2.4 and IPTables MAC Match Module
      ... Bug in Linux 2.4 and IPTables MAC Match Module ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... perform NAT, mangle packets, and access custom extensions for packet ...
      (Securiteam)
    • Netgear MA401 stopped working
      ... the host, seem to be sending packets, but never receive anything back. ... PING 192.168.112.1: 56 data bytes ... I, on the other hand, suspect a hardware problem with the card. ... pci_cfgintr: 0:2 INTA BIOS irq 11 ...
      (freebsd-net)