sgsn.h is the main header containing all misc app related contents.
This is another step towards shrinking gprs_sgsn.h mess.
Change-Id: I80e3a68e2e368d8c73135c850e4728bdf6cf5f09
This way pdp contexts are managed by the lifcycle of the main global struct
sgsn_instance automatically.
Change-Id: I725218fd54adcc68dceded5eb43675f25771bb96
This further shrinks the mess in gprs_sgsn.h, and allows to easily see
layer violations (like pdpctx.c requiring llc.h)
Change-Id: Iad4da06efee7d8514ff48423bdaebc0f26413cc1
Move them to the correct header where they belong, so that the all the
related protocol stuff is placed together.
Change-Id: I9052f48a0af125bb445194f4ae94ebbe49508fda
Beforehand the function handling the LL-UNITDATA primitive from LLC was
already submitting the packet to GTP code which had an SNDCP related
name, so everything was really confusing and layer separation was not
clean.
Change-Id: Ia544a9dd4c0c7647b0c1b64ca110351f40820618
The functions driving its lifcyecles are already in gprs_subscriber.c,
and are used mainly by functions in the same file, hence move it to the
related header to further shrink gprs_sgsn.h.
Change-Id: Iff7be91af130a3317d57d3649c17e3d5d2540e7a
This allows further shrinking of gprs_sgsn.{c,h} and also being able to
use GSM_APN_LENGTH on different headers easily (needed by follow-up
patch).
Change-Id: Id225ed8b84e1376f4a30f17dd4b153b6b1a6efa8
Rework initialization and destruction of several sgsn subsystems to be
allocated & released together with the struct sgsn_instance.
This makes it easier to destroy and recreate the entire context and
allows us to start moving global variables scattered around to be under
struct sgsn_instance.
Change-Id: Idf60519b8e475b94d38bbb69e737132a5afaefab
It will be used to store all stuff relatd to libgtp use and GTP
protocol, similar to what we already do for other protocols.
Change-Id: I4aae35cd0ea401856cd822cb507d668350d07a89
Similar to what we already have for struct sgsn_mme_ctx in
gtp_mme.{c,h}.
This is just the nth step of properly splitting different
protocol layers, data model, etc.
Change-Id: Iad1895f09e43e299df7bb126bf52fdb98268392e
That function is only used in the test. Let's hence move the function to
the same test file in order to simplify osmo-sgsn code.
Change-Id: I69d80810362d75eb93974af34f61639514f99f8a
All remaining code in that file is NS protocol related, hence let's
rename it so that we end up with one file per protocol in the Gb stack.
Change-Id: I8312c8a70d60cab48764950c5b57ca02964e9db2
This leaves only NS protocol related code in gprs_gb.[c,h], which will
be renamed to gprs_ns.[c,h] in a follow up patch.
Change-Id: I3dcbe1d0f75cb91ec8b700e239e2ba16fff030a2
Right now there's no much code there since the related code is totally
entangled with the LLC one.
This will eventually change in the future when we switch to use
libosmo-gprs.
Hence, this commit is a preparation to have already some place to put
new BSSGP specific code in the future.
Change-Id: I816396ab5ccb86032bbc21b41a959934a7768780
That big file is really only used by tests/sgsn/sgsn_test nowadays, so
let's keep it out of osmo-sgsn app code base.
Change-Id: Ia5a639832f52b2f015a2800bd0d94a28d7bc689b
Change bind-to-ggsns from 127.0.0.2 to 127.0.0.20, so osmo-gtphub's
default config does not confligt with the osmo-ggsn default config. This
change is for the effort of making the configs of all Osmocom programs
not conflict with each other.
A similar change was made in Id892e1f4ab2daabbe9824b819b5fed985373b97a
with bind-to-sgsns.
Related: OS#5817
Change-Id: I57ee457b62139d831707b6ebd6baaea8d33c2d9c
Log an error message and drop the packet instead of asserting if
mm state fsm is in ST_MM_IDLE while the gmm fsm is in
ST_GMM_REGISTERED_NORMAL.
Fixes: OS#5725
Change-Id: I9dab98917c622b36dae22399bb359d747a598208
Now that the warnings in osmo-iuh have been fixed, we should be able to
build the IU version of OsmoSGSN with --enable-werror too.
Related: OS#4462
Change-Id: I8cc4e209e21acfe513bef72927499f1ccdead783
The FSM might be moved out of ST_GMM_COMMON_PROC_INIT state either
by E_GMM_ATTACH_SUCCESS or by E_GMM_COMMON_PROC_SUCCESS events
which are not mutually exclusive. Hence the later event will arrive when we're already in
the ST_GMM_REGISTERED_NORMAL state.
Let's have both events permitted to keep the logs clean from useless error.
Related: OS#5349
Change-Id: Ia97b50aac6c665812ddca9010de7f97b17b78bd5
The gtp_set_cb_recovery3() is similar to gtp_set_cb_recovery2()
with extra parameter representing GSN.
Change-Id: I8b46cf8c52e36b0312eddf37f3e136662b95732e
By default systemd will execute service with root directory (or home directory for user instance) which might result in
attempts to create files in unexpected place. Let's set it to 'osmocom' subdir of state directory (/var/lib for system instance) instead.
Related: OS#4821
Change-Id: I950d84853c6737276d02b3275127b499ae567c38