In this commit, we export the following helpers from bearer: print_bearer_media() and cmd_get_unique_bearer_name(). These will be used by link monitor used in subsequent commits.
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvara...@ericsson.com> --- tipc/bearer.c | 14 ++++++-------- tipc/bearer.h | 3 +++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tipc/bearer.c b/tipc/bearer.c index 89477c09a68f..680e8974f8dd 100644 --- a/tipc/bearer.c +++ b/tipc/bearer.c @@ -38,8 +38,6 @@ struct tipc_bearer_ops { static int cmd_find_bearer_ops(const struct cmd *cmd, struct cmdl *cmdl, struct opt *opts, struct tipc_bearer_ops **bops); -static int cmd_get_unique_bearer_name(const struct cmd *cmd, struct cmdl *cmdl, - struct opt *opts, char *bname); static void _print_bearer_opts(void) { @@ -50,7 +48,7 @@ static void _print_bearer_opts(void) " window - Bearer link window\n"); } -static void _print_bearer_media(void) +void print_bearer_media(void) { fprintf(stderr, "\nMEDIA\n" @@ -229,7 +227,7 @@ static void cmd_bearer_enable_help(struct cmdl *cmdl) " domain DOMAIN - Discovery domain\n" " priority PRIORITY - Bearer priority\n", cmdl->argv[0]); - _print_bearer_media(); + print_bearer_media(); } static int cmd_bearer_enable(struct nlmsghdr *nlh, const struct cmd *cmd, @@ -318,7 +316,7 @@ static void cmd_bearer_disable_help(struct cmdl *cmdl) { fprintf(stderr, "Usage: %s bearer disable media MEDIA ARGS...\n", cmdl->argv[0]); - _print_bearer_media(); + print_bearer_media(); } static int cmd_bearer_disable(struct nlmsghdr *nlh, const struct cmd *cmd, @@ -371,7 +369,7 @@ static void cmd_bearer_set_help(struct cmdl *cmdl) fprintf(stderr, "Usage: %s bearer set OPTION media MEDIA ARGS...\n", cmdl->argv[0]); _print_bearer_opts(); - _print_bearer_media(); + print_bearer_media(); } static void cmd_bearer_set_udp_help(struct cmdl *cmdl) @@ -484,7 +482,7 @@ static void cmd_bearer_get_help(struct cmdl *cmdl) fprintf(stderr, "Usage: %s bearer get OPTION media MEDIA ARGS...\n", cmdl->argv[0]); _print_bearer_opts(); - _print_bearer_media(); + print_bearer_media(); } static void cmd_bearer_get_udp_help(struct cmdl *cmdl) @@ -646,7 +644,7 @@ static int cmd_bearer_list(struct nlmsghdr *nlh, const struct cmd *cmd, return msg_dumpit(nlh, bearer_list_cb, NULL); } -static int cmd_get_unique_bearer_name(const struct cmd *cmd, struct cmdl *cmdl, +int cmd_get_unique_bearer_name(const struct cmd *cmd, struct cmdl *cmdl, struct opt *opts, char *bname) { char *media; diff --git a/tipc/bearer.h b/tipc/bearer.h index 9459d65ebb5f..c2137a257b49 100644 --- a/tipc/bearer.h +++ b/tipc/bearer.h @@ -18,5 +18,8 @@ extern int help_flag; int cmd_bearer(struct nlmsghdr *nlh, const struct cmd *cmd, struct cmdl *cmdl, void *data); void cmd_bearer_help(struct cmdl *cmdl); +void print_bearer_media(void); +int cmd_get_unique_bearer_name(const struct cmd *cmd, struct cmdl *cmdl, + struct opt *opts, char *bname); #endif -- 2.1.4 ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e _______________________________________________ tipc-discussion mailing list tipc-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tipc-discussion