bsc: Remove the global link_set pointer from the bsc
Start removing the static names for the linkset
diff --git a/include/bsc_data.h b/include/bsc_data.h
index a72ea6a..bd599df 100644
--- a/include/bsc_data.h
+++ b/include/bsc_data.h
@@ -123,8 +123,8 @@
int setup;
int pcap_fd;
int udp_reset_timeout;
- struct mtp_link_set *link_set;
struct mtp_link_set *m2ua_set;
+ struct llist_head links;
/* udp code */
struct mtp_udp_data udp_data;
@@ -176,7 +176,7 @@
/* udp init */
int link_global_init(struct mtp_udp_data *data, int src_port);
int link_udp_init(struct mtp_udp_link *data, char *dest_ip, int port);
-int link_init(struct bsc_data *bsc);
+struct mtp_link_set *link_init(struct bsc_data *bsc);
int link_shutdown_all(struct mtp_link_set *);
int link_reset_all(struct mtp_link_set *);
int link_clear_all(struct mtp_link_set *);
diff --git a/include/mtp_data.h b/include/mtp_data.h
index 1fa9277..e8cb79e 100644
--- a/include/mtp_data.h
+++ b/include/mtp_data.h
@@ -41,6 +41,8 @@
* The state of the mtp_link in terms of layer3 and upwards
*/
struct mtp_link_set {
+ struct llist_head entry;
+
/* routing info.. */
int dpc, opc, sccp_opc, isup_opc;
int ni;
@@ -73,6 +75,7 @@
/* custom data */
struct bsc_data *bsc;
struct bsc_msc_forward *fw;
+ struct mtp_link_set *forward;
};
/**