2d0611ffc9f91c5fc2ddccb93f9a3d17791ae650takashi * CDDL HEADER START
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd * The contents of this file are subject to the terms of the
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd * Common Development and Distribution License (the "License").
a78048ccbdb6256da15e6b0e7e95355e480c2301nd * You may not use this file except in compliance with the License.
a78048ccbdb6256da15e6b0e7e95355e480c2301nd * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d474d8ef01ec5c2a09341cd148851ed383c3287crbowen * See the License for the specific language governing permissions
0d507cf3a73c7f2d97ed0fead6907ec99f0ac1e7nd * and limitations under the License.
d474d8ef01ec5c2a09341cd148851ed383c3287crbowen * When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
#include <errno.h>
#include <stdlib.h>
#include <strings.h>
#include <netdb.h>
#include <libdladm.h>
#include <libdlflow.h>
#include <libdlflow_impl.h>
static dladm_status_t
static dladm_status_t
errno = 0;
return (DLADM_STATUS_INVALID_PREFIXLEN);
return (DLADM_STATUS_INVALID_IP);
if (local) {
if (prefix_len == 0)
return (DLADM_STATUS_INVALID_PREFIXLEN);
return (DLADM_STATUS_OK);
if (protocol != 0) {
return (DLADM_STATUS_OK);
return (DLADM_STATUS_INVALID_PROTOCOL);
return (DLADM_STATUS_INVALID_PORT);
if (local) {
return (DLADM_STATUS_OK);
static dladm_status_t
for (j = 0; j < DLADM_MAX_FLOWATTRS; j++)
for (j = 0; j < DLADM_MAX_FLOWATTRS; j++) {
if (isset[j])
return (DLADM_STATUS_FLOW_INCOMPATIBLE);
if (!matched)
return (DLADM_STATUS_BADARG);
return (DLADM_STATUS_OK);
for (j = 0; j < DLADM_MAX_FLOWATTRS; j++) {
return (DLADM_STATUS_BADARG);
return (status);
return (DLADM_STATUS_PORT_NOPROTO);
return (status);
!= DLADM_STATUS_OK)
return (DLADM_STATUS_ATTR_PARSE_ERR);
!= DLADM_STATUS_OK) {
return (DLADM_STATUS_ATTR_PARSE_ERR);
return (DLADM_STATUS_OK);
errno = 0;
return (DLADM_STATUS_INVALID_DSFMASK);
errno = 0;
return (DLADM_STATUS_INVALID_DSF);
return (DLADM_STATUS_OK);
return (IPPROTO_TCP);
return (IPPROTO_UDP);
return (IPPROTO_SCTP);
return (IPPROTO_ICMPV6);
return (IPPROTO_ICMP);