1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2 /* Copyright(c) 2007 - 2011 Realtek Corporation. */
3 
4 #ifndef _RTW_BR_EXT_H_
5 #define _RTW_BR_EXT_H_
6 
7 #define GET_MY_HWADDR(padapter)		((padapter)->eeprompriv.mac_addr)
8 
9 #define NAT25_HASH_BITS		4
10 #define NAT25_HASH_SIZE		(1 << NAT25_HASH_BITS)
11 #define NAT25_AGEING_TIME	300
12 
13 #define MAX_NETWORK_ADDR_LEN	17
14 
15 struct nat25_network_db_entry {
16 	struct nat25_network_db_entry	*next_hash;
17 	struct nat25_network_db_entry	**pprev_hash;
18 	atomic_t	use_count;
19 	unsigned char	macAddr[6];
20 	unsigned long	ageing_timer;
21 	unsigned char	networkAddr[MAX_NETWORK_ADDR_LEN];
22 };
23 
24 enum NAT25_METHOD {
25 	NAT25_MIN,
26 	NAT25_CHECK,
27 	NAT25_INSERT,
28 	NAT25_PARSE,
29 	NAT25_MAX
30 };
31 
32 struct br_ext_info {
33 	unsigned int	nat25_disable;
34 	unsigned int	macclone_enable;
35 	unsigned int	dhcp_bcst_disable;
36 	int	addPPPoETag;		/* 1: Add PPPoE relay-SID, 0: disable */
37 	unsigned char	nat25_dmzMac[ETH_ALEN];
38 	unsigned int	nat25sc_disable;
39 };
40 
41 void nat25_db_cleanup(struct adapter *priv);
42 
43 #endif /*  _RTW_BR_EXT_H_ */
44