2 * Copyright (C) 2012, 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: proxyarp.h 246051 2011-03-12 03:30:44Z $
17 struct proxyarp_info
{
18 osl_t
*osh
; /* OS layer handle */
21 int enabled
; /* proxyarp service enable or not */
22 uint16 count
; /* proxyarp entry number */
24 typedef struct proxyarp_info proxyarp_info_t
;
26 extern uint8
proxyarp_packets_handle(osl_t
*osh
, void *sdu
, void *fproto
, bool send
, void **reply
);
27 extern void _proxyarp_watchdog(bool all
, uint8
*ea
);
28 extern bool proxyarp_get(void);
29 extern void proxyarp_set(bool enabled
);
30 extern void proxyarp_init(proxyarp_info_t
*spa_info
);
31 extern void proxyarp_deinit(void);
32 extern void proxyarp_lock(proxyarp_info_t
*pah
);
33 extern void proxyarp_unlock(proxyarp_info_t
*pah
);
34 #define PA_LOCK(pah) proxyarp_lock(pah)
35 #define PA_UNLOCK(pah) proxyarp_unlock(pah)
38 #define PROXYARP_DEBUG
43 #define PROXYARP_ERR_LEVEL 0x1
44 #define PROXYARP_DBG_LEVEL 0x2
45 #define PROXYARP_WARN_LEVEL 0x4
46 #define PROXYARP_INFO_LEVEL 0x8
47 #define PROXYARP_MFDB_LEVEL 0x10
49 #define PROXYARP_ERR(fmt, args...) printf("PARP-ERR:: " fmt, ##args)
51 #define PROXYARP_DBG(fmt, args...) if ((proxyarp_msglevel & PROXYARP_DBG_LEVEL)) \
52 printf("PARP-DBG:: " fmt, ##args)
53 #define PROXYARP_WARN(fmt, args...) if ((proxyarp_msglevel & PROXYARP_WARN_LEVEL)) \
54 printf("PARP-WARN:: " fmt, ##args)
55 #define PROXYARP_INFO(fmt, args...) if ((proxyarp_msglevel & PROXYARP_INFO_LEVEL)) \
56 printf("PARP-INFO:: " fmt, ##args)
57 #define PROXYARP_MFDB(fmt, args...) if ((proxyarp_msglevel & PROXYARP_MFDB_LEVEL)) \
58 printf("PARP-MFDB:: " fmt, ##args)
60 #define PROXYARP_ERR(fmt, args...)
61 #define PROXYARP_DBG(fmt, args...)
62 #define PROXYARP_WARN(fmt, args...)
63 #define PROXYARP_INFO(fmt, args...)
64 #define PROXYARP_MFDB(fmt, args...)
66 #endif /* PROXYARP_DEBUG */
68 #endif /* _PROXYARP_H_ */