LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   get the ipv6 source address (https://www.linuxquestions.org/questions/programming-9/get-the-ipv6-source-address-900386/)

hayf 08-31-2011 05:38 AM

get the ipv6 source address
 
I need to get the ipv6 source address at the kernel level (Debian machine).
what is the eroor with this?

code:
struct ipv6_pinfo *np = inet_sk(sk);
addr = np->saddr;

grail 08-31-2011 10:02 PM

What error are you getting?

hayf 09-01-2011 02:51 AM

in fact i am making changes in the kernel tcp stack in file tcp_output.c, and i am using the ipv6 source address to inject in the tcp header.
after recompiling the kernel, when i launch the browser epiphany, i get a kernel failure message:

BUG: unable to handle kernel NULL pointer dereference...

Thanks


All times are GMT -5. The time now is 12:25 PM.