It was a mistake to call vty_init(), passing it a pointer to the
vty_app_info structure allocated on the stack, because it gets
overwritten when the calling function _vty_init() returns.
Change-Id: I75843a964254243c70bedcf8ff97d854107ee21a
Fixes: 9feb5057 "layer23: refactor the application API concept"
Do not call grr_tx_chan_req() unconditionally from grr_rx_bcch().
Add a special (hidden, expert mode) VTY command for that.
Change-Id: I049a8d7f58ae9703d06dff235973ba376702c873
Related: OS#5500
* Make virtphy_{SOURCES,LDADD} git-friendly: one file per line;
* Remove '-pthread' from LDADD, it's not really needed;
* Remove debugging leftovers.
Change-Id: Iccd07614aabfc2845424d25962f48e4231a50a90
Related: OS#5500
* Build up the usual include directory hierarchy.
* Move l1ctl_proto.h to 'include/osmocom/bb/'.
* System headers first, then libosmo*, the local ones.
Change-Id: I25145630ec53c2b8065a42fb12a778eec010f10c
Related: OS#5500
The event TRXCON_EV_TX_DATA_CNF is not premitted in state
TRXCON_ST_PACKET_DATA, and is not of any use for l1gprs.
Change-Id: Iee5ee404f1eb77091c388a641d0a78d01a8d7e7f
Related: OS#5500
After the recent refactoring, parsing of the command line options is
broken for some arguments. Specifically, the value of '-a'/'--arfcn'
is ignored and hard-coded ARFCN=871 is used instead.
The problem is that l23_app_init(), which allocates an MS state and
sets the initial ARFCN, is called *before* handle_options(). So the
cfg_test_arfcn is used before it gets overwritten from the argv[].
The usual approach in osmo-* apps is to parse the command line
arguments first, and only then execute code which depends on
configurable parameters. Let's follow this approach too.
Change-Id: I77ca11c14561fa3fcb9add60ccea5b0b847a20c4
With this set of changes we have a cleaner l23 app architecture:
* struct vty_app_info: all l23 applications must define this struct;
* struct vty_app_info: *cfg_supported() becomes a mask of L23_OPT_*;
* struct vty_app_info: explicitly set L23_OPT_* in all l23 apps;
* drop l23_app_info(), there can be only one vty_app_info per an app;
It's no more needed to obtain the vty_app_info by calling a function
and checking the returned value against NULL everywhere. This kind
of information is rather static (not dynamically composed) and needs
not to be encapsulated into functions.
Change-Id: I89004cd5308927305f79b102f7b695709148df6d
TRXDv0 PDUs may have 2 additional dummy bytes at the end. Such
a PDU will crash trxcon if it contains an 8-PSK modulated burst:
Assert failed phybi->burst_len <= sizeof(bi.burst)
In this case phybi->burst_len would be 444 + 2, while size of the
burst buffer in struct l1sched_burst_ind is limited to the length
of an 8-PSK modulated burst (444).
Change-Id: Icfba986ccf0c696ba019b91575b4d69db001c14f
Explicit is better than implicit. Having the message type values
assigned explicitly allows rearranging messages in the middle
without affecting the message type values following them.
Change-Id: I1ec32289a24c5704ea0676b508cb12ee0b4890d7
Remove characters 0x80 - 0xff from comments in this source file, as
they can't be parsed as UTF-8. This causes struct_endianness.py to
error on the file, git and gerrit can't display a proper diff and treat
it as binary file, etc.
Related: OS#5884
Change-Id: I0daebccf819595ee64fb4c9713a4f0ce219c58be
header file name gprs_rlcmac.h was renamed to csn1-defs.h during recent
libosmo-gprs-rlcmac development. Use the new names everywhere.
Depends: libosmo-gprs.git Change-Id I84ea63ed0b804699fd995a2e0c07ced17b3ad4c8
Change-Id: I205536907d9062b78453ce9bc404db1633e9a616
Several functions and data structures in mobile app are refactored to
follow more closely the l23_app API and structures. These movements
allow starting to use already some shared infrastructure defined under
layer23/common.
This is not a full migration to l23_app, since mobile still keeps a
separate main() with a few extra code. This commit is rather a step
towards an eventual merge of mobile's main.cpp into
layer23/common/main.c
This is a preparation commit to later one adding gsmtap VTY configuration
to all l23 apps.
Change-Id: I3141b6cb4a0482970f434180ef8dda3af1d4aa0c
If the peer connected to trxcon restarts the process, read() on the unix
socket in trxcon fails, and triggers closing the conn (l1ctl_client),
which ends up freeing the struct. This all happens during read_cb() of
the l1ctl_client wqueue. If the kernel also flags WRITE event in the
same main loop iteration, the wqueue code would end up using the freed
struct again when running the write_cb.
Make sure the read_cb returns -EBADF in the code branch closing the conn
in read_cb, since it makes no sense to handle a write_cb after that.
This saves the code from accessing the potentially freed struct.
Related: OS#5872
Change-Id: I100a8ba056a09b4e52675e3539640da0c0f8d837
Use the new tundev API from libosmocore to create tun devices for each
configured (and enbled) APN.
No address nor routes are yet set on the tun devices because we still
lack GMM/SNDCP/LLC/RLCMAC layers to negotiate them.
A follow up patch will add some code to interact with the SNDCP layer.
Depends: libosmocore.git Change-Id I3463271666df1e85746fb7b06ec45a17024b8c53
Change-Id: I86cac406843157aa2e51727cf8ccac9804d7961d
This commit adds an initial set of VTY commands to manage APN
configuration and set up, which is used by the modem app.
The sample modem.cfg file is updated to showcase how to configure APNs.
The app doesn't do anything with them yet. A follow up patch will add
code to create tun devices for each configured APN.
Change-Id: I7b4eaa0de428b418bb1d89bd544694e89beb3e6e