aboutsummaryrefslogtreecommitdiffstats
path: root/sigtran/sua_client_test.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-12-22 23:05:10 +0100
committerHarald Welte <laforge@gnumonks.org>2015-12-23 00:04:05 +0100
commit38a4f32d580cda9194d7c0cc9e92cbabd4af568d (patch)
tree258e1a2f0c79ec897035cd94d5ca1749cecdb5ae /sigtran/sua_client_test.c
parent269b8ac7ee49b84bda9ab3d57a37689c08e2fab9 (diff)
remove sigtran code, now part of libosmo-sccp
Diffstat (limited to 'sigtran/sua_client_test.c')
-rw-r--r--sigtran/sua_client_test.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/sigtran/sua_client_test.c b/sigtran/sua_client_test.c
deleted file mode 100644
index 968a7d1..0000000
--- a/sigtran/sua_client_test.c
+++ /dev/null
@@ -1,57 +0,0 @@
-#include "sua_test_common.h"
-
-struct osmo_sua_user *g_user;
-struct sua_link *g_link;
-
-static int sccp_sap_up(struct osmo_prim_hdr *oph, void *link)
-{
- struct osmo_scu_prim *prim = (struct osmo_scu_prim *) oph;
- struct osmo_prim_hdr *resp = NULL;
- uint8_t payload[] = { 0xa1, 0xa2, 0xa3 };
-
- printf("sccp_sap_up(%s)\n", osmo_sccp_prim_name(oph));
-
- switch (OSMO_PRIM_HDR(oph)) {
- case OSMO_PRIM(OSMO_SCU_PRIM_N_CONNECT, PRIM_OP_CONFIRM):
- printf("N-CONNECT.ind(%u), issuing DATA.req\n",
- prim->u.connect.conn_id);
- resp = make_dt1_req(prim->u.connect.conn_id, payload, sizeof(payload));
- break;
- }
-
- if (resp)
- osmo_sua_user_link_down(link, resp);
-
- msgb_free(oph->msg);
- return 0;
-}
-
-
-int main(int argc, char **argv)
-{
- void *ctx = talloc_named_const(NULL, 1, "root");
- int rc;
-
- osmo_sua_set_log_area(DSUA);
- xua_set_log_area(DXUA);
-
- osmo_init_logging(&test_log_info);
-
- g_user = osmo_sua_user_create(ctx, sccp_sap_up);
-
- rc = osmo_sua_client_connect(g_user, "127.0.0.1", 2342);
- if (rc < 0) {
- exit(1);
- }
-
- g_link = osmo_sua_client_get_link(g_user);
-
- int i = 8000;
-
- while (1) {
- if (i < 8010)
- tx_conn_req(g_link, i++);
- //tx_unitdata(g_link);
- osmo_select_main(0);
- }
-}