libosmo-sigtran
1.9.0.4-dc82
Osmocom SIGTRAN library
mtp_sap.h
Go to the documentation of this file.
1
#pragma once
2
3
/* MTP User SAP description in accordance with ITU Q.701 */
4
5
/* (C) 2017 by Harald Welte <laforge@gnumonks.org>
6
* All Rights Reserved
7
*
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2 of the License, or
11
* (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License
19
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
*
21
*/
22
23
#include <stdint.h>
24
#include <osmocom/core/prim.h>
25
#include <
osmocom/sigtran/sigtran_sap.h
>
26
27
enum
osmo_mtp_prim_type
{
28
OSMO_MTP_PRIM_TRANSFER
,
29
OSMO_MTP_PRIM_PAUSE
,
30
OSMO_MTP_PRIM_RESUME
,
31
OSMO_MTP_PRIM_STATUS
,
32
};
33
34
#define MTP_SIO(service, net_ind) (((net_ind & 0x3) << 6) | (service & 0xF))
35
36
struct
osmo_mtp_transfer_param
{
37
uint32_t
opc
;
38
uint32_t
dpc
;
39
uint8_t
sls
;
40
uint8_t
sio
;
41
};
42
43
struct
osmo_mtp_pause_param
{
44
uint32_t
affected_dpc
;
45
};
46
47
struct
osmo_mtp_resume_param
{
48
uint32_t
affected_dpc
;
49
};
50
51
struct
osmo_mtp_status_param
{
52
uint32_t
affected_dpc
;
53
uint32_t
cause
;
54
};
55
56
struct
osmo_mtp_prim
{
57
struct
osmo_prim_hdr oph;
58
union
{
59
struct
osmo_mtp_transfer_param
transfer;
60
struct
osmo_mtp_pause_param
pause;
61
struct
osmo_mtp_resume_param
resume;
62
struct
osmo_mtp_status_param
status;
63
} u;
64
};
65
66
#define msgb_mtp_prim(msg) ((struct osmo_mtp_prim *)(msg)->l1h)
67
68
char
*
osmo_mtp_prim_name
(
struct
osmo_prim_hdr *oph);
osmo_mtp_prim_name
char * osmo_mtp_prim_name(struct osmo_prim_hdr *oph)
osmo_mtp_status_param::affected_dpc
uint32_t affected_dpc
Definition:
mtp_sap.h:52
osmo_mtp_transfer_param::sio
uint8_t sio
Definition:
mtp_sap.h:40
osmo_mtp_transfer_param::sls
uint8_t sls
Definition:
mtp_sap.h:39
osmo_mtp_resume_param::affected_dpc
uint32_t affected_dpc
Definition:
mtp_sap.h:48
osmo_mtp_transfer_param::opc
uint32_t opc
Definition:
mtp_sap.h:37
osmo_mtp_status_param
Definition:
mtp_sap.h:51
sigtran_sap.h
OSMO_MTP_PRIM_STATUS
Definition:
mtp_sap.h:31
OSMO_MTP_PRIM_TRANSFER
Definition:
mtp_sap.h:28
OSMO_MTP_PRIM_RESUME
Definition:
mtp_sap.h:30
osmo_mtp_status_param::cause
uint32_t cause
Definition:
mtp_sap.h:53
osmo_mtp_pause_param
Definition:
mtp_sap.h:43
OSMO_MTP_PRIM_PAUSE
Definition:
mtp_sap.h:29
osmo_mtp_prim_type
osmo_mtp_prim_type
Definition:
mtp_sap.h:27
osmo_mtp_transfer_param::dpc
uint32_t dpc
Definition:
mtp_sap.h:38
osmo_mtp_transfer_param
Definition:
mtp_sap.h:36
osmo_mtp_resume_param
Definition:
mtp_sap.h:47
osmo_mtp_pause_param::affected_dpc
uint32_t affected_dpc
Definition:
mtp_sap.h:44
osmo_mtp_prim
Definition:
mtp_sap.h:56
include
osmocom
sigtran
mtp_sap.h
Generated on Mon Sep 16 2024 11:13:27 for libosmo-sigtran by
1.8.13