Commit Graph

112 Commits

Author SHA1 Message Date
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
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
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
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
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 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
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 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
Harald Welte 89579b4317 prefix sub-directories containing libraries with 'lib'
... and make sure tests work again after restructuring
2011-03-04 13:23:09 +01:00
Harald Welte 31c00f7d6f re-structure the OpenBSC directory layout
The new structure divides the code into a number of libraries
for the BSC core functionality, MSC core functionality, Abis transport,
TRAU and other bits.

This doesn't introduce any functional code change but simply moves
around files and alters Makefile.am accordingly.

Next step would be to disentangle a lot of the inter-library
dependencies and make the individual bits of code more independent.
2011-03-03 23:29:05 +01:00
Harald Welte 5ec26fe983 Install programs into $(prefix)/bin, not /sbin
At least in many configurations, there is no need to run any
of our programs as root.  Thus, we shouldn't install them in sbin.
2011-02-19 16:19:19 +09:00
Harald Welte f338a03b0c [BSC] Move the BTS-type specific code from bcs_init.c to bts_*.c
bsc_init.c was a big mess even only for two supported BTS models,
so before adding more BTS types, this needs a cleanup.

All the BTS specific code from bsc_init.c has now moved into
bts_{siemens_bs11,ipaccess_nanobts}.c

This has required that input_event() and nm_state_event() get both
converted to proper libosmocore signals instead of referencing external
symbols.
2011-02-11 16:26:31 +01:00
Harald Welte 9af6ddfcec License change: We are now AGPLv3+ instead of GPLv2+
The reason for this is quite simple: We want to make sure anyone
running a customized version of OpenBSC to operate a network will
have to release all custom modifiations to the source code.
2011-01-01 15:39:34 +01:00
Holger Hans Peter Freyther d85642a1a7 ts Make the e1inp_ts delay configurable
Currently the nanoBTS bootstrap code requires a high delay
otherwise we are not bringing the device up properly. Changing
the init code turns out harder than it seems like. So this is
a workaround for that to allow a high speed RSL/OML connection
after the bringup.

The line driver can have a default TS delay. It is set to the
current default for the nanoBTS and the BS11. For the ipaccess
case we will set the delay lower for the RSL connection and
inside the ipaccess-config we can set it low right away to
have fast firmware flashing and such.
2010-12-21 13:53:41 +01:00
Holger Hans Peter Freyther ecd94a4b45 misc: Introduce a --enable-coverage mode to build with gprof coverage
This adds a test coverage build. One can use gcov and lcov on the
resulting data afterwards to see which code paths were executed and
which were not.
2010-11-15 20:06:45 +01:00
Holger Hans Peter Freyther 85531cc60d misc: Once again go from "On Waves" to "On-Waves"..
Try to get the company name of our sponsor right...
2010-10-06 20:38:36 +08:00
Harald Welte 6526ca720c ipaccess-config / NWL: Decode + print neighbor cell ARFCNs 2010-08-04 13:14:34 +02:00
Harald Welte e1d1f45034 ipaccess-config: Don't dump the Rxlevel statistics 2010-07-30 22:35:31 +02:00
Harald Welte 59509630df ipaccess-config: Terminate program after running BCCH INFO test 2010-07-30 22:35:30 +02:00
Harald Welte 1e194a304f network_listen: dump BSIC as part of BCCH INFO test 2010-07-30 22:35:30 +02:00
Harald Welte 1ef7ce4fe8 ipaccess-config: Add option to disable color in log output 2010-07-30 22:35:30 +02: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 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
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 c2e88baa5e ipa-proxy: Remove printf debugging. 2010-06-10 18:27:20 +08:00
Holger Hans Peter Freyther 4fe22cc56d ipa-proxy: Patch the IPA Set Attribute messages for NSVCI
We will tell the BTS where we are listening, but the ACK
will return the original settings... this should make it
possible to intercept the GPRS stream..
2010-06-10 15:59:45 +08:00
Holger Hans Peter Freyther 21e1c0d01c ipa-proxy: Fix the send routine.. convert port to network order 2010-06-10 15:59:45 +08:00
Holger Hans Peter Freyther 0897dad300 ipa-proxy: Only handle some stuff of the CCM locally...
This is a good interim solution for messages not handled by us,
right now this would include the NVRAM attributes that I do not
feel like caching right now.
2010-06-09 21:40:45 +08:00
Holger Hans Peter Freyther 952aba7406 ipa-proxy: Move UDP socket code to the BTS and forward messages...
Forward messages from BTS to Network, Network to BTS... now
we only need to fix the Set GPRS attributes on the fly...
2010-06-09 21:40:45 +08:00
Holger Hans Peter Freyther 6147c5d7d0 ipa-proxy: Add option to locally listen to GPRS...
This is just the boilerplate code, the rest is not implemted yet.
2010-06-09 21:40:45 +08:00
Holger Hans Peter Freyther 7670651f49 ipa: Print the IP addr in the listen as well.. 2010-06-09 21:40:45 +08:00
Holger Hans Peter Freyther 6cb9b230ed ipa: Say which addr could not be connected... 2010-06-09 21:40:45 +08:00
Holger Hans Peter Freyther 1a0c2b7509 ipaccess-proxy: Add getopt based config options to the proxy...
Make the ip addresses configurable and such.
2010-06-09 21:40:45 +08:00
Holger Hans Peter Freyther 3dac881271 ipa: Increase msgb size for the IPA msg in the proxy. 2010-06-09 21:40:45 +08:00