Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved
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 or http://www.opensolaris.org/os/licensing. 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]
#include <sys/neti.h> #include <sys/hook.h> #include <sys/hook_event.h>
A callback may only modify the hpe_hdr, hpe_mp and hpe_mb fields.
The following table documents which fields can be safely used as a result of each event.
Event hpe_ifp hpe_ofp hpe_hdr hpe_mp hpe_mb ----- ------- ------- ------- ------ ------ NH_PRE_ROUTING yes yes yes yes NH_POST_ROUTING yes yes yes yes NH_FORWARDING yes yes yes yes yes NH_LOOPBACK_IN yes yes yes yes NH_LOOPBACK_OUT yes yes yes yes
net_data_t hne_family; phy_if_t hpe_ifp; phy_if_t hpe_ofp; void *hpe_hdr; mblk_t *hpe_mp; mblk_t *hpe_mb; uint32_t hpe_flags;
The following fields are set for each event: hne_family
The protocol family for this packet. This value matches the corresponding value returned from a call to net_protocol_lookup(9F).
The inbound interface for a packet.
The outbound interface for a packet.
Pointer to the start of the network protocol header within an mblk_t structure.
Pointer to the mblk_t pointer that points to the first mblk_t structure in this packet.
Pointer to the mblk_t structure that contains hpe_hdr.
This field is used to carry additional properties of packets. The current collection of defined bits available is: HPE_BROADCAST
This bit is set if the packet was recognized as a broadcast packet from the link layer. The bit cannot be set if HPE_MULTICAST is set, currently only possible with physical in packet events.
This set if the packet was recognized as a multicast packet from the link layer. This bit cannot be set if HPE_BROADCAST is set, currently only possible with physical in packet events.
ATTRIBUTE TYPE ATTRIBUTE VALUE |
Interface Stability Committed |