Commit Graph

1008 Commits

Author SHA1 Message Date
Sylvain Munaut dca7d2caaa doc: Fix the Doxygen section endings
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-04-18 21:53:23 +02:00
Harald Welte bc32d051bf sync prototype of osmo_sockaddr_is_local with declaration
in e476442cf0 we changed from sockle_t
to unsigned int, but only in the header, not in the implementation!
2012-04-08 11:32:18 +02:00
Holger Hans Peter Freyther 00a12feae6 timer: Increase the imprecision we accept in this test
On a loaded server we might not be able to reach 10ms precision
in the test configuration and this is not a high precision timer
anyway.
2012-04-05 09:53:38 +02:00
Harald Welte df90aedcc7 libosmogsm: Add tvlv_att_def to exported symbols 2012-04-05 01:42:00 +02:00
Holger Hans Peter Freyther 7c373bce1d misc: Fix make distcheck, add the new libosmogsm.map file to the tarball 2012-04-05 00:44:46 +02:00
Harald Welte 3e071446be lapdm: fix RSL message format in RLL ERROR INDICATION
In rsl_rll_error() we don't need to re-set the msg->l2h as that would
corrupt the message.  The recipient would interpret any cause value
as 0.
2012-04-05 00:28:38 +02:00
Harald Welte 1c72bfb2cb libosmogsm: Introduce explicit list of exported symbols
There is now a "libosmogsm.map" file containing an explicit list of
to-be-exported symbols.  This should prevent us from leaking non-static
symbols into the global namespace.

A similar scheme should be adopted by all other osmocom libraries
2012-04-04 22:43:25 +02:00
Holger Hans Peter Freyther 738f13395d vty: Add a function to write the current config to a file. 2012-03-28 17:53:27 +02:00
Holger Hans Peter Freyther 8db7020c88 misc: Fix the mail email address in the configure.ac 2012-03-26 16:35:32 +02:00
Harald Welte cebf3f0d3c osmo-auc-gen: Add mode for verifying user-supplied AUTS
When -A is used on the command line, the respective AUTS value
will be validated and the SQN of the UICC printed.
2012-03-22 16:45:23 +01:00
Harald Welte bc6f56c221 update copyright notice 2012-03-21 23:15:32 +01:00
Holger Hans Peter Freyther 0f5f93d2db osmo-auc-gen: Add -O to the getop line to make it work 2012-03-21 21:38:42 +01:00
Holger Hans Peter Freyther 13b07de36a auth: Update test result with the new OP/OPC output 2012-03-21 20:54:44 +01:00
Harald Welte a72e47b8a0 auth_milenage/osmo-auc-gen: compute OPC in case only OP is known 2012-03-21 09:04:14 +01:00
Harald Welte 5fb795e972 osmo-auc-gen: Introduce a small cmdline help/reference 2012-03-21 08:51:48 +01:00
Harald Welte 042afe7fe7 milenage: Add function to compute OPC from OP and K 2012-03-21 08:19:47 +01:00
Holger Hans Peter Freyther fb6a2e274f lapd: Remove unused variable t200_start in lapd_acknowledge.
lapd_core.c: In function 'lapd_acknowledge':
lapd_core.c:710:38: warning: variable 't200_start' set but not used [-Wunused-but-set-variable]
2012-03-16 10:35:38 +01:00
Holger Hans Peter Freyther 58d3153249 misc: Fix warning when compiling telnet_interface.c
In file included from telnet_interface.c:30:0:
osmocom/core/socket.h:25:4: warning: 'struct osmo_fd' declared inside parameter list [enabled by default]
telnet_interface.c: In function 'telnet_init_dynif':
telnet_interface.c:84:4: warning: passing argument 1 of 'osmo_sock_init_ofd' from incompatible pointer type [enabled by default]
osmocom/core/socket.h:24:5: note: expected 'struct osmo_fd *' but argument is of type 'struct osmo_fd *'
2012-03-16 09:18:12 +01:00
Sylvain Munaut 2dafed51e5 gsm/a5: Rewrite equation doc with proper numbering
No idea where I copied the original from but here we use the
other notation. (matches wikipedia and sources)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-03-02 23:39:19 +01:00
Holger Hans Peter Freyther 1e57eb6112 misc: Deal with smatch warnings about the bitfields
Use unsigned ints for the bitfield.
2012-03-02 14:14:33 +01:00
Sylvain Munaut a9efc12ccd vty/telnet: Add function to allow binding telnet interface to custom IP/Interface
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-03-01 22:33:20 +01:00
Holger Hans Peter Freyther 52746469ff misc: Use msgb_free for freeing the messages 2012-03-01 20:30:32 +01:00
Harald Welte 3e04ed6083 gsmtap: Add GSMTAP_GPRS_CS() / GSMTAP_GPRS_MCS()
As requested by Mike Morrin <Mike.Morrin@ipaccess.com>, we introduce
GSMTAP sub-types for all the different GPRS and EGPRS coding schemes.

