forked from thom311/libnl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finally got rid of all the qdisc/class/cls code duplication in the tc module API. The API takes care of allocation/freeing the tc object specific data. I hope I got it right this time.
- Loading branch information
Showing
64 changed files
with
2,142 additions
and
3,079 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
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 |
---|---|---|
|
@@ -6,36 +6,18 @@ | |
* License as published by the Free Software Foundation version 2.1 | ||
* of the License. | ||
* | ||
* Copyright (c) 2008-2010 Thomas Graf <[email protected]> | ||
* Copyright (c) 2008-2011 Thomas Graf <[email protected]> | ||
*/ | ||
|
||
#ifndef __NETLINK_CLI_QDISC_H_ | ||
#define __NETLINK_CLI_QDISC_H_ | ||
|
||
#include <netlink/route/qdisc.h> | ||
#include <netlink/route/qdisc-modules.h> | ||
|
||
#define nl_cli_qdisc_alloc_cache(sk) \ | ||
nl_cli_alloc_cache((sk), "queueing disciplines", \ | ||
rtnl_qdisc_alloc_cache) | ||
|
||
struct nl_cli_qdisc_module | ||
{ | ||
const char * qm_name; | ||
struct rtnl_qdisc_ops * qm_ops; | ||
struct rtnl_class_ops * qm_class_ops; | ||
void (*qm_parse_qdisc_argv)(struct rtnl_qdisc *, int, char **); | ||
void (*qm_parse_class_argv)(struct rtnl_class *, int, char **); | ||
struct nl_list_head qm_list; | ||
}; | ||
|
||
extern struct nl_cli_qdisc_module *nl_cli_qdisc_lookup(struct rtnl_qdisc_ops *); | ||
extern struct nl_cli_qdisc_module *nl_cli_qdisc_lookup_by_class(struct rtnl_class_ops *); | ||
extern void nl_cli_qdisc_register(struct nl_cli_qdisc_module *); | ||
extern void nl_cli_qdisc_unregister(struct nl_cli_qdisc_module *); | ||
|
||
extern struct rtnl_qdisc *nl_cli_qdisc_alloc(void); | ||
|
||
extern void nl_cli_qdisc_parse_kind(struct rtnl_qdisc *, char *); | ||
|
||
#endif |
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 |
---|---|---|
|
@@ -6,13 +6,13 @@ | |
* License as published by the Free Software Foundation version 2.1 | ||
* of the License. | ||
* | ||
* Copyright (c) 2010 Thomas Graf <[email protected]> | ||
* Copyright (c) 2010-2011 Thomas Graf <[email protected]> | ||
*/ | ||
|
||
#ifndef __NETLINK_CLI_TC_H_ | ||
#define __NETLINK_CLI_TC_H_ | ||
|
||
#include <netlink/route/tc.h> | ||
#include <netlink/route/tc-api.h> | ||
|
||
extern void nl_cli_tc_parse_dev(struct rtnl_tc *, struct nl_cache *, char *); | ||
extern void nl_cli_tc_parse_parent(struct rtnl_tc *, char *); | ||
|
@@ -21,5 +21,19 @@ extern void nl_cli_tc_parse_mtu(struct rtnl_tc *, char *); | |
extern void nl_cli_tc_parse_mpu(struct rtnl_tc *, char *); | ||
extern void nl_cli_tc_parse_overhead(struct rtnl_tc *, char *); | ||
extern void nl_cli_tc_parse_linktype(struct rtnl_tc *, char *); | ||
extern void nl_cli_tc_parse_kind(struct rtnl_tc *, char *); | ||
|
||
struct nl_cli_tc_module | ||
{ | ||
const char * tm_name; | ||
enum rtnl_tc_type tm_type; | ||
struct rtnl_tc_ops * tm_ops; | ||
void (*tm_parse_argv)(struct rtnl_tc *, int, char **); | ||
struct nl_list_head tm_list; | ||
}; | ||
|
||
extern struct nl_cli_tc_module *nl_cli_tc_lookup(struct rtnl_tc_ops *); | ||
extern void nl_cli_tc_register(struct nl_cli_tc_module *); | ||
extern void nl_cli_tc_unregister(struct nl_cli_tc_module *); | ||
|
||
#endif |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.