Lines Matching defs:mnl
45 struct mnl_socket *mnl;
47 mnl = mnl_socket_open(NETLINK_NETFILTER);
48 if (!mnl) {
53 if (mnl_socket_bind(mnl, 0, MNL_SOCKET_AUTOPID) < 0) {
54 mnl_socket_close(mnl);
58 return mnl;
61 static int add_to_ipset(struct mnl_socket *mnl, const char *setname, const void *ipaddr, int af) {
94 if (mnl_socket_sendto(mnl, nlh, nlh->nlmsg_len) < 0) {
101 ipset_add_rrset_data(struct ipset_env *ie, struct mnl_socket *mnl,
126 ret = add_to_ipset(mnl, setname, rr_data + 2, af);
130 mnl_socket_close(mnl);
131 ie->mnl = NULL;
140 struct mnl_socket *mnl, struct ub_packed_rrset_key *rrset,
167 ipset_add_rrset_data(ie, mnl, d, setname,
177 struct mnl_socket *mnl;
188 mnl = (struct mnl_socket *)ie->mnl;
189 if (!mnl) {
190 // retry to create mnl socket
191 mnl = open_mnl_socket();
192 if (!mnl) {
196 ie->mnl = mnl;
217 if(ipset_check_zones_for_rrset(env, ie, mnl, rrset,
237 ipset_env->mnl = NULL;
254 struct mnl_socket *mnl;
263 mnl = (struct mnl_socket *)ipset_env->mnl;
264 if (mnl) {
265 mnl_socket_close(mnl);
266 ipset_env->mnl = NULL;