This is neccessary due to the fact that the RLC PDU doesn't contain any
explicit indication of the coding scheme used on the radio layer.
2012-02-08 18:13:34 +01:00
Andreas Eversberg 4b332d7d0e libosmocore/gsm: Fixed total size of gsm48_req_ref
"__attribute ((packed))" must be defined for unions, in order to make
sure that the compiler packs unions.
2012-02-07 20:02:17 +01:00
Harald Welte 07b625dd2c GSM 08.08: change gsm0808_create_classmark_update() prototype
The caller explicitly specifies CM2 and CM3, rather than one blob
containing both.
2012-01-26 22:42:16 +01:00
Harald Welte 65c2d36005 GSM 08.08: Cleanup the code, remove lots of magic hard-coded numbers
Rather than manually hard-coding numbers and using byte-arrays, we use
the msgb_*_{push,put}() function family of libosmocore/libosmogsm.

This is currently untested.
2012-01-26 22:42:15 +01:00
Harald Welte 7d974addc6 gsmtap: make sure we agree with wireshark on GSMTAP channel types 2012-01-26 13:12:03 +01:00
Harald Welte 2c02043f49 TLV/msgb: Return first byte of newly-pushed data from msgb_*_push()
The msgb_*_push() functions erroneously returned the firsrt byte after
newly-pushed information, which makes no sense at all.
2012-01-22 23:10:40 +01:00
Holger Hans Peter Freyther 97510814d8 tests: Introduce a very basic gsm0808 test
This tests verifies the content of the GSM 08.08 messages, it does
not verify the remaining headroom (which the SCCP/IPA code relies
on being plenty to prepend the header). More to come in the future.
2012-01-22 13:46:58 +01:00
Holger Hans Peter Freyther 58e6d96d68 abis: gsm_data_shared.h includes libosmo-abis header, add abis to cflags
gsm_data_shared.h includes e1_input.h of libosmo-abis, add the
LIBOSMOABIS_CFLAGS to Makefile.am, remove AM_LDFLAGS at the same
time as we only build .a archives.
2012-01-15 17:52:02 +01:00
Harald Welte 3068d5747a msgb_trim(): actually trim to an absolute length, as the comment states
The previous commit introduced a new msgb_trim() but the implementation
differed from the specification.
2012-01-14 22:08:28 +01:00
Harald Welte b0f91513cd msgb: introduce msgb_trim() and msgb_l3trim() to trim msgb's 2012-01-14 21:54:17 +01:00
Holger Hans Peter Freyther 7be8c2b686 Merge remote-tracking branch 'origin/zecke/lapd-fixes' 2012-01-14 21:44:03 +01:00
Holger Hans Peter Freyther 3a5f08c221 lapdm: Make sure that the msgb_l3len(msg) == length...
This code should not play with the internals of the msgb like this,
this code got introduced in af48bed556 and is breaking the
osmo-bts usecase of forwarding an RSL message.

