Source Address Selction in IPv6

Discussion in 'Linux Networking' started by Rahul Bhenwal, May 7, 2014.

  1. Rahul Bhenwal

    Rahul Bhenwal New Member

    Messages:
    1
    Likes Received:
    1
    Trophy Points:
    3
    Hi,
    I am new to ipv6 and i am facing problem with source address selection in ipv6. From the home work which i had done i can say that in linux source address selection is done by kernel itself. This is done by kernel when we actually sends the data meaning when sendto() API is invoked. What i want is suppose i have an multiple IP's say an link local and an global ip. I had already opened the socket with these IPs. Now if i want to send that data to an global ip then how would i determine that from which socket would i be able to send it. Note i had looked at getaddrinfo() but its not useful since it is used for destination address selection only. In very simple and short term i want an API which could actually give me an appropriate source address to use with accordance to an destination address. Do post your valuable suggestions.

    chenchuanwen likes this.

Share This Page