summaryrefslogtreecommitdiff
path: root/src/platform/nm-netlink.h
diff options
context:
space:
mode:
authorJavier Arteaga <jarteaga@jbeta.is>2018-03-29 21:00:28 +0100
committerThomas Haller <thaller@redhat.com>2018-03-30 22:09:04 +0200
commit56e79a4e07e70f7786aa5bcfb6d2aedf082c1cd6 (patch)
tree08c6d978feb6d1ec1f216d0451e7c04f8ed047e9 /src/platform/nm-netlink.h
parentddc2c5f215d2d817329aabe776551eae87c293ab (diff)
platform: move genl_ctrl_resolve to nm-netlink.c
Move genl_ctrl_resolve out of the wifi code so it can be reused by other interfaces based on genetlink. https://mail.gnome.org/archives/networkmanager-list/2018-March/msg00044.html
Diffstat (limited to 'src/platform/nm-netlink.h')
-rw-r--r--src/platform/nm-netlink.h32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/platform/nm-netlink.h b/src/platform/nm-netlink.h
index 1c89c18808..57b89e1e26 100644
--- a/src/platform/nm-netlink.h
+++ b/src/platform/nm-netlink.h
@@ -409,21 +409,6 @@ struct nlmsghdr *nlmsg_put (struct nl_msg *n, uint32_t pid, uint32_t seq,
/*****************************************************************************/
-void *genlmsg_put (struct nl_msg *msg, uint32_t port, uint32_t seq, int family,
- int hdrlen, int flags, uint8_t cmd, uint8_t version);
-void *genlmsg_data (const struct genlmsghdr *gnlh);
-void *genlmsg_user_hdr (const struct genlmsghdr *gnlh);
-struct genlmsghdr *genlmsg_hdr (struct nlmsghdr *nlh);
-void *genlmsg_user_data (const struct genlmsghdr *gnlh, const int hdrlen);
-struct nlattr *genlmsg_attrdata (const struct genlmsghdr *gnlh, int hdrlen);
-int genlmsg_len (const struct genlmsghdr *gnlh);
-int genlmsg_attrlen (const struct genlmsghdr *gnlh, int hdrlen);
-int genlmsg_valid_hdr (struct nlmsghdr *nlh, int hdrlen);
-int genlmsg_parse (struct nlmsghdr *nlh, int hdrlen, struct nlattr *tb[],
- int maxtype, const struct nla_policy *policy);
-
-/*****************************************************************************/
-
#define NL_AUTO_PORT 0
#define NL_AUTO_SEQ 0
@@ -506,4 +491,21 @@ int nl_socket_set_ext_ack (struct nl_sock *sk, gboolean enable);
/*****************************************************************************/
+void *genlmsg_put (struct nl_msg *msg, uint32_t port, uint32_t seq, int family,
+ int hdrlen, int flags, uint8_t cmd, uint8_t version);
+void *genlmsg_data (const struct genlmsghdr *gnlh);
+void *genlmsg_user_hdr (const struct genlmsghdr *gnlh);
+struct genlmsghdr *genlmsg_hdr (struct nlmsghdr *nlh);
+void *genlmsg_user_data (const struct genlmsghdr *gnlh, const int hdrlen);
+struct nlattr *genlmsg_attrdata (const struct genlmsghdr *gnlh, int hdrlen);
+int genlmsg_len (const struct genlmsghdr *gnlh);
+int genlmsg_attrlen (const struct genlmsghdr *gnlh, int hdrlen);
+int genlmsg_valid_hdr (struct nlmsghdr *nlh, int hdrlen);
+int genlmsg_parse (struct nlmsghdr *nlh, int hdrlen, struct nlattr *tb[],
+ int maxtype, const struct nla_policy *policy);
+
+int genl_ctrl_resolve (struct nl_sock *sk, const char *name);
+
+/*****************************************************************************/
+
#endif /* __NM_NETLINK_H__ */