1*de1e4e89SAndroid Build Coastguard Worker /* 2*de1e4e89SAndroid Build Coastguard Worker * mnlg.h Generic Netlink helpers for libmnl 3*de1e4e89SAndroid Build Coastguard Worker * 4*de1e4e89SAndroid Build Coastguard Worker * This program is free software; you can redistribute it and/or 5*de1e4e89SAndroid Build Coastguard Worker * modify it under the terms of the GNU General Public License 6*de1e4e89SAndroid Build Coastguard Worker * as published by the Free Software Foundation; either version 7*de1e4e89SAndroid Build Coastguard Worker * 2 of the License, or (at your option) any later version. 8*de1e4e89SAndroid Build Coastguard Worker * 9*de1e4e89SAndroid Build Coastguard Worker * Authors: Jiri Pirko <[email protected]> 10*de1e4e89SAndroid Build Coastguard Worker */ 11*de1e4e89SAndroid Build Coastguard Worker 12*de1e4e89SAndroid Build Coastguard Worker #ifndef _MNLG_H_ 13*de1e4e89SAndroid Build Coastguard Worker #define _MNLG_H_ 14*de1e4e89SAndroid Build Coastguard Worker 15*de1e4e89SAndroid Build Coastguard Worker #include <libmnl/libmnl.h> 16*de1e4e89SAndroid Build Coastguard Worker 17*de1e4e89SAndroid Build Coastguard Worker struct mnlg_socket; 18*de1e4e89SAndroid Build Coastguard Worker 19*de1e4e89SAndroid Build Coastguard Worker struct nlmsghdr *mnlg_msg_prepare(struct mnlg_socket *nlg, uint8_t cmd, 20*de1e4e89SAndroid Build Coastguard Worker uint16_t flags); 21*de1e4e89SAndroid Build Coastguard Worker int mnlg_socket_send(struct mnlg_socket *nlg, const struct nlmsghdr *nlh); 22*de1e4e89SAndroid Build Coastguard Worker int mnlg_socket_recv_run(struct mnlg_socket *nlg, mnl_cb_t data_cb, void *data); 23*de1e4e89SAndroid Build Coastguard Worker int mnlg_socket_group_add(struct mnlg_socket *nlg, const char *group_name); 24*de1e4e89SAndroid Build Coastguard Worker struct mnlg_socket *mnlg_socket_open(const char *family_name, uint8_t version); 25*de1e4e89SAndroid Build Coastguard Worker void mnlg_socket_close(struct mnlg_socket *nlg); 26*de1e4e89SAndroid Build Coastguard Worker 27*de1e4e89SAndroid Build Coastguard Worker #endif /* _MNLG_H_ */ 28