I'm submitting the following case on behalf of the devil (me).

Template Version: @(#)sac_nextcase 1.64 07/13/07 SMI
This information is Copyright 2007 Sun Microsystems
1. Introduction
    1.1. Project/Component Working Name:
         Broadcast/multicast packet notification through pfhooks
    1.2. Name of Document Author/Supplier:
         Author:  Darren Reed
    1.3  Date of This Document:
        26 November, 2007
4. Technical Description
Broadcast/multicast packet notification through pfhooks

Introduction
============
This case seeks to introduce a new member of the hooks_pkt_event_t
structure (introduced by PSARC/2005/334) to allow communication of
whether or not a packet is a multicast or broadcast packet through
to receivers of packet events.  As the interfaces introduced by
PSARC/2005/334 are currently private, so too is the change being
introduced by this case.

History
=======
Prior to PSARC/2005/334, IPFilter was able to examine the mblks before
they reached IP, giving it access to the data structures used by the
DL_UNITDATA_IND primitive.  This structure includes a field known as
dl_group_address and indicates whether or not the packet is a broadcast/
multicast packet or a unicast packet.  With the advent of PSARC/2005/334,
the interception point for filtering was moved to being inside of IP, to
a location where the DL_UNITDATA_IND has already been removed from the
front of the packet, thus preventing IPFilter from being able to detect
whether or not the packet was unicast or not.

Details
=======
The current hook_pkt_event_t structure can be found in <sys/hook_event.h>
and is as follows:

/*
 * The hook_pkt_event_t structure is supplied with packet events on
 * associated network interfaces.
 *
 * The members of this structure are defined as follows:
 * hpe_ifp - "in" interface for packets coming into the system or forwarded
 * hpe_ofp - "out" interface for packets being transmitted or forwarded
 * hpe_hdr - pointer to protocol header within the packet
 * hpe_mp  - pointer to the mblk pointer starting the chain for this packet
 * hpe_mb  - pointer to the mblk that contains hpe_hdr
 */
typedef struct hook_pkt_event {
        phy_if_t                hpe_ifp;
        phy_if_t                hpe_ofp;
        void                    *hpe_hdr;
        mblk_t                  **hpe_mp;
        mblk_t                  *hpe_mb;
} hook_pkt_event_t;

The proposed new structure is:

typedef struct hook_pkt_event {
        phy_if_t                hpe_ifp;
        phy_if_t                hpe_ofp;
        void                    *hpe_hdr;
        mblk_t                  **hpe_mp;
        mblk_t                  *hpe_mb;
        int                     hpe_flags;
} hook_pkt_event_t;

The proposed use of hpe_flags is:
#define HPE_MULTICAST           0x01
#define HPE_BROADCAST           0x02

These two bit values indicate if the packet is multicast or if it
is broadcast, however, using DLPI in Solaris today, it is not possible to
know if a packet that reaches IP is multicast or broadcast by looking
at the dl_group_address field and nor is there any other mechanism
available.  In light of this, setting both flags together is supported
as an indication that the packet might be one or the other:

#define HPE_MBCAST              0x03

Interface table
===============
+---------------------------------------------------------------+
|                  |   Interfaces Exported |                    |
|------------------+-----------------------+--------------------|
| Interface        |  Classification       |      Comments      |
|------------------+-----------------------+--------------------|
| HPE_MULTICAST    | Consolidation Private | <sys/hook_event.h> |
| HPE_BROADCAST    | Consolidation Private | <sys/hook_event.h> |
| HPE_MBCAST       | Consolidation Private | <sys/hook_event.h> |
| hook_pkt_event_t | Consolidation Private | <sys/hook_event.h> |
+------------------+-----------------------+--------------------+


6. Resources and Schedule
    6.4. Steering Committee requested information
        6.4.1. Consolidation C-team Name:
                ON
    6.5. ARC review type: FastTrack
    6.6. ARC Exposure: open


Reply via email to