aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-01-20 21:11:13 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-01-21 18:01:36 +0100
commitf38114eee2caae36d345691468bef8c2611e7547 (patch)
treee451a214e4acca9711b4df5d7e3f4fd00fee112c /include
parente250ac3f4bdac174871b80183884c88c1419d810 (diff)
udp: Allow to run multiple links through the same socket
The UDP socket will be shared between multiple links, the snmp session will be also shared between multiple links on the same hardware.
Diffstat (limited to 'include')
-rw-r--r--include/bsc_data.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/include/bsc_data.h b/include/bsc_data.h
index 758932f..587afec 100644
--- a/include/bsc_data.h
+++ b/include/bsc_data.h
@@ -40,19 +40,27 @@
struct bsc_data;
struct snmp_mtp_session;
+struct mtp_udp_data {
+ struct write_queue write_queue;
+ struct snmp_mtp_session *session;
+
+ struct llist_head links;
+};
+
struct mtp_udp_link {
/* subclass */
struct mtp_link base;
/* UDP specific stuff */
struct bsc_data *bsc;
- struct write_queue write_queue;
- struct sockaddr_in remote;
- struct snmp_mtp_session *session;
int link_index;
int reset_timeout;
-};
+ struct sockaddr_in remote;
+
+ struct mtp_udp_data *data;
+ struct llist_head entry;
+};
struct bsc_data {
/* MSC */
@@ -88,6 +96,9 @@ struct bsc_data {
/* mgcp messgaes */
struct write_queue mgcp_agent;
+ /* udp code */
+ struct mtp_udp_data udp_data;
+
int dpc;
int opc;
int sccp_opc;
@@ -129,7 +140,8 @@ void update_con_state(struct mtp_link_set *link, int rc, struct sccp_parse_resul
unsigned int sls_for_src_ref(struct sccp_source_reference *ref);
/* udp init */
-int link_udp_init(struct mtp_udp_link *data, int src_port, const char *dest_ip, int port);
+int link_global_init(struct mtp_udp_data *data, int src_port);
+int link_udp_init(struct mtp_udp_link *data, const char *dest_ip, int port);
int link_init(struct bsc_data *bsc);
int link_shutdown_all(struct mtp_link_set *);
int link_reset_all(struct mtp_link_set *);