| .. | .. |
|---|
| 1 | | -/* SPDX-License-Identifier: GPL-2.0 */ |
|---|
| 2 | 1 | /* |
|---|
| 3 | 2 | * Header file describing the common ip parser function. |
|---|
| 4 | 3 | * |
|---|
| 5 | 4 | * Provides type definitions and function prototypes used to parse ip packet. |
|---|
| 6 | 5 | * |
|---|
| 7 | | - * Copyright (C) 1999-2019, Broadcom Corporation |
|---|
| 8 | | - * |
|---|
| 6 | + * Portions of this code are copyright (c) 2022 Cypress Semiconductor Corporation |
|---|
| 7 | + * |
|---|
| 8 | + * Copyright (C) 1999-2017, Broadcom Corporation |
|---|
| 9 | + * |
|---|
| 9 | 10 | * Unless you and Broadcom execute a separate written software license |
|---|
| 10 | 11 | * agreement governing use of this software, this software is licensed to you |
|---|
| 11 | 12 | * under the terms of the GNU General Public License version 2 (the "GPL"), |
|---|
| 12 | 13 | * available at http://www.broadcom.com/licenses/GPLv2.php, with the |
|---|
| 13 | 14 | * following added to such license: |
|---|
| 14 | | - * |
|---|
| 15 | + * |
|---|
| 15 | 16 | * As a special exception, the copyright holders of this software give you |
|---|
| 16 | 17 | * permission to link this software with independent modules, and to copy and |
|---|
| 17 | 18 | * distribute the resulting executable under terms of your choice, provided that |
|---|
| .. | .. |
|---|
| 19 | 20 | * the license of that module. An independent module is a module which is not |
|---|
| 20 | 21 | * derived from this software. The special exception does not apply to any |
|---|
| 21 | 22 | * modifications of the software. |
|---|
| 22 | | - * |
|---|
| 23 | + * |
|---|
| 23 | 24 | * Notwithstanding the above, under no circumstances may you combine this |
|---|
| 24 | 25 | * software in any way with any other Broadcom software provided under a license |
|---|
| 25 | 26 | * other than the GPL, without Broadcom's express prior written consent. |
|---|
| .. | .. |
|---|
| 27 | 28 | * |
|---|
| 28 | 29 | * <<Broadcom-WL-IPTag/Open:>> |
|---|
| 29 | 30 | * |
|---|
| 30 | | - * $Id: dhd_ip.h 537119 2015-02-25 04:24:14Z $ |
|---|
| 31 | + * $Id: dhd_ip.h 536854 2015-02-24 13:17:29Z $ |
|---|
| 31 | 32 | */ |
|---|
| 32 | 33 | |
|---|
| 33 | 34 | #ifndef _dhd_ip_h_ |
|---|
| 34 | 35 | #define _dhd_ip_h_ |
|---|
| 35 | 36 | |
|---|
| 36 | | -#ifdef DHDTCPACK_SUPPRESS |
|---|
| 37 | +#if defined(DHDTCPACK_SUPPRESS) || defined(DHDTCPSYNC_FLOOD_BLK) |
|---|
| 37 | 38 | #include <dngl_stats.h> |
|---|
| 38 | 39 | #include <bcmutils.h> |
|---|
| 39 | 40 | #include <dhd.h> |
|---|
| 40 | | -#endif /* DHDTCPACK_SUPPRESS */ |
|---|
| 41 | +#endif /* DHDTCPACK_SUPPRESS || DHDTCPSYNC_FLOOD_BLK */ |
|---|
| 41 | 42 | |
|---|
| 42 | 43 | typedef enum pkt_frag |
|---|
| 43 | 44 | { |
|---|
| .. | .. |
|---|
| 49 | 50 | |
|---|
| 50 | 51 | extern pkt_frag_t pkt_frag_info(osl_t *osh, void *p); |
|---|
| 51 | 52 | |
|---|
| 53 | +#ifdef DHDTCPSYNC_FLOOD_BLK |
|---|
| 54 | +typedef enum tcp_hdr_flags { |
|---|
| 55 | + FLAG_SYNC, |
|---|
| 56 | + FLAG_SYNCACK, |
|---|
| 57 | + FLAG_RST, |
|---|
| 58 | + FLAG_OTHERS |
|---|
| 59 | +} tcp_hdr_flag_t; |
|---|
| 60 | + |
|---|
| 61 | +extern tcp_hdr_flag_t dhd_tcpdata_get_flag(dhd_pub_t *dhdp, void *pkt); |
|---|
| 62 | +#endif /* DHDTCPSYNC_FLOOD_BLK */ |
|---|
| 63 | + |
|---|
| 52 | 64 | #ifdef DHDTCPACK_SUPPRESS |
|---|
| 53 | 65 | #define TCPACKSZMIN (ETHER_HDR_LEN + IPV4_MIN_HEADER_LEN + TCP_MIN_HEADER_LEN) |
|---|
| 54 | 66 | /* Size of MAX possible TCP ACK packet. Extra bytes for IP/TCP option fields */ |
|---|
| .. | .. |
|---|
| 57 | 69 | /* Max number of TCP streams that have own src/dst IP addrs and TCP ports */ |
|---|
| 58 | 70 | #define TCPACK_INFO_MAXNUM 4 |
|---|
| 59 | 71 | #define TCPDATA_INFO_MAXNUM 4 |
|---|
| 60 | | -#define TCPDATA_PSH_INFO_MAXNUM (16 * TCPDATA_INFO_MAXNUM) |
|---|
| 72 | +#define TCPDATA_PSH_INFO_MAXNUM (8 * TCPDATA_INFO_MAXNUM) |
|---|
| 61 | 73 | |
|---|
| 62 | 74 | #define TCPDATA_INFO_TIMEOUT 5000 /* Remove tcpdata_info if inactive for this time (in ms) */ |
|---|
| 63 | 75 | |
|---|