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_linux.h,v 1.2 2007/04/05 23:10:03 Exp $
16 #define EMF_MAX_INST 8
19 #define EMF_DUMP_PKT(data) \
22 for (i = 0; i < 64; i++) \
23 printk("%02x ", (data)[i]); \
27 #define EMF_DUMP_PKT(data)
30 #define EMF_BRPORT_STATE(if) (((br_port_t *)((if)->br_port))->state)
32 typedef struct emf_iflist
34 struct emf_iflist
*next
; /* Next pointer */
35 struct net_device
*if_ptr
; /* Interface pointer */
38 typedef struct emf_info
40 struct emf_info
*next
; /* Next pointer */
41 int8 inst_id
[16]; /* EMF Instance identifier */
42 osl_t
*osh
; /* OS layer handle */
43 struct net_device
*br_dev
; /* Bridge device pointer */
44 struct emfc_info
*emfci
; /* EMFC Global data handle */
45 uint32 hooks_reg
; /* EMF Hooks registration */
46 emf_iflist_t
*iflist_head
; /* EMF interfaces list */
49 typedef struct emf_struct
51 struct sock
*nl_sk
; /* Netlink socket */
52 emf_info_t
*list_head
; /* EMF instance list */
53 osl_lock_t lock
; /* EMF locking */
54 int32 hooks_reg
; /* EMF hooks registration ref count */
55 int32 inst_count
; /* EMF instance count */
58 typedef struct br_port
61 struct net_bridge
*br
;
62 struct net_device
*dev
;
68 static uint32
emf_br_pre_hook(uint32
, struct sk_buff
**,
69 const struct net_device
*,
70 const struct net_device
*,
71 int32 (*)(struct sk_buff
*));
72 static uint32
emf_ip_post_hook(uint32
, struct sk_buff
**,
73 const struct net_device
*,
74 const struct net_device
*,
75 int32 (*)(struct sk_buff
*));
77 #endif /* _EMF_LINUX_H_ */