My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
regex_routing_msu.c
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 */
20 #include "msu_message.h"
21 #include "local_msu.h"
22 #include "msu_calls.h"
23 
25 #include "webserver/regex_msu.h"
26 
27 static int routing_receive(struct local_msu *self, struct msu_msg *msg) {
28  return call_msu_type(self, &WEBSERVER_REGEX_MSU_TYPE, &msg->hdr, msg->data_size, msg->data);
29 }
30 
32  .name = "Regex_Routing_MSU",
34  .receive = routing_receive
35 };
struct msu_type WEBSERVER_REGEX_MSU_TYPE
Definition: regex_msu.c:48
void * data
Payload.
Definition: msu_message.h:104
Declares the methods available for calling an MSU from another MSU.
size_t data_size
Payload size.
Definition: msu_message.h:103
Declares the structures and functions applicable to MSUs on the local machine.
struct msu_type WEBSERVER_REGEX_ROUTING_MSU_TYPE
The structure that represents an MSU located on the local machine.
Definition: local_msu.h:38
static int routing_receive(struct local_msu *self, struct msu_msg *msg)
int call_msu_type(struct local_msu *sender, struct msu_type *dst_type, struct msu_msg_hdr *hdr, size_t data_size, void *data)
Sends an MSU message to a destination of the given type, utilizing the sending MSU's routing function...
Definition: msu_calls.c:146
Defines a type of MSU.
Definition: msu_type.h:46
#define WEBSERVER_REGEX_ROUTING_MSU_TYPE_ID
Definition: msu_ids.h:30
struct msu_msg_hdr hdr
Definition: msu_message.h:102
A message that is to be delivered to an instance of an MSU.
Definition: msu_message.h:101
Messages passed to MSUs.
char * name
Name for the msu type.
Definition: msu_type.h:48