Project

General

Profile

Libosmocore » History » Version 24

laforge, 10/20/2019 04:30 PM
remove outdated "development cycle" section

1 1 laforge
h1. libosmocore
2 17 laforge
3
{{>toc}}
4 15 fixeria
5 16 laforge
libosmocore is a library with various utility functions that were originally developed as part of the [[OpenBSC:]] project, but which are of a more generic nature and thus useful to (at least) other programs that we develop in the sphere of Free Software / Open Source mobile communications.
6 1 laforge
7 16 laforge
There is no clear scope of it.  We simply move all shared code between the various Osmocom projects in this library to avoid code duplication.
8 1 laforge
9 16 laforge
The libosmcoore.git repository build multiple libraries:
10
* *libosmocore* contains some general-purpose functions like select-loop abstraction, message buffers, timers, linked lists
11
* *libosmovty* contains routines related to the interactive command-line interface called VTY
12
* *libosmogsm* contains definitions and helper code related to GSM protocols
13
* *libosmoctrl* contains a shared implementation of the Osmocom control interface
14
* *libosmogb* contains an implementation of the Gb interface with its NS/BSSGP protocols
15
* *libosmocodec* contains an implementation of GSM voice codecs
16 20 fixeria
* *libosmocoding* contains an implementation of GSM 05.03 burst transcoding functions
17 16 laforge
* *libosmosim* contains infrastructure to interface SIM/UICC/USIM cards
18 12 tsaitgaist
19 15 fixeria
h2. Preconditions 
20
21
To compile libosmocore you will need the following tools:
22 1 laforge
23
<pre>
24 16 laforge
sudo apt-get install build-essential libtool libtalloc-dev shtool autoconf automake git-core pkg-config make gcc
25
</pre>
26 12 tsaitgaist
27 15 fixeria
and the following (optional) libraries:
28 1 laforge
<pre>
29 16 laforge
sudo apt-get install libpcsclite-dev
30
</pre>
31 15 fixeria
32
h2. Obtaining it
33 5 laforge
34 1 laforge
To obtain libosmocore, you can use the following git URL:
35 15 fixeria
36 7 tsaitgaist
<pre>
37 16 laforge
git clone git://git.osmocom.org/libosmocore.git
38
</pre>
39 15 fixeria
40
h2. Compiling and installing it
41
42 1 laforge
To compile and install it as standalone:
43
<pre>
44
cd libosmocore/
45
autoreconf -i
46 15 fixeria
./configure
47 1 laforge
make
48
sudo make install
49 7 tsaitgaist
sudo ldconfig -i
50 1 laforge
cd ..
51 15 fixeria
</pre>
52 1 laforge
53
to compile without pcsclite library, run
54 15 fixeria
<pre>
55 16 laforge
./configure --disable-pcsc
56
</pre>
57 15 fixeria
58
59 1 laforge
h2. Licensing
60
61
This library is GPL licensed. This means you *cannot use this library from non-GPL licensed code without infringing copyright!
62 18 laforge
63
h2. API documentation
64
65
* http://ftp.osmocom.org/api/latest/libosmocore/core/html/
66
* http://ftp.osmocom.org/api/latest/libosmocore/codec/html/
67 19 laforge
* http://ftp.osmocom.org/api/latest/libosmocore/coding/html/
68
* http://ftp.osmocom.org/api/latest/libosmocore/gb/html/
69 18 laforge
* http://ftp.osmocom.org/api/latest/libosmocore/gsm/html
70
* http://ftp.osmocom.org/api/latest/libosmocore/vty/html
71
72
h2. Browsing its source code
73
74 21 Sec
You can do that using our cgit installation at http://cgit.osmocom.org/libosmocore/
75 1 laforge
76
h2. Features
77 15 fixeria
78
h3. Select loop abstraction
79
80 1 laforge
This is implemented in select.[ch] and enables you to build complex asynchronous/non-blocking I/O
81
programs in a single thread.
82
83 15 fixeria
84
h3. Message buffer handling
85
86 16 laforge
Inspired by the Linux kernel @struct sk_buff@, this is our message buffer @struct msgb@ implementation.  It provides handling of packet buffers, putting them in queues, prepending and appending data to it, etc.
87 1 laforge
88
h3. Bitvector
89 15 fixeria
90
A convenient set of routines to deal with bit-vectors in C.  This was originally written
91
for rest-octet parsing.
92 1 laforge
93 15 fixeria
h3. TLV handling
94 1 laforge
95 16 laforge
The GSM Layer3 and above are full of TV / TLV / TL16V and other data fields.  Our implementation provides parser and generator functions, tightly coupled to @struct msgb@
96 1 laforge
97 15 fixeria
h3. Timers
98
99 1 laforge
Provides a timer core where you can register timers with a callback function. The function
100
is called when the timer expires.
101 15 fixeria
102
h3. COMP128v1-3
103
104
A COMP128v1 implementation by Sylvain Munaut and COMP128v23 is included.
105 3 laforge
106 15 fixeria
107
h3. Rate Counter
108 1 laforge
109
Provides infrastructure for maintaining _rate counters_, i.e. counters that can be incremented
110
and will also keep track of the rate of events per second, minute, hour and day.  A group of rate
111 15 fixeria
counters is defined as an abstract _class_, from which you can then allocate instances.  The
112 1 laforge
_class_ description includes information about the counter names.
113 3 laforge
114 1 laforge
h3. Protocol helper code
115
116 15 fixeria
h4. GSM utils
117 1 laforge
118
* conversion functions for ARFCN, [[RxLevel]], 7bit GSM character set, power level, frame numbers, ...
119 15 fixeria
120 3 laforge
h4. GSM 04.08
121 1 laforge
122 6 laforge
* extensive header files for the GSM 04.08 (Layer 3 RR/MM/CC) messages
123 15 fixeria
* TLV parser definitions to parse the optional IEs
124
* utility functions such as
125
** human readable strings for RR cause names
126
** converting GSM Mobile Identities (MI) to string and back
127
* encoding and decoding functions for call control IEs
128
129
130
h4. GSM 08.08 (A Interface)
131
132
* API to wrap 04.08 messages in BSSMAP/DTAP message
133
* TLV parser definitions
134
135
136
h4. GSM 08.58 (A-bis RSL)
137 1 laforge
138 15 fixeria
* header file with structure and enum definitions for GSM 08.58 protocol
139
* TLV parser definitions for RSL optional IEs
140 1 laforge
* human readable strings for RSL Error values and RLM cause values
141 15 fixeria
* encoding and decoding of RSL channel number
142
143
144
h4. GSM 12.21 (A-bis OML)
145
146
* header file with structure and enum definitions for GSM 12.21 (and 08.59) protocol
147 1 laforge
148 15 fixeria
149
h4. GSM 04.11 (SMS)
150
151 1 laforge
* header file with structure and enum definitions for GSM 04.11 (SMS RP and CP layers) protocol
152 6 laforge
153
154 16 laforge
h3. talloc memory allocator
155 3 laforge
156 16 laforge
The talloc memory allocator from the Samba project was part of libosmocore, but has meanwhile been made an external dependency. It provides hierarchical memory allocation and extensive debugging features such as dumping the currently allocated objects (at runtime) to the console.
157 15 fixeria
158 3 laforge
h3. Logging framework
159
160 16 laforge
A generic logging implementation, supporting a dynamic number of 'log targets', understanding the notion of log levels and log categories.  Filtering based on levels and categories is implemented in the core, while context-specific filtering can be implemented by the application using libosmocore.
161 15 fixeria
* logging with various log levels for various subsystems inside the application
162
* logging to stderr, syslog or application-defined targets
163
* runtime reconfigurable per-subsystem log levels
164
* timestamping of log lines
165 2 laforge
* colorized log output
166 15 fixeria
167
h3. Write Queue
168
169 2 laforge
This is a write queue implementation on top of libosmocore's select loop abstraction.
170
It allows you to simply say "write this msg_buff to this file descriptor as soon as
171
the file descriptor is writable".
Add picture from clipboard (Maximum size: 48.8 MB)