Lines Matching defs:h
28 #include <stdlib.h>
29 #include <strings.h>
30 #include <sys/types.h>
31 #include <sys/socket.h>
32 #include <sys/stropts.h>
33 #include <netinet/in.h>
34 #include <stddef.h>
35 #include "libilb.h"
36 #include "libilb_impl.h"
40 i_drop_hc(ilb_handle_t h, ilb_hc_info_t *hc, void *arg)
42 return (ilb_destroy_hc(h, hc->hci_name));
47 i_drop_rule(ilb_handle_t h, ilb_rule_data_t *rd, void *arg)
49 return (ilb_destroy_rule(h, rd->r_name));
54 i_drop_sg_srvs(ilb_handle_t h, ilb_server_data_t *srv, const char *sgname,
57 return (ilb_rem_server_from_group(h, sgname, srv));
62 i_drop_sg(ilb_handle_t h, ilb_sg_data_t *sg, void *arg)
66 rc = ilb_walk_servers(h, i_drop_sg_srvs, sg->sgd_name, (void *)sg);
70 return (ilb_destroy_servergroup(h, sg->sgd_name));
74 ilb_reset_config(ilb_handle_t h)
78 if (h == NULL)
81 rc = ilb_walk_rules(h, i_drop_rule, NULL, NULL);
85 rc = ilb_walk_servergroups(h, i_drop_sg, NULL, NULL);
89 rc = ilb_walk_hc(h, i_drop_hc, NULL);
95 ilb_create_rule(ilb_handle_t h, const ilb_rule_data_t *rd)
102 if (h == ILB_INVALID_HANDLE || rd == NULL || *rd->r_name == '\0')
138 rc = i_ilb_do_comm(h, ic, ic_sz, ic, &ic_sz);
151 i_ilb_rule_action(ilb_handle_t h, const char *name, ilbd_cmd_t cmd)
157 if (h == ILB_INVALID_HANDLE)
170 rc = i_ilb_do_comm(h, ic, ic_sz, ic, &ic_sz);
183 ilb_destroy_rule(ilb_handle_t h, const char *name)
185 return (i_ilb_rule_action(h, name, ILBD_DESTROY_RULE));
189 ilb_enable_rule(ilb_handle_t h, const char *name)
191 return (i_ilb_rule_action(h, name, ILBD_ENABLE_RULE));
195 ilb_disable_rule(ilb_handle_t h, const char *name)
197 return (i_ilb_rule_action(h, name, ILBD_DISABLE_RULE));
201 i_ilb_retrieve_rule_names(ilb_handle_t h, ilb_comm_t **rbuf, size_t *rbufsz)
212 rc = i_ilb_do_comm(h, &ic, sizeof (ic), tmp_rbuf, rbufsz);
228 i_ilb_walk_one_rule(ilb_handle_t h, rule_walkerfunc_t f, const char *name,
247 rc = i_ilb_do_comm(h, ic, ic_sz, rbuf, &rbufsz);
281 rc = f(h, &rd, arg);
290 ilb_walk_rules(ilb_handle_t h, rule_walkerfunc_t f, const char *name,
299 if (h == NULL)
303 return (i_ilb_walk_one_rule(h, f, name, arg));
305 rc = i_ilb_retrieve_rule_names(h, &rbuf, &rbufsz);
311 rc = i_ilb_walk_one_rule(h, f, names->ilbl_name[i], arg);