libosmo-sigtran 2.1.0.194-89e3 Osmocom SIGTRAN library

sccp_helpers.h
Go to the documentation of this file.
1#pragma once
2
3#include <unistd.h>
4#include <osmocom/core/msgb.h>
5#include <osmocom/sigtran/sccp_sap.h>
6
7int osmo_sccp_tx_unitdata(struct osmo_sccp_user *scu,
8 const struct osmo_sccp_addr *calling_addr,
9 const struct osmo_sccp_addr *called_addr,
10 const uint8_t *data, unsigned int len);
11
12int osmo_sccp_tx_unitdata_msg(struct osmo_sccp_user *scu,
13 const struct osmo_sccp_addr *calling_addr,
14 const struct osmo_sccp_addr *called_addr,
15 struct msgb *msg);
16
17void osmo_sccp_make_addr_pc_ssn(struct osmo_sccp_addr *addr,
18 uint32_t pc, uint32_t ssn);
19
20void osmo_sccp_addr_set_ssn(struct osmo_sccp_addr *addr, uint32_t ssn);
21
22int osmo_sccp_tx_unitdata_ranap(struct osmo_sccp_user *scu,
23 uint32_t src_point_code,
24 uint32_t dst_point_code,
25 const uint8_t *data, unsigned int len);
26
27int osmo_sccp_tx_conn_req(struct osmo_sccp_user *scu, uint32_t conn_id,
28 const struct osmo_sccp_addr *calling_addr,
29 const struct osmo_sccp_addr *called_addr,
30 const uint8_t *data, unsigned int len);
31
32int osmo_sccp_tx_conn_req_msg(struct osmo_sccp_user *scu, uint32_t conn_id,
33 const struct osmo_sccp_addr *calling_addr,
34 const struct osmo_sccp_addr *called_addr,
35 struct msgb *msg);
36
37int osmo_sccp_tx_data(struct osmo_sccp_user *scu, uint32_t conn_id,
38 const uint8_t *data, unsigned int len);
39
40int osmo_sccp_tx_data_msg(struct osmo_sccp_user *scu, uint32_t conn_id,
41 struct msgb *msg);
42
43int osmo_sccp_tx_disconn(struct osmo_sccp_user *scu, uint32_t conn_id,
44 const struct osmo_sccp_addr *resp_addr,
45 uint32_t cause);
46
47int osmo_sccp_tx_disconn_data(struct osmo_sccp_user *scu, uint32_t conn_id,
48 const struct osmo_sccp_addr *resp_addr,
49 uint32_t cause, const uint8_t *data, size_t len);
50
51int osmo_sccp_tx_conn_resp_msg(struct osmo_sccp_user *scu, uint32_t conn_id,
52 const struct osmo_sccp_addr *resp_addr,
53 struct msgb *msg);
54
55int osmo_sccp_tx_conn_resp(struct osmo_sccp_user *scu, uint32_t conn_id,
56 const struct osmo_sccp_addr *resp_addr,
57 const uint8_t *data, unsigned int len);
58
59char *osmo_sccp_gt_dump(const struct osmo_sccp_gt *gt);
60char *osmo_sccp_addr_dump(const struct osmo_sccp_addr *addr);
61
62int osmo_sccp_inst_addr_to_str_buf(char *buf, size_t buf_len, const struct osmo_sccp_instance *sccp,
63 const struct osmo_sccp_addr *addr);
64char *osmo_sccp_inst_addr_to_str_c(void *ctx, const struct osmo_sccp_instance *sccp,
65 const struct osmo_sccp_addr *addr);
66int osmo_sccp_addr_to_str_buf(char *buf, size_t buf_len, const struct osmo_ss7_instance *ss7,
67 const struct osmo_sccp_addr *addr);
68char *osmo_sccp_addr_to_str_c(void *ctx, const struct osmo_ss7_instance *ss7, const struct osmo_sccp_addr *addr);
69
70int osmo_sccp_addr_to_id_buf(char *buf, size_t buf_len, const struct osmo_ss7_instance *ss7,
71 const struct osmo_sccp_addr *addr);
72char *osmo_sccp_addr_to_id_c(void *ctx, const struct osmo_ss7_instance *ss7, const struct osmo_sccp_addr *addr);
73
74bool osmo_sccp_conn_id_exists(const struct osmo_sccp_instance *inst, uint32_t id);
75
76char *osmo_sccp_addr_name(const struct osmo_ss7_instance *ss7, const struct osmo_sccp_addr *addr);
77char *osmo_sccp_inst_addr_name(const struct osmo_sccp_instance *sccp, const struct osmo_sccp_addr *addr);
osmo_sccp_addr_to_str_c
char * osmo_sccp_addr_to_str_c(void *ctx, const struct osmo_ss7_instance *ss7, const struct osmo_sccp_addr *addr)
Definition: sccp_helpers.c:386
osmo_sccp_inst_addr_name
char * osmo_sccp_inst_addr_name(const struct osmo_sccp_instance *sccp, const struct osmo_sccp_addr *addr)
Definition: sccp_helpers.c:435
osmo_sccp_tx_conn_req
int osmo_sccp_tx_conn_req(struct osmo_sccp_user *scu, uint32_t conn_id, const struct osmo_sccp_addr *calling_addr, const struct osmo_sccp_addr *called_addr, const uint8_t *data, unsigned int len)
Definition: sccp_helpers.c:116
osmo_sccp_tx_disconn_data
int osmo_sccp_tx_disconn_data(struct osmo_sccp_user *scu, uint32_t conn_id, const struct osmo_sccp_addr *resp_addr, uint32_t cause, const uint8_t *data, size_t len)
Definition: sccp_helpers.c:200
osmo_sccp_tx_conn_req_msg
int osmo_sccp_tx_conn_req_msg(struct osmo_sccp_user *scu, uint32_t conn_id, const struct osmo_sccp_addr *calling_addr, const struct osmo_sccp_addr *called_addr, struct msgb *msg)
Definition: sccp_helpers.c:144
osmo_sccp_tx_disconn
int osmo_sccp_tx_disconn(struct osmo_sccp_user *scu, uint32_t conn_id, const struct osmo_sccp_addr *resp_addr, uint32_t cause)
Definition: sccp_helpers.c:234
osmo_sccp_tx_unitdata
int osmo_sccp_tx_unitdata(struct osmo_sccp_user *scu, const struct osmo_sccp_addr *calling_addr, const struct osmo_sccp_addr *called_addr, const uint8_t *data, unsigned int len)
Definition: sccp_helpers.c:65
osmo_sccp_addr_to_id_c
char * osmo_sccp_addr_to_id_c(void *ctx, const struct osmo_ss7_instance *ss7, const struct osmo_sccp_addr *addr)
Definition: sccp_helpers.c:407
osmo_sccp_gt_dump
char * osmo_sccp_gt_dump(const struct osmo_sccp_gt *gt)
Definition: sccp_helpers.c:297
osmo_sccp_inst_addr_to_str_c
char * osmo_sccp_inst_addr_to_str_c(void *ctx, const struct osmo_sccp_instance *sccp, const struct osmo_sccp_addr *addr)
Definition: sccp_helpers.c:426
osmo_sccp_tx_conn_resp_msg
int osmo_sccp_tx_conn_resp_msg(struct osmo_sccp_user *scu, uint32_t conn_id, const struct osmo_sccp_addr *resp_addr, struct msgb *msg)
Definition: sccp_helpers.c:242
osmo_sccp_addr_dump
char * osmo_sccp_addr_dump(const struct osmo_sccp_addr *addr)
Definition: sccp_helpers.c:329
osmo_sccp_tx_data
int osmo_sccp_tx_data(struct osmo_sccp_user *scu, uint32_t conn_id, const uint8_t *data, unsigned int len)
Definition: sccp_helpers.c:158
osmo_sccp_addr_set_ssn
void osmo_sccp_addr_set_ssn(struct osmo_sccp_addr *addr, uint32_t ssn)
Definition: sccp_helpers.c:59
osmo_sccp_inst_addr_to_str_buf
int osmo_sccp_inst_addr_to_str_buf(char *buf, size_t buf_len, const struct osmo_sccp_instance *sccp, const struct osmo_sccp_addr *addr)
Definition: sccp_helpers.c:420
osmo_sccp_addr_name
char * osmo_sccp_addr_name(const struct osmo_ss7_instance *ss7, const struct osmo_sccp_addr *addr)
Definition: sccp_helpers.c:413
osmo_sccp_tx_conn_resp
int osmo_sccp_tx_conn_resp(struct osmo_sccp_user *scu, uint32_t conn_id, const struct osmo_sccp_addr *resp_addr, const uint8_t *data, unsigned int len)
Definition: sccp_helpers.c:268
osmo_sccp_tx_data_msg
int osmo_sccp_tx_data_msg(struct osmo_sccp_user *scu, uint32_t conn_id, struct msgb *msg)
Definition: sccp_helpers.c:188
osmo_sccp_make_addr_pc_ssn
void osmo_sccp_make_addr_pc_ssn(struct osmo_sccp_addr *addr, uint32_t pc, uint32_t ssn)
Definition: sccp_helpers.c:49
osmo_sccp_addr_to_id_buf
int osmo_sccp_addr_to_id_buf(char *buf, size_t buf_len, const struct osmo_ss7_instance *ss7, const struct osmo_sccp_addr *addr)
like osmo_sccp_addr_to_str_buf, but using only characters passing osmo_identifier_valid().
Definition: sccp_helpers.c:398
osmo_sccp_tx_unitdata_msg
int osmo_sccp_tx_unitdata_msg(struct osmo_sccp_user *scu, const struct osmo_sccp_addr *calling_addr, const struct osmo_sccp_addr *called_addr, struct msgb *msg)
Definition: sccp_helpers.c:102
osmo_sccp_tx_unitdata_ranap
int osmo_sccp_tx_unitdata_ranap(struct osmo_sccp_user *scu, uint32_t src_point_code, uint32_t dst_point_code, const uint8_t *data, unsigned int len)
Definition: sccp_helpers.c:87
osmo_sccp_addr_to_str_buf
int osmo_sccp_addr_to_str_buf(char *buf, size_t buf_len, const struct osmo_ss7_instance *ss7, const struct osmo_sccp_addr *addr)
Definition: sccp_helpers.c:380
osmo_sccp_conn_id_exists
bool osmo_sccp_conn_id_exists(const struct osmo_sccp_instance *inst, uint32_t id)
Definition: sccp_scoc.c:110
sccp_sap.h
osmo_sccp_addr
Definition: sccp_sap.h:183
osmo_sccp_gt
Definition: sccp_sap.h:175
osmo_sccp_instance
Definition: sccp_instance.h:47
osmo_sccp_user
Definition: sccp_user.h:12
osmo_ss7_instance
Definition: ss7_instance.h:31
len
uint16_t len
Definition: xua_types.h:1
data
uint8_t data[0]
Definition: xua_types.h:5