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 | 16 +++++++---------
 tipc/bearer.h |  3 +++
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/tipc/bearer.c b/tipc/bearer.c
index ce1494c11c27..7406342fced0 100644
--- a/tipc/bearer.c
+++ b/tipc/bearer.c
@@ -39,8 +39,6 @@ struct tipc_bearer_ops {
 static int cmd_find_bearer_ops(const struct cmd *cmd, struct cmdl *cmdl,
                               struct opt *opts,
                               const 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)
 {
@@ -51,7 +49,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"
@@ -230,7 +228,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,
@@ -319,7 +317,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,
@@ -372,7 +370,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)
@@ -485,7 +483,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)
@@ -647,8 +645,8 @@ 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,
-                                     struct opt *opts, char *bname)
+int cmd_get_unique_bearer_name(const struct cmd *cmd, struct cmdl *cmdl,
+                              struct opt *opts, char *bname)
 {
        char *media;
        char *identifier;
diff --git a/tipc/bearer.h b/tipc/bearer.h
index 9459d65ebb5f..dc0f486db39b 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.http://sdm.link/zohodev2dev
_______________________________________________
tipc-discussion mailing list
tipc-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tipc-discussion

Reply via email to