Lines Matching refs:rd

47 i_drop_rule(ilb_handle_t h, ilb_rule_data_t *rd, void *arg)
49 return (ilb_destroy_rule(h, rd->r_name));
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')
114 (void) strlcpy(rl->rl_name, rd->r_name, sizeof (rl->rl_name));
115 (void) strlcpy(rl->rl_sgname, rd->r_sgname, sizeof (rl->rl_sgname));
116 (void) strlcpy(rl->rl_hcname, rd->r_hcname, sizeof (rl->rl_hcname));
117 rl->rl_flags = rd->r_flags;
118 rl->rl_proto = rd->r_proto;
119 rl->rl_ipversion = rd->r_vip.ia_af;
120 rl->rl_minport = rd->r_minport;
121 if (ntohs(rd->r_maxport) < ntohs(rd->r_minport))
122 rl->rl_maxport = rd->r_minport;
124 rl->rl_maxport = rd->r_maxport;
125 rl->rl_algo = rd->r_algo;
126 rl->rl_topo = rd->r_topo;
127 rl->rl_conndrain = rd->r_conndrain;
128 rl->rl_nat_timeout = rd->r_nat_timeout;
129 rl->rl_sticky_timeout = rd->r_sticky_timeout;
130 rl->rl_hcport = rd->r_hcport;
131 rl->rl_hcpflag = rd->r_hcpflag;
133 IP_COPY_CLI_2_IMPL(&rd->r_vip, &rl->rl_vip);
134 IP_COPY_CLI_2_IMPL(&rd->r_stickymask, &rl->rl_stickymask);
135 IP_COPY_CLI_2_IMPL(&rd->r_nat_src_start, &rl->rl_nat_src_start);
136 IP_COPY_CLI_2_IMPL(&rd->r_nat_src_end, &rl->rl_nat_src_end);
233 ilb_rule_data_t rd;
261 (void) strlcpy(rd.r_name, rl->rl_name, sizeof (rd.r_name));
262 (void) strlcpy(rd.r_hcname, rl->rl_hcname, sizeof (rd.r_hcname));
263 (void) strlcpy(rd.r_sgname, rl->rl_sgname, sizeof (rd.r_sgname));
264 rd.r_flags = rl->rl_flags;
265 rd.r_proto = rl->rl_proto;
266 rd.r_minport = rl->rl_minport;
267 rd.r_maxport = rl->rl_maxport;
268 rd.r_algo = rl->rl_algo;
269 rd.r_topo = rl->rl_topo;
270 rd.r_conndrain = rl->rl_conndrain;
271 rd.r_nat_timeout = rl->rl_nat_timeout;
272 rd.r_sticky_timeout = rl->rl_sticky_timeout;
273 rd.r_hcport = rl->rl_hcport;
274 rd.r_hcpflag = rl->rl_hcpflag;
276 IP_COPY_IMPL_2_CLI(&rl->rl_vip, &rd.r_vip);
277 IP_COPY_IMPL_2_CLI(&rl->rl_nat_src_start, &rd.r_nat_src_start);
278 IP_COPY_IMPL_2_CLI(&rl->rl_nat_src_end, &rd.r_nat_src_end);
279 IP_COPY_IMPL_2_CLI(&rl->rl_stickymask, &rd.r_stickymask);
281 rc = f(h, &rd, arg);