libosmogsm  0.9.6.311-c977
Osmocom GSM library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
oap.h
Go to the documentation of this file.
1 
3 /*
4  * (C) 2015-2016 by sysmocom s.f.m.c. GmbH
5  * All Rights Reserved
6  *
7  * Author: Neels Hofmeyr
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <http://www.gnu.org/licenses/>.
21  *
22  */
23 
24 #pragma once
25 
26 #include <stdint.h>
27 #include <osmocom/core/msgb.h>
28 #include <osmocom/gsm/protocol/gsm_04_08_gprs.h>
29 
33  OAP_CAUSE_IE = 0x02,
34  OAP_RAND_IE = 0x20,
35  OAP_AUTN_IE = 0x23,
36  OAP_XRES_IE = 0x24,
37  OAP_AUTS_IE = 0x25,
39 };
40 
46 
50 
51  OAP_MSGT_SYNC_REQUEST = 0b00001100,
52  OAP_MSGT_SYNC_ERROR = 0b00001101,
53  OAP_MSGT_SYNC_RESULT = 0b00001110,
54 };
55 
59  enum gsm48_gmm_cause cause;
60  uint16_t client_id;
62  uint8_t rand[16];
64  uint8_t autn[16];
66  uint8_t xres[8];
68  uint8_t auts[14];
69 };
70 
71 int osmo_oap_decode(struct osmo_oap_message *oap_msg, const uint8_t *data,
72  size_t data_len);
73 void osmo_oap_encode(struct msgb *msg, const struct osmo_oap_message *oap_msg);
void osmo_oap_encode(struct msgb *msg, const struct osmo_oap_message *oap_msg)
Compose OAP message data.
Definition: oap.c:160
Definition: oap.h:37
uint8_t auts[14]
Definition: oap.h:68
int osmo_oap_decode(struct osmo_oap_message *oap_msg, const uint8_t *data, size_t data_len)
Decode OAP message data.
Definition: oap.c:43
uint8_t rand[16]
Definition: oap.h:62
Definition: oap.h:48
osmo_oap_iei
Information Element Identifiers for OAP IEs.
Definition: oap.h:32
Definition: oap.h:45
int autn_present
Definition: oap.h:63
Definition: oap.h:38
Definition: oap.h:53
Definition: oap.h:44
int xres_present
Definition: oap.h:65
enum gsm48_gmm_cause cause
Definition: oap.h:59
Definition: oap.h:49
uint16_t client_id
Definition: oap.h:60
Definition: oap.h:52
int rand_present
Definition: oap.h:61
Definition: oap.h:51
uint8_t autn[16]
Definition: oap.h:64
int auts_present
Definition: oap.h:67
Definition: oap.h:36
Definition: oap.h:35
uint8_t xres[8]
Definition: oap.h:66
Definition: oap.h:34
Definition: oap.h:43
Definition: oap.h:33
enum osmo_oap_message_type message_type
Definition: oap.h:58
Definition: oap.h:47
Parsed/decoded OAP protocol message.
Definition: oap.h:57
osmo_oap_message_type
OAP message types.
Definition: oap.h:42