From: "C.J" <c.james.cj@gmail.com>
To: linux-ppp@vger.kernel.org
Subject: howto setup a route by netlink socket
Date: Fri, 30 May 2008 01:37:43 +0000 [thread overview]
Message-ID: <200805300937396564081@gmail.com> (raw)
Hi list,
I want to set a route by netlink socket but I've no idea how to do it clearly.
Here I've make up a virtual interface that is ppp0 by ioctl, we want to it could communicate with peer side.
We need just a route, right? Netlink can do this. As there are many attributes , we need tell kernel what's our route.
But I'm not sure what we should build as attributes that we will send to kernel.
Now I get a simple talk, it contains 2 attrs follow 'rtmsg' structure.
RTA_DST, 192.168.1.1 -- the peer IP
RTA_SRC, 192.168.1.2 -- our local IP
And it cannot work, kernel return [No such Device] error.
I think there are something I lost, pls help me and point out the errors.
Reg
--
c.j
next reply other threads:[~2008-05-30 1:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-30 1:37 C.J [this message]
2008-05-30 3:36 ` howto setup a route by netlink socket James Cameron
2008-05-30 8:13 ` James Chapman
2008-05-31 13:26 ` C.J
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200805300937396564081@gmail.com \
--to=c.james.cj@gmail.com \
--cc=linux-ppp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.