Holger Hans Peter Freyther
1aa4246bb8
mgcp: Provide the RTP packet loss information in the mgcp overview
2010-07-29 02:43:14 +08:00
Holger Hans Peter Freyther
380b8711a2
mgcp: Attempt to count missing RTP packets with a basic calculation
...
This code compares the UDP sequence numbers of two RTP messages
and guesses if packets are missing. It is guessing in two ways:
1.) by default the sequence number is 0, so on the first
value we ignore the jump... we might ignore a real issue
in case of a wrap around which is easily possible as the
sequence should be a random number.
2.) the UDP stream might have been reordered on the network
and we would see the jump...
In any case these two shortcomings are acceptable for the feature
that is meant to provide some basic analysis..
2010-07-29 02:41:38 +08:00
Holger Hans Peter Freyther
12b917d839
osmo_bsc_rf: Add a grace command, send a signal
2010-07-29 02:41:38 +08:00
Holger Hans Peter Freyther
d0c3229590
mgcp: Rename TOS to DSCP
...
DSCP is the more modern information for TOS and the kernel
will set parts of TOS by itself (e.g. for ECN).
2010-07-27 20:35:03 +08:00
Holger Hans Peter Freyther
6b7710739a
nat: Rename ip-tos to ip-dscp and provide an alias...
2010-07-27 19:21:53 +08:00
Holger Hans Peter Freyther
e731e1d6dd
gsm_04_80: Allow to specify the alert pattern for the notification
...
Allow to specify the level (not the category) of the notification
this provides an easy way to test it on the phones.
2010-07-27 18:27:46 +08:00
Holger Hans Peter Freyther
44d0f19787
gsm_04_80: Embed a ss_Code inside the NotifySS-ARG...
...
Indicate that this is about the Call Name Presentation (cnap)
but the a1200 still ignores the call completelty...
2010-07-27 04:05:29 +08:00
Holger Hans Peter Freyther
68d26796ca
gsm_04_80: Send a Release Complete otherwise the USSD unit stays BUSY
...
We need to release the USSD unit, otherwise it is staying blocked
and will stop to function (even across LUs on my a1200). This code
should encode the transaction and the direction depending on the
network state but this is omitted right now.
2010-07-27 03:31:50 +08:00
Holger Hans Peter Freyther
e6373b7f63
gsm_04_80: Fix the size calculation of the 04.80 message..
...
Subtract the two bytes we were adding to the length of the message.
2010-07-27 01:25:59 +08:00
Holger Hans Peter Freyther
daf753477e
gsm_04_80: Add untested code for USSD notification...
...
One should be able to send a USSD Notification to a given
subscriber if we has an active link...
2010-07-26 20:01:07 +08:00
Holger Hans Peter Freyther
742fc70011
vty_interface_layer3: Fix a subscriber memory leak..
2010-07-26 19:43:54 +08:00
Holger Hans Peter Freyther
ac30cc833c
gsm_04_80: Use msgb_push to get the verification code of msgb
...
msgb started to verify that we do have enough tail/headroom
and this code was not using this check.
2010-07-26 19:08:59 +08:00
Holger Hans Peter Freyther
b02c89e292
gsm_04_80: Add code to wrap a facility IE around.
2010-07-26 19:05:56 +08:00
Holger Hans Peter Freyther
15ef17e70e
gsm_04_80: Create a unstructuredSS-Notify message
...
Create a unstructuredSS-Notify for a given type.
2010-07-26 18:34:27 +08:00
Holger Hans Peter Freyther
ba81ab329c
gsm_04_80: Use the return value of gsm_7bit_encode as length
...
Use the idiom msgb_put(msg, 0) to get the data pointer, then
encode the string into the msgb and then adjust the size.
2010-07-26 17:56:55 +08:00
Holger Hans Peter Freyther
6a4b362ceb
gsm0480: Implement a generic "invoke" wrapping for messages.
...
Implement a GSM 04.80 invoke wrapper for a component and an
invoke id.
2010-07-26 03:55:57 +08:00
Holger Hans Peter Freyther
680833e2ba
gsm0480: Attempt to encode a NotifySS-Arg with a username..
2010-07-26 03:55:57 +08:00
Harald Welte
d30e087521
[gprs] BSSGP: Fix null pointer dereference
...
Zecke has found this using "make CC="clang --analyze"
2010-07-23 22:00:45 +02:00
Holger Hans Peter Freyther
6e95c5ffa1
meas_rep.c: clang reports a possible division by zero
...
Check the input and exit early if we have no measurement reports
to avoid a possible division by zero.
2010-07-23 19:46:04 +08:00
Holger Hans Peter Freyther
8d7b10ef58
nat: Clang reported two places with garbage data
...
Initialize the variables to NULL to fix it.
2010-07-23 19:43:12 +08:00
Holger Hans Peter Freyther
4f140649cb
clang: rc is not initialized in this USSD method.
2010-07-23 19:35:54 +08:00
Holger Hans Peter Freyther
a97152b242
clang: Initialize rc with zero.
...
In the error case we are assigning errno values
but for the success case we have not assigned
anything to the rc variable.
2010-07-23 19:34:34 +08:00
Holger Hans Peter Freyther
960e81e5bd
clang: Clang warns we have this value twice...
...
The type is TLV_TYPE_FIXED, 2 according to the
ipaccess wireshark dissector.
2010-07-23 19:33:16 +08:00
Holger Hans Peter Freyther
306e2bc724
nat: u_int32_t -> uint32_t
2010-07-23 19:09:51 +08:00
Holger Hans Peter Freyther
e2c1520a71
nat: u_int16_t -> uint16_t
2010-07-23 19:09:21 +08:00
Holger Hans Peter Freyther
dbd16fe59a
nat: u_int8_t -> uint8_t
2010-07-23 19:08:55 +08:00
Holger Hans Peter Freyther
7dece86a08
mgcp: u_int8_t -> uint8_t
2010-07-23 18:56:26 +08:00
Holger Hans Peter Freyther
d340cd3b2f
mgcp: u_int16_t -> uint16_t
2010-07-23 18:56:01 +08:00
Holger Hans Peter Freyther
d9b18f8c21
mgcp: u_int32_t -> uint32_t
2010-07-23 18:55:38 +08:00
Holger Hans Peter Freyther
ca157ed3c3
Merge branch 'on-waves/sccp'
2010-07-23 18:42:27 +08:00
Holger Hans Peter Freyther
ccc91f3088
sccp: u_int32_t -> uint32_t
2010-07-23 18:40:10 +08:00
Holger Hans Peter Freyther
f957095385
sccp: u_int16_t -> uint16_t
2010-07-23 18:39:39 +08:00
Holger Hans Peter Freyther
c2c4621a5d
sccp: u_int8_t -> uint8_t
2010-07-23 18:39:17 +08:00
Holger Hans Peter Freyther
8cb4a0f35d
rsl: Add method to send a SMSCB inside a SMS BROADCAST COMMAND
...
* Untested code for sending the SMS BROADCAST COMMAND.
2010-07-23 17:16:48 +08:00
Holger Hans Peter Freyther
dbc62db8db
bsc_api: Add stub for the cipher mode command.
2010-07-23 17:15:15 +08:00
Holger Hans Peter Freyther
c354de8f94
bsc_api: Create dummy stub for the assignment command.
2010-07-23 17:15:15 +08:00
Harald Welte
5eed0a2e01
network_listen: hexdump the SI2/SI2bis/SI2ter messages once we get them
2010-07-22 21:54:20 +02:00
Harald Welte
c95cf10d08
[ipaccess-config] fix bugs in generating the PHYSICAL CONFIG attribute
...
... while asking the BTS to perform tests for us. The length of the
ARFCN whitelist is the actual length in bytes, not the number of 16bit
ARFCN numbers.
Also, implement a limit, either by rxlevel or by number of ARFCN
that should end up in the whitelist.
2010-07-22 21:54:19 +02:00
Harald Welte
e39a5912f1
[ipaccess-config] make sure the ARFCN Whitelist EIE is built correctly
2010-07-22 21:54:19 +02:00
Harald Welte
af109b9fa9
[abis_nm] fix 2 bugs in parsing IPA Test response messages
2010-07-22 21:54:19 +02:00
Harald Welte
a0b0f36ff0
ipaccess-config/network-listen update
...
* transition through cycles of NWL tests
2010-07-22 21:54:19 +02:00
Harald Welte
887deabe38
ipaccess-config / network listen: ordered list of RxLevels
...
Use libosmocore 'rxlev_stat' module to generate an ordered list
of ARFCN's, sorted by RxLev while performing test nr. 64
2010-07-22 21:54:19 +02:00
Harald Welte
549faada21
move ip.access netowrk listen (NWL) to network_listen.c
...
Also, we now re-start the network listen test after it has finished,
so if you run a test from ipaccess-find, the test will get re-started
and re-started all the time.
2010-07-22 21:54:19 +02:00
Holger Hans Peter Freyther
f21e453dc9
nat: Provide an easy view to see if something is connected to the NAT.
2010-07-22 20:37:35 +08:00
Holger Hans Peter Freyther
e8723dcb86
nat: Fix nat crash on start due forgetting the ->data pointer..
2010-07-22 20:30:40 +08:00
Holger Hans Peter Freyther
c95cfda58d
nat: Introduce a show statistics-by-lac LAC
...
Currently show show statistics only work by given the internal
configuration number, add a version that is working by LAC of
the BSC.
2010-07-22 20:26:10 +08:00
Harald Welte
a60923821f
make 'neci 1' the default in the example config files
2010-07-14 13:56:36 +02:00
Holger Hans Peter Freyther
6d2b66e89a
abis_nm: Create a signal data structure for the NACK message
...
Provide the message type and the msgb of the NACK message.
2010-07-14 02:08:35 +08:00
Holger Hans Peter Freyther
4f448c97eb
bsc: Add header file for the true BSC API.
2010-07-05 16:04:36 +08:00
Holger Hans Peter Freyther
02d39b2c4d
msc: Create a dummy operation to keep the channel open for five seconds
...
* We should create the transaction for SMS, CC on the CM Service Request
but for now we will use a band aid and create a dummy operarion to wait
five seconds for the transaction to be opened.
2010-07-05 15:36:08 +08:00
Holger Hans Peter Freyther
d1d45b3b89
nat: Remove the first_contact variable.
2010-07-05 14:47:15 +08:00
Holger Hans Peter Freyther
20ee312d5c
nat: Create a method to determine if any MSC is connected.
...
In the future we will have multiple MSC connections so we will
need to figure if any of them is active.
2010-07-05 14:39:44 +08:00
Holger Hans Peter Freyther
bec411b9db
nat: Store the msc_con in the data of the bsc_fd
...
* Stop using nat->msc_con in the read_cb but use the data.
2010-07-05 14:30:21 +08:00
Holger Hans Peter Freyther
db65bbd515
nat: Make queue_for_msc use the msc_con parameter, pass in the right msc_con
...
* Return msg'es to the right MSC Con. Right now it is nat->msc_con.
* When forwarding from BSC to MSC, use the msc_con inside the
sccp_connections. This means we will only forward data with a
connection to the BSC.
2010-07-05 14:30:14 +08:00
Holger Hans Peter Freyther
3a77e61033
nat: Keep track of the MSC handling the connection.
...
In the future we might have multiple MSCs connected
and need to dispatch it to the right one.
2010-07-05 13:33:18 +08:00
Holger Hans Peter Freyther
49ab278b6f
bsc_api: Only forward L3 messages when the channel is active
...
Avoid forwarding messages from a channel that is already being
closed. Harald has forwarded a crash report where this was failing.
2010-07-05 11:38:37 +08:00
Sylvain Munaut
6f3850fcac
gprs/llc: Don't check FCS in gprs_llc_hdr_dump
...
The FCS isn't computed yet (because of ciphering).
It _will_ be tested and reported as wrong later in the code
so we can just display it here and let the latter code report the
error if any.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-03 22:24:13 +02:00
Sylvain Munaut
7a7d364725
db.c: Fix some SQL queries for ambiguous column names
...
Thanks to Luca Bertoncello for pointing this out
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-03 22:24:13 +02:00
Sylvain Munaut
adea4f1bf8
db: Use proper %llu for subscriber ID in format string.
...
This was causing weird crashes when running in 32 bit linux.
Thanks to horiz0n for taking the time to debug this with me on IRC.
Written-by: horiz0n <cscan@gmx.net>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-03 22:24:13 +02:00
Harald Welte
c48ac4750d
[SGSN] Some IEs in ATTACH REQUEST can be longer in 24.008
...
The original length checks were based on 04.08, but 24.008 allows
longer IEs.
2010-07-03 21:20:06 +02:00
Harald Welte
4b6ac1edb9
[SGSN] Initial work on GMM authentication and ciphering
2010-07-03 11:09:06 +02:00
Harald Welte
3e2e159707
[SGSN] LLC: only copy Kc if algorithm != GPRS_ALGO_GEA0
...
The caller currently has set the Kc pointer to NULL, this fix avoids
crashing at the callee.
2010-07-02 22:56:55 +02:00
Harald Welte
d6f582b352
[SGSN] use GPRS_ALGO_GEA0 instead of '0'
2010-07-02 22:56:55 +02:00
Harald Welte
1b8827ae5b
[SGSN] LLC: Make sure we calculate FCS after decryption
2010-07-02 22:55:39 +02:00
Harald Welte
d07b4f99ce
[SGSN] Use libosmocore GPRS encryption plugins from LLC layer
...
This adds the bits that call into libosmocore (and its plugins)
to implement GPRS (LLC) encryption.
2010-07-02 22:55:39 +02:00
Harald Welte
496aee463f
[SGSN] Call libosmocore helper to load cipher plugins
2010-07-02 22:54:55 +02:00
Harald Welte
6ed4950d5b
[SGSN] remove bogus debug statement
2010-07-02 22:52:33 +02:00
Harald Welte
23c13760ca
[SGSN] SM: Properly parse APN and PCO Optional IE in PDP CTX ACT REQ
2010-07-02 22:52:04 +02:00
Harald Welte
c5d4a0ced1
[SGSN] Print AP name and PDP address of each PDP context
2010-07-02 22:51:16 +02:00
Harald Welte
6add7c2009
[SGSN] Correctly pass IMSI of MM ctx to GTP/GGSN
2010-07-02 22:47:39 +02:00
Harald Welte
3d6815abd1
[SGSN] SNDCP: Subtract SNDCP header from fragment length
...
We don't want to store too many bytes as we would otherwise create
too large re-assembled packets..
2010-07-02 17:16:07 +02:00
Harald Welte
36f1217f32
[SGSN] SNDCP: SN-PDUs need a 16bit length field
...
The BSSGP LLC-PDU IE can have up ot 16bit length, so subtracting
the LLC header the SN-PDU can still have almost a length field
close to 0xffff
2010-07-02 16:44:24 +02:00
Harald Welte
8b705f2533
[SGSN] SNDCP: re-set total number of fragment length
2010-07-02 16:18:59 +02:00
Harald Welte
18d1452a92
[SGSN] Send poper SM and GMM STATUS in case we have no MM CTX
2010-07-02 16:18:18 +02:00
Harald Welte
ab4094ca6b
[SNDCP] some more defragmentation debug statements
2010-07-02 16:01:47 +02:00
Harald Welte
60da7d4f88
[SGSN] SNDCP defrag: use correct length, don't include LLC FCS
...
The LLC layer tells us the PDU length, and we have to use it
in SNDCP rather than to re-calculate it if we want to avoid copying
the CRC24 into the defrag elements.
2010-07-02 15:45:12 +02:00
Harald Welte
8f0c0a3a3c
[SGSN] SNDCP: Actually copy the payload data in the defrag queue entry
...
Prior to this patch our defragmented messages always consisted of 00-bytes
2010-07-02 10:29:06 +02:00
Harald Welte
11ff3e8ec2
[SGSN] Remove old dead code
2010-07-02 10:17:24 +02:00
Harald Welte
19f9e30eb9
[SGSN] Only increment PDP CTX ACT count after check for retransmission
2010-07-02 10:15:49 +02:00
Harald Welte
b37515e86b
[SGSN] Account for re-transmitted PDP CTX ACT REQ
...
In case our PDP CTX ACT ACK gets lost on the Gb or Um link,
the MS re-transmits the PDP CTX ACT REQ. We have to ACK it
again instead of REJecting it..
2010-07-02 10:12:58 +02:00
Harald Welte
993697c8d2
[SGSN] SNDCP: Fix off-by-one error missing last segment in defrag
...
When we defragment the segments from the defrage queue, we have
to iterate all the way up to (and including) the last segment number
that we have received.
2010-07-02 10:11:42 +02:00
Harald Welte
b87bc86006
[SGSN] SNDCP: more verbose defragmentation debugging
2010-07-01 20:29:20 +02:00
Harald Welte
8911cef81d
[SGSN] Fix segfault when passing re-assembled SN-PDU to GMM
...
sgsn_rx_sndcp_ud_ind() can no longer make the assumption that msgb_bcid() is
valid, as this is only true for an un-fragmented SN-PDU. So instead,
we now store the RAID in the SNDCP Entity and pass it as an explicit
argument to sgsn_rx_sndcp_ud_ind().
2010-07-01 19:56:19 +02:00
Harald Welte
951a12cf4e
[SGSN] SNDCP: fix off-by-one error during defragmentation
2010-07-01 15:09:45 +02:00
Harald Welte
362aea0f4d
[SGSN] SNDCP: Initialize defrag list header
2010-07-01 12:31:10 +02:00
Harald Welte
fd29a1f6cc
[SGSN] GMM: Complete value_string for GMM cause values
2010-07-01 12:26:59 +02:00
Harald Welte
65d96783df
[SGSN] SNDCP: use llist_for_each_entry_safe() when cleaning frag queue
2010-07-01 12:19:02 +02:00
Harald Welte
875840c603
[SGSN] Fix TLLI (re)assignments
...
Once The TLLI (or P-TMSI of which it is derived) change has been
confirmed by the MS, we need to unassign the old TLLI but keep
the new TLLI _without_ re-setting the LLC entity structure such
as VUsend /VUrecv counters.
2010-07-01 11:54:31 +02:00
Harald Welte
937a9ecfcd
[SGSN] Fix segfault when doing PS PAGING
...
The 'bssgp_paging_info' contains a pointer to the P-TMSI, and not
the P-TMSI itself. The reason is that it is an optional BSSGP IE.
2010-07-01 11:53:25 +02:00
Harald Welte
f78a3b2a22
[SGSN] Add VTY interface for SNDCP
2010-07-01 10:57:44 +02:00
Holger Hans Peter Freyther
cacbc73d5e
osmo_bsc: Add option parsing, vty dummy
...
Add dummy files and option parsing for the Osmo BSC code.
2010-06-30 15:11:30 +08:00
Holger Hans Peter Freyther
ab5135e36a
bsc: Move meas_rep.c into the libbsc.c as it is used from bsc_vty.c
2010-06-30 15:11:30 +08:00
Holger Hans Peter Freyther
5ccab1020c
osmo_bsc: Add empty osmo_bsc_main.c and hook it into the build
2010-06-30 15:11:29 +08:00
Holger Hans Peter Freyther
ec4bfdc435
bsc_api: Move the API init into the main function.
...
The BSC API will not be used until the first iteration through
the event loop so it is safe to call it after the bootstrap.
2010-06-30 15:11:29 +08:00
Holger Hans Peter Freyther
2f4dbebb20
osmo-bsc: Start adding code for the osmo_bsc..
...
This adds the unix domain socket rf control protocol into
the new subdirectory.
2010-06-30 15:11:29 +08:00
Nico Golde
5950236b5e
* Fix null ptr dereference and sms memleak in case the recipient of an sms sent via vty is not attached. Store the sms in the database in this case for later delivery.
...
The problem is that sms_from_text returns NULL in case the
subscriber is not attached which a) leaks memory of the
previously allocated sms and b) runs into a null ptr
dereference in _send_sms_str().
There may be a better solution than this but this is the
easiest way of noticing and taking action I could find
without changing return values of sms_from_text.
2010-06-30 09:10:04 +02:00
Harald Welte
bd17b39fd2
[BSC] VTY: Fix parsing of uppercase hex digits
2010-06-30 09:01:35 +02:00
Harald Welte
43ef6483db
[SGSN] BSSGP: Print TLLI as hex value like everwhere else
2010-06-30 09:01:35 +02:00
Holger Hans Peter Freyther
d9c9f07c2c
handover: lchan_free will only free the local resources.
...
lchan_free only free's the local resource of the BSC but
does not release the channel at the BTS. Use lchan_release
to properly release the channel. This code assumes that the
timeout happens after a CHAN ACT ACK/NACK otherwise we have
some problems. The comment indicates that this is the case.
2010-06-30 13:04:13 +08:00
Holger Hans Peter Freyther
f2553a6c3a
handover: Call bsc_handover_clear from gsm0808_clear
...
The bsc_handover_clear will release an in-progress handover
and free the lchana and the data associated with this handover
2010-06-30 13:02:08 +08:00
Holger Hans Peter Freyther
0610947f4c
misc: Move handover_logic.c into the libbsc.a
...
We are implementing the intra BSC handover so we should have the
code in the BSC as well.
2010-06-30 12:59:20 +08:00
Holger Hans Peter Freyther
88519eaaef
msc: Add includes to silence a compiler warning.
2010-06-30 12:59:20 +08:00
Holger Hans Peter Freyther
e071ab70e9
handover: Attempt to use the same gsm_subscriber_conn for new/old channel
...
The transaction should not know on which lchan we are operating
as this can change due handover. Add untested code to share the
subscriber connection of the new and old lchan and move the pointer
in case of success/failure. Also on a clear command we will free
any resources allocated...
This code is not tested and needs to be debugged, but it should
have the right structure. I am going to fix a potential memleak
in the next commit.
2010-06-30 12:59:20 +08:00
Holger Hans Peter Freyther
d06516557a
bsc_api: Avoid use after free kind of error on the lchan.
2010-06-30 12:17:35 +08:00
Holger Hans Peter Freyther
2486663844
ussd: Release the MSC connection as fast as possible..
2010-06-30 12:15:19 +08:00
Holger Hans Peter Freyther
0379c6d386
abis_rsl: Add full MA again until we are confident to remove it
...
The spec seems to say we do not need to include the full MA,
even for Phase1 phones but that is not so clear...
2010-06-30 12:06:20 +08:00
Holger Hans Peter Freyther
e38bd6caa3
abis_rsl: Change code to generate Channel Identification
...
1.) memset the gsm48_chan_desc to avoid sending dummy data
2.) According to the GSM08.58 9.3.5 the Mobile Allocation
shall be included but the empty (by setting the length
to zero).
3.) use msgb_tlv_put and calculate the length via the l3h
msgb_l3len and assign it.
2010-06-30 12:01:22 +08:00
Holger Hans Peter Freyther
06abe9f383
ussd.c: Make sure text is memset to zero..
...
Make the strstr fail fast, make sure the text is null terminated...
2010-06-30 11:59:30 +08:00
Holger Hans Peter Freyther
66efcbce65
gsm_subscriber_base: Take a ref on the subscriber to avoid use after free
...
On expired paging we might access a GSM Subscriber that has already
been deleted. To avoid this we will add a subscr_get/subscr_put for
the subscriber to the allocation and release path of the request.
Reported-by: Richard Zahoransky
2010-06-30 11:59:29 +08:00
Harald Welte
93d50e69d3
[BSC] RSL: CHAN ACT: Only include MA if TS is hopping
2010-06-29 17:53:45 +02:00
Harald Welte
8fc60f0eb5
[SGSN] Deactivate SNDCP entity on PDP CTX DEACT CONFIRM
...
Otherwise we will end up leaking memory in the SNDCP layer...
2010-06-28 22:21:57 +02:00
Harald Welte
bd5c91276b
[SGSN] MM: Properly communicate TLLI changes / unassignment to LLC
2010-06-28 22:18:53 +02:00
Harald Welte
f7fef48e1b
[SGSN] LLC: properly free LLC entities at TLLI unassignment
2010-06-28 22:18:26 +02:00
Harald Welte
c0d59504b4
[SGSN] Deactivate all PDP contexts on GPRS DETACH
2010-06-28 19:11:41 +02:00
Harald Welte
376d5e521e
[SGSN] Fix segfault ar PDP CTX DEACT time
...
We need to call rate_ctr_group_free() on the per-PDPctx-counters
2010-06-28 18:57:21 +02:00
Harald Welte
a1d39a2a11
[BSC] fix off-by-one error in computing l2 pseudo-length in IMM ASS
...
@fingerprint:
This caused Motorole EZX phones (Neptune LTE chipset) to discard
all immediate assigns and thus be unable to perform location updating.
2010-06-28 18:41:27 +02:00
Harald Welte
0f43dbcfc6
[ipaccess-config] Better way to set/unset NVRAM attributes
...
there are now human-readable names so you can do something like
ipaccess-config -U dhcp-enabled -S static-ip -S static-gw 192.168.100.120
to unset DHCP and to set static IP and gateway attributes.
2010-06-28 15:52:56 +02:00
Harald Welte
0aef73efc4
[ipaccess-config] Enable setting of static IP address / netmask / gateway
...
However, the 'static IP address' NVRAM flags are not yet set correctly
2010-06-28 15:18:17 +02:00
Harald Welte
8c21c07a65
[ipaccess-config] use msgb to make use of various tlv put functions
...
This looks so much better than the *cur++ type code.
Also, we now terminate ipaccess-config once the NV flags or Unit ID have
been set, not just for the OML IP address.
2010-06-28 14:41:09 +02:00
Holger Hans Peter Freyther
ed83286950
gsm_data.c: Reorder includes to put osmocore up
2010-06-28 18:20:22 +08:00
Holger Hans Peter Freyther
4049455d74
bsc_msc: Remove use_count from the subscriber connection
...
A channel will be released in case of
* Errors via the clear_request callback...
* no more transactions and operations are going on.
This means that if we do something without a transaction
the channel might be closed down right away. The bug fix
will be to create a transaction/operation.
2010-06-28 18:01:47 +08:00
Holger Hans Peter Freyther
2412a07965
bsc_api: Allocate the subscriber_connection dynamically
...
This is a big change to the way we use the subscriber
connection. From now on it is is dynamically allocated
and we will slowly move from a 1:1 lchan to conn to
having more than one lchan per connection.
This is the first commit, the subscr_con* methods will
move to gsm_data once the use_count is removed from the
connection, the freeing of the connection will also change.
2010-06-28 16:12:39 +08:00
Holger Hans Peter Freyther
94d625bfa0
Revert "bsc_api: Move debug context for subscriber into the bsc_api.c"
...
This is breaking the filtering for the Measurement Report case, revert
the patch for now.
This reverts commit 69e8f8285b
.
2010-06-28 13:38:19 +08:00
Harald Welte
9d4cca7a0e
[BSC] Enable the use of whitespaces in the subscriber name
...
This patch (originally by Luca Bertoncello) adds support for spaces
in the subscriber name when specified from the VTY.
2010-06-24 08:06:38 +02:00
Holger Hans Peter Freyther
2788b96bf4
gprs: Fix LOGP misuse and specify LOGL_NOTICE as region.
2010-06-23 09:48:25 +08:00
Holger Hans Peter Freyther
f7a1c23e1d
lchan: Document why lchan_reset is there... at least try to.
2010-06-22 12:26:35 +08:00
Holger Hans Peter Freyther
5ba05f4d26
abis_rsl: Send the IMMEDIATE Assignment after the Channel Ack.
...
The Channel Activate might be sent to a different TRX than the
Immediate Assignment. So we need to make sure that the channel
is activated before we send the immediate assignment for the RACH.
Another reason for that is according to GSM 08.58 we should take
the frame number from the activate and use it for the starting
time inside the immediate assignment message. We obviously do not
do this yet.
The code assumes that the BTS will either respond with a CHAN ACK
or a CHAN NACK if not the lchan will remain in the request state.
2010-06-22 12:26:35 +08:00
Nico Golde
4df2ad9ac6
[SMS] avoid mktime on NULL
...
gmtime(NULL) returns NULL at least in glibc and *can not* be used as
time(NULL). Since we compare two time_t values when checking the validity
period this can be replaced by time(NULL)
2010-06-21 13:51:28 +02:00
Holger Hans Peter Freyther
c8bf3c178f
misc: make the compiler happy...
...
The compiler treats uint8_t*[] and uint8_t* differently,
use the address of the first element and assign that.
2010-06-21 18:21:16 +08:00
laforge
cfa4a01c8f
[RSL] hopping: Set correct L2 pseudo-length during IMMediate ASSign
...
Thanks to Sylvain for the hint that lead to this fix.
2010-06-21 12:09:41 +02:00
Holger Hans Peter Freyther
a69d923fd7
bsc_api: Use conn->bts directly...
2010-06-21 16:40:09 +08:00
Holger Hans Peter Freyther
69e8f8285b
bsc_api: Move debug context for subscriber into the bsc_api.c
2010-06-21 16:40:09 +08:00
Holger Hans Peter Freyther
db4ef0d369
bsc_api: Remove the lchan usage from the Paging Response handling.
2010-06-21 16:40:09 +08:00
Holger Hans Peter Freyther
758f4dfa17
silent_call: Use the gsm_subscriber_connection instead of lchan->conn
2010-06-21 16:40:09 +08:00
Holger Hans Peter Freyther
1afbd76155
abis_nm.c: Reading the in_addr can lead to unaligned memory access
...
The value of the in_addr might not be 32 bit aligned and reading
it can generate an alignment error on ARM. Fix it by using memcpy
to copy the data into a local variable.
There are many more potential alignment issues that we will fix
when we hit them.
2010-06-21 16:40:09 +08:00
Holger Hans Peter Freyther
34949ae924
bsc_init: Avoid unaligned access to nanobts_attr_nsvc0
...
nanobts_attr_nsvc0 + 10 is unlikely to be 32 bit aligned
and will trigger an alignment error on ARM..
2010-06-21 16:40:09 +08:00
laforge
694a5cfe06
[BSC] RSL: Fix Channel Identification IE in RSL CHAN ACT
...
We now not only include the 04.08 channel description but also
the 04.08 Mobile Allocation nested IEs
2010-06-20 21:55:23 +02:00
Harald Welte
9575fd0732
[BSC] add example hopping config file for BS-11 in 2TRX config
2010-06-20 16:08:36 +02:00
laforge
abeb951426
[BSC] Fix off-by-one error in computing mobile allocation
2010-06-20 15:56:50 +02:00
laforge
f87ebe69d5
[BSC] NM: Correct treatment of ARFCN_LIST for BS-11
...
For Siemens BS-11, the 'length' value of the ARFCN_LIST IE is interpreted in
violation of the spec. The spec says it is a length in octets, while Siemens
treats it as 'count of 16bit ARFCN values'.
2010-06-20 15:20:02 +02:00
laforge
09108bff95
[BSC] RSL: properly include MA in IMM ASS CMD
...
When we build an IMMediate ASSign CoManD for a hopping channel,
we need to include the length of the MA in the total length of
the 04.08 message
2010-06-20 15:18:46 +02:00
Harald Welte
c8794b5977
[BSC] SI: make sure we initialize the data field, not the bitvec structure
2010-06-20 10:44:54 +02:00
Harald Welte
29aca17ed0
[BSC] Hopping: Add MA IE to ASS CMD, IMM ASS CMD and HO CMD
...
Also, make sure the bit ordering in the pre-computed MA is correct,
as well as the cell channel description of the target cell being
present in the HO CMD.
2010-06-20 10:44:53 +02:00
Harald Welte
7401ae6a79
[BSC] Keep a SYSTEM INFORMATION cache for each BTS
...
This will later be useful for handover where we need to copy the cell
channel allocation into a normal 04.08 message
2010-06-20 10:44:53 +02:00
Harald Welte
fd3708976a
[BSC] Generate MA for each timeslot that has hopping enabled
...
The MA is used in 04.08 channel assignment related messages
2010-06-20 10:44:53 +02:00
Harald Welte
c2fb3d0c3d
[BSC] Make sure we only enable hopping on BTS that support it
2010-06-20 10:44:53 +02:00
Harald Welte
f3d8e92731
[BSC] introduce the concept of 'BTS features'
...
We can then check if a bts supports a certain feature or not.
2010-06-20 10:44:53 +02:00
Harald Welte
a39b0f2bb7
[BSC] Implement per-timeslot ARFCN lists for frequency hopping
...
We now compute the Cell Channel Description for SI 1 by bit-wise
OR of the ARFCN bitmask of each timeslot on all the TRX of the BTS.
Also, support generating a GSM 04.08 Channel Description IE for
the hopping case (with HSN/MAIO instead of ARFCN).
What's still missing now: Sending the 04.08 Mobile Allocation IE
2010-06-20 10:44:53 +02:00
Harald Welte
6e0cd04725
unfinished support for hopping channels
2010-06-20 10:44:52 +02:00
Harald Welte
b37e5f8a60
[BSC] mISDN: Avoid sending RSL messages to wrong channel number
...
In some cases, we get a DL_INFORMATION_IND with a wrong channel
number, and only in the DL_ESTABLISH_IND we will see the real
channel number that is to be used for this (TEI, SAPI) tuple.
2010-06-20 10:44:15 +02:00