aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-12-20 22:29:40 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-01-01 14:22:28 +0100
commitc94e90298cea3eaf7fca31be3069f6ad274f05e9 (patch)
tree6f83de80a9f7bcb4f525aad517e2617be3e17db9 /include
parentc3dcfa79b90f6f43d651329046846c8a0189b98f (diff)
linkset: Move the UDP socket into the bsc_data to share it between a linkset
Move the write_queue from the link_data to the bsc_data. This way the socket can be used for many links in the same linkset.
Diffstat (limited to 'include')
-rw-r--r--include/bsc_data.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/bsc_data.h b/include/bsc_data.h
index 7906130..4c04e10 100644
--- a/include/bsc_data.h
+++ b/include/bsc_data.h
@@ -52,9 +52,8 @@ struct link_data {
struct timer_list mtp_timeout;
} c7;
struct {
- struct write_queue write_queue;
- struct sockaddr_in remote;
struct snmp_mtp_session *session;
+ struct sockaddr_in remote;
int link_index;
int reset_timeout;
} udp;
@@ -128,6 +127,9 @@ struct bsc_data {
uint16_t lac;
int forward_only;
+
+ /* UDP socket code */
+ struct write_queue udp_write_queue;
};
/* bsc related functions */
@@ -155,7 +157,8 @@ unsigned int sls_for_src_ref(struct sccp_source_reference *ref);
int link_c7_init(struct link_data *data);
/* udp init */
-int link_udp_init(struct link_data *data, int src_port, const char *dest_ip, int port);
+int link_udp_network_init(struct bsc_data *bsc);
+int link_udp_init(struct link_data *link, const char *ip, int port);
/* MGCP */
void mgcp_forward(struct bsc_data *bsc, const uint8_t *data, unsigned int length);