Since we use indenting as means to implicitly exit child nodes,
no need to write 'exit' at the end of each child node.
Change-Id: I73b0f3926d766d21ca68c8e01b7fc70b2b4636c9
Since in recent version of libosmocore default commands (such as
'exit' and 'end') are being installed by default, no need to
install them twice. This will crash the program.
Change-Id: I82c8d04ccc7dc3f19589a79b859a2c993bd1d39c
The 903e2515 introduced the following problems:
- The home variable is allocated dynamically by talloc,
but not being freed. There is no need for dynamical
memory allocation, as the getenv() returns a pointer
to a value in the environment or NULL.
- In case of custom configuration file, a pointer to
a part of stack (not heap) is passed to talloc_free().
This may cause unexpected behaviour of segfault.
Let's fix both of them.
Change-Id: I79cc3b954c3018b7e780f6351c3030c3062470b5
All other Osmocom projects use '-c' command line option to specify the
location of config file. Let's do the same with fallback to existing
implicit config file name logic.
Also print config file path and vty host on startup.
Change-Id: Idaac3ff8d1f8541e00c45290db948a67bb899311
we add a new STATE_TBF to vthe MS model and add some L1CTL primitives
to configure that TBF mode as well as to enqueue transmissions for
blocks at a given USF+TS.
Change-Id: Ie6f37090bd45f463aa25d9e00bc06f563be5264a
When we schedule a given frame for transmission, we save its timeslot
number. However, the callback doesn't get informed about this so far.
Change-Id: I608a91ae8e2a57a2d6f87f4b873c82edb0215bf6
Previously, when testcard was attached via VTY interface, the
initial values were used for MCC / MNC, LAC and TMSI, even if
correct RPLMN settings were set.
Change-Id: Ic70889cdb6be95f06d0c2df710524b4128b5f72b
We make sure that all allocations are tracked back to one talloc root
context, and install the usual SIGUSR1 handler to dump the talloc
report. This enables us to do interactive debugging for memory leaks
while virtphy is running.
Change-Id: I73b3cf86eea5f56595c1b045cf0fde8035ff185a
This will basically only print L1C message for all L1CTL happening
between MS and the BTS, while suppressing the GSMTAP/virtUM and L1P
related messages.
Change-Id: I9513db3cee12644ed9b9858e13b740ffd27aba24
The generated log lines have been *super* long, let's make them
significantly shorter. Also, differentiate between DEBUG and INFO
level, so normal operation with LOGL_INFO will not spam the user while
still printing useful information.
Change-Id: If06a8b5f99349796d66a71201524361a6547945a
L1 Data is quite verbose, while control is typically limited, so let's
make sure we log them as separate sub-systems
Change-Id: Idebc371a63508c593855486ff01b2ba6e8c2cfd1
Now that we can have multiple MS connected to one virtphy instance,
it is important to log some context whenever possible. To do so, we
introduce a monotonically increasing MS number which gets assigned
whenever we allocate a l1_model_ms and printed when the LOGPMS() or
DEBUGPMS() macros are used.
Change-Id: Id7d9507126a03def5bd7690f1dbe987f9a749e65
* l1_model_ms can become a static member of l1_model_ms
* crypto_info_ms can become a static member of l1_state_ms
Change-Id: I94ca4dad1c6c668ce6307d5e5d728b1c1502af12
The addresses in the original code make little sense:
* 224.0.0.1 is "All systems on this subnet" and not routed
outside the local ethernet segment
* 225.0.0.1 is in a RESERVED range that shouldn't be used
Change-Id: I8e3acd745e65a6cfa70b681a440da6a59a1ed0b5
libosmocore has recently received a new function osmo_fd_close() which
can be used to replace the private fd_close() function in this code.
This requires Change-Id Icd0933eed6a24edde7cdcb378e138897ecc5332c in
libosmocore.
Change-Id: Id8a518dfb09465c2765681407e5581aee2d62d6d
libosmocore has recently gained support for flags like
OSMO_SOCK_F_NO_MCAST_LOOP and OSMO_SOCK_F_NO_MCAST_ALL that can be
passed to the socket initializer functions, further reducing complexity
of the code in osmo_mcast_sock.c here.
The related change-IDs are I5ab5de45c0b64ceb3636ea98245a23defa24ffd4 and
I24a5b1ebc3f84d2d5d4734e54df50efaea26490b in libosmocore.git.
Change-Id: I961aa07a381fef2cf9a2fb5357937864364ca04b
We can avoid having to keep around the multicast group in a chunk of
dynamically allocated memory and simplify related code.
Change-Id: Ic39ffe73dfd2cb8ffefb9614340e275dac87bd50
We don't need to store this data, we cans simply connect the socket to
the destination mcast address instead.
Change-Id: I3c98653c41eff9feb649d9c47cd40b26fd81ed05
In Change-ID Iaf8a99912f42a56ef785a1642e18238c0b67cf68 libosmocore
introduced value_strings fro the GSMTAP_CHANNEL_* and GSMTAP_TYPE_*
constants, so we can remove the private tables.
Change-Id: I771dbe079fc6d1a5e66e958deb832c1168990851
As of Change-Id Ie1bc00670887064da0fea61c3dab036c23ceea25, this function
is offered by libosmocore.
Change-Id: Ie269afe314967fd2c42b91ee854c217f699252dc
This is the result of my manual clean-up of the many coding style issues
found in the stumpf/virt-phy branch of OsmocomBB. Some may remain, but
it's much closer to what we're used to in the Osmocom world now.
Change-Id: I3aa95dbef75d7749d490aad0237d074528527e8b
If the user wants debugging / no optimziation, they can always pass the
related CFLAGS at ./configure time, there's no nee to have them
hard-coded in the actual Makefiles.
Change-Id: I6a2b30f946579bbd49bf66c4f59d160a975a1b56
Model was expanded and holds now power management information consisting
of an array of received power levels for all arfcns and one for the
reduction of this signal in dbm. The reduction is configurable by
commandline by --arfcn-sig-lev-red 666,12:888,13. The signal level is
assumed to be max level (-63) if a packet from that arfcn is received
within a timeframe (also configurable via cmd -- timeout-pm 5:800 ==
<seconds>:<microseconds>). After that timeout it will be reduced to min
level (-110).
Change-Id: I369ca26703f14bba4e9334b8f417deef640462f9
Available options:
dl-rx-grp: mcast group messages on downlink are received from
ul-tx-grp: mcast group messages on uplink are sent to
port: port used for mcast sockets
log-mask: logging mask
l1ctl-sock: l1ctl socket path to connect to l23
Change-Id: Id939e5d7b90b592c85ad19f3ad6f459351e2d8f6
Messages incoming on dedicated channel (SDCCH/8, SDCCH/4) are no longer
forwarded to l23 if their timeslot/subchannel is not fitting the ones
configured by l23 via L1CTL_DM_EST_REQ.
Change-Id: I6112b20e31c25636e53d3a6cda6f7443a94ff9c3
PCS flag was ignored in fbsb. Power management returned a perfect link
for all possible arfcns causing the mobile trying to sync to all these
afterwards. This took too long and PM now only returnes a good link
quality for arfcns configured as available.
Power management was also extracted to an own file.
Change-Id: Ia1b79aa47c9df3b1e316122455ceccb4a66724e0
As TCH is not supported in GSMTAP yet, all incoming frames on the
virt-phy are forwarded as FACCH to the l23 for now.
Cleanup code in virt_prim_data and virt_prim_traffic.
Change-Id: I6b41f21b6984e62ad98edfe4398bd678d5b2dad5
Scheduler will no longer skip tasks that are scheduler for a framenumber
greater than the current fn because of a hyperframe repetition.
Change-Id: I683ba18b5dee308d58f9a95a0ee10e22da207eda
Proper calculation of the scheduled frame number and appending the jobs
with that fn to the scheduler. Thus uplink msgs are scheduled at the
(approx.) correct fn and with this fn set in the gsmtap hdr.
Change-Id: I0f44d0b5b9208755e671c619d1f851a043aefb54