/*
* 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.
*/
/*
* DL_IPV4 MAC Type plugin for the Nemo mac module
*/
#include <sys/mac_ipv4.h>
#include <sys/byteorder.h>
"IPv4 tunneling MAC plugin"
};
};
int
_init(void)
{
int err;
return (ENOTSUP);
(void) mactype_unregister(MAC_PLUGIN_IDENT_IPV4);
}
return (err);
}
int
_fini(void)
{
int err;
return (err);
return (mod_remove(&mac_ipv4_modlinkage));
}
int
{
}
/*
* MAC Type plugin operations
*/
/* ARGSUSED */
int
{
EINVAL : 0);
}
/* ARGSUSED */
int
{
/*
* IPv4 configured tunnels do not have the concept of link-layer
* multicast.
*/
return (ENOTSUP);
}
/*
* Check the legality of an IPv4 tunnel SAP value. The only two acceptable
* values are IPPROTO_ENCAP (IPv4 in IPv4) and IPPROTO_IPV6 (IPv6 in IPv4).
*/
/* ARGSUSED */
{
return (B_TRUE);
}
return (B_FALSE);
}
/*
* Build an IPv4 link-layer header for tunneling. If provided, the
* template header provided by the driver supplies the header length, type
* of service, don't fragment flag, ttl, and potential options (depending
* on the header length).
*/
/* ARGSUSED */
mblk_t *
{
return (NULL);
return (NULL);
} else {
}
return (mp);
}
/* ARGSUSED */
int
{
return (EINVAL);
/*
* IPv4 tunnels don't have a concept of link-layer multicast since
* they have fixed unicast endpoints.
*/
return (EINVAL);
hdr_info->mhi_pktsize = 0;
return (0);
}
/*
* Plugin data is either NULL or a pointer to an IPv4 header.
*/
{
return (pdata_size == 0);
if (pdata_size < sizeof (struct ip))
return (B_FALSE);
/* Make sure that the header length field matches pdata_size */
}
NULL,
NULL,
};