diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-02-03 11:03:45 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-02-03 11:03:45 +0100 |
commit | 62e836c53394acccc83283ba6b11d462ba8e8483 (patch) | |
tree | 1fa62b745fb8b570bf14dd59493e1b87890a4811 /openbsc/include | |
parent | 77f7afe08e2529ff7be301f6cf5298207370807f (diff) |
[mgcp] Make the mgcp_protocol generate a struct msgb*
Do not directly send data from inside the mgcp_protocol.c
implementation. Instead allocate and return a struct msgb*. The
caller can then either wrap that into the IPA protcol or directly
send it over the UDP socket.
Diffstat (limited to 'openbsc/include')
-rw-r--r-- | openbsc/include/openbsc/mgcp.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/openbsc/include/openbsc/mgcp.h b/openbsc/include/openbsc/mgcp.h index 114b39546..ee721d88d 100644 --- a/openbsc/include/openbsc/mgcp.h +++ b/openbsc/include/openbsc/mgcp.h @@ -21,6 +21,11 @@ * */ +#ifndef OPENBSC_MGCP_H +#define OPENBSC_MGCP_H + +#include "msgb.h" + #define RTP_PORT_DEFAULT 4000 extern unsigned int rtp_base_port; @@ -49,8 +54,9 @@ static inline int rtp_calculate_port(int multiplex, int base) } int mgcp_parse_config(const char *config_file, struct gsm_network *dummy_network); -int mgcp_handle_message(int fd, struct msgb *msg, struct sockaddr_in *source); -int mgcp_send_rsip(int fd, struct sockaddr_in *source); + +struct msgb *mgcp_handle_message(struct msgb *msg); +struct msgb *mgcp_create_rsip(void); int mgcp_vty_init(void); /* endpoint managed */ @@ -60,3 +66,5 @@ int mgcp_vty_init(void); typedef int (*mgcp_change)(int endpoint, int state, int local_rtp, void *); void mgcp_set_change_cb(mgcp_change cb, void *data); + +#endif |