Commit Graph

310 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther a49ffb4cb4 Create a liblaforge with OpenBSC utility functions to be used for other projects 2010-02-09 21:51:44 +01:00
Holger Hans Peter Freyther 701d175653 [tlv] Implement a variant for the IDTAG list for the IPA
Implement a helper that will allow to easily fill the
tag list with data.
2010-02-09 17:40:59 +01:00
Holger Hans Peter Freyther d3d5be1cde [ipaccess] Make the IPA version of LTV public. 2010-02-09 17:40:37 +01:00
Holger Hans Peter Freyther 3bc856bc16 [ipa] Make sending of ID REQ public...
Make sending of the ID Request message public. We are going
to use this in the BSC NAT code to ask for querying the BSC.
2010-02-07 13:21:51 +01:00
Holger Hans Peter Freyther 301e628761 [ipaccess] Create a method to send the ID ACK messages 2010-02-07 13:21:40 +01:00
Holger Hans Peter Freyther f5b36cac6b [telnet] Remove ancient #define... 2010-02-07 13:19:54 +01:00
Holger Hans Peter Freyther 92026f1cef [mgcp] Refer to the right Company in the Copyright/Copyleft line
Use On-Waves instead of the name I made up from the domain name.
2010-02-03 18:10:07 +01:00
Holger Hans Peter Freyther 62e836c533 [mgcp] Make the mgcp_protocol generate a struct msgb*
Do not directly send data from inside the mgcp_protocol.c
implementation. Instead allocate and return a struct msgb*. The
caller can then either wrap that into the IPA protcol or directly
send it over the UDP socket.
2010-02-03 11:03:45 +01:00
Holger Hans Peter Freyther 77f7afe08e [mgcp] Prepare the in process MGCP handling by adding callbacks
* Call a callback when the endpoint was created, modified or deleted. This
  can be used by the BSC MUX to send a MGCP packet over TCP to the right
  the BSC to allocate the endpoint there with the right data, or it can be
  used in the BSC to send the right commands to the BTS.
2010-02-03 09:54:43 +01:00
Holger Hans Peter Freyther e0955029a1 [mgcp] Prepare to do MGCP over TCP and inside the bsc_msc_ip process
* Separate main process and protocol handling into two parts.
* Change the protocol handling to work with UDP and TCP connection
* This will allow to speak MGCP over TCP between the BSC MUX and
  the real BSC.
2010-02-03 08:50:33 +01:00
Holger Hans Peter Freyther 550197fd8c [gsm48] Allow to send the assignment command on a different lchan
Change the signature to take the lchan were the message is supposed
to be sent and the lchan which is supposed to be assigned.
2010-01-28 12:45:57 +01:00
Harald Welte 39315c4798 [OML] parse attributes depending on BTS type
Some NM attributes are defined differently depending on
the BTS type.  Having one big nm_att_tlvdef[] table for
all BTS types is no longer sufficient.  This patch

