MAC address of an IPv6 address - Unix

This is a discussion on MAC address of an IPv6 address - Unix ; Hi All, I am writing a program that tests the health of a NIC card. I am creating a NDD socket (Data Link Access) which I will use to send ICMP ECHO packets to a given host. This means that ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: MAC address of an IPv6 address

  1. MAC address of an IPv6 address

    Hi All,

    I am writing a program that tests the health of a NIC card. I am
    creating a NDD socket (Data Link Access) which I will use to send ICMP
    ECHO packets to a given host. This means that my application has to
    build the entire packet and I have to create and add the IP/IPv6,
    ICMP/
    6, and MAC headers in my application. I got things to work for IP, but
    I am stuck with IPv6:

    1) How do I find the MAC address for an IPv6 remote host? For IP, I
    use the SIOCGARP ioctl and get the MAC adress from the ARP cache. But
    IPv6 does not use ARP. there is something called neighbor discovery
    for IPv6, but I could not find any programatic interface to use it ..

    2) How do I do a broadcast ping in IPv6? In v4, I just put the
    broadcast address in the destination addr fiend of the IP header and
    things worked, but what do I do for v6?

    Thanks in advance for your help.

    Jigs


  2. Re: MAC address of an IPv6 address

    Jigs wrote:
    ....
    > 1) How do I find the MAC address for an IPv6 remote host?


    Look in the arp table if it is on the local network. If it's not on the
    local network, you're outa luck.

+ Reply to Thread