Displaying 2 results from an estimated 2 matches for "ip_rt_ioctl".
2004 Apr 10
0
handle route table in kernel
Hi all,
How can I add or modify a route in the kernel? It seems ip_rt_ioctl() does the job. I read the code but got one question.
A route is in a route table, so we have to find the table number (from 0 to 255) first. ip_rt_ioctl() called fib_convert_rtentry() to fill the fields of the req.rtm, such as the rtm_protocol, rtm_scope, rtm_type, etc. But where is rtm_table is...
2003 May 22
0
[PATCH 2.5.69 1/3] remove ipconfig support from the kernel
...ifreq *arg)
-{
- int res;
-
- mm_segment_t oldfs = get_fs();
- set_fs(get_ds());
- res = devinet_ioctl(cmd, arg);
- set_fs(oldfs);
- return res;
-}
-
-static int __init ic_route_ioctl(unsigned int cmd, struct rtentry *arg)
-{
- int res;
-
- mm_segment_t oldfs = get_fs();
- set_fs(get_ds());
- res = ip_rt_ioctl(cmd, arg);
- set_fs(oldfs);
- return res;
-}
-
-/*
- * Set up interface addresses and routes.
- */
-
-static int __init ic_setup_if(void)
-{
- struct ifreq ir;
- struct sockaddr_in *sin = (void *) &ir.ifr_ifru.ifru_addr;
- int err;
-
- memset(&ir, 0, sizeof(ir));
- strcpy(ir.ifr_ifrn.ifrn_n...