ilbadm_rules.c revision 33f5ff17089e3a43e6e730bf80384c233123dbd9
1N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1N/A#define OF_STR_RNAME 0
1N/Atypedef struct arg_struct {
1N/Atypedef struct ilbadm_rl_exp_arg {
1N/Atypedef struct ilbadm_rl_list_arg {
1N/A ilb_handle_t h;
1N/Atypedef struct ilbadm_rl_srvlist_arg {
1N/A case OF_STR_RNAME:
1N/A case OF_STR_SGNAME:
1N/A case OF_STR_HCNAME:
1N/A case OF_IP_PROXYSRC:
1N/A case OF_IP_STICKYMASK:
1N/A case OF_T_STICKY:
1N/Atypedef struct rl_showlist_arg {
1N/Astatic ilb_status_t
1N/A return (ILB_STATUS_OK);
static boolean_t
(void *)&sla);
return (B_TRUE);
static boolean_t
int len;
if (h_min == 0)
return (B_TRUE);
static ilbadm_status_t
int ret;
case AF_INET:
case AF_INET6:
default: return (ILBADM_INVAL_AF);
return (ILBADM_OK);
static ilb_status_t
int oflags = 0;
return (ILB_STATUS_GENERIC);
return (ILB_STATUS_OK);
ra.h = h;
return (ILB_STATUS_GENERIC);
return (ILB_STATUS_OK);
static char *full_list_rule_hdrs =
static char *def_list_rule_hdrs =
(char)optopt);
goto out;
goto out;
(void*)&larg);
out:
if (h != ILB_INVALID_HANDLE)
(void) ilb_close(h);
return (rc);
static boolean_t
return (B_FALSE);
switch (op) {
case OF_SRV_ID:
case OF_SRV_STATUS:
case OF_SRV_RNAME:
case OF_SRV_SGNAME:
case OF_SRV_HOSTNAME:
case OF_SRV_PORT:
case OF_SRV_ADDR:
return (ret);
static ilb_status_t
void *arg)
return (ILB_STATUS_OK);
int oflags = 0;
return (ILB_STATUS_GENERIC);
return (ILB_STATUS_GENERIC);
static char *def_show_srv_hdrs =
(char)optopt);
goto out;
if (!o_opt)
goto out;
(void*)&larg);
out:
if (h != ILB_INVALID_HANDLE)
(void) ilb_close(h);
return (rc);
static ilbadm_status_t
return (rc);
return (ILBADM_LIBERR);
goto out;
goto out;
if (all_rules) {
goto out;
out:
if (h != ILB_INVALID_HANDLE)
(void) ilb_close(h);
return (rc);
static ilbadm_status_t
goto out;
* by default, en/disable-rule mean "all", and not using
out:
if (h != ILB_INVALID_HANDLE)
(void) ilb_close(h);
return (rc);
goto out;
goto out;
if (p_opt) {
char *maskstr;
case AF_INET:
case AF_INET6:
goto out;
goto out;
goto out;
goto out;
goto out;
out:
if (h != ILB_INVALID_HANDLE)
(void) ilb_close(h);
return (rc);
static ilb_status_t
int cnt = 0;
if (conndrain != 0) {
cnt++;
if (nat_timeout != 0) {
if (cnt > 0)
cnt++;
if (sticky_timeout != 0) {
if (cnt > 0)
return (ILB_STATUS_WRITE);
return (ILB_STATUS_OK);
return (rc);