Main Page | Class List | File List | Class Members | File Members

ip_fib.h File Reference

#include <linux/config.h>

Go to the source code of this file.

Classes

struct  kern_rta
struct  fib_nh
struct  fib_info
struct  fib_result
struct  fib_table

Defines

#define fib_mtu   fib_metrics[RTAX_MTU-1]
#define fib_window   fib_metrics[RTAX_WINDOW-1]
#define fib_rtt   fib_metrics[RTAX_RTT-1]
#define fib_advmss   fib_metrics[RTAX_ADVMSS-1]
#define fib_dev   fib_nh[0].nh_dev
#define FIB_RES_NH(res)   ((res).fi->fib_nh[0])
#define FIB_RES_RESET(res)
#define FIB_RES_PREFSRC(res)   ((res).fi->fib_prefsrc ? : __fib_res_prefsrc(&res))
#define FIB_RES_GW(res)   (FIB_RES_NH(res).nh_gw)
#define FIB_RES_DEV(res)   (FIB_RES_NH(res).nh_dev)
#define FIB_RES_OIF(res)   (FIB_RES_NH(res).nh_oif)

Functions

fib_tablefib_get_table (int id)
fib_tablefib_new_table (int id)
int fib_lookup (const struct rt_key *key, struct fib_result *res)
void fib_select_default (const struct rt_key *key, struct fib_result *res)
void ip_fib_init (void)
void fib_flush (void)
int inet_rtm_delroute (struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
int inet_rtm_newroute (struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
int inet_rtm_getroute (struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
int inet_dump_fib (struct sk_buff *skb, struct netlink_callback *cb)
int fib_validate_source (u32 src, u32 dst, u8 tos, int oif, struct net_device *dev, u32 *spec_dst, u32 *itag)
void fib_select_multipath (const struct rt_key *key, struct fib_result *res)
int ip_fib_check_default (u32 gw, struct net_device *dev)
void fib_release_info (struct fib_info *)
int fib_semantic_match (int type, struct fib_info *, const struct rt_key *, struct fib_result *)
fib_infofib_create_info (const struct rtmsg *r, struct kern_rta *rta, const struct nlmsghdr *, int *err)
int fib_nh_match (struct rtmsg *r, struct nlmsghdr *, struct kern_rta *rta, struct fib_info *fi)
int fib_dump_info (struct sk_buff *skb, u32 pid, u32 seq, int event, u8 tb_id, u8 type, u8 scope, void *dst, int dst_len, u8 tos, struct fib_info *fi)
int fib_sync_down (u32 local, struct net_device *dev, int force)
int fib_sync_up (struct net_device *dev)
int fib_convert_rtentry (int cmd, struct nlmsghdr *nl, struct rtmsg *rtm, struct kern_rta *rta, struct rtentry *r)
void fib_node_get_info (int type, int dead, struct fib_info *fi, u32 prefix, u32 mask, char *buffer)
u32 __fib_res_prefsrc (struct fib_result *res)
fib_tablefib_hash_init (int id)
void fib_combine_itag (u32 *itag, struct fib_result *res)
void free_fib_info (struct fib_info *fi)
void fib_info_put (struct fib_info *fi)
void fib_res_put (struct fib_result *res)

Variables

fib_tablelocal_table
fib_tablemain_table


Define Documentation

#define fib_advmss   fib_metrics[RTAX_ADVMSS-1]
 

Definition at line 72 of file ip_fib.h.

#define fib_dev   fib_nh[0].nh_dev
 

Definition at line 78 of file ip_fib.h.

#define fib_mtu   fib_metrics[RTAX_MTU-1]
 

Definition at line 69 of file ip_fib.h.

#define FIB_RES_DEV res   )     (FIB_RES_NH(res).nh_dev)
 

Definition at line 113 of file ip_fib.h.

Referenced by __fib_res_prefsrc(), fib_check_nh(), fib_validate_source(), ip_dev_find(), ip_route_input_slow(), and ip_route_output_slow().

#define FIB_RES_GW res   )     (FIB_RES_NH(res).nh_gw)
 

Definition at line 112 of file ip_fib.h.

Referenced by __fib_res_prefsrc(), fib_select_default(), ip_route_input_slow(), and rt_set_nexthop().

#define FIB_RES_NH res   )     ((res).fi->fib_nh[0])
 

Definition at line 106 of file ip_fib.h.

Referenced by fib_combine_itag(), fib_select_default(), fib_validate_source(), and rt_set_nexthop().

#define FIB_RES_OIF res   )     (FIB_RES_NH(res).nh_oif)
 

Definition at line 114 of file ip_fib.h.

Referenced by fib_check_nh(), and ip_route_input_slow().

#define FIB_RES_PREFSRC res   )     ((res).fi->fib_prefsrc ? : __fib_res_prefsrc(&res))
 

Definition at line 111 of file ip_fib.h.

Referenced by fib_validate_source(), ip_route_output_slow(), and ip_rt_get_source().

#define FIB_RES_RESET res   ) 
 

Definition at line 107 of file ip_fib.h.

Referenced by fib_semantic_match().

#define fib_rtt   fib_metrics[RTAX_RTT-1]
 

Definition at line 71 of file ip_fib.h.

#define fib_window   fib_metrics[RTAX_WINDOW-1]
 

Definition at line 70 of file ip_fib.h.


Function Documentation

u32 __fib_res_prefsrc struct fib_result res  ) 
 

Definition at line 635 of file fib_semantics.c.

References FIB_RES_DEV, FIB_RES_GW, inet_select_addr(), and fib_result::scope.

00636 { 00637 return inet_select_addr(FIB_RES_DEV(*res), FIB_RES_GW(*res), res->scope); 00638 }

void fib_combine_itag u32 *  itag,
struct fib_result res
[inline, static]
 

Definition at line 248 of file ip_fib.h.

References FIB_RES_NH.

Referenced by fib_validate_source().

00249 { 00250 #ifdef CONFIG_NET_CLS_ROUTE 00251 #ifdef CONFIG_IP_MULTIPLE_TABLES 00252 u32 rtag; 00253 #endif 00254 *itag = FIB_RES_NH(*res).nh_tclassid<<16; 00255 #ifdef CONFIG_IP_MULTIPLE_TABLES 00256 rtag = fib_rules_tclass(res); 00257 if (*itag == 0) 00258 *itag = (rtag<<16); 00259 *itag |= (rtag>>16); 00260 #endif 00261 #endif 00262 }

int fib_convert_rtentry int  cmd,
struct nlmsghdr nl,
struct rtmsg *  rtm,
struct kern_rta rta,
struct rtentry *  r
 

Definition at line 713 of file fib_semantics.c.

References __dev_get_by_name(), __in_dev_get(), bad_mask(), inet_addr_type(), inet_mask_len(), NLM_F_CREATE, NLM_F_REQUEST, nlmsghdr::nlmsg_flags, nlmsghdr::nlmsg_len, NLMSG_LENGTH, nlmsghdr::nlmsg_pid, nlmsghdr::nlmsg_seq, and nlmsghdr::nlmsg_type.

Referenced by ip_rt_ioctl().

00715 { 00716 int plen; 00717 u32 *ptr; 00718 00719 memset(rtm, 0, sizeof(*rtm)); 00720 memset(rta, 0, sizeof(*rta)); 00721 00722 if (r->rt_dst.sa_family != AF_INET) 00723 return -EAFNOSUPPORT; 00724 00725 /* Check mask for validity: 00726 a) it must be contiguous. 00727 b) destination must have all host bits clear. 00728 c) if application forgot to set correct family (AF_INET), 00729 reject request unless it is absolutely clear i.e. 00730 both family and mask are zero. 00731 */ 00732 plen = 32; 00733 ptr = &((struct sockaddr_in*)&r->rt_dst)->sin_addr.s_addr; 00734 if (!(r->rt_flags&RTF_HOST)) { 00735 u32 mask = ((struct sockaddr_in*)&r->rt_genmask)->sin_addr.s_addr; 00736 if (r->rt_genmask.sa_family != AF_INET) { 00737 if (mask || r->rt_genmask.sa_family) 00738 return -EAFNOSUPPORT; 00739 } 00740 if (bad_mask(mask, *ptr)) 00741 return -EINVAL; 00742 plen = inet_mask_len(mask); 00743 } 00744 00745 nl->nlmsg_flags = NLM_F_REQUEST; 00746 nl->nlmsg_pid = 0; 00747 nl->nlmsg_seq = 0; 00748 nl->nlmsg_len = NLMSG_LENGTH(sizeof(*rtm)); 00749 if (cmd == SIOCDELRT) { 00750 nl->nlmsg_type = RTM_DELROUTE; 00751 nl->nlmsg_flags = 0; 00752 } else { 00753 nl->nlmsg_type = RTM_NEWROUTE; 00754 nl->nlmsg_flags = NLM_F_REQUEST|NLM_F_CREATE; 00755 rtm->rtm_protocol = RTPROT_BOOT; 00756 } 00757 00758 rtm->rtm_dst_len = plen; 00759 rta->rta_dst = ptr; 00760 00761 if (r->rt_metric) { 00762 *(u32*)&r->rt_pad3 = r->rt_metric - 1; 00763 rta->rta_priority = (u32*)&r->rt_pad3; 00764 } 00765 if (r->rt_flags&RTF_REJECT) { 00766 rtm->rtm_scope = RT_SCOPE_HOST; 00767 rtm->rtm_type = RTN_UNREACHABLE; 00768 return 0; 00769 } 00770 rtm->rtm_scope = RT_SCOPE_NOWHERE; 00771 rtm->rtm_type = RTN_UNICAST; 00772 00773 if (r->rt_dev) { 00774 char *colon; 00775 struct net_device *dev; 00776 char devname[IFNAMSIZ]; 00777 00778 if (copy_from_user(devname, r->rt_dev, IFNAMSIZ-1)) 00779 return -EFAULT; 00780 devname[IFNAMSIZ-1] = 0; 00781 colon = strchr(devname, ':'); 00782 if (colon) 00783 *colon = 0; 00784 dev = __dev_get_by_name(devname); 00785 if (!dev) 00786 return -ENODEV; 00787 rta->rta_oif = &dev->ifindex; 00788 if (colon) { 00789 struct in_ifaddr *ifa; 00790 struct in_device *in_dev = __in_dev_get(dev); 00791 if (!in_dev) 00792 return -ENODEV; 00793 *colon = ':'; 00794 for (ifa = in_dev->ifa_list; ifa; ifa = ifa->ifa_next) 00795 if (strcmp(ifa->ifa_label, devname) == 0) 00796 break; 00797 if (ifa == NULL) 00798 return -ENODEV; 00799 rta->rta_prefsrc = &ifa->ifa_local; 00800 } 00801 } 00802 00803 ptr = &((struct sockaddr_in*)&r->rt_gateway)->sin_addr.s_addr; 00804 if (r->rt_gateway.sa_family == AF_INET && *ptr) { 00805 rta->rta_gw = ptr; 00806 if (r->rt_flags&RTF_GATEWAY && inet_addr_type(*ptr) == RTN_UNICAST) 00807 rtm->rtm_scope = RT_SCOPE_UNIVERSE; 00808 } 00809 00810 if (cmd == SIOCDELRT) 00811 return 0; 00812 00813 if (r->rt_flags&RTF_GATEWAY && rta->rta_gw == NULL) 00814 return -EINVAL; 00815 00816 if (rtm->rtm_scope == RT_SCOPE_NOWHERE) 00817 rtm->rtm_scope = RT_SCOPE_LINK; 00818 00819 if (r->rt_flags&(RTF_MTU|RTF_WINDOW|RTF_IRTT)) { 00820 struct rtattr *rec; 00821 struct rtattr *mx = kmalloc(RTA_LENGTH(3*RTA_LENGTH(4)), GFP_KERNEL); 00822 if (mx == NULL) 00823 return -ENOMEM; 00824 rta->rta_mx = mx; 00825 mx->rta_type = RTA_METRICS; 00826 mx->rta_len = RTA_LENGTH(0); 00827 if (r->rt_flags&RTF_MTU) { 00828 rec = (void*)((char*)mx + RTA_ALIGN(mx->rta_len)); 00829 rec->rta_type = RTAX_ADVMSS; 00830 rec->rta_len = RTA_LENGTH(4); 00831 mx->rta_len += RTA_LENGTH(4); 00832 *(u32*)RTA_DATA(rec) = r->rt_mtu - 40; 00833 } 00834 if (r->rt_flags&RTF_WINDOW) { 00835 rec = (void*)((char*)mx + RTA_ALIGN(mx->rta_len)); 00836 rec->rta_type = RTAX_WINDOW; 00837 rec->rta_len = RTA_LENGTH(4); 00838 mx->rta_len += RTA_LENGTH(4); 00839 *(u32*)RTA_DATA(rec) = r->rt_window; 00840 } 00841 if (r->rt_flags&RTF_IRTT) { 00842 rec = (void*)((char*)mx + RTA_ALIGN(mx->rta_len)); 00843 rec->rta_type = RTAX_RTT; 00844 rec->rta_len = RTA_LENGTH(4); 00845 mx->rta_len += RTA_LENGTH(4); 00846 *(u32*)RTA_DATA(rec) = r->rt_irtt<<3; 00847 } 00848 } 00849 return 0; 00850 }

struct fib_info* fib_create_info const struct rtmsg *  r,
struct kern_rta rta,
const struct nlmsghdr ,
int *  err
 

Definition at line 422 of file fib_semantics.c.

References change_nexthops, dev_get_by_index(), endfor_nexthops, fib_check_nh(), fib_find_info(), fib_info_cnt, fib_info_list, fib_info_lock, fib_info::fib_prev, free_fib_info(), inet_addr_type(), kern_rta::rta_dst, kern_rta::rta_flow, kern_rta::rta_gw, kern_rta::rta_mp, kern_rta::rta_mx, kern_rta::rta_oif, kern_rta::rta_prefsrc, and kern_rta::rta_priority.

Referenced by fn_hash_insert().

00424 { 00425 int err; 00426 struct fib_info *fi = NULL; 00427 struct fib_info *ofi; 00428 #ifdef CONFIG_IP_ROUTE_MULTIPATH 00429 int nhs = 1; 00430 #else 00431 const int nhs = 1; 00432 #endif 00433 00434 /* Fast check to catch the most weird cases */ 00435 if (fib_props[r->rtm_type].scope > r->rtm_scope) 00436 goto err_inval; 00437 00438 #ifdef CONFIG_IP_ROUTE_MULTIPATH 00439 if (rta->rta_mp) { 00440 nhs = fib_count_nexthops(rta->rta_mp); 00441 if (nhs == 0) 00442 goto err_inval; 00443 } 00444 #endif 00445 00446 fi = kmalloc(sizeof(*fi)+nhs*sizeof(struct fib_nh), GFP_KERNEL); 00447 err = -ENOBUFS; 00448 if (fi == NULL) 00449 goto failure; 00450 fib_info_cnt++; 00451 memset(fi, 0, sizeof(*fi)+nhs*sizeof(struct fib_nh)); 00452 00453 fi->fib_protocol = r->rtm_protocol; 00454 fi->fib_nhs = nhs; 00455 fi->fib_flags = r->rtm_flags; 00456 if (rta->rta_priority) 00457 fi->fib_priority = *rta->rta_priority; 00458 if (rta->rta_mx) { 00459 int attrlen = RTA_PAYLOAD(rta->rta_mx); 00460 struct rtattr *attr = RTA_DATA(rta->rta_mx); 00461 00462 while (RTA_OK(attr, attrlen)) { 00463 unsigned flavor = attr->rta_type; 00464 if (flavor) { 00465 if (flavor > RTAX_MAX) 00466 goto err_inval; 00467 fi->fib_metrics[flavor-1] = *(unsigned*)RTA_DATA(attr); 00468 } 00469 attr = RTA_NEXT(attr, attrlen); 00470 } 00471 } 00472 if (rta->rta_prefsrc) 00473 memcpy(&fi->fib_prefsrc, rta->rta_prefsrc, 4); 00474 00475 if (rta->rta_mp) { 00476 #ifdef CONFIG_IP_ROUTE_MULTIPATH 00477 if ((err = fib_get_nhs(fi, rta->rta_mp, r)) != 0) 00478 goto failure; 00479 if (rta->rta_oif && fi->fib_nh->nh_oif != *rta->rta_oif) 00480 goto err_inval; 00481 if (rta->rta_gw && memcmp(&fi->fib_nh->nh_gw, rta->rta_gw, 4)) 00482 goto err_inval; 00483 #ifdef CONFIG_NET_CLS_ROUTE 00484 if (rta->rta_flow && memcmp(&fi->fib_nh->nh_tclassid, rta->rta_flow, 4)) 00485 goto err_inval; 00486 #endif 00487 #else 00488 goto err_inval; 00489 #endif 00490 } else { 00491 struct fib_nh *nh = fi->fib_nh; 00492 if (rta->rta_oif) 00493 nh->nh_oif = *rta->rta_oif; 00494 if (rta->rta_gw) 00495 memcpy(&nh->nh_gw, rta->rta_gw, 4); 00496 #ifdef CONFIG_NET_CLS_ROUTE 00497 if (rta->rta_flow) 00498 memcpy(&nh->nh_tclassid, rta->rta_flow, 4); 00499 #endif 00500 nh->nh_flags = r->rtm_flags; 00501 #ifdef CONFIG_IP_ROUTE_MULTIPATH 00502 nh->nh_weight = 1; 00503 #endif 00504 } 00505 00506 #ifdef CONFIG_IP_ROUTE_NAT 00507 if (r->rtm_type == RTN_NAT) { 00508 if (rta->rta_gw == NULL || nhs != 1 || rta->rta_oif) 00509 goto err_inval; 00510 memcpy(&fi->fib_nh->nh_gw, rta->rta_gw, 4); 00511 goto link_it; 00512 } 00513 #endif 00514 00515 if (fib_props[r->rtm_type].error) { 00516 if (rta->rta_gw || rta->rta_oif || rta->rta_mp) 00517 goto err_inval; 00518 goto link_it; 00519 } 00520 00521 if (r->rtm_scope > RT_SCOPE_HOST) 00522 goto err_inval; 00523 00524 if (r->rtm_scope == RT_SCOPE_HOST) { 00525 struct fib_nh *nh = fi->fib_nh; 00526 00527 /* Local address is added. */ 00528 if (nhs != 1 || nh->nh_gw) 00529 goto err_inval; 00530 nh->nh_scope = RT_SCOPE_NOWHERE; 00531 nh->nh_dev = dev_get_by_index(fi->fib_nh->nh_oif); 00532 err = -ENODEV; 00533 if (nh->nh_dev == NULL) 00534 goto failure; 00535 } else { 00536 change_nexthops(fi) { 00537 if ((err = fib_check_nh(r, fi, nh)) != 0) 00538 goto failure; 00539 } endfor_nexthops(fi) 00540 } 00541 00542 if (fi->fib_prefsrc) { 00543 if (r->rtm_type != RTN_LOCAL || rta->rta_dst == NULL || 00544 memcmp(&fi->fib_prefsrc, rta->rta_dst, 4)) 00545 if (inet_addr_type(fi->fib_prefsrc) != RTN_LOCAL) 00546 goto err_inval; 00547 } 00548 00549 link_it: 00550 if ((ofi = fib_find_info(fi)) != NULL) { 00551 fi->fib_dead = 1; 00552 free_fib_info(fi); 00553 ofi->fib_treeref++; 00554 return ofi; 00555 } 00556 00557 fi->fib_treeref++; 00558 atomic_inc(&fi->fib_clntref); 00559 write_lock(&fib_info_lock); 00560 fi->fib_next = fib_info_list; 00561 fi->fib_prev = NULL; 00562 if (fib_info_list) 00563 fib_info_list->fib_prev = fi; 00564 fib_info_list = fi; 00565 write_unlock(&fib_info_lock); 00566 return fi; 00567 00568 err_inval: 00569 err = -EINVAL; 00570 00571 failure: 00572 *errp = err; 00573 if (fi) { 00574 fi->fib_dead = 1; 00575 free_fib_info(fi); 00576 } 00577 return NULL; 00578 }

int fib_dump_info struct sk_buff skb,
u32  pid,
u32  seq,
int  event,
u8  tb_id,
u8  type,
u8  scope,
void *  dst,
int  dst_len,
u8  tos,
struct fib_info fi
 

Definition at line 641 of file fib_semantics.c.

References sk_buff::data, endfor_nexthops, fib_info::fib_flags, fib_info::fib_metrics, fib_info::fib_nh, fib_info::fib_nhs, fib_info::fib_prefsrc, fib_info::fib_priority, fib_info::fib_protocol, for_nexthops, sk_buff::len, fib_nh::nh_gw, fib_nh::nh_oif, NLMSG_DATA, NLMSG_PUT, rtnetlink_put_metrics(), scope, skb_put(), skb_tailroom(), skb_trim(), and sk_buff::tail.

Referenced by fn_hash_dump_bucket(), and rtmsg_fib().

00644 { 00645 struct rtmsg *rtm; 00646 struct nlmsghdr *nlh; 00647 unsigned char *b = skb->tail; 00648 00649 nlh = NLMSG_PUT(skb, pid, seq, event, sizeof(*rtm)); 00650 rtm = NLMSG_DATA(nlh); 00651 rtm->rtm_family = AF_INET; 00652 rtm->rtm_dst_len = dst_len; 00653 rtm->rtm_src_len = 0; 00654 rtm->rtm_tos = tos; 00655 rtm->rtm_table = tb_id; 00656 rtm->rtm_type = type; 00657 rtm->rtm_flags = fi->fib_flags; 00658 rtm->rtm_scope = scope; 00659 if (rtm->rtm_dst_len) 00660 RTA_PUT(skb, RTA_DST, 4, dst); 00661 rtm->rtm_protocol = fi->fib_protocol; 00662 if (fi->fib_priority) 00663 RTA_PUT(skb, RTA_PRIORITY, 4, &fi->fib_priority); 00664 #ifdef CONFIG_NET_CLS_ROUTE 00665 if (fi->fib_nh[0].nh_tclassid) 00666 RTA_PUT(skb, RTA_FLOW, 4, &fi->fib_nh[0].nh_tclassid); 00667 #endif 00668 if (rtnetlink_put_metrics(skb, fi->fib_metrics) < 0) 00669 goto rtattr_failure; 00670 if (fi->fib_prefsrc) 00671 RTA_PUT(skb, RTA_PREFSRC, 4, &fi->fib_prefsrc); 00672 if (fi->fib_nhs == 1) { 00673 if (fi->fib_nh->nh_gw) 00674 RTA_PUT(skb, RTA_GATEWAY, 4, &fi->fib_nh->nh_gw); 00675 if (fi->fib_nh->nh_oif) 00676 RTA_PUT(skb, RTA_OIF, sizeof(int), &fi->fib_nh->nh_oif); 00677 } 00678 #ifdef CONFIG_IP_ROUTE_MULTIPATH 00679 if (fi->fib_nhs > 1) { 00680 struct rtnexthop *nhp; 00681 struct rtattr *mp_head; 00682 if (skb_tailroom(skb) <= RTA_SPACE(0)) 00683 goto rtattr_failure; 00684 mp_head = (struct rtattr*)skb_put(skb, RTA_SPACE(0)); 00685 00686 for_nexthops(fi) { 00687 if (skb_tailroom(skb) < RTA_ALIGN(RTA_ALIGN(sizeof(*nhp)) + 4)) 00688 goto rtattr_failure; 00689 nhp = (struct rtnexthop*)skb_put(skb, RTA_ALIGN(sizeof(*nhp))); 00690 nhp->rtnh_flags = nh->nh_flags & 0xFF; 00691 nhp->rtnh_hops = nh->nh_weight-1; 00692 nhp->rtnh_ifindex = nh->nh_oif; 00693 if (nh->nh_gw) 00694 RTA_PUT(skb, RTA_GATEWAY, 4, &nh->nh_gw); 00695 nhp->rtnh_len = skb->tail - (unsigned char*)nhp; 00696 } endfor_nexthops(fi); 00697 mp_head->rta_type = RTA_MULTIPATH; 00698 mp_head->rta_len = skb->tail - (u8*)mp_head; 00699 } 00700 #endif 00701 nlh->nlmsg_len = skb->tail - b; 00702 return skb->len; 00703 00704 nlmsg_failure: 00705 rtattr_failure: 00706 skb_trim(skb, b - skb->data); 00707 return -1; 00708 }

void fib_flush void   ) 
 

Definition at line 78 of file fib_frontend.c.

References fib_get_table(), local_table, main_table, rt_cache_flush(), and fib_table::tb_flush.

Referenced by fib_del_ifaddr(), fib_disable_ip(), and fn_hash_delete().

00079 { 00080 int flushed = 0; 00081 #ifdef CONFIG_IP_MULTIPLE_TABLES 00082 struct fib_table *tb; 00083 int id; 00084 00085 for (id = RT_TABLE_MAX; id>0; id--) { 00086 if ((tb = fib_get_table(id))==NULL) 00087 continue; 00088 flushed += tb->tb_flush(tb); 00089 } 00090 #else /* CONFIG_IP_MULTIPLE_TABLES */ 00091 flushed += main_table->tb_flush(main_table); 00092 flushed += local_table->tb_flush(local_table); 00093 #endif /* CONFIG_IP_MULTIPLE_TABLES */ 00094 00095 if (flushed) 00096 rt_cache_flush(-1); 00097 }

struct fib_table* fib_get_table int  id  )  [inline, static]
 

Definition at line 147 of file ip_fib.h.

References local_table, and main_table.

Referenced by fib_flush(), fib_lookup(), fib_new_table(), fib_select_default(), inet_dump_fib(), inet_rtm_delroute(), and ip_rt_ioctl().

00148 { 00149 if (id != RT_TABLE_LOCAL) 00150 return main_table; 00151 return local_table; 00152 }

struct fib_table* fib_hash_init int  id  ) 
 

Definition at line 929 of file fib_hash.c.

References fn_hash(), fn_hash_delete(), fn_hash_dump(), fn_hash_flush(), fn_hash_insert(), fn_hash_kmem, fn_hash_lookup(), fn_hash_select_default(), fib_table::tb_data, fib_table::tb_delete, fib_table::tb_dump, fib_table::tb_flush, fib_table::tb_get_info, fib_table::tb_id, fib_table::tb_insert, fib_table::tb_lookup, and fib_table::tb_select_default.

Referenced by ip_fib_init().

00931 { 00932 struct fib_table *tb; 00933 00934 if (fn_hash_kmem == NULL) 00935 fn_hash_kmem = kmem_cache_create("ip_fib_hash", 00936 sizeof(struct fib_node), 00937 0, SLAB_HWCACHE_ALIGN, 00938 NULL, NULL); 00939 00940 tb = kmalloc(sizeof(struct fib_table) + sizeof(struct fn_hash), GFP_KERNEL); 00941 if (tb == NULL) 00942 return NULL; 00943 00944 tb->tb_id = id; 00945 tb->tb_lookup = fn_hash_lookup; 00946 tb->tb_insert = fn_hash_insert; 00947 tb->tb_delete = fn_hash_delete; 00948 tb->tb_flush = fn_hash_flush; 00949 tb->tb_select_default = fn_hash_select_default; 00950 tb->tb_dump = fn_hash_dump; 00951 #ifdef CONFIG_PROC_FS 00952 tb->tb_get_info = fn_hash_get_info; 00953 #endif 00954 memset(tb->tb_data, 0, sizeof(struct fn_hash)); 00955 return tb; 00956 }

void fib_info_put struct fib_info fi  )  [inline, static]
 

Definition at line 266 of file ip_fib.h.

References fib_info::fib_clntref, and free_fib_info().

Referenced by fib_release_info(), fib_res_put(), fn_hash_select_default(), and ip_route_output_slow().

00267 { 00268 if (atomic_dec_and_test(&fi->fib_clntref)) 00269 free_fib_info(fi); 00270 }

int fib_lookup const struct rt_key key,
struct fib_result res
[inline, static]
 

Definition at line 159 of file ip_fib.h.

References local_table, main_table, and fib_table::tb_lookup.

00160 { 00161 if (local_table->tb_lookup(local_table, key, res) && 00162 main_table->tb_lookup(main_table, key, res)) 00163 return -ENETUNREACH; 00164 return 0; 00165 }

struct fib_table* fib_new_table int  id  )  [inline, static]
 

Definition at line 154 of file ip_fib.h.

References fib_get_table().

Referenced by fib_magic(), inet_rtm_newroute(), and ip_rt_ioctl().

00155 { 00156 return fib_get_table(id); 00157 }

int fib_nh_match struct rtmsg *  r,
struct nlmsghdr ,
struct kern_rta rta,
struct fib_info fi
 

Definition at line 253 of file fib_semantics.c.

References endfor_nexthops, fib_info::fib_nh, fib_info::fib_priority, for_nexthops, fib_nh::nh_gw, fib_nh::nh_oif, kern_rta::rta_gw, kern_rta::rta_mp, kern_rta::rta_oif, and kern_rta::rta_priority.

Referenced by fn_hash_delete().

00255 { 00256 #ifdef CONFIG_IP_ROUTE_MULTIPATH 00257 struct rtnexthop *nhp; 00258 int nhlen; 00259 #endif 00260 00261 if (rta->rta_priority && 00262 *rta->rta_priority != fi->fib_priority) 00263 return 1; 00264 00265 if (rta->rta_oif || rta->rta_gw) { 00266 if ((!rta->rta_oif || *rta->rta_oif == fi->fib_nh->nh_oif) && 00267 (!rta->rta_gw || memcmp(rta->rta_gw, &fi->fib_nh->nh_gw, 4) == 0)) 00268 return 0; 00269 return 1; 00270 } 00271 00272 #ifdef CONFIG_IP_ROUTE_MULTIPATH 00273 if (rta->rta_mp == NULL) 00274 return 0; 00275 nhp = RTA_DATA(rta->rta_mp); 00276 nhlen = RTA_PAYLOAD(rta->rta_mp); 00277 00278 for_nexthops(fi) { 00279 int attrlen = nhlen - sizeof(struct rtnexthop); 00280 u32 gw; 00281 00282 if (attrlen < 0 || (nhlen -= nhp->rtnh_len) < 0) 00283 return -EINVAL; 00284 if (nhp->rtnh_ifindex && nhp->rtnh_ifindex != nh->nh_oif) 00285 return 1; 00286 if (attrlen) { 00287 gw = fib_get_attr32(RTNH_DATA(nhp), attrlen, RTA_GATEWAY); 00288 if (gw && gw != nh->nh_gw) 00289 return 1; 00290 #ifdef CONFIG_NET_CLS_ROUTE 00291 gw = fib_get_attr32(RTNH_DATA(nhp), attrlen, RTA_FLOW); 00292 if (gw && gw != nh->nh_tclassid) 00293 return 1; 00294 #endif 00295 } 00296 nhp = RTNH_NEXT(nhp); 00297 } endfor_nexthops(fi); 00298 #endif 00299 return 0; 00300 }

void fib_node_get_info int  type,
int  dead,
struct fib_info fi,
u32  prefix,
u32  mask,
char *  buffer
 

void fib_release_info struct fib_info  ) 
 

Definition at line 123 of file fib_semantics.c.

References fib_info::fib_dead, fib_info_list, fib_info_lock, fib_info_put(), fib_info::fib_next, fib_info::fib_prev, and fib_info::fib_treeref.

Referenced by fn_free_node(), and fn_hash_insert().

00124 { 00125 write_lock(&fib_info_lock); 00126 if (fi && --fi->fib_treeref == 0) { 00127 if (fi->fib_next) 00128 fi->fib_next->fib_prev = fi->fib_prev; 00129 if (fi->fib_prev) 00130 fi->fib_prev->fib_next = fi->fib_next; 00131 if (fi == fib_info_list) 00132 fib_info_list = fi->fib_next; 00133 fi->fib_dead = 1; 00134 fib_info_put(fi); 00135 } 00136 write_unlock(&fib_info_lock); 00137 }

void fib_res_put struct fib_result res  )  [inline, static]
 

Definition at line 272 of file ip_fib.h.

References fib_result::fi, fib_info_put(), and fib_rule_put().

Referenced by fib_check_nh(), fib_validate_source(), inet_addr_type(), ip_dev_find(), ip_do_nat(), ip_route_input_slow(), ip_route_output_slow(), and ip_rt_get_source().

00273 { 00274 if (res->fi) 00275 fib_info_put(res->fi); 00276 #ifdef CONFIG_IP_MULTIPLE_TABLES 00277 if (res->r) 00278 fib_rule_put(res->r); 00279 #endif 00280 }

void fib_select_default const struct rt_key key,
struct fib_result res
[inline, static]
 

Definition at line 167 of file ip_fib.h.

References FIB_RES_GW, FIB_RES_NH, main_table, and fib_table::tb_select_default.

00168 { 00169 if (FIB_RES_GW(*res) && FIB_RES_NH(*res).nh_scope == RT_SCOPE_LINK) 00170 main_table->tb_select_default(main_table, key, res); 00171 }

void fib_select_multipath const struct rt_key key,
struct fib_result res
 

Referenced by ip_route_input_slow(), and ip_route_output_slow().

int fib_semantic_match int  type,
struct fib_info ,
const struct rt_key ,
struct fib_result
 

Definition at line 581 of file fib_semantics.c.

References endfor_nexthops, fib_result::fi, fib_info::fib_clntref, fib_info::fib_flags, fib_info::fib_nhs, FIB_RES_RESET, for_nexthops, fib_result::nh_sel, and rt_key::oif.

Referenced by fn_hash_lookup().

00582 { 00583 int err = fib_props[type].error; 00584 00585 if (err == 0) { 00586 if (fi->fib_flags&RTNH_F_DEAD) 00587 return 1; 00588 00589 res->fi = fi; 00590 00591 switch (type) { 00592 #ifdef CONFIG_IP_ROUTE_NAT 00593 case RTN_NAT: 00594 FIB_RES_RESET(*res); 00595 atomic_inc(&fi->fib_clntref); 00596 return 0; 00597 #endif 00598 case RTN_UNICAST: 00599 case RTN_LOCAL: 00600 case RTN_BROADCAST: 00601 case RTN_ANYCAST: 00602 case RTN_MULTICAST: 00603 for_nexthops(fi) { 00604 if (nh->nh_flags&RTNH_F_DEAD) 00605 continue; 00606 if (!key->oif || key->oif == nh->nh_oif) 00607 break; 00608 } 00609 #ifdef CONFIG_IP_ROUTE_MULTIPATH 00610 if (nhsel < fi->fib_nhs) { 00611 res->nh_sel = nhsel; 00612 atomic_inc(&fi->fib_clntref); 00613 return 0; 00614 } 00615 #else 00616 if (nhsel < 1) { 00617 atomic_inc(&fi->fib_clntref); 00618 return 0; 00619 } 00620 #endif 00621 endfor_nexthops(fi); 00622 res->fi = NULL; 00623 return 1; 00624 default: 00625 res->fi = NULL; 00626 printk(KERN_DEBUG "impossible 102\n"); 00627 return -EINVAL; 00628 } 00629 } 00630 return err; 00631 }

int fib_sync_down u32  local,
struct net_device dev,
int  force
 

Definition at line 861 of file fib_semantics.c.

References change_nexthops, endfor_fib_info, endfor_nexthops, fib_info::fib_flags, fib_info::fib_nhs, fib_info::fib_prefsrc, for_fib_info, and scope.

Referenced by fib_del_ifaddr(), and fib_disable_ip().

00862 { 00863 int ret = 0; 00864 int scope = RT_SCOPE_NOWHERE; 00865 00866 if (force) 00867 scope = -1; 00868 00869 for_fib_info() { 00870 if (local && fi->fib_prefsrc == local) { 00871 fi->fib_flags |= RTNH_F_DEAD; 00872 ret++; 00873 } else if (dev && fi->fib_nhs) { 00874 int dead = 0; 00875 00876 change_nexthops(fi) { 00877 if (nh->nh_flags&RTNH_F_DEAD) 00878 dead++; 00879 else if (nh->nh_dev == dev && 00880 nh->nh_scope != scope) { 00881 nh->nh_flags |= RTNH_F_DEAD; 00882 #ifdef CONFIG_IP_ROUTE_MULTIPATH 00883 spin_lock_bh(&fib_multipath_lock); 00884 fi->fib_power -= nh->nh_power; 00885 nh->nh_power = 0; 00886 spin_unlock_bh(&fib_multipath_lock); 00887 #endif 00888 dead++; 00889 } 00890 #ifdef CONFIG_IP_ROUTE_MULTIPATH 00891 if (force > 1 && nh->nh_dev == dev) { 00892 dead = fi->fib_nhs; 00893 break; 00894 } 00895 #endif 00896 } endfor_nexthops(fi) 00897 if (dead == fi->fib_nhs) { 00898 fi->fib_flags |= RTNH_F_DEAD; 00899 ret++; 00900 } 00901 } 00902 } endfor_fib_info(); 00903 return ret; 00904 }

int fib_sync_up struct net_device dev  ) 
 

Referenced by fib_inetaddr_event(), and fib_netdev_event().

int fib_validate_source u32  src,
u32  dst,
u8  tos,
int  oif,
struct net_device dev,
u32 *  spec_dst,
u32 *  itag
 

Definition at line 206 of file fib_frontend.c.

References __in_dev_get(), rt_key::dst, fib_result::fi, fib_combine_itag(), fib_lookup(), fib_info::fib_nhs, FIB_RES_DEV, FIB_RES_NH, FIB_RES_PREFSRC, fib_res_put(), net_device::ifindex, rt_key::iif, IN_DEV_LOOP, IN_DEV_RPFILTER, inet_select_addr(), inetdev_lock, rt_key::oif, rt_key::scope, rt_key::src, rt_key::tos, and fib_result::type.

Referenced by ip_route_input_mc(), and ip_route_input_slow().

00208 { 00209 struct in_device *in_dev; 00210 struct rt_key key; 00211 struct fib_result res; 00212 int no_addr, rpf, loop; 00213 int ret; 00214 00215 key.dst = src; 00216 key.src = dst; 00217 key.tos = tos; 00218 key.oif = 0; 00219 key.iif = oif; 00220 key.scope = RT_SCOPE_UNIVERSE; 00221 00222 no_addr = rpf = loop = 0; 00223 read_lock(&inetdev_lock); 00224 in_dev = __in_dev_get(dev); 00225 if (in_dev) { 00226 no_addr = in_dev->ifa_list == NULL; 00227 rpf = IN_DEV_RPFILTER(in_dev); 00228 loop = IN_DEV_LOOP(in_dev); 00229 } 00230 read_unlock(&inetdev_lock); 00231 00232 if (in_dev == NULL) 00233 goto e_inval; 00234 00235 if (fib_lookup(&key, &res)) 00236 goto last_resort; 00237 if (loop && res.type == RTN_LOCAL) { 00238 *spec_dst = FIB_RES_PREFSRC(res); 00239 fib_res_put(&res); 00240 return 0; 00241 } 00242 if (res.type != RTN_UNICAST) 00243 goto e_inval_res; 00244 *spec_dst = FIB_RES_PREFSRC(res); 00245 fib_combine_itag(itag, &res); 00246 #ifdef CONFIG_IP_ROUTE_MULTIPATH 00247 if (FIB_RES_DEV(res) == dev || res.fi->fib_nhs > 1) 00248 #else 00249 if (FIB_RES_DEV(res) == dev) 00250 #endif 00251 { 00252 ret = FIB_RES_NH(res).nh_scope >= RT_SCOPE_HOST; 00253 fib_res_put(&res); 00254 return ret; 00255 } 00256 fib_res_put(&res); 00257 if (no_addr) 00258 goto last_resort; 00259 if (rpf) 00260 goto e_inval; 00261 key.oif = dev->ifindex; 00262 00263 ret = 0; 00264 if (fib_lookup(&key, &res) == 0) { 00265 if (res.type == RTN_UNICAST) { 00266 *spec_dst = FIB_RES_PREFSRC(res); 00267 ret = FIB_RES_NH(res).nh_scope >= RT_SCOPE_HOST; 00268 } 00269 fib_res_put(&res); 00270 } 00271 return ret; 00272 00273 last_resort: 00274 if (rpf) 00275 goto e_inval; 00276 *spec_dst = inet_select_addr(dev, 0, RT_SCOPE_UNIVERSE); 00277 *itag = 0; 00278 return 0; 00279 00280 e_inval_res: 00281 fib_res_put(&res); 00282 e_inval: 00283 return -EINVAL; 00284 }

void free_fib_info struct fib_info fi  ) 
 

Definition at line 108 of file fib_semantics.c.

References change_nexthops, dev_put(), endfor_nexthops, fib_info::fib_dead, and fib_info_cnt.

Referenced by fib_create_info(), and fib_info_put().

00109 { 00110 if (fi->fib_dead == 0) { 00111 printk("Freeing alive fib_info %p\n", fi); 00112 return; 00113 } 00114 change_nexthops(fi) { 00115 if (nh->nh_dev) 00116 dev_put(nh->nh_dev); 00117 nh->nh_dev = NULL; 00118 } endfor_nexthops(fi); 00119 fib_info_cnt--; 00120 kfree(fi); 00121 }

int inet_dump_fib struct sk_buff skb,
struct netlink_callback cb
 

Definition at line 387 of file fib_frontend.c.

References netlink_callback::args, fib_get_table(), ip_rt_dump(), sk_buff::len, netlink_callback::nlh, NLMSG_DATA, NLMSG_PAYLOAD, and RT_TABLE_MIN.

00388 { 00389 int t; 00390 int s_t; 00391 struct fib_table *tb; 00392 00393 if (NLMSG_PAYLOAD(cb->nlh, 0) >= sizeof(struct rtmsg) && 00394 ((struct rtmsg*)NLMSG_DATA(cb->nlh))->rtm_flags&RTM_F_CLONED) 00395 return ip_rt_dump(skb, cb); 00396 00397 s_t = cb->args[0]; 00398 if (s_t == 0) 00399 s_t = cb->args[0] = RT_TABLE_MIN; 00400 00401 for (t=s_t; t<=RT_TABLE_MAX; t++) { 00402 if (t < s_t) continue; 00403 if (t > s_t) 00404 memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(cb->args[0])); 00405 if ((tb = fib_get_table(t))==NULL) 00406 continue; 00407 if (tb->tb_dump(tb, skb, cb) < 0) 00408 break; 00409 } 00410 00411 cb->args[0] = t; 00412 00413 return skb->len; 00414 }

int inet_rtm_delroute struct sk_buff skb,
struct nlmsghdr nlh,
void *  arg
 

Definition at line 357 of file fib_frontend.c.

References fib_get_table(), inet_check_attr(), NETLINK_CB, and NLMSG_DATA.

00358 { 00359 struct fib_table * tb; 00360 struct rtattr **rta = arg; 00361 struct rtmsg *r = NLMSG_DATA(nlh); 00362 00363 if (inet_check_attr(r, rta)) 00364 return -EINVAL; 00365 00366 tb = fib_get_table(r->rtm_table); 00367 if (tb) 00368 return tb->tb_delete(tb, r, (struct kern_rta*)rta, nlh, &NETLINK_CB(skb)); 00369 return -ESRCH; 00370 }

int inet_rtm_getroute struct sk_buff skb,
struct nlmsghdr nlh,
void *  arg
 

Definition at line 2240 of file route.c.

References __dev_get_by_index(), alloc_skb(), ip_route_input(), ip_route_output(), kfree_skb(), MAX_HEADER, NETLINK_CB, netlink_unicast(), NLMSG_DATA, NLMSG_GOODSIZE, nlmsghdr::nlmsg_seq, rt_fill_info(), rtnl, and skb_reserve().

02241 { 02242 struct rtattr **rta = arg; 02243 struct rtmsg *rtm = NLMSG_DATA(nlh); 02244 struct rtable *rt = NULL; 02245 u32 dst = 0; 02246 u32 src = 0; 02247 int iif = 0; 02248 int err = -ENOBUFS; 02249 struct sk_buff *skb; 02250 02251 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); 02252 if (!skb) 02253 goto out; 02254 02255 /* Reserve room for dummy headers, this skb can pass 02256 through good chunk of routing engine. 02257 */ 02258 skb->mac.raw = skb->data; 02259 skb_reserve(skb, MAX_HEADER + sizeof(struct iphdr)); 02260 02261 if (rta[RTA_SRC - 1]) 02262 memcpy(&src, RTA_DATA(rta[RTA_SRC - 1]), 4); 02263 if (rta[RTA_DST - 1]) 02264 memcpy(&dst, RTA_DATA(rta[RTA_DST - 1]), 4); 02265 if (rta[RTA_IIF - 1]) 02266 memcpy(&iif, RTA_DATA(rta[RTA_IIF - 1]), sizeof(int)); 02267 02268 if (iif) { 02269 struct net_device *dev = __dev_get_by_index(iif); 02270 err = -ENODEV; 02271 if (!dev) 02272 goto out_free; 02273 skb->protocol = htons(ETH_P_IP); 02274 skb->dev = dev; 02275 local_bh_disable(); 02276 err = ip_route_input(skb, dst, src, rtm->rtm_tos, dev); 02277 local_bh_enable(); 02278 rt = (struct rtable*)skb->dst; 02279 if (!err && rt->u.dst.error) 02280 err = -rt->u.dst.error; 02281 } else { 02282 int oif = 0; 02283 if (rta[RTA_OIF - 1]) 02284 memcpy(&oif, RTA_DATA(rta[RTA_OIF - 1]), sizeof(int)); 02285 err = ip_route_output(&rt, dst, src, rtm->rtm_tos, oif); 02286 } 02287 if (err) 02288 goto out_free; 02289 02290 skb->dst = &rt->u.dst; 02291 if (rtm->rtm_flags & RTM_F_NOTIFY) 02292 rt->rt_flags |= RTCF_NOTIFY; 02293 02294 NETLINK_CB(skb).dst_pid = NETLINK_CB(in_skb).pid; 02295 02296 err = rt_fill_info(skb, NETLINK_CB(in_skb).pid, nlh->nlmsg_seq, 02297 RTM_NEWROUTE, 0); 02298 if (!err) 02299 goto out_free; 02300 if (err < 0) { 02301 err = -EMSGSIZE; 02302 goto out_free; 02303 } 02304 02305 err = netlink_unicast(rtnl, skb, NETLINK_CB(in_skb).pid, MSG_DONTWAIT); 02306 if (err > 0) 02307 err = 0; 02308 out: return err; 02309 02310 out_free: 02311 kfree_skb(skb); 02312 goto out; 02313 }

int inet_rtm_newroute struct sk_buff skb,
struct nlmsghdr nlh,
void *  arg
 

Definition at line 372 of file fib_frontend.c.

References fib_new_table(), inet_check_attr(), NETLINK_CB, and NLMSG_DATA.

00373 { 00374 struct fib_table * tb; 00375 struct rtattr **rta = arg; 00376 struct rtmsg *r = NLMSG_DATA(nlh); 00377 00378 if (inet_check_attr(r, rta)) 00379 return -EINVAL; 00380 00381 tb = fib_new_table(r->rtm_table); 00382 if (tb) 00383 return tb->tb_insert(tb, r, (struct kern_rta*)rta, nlh, &NETLINK_CB(skb)); 00384 return -ENOBUFS; 00385 }

int ip_fib_check_default u32  gw,
struct net_device dev
 

Definition at line 180 of file fib_semantics.c.

References endfor_fib_info, endfor_nexthops, fib_info_lock, for_fib_info, and for_nexthops.

Referenced by ip_rt_redirect().

00181 { 00182 read_lock(&fib_info_lock); 00183 for_fib_info() { 00184 if (fi->fib_flags & RTNH_F_DEAD) 00185 continue; 00186 for_nexthops(fi) { 00187 if (nh->nh_dev == dev && nh->nh_gw == gw && 00188 nh->nh_scope == RT_SCOPE_LINK && 00189 !(nh->nh_flags&RTNH_F_DEAD)) { 00190 read_unlock(&fib_info_lock); 00191 return 0; 00192 } 00193 } endfor_nexthops(fi); 00194 } endfor_fib_info(); 00195 read_unlock(&fib_info_lock); 00196 return -1; 00197 }

void ip_fib_init void   ) 
 

Definition at line 650 of file fib_frontend.c.

References fib_hash_init(), fib_inetaddr_notifier, fib_netdev_notifier, fib_rules_init(), local_table, main_table, register_inetaddr_notifier(), and register_netdevice_notifier().

Referenced by ip_rt_init().

00651 { 00652 #ifdef CONFIG_PROC_FS 00653 proc_net_create("route",0,fib_get_procinfo); 00654 #endif /* CONFIG_PROC_FS */ 00655 00656 #ifndef CONFIG_IP_MULTIPLE_TABLES 00657 local_table = fib_hash_init(RT_TABLE_LOCAL); 00658 main_table = fib_hash_init(RT_TABLE_MAIN); 00659 #else 00660 fib_rules_init(); 00661 #endif 00662 00663 register_netdevice_notifier(&fib_netdev_notifier); 00664 register_inetaddr_notifier(&fib_inetaddr_notifier); 00665 }


Variable Documentation

struct fib_table* local_table
 

Definition at line 54 of file fib_frontend.c.

Referenced by fib_flush(), fib_get_table(), fib_lookup(), inet_addr_type(), ip_dev_find(), and ip_fib_init().

struct fib_table* main_table
 

Definition at line 55 of file fib_frontend.c.

Referenced by fib_flush(), fib_get_table(), fib_lookup(), fib_select_default(), and ip_fib_init().


Generated on Wed Dec 1 21:25:35 2004 for Linux 2.4.23 Networking by doxygen 1.3.8