-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
669 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* SPDX-License-Identifier: LGPL-2.1-only */ | ||
/* | ||
* Copyright (c) 2022 Stanislav Zaikin <[email protected]> | ||
*/ | ||
|
||
#ifndef NETLINK_ROUTE_NEXTHOP2_H_ | ||
#define NETLINK_ROUTE_NEXTHOP2_H_ | ||
|
||
#include <netlink/netlink.h> | ||
#include <netlink/addr.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
struct rtnl_nh; | ||
|
||
typedef struct nl_nh_group_info { | ||
uint32_t nh_id; /*!< VLAN number */ | ||
uint8_t weight; /*!< VLAN QOS value */ | ||
} nl_nh_group_info_t; | ||
|
||
typedef struct nl_nh_group { | ||
int ce_refcnt; | ||
unsigned size; | ||
nl_nh_group_info_t *entries; | ||
} nl_nh_group_t; | ||
|
||
extern int rtnl_nh_alloc_cache(struct nl_sock *sk, int family, | ||
struct nl_cache **result); | ||
extern struct rtnl_nh *rtnl_nh_alloc(void); | ||
extern struct rtnl_nh *rtnl_nh_clone(struct rtnl_nh *); | ||
extern void rtnl_nh_put(struct rtnl_nh *); | ||
|
||
extern struct rtnl_nh *rtnl_nh_get(struct nl_cache *cache, int nhid); | ||
|
||
extern int rtnl_nh_compare(struct rtnl_nh *, struct rtnl_nh *, uint32_t, int); | ||
|
||
extern void rtnl_nh_dump(struct rtnl_nh *, struct nl_dump_params *); | ||
|
||
extern int rtnl_nh_set_gateway(struct rtnl_nh *, struct nl_addr *); | ||
extern struct nl_addr *rtnl_nh_get_gateway(struct rtnl_nh *); | ||
|
||
extern int rtnl_nh_set_fdb(struct rtnl_nh *, int value); | ||
extern int rtnl_nh_get_fdb(struct rtnl_nh *); | ||
|
||
extern int rtnl_nh_get_group_entry(struct rtnl_nh *, int n); | ||
extern int rtnl_nh_get_group_size(struct rtnl_nh *); | ||
|
||
extern int rtnl_nh_get_id(struct rtnl_nh *); | ||
extern int rtnl_nh_get_oif(struct rtnl_nh *); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif |
Oops, something went wrong.