typedefint (*lookup_by_table_id_t)(struct net *net, u32 table_d);
/** * struct l3mdev_ops - l3mdev operations * * @l3mdev_fib_table: Get FIB table id to use for lookups * * @l3mdev_l3_rcv: Hook in L3 receive path * * @l3mdev_l3_out: Hook in L3 output path * * @l3mdev_link_scope_lookup: IPv6 lookup for linklocal and mcast destinations
*/
staticinlineint l3mdev_master_ifindex_by_index(struct net *net, int ifindex)
{ struct net_device *dev; int rc = 0;
if (ifindex) {
rcu_read_lock();
dev = dev_get_by_index_rcu(net, ifindex); if (dev)
rc = l3mdev_master_ifindex_rcu(dev);
rcu_read_unlock();
}
return rc;
}
staticinline struct net_device *l3mdev_master_dev_rcu(conststruct net_device *_dev)
{ /* netdev_master_upper_dev_get_rcu calls * list_first_or_null_rcu to walk the upper dev list. * list_first_or_null_rcu does not handle a const arg. We aren't * making changes, just want the master device from that list so * typecast to remove the const
*/ struct net_device *dev = (struct net_device *)_dev; struct net_device *master;
int l3mdev_master_upper_ifindex_by_index_rcu(struct net *net, int ifindex); staticinline int l3mdev_master_upper_ifindex_by_index(struct net *net, int ifindex)
{
rcu_read_lock();
ifindex = l3mdev_master_upper_ifindex_by_index_rcu(net, ifindex);
rcu_read_unlock();
return ifindex;
}
u32 l3mdev_fib_table_rcu(conststruct net_device *dev);
u32 l3mdev_fib_table_by_index(struct net *net, int ifindex); staticinline u32 l3mdev_fib_table(conststruct net_device *dev)
{
u32 tb_id;
staticinlineint l3mdev_master_ifindex_by_index(struct net *net, int ifindex)
{ return 0;
}
staticinline int l3mdev_master_upper_ifindex_by_index_rcu(struct net *net, int ifindex)
{ return 0;
} staticinline int l3mdev_master_upper_ifindex_by_index(struct net *net, int ifindex)
{ return 0;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.