dhd_ip.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * Header file describing the common ip parser function.
  3. *
  4. * Provides type definitions and function prototypes used to parse ip packet.
  5. *
  6. * Copyright (C) 1999-2015, Broadcom Corporation
  7. *
  8. * Unless you and Broadcom execute a separate written software license
  9. * agreement governing use of this software, this software is licensed to you
  10. * under the terms of the GNU General Public License version 2 (the "GPL"),
  11. * available at http://www.broadcom.com/licenses/GPLv2.php, with the
  12. * following added to such license:
  13. *
  14. * As a special exception, the copyright holders of this software give you
  15. * permission to link this software with independent modules, and to copy and
  16. * distribute the resulting executable under terms of your choice, provided that
  17. * you also meet, for each linked independent module, the terms and conditions of
  18. * the license of that module. An independent module is a module which is not
  19. * derived from this software. The special exception does not apply to any
  20. * modifications of the software.
  21. *
  22. * Notwithstanding the above, under no circumstances may you combine this
  23. * software in any way with any other Broadcom software provided under a license
  24. * other than the GPL, without Broadcom's express prior written consent.
  25. *
  26. * $Id: dhd_ip.h 457888 2014-02-25 03:34:39Z $
  27. */
  28. #ifndef _dhd_ip_h_
  29. #define _dhd_ip_h_
  30. #ifdef DHDTCPACK_SUPPRESS
  31. #include <dngl_stats.h>
  32. #include <bcmutils.h>
  33. #include <dhd.h>
  34. #endif /* DHDTCPACK_SUPPRESS */
  35. typedef enum pkt_frag
  36. {
  37. DHD_PKT_FRAG_NONE = 0,
  38. DHD_PKT_FRAG_FIRST,
  39. DHD_PKT_FRAG_CONT,
  40. DHD_PKT_FRAG_LAST
  41. } pkt_frag_t;
  42. extern pkt_frag_t pkt_frag_info(osl_t *osh, void *p);
  43. #ifdef DHDTCPACK_SUPPRESS
  44. #define TCPACKSZMIN (ETHER_HDR_LEN + IPV4_MIN_HEADER_LEN + TCP_MIN_HEADER_LEN)
  45. /* Size of MAX possible TCP ACK packet. Extra bytes for IP/TCP option fields */
  46. #define TCPACKSZMAX (TCPACKSZMIN + 100)
  47. /* Max number of TCP streams that have own src/dst IP addrs and TCP ports */
  48. #define TCPACK_INFO_MAXNUM 4
  49. #define TCPDATA_INFO_MAXNUM 4
  50. #define TCPDATA_PSH_INFO_MAXNUM (8 * TCPDATA_INFO_MAXNUM)
  51. #define TCPDATA_INFO_TIMEOUT 5000 /* Remove tcpdata_info if inactive for this time (in ms) */
  52. extern int dhd_tcpack_suppress_set(dhd_pub_t *dhdp, uint8 on);
  53. extern void dhd_tcpack_info_tbl_clean(dhd_pub_t *dhdp);
  54. extern int dhd_tcpack_check_xmit(dhd_pub_t *dhdp, void *pkt);
  55. extern bool dhd_tcpack_suppress(dhd_pub_t *dhdp, void *pkt);
  56. extern bool dhd_tcpdata_info_get(dhd_pub_t *dhdp, void *pkt);
  57. #if defined(DEBUG_COUNTER) && defined(DHDTCPACK_SUP_DBG)
  58. extern counter_tbl_t tack_tbl;
  59. #endif /* DEBUG_COUNTER && DHDTCPACK_SUP_DBG */
  60. #endif /* DHDTCPACK_SUPPRESS */
  61. #endif /* _dhd_ip_h_ */