Commit 7241aa6a authored by Xenofon Foukas's avatar Xenofon Foukas

Added support for parameters in handlers

parent 4f618d61
......@@ -98,7 +98,7 @@ int prp_create_header(uint32_t xid, Protocol__PrpType type, Protocol__PrpHeader
}
int enb_agent_hello(uint32_t xid, Protocol__ProgranMessage **msg) {
int enb_agent_hello(uint32_t xid, const void *params, Protocol__ProgranMessage **msg) {
Protocol__PrpHeader *header;
if (prp_create_header(xid, PROTOCOL__PRP_TYPE__PRPT_HELLO, &header) != 0)
......@@ -150,7 +150,7 @@ int enb_agent_destroy_hello_message(Protocol__ProgranMessage *msg) {
}
int enb_agent_echo_request(uint32_t xid, Protocol__ProgranMessage **msg) {
int enb_agent_echo_request(uint32_t xid, const void* params, Protocol__ProgranMessage **msg) {
Protocol__PrpHeader *header;
if (prp_create_header(xid, PROTOCOL__PRP_TYPE__PRPT_ECHO_REQUEST, &header) != 0)
goto error;
......@@ -199,7 +199,7 @@ int enb_agent_destroy_echo_request(Protocol__ProgranMessage *msg) {
int enb_agent_echo_reply(uint32_t xid, Protocol__ProgranMessage **msg) {
int enb_agent_echo_reply(uint32_t xid, const void *params, Protocol__ProgranMessage **msg) {
Protocol__PrpHeader *header;
if (prp_create_header(xid, PROTOCOL__PRP_TYPE__PRPT_ECHO_REPLY, &header) != 0)
goto error;
......
......@@ -49,6 +49,7 @@
typedef int (*enb_agent_message_decoded_callback)(
uint32_t xid,
const void *params,
Protocol__ProgranMessage **msg
);
......@@ -59,13 +60,13 @@ int enb_agent_deserialize_message(void *data, int size, Protocol__ProgranMessage
int prp_create_header(uint32_t xid, Protocol__PrpType type, Protocol__PrpHeader **header);
int enb_agent_hello(uint32_t xid, Protocol__ProgranMessage **msg);
int enb_agent_hello(uint32_t xid, const void *params, Protocol__ProgranMessage **msg);
int enb_agent_destroy_hello(Protocol__ProgranMessage *msg);
int enb_agent_echo_request(uint32_t xid, Protocol__ProgranMessage **msg);
int enb_agent_echo_request(uint32_t xid, const void *params, Protocol__ProgranMessage **msg);
int enb_agent_destroy_echo_request(Protocol__ProgranMessage *msg);
int enb_agent_echo_reply(uint32_t xid, Protocol__ProgranMessage **msg);
int enb_agent_echo_reply(uint32_t xid, const void *params, Protocol__ProgranMessage **msg);
int enb_agent_destroy_echo_reply(Protocol__ProgranMessage *msg);
......
......@@ -83,7 +83,7 @@ Protocol__ProgranMessage* enb_agent_handle_message (uint32_t xid,
}
err_code= ((*messages_callback[decoded_message->msg_case-1][decoded_message->msg_dir-1])(xid, &reply_message));
err_code= ((*messages_callback[decoded_message->msg_case-1][decoded_message->msg_dir-1])(xid, (void *) decoded_message, &reply_message));
if ( err_code < 0 ){
goto error;
}
......
......@@ -40,7 +40,7 @@
#include "LAYER2/RLC/rlc.h"
#include "log.h"
int enb_agent_mac_reply(uint32_t xid, Protocol__ProgranMessage **msg){
int enb_agent_mac_reply(uint32_t xid, const void *params, Protocol__ProgranMessage **msg){
void *buffer;
int size;
......
......@@ -68,7 +68,7 @@ typedef struct {
} report_config_t;
int enb_agent_mac_reply(uint32_t xid, Protocol__ProgranMessage **msg);
int enb_agent_mac_reply(uint32_t xid, const void *params, Protocol__ProgranMessage **msg);
int enb_agent_mac_stats_reply(uint32_t xid, const report_config_t *report_config, Protocol__ProgranMessage **msg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment