Embedded TCP/IP stack  4.7.0
fnet_service.h
1 /**************************************************************************
2 *
3 * Copyright 2008-2018 by Andrey Butok. FNET Community
4 *
5 ***************************************************************************
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License"); you may
8 * not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 ***************************************************************************
20 *
21 * General service-header file.
22 *
23 ***************************************************************************/
24 
25 #ifndef _FNET_SERVICE_H_
26 
27 #define _FNET_SERVICE_H_
28 
29 #include "serial/fnet_serial.h"
30 #include "shell/fnet_shell.h"
31 #include "sntp/fnet_sntp.h"
32 #include "telnet/fnet_telnet.h"
33 #include "tftp/fnet_tftp_cln.h"
34 #include "tftp/fnet_tftp_srv.h"
35 #include "dhcp/fnet_dhcp_cln.h"
36 #include "dhcp/fnet_dhcp_srv.h"
37 #include "flash/fnet_flash.h"
38 #include "fs/fnet_fs.h"
39 #include "fs/fnet_fs_rom.h"
40 #include "tls/fnet_tls.h"
41 #include "http/fnet_http_srv.h"
42 #include "http/fnet_http_cln.h"
43 #include "dns/fnet_dns.h"
44 #include "ping/fnet_ping.h"
45 #include "llmnr/fnet_llmnr.h"
46 #include "mdns/fnet_mdns.h"
47 #include "autoip/fnet_autoip.h"
48 #include "link/fnet_link.h"
49 #include "tls/fnet_tls.h"
50 #include "bench/fnet_bench_srv.h"
51 #include "bench/fnet_bench_cln.h"
52 #include "azure/fnet_azure.h"
53 
69 /**************************************************************************/
72 typedef void *fnet_service_desc_t;
73 
74 /**************************************************************************/
81 typedef void (* fnet_service_poll_t)(void *service_cookie);
82 
83 #if defined(__cplusplus)
84 extern "C" {
85 #endif
86 
87 /***************************************************************************/
100 void fnet_service_poll(void);
101 
102 /***************************************************************************/
123 fnet_service_desc_t fnet_service_register( fnet_service_poll_t service, void *service_cookie );
124 
125 /***************************************************************************/
142 
143 #if defined(__cplusplus)
144 }
145 #endif
146 
149 #if FNET_CFG_MULTITHREADING
150  void fnet_service_mutex_lock(void);
151  void fnet_service_mutex_unlock(void);
152 #else
153  #define fnet_service_mutex_lock() do{}while(0)
154  #define fnet_service_mutex_unlock() do{}while(0)
155 #endif
156 
157 #endif /* _FNET_SERVICE_H_ */
158 
void(* fnet_service_poll_t)(void *service_cookie)
Service callback function prototype.
Definition: fnet_service.h:81
fnet_service_desc_t fnet_service_register(fnet_service_poll_t service, void *service_cookie)
Registers the service routine in the polling list.
void * fnet_service_desc_t
Descriptor of a registered service.
Definition: fnet_service.h:72
void fnet_service_poll(void)
Service polling function.
void fnet_service_unregister(fnet_service_desc_t desc)
Unregisters the service routine.

© 2005-2020 by Andrej Butok. http://fnet.sourceforge.net