Skip to content

Commit 23f8ac9

Browse files
author
Mika Leppänen
committed
Removed random and tcp_isn modules header dependencies to lwip conf
1 parent 5fdd723 commit 23f8ac9

File tree

6 files changed

+13
-15
lines changed

6 files changed

+13
-15
lines changed

features/FEATURE_LWIP/lwip-interface/lwip-sys/lwip_random.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
* limitations under the License.
1515
*/
1616

17+
#include "lwip/opt.h"
18+
#include "lwip/debug.h"
19+
#include "lwip/def.h"
1720
#include "lwip_random.h"
1821

1922
#if FEATURE_COMMON_PAL

features/FEATURE_LWIP/lwip-interface/lwip-sys/lwip_random.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
#ifndef LWIP_HDR_RANDOM_H
1818
#define LWIP_HDR_RANDOM_H
1919

20-
#include "lwip/opt.h"
21-
#include "lwip/debug.h"
22-
#include "lwip/def.h"
23-
2420
#ifdef __cplusplus
2521
extern "C" {
2622
#endif

features/FEATURE_LWIP/lwip-interface/lwip-sys/lwip_tcp_isn.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
* Author: David van Moolenbroek <[email protected]>
7171
*/
7272

73-
#include "lwip_tcp_isn.h"
73+
#include "lwip/opt.h"
7474
#include "lwip/ip_addr.h"
7575
#include "lwip/sys.h"
7676
#include <string.h>
@@ -122,13 +122,16 @@ lwip_init_tcp_isn(u32_t boot_time, const u8_t *secret_16_bytes)
122122
* @param remote_port The remote port number, in host-byte order.
123123
* @return The ISN to use for the new TCP connection.
124124
*/
125+
125126
u32_t
126-
lwip_hook_tcp_isn(const ip_addr_t *local_ip, u16_t local_port,
127-
const ip_addr_t *remote_ip, u16_t remote_port)
127+
lwip_hook_tcp_isn(const void *local_ip_ptr, u16_t local_port,
128+
const void *remote_ip_ptr, u16_t remote_port)
128129
{
129130
lwip_md5_context ctx;
130131
u8_t output[16];
131132
u32_t isn;
133+
const ip_addr_t *local_ip = local_ip_ptr;
134+
const ip_addr_t *remote_ip = remote_ip_ptr;
132135

133136
#if LWIP_IPV4 && LWIP_IPV6
134137
if (IP_IS_V6(local_ip))

features/FEATURE_LWIP/lwip-interface/lwip-sys/lwip_tcp_isn.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,14 @@
3030
#ifndef LWIP_HDR_CONTRIB_ADDONS_TCP_ISN_H
3131
#define LWIP_HDR_CONTRIB_ADDONS_TCP_ISN_H
3232

33-
#include "lwip/opt.h"
34-
#include "lwip/ip_addr.h"
35-
3633
#ifdef __cplusplus
3734
extern "C" {
3835
#endif
3936

40-
void lwip_init_tcp_isn(u32_t boot_time, const u8_t *secret_16_bytes);
41-
u32_t lwip_hook_tcp_isn(const ip_addr_t *local_ip, u16_t local_port,
42-
const ip_addr_t *remote_ip, u16_t remote_port);
37+
void lwip_init_tcp_isn(uint32_t boot_time, const uint8_t *secret_16_bytes);
38+
uint32_t lwip_hook_tcp_isn(const void *local_ip, uint16_t local_port,
39+
const void *remote_ip, uint16_t remote_port);
40+
4341

4442
#ifdef __cplusplus
4543
}

features/FEATURE_LWIP/lwip-interface/lwip_stack.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
#include "netif/lwip_ethernet.h"
3838
#include "emac_api.h"
3939
#include "ppp_lwip.h"
40-
#include "lwip_tcp_isn.h"
4140

4241
static nsapi_error_t mbed_lwip_err_remap(err_t err);
4342

features/FEATURE_LWIP/lwip-interface/lwipopts.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@
309309
#define DNS_TABLE_SIZE 2
310310
#define DNS_MAX_NAME_LENGTH 128
311311

312-
#include <lwip/arch.h>
313312
#include "lwip_random.h"
314313
#include "lwip_tcp_isn.h"
315314
#define LWIP_HOOK_TCP_ISN lwip_hook_tcp_isn

0 commit comments

Comments
 (0)