libnl API change struct nl_handle renamed to struct libnl_sock
PATCH 1/1 libnl API change struct nl_handle renamed to struct libnl_sock
Signed-off-by Daniel Wagner <[email protected]>
---
I had to patch the iw HEAD to get it compiled against the libnl HEAD.
genl.c | 8 ++++---- iw.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)
genl.c +4 -4
@@ -64,7 +64,7 @@ static int family_handler(struct nl_msg *msg, void *arg)return NL_SKIP ; } -int nl_get_multicast_id (struct nl_handle *handle,const char *family,const char *group) +int nl_get_multicast_id (struct nl_sock *sock,const char *family,const char *group) {struct nl_msg *msg;struct nl_cb *cb;
@@ -84,7 +84,7 @@ int nl_get_multicast_id(struct nl_handle *handle, const char *family, const char goto out_fail_cb; } - ctrlid =genl_ctrl_resolve (handle,"nlctrl" ); + ctrlid =genl_ctrl_resolve (sock,"nlctrl" );genlmsg_put (msg,0 ,0 , ctrlid,0 ,0 ,CTRL_CMD_GETFAMILY ,0 );
@@ -92,7 +92,7 @@ int nl_get_multicast_id(struct nl_handle *handle, const char *family, const char ret = -ENOBUFS ;NLA_PUT_STRING (msg,CTRL_ATTR_FAMILY_NAME , family); - ret =nl_send_auto_complete (handle, msg); + ret =nl_send_auto_complete (sock, msg);if (ret <0 ) goto out;
@@ -103,7 +103,7 @@ int nl_get_multicast_id(struct nl_handle *handle, const char *family, const charnl_cb_set (cb,NL_CB_VALID ,NL_CB_CUSTOM , family_handler, &grp);while (ret >0 ) -nl_recvmsgs (handle, cb); +nl_recvmsgs (sock, cb);if (ret ==0 ) ret = grp.id;
iw.h +1 -1
@@ -66,6 +66,6 @@ const char *iftype_name(enum nl80211_iftype iftype);int ieee80211_channel_to_frequency (int chan);int ieee80211_frequency_to_channel (int freq); -int nl_get_multicast_id (struct nl_handle *handle,const char *family,const char *group); +int nl_get_multicast_id (struct nl_sock *sock,const char *family,const char *group);#endif /* __IW_H */
Signature · 1 line
1.6.1