aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2011-01-20 16:30:24 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2011-01-20 19:07:16 +0100
commita8ce061d86c3b6bd1f21655edf063a0c8c1a94f0 (patch)
treedb18d3e37565b70545d94c05b14876b689d5f471 /include
parent2d845fca0c2e3561593e2255dbe7f53fdee9e144 (diff)
mtp: Move the link testing into a new file for mtp_link
The link testing should work under the linkset and if the SLTM is failing the link should be taken down and it should be restarted.
Diffstat (limited to 'include')
-rw-r--r--include/bsc_data.h2
-rw-r--r--include/mtp_data.h37
2 files changed, 26 insertions, 13 deletions
diff --git a/include/bsc_data.h b/include/bsc_data.h
index 3d10bb3..758932f 100644
--- a/include/bsc_data.h
+++ b/include/bsc_data.h
@@ -112,8 +112,6 @@ struct bsc_data {
/* bsc related functions */
void release_bsc_resources(struct bsc_data *bsc);
-void mtp_link_down(struct mtp_link *data);
-void mtp_link_up(struct mtp_link *data);
void mtp_linkset_down(struct mtp_link_set *);
void mtp_linkset_up(struct mtp_link_set *);
diff --git a/include/mtp_data.h b/include/mtp_data.h
index 56886b4..0401f4d 100644
--- a/include/mtp_data.h
+++ b/include/mtp_data.h
@@ -26,6 +26,7 @@
struct bsc_data;
struct mtp_link;
+struct mtp_level_3_mng *mng;
/* MTP Level3 timers */
@@ -52,19 +53,9 @@ struct mtp_link_set {
int last_sls;
- /* misc data */
- uint8_t test_ptrn[14];
-
- int sltm_pending;
- int sltm_once;
- int was_up;
-
- int slta_misses;
- struct timer_list t1_timer;
- struct timer_list t2_timer;
-
struct llist_head links;
struct mtp_link *slc[16];
+ int sltm_once;
/* special handling */
int pass_all_isup;
@@ -89,6 +80,17 @@ struct mtp_link {
struct timer_list link_activate;
+ /* link test routine */
+ uint8_t test_ptrn[14];
+
+ int sltm_pending;
+ int was_up;
+
+ int slta_misses;
+ struct timer_list t1_timer;
+ struct timer_list t2_timer;
+
+ /* callback's to implement */
int (*start)(struct mtp_link *);
int (*write)(struct mtp_link *, struct msgb *msg);
int (*shutdown)(struct mtp_link *);
@@ -118,4 +120,17 @@ void mtp_link_set_forward_isup(struct mtp_link_set *link, struct msgb *msg, int
void mtp_link_restart(struct mtp_link *link);
void mtp_link_set_sccp_down(struct mtp_link_set *link);
+/* link related routines */
+void mtp_link_down(struct mtp_link *data);
+void mtp_link_up(struct mtp_link *data);
+
+void mtp_link_init(struct mtp_link *link);
+void mtp_link_start_link_test(struct mtp_link *link);
+void mtp_link_stop_link_test(struct mtp_link *link);
+int mtp_link_slta(struct mtp_link *link, uint16_t l3_len, struct mtp_level_3_mng *mng);
+
+/* internal routines */
+struct msgb *mtp_msg_alloc(struct mtp_link_set *link);
+void mtp_link_set_trasmit(struct mtp_link *link, int sls, struct msgb *msg);
+
#endif