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