blob: 2aa99f444427a253f28b6757a670917429914a95 [file] [log] [blame]
Harald Welte283c7fd2015-12-21 23:35:56 +01001#pragma once
2
3#include <stdint.h>
4#include <osmocom/core/prim.h>
5
6struct osmo_sua_user;
Harald Welte89607042015-12-21 23:51:08 +01007struct osmo_sua_link;
Harald Welte283c7fd2015-12-21 23:35:56 +01008
9void osmo_sua_set_log_area(int area);
10
11struct osmo_sua_user *osmo_sua_user_create(void *ctx, osmo_prim_cb prim_cb);
12void osmo_sua_user_destroy(struct osmo_sua_user *user);
13
Harald Welte89607042015-12-21 23:51:08 +010014int osmo_sua_server_listen(struct osmo_sua_user *user, const char *hostname, uint16_t port);
Harald Welte283c7fd2015-12-21 23:35:56 +010015
Harald Welte89607042015-12-21 23:51:08 +010016int osmo_sua_client_connect(struct osmo_sua_user *user, const char *hostname, uint16_t port);
17struct osmo_sua_link *osmo_sua_client_get_link(struct osmo_sua_user *user);
Harald Welte283c7fd2015-12-21 23:35:56 +010018
19/* user hands us a SCCP-USER SAP primitive down into the stack */
Harald Welte89607042015-12-21 23:51:08 +010020int osmo_sua_user_link_down(struct osmo_sua_link *link, struct osmo_prim_hdr *oph);
Harald Welte283c7fd2015-12-21 23:35:56 +010021