rtw_br_ext.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of version 2 of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
  17. *
  18. *
  19. ******************************************************************************/
  20. #ifndef _RTW_BR_EXT_H_
  21. #define _RTW_BR_EXT_H_
  22. #if 1 /* rtw_wifi_driver */
  23. #define CL_IPV6_PASS 1
  24. #define MACADDRLEN 6
  25. #define _DEBUG_ERR RTW_INFO
  26. #define _DEBUG_INFO /* RTW_INFO */
  27. #define DEBUG_WARN RTW_INFO
  28. #define DEBUG_INFO /* RTW_INFO */
  29. #define DEBUG_ERR RTW_INFO
  30. /* #define GET_MY_HWADDR ((GET_MIB(priv))->dot11OperationEntry.hwaddr) */
  31. #define GET_MY_HWADDR(padapter) (adapter_mac_addr(padapter))
  32. #endif /* rtw_wifi_driver */
  33. #define NAT25_HASH_BITS 4
  34. #define NAT25_HASH_SIZE (1 << NAT25_HASH_BITS)
  35. #define NAT25_AGEING_TIME 300
  36. #ifdef CL_IPV6_PASS
  37. #define MAX_NETWORK_ADDR_LEN 17
  38. #else
  39. #define MAX_NETWORK_ADDR_LEN 11
  40. #endif
  41. struct nat25_network_db_entry {
  42. struct nat25_network_db_entry *next_hash;
  43. struct nat25_network_db_entry **pprev_hash;
  44. atomic_t use_count;
  45. unsigned char macAddr[6];
  46. unsigned long ageing_timer;
  47. unsigned char networkAddr[MAX_NETWORK_ADDR_LEN];
  48. };
  49. enum NAT25_METHOD {
  50. NAT25_MIN,
  51. NAT25_CHECK,
  52. NAT25_INSERT,
  53. NAT25_LOOKUP,
  54. NAT25_PARSE,
  55. NAT25_MAX
  56. };
  57. struct br_ext_info {
  58. unsigned int nat25_disable;
  59. unsigned int macclone_enable;
  60. unsigned int dhcp_bcst_disable;
  61. int addPPPoETag; /* 1: Add PPPoE relay-SID, 0: disable */
  62. unsigned char nat25_dmzMac[MACADDRLEN];
  63. unsigned int nat25sc_disable;
  64. };
  65. void nat25_db_cleanup(_adapter *priv);
  66. #endif /* _RTW_BR_EXT_H_ */