2 * Header file describing the common ip parser function.
4 * Provides type definitions and function prototypes used to parse ip packet.
6 * Copyright (C) 1999-2016, Broadcom Corporation
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:
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.
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.
27 * <<Broadcom-WL-IPTag/Open:>>
29 * $Id: dhd_ip.h 537119 2015-02-25 04:24:14Z $
35 #ifdef DHDTCPACK_SUPPRESS
36 #include <dngl_stats.h>
39 #endif /* DHDTCPACK_SUPPRESS */
43 DHD_PKT_FRAG_NONE = 0,
49 extern pkt_frag_t pkt_frag_info(osl_t *osh, void *p);
51 #ifdef DHDTCPACK_SUPPRESS
52 #define TCPACKSZMIN (ETHER_HDR_LEN + IPV4_MIN_HEADER_LEN + TCP_MIN_HEADER_LEN)
53 /* Size of MAX possible TCP ACK packet. Extra bytes for IP/TCP option fields */
54 #define TCPACKSZMAX (TCPACKSZMIN + 100)
56 /* Max number of TCP streams that have own src/dst IP addrs and TCP ports */
57 #define TCPACK_INFO_MAXNUM 4
58 #define TCPDATA_INFO_MAXNUM 4
59 #define TCPDATA_PSH_INFO_MAXNUM (8 * TCPDATA_INFO_MAXNUM)
61 #define TCPDATA_INFO_TIMEOUT 5000 /* Remove tcpdata_info if inactive for this time (in ms) */
63 #define DEFAULT_TCPACK_SUPP_RATIO 3
64 #ifndef CUSTOM_TCPACK_SUPP_RATIO
65 #define CUSTOM_TCPACK_SUPP_RATIO DEFAULT_TCPACK_SUPP_RATIO
66 #endif /* CUSTOM_TCPACK_SUPP_RATIO */
68 #define DEFAULT_TCPACK_DELAY_TIME 10 /* ms */
69 #ifndef CUSTOM_TCPACK_DELAY_TIME
70 #define CUSTOM_TCPACK_DELAY_TIME DEFAULT_TCPACK_DELAY_TIME
71 #endif /* CUSTOM_TCPACK_DELAY_TIME */
73 extern int dhd_tcpack_suppress_set(dhd_pub_t *dhdp, uint8 on);
74 extern void dhd_tcpack_info_tbl_clean(dhd_pub_t *dhdp);
75 extern int dhd_tcpack_check_xmit(dhd_pub_t *dhdp, void *pkt);
76 extern bool dhd_tcpack_suppress(dhd_pub_t *dhdp, void *pkt);
77 extern bool dhd_tcpdata_info_get(dhd_pub_t *dhdp, void *pkt);
78 extern bool dhd_tcpack_hold(dhd_pub_t *dhdp, void *pkt, int ifidx);
79 /* #define DHDTCPACK_SUP_DBG */
80 #if defined(DEBUG_COUNTER) && defined(DHDTCPACK_SUP_DBG)
81 extern counter_tbl_t tack_tbl;
82 #endif /* DEBUG_COUNTER && DHDTCPACK_SUP_DBG */
83 #endif /* DHDTCPACK_SUPPRESS */
85 #endif /* _dhd_ip_h_ */