summaryrefslogtreecommitdiffstats
path: root/stacks/lwip_stack/lwip_src/include/stackx/spl_tcpip.h
blob: 331255b6c58e2615a434d39aaac4b918483e6dad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
*
* Copyright (c) 2018 Huawei Technologies Co.,Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef __STACKX_TCPIP_H__
#define __STACKX_TCPIP_H__

#include "spl_opt.h"
#include "stackx/spl_ip_addr.h"
#include "tcp.h"

#define USEAGE_LOW 60
#define USEAGE_HIGHT 80
#define USEAGE_INVALID 0xFF

/*** Put into stackx_instance *********

************************************/
#include "stackx/spl_api_msg.h"
#include "netifapi.h"
#include "stackx/spl_pbuf.h"
#include "stackx/spl_api.h"
#include "sys.h"
#include "netif.h"
#include "ip_module_api.h"
#include "internal_msg.h"
#include "pbuf.h"

#ifdef __cplusplus
/* *INDENT-OFF* */
extern "C" {
/* *INDENT-ON* */
#endif

/** Function prototype for send timeout message */
err_t ltt_apimsg(sys_timeout_handler h, void *arg);

/** Function prototype for the init_done function passed to tcpip_init */
typedef void (*tcpip_init_done_fn) (void *arg);

/** Function prototype for functions passed to tcpip_callback() */
typedef void (*tcpip_callback_fn) (void *ctx);

int init_by_main_thread();
int init_by_tcpip_thread();
err_t spl_tcpip_input(struct pbuf *p, struct netif *inp);

int post_ip_module_msg(void *arg, ip_module_type type,
                       ip_module_operate_type operate_type);
int process_ip_module_msg(void *arg, ip_module_type type,
                          ip_module_operate_type operate_type);
int init_new_network_configuration();

#if STACKX_NETIF_API
err_t tcpip_netif_add(msg_add_netif * tmp);
#endif /* STACKX_NETIF_API */

err_t ltt_clearTmrmsg(void *pcb, void *arg);

sys_mbox_t get_primary_box();

#ifdef __cplusplus
/* *INDENT-OFF* */
}
/* *INDENT-ON* */
#endif

#endif /* __STACKX_TCPIP_H__ */