My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
msu_type_list.h
Go to the documentation of this file.
1 /*
2 START OF LICENSE STUB
3  DeDOS: Declarative Dispersion-Oriented Software
4  Copyright (C) 2017 University of Pennsylvania, Georgetown University
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 END OF LICENSE STUB
19 */
27 #ifndef MSU_TYPE_LIST_H_
28 #define MSU_TYPE_LIST_H_
29 
30 // These MSUs are always included
31 #include "socket_msu.h"
32 
33 // These ifdef guards below allow you to optionally compile different groups of MSUS
34 // Define the appropriate macro in the Makefile to enable compilation of the
35 // MSU group
36 
37 #ifdef COMPILE_BAREMETAL_MSUS
40 #define BAREMETAL_MSUS \
41  &BAREMETAL_MSU_TYPE, \
42  &BAREMETAL_SOCK_MSU_TYPE,
43 #else
44 #define BAREMETAL_MSUS
45 #endif
46 
48 #ifdef COMPILE_WEBSERVER_MSUS
49 #include "webserver/read_msu.h"
50 #include "webserver/http_msu.h"
51 #include "webserver/regex_msu.h"
53 #include "webserver/cache_msu.h"
54 #include "webserver/fileio_msu.h"
55 #include "webserver/write_msu.h"
56 
58 #define WEBSERVER_MSUS \
59  &WEBSERVER_READ_MSU_TYPE, \
60  &WEBSERVER_HTTP_MSU_TYPE, \
61  &WEBSERVER_REGEX_MSU_TYPE, \
62  &WEBSERVER_REGEX_ROUTING_MSU_TYPE, \
63  &WEBSERVER_CACHE_MSU_TYPE, \
64  &WEBSERVER_FILEIO_MSU_TYPE, \
65  &WEBSERVER_WRITE_MSU_TYPE,
66 #else
67 
68 // If the webserver is not enabled, must define this macro to be empty
69 #define WEBSERVER_MSUS
70 #endif
71 
73 #ifdef COMPILE_NDLOG_MSUS
74 #include "ndlog/ndlog_msu_R1_eca.h"
75 #include "ndlog/ndlog_recv_msu.h"
76 #include "ndlog/ndlog_routing_msu.h"
78 #define NDLOG_MSUS \
79  &NDLOG_MSU_TYPE, \
80  &NDLOG_RECV_MSU_TYPE, \
81  &NDLOG_ROUTING_MSU_TYPE,
82 #else
83 #define NDLOG_MSUS
84 #endif
85 
87 #ifdef COMPILE_PICO_TCP_MSUS
88 #include "pico_tcp/msu_pico_tcp.h"
89 #include "pico_tcp/msu_tcp_handshake.h"
90 #include "pico_tcp/msu_app_tcp_echo.h"
91 
93 #define PICO_TCP_MSUS \
94  &PICO_TCP_MSU_TYPE, \
95  &TCP_HANDSHAKE_MSU_TYPE, \
96  &MSU_APP_TCP_ECHO_TYPE,
97 #else
98 #define PICO_TCP_MSUS
99 #endif
100 
104 #ifndef MSU_TYPE_LIST
105 #define MSU_TYPE_LIST \
106  { \
107  &SOCKET_MSU_TYPE, \
108  BAREMETAL_MSUS \
109  WEBSERVER_MSUS \
110  NDLOG_MSUS \
111  PICO_TCP_MSUS \
112  }
113 #endif
114 
115 #endif