* introduces 'struct gsm_bts_model' to describe a BTS model
* adds definitions of gsm_bts_model for BS-11 and nanoBTS
* changes the abis_nm_tlv_parse() function: include a bts pointer
2010-01-10 18:01:52 +01:00
Harald Welte 5078148829 TLV: add function to patch a tlv definition table 2010-01-10 17:45:23 +01:00
Harald Welte 6e670aab5a introduce new gsm_bts_trx_by_nr() function 2010-01-07 20:45:42 +01:00
Harald Welte 2ef156db43 bis_nm_ipaccess_set_nvattr() executes on a TRX, not a BTS 2010-01-07 20:45:41 +01:00
Daniel Willmann 7b1dd748ea [abis_nm] Add abis_nm_bs11_set_pll function to change the set/work value
Whether this function changes the set or the work value depends on your
type of login. In FACTORY login it changes the set value, in FIELD login
it changes the work value (which is what is used by the BS11 to tune the
frequency).
2010-01-07 14:03:22 +01:00
Daniel Willmann 4b054c8788 [abis_nm] Add abis_nm_bs11_infield_logon to logon as user field
As this user you are able to set the PLL work value which is especially
useful if your BS11 got detuned by an inaccurate oscillator in your E1
card.
2010-01-07 14:03:22 +01:00
Daniel Willmann 493db4ee3d [abis_nm] Add generic abis_nm_bs11_logon function
Factoring out common logon functionality will allow us to logon as
different user. abis_nm_bs11_factory_logon now uses this function.
2010-01-07 14:03:21 +01:00
Sylvain Munaut ef24dff2a2 [signal] Differentiate paging success from expiration in SS_PAGING
This is useful information to know and actually fixes a segfault
in rllp.c where lchan is accessed even tough it could be NULL in
case of failure.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-07 10:37:40 +01:00
Sylvain Munaut 4719307f50 gsm_data: Move auth related structure earlier
This is gonna be needed by the next commit ...

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:54:30 +01:00
Sylvain Munaut d7c9e5cad8 encryption: Import a GPL comp128 implementation
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:54:07 +01:00
Sylvain Munaut bd55a6dd31 gsm_04_08: Specify key_seq when calling gsm48_tx_mm_auth_req
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:53:22 +01:00
Sylvain Munaut 062d5efc5c db: Add methods to set auth{info,tuple} for a subscriber
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:50:34 +01:00
Sylvain Munaut c5f488b6bc db: Add declaration for get_auth{info,tuple_for_subscriber
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:50:03 +01:00
Sylvain Munaut c863cbb171 gsm_data: Fix sres to be 4 bytes
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:48:23 +01:00
Sylvain Munaut 70881b7e8a db: Add issued/use_count/key_seq fields to AuthTuples
Theses will be useful to know if we can reuse the tuples or if
we should renew. The 'issued' is currently purely informative.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:17:35 +01:00
Sylvain Munaut 1f6c11fda8 abis_nm: Introduce & use a nm_is_running function to test gsm_nm_state
This returns true if the gsm_nm_state can be considered 'running'.
Note that we also accept availability==0xff (which is a code for
no value) because according to 12.21 it is perfectly valid.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:11:24 +01:00
Sylvain Munaut 504807001d silent_call: Add option to choose channel type
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:10:47 +01:00
Harald Welte 510087752e introduce and implement silent_call_reroute() and silent_call_rx()
Thise two functions are interfacing with the 04.08 layer 3 to
determine if a particular message should be handled inside
the OpenBSC layer 3, or if it should be handled in the silent call
handler.
2010-01-01 10:59:20 +01:00
Harald Welte 83579ca8ff keep 'silent call' state in struct lchan
This enables us to reliably detect if a lchan is part of a silent
call or not.
2010-01-01 10:59:19 +01:00
Holger Hans Peter Freyther f31e4745bb [misc] Utilize rf_locking by setting the nm_state.administrative
* On start the vty code will call the abis_nm method and this
  will set the administrative state to unlock/lock
* During startup the BTS will report its state as well and would
  possible overwrite the set administrative. We are only going
  to update the administrative if it was 0 before. This appears
  to work on all of my tests. In case this will not be the case
  for others we will have to split the administrative into two
  sets one for the BTS and one for the BSC.
2009-12-31 03:05:52 +01:00
Holger Hans Peter Freyther 1356c08cc8 [abis] Dispatch a IPAC restart ACK/NACK signal
* Add the NACK version to the list
* Dispatch the signal when we receive the message
* Handle it in ipaccess-config by exiting the application
2009-12-30 09:00:01 +01:00
Holger Hans Peter Freyther 2e83782b1c [ipaccess] Restart only after setting the OML IP, software load
* Do not issue the restart right aways if we have OML IP or
  software load in the queue (hint, we need a real queue of operations
  to carry out... with one big state machine)
* Change the signal_data of ipacc ACK/NACK to contain the msg type
  and the bts pointer.
* Issue a restart for software load and OML and use the BTS pointer
  we got out of the new signal data.
2009-12-30 08:38:43 +01:00
Holger Hans Peter Freyther 0183edd18c [ipaccess] Change the name to be slightly better.. 2009-12-30 06:42:16 +01:00
Holger Hans Peter Freyther c9f8a6dca3 [ipaccess] Expose the sub header list as well.. 2009-12-30 06:42:16 +01:00
Holger Hans Peter Freyther 4a98cad85e [ipaccess] Turn firmware parsing into a routine so it can be used
* text3 seems to be a version as the text content starts
  with a 'v'
* move the sdp_firmware into the ipaccess.h and declare
  the function. The headers are returned through a list.
2009-12-30 06:42:16 +01:00
Holger Hans Peter Freyther 086ffa51b4 [abis] Add ACK signal and send it on SET NVATTR ACK
* Add the signal definition to signal.h
* Dispatch the signal from abis_nm.c
* Handle it in ipaccess-config.c and say we are done with work
2009-12-30 04:40:50 +01:00
Harald Welte (local) d48f4ebb24 rsl: add new 'gsm_trx_name()' function and use it 2009-12-29 11:00:41 +01:00
Harald Welte (local) 82ff397e31 export the 'trx_is_usable() function and use it from paging
this ensures we don't send paging requests to currently inactive transceivers.
2009-12-29 11:00:18 +01:00
Harald Welte 1887f9d153 Introduce gsm_lchans_name() for human readable lchan state name
Also, use this new function to dump lchan state on VTY and to
improve readability of RSL log messages.
2009-12-29 10:53:25 +01:00
Harald Welte 8e93b7908f RSL: Introduce LCHAN_S_REL_REQ state
This state will help us to differentiate between channels where we have
requested the release, and channels that are actually released.
2009-12-29 10:53:25 +01:00
Harald Welte (local) 66169152f6 vty: replace'logging level' numeric value with human readable string 2009-12-28 13:42:55 +01:00
Harald Welte (local) 7b37d9710d set the TRX nominal power by default and/or VTY 2009-12-28 13:42:47 +01:00
Harald Welte (local) 19ef62a0a5 Introduce and use gsm_lchan_name() in addition to gsm_ts_name()
In many cases we actually want a name / unique ID for the lchan,
not just for the on-air timeslot... especially in SDCCH/8 case,
where 8 SDCCHs share one timeslot...
2009-12-28 13:42:33 +01:00
Harald Welte (local) 3e46031f52 Introduce new ACT_REQ state to prevent race condition during channel allocation
When we allocate a channel, we send the RSL CHAN ACT REQ and wait until we get
a CHAN ACT ACK.  Only the ACK will change the state, so there is a race where
we allocate that same channel to a different channel request before we get
the ACT ACK.

Introducing a new ACT_REQ state resolves this issue.
2009-12-28 13:41:16 +01:00
Harald Welte (local) ccd8845449 rename gsm_lchan_name() to gsm_lchant_name() 2009-12-28 13:41:06 +01:00
Harald Welte (local) 240ce88185 add 'get_string_value()' as inverse function of 'get_value_string()' 2009-12-26 22:47:55 +01:00
Harald Welte 950eca9b76 [meas_rep] Add raw neighbor index into per-cell parsed meas rep 2009-12-26 00:28:37 +01:00
Harald Welte 2e6d4684ff add (and use) new subscr_name() function to get name or IMSI 2009-12-24 14:50:24 +01:00
Harald Welte d0c19148dd [debug] Introduce DREF debug category for reference counting 2009-12-24 11:46:44 +01:00