Add a test case that fails without the new code. I would prefer if
we could get rid of the manipulating the msgb like this, it is prone
to errors like this one.
2012-01-12 23:23:19 +01:00
Holger Hans Peter Freyther 90656dbd00 lapd: Warn if someone attempts to send an empty message
DATA REQ with a msgb_l3len(msg) == 0 message does not make any
sense, log an error and return immediately before attempting to
send an empty I frame in lapd_send_i.
2012-01-12 23:23:10 +01:00
Holger Hans Peter Freyther 6ecafef28f lapd: Mention the L3 size of the payload being sent 2012-01-12 23:17:23 +01:00
Andreas.Eversberg 301f01e938 libosmocore/lapd: Fixed handling of sequence errors at lapd_core.c
If a sequence error is received, the N(R) variable must still be used to
acknowledge previously transmitted frames.

If there are two subsequent sequence errors received, ignore it. (Ignore
every second subsequent error.) This happens if our reply with the REJ is
too slow, so the remote gets a T200 timeout and sends another frame with
a sequence error. Test showed that replying with two subsequent REJ
messages could the remote L2 process to abort. Replying too slow shouldn't
happen, but may happen over serial link between BB and LAPD.

Written-by: Andreas.Eversberg <jolly@eversberg.eu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-01-10 13:02:01 +01:00
Gus Bourg 4b6bc3b4b5 Fix generation of GPRS Routing Area in case of 3-digit MNC
This fixes a simple typo that causes erroneous GPRS Routing Area
encoding if you use 3-digit MNCs.
2011-12-14 23:20:21 +01:00
Holger Hans Peter Freyther 4a075f82f0 lapd: Disable one part of the test as it fails on FreeBSD
I thought this number would be wrong in the same way but it depends
on OS/ARCH. Disable this part of the test for now.
2011-12-12 00:41:25 +01:00
Holger Hans Peter Freyther 15f740caa3 lapd_test: Look at the content of LAPD messages and compare them
Verify the output, accept two known errors in the generation of it.
2011-12-12 00:34:06 +01:00
Holger Hans Peter Freyther 72bd4eb3b9 lapdm: Create a simple test case to transmit data between both ends
This is testing the establishment of two ends (BTS, MS) one is in
the polling mode as used by osmo-bts. Transfer data between the two
ends. The sent data is not verified though. This should be followed
up soon.
2011-12-11 21:35:06 +01:00
Harald Welte d318e61607 auth_core: add missing string.h include to reduce warnings 2011-12-07 12:16:27 +01:00
Harald Welte aae2362455 auth_core: don't use anonymous unions to make certain gcc versions happy 2011-12-07 11:35:02 +01:00
Harald Welte 57143a4361 milenage_test: make sure test output is what .ok file expects 2011-12-07 03:12:44 +01:00
Harald Welte 1726ec5e17 auth_milenage: we now copy RAND in auth_core, no need to do it twice 2011-12-07 02:56:28 +01:00
Harald Welte 9df00bb857 milenage_test: make sure test result matches expectations 2011-12-07 02:56:11 +01:00
Harald Welte 915e0ef5e7 add 'osmo-auc-gen' tool that can be used to generate auth vectors
Thsi tool usses libosmocore in order to generate 2G and 3G
authentication vectors from private key material, exactly like an AuC
would produce them in a real network.
2011-12-07 02:38:42 +01:00
Harald Welte 4afdd5dca2 auth_core: Make sure we always save the RAND in the vector 2011-12-07 02:38:18 +01:00
Harald Welte a5ab1620f4 auth_core: add functions for parsing algorithm names 2011-12-07 02:33:11 +01:00
Harald Welte 5c6032393b whitespace fixes in milenage_test.ok 2011-12-07 00:24:59 +01:00