Holger Hans Peter Freyther
2a9eeaa588
bsc: Allow the NAT to query the list of LACs
...
Right now the code assumes that any request coming
from the NAT is a query and the code responds to with
a list of configured LACs.
2011-04-26 09:35:31 +02:00
Holger Hans Peter Freyther
a78b6026c9
bsc: Handle MGCP coming from Osmo Extensions header
...
Start using the new Osmo Extension header and forward MGCP
to the MGCP GW.
2011-04-26 09:33:47 +02:00
Daniel Willmann
163f612326
bsc: Point back from struct osmo_msc_data to struct gsm_network
2011-04-26 09:33:47 +02:00
Holger Hans Peter Freyther
de2b860dff
nat: Introduce a block on the NAT to slowly get rid of BSCs
...
For restarting the NAT we can now block it, it will not accept
new connections and for existing connections it will attempt
to drop them over time. A blocked NAT will end up with no BSC
connections left and then can be safely restarted.
2011-04-26 09:33:47 +02:00
Holger Hans Peter Freyther
c3f28320c2
ipa: Reserve two new values for the Osmo IPA extensions
...
We want to send MGCP through the Osmo Extension and also
want to send the list of local LACs to it.
2011-04-26 09:33:47 +02:00
Holger Hans Peter Freyther
5deb6c3c5f
abis: Use LOGL_ERROR for the Failure Event Report
...
It is not an error of the BSC but we will treat a
BTS error like an error of the BSC for now.
2011-04-26 09:33:47 +02:00
Holger Hans Peter Freyther
0b03f16cdb
ussd: Ignore connection release/clear from the MSC
...
In case this is a local USSD connection we will ignore
the clear command and respond with a RLC to any RLSD but
will never forward that to the BSC. This way the external
USSD is fully in charge of the connection.
There are theoretical issues if there are multiple transactions
on the same SCCP Connection but this can not be solved properly
right now.
2011-04-21 17:13:51 +02:00
Holger Hans Peter Freyther
71dd06cfcb
crc24: Include stdint.h as a possible compile fix
2011-04-19 20:06:26 +02:00
Holger Hans Peter Freyther
123bc32834
ussd: Keep track of used TIs for USSD and forward messages
...
Keep track of the used transaction identifier and always forward
messages to the USSD provider. E.g. this can be used to have a
dialogue going. Right now it is still possible that the MSC will
close down the connection.
2011-04-19 13:06:47 +02:00
Holger Hans Peter Freyther
91b9a45be4
nat: Inform the USSD Provider about lost connections
2011-04-18 17:32:40 +02:00
Holger Hans Peter Freyther
e5d324981d
nat: Remove magic numbers, use enum values for conn classification
...
Remove the usage of 0, 1, 2 and start using enum values. We can
still assume con_local is a number.
2011-04-18 17:32:38 +02:00
Holger Hans Peter Freyther
a64037cd4a
nat: Clarify the documentation of the allow/deny regexp
2011-04-18 17:31:40 +02:00
Holger Hans Peter Freyther
80352e03ca
ho: Initialize nmp_worst as it was not initialized
...
The compiler can't know that on the first iteration we will
assign nmp_worst as we have used a high average value.
2011-04-18 17:31:40 +02:00
Holger Hans Peter Freyther
d447e99587
bsc: Move transaction.c from the libbsc to the libmsc
...
The BSC code does not use transactions, move it to the libmsc.
2011-04-18 17:31:40 +02:00
Holger Hans Peter Freyther
0e7d071e47
misc: Fix possible crash with setting an extension
2011-04-18 17:31:40 +02:00
Holger Hans Peter Freyther
a8a09df6a6
misc: Remove sys/types.h includes from the files
...
These are not needed any more. We used them for u_int
types but we now use uint which comes from stdint.h
2011-04-18 17:31:39 +02:00
Holger Hans Peter Freyther
c42ad8b686
misc: Move from u_int to uint types of stdint.h
...
This was done with sed on the files.
2011-04-18 17:31:39 +02:00
Holger Hans Peter Freyther
5cde92cb0e
nat: And out the skip_indicator/transaction id from the gsm48 header
...
We need to and out the protocol discriminator as call control
might have use transactions. This has only failed for the USSD
filter so far as this must deal with transactions.
2011-04-13 18:56:13 +02:00
Holger Hans Peter Freyther
06009c8d5a
bsc: Remove the handling of the RTP option from the switch/case stmt
...
The 'P' code was not present in the getopt call anyway.
2011-04-13 09:18:49 +02:00
Holger Hans Peter Freyther
fede54c821
bsc: Use the new name in the usage statement
2011-04-13 09:18:09 +02:00
Pablo Neira Ayuso
7e737007d9
ipaccess-proxy: get rid of make_gprs_sock()
...
It is similar to make_sock() available in openbsc/libcommon.
2011-04-12 21:50:47 +02:00
Pablo Neira Ayuso
4c80a516f8
ipaccess-proxy: remove leftover option `--udp'
...
It seems it remains unimplemented, remove it.
2011-04-12 21:50:47 +02:00
Pablo Neira Ayuso
25ffe54118
ipaccess-proxy: more robust option parsing and checking
...
With this patch, ipaccess-proxy makes more robust option checking:
$ ./ipaccess-proxy -l 1.1.1.1 -b 2.2.2.2 -e
ERROR: missing mandatory argument for `-e' option
And we return to shell to enforce the user to try again with the
appropriate invocation.
Before this patch, the default getopt_long() error handling was
enabled which displayed this message:
./ipaccess-proxy: option requires an argument -- 'e'
and ipaccess-proxy continued working.
This is generic enough to cover other option that require mandatory
arguments like `--bsc' and `--listen'.
2011-04-12 21:50:47 +02:00
Pablo Neira Ayuso
23b1b808f1
ipaccess-find: get rid of ipac_idtag_name()
...
Use generic ipaccess_idtag_name() available in libabis instead.
2011-04-12 21:50:47 +02:00
Pablo Neira Ayuso
91afbbc56a
libabis: ipaccess: use log instead of debug under errors in ipaccess_send()
...
This patch was suggested by Zecke.
2011-04-12 21:50:46 +02:00
Pablo Neira Ayuso
ca05d432d7
src: more robust ipaccess_idtag_parse()
...
Now ipaccess_idtag_parse() returns -EINVAL instead of -1. We also
check for the return value of this function in every invocation to
skip further processing in case of messages with malformed TLVs.
This idea was suggested by Zecke.
2011-04-12 21:50:46 +02:00
Pablo Neira Ayuso
0d20b63574
libabis: ipaccess: more robust ipaccess_idtag_name()
...
ipaccess_idtag_name() now takes a uint8_t as parameter which is the
length of the type tag.
This patch was suggested by Zecke.
2011-04-12 21:50:46 +02:00
Holger Hans Peter Freyther
81863cde82
db: The forward declaration of the enum does not work with C++
...
We need to include this directly to help LCR in building.
2011-04-12 21:33:35 +02:00
Holger Hans Peter Freyther
090493863b
mncc: Do not permanently disable the listening socket in case of error
...
When we have no other MNCC connection but the registeration of the
new fd is failing we should not disable reading from the listen_fd
for ever as the situation might not be permanent.
2011-04-12 20:14:51 +02:00
Holger Hans Peter Freyther
18fe88933c
nitb: Listen for incoming MNCC connections only once
...
There is no point in creating the MNCC socket twice. Only
create it if the user requested this when starting the nitb.
2011-04-12 19:16:48 +02:00
Holger Hans Peter Freyther
0e8facca42
ipaccess-config: Allow to invoke tests by names.
...
Allow to invoke tests by name.
2011-04-11 20:39:16 +02:00
Holger Hans Peter Freyther
390ba3faa0
ipaccess-config: Add option to list possible NVRAM settings
...
We can handle NVRAM settings via names but there is no way
to discover these names. This commits adds the unusual -H
option to show these values.
2011-04-11 20:39:16 +02:00
Holger Hans Peter Freyther
cfccedd74a
ipaccess-config: Allow to automatically loop a test
...
This makes the commented out code an option that might
or might not work reliable.
2011-04-11 20:39:12 +02:00
Holger Hans Peter Freyther
0d93fb4127
nat: Fix a crash due the refactoring and pass the nat again.
2011-04-11 20:30:56 +02:00
Holger Hans Peter Freyther
b326100b12
misc: Fix compiler warnings in the code
2011-04-07 23:34:54 +02:00
Holger Hans Peter Freyther
5d7b65b407
ipaccess: Add a function to prepend the osmocom ext header
...
* include/openbsc/ipaccess.h: Reserve a protocol number for control
commands
* input/ipaccess.c: New function ipaccess_prepend_header_ext prepends
the extension header
2011-04-07 23:31:58 +02:00
Pablo Neira Ayuso
9f1294d623
ipaccess-proxy: remove hardcoded IP for options `-l' and `-b'
...
This patch removes the hardcoded IP addresses for options `-l'
and `-b'.
2011-04-07 23:28:00 +02:00
Pablo Neira Ayuso
c281b4e85a
libabis: ipaccess: export ipaccess_parse_unitid
...
Now this is used by ipaccess-proxy, remove redundant implementation in it.
2011-04-07 23:28:00 +02:00
Pablo Neira Ayuso
625295b14f
ipaccess-proxy: get rid of ipac_idtag_parse()
...
Use ipaccess_idtag_parse() available in libabis instead.
2011-04-07 23:28:00 +02:00
Pablo Neira Ayuso
66add64b71
libabis: ipaccess: export ipaccess_idtag_name()
...
Now this is used by ipaccess-proxy, remove redundant implemention in it.
2011-04-07 23:28:00 +02:00
Pablo Neira Ayuso
22f58a9a58
libabis: ipaccess: conclude new ipaccess_send_*() functions and use them
...
This patch finishes the new ipaccess_send_*() functions and use them
in the ipaccess-proxy code.
I have also cleanup the definition of the PONG, ID_ACK and ID_REQ
messages (including some minor documentation about them).
I had to rename ipaccess_recvmsg() in ipaccess-proxy to avoid clashing
with the one defined in libabis.
2011-04-07 23:28:00 +02:00
Pablo Neira Ayuso
3ab864a860
ipaccess-proxy: get rid of make_listen_sock() and use make_sock() instead
...
This patch replaces make_listen_sock() by the generic make_sock()
available in libcommon/socket.
2011-04-07 23:28:00 +02:00
Holger Hans Peter Freyther
55ef5fb7ef
bsc: Add the bsc-rf-socket command to master as well
...
Make it possible to specify the rf-socket path via the
vty configuration as well. The command line setting will
override it though.
2011-04-07 23:26:13 +02:00
Holger Hans Peter Freyther
4b41746ce3
bsc: Include openbsc/ipaccess.h for the drop_oml command
...
Fix a compiler warning about the drop_oml command.
2011-04-07 23:10:10 +02:00
Holger Hans Peter Freyther
7d73642d0e
nat: Fix the call to make_sock and pass a 0 priv_nr and the nat as data
2011-04-07 22:14:58 +02:00
Holger Hans Peter Freyther
ef38e85542
nat: Remember if the MSC accepted the connection on principle
...
For the USSD module we only want to handle requests that are
legitimate. This is achieved by looking for the CM Service Accept
or the BSSAP CIPHER MODE COMMAND.
2011-04-06 11:29:46 +02:00
Pablo Neira Ayuso
da2f769681
ipaccess: proxy: get rid of internal make_sock() implementation
...
With this patch, we use the implementation available in libcommon.
2011-04-05 18:33:28 +02:00
Pablo Neira Ayuso
165fe56260
libcommon: socket: extend make_sock() prototype
...
This patch extends the make_sock() prototype so you can fully set
the fields priv_nr and data of the bsc_fd structure.
This is the first step to get rid of the internal make_sock()
implementation that ipaccess-proxy uses.
This patch includes a minor cleanup to pass INADDR_ANY instead
of zero, if you do not want to bind the socket to one specific
address.
2011-04-05 18:33:24 +02:00
Pablo Neira Ayuso
f22e348287
ipaccess-config: exit if no network interface is specified
...
ipaccess-config has to exit if no network interface is specified,
otherwise it uses argv[1] which has a uninitialized value.
2011-04-05 18:33:17 +02:00
Holger Hans Peter Freyther
4c9557ef24
nat: Bail out if the regexp fails to compile and avoid a crash
...
If the regexp fails to compile the internal dfa is NULL and a
regexec will crash nicely. Fail and free the string if the regexp
fails to compile.
2011-04-04 19:19:26 +02:00
Holger Hans Peter Freyther
13673749ff
lapd: NULL pointer derefence possible here
...
The idiom seems to be to allocate the lapd_tei if it does not
exist and use it then. This was found by clang --analyze.
2011-04-04 19:17:58 +02:00
Holger Hans Peter Freyther
a18b11602c
nat: Make the USSD number matching a regexp
...
This allows to match multiple numbers and multiple patterns
2011-04-01 17:32:21 +02:00
Holger Hans Peter Freyther
9e7e55f164
nat: Fix the return to return CMD_SUCCESS;
2011-04-01 16:23:17 +02:00
Holger Hans Peter Freyther
6a7babd658
nat: Add commands to remove access-list from NAT and BSC config
2011-03-29 17:50:49 +02:00
Holger Hans Peter Freyther
d000c27d3b
nat: Improve the error message for the failing bind call
...
Print the IP and port that was used for the address to bind to.
2011-03-29 17:50:49 +02:00
Holger Hans Peter Freyther
06f4fc79a2
bsc: Make the MSC node a child of CONFIG_NODE
...
The VTY code calls the write function for nodes in the order of
registration of the node and not in terms of hierachy of nodes. This
means that the e1_input code is written before the MSC node that
was the child of the network. Make the MSC_NODE a direct descendant
of the CONFIG_NODE and avoid this issue.
2011-03-29 17:50:49 +02:00
Holger Hans Peter Freyther
fcac2911cf
bsc: Fix the generation of the config file, fix indention
...
Fix the indention of codec-list, bsc-welcome-text, mid-call-text
and the mid-call-timeout. Fix the name of the codec-list in the
write method.
2011-03-29 17:08:27 +02:00
Pablo Neira Ayuso
6110a3f3fa
src: include new file osmocom/vty/misc.h for vty_out_rate_ctr_group()
...
This uses the new include file for vty_out_rate_ctr_group() which
available in libosmocore.
2011-03-28 20:01:03 +02:00
Pablo Neira Ayuso
3c409c249d
ipaccess-proxy: fix segfault in handle_dead_socket
...
This patch fixes a segfault if we or one BTS start a TCP connection
and close it before any IPAC_MSGT_ID_RESP message is sent.
2011-03-27 22:21:08 +02:00
Pablo Neira Ayuso
928cb33eb4
tests: fix bsc-nat test
...
In 136f453dd2
, I forgot to update
the new header path in the test/bsc-nat files (this happened to
me because I forgot to configured openBSC without --enable-nat).
2011-03-26 23:57:53 +01:00
Harald Welte
d36ff76f9d
Fix build of bsc-nat and GPRS code after include path change
...
The last patch changed the osmocore include paths, this fixes some build
problems caused by it
2011-03-23 18:33:26 +01:00
Pablo Neira Ayuso
136f453dd2
src: use new library libosmogsm and new path to headers in libosmocore
...
libosmogsm is a new library that is distributed in the libosmocore.
Now, openbsc depends on it. This patch gets openbsc with this
change.
This patch also rewrites all include path to the new
osmocom/[gsm|core]
Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-23 18:17:56 +01:00
Pablo Neira Ayuso
3848770669
src: fix use of logging_vty_add_cmds() without log_info parameter
...
This patch fixes:
CC gb_proxy_main.o
gb_proxy_main.c: In function ‘main’:
gb_proxy_main.c:224: warning: implicit declaration of function ‘logging_vty_add_cmds’
And a similar problem in osmo-bsc_nat.
This was introduced in by myself in patch:
"bsc: change bsc_vty_init to take logging categories as parameter"
Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-23 09:04:10 +01:00
Harald Welte
50e529d44e
Depend on libosmocore 0.1.31 due to VTY / logging change
2011-03-20 10:37:06 +01:00
Harald Welte
c76fb5dd10
[RBS2000] Enable TRAU frame handling/muxing similar to BS11
...
Based on original patch by Gus Bourg <gus@bourg.net>
2011-03-20 06:27:31 -03:00
Pablo Neira Ayuso
739a566961
bsc: change bsc_vty_init to take logging categories as parameter
...
This change is required to finish the integration of the VTY and
the per-application logging categories that provides:
"vty: integration with logging framework"
in libosmocore.
It has been tested with osmo-nitb. The other just compiled tested.
2011-03-19 18:50:38 -03:00
Pablo Neira Ayuso
5d7ad47386
misc: check for libdbi, mandatory library dependency
...
Otherwise, openbsc fails to compile:
CC db.o
db.c:29:21: error: dbi/dbi.h: File does not exists
2011-03-08 15:41:36 +01:00
Pablo Neira Ayuso
682587748f
vty: fix segfault if rf_ctl is not set
...
This is the case of osmo-nitb, since it does not call
osmo_bsc_rf_create().
term1: $ ./osmo-nitb -c ../openbsc.cfg.nanobts
term2: $ telnet localhost 4242
term2: OpenBSC> show network
term1: Segmentation fault
2011-03-08 15:35:34 +01:00
Holger Hans Peter Freyther
16b7f5c4ef
mgcp: Remove some duplicate header files from the list.
2011-03-08 15:33:52 +01:00
Harald Welte
40d1c3fef1
RBS2000: Automatically connect/start/configure/enable most MOs
2011-03-06 23:20:28 +01:00
Harald Welte
8b277ac381
OM2000: Make sure we fill the nsd->bts member for NM state events
2011-03-06 23:00:32 +01:00
Harald Welte
1484d88d7a
OM2000: First attempt in automatically configuring most MOs
...
TS objects are not part yet
2011-03-06 22:12:24 +01:00
Harald Welte
f38ca9aec7
OML: Include a pointer to the BTS in NM STATE CHANGE signals
...
... this allows the BTS driver to decide if it should handle the event at all
2011-03-06 22:11:32 +01:00
Harald Welte
d529db6e50
OM2000: Move IS conn group list generation out of VTY code
2011-03-06 21:49:21 +01:00
Harald Welte
af9b810419
OM2000: Track the Operational Info and MO state
2011-03-06 21:20:38 +01:00
Harald Welte
217c6b6ad2
OM2000: Remove "is-conf-req" from VTY, use "configuration-request"
...
This unifies the syntax a bit
2011-03-06 19:46:15 +01:00
Harald Welte
e898ecc57b
OM2000: Process MO STATE and ACCORDANCE INFO
2011-03-06 19:26:11 +01:00
Harald Welte
1edc2b4c85
OM2000: Fix configuration of TCH timeslots
2011-03-06 19:01:54 +01:00
Harald Welte
ba9adbb951
OM2000: Fix configuration of Timing Function (missing timing src)
2011-03-06 19:01:16 +01:00
Harald Welte
75755c5d87
OM2000: More work on the TS configuration request
...
It seems the differences for the various channel combinations are big
2011-03-05 20:38:35 +01:00
Harald Welte
8aeac19dbd
OM2000: Route TS config requests to the right TRX
...
The TRX number is encoded in mo.assoc_so, whereas the TS number
is in mo.inst!
2011-03-05 20:15:09 +01:00
Harald Welte
f6d6b21ec2
OM2000: TLV parser definitions for more DEI's
2011-03-05 20:13:52 +01:00
Harald Welte
aff63bc089
OM2000: Consider OP_INFO_REJ and TEST_REQ_REJ as NACK
2011-03-05 19:46:49 +01:00
Harald Welte
1164dce679
OM2000: Add channel combination specific DIEs for TS config request
...
... and in order to do this reasonably well, we have to get rid of
the pre-computed message length field in the OML header. Instead,
we now simply compute it at abis_om2k_sendmsg() time based on the
msgb_l2len().
2011-03-05 19:21:26 +01:00
Harald Welte
3ede723cb4
OM2000: Handle (Dis)Connect Reject in NACK handler
2011-03-05 17:58:13 +01:00
Harald Welte
e6e8383a92
OM2000: Print result/reason code when receiving a reject
2011-03-05 17:52:09 +01:00
Harald Welte
5748c20be1
OM2000: fix generation of frequency list DIE
2011-03-05 17:30:07 +01:00
Harald Welte
d4571f41a3
HSL: Make sure not to send HSL specific OML init on non-HSL BTS
2011-03-05 16:24:20 +01:00
Harald Welte
53492c86e8
OM2000: Make sure to set the Associated SO to 255 in case of RX/TX
2011-03-05 16:21:01 +01:00
Harald Welte
52af3aee5a
OM2000 VTY: Don't send RX configuration request to TX
2011-03-05 16:14:34 +01:00
Harald Welte
bab983764e
Fix Makefile.am for builddir != srcdir
2011-03-05 15:20:18 +01:00
Harald Welte
366d215dbd
Makefile: Add libmsc subdirectory to fix 'distcheck'
2011-03-05 15:18:25 +01:00
Harald Welte
f9cf961a66
OM2000: Add support for configuring the TF (Timing Function)
2011-03-05 14:36:47 +01:00
Harald Welte
a0ce349f0c
OM2000: Add support for sending TX, RX and TS configuration requests
...
They can be triggered from the VTY
2011-03-05 14:13:14 +01:00
Harald Welte
c08e8be4ee
fix path of bscconfig.h include file
2011-03-04 13:53:51 +01:00
Harald Welte
c1b2cfafd4
Fix build of bsc-nat test
2011-03-04 13:49:02 +01:00
Harald Welte
388cbbfc41
Some more SR1.0.1 related fixes
...
somehow all the 0x81 in OML became 0x80, and the 0x80 of RSL became
0x80.
2011-03-04 13:45:03 +01:00
Harald Welte
17a7634043
fix erroneous modification of DTX parameter introduced in previous HSL commit
2011-03-04 13:44:49 +01:00
Harald Welte
63467e8f28
Make sure not to feed BSSGP messages into RSL
2011-03-04 13:44:30 +01:00
Harald Welte
26d7907b02
Implement the HSL SR1.0.1 protocol
...
It seems HSL has fixed most of their obvious issues in the SR1.0.1
release. However, this creates quite an incompatibility of the
protocol, and we have to adapt accordingly
2011-03-04 13:44:12 +01:00