aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-02-15 11:18:38 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-02-17 19:34:27 +0100
commit599c9a4b9aa3faa0b9c05dfcf6057ad9ccd4dfa6 (patch)
tree40716cc4f1523af395aaa4902458faabc74389e2 /include
parent2ff47b8606d93a301cf6cecb0d32fa4b77f5c5c9 (diff)
mtp: Allocate the MTPLinkSet as a child of the BSC
In preparation of the VTY code change, make the mtp linkset a child of the bsc.
Diffstat (limited to 'include')
-rw-r--r--include/bsc_data.h4
-rw-r--r--include/mtp_data.h11
2 files changed, 9 insertions, 6 deletions
diff --git a/include/bsc_data.h b/include/bsc_data.h
index 189ddcb..df62493 100644
--- a/include/bsc_data.h
+++ b/include/bsc_data.h
@@ -123,7 +123,6 @@ struct bsc_data {
int setup;
int pcap_fd;
int udp_reset_timeout;
- struct llist_head links;
/* udp code */
struct mtp_udp_data udp_data;
@@ -145,6 +144,9 @@ struct bsc_data {
/* isup handling */
int isup_pass;
+ /* MTP Links */
+ struct llist_head linksets;
+ int num_linksets;
/* inject */
int allow_inject;
diff --git a/include/mtp_data.h b/include/mtp_data.h
index e8cb79e..3330de6 100644
--- a/include/mtp_data.h
+++ b/include/mtp_data.h
@@ -42,13 +42,15 @@ struct rate_ctr_group;
*/
struct mtp_link_set {
struct llist_head entry;
+ int no;
+ char *name;
+
/* routing info.. */
int dpc, opc, sccp_opc, isup_opc;
int ni;
int spare;
- const char *name;
/* internal state */
/* the MTP1 link is up */
@@ -120,7 +122,6 @@ struct mtp_link {
};
-struct mtp_link_set *mtp_link_set_alloc(void);
void mtp_link_set_stop(struct mtp_link_set *link);
void mtp_link_set_reset(struct mtp_link_set *link);
int mtp_link_set_data(struct mtp_link *link, struct msgb *msg);
@@ -134,9 +135,6 @@ void mtp_link_block(struct mtp_link *link);
void mtp_link_unblock(struct mtp_link *link);
-/* one time init function */
-void mtp_link_set_init(void);
-
/* to be implemented for MSU sending */
void mtp_link_submit(struct mtp_link *link, struct msgb *msg);
void mtp_link_set_forward_sccp(struct mtp_link_set *link, struct msgb *msg, int sls);
@@ -158,4 +156,7 @@ void mtp_link_failure(struct mtp_link *fail);
/* internal routines */
struct msgb *mtp_msg_alloc(struct mtp_link_set *link);
+/* link management */
+struct mtp_link_set *mtp_link_set_alloc(struct bsc_data *bsc);
+
#endif