libosmogsm  1.5.1
Osmocom GSM library
gsm29205.h
Go to the documentation of this file.
1 
4 /*
5  * (C) 2018 by sysmocom - s.f.m.c. GmbH
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 along
19  * with this program; if not, write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  *
22  */
23 
24 #pragma once
25 
26 #include <osmocom/core/msgb.h>
27 
28 #include <stdint.h>
29 
30 #define OSMO_GCR_MIN_LEN 13
31 
34  uint8_t net[5];
35  uint8_t net_len;
36  uint16_t node;
37  uint8_t cr[5];
38 };
39 
41 int osmo_dec_gcr(struct osmo_gcr_parsed *gcr, const uint8_t *elem, uint8_t len) OSMO_DEPRECATED_OUTSIDE_LIBOSMOCORE;
42 bool osmo_gcr_eq(const struct osmo_gcr_parsed *gcr1, const struct osmo_gcr_parsed *gcr2);
uint16_t node
length (3-5 octets) of gsm29205_gcr::net
Definition: gsm29205.h:36
#define OSMO_DEPRECATED_OUTSIDE_LIBOSMOCORE
uint8_t osmo_enc_gcr(struct msgb *msg, const struct osmo_gcr_parsed *g) OSMO_DEPRECATED_OUTSIDE_LIBOSMOCORE
Create Global Call Reference.
Definition: gsm29205.c:44
struct osmo_tdef_group * g
uint8_t net[5]
Definition: gsm29205.h:34
bool osmo_gcr_eq(const struct osmo_gcr_parsed *gcr1, const struct osmo_gcr_parsed *gcr2)
Compare two GCR structs.
Definition: gsm29205.c:102
uint8_t cr[5]
Node ID.
Definition: gsm29205.h:37
Parsed representation of Global Call Reference, 3GPP TS 29.205 Table B 2.1.9.1.
Definition: gsm29205.h:33
uint8_t len
Definition: gsm_04_11.h:466
uint8_t msg[0]
Definition: gsm_08_08.h:525
uint8_t net_len
Network ID, ITU-T Q.1902.3.
Definition: gsm29205.h:35
int osmo_dec_gcr(struct osmo_gcr_parsed *gcr, const uint8_t *elem, uint8_t len) OSMO_DEPRECATED_OUTSIDE_LIBOSMOCORE
Decode Global Call Reference, 3GPP TS 29.205 Table B 2.1.9.1.
Definition: gsm29205.c:70