/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <stdlib.h>
#include <strings.h>
#include <stddef.h>
#include "libilb.h"
#include "libilb_impl.h"
/* ARGSUSED */
static ilb_status_t
{
}
/* ARGSUSED */
static ilb_status_t
{
}
/* ARGSUSED */
static ilb_status_t
void *arg)
{
}
/* ARGSUSED */
static ilb_status_t
{
if (rc != ILB_STATUS_OK)
return (rc);
}
{
if (h == NULL)
return (ILB_STATUS_EINVAL);
if (rc != ILB_STATUS_OK)
goto out;
if (rc != ILB_STATUS_OK)
goto out;
out:
return (rc);
}
{
return (ILB_STATUS_EINVAL);
return (ILB_STATUS_ENOMEM);
/*
* Since the IP address representation in ilb_rule_data_t and
* ilb_rule_info_t is different, we need to convert between
* them.
*/
else
if (rc != ILB_STATUS_OK)
goto out;
out:
return (rc);
}
static ilb_status_t
{
if (h == ILB_INVALID_HANDLE)
return (ILB_STATUS_EINVAL);
return (ILB_STATUS_ENOMEM);
} else {
sizeof (ilbd_name_t));
}
if (rc != ILB_STATUS_OK)
goto out;
out:
return (rc);
}
{
}
{
}
{
}
{
*rbufsz = ILBD_MSG_SIZE;
return (ILB_STATUS_ENOMEM);
if (rc != ILB_STATUS_OK)
goto out;
return (rc);
}
out:
return (rc);
}
static ilb_status_t
void *arg)
{
return (ILB_STATUS_ENOMEM);
return (ILB_STATUS_ENOMEM);
}
if (rc != ILB_STATUS_OK)
goto out;
goto out;
}
/*
* Since the IP address representation in ilb_rule_data_t and
* ilb_rule_info_t is different, we need to convert between
* them.
*/
out:
return (rc);
}
void *arg)
{
int i;
if (h == NULL)
return (ILB_STATUS_EINVAL);
if (rc != ILB_STATUS_OK)
return (rc);
for (i = 0; i < names->ilbl_count; i++) {
/*
* The rule may have been removed by another process since
* we retrieve all the rule names, just continue.
*/
if (rc == ILB_STATUS_ENOENT) {
rc = ILB_STATUS_OK;
continue;
}
if (rc != ILB_STATUS_OK)
break;
}
return (rc);
}