summaryrefslogtreecommitdiff
path: root/genl
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2018-10-19 13:42:36 -0700
committerDavid Ahern <dsahern@gmail.com>2018-10-22 09:43:48 -0700
commitcd554f2c2f67a56248333f221efe3d841a0173ec (patch)
treed0a4cf5213078123b686bf5f7b4eb64c21436a49 /genl
parent9d16a1de1faa19278fe90838a9d4f62641ac5959 (diff)
downloadiproute2-cd554f2c2f67a56248333f221efe3d841a0173ec.tar.gz
Tree wide: Drop sockaddr_nl arg
No function, filter, or print function uses the sockaddr_nl arg, so just drop it. Signed-off-by: David Ahern <dsahern@gmail.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Diffstat (limited to 'genl')
-rw-r--r--genl/ctrl.c10
-rw-r--r--genl/genl.c3
-rw-r--r--genl/genl_utils.h3
3 files changed, 6 insertions, 10 deletions
diff --git a/genl/ctrl.c b/genl/ctrl.c
index 0d9c5f25..6133336a 100644
--- a/genl/ctrl.c
+++ b/genl/ctrl.c
@@ -174,8 +174,7 @@ static int print_ctrl_grp(FILE *fp, struct rtattr *arg, __u32 ctrl_ver)
/*
* The controller sends one nlmsg per family
*/
-static int print_ctrl(const struct sockaddr_nl *who,
- struct rtnl_ctrl_data *ctrl,
+static int print_ctrl(struct rtnl_ctrl_data *ctrl,
struct nlmsghdr *n, void *arg)
{
struct rtattr *tb[CTRL_ATTR_MAX + 1];
@@ -279,10 +278,9 @@ static int print_ctrl(const struct sockaddr_nl *who,
return 0;
}
-static int print_ctrl2(const struct sockaddr_nl *who,
- struct nlmsghdr *n, void *arg)
+static int print_ctrl2(struct nlmsghdr *n, void *arg)
{
- return print_ctrl(who, NULL, n, arg);
+ return print_ctrl(NULL, n, arg);
}
static int ctrl_list(int cmd, int argc, char **argv)
@@ -339,7 +337,7 @@ static int ctrl_list(int cmd, int argc, char **argv)
goto ctrl_done;
}
- if (print_ctrl2(NULL, answer, (void *) stdout) < 0) {
+ if (print_ctrl2(answer, (void *) stdout) < 0) {
fprintf(stderr, "Dump terminated\n");
goto ctrl_done;
}
diff --git a/genl/genl.c b/genl/genl.c
index 253c4450..aba3c13a 100644
--- a/genl/genl.c
+++ b/genl/genl.c
@@ -34,8 +34,7 @@ static void *BODY;
static struct genl_util *genl_list;
-static int print_nofopt(const struct sockaddr_nl *who, struct nlmsghdr *n,
- void *arg)
+static int print_nofopt(struct nlmsghdr *n, void *arg)
{
fprintf((FILE *) arg, "unknown genl type ..\n");
return 0;
diff --git a/genl/genl_utils.h b/genl/genl_utils.h
index 3de0da34..cc1f3fb7 100644
--- a/genl/genl_utils.h
+++ b/genl/genl_utils.h
@@ -10,8 +10,7 @@ struct genl_util
struct genl_util *next;
char name[16];
int (*parse_genlopt)(struct genl_util *fu, int argc, char **argv);
- int (*print_genlopt)(const struct sockaddr_nl *who,
- struct nlmsghdr *n, void *arg);
+ int (*print_genlopt)(struct nlmsghdr *n, void *arg);
};
int genl_ctrl_resolve_family(const char *family);