bpf_mac.c revision b7ea883b48e925772db7fa37388112c84c6d5f5b
/*
* 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.
*/
/*
* This file provides the link to the functions required from the mac
* module. It is currently in bpf, rather than mac (like ipnet_bpf)
* interfaces appear and disappear and the best place for that is in
* dls. Unfortunately all of the other functions used here are found
* in the mac module, making it seem ill suited to being at home in
* dls. Similarly it has even less purpose being in mac as it is
* today.
*/
static void mac_bpf_close(uintptr_t);
static const char *mac_bpf_name(uintptr_t);
static int mac_bpf_type(uintptr_t);
static void mac_bpf_promisc_remove(uintptr_t);
static void mac_bpf_client_close(uintptr_t);
static const char *mac_bpf_client_name(uintptr_t);
};
/*ARGSUSED*/
static int
{
}
static void
{
}
static const char *
{
}
static int
{
}
static void
{
}
static int
{
/*
* If the mac layer cannot deliver a packet as requested by BPF then
* simply have the mac layer drop it. BPF isn't interested in doing
* any amount of retry - that's left to the application.
*/
}
static uintptr_t
int flags)
{
}
static void
{
}
static int
{
}
static void
{
}
static const char *
{
}
/*ARGSUSED*/
static int
{
int error;
/*
* If at first we don't succeed, try again, just in case it is in
* hiding. The first call requires the datalink management daemon
* (the authorative source of information about name to id mapping)
* to be present and answering upcalls, the seond does not.
*/
if (error != 0)
return (error);
}
static int
{
int error;
return (error);
}
static int
{
return (0);
}