Hi,

I have tried using RTNetlink for adding IPv6 route table.
But it shows me a connection refused as an error in functions.

recv_reply();
read_reply();

of my code.

Could you please have a look at the snippet code which I'm attaching and
suggest why it is not abling to add route for IPv6.
Do I need to add some package for RTNetlink for adding IPv6 route.
If possible kindly provide some me some link or code snippet for IPv6
route.

Thanks in advance.

Regards
Shahid.


 <<rtnetlink.c>>  

_____________________________________________
From: Khan, Shahid Ezaz 
Sent: Thursday, August 14, 2008 2:54 PM
To: 'Andreas Henriksson'
Subject: RE: Adding a route for ipv6.

Hello Andreas! 

Could you provide me some source code example of how to add a route in
ipv6.

I need it urgently. Please help me out.

Regards
Shahid







-----Original Message-----
From: Andreas Henriksson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 14, 2008 1:18 PM
To: Khan, Shahid Ezaz
Cc: [EMAIL PROTECTED]
Subject: Re: Adding a route for ipv6.

Hello Shahid!

You've reached the debian iproute maintainers, but I'll try to help you.
Please contact your local linux help channel for future advice though.
(Try for example the IRC channel #debian or irc.debian.org or the
user mailing list http://lists.debian.org/debian-user/.)

On Thu, Aug 14, 2008 at 12:14:33PM +0530, Khan, Shahid Ezaz wrote:
> I'm trying to added a route to ipv6 network, through command line #
> route - A inet6 add ipv6 gw       dev   and its working fine.
> 

The route binary is not part of iproute. The iproute equivalent is part
of the
ip binary, "ip route ...".
To find out which package a binary is part of in Debian, you can use the
command "dpkg -S route", or even better give the full path
"dpkg -S /sbin/route". This will tell you that route is part of the
"net-tools"
package. Now to get the source of a package, simply issue the command 
"apt-get source net-tools". This will download the source of the package
into
your current directory.
If you encounter an error, make sure your /etc/apt/sources.list contains
a line starting with "deb-src" matching the one starting with "deb".
Like this:
deb ftp://ftp.de.debian.org/debian/ unstable main contrib non-free
deb-src ftp://ftp.de.debian.org/debian/ unstable main contrib non-free


> But I want the source code of the route for ipv6 such that it does
adds
> the route in ipv6.

I'm guessing you want to know how to tell the kernel to add and remove
routes.
There are two different ways to do this in linux. The old traditional
Unix
way of ioctl's used by net-tools (route) and the new improved linux-only
way
of using RTNetlink used by iproute2 (ip).
With RTNetlink you can do stuff like subscribing to changes which is not
possible in the ioctl api. I suggest you check out both solutions and
decide if you need the extra features provided by RTNetlink or if 
you should choose the portable ioctl method.

> 
> Please help me in finding the code.

Just a few helpful hints for the future. I almost marked your mail as
junk
myself because of these things.

Try to avoid sending html-formatted mails, they easily tend to look like
spam.
Additionally, formatting is lost in the plain text version of the mail
so
you might not get your point across to the people reading your mails.
*Please* do *not* include disclaimers like the one below. They have
absolutely
no value at all and just annoy people. You want to avoid anoying people
who
can help you.


> 
> "DISCLAIMER: 
> This message is proprietary to iPolicy Networks-Security Products
division of Tech Mahindra Limited and is intended solely for the use of
the individuals to whom it is addressed. It may contain privileged or
confidential information and should not be circulated or used for any
purpose other than for what is intended. If you have received this
message in error, please notify the originator immediately. If you are
not the intended recipient, you are notified that you are strictly
prohibited from using, copying, altering, or disclosing the contents of
this message. iPolicy Networks-Security Products division of Tech
Mahindra Limited accepts no responsibility for loss or damage arising
from the use of the information transmitted by this email including
damage from virus."

--
Regards,
Andreas Henriksson


"DISCLAIMER: 
This message is proprietary to iPolicy Networks-Security Products division of 
Tech Mahindra Limited and is intended solely for the use of the individuals to 
whom it is addressed. It may contain privileged or confidential information and 
should not be circulated or used for any purpose other than for what is 
intended. If you have received this message in error, please notify the 
originator immediately. If you are not the intended recipient, you are notified 
that you are strictly prohibited from using, copying, altering, or disclosing 
the contents of this message. iPolicy Networks-Security Products division of 
Tech Mahindra Limited accepts no responsibility for loss or damage arising from 
the use of the information transmitted by this email including damage from 
virus."

Attachment: rtnetlink.c
Description: rtnetlink.c

"DISCLAIMER: This message is proprietary to iPolicy Networks Limited and is 
intended solely for the use of the individuals to whom it is addressed. It may 
contain privileged or confidential information and should not be circulated or 
used for any purpose other than for what is intended. If you have received this 
message in error, please notify the originator immediately. If you are not the 
intended recipient, you are notified that you are strictly prohibited from 
using, copying, altering, or disclosing the contents of this message. iPolicy 
Networks Limited accepts no responsibility for loss or damage arising from the 
use of the information transmitted by this email including damage from virus."

Reply via email to