^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * nexthops in net namespaces
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #ifndef __NETNS_NEXTHOP_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) #define __NETNS_NEXTHOP_H__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #include <linux/rbtree.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) struct netns_nexthop {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) struct rb_root rb_root; /* tree of nexthops by id */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) struct hlist_head *devhash; /* nexthops by device */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) unsigned int seq; /* protected by rtnl_mutex */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) u32 last_id_allocated;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) struct blocking_notifier_head notifier_chain;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #endif