aboutsummaryrefslogtreecommitdiffstats
path: root/src/links.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-03-18 19:25:42 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-03-18 19:25:42 +0100
commit3c0d6b3f6253d57a5e3a7045b0ac6d49fbe3f9e9 (patch)
tree499632af1a1ef6aaf4a5d783061b8eb39449aea8 /src/links.c
parent83227e4dde874d02601e129fdb4f5bc5a95c0e20 (diff)
link_sets: Create a new file with just the generic linkset in there
Diffstat (limited to 'src/links.c')
-rw-r--r--src/links.c86
1 files changed, 0 insertions, 86 deletions
diff --git a/src/links.c b/src/links.c
index 4d3cdf0..59b45c8 100644
--- a/src/links.c
+++ b/src/links.c
@@ -26,9 +26,6 @@
#include <mtp_data.h>
#include <mtp_level3.h>
#include <mtp_pcap.h>
-#include <snmp_mtp.h>
-
-#include <osmocom/core/talloc.h>
extern struct bsc_data *bsc;
@@ -88,89 +85,6 @@ void mtp_link_restart(struct mtp_link *link)
link->reset(link);
}
-struct mtp_link_set *link_set_create(struct bsc_data *bsc)
-{
- struct mtp_link_set *set;
-
- set = mtp_link_set_alloc(bsc);
- set->name = talloc_strdup(set, "MTP");
-
- set->ni = MTP_NI_NATION_NET;
- set->spare = 0;
-
- set->supported_ssn[1] = 1;
- set->supported_ssn[7] = 1;
- set->supported_ssn[8] = 1;
- set->supported_ssn[146] = 1;
- set->supported_ssn[254] = 1;
-
- return set;
-}
-
-int link_set_init_links(struct bsc_data *bsc, struct mtp_link_set *set)
-{
- int i;
- struct mtp_udp_link *lnk;
- struct mtp_link *blnk;
-
-
- if (!bsc->udp_src_port) {
- LOGP(DINP, LOGL_ERROR, "You need to set a UDP address.\n");
- return -1;
- }
-
- LOGP(DINP, LOGL_NOTICE, "Using UDP MTP mode.\n");
-
- if (link_global_init(&bsc->udp_data) != 0)
- return -1;
-
- if (link_global_bind(&bsc->udp_data, bsc->udp_src_port) != 0)
- return -1;
-
- for (i = 1; i <= bsc->udp_nr_links; ++i) {
- blnk = mtp_link_alloc(set);
- lnk = mtp_udp_link_init(blnk);
-
- lnk->link_index = i;
-
- /* now connect to the transport */
- if (snmp_mtp_peer_name(lnk->session, bsc->udp_ip) != 0)
- return -1;
-
- if (link_udp_init(lnk, bsc->udp_ip, bsc->udp_port) != 0)
- return -1;
- }
-
- return 0;
-}
-
-int link_set_shutdown_links(struct mtp_link_set *set)
-{
- struct mtp_link *lnk;
-
- llist_for_each_entry(lnk, &set->links, entry)
- lnk->shutdown(lnk);
- return 0;
-}
-
-int link_set_reset_links(struct mtp_link_set *set)
-{
- struct mtp_link *lnk;
-
- llist_for_each_entry(lnk, &set->links, entry)
- lnk->reset(lnk);
- return 0;
-}
-
-int link_set_clear_links(struct mtp_link_set *set)
-{
- struct mtp_link *lnk;
-
- llist_for_each_entry(lnk, &set->links, entry)
- lnk->clear_queue(lnk);
- return 0;
-}
-
int mtp_handle_pcap(struct mtp_link *link, int dir, const uint8_t *data, int len)
{
if (link->pcap_fd >= 0)