2 * Copyright (C) 2009, Broadcom Corporation
5 * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation;
6 * the contents of this file may not be disclosed to third parties, copied
7 * or duplicated in any form, in whole or in part, without the prior
8 * written permission of Broadcom Corporation.
10 * $Id: emf_export.h,v 1.1 2007/03/17 03:13:50 Exp $
13 #ifndef _EMF_EXPORT_H_
14 #define _EMF_EXPORT_H_
19 * Description: This function allows EMFL to start receiving frames for
20 * its processing and/or forwarding. It registers OS specific
21 * hook functions. These functions are called from the
22 * bridge or ip forwarding path when packets reach respective
23 * bridge pre or ip post hook points. This function can be
24 * called when multicast forwarding is enabled by user.
26 * Input: emfi - EMFL instance handle.
28 * Return: Registration status, SUCCESS or FAILURE.
30 extern int32
emf_hooks_register(struct emf_info
*emfi
);
33 * Description: This function causes EMFL to stop receiving frames. It
34 * unregisters the OS specific hook functions. This function
35 * can be called when multicast forwarding is disabled by
38 * Input: emfi - Global EMF instance handle.
40 extern void emf_hooks_unregister(struct emf_info
*emfi
);
43 * Description: This function is called by EMFL common code when it wants
44 * to forward the packet on to a specific port. It adds the
45 * MAC header to the frame if not present and queues the
46 * frame to the destination interface indicated by the input
49 * Input: emfi - EMFL instance handle
50 * sdu - Pointer to the packet buffer.
51 * mgrp_ip - Multicast destination address.
52 * txif - Interface to send the frame on.
53 * rt_port - TRUE when the packet is received from IP stack
54 * (router port), FALSE otherwise.
56 * Return: SUCCESS or FAILURE.
58 extern int32
emf_forward(struct emf_info
*emfi
, void *sdu
, uint32 mgrp_ip
,
59 void *txif
, bool rt_port
);
62 * Description: This function is called to send the packet buffer up
65 * Input: emfi - EMF instance information
66 * sdu - Pointer to the packet buffer.
68 extern void emf_sendup(struct emf_info
*emfi
, void *sdu
);
70 #endif /* _EMF_EXPORT_H_ */