howto setup a route by netlink socket

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
  



--
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Audio Users]     [Linux for Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux