]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - include/mnl_utils.h
Merge git://git.kernel.org/pub/scm/network/iproute2/iproute2-next
[mirror_iproute2.git] / include / mnl_utils.h
index fa826ef1f8fe3c36cea8e7752b52ac4a3d67ce6f..9e7d6879009c01e6336cc7d568a090f125395880 100644 (file)
@@ -2,6 +2,22 @@
 #ifndef __MNL_UTILS_H__
 #define __MNL_UTILS_H__ 1
 
+struct mnlu_gen_socket {
+       struct mnl_socket *nl;
+       char *buf;
+       uint32_t family;
+       unsigned int seq;
+       uint8_t version;
+};
+
+int mnlu_gen_socket_open(struct mnlu_gen_socket *nlg, const char *family_name,
+                        uint8_t version);
+void mnlu_gen_socket_close(struct mnlu_gen_socket *nlg);
+struct nlmsghdr *mnlu_gen_socket_cmd_prepare(struct mnlu_gen_socket *nlg,
+                                            uint8_t cmd, uint16_t flags);
+int mnlu_gen_socket_sndrcv(struct mnlu_gen_socket *nlg, const struct nlmsghdr *nlh,
+                          mnl_cb_t data_cb, void *data);
+
 struct mnl_socket *mnlu_socket_open(int bus);
 struct nlmsghdr *mnlu_msg_prepare(void *buf, uint32_t nlmsg_type, uint16_t flags,
                                  void *extra_header, size_t extra_header_size);