Embedded TCP/IP stack: fnet_stack.h Source File

FNET

fnet_stack.h
1 /**************************************************************************
2 *
3 * Copyright 2011-2015 by Andrey Butok. FNET Community.
4 * Copyright 2008-2010 by Andrey Butok. Freescale Semiconductor, Inc.
5 *
6 ***************************************************************************
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License"); you may
9 * not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 *
20 ***************************************************************************
21 *
22 * Main including header for the FNET TCP/IP stack.
23 *
24 ***************************************************************************/
25 
26 #ifndef _FNET_STACK_H_
27 
28 #define _FNET_STACK_H_
29 
30 #include "fnet_assert.h"
31 #include "fnet_error.h"
32 #include "fnet_stdlib.h"
33 #include "fnet_socket.h"
34 #include "fnet_inet.h"
35 #include "fnet_ip4.h"
36 #include "fnet_ip6.h"
37 #include "fnet_netif.h"
38 #include "fnet_timer.h"
39 #include "fnet_debug.h"
40 #include "fnet_eth.h"
41 #include "fnet_wifi.h"
42 #include "fnet_isr.h"
43 #include "fnet_netbuf.h"
44 #include "fnet_arp.h"
45 
82 #if FNET_CFG_MULTITHREADING || defined(__DOXYGEN__)
83 
84 /**************************************************************************/
88 typedef void *fnet_mutex_t;
89 
90 /**************************************************************************/
95 typedef struct
96 {
97  fnet_return_t (*mutex_init)( fnet_mutex_t * );
98  void (*mutex_free)( fnet_mutex_t * );
99  void (*mutex_lock)( fnet_mutex_t * );
100  void (*mutex_unlock)( fnet_mutex_t * );
102 #endif /* FNET_CFG_MULTITHREADING */
103 
104 
105 /**************************************************************************/
109 {
110  void *netheap_ptr;
123 #if FNET_CFG_MULTITHREADING || defined(__DOXYGEN__)
125 #endif
126 };
127 
128 #if defined(__cplusplus)
129 extern "C" {
130 #endif
131 
132 /***************************************************************************/
152 fnet_return_t fnet_init( struct fnet_init_params *init_params );
153 
154 /***************************************************************************/
166 void fnet_release(void);
167 
168 #if defined(__cplusplus)
169 }
170 #endif
171 
174 #endif /* _FNET_STACK_H_ */
175 
Input parameters structure for fnet_init()
Definition: fnet_stack.h:108
void fnet_release(void)
Releases the FNET TCP/IP stack.
void * netheap_ptr
Pointer to the FNET heap buffer. The FNET uses this heap buffer for the internal dynamic data alloc...
Definition: fnet_stack.h:110
fnet_return_t fnet_init(struct fnet_init_params *init_params)
Initializes the FNET TCP/IP stack.
fnet_return_t
General return codes, used by most of API functions.
Definition: fnet_stdlib.h:90
Mutex API. It should be defined by application if FNET_CFG_MULTITHREADING is enabled.
Definition: fnet_stack.h:95
unsigned long fnet_size_t
Unsigned integer type representing the size in bytes.
Definition: fnet_stdlib.h:56
const fnet_mutex_api_t * mutex_api
Mutex API. It is optional and availble only when FNET_CFG_MULTITHREADING is set.
Definition: fnet_stack.h:124
fnet_size_t netheap_size
Size of the FNET heap buffer.
Definition: fnet_stack.h:122
void * fnet_mutex_t
Mutex type.
Definition: fnet_stack.h:88

© 2005-2018 by Andrey Butok. http://fnet.sourceforge.net