aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2011-12-07auth_core: add missing string.h include to reduce warningsHarald Welte1-0/+1
2011-12-07auth_core: don't use anonymous unions to make certain gcc versions happyHarald Welte2-7/+7
2011-12-07auth_milenage: we now copy RAND in auth_core, no need to do it twiceHarald Welte1-1/+0
2011-12-07auth_core: Make sure we always save the RAND in the vectorHarald Welte1-1/+8
2011-12-07auth_core: add functions for parsing algorithm namesHarald Welte1-0/+20
2011-12-07add milenage internal headers to ensure 'make dist' worksHarald Welte1-0/+5
2011-12-06Auth: Import milenage implementation from hostap (Jouni Malinen)Harald Welte14-3/+1659
... and add integration into the osmo_auth core.
2011-12-06Add a generic abstraction for GSM/3G authentication algorithmsHarald Welte3-1/+141
Indiidual algorithms can be implemented as plugins. libosmogsm itself only provides COMP128v1 via this generic interface.
2011-12-06comp128: mark ki and srand as 'const' input parametersHarald Welte1-1/+1
2011-12-01increment LIBVERSION of libosmocore for new api0.3.11Harald Welte1-1/+1
2011-12-01SMS: export gsm411_bcdify() and gsm411_unbcdify() functionsHarald Welte1-20/+20
The same functions are e.g. required by the NITZ code in 04.08, and we don't want copy+paste.
2011-11-24libosmocore: Update LIBVERSION because of ABI chaangesSylvain Munaut1-1/+1
The recent convolutional code changes break the ABI. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-24core/conv: Add utility methods to know length of coded/decoded vectorsSylvain Munaut1-0/+34
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-24core/conv: Add support for other termination types (trunc & tail biting)Sylvain Munaut1-32/+94
Note that this breaks the ABI and the low level API. But it shouldn't break the high level API, nor the conv code definitions (because fields default to 0, and for new fields '0' is the previous behavior) Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-24core/conv: Really only consider error for non-zero soft valuesSylvain Munaut1-3/+6
This should have been done with 1dd7c84733b20ba776510369e9daba1a822c5b44 but somehow was missed and only applied to the 'finish' method and not the 'scan' method. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-24core/conv: Minor documentation improvementsSylvain Munaut1-0/+1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-20gsm/lapd_core: Make sure rc is initialize in lapd_rx_uSylvain Munaut1-1/+1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-20core/logging: Remove const qualifier on return of logp2syslog_levelSylvain Munaut1-1/+1
This generates a warning because it doesn't "mean" anything. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-20core/serial: Fix warning when on platform other than linuxSylvain Munaut1-1/+1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-20gsm/a5: Bit faster way to compute parity ...Sylvain Munaut1-3/+2
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-19utils: Fix alias to weak alias to allow OSX compilationSylvain Munaut1-1/+1
Using a weak alias works just as good AFAICT. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-17gsm/a5: Add documentationSylvain Munaut1-0/+68
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-17gsm/a5: Rewrite A5/2 algo to avoid the delayed bitSylvain Munaut1-23/+12
It's just clearer that way ... Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-17gsm/a5: Add const qualifier on the keySylvain Munaut1-3/+3
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-13timer: Better fix to the timer re-scheduling situationPablo Neira Ayuso1-6/+3
As it turns out, the previous fix didn't cover the case of a timer X being re-scheduled inside a timer call back expiring at the same time as the previous X instance. Written-by: Pablo Neira Ayuso <pablo@gnumonks.org> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12gsm/gsm0411_smc: Fix typoSylvain Munaut1-1/+1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12include/gsm_04_11: Fix compatibility issue with GSM411_TMR_TC1ASylvain Munaut1-1/+1
We need to keep the old one for compatibility ! Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12gsm/sms: Rewrite of SMR process, extracted from OpenBSCAndreas Eversberg2-1/+452
The SMR process is used to transfer SMS TPDUs. It is now extracted from OpenBSC. It includes a real state machine now for easier debugging. Also it implements the TR1M and TR2M timers. The memory notification procedure is missing, but not required for network side. Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12gsm/sms: Rewrite of SMC process, extracted from OpenBSCAndreas Eversberg2-1/+540
The SMC process is used to transfer RP frames. It is now extracted from OpenBSC. It includes a real state machine now for easier debugging. Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12gsm/sms: Moved utility functions of SMS processing to new gsm0411_utils.cAndreas.Eversberg2-0/+308
Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12gsm/sms: Added DLSMS debuggingAndreas Eversberg1-0/+6
Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12gsm/lapdm: Display SAPI in debug message for easier debugAndreas.Eversberg1-2/+2
Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12gsm/lapdm: Fix UI frames from BTS->MS have length (B4 format)Andreas.Eversberg1-7/+11
This is part of a set of commit to fix LAPDm to handle datalink connection on ACCH (SAPI 3) This is required to transfer SMS on SACCH of TCH/f or SDCCH/8 (4). Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12gsm/lapdm: Fix TA and power level handling in the ACCH headerAndreas.Eversberg1-6/+14
Timing advance and power level indicated by MS (measurement reports) and BTS (SI 5/6) are now stored for use at ACCH data link connection. This is part of a set of commit to fix LAPDm to handle datalink connection on ACCH (SAPI 3) This is required to transfer SMS on SACCH of TCH/f or SDCCH/8 (4). Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12gsm/lapdm: Set N201 depending on the frame typeAndreas.Eversberg1-5/+5
This is part of a set of commit to fix LAPDm to handle datalink connection on ACCH (SAPI 3) This is required to transfer SMS on SACCH of TCH/f or SDCCH/8 (4). Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12gsm/lapdm: Make T200 timer depends on the link type (SACCH is slower)Andreas.Eversberg1-5/+6
This is part of a set of commit to fix LAPDm to handle datalink connection on ACCH (SAPI 3) This is required to transfer SMS on SACCH of TCH/f or SDCCH/8 (4). Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12gsm/lapdm: Add missing msgb_free in rslms_rx_rll error casesAndreas.Eversberg1-0/+2
Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12lapd: Fixed possible double free buf in lapd_core.cAndreas Eversberg1-2/+3
Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12vty: Fixed vty_down_level to move down from config nodesAndreas.Eversberg1-3/+5
When using ^D at config nodes above the CONFIG_NODE, the go_parent_cb function is used to go down by one node. This is equivalent to "exit" command. Written-by: Andreas.Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12vty/telnet_interface: Add telnet_exit functionAndreas.Eversberg1-0/+12
This frees socket and pending connections Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12core/timer: Allow an already scheduled timer to be re-scheduled at a new timeSylvain Munaut1-2/+6
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12core/rbtree: remove redundant if()-condition in rb_erase()Sylvain Munaut1-4/+4
See kernel commit 4b324126e0c6c3a5080ca3ec0981e8766ed6f1ee ---- Furthermore, notice that the initial checks: if (!node->rb_left) child = node->rb_right; else if (!node->rb_right) child = node->rb_left; else { ... } guarantee that old->rb_right is set in the final else branch, therefore we can omit checking that again. Signed-off-by: Wolfram Strepp <wstrepp@gmx.de> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> ---- Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12core/rbtree: make clear distinction between two different cases in rb_erase()Sylvain Munaut1-4/+4
See kernel commit 4c60117811171d867d4f27f17ea07d7419d45dae ---- There are two cases when a node, having 2 childs, is erased: 'normal case': the successor is not the right-hand-child of the node to be erased 'special case': the successor is the right-hand child of the node to be erased Here some ascii-art, with following symbols (referring to the code): O: node to be deleted N: the successor of O P: parent of N C: child of N L: some other node normal case: O N / \ / \ / \ / \ L \ L \ / \ P ----> / \ P / \ / \ / / N C \ / \ \ C / \ special case: O|P N / \ / \ / \ / \ L \ L \ / \ N ----> / C \ / \ \ C / \ Notice that for the special case we don't have to reconnect C to N. Signed-off-by: Wolfram Strepp <wstrepp@gmx.de> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> ---- Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12core/rbtree: reorganize code in rb_erase() for additional changesSylvain Munaut1-9/+9
See kernel commit 16c047add3ceaf0ab882e3e094d1ec904d02312d ---- First, move some code around in order to make the next change more obvious. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Wolfram Strepp <wstrepp@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> ---- Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12core/rbtree: optimize rb_erase()Sylvain Munaut1-10/+4
See kernel commit 55a63998b8967615a15e2211ba0ff3a84a565824 ---- Tfour 4 redundant if-conditions in function __rb_erase_color() in lib/rbtree.c are removed. In pseudo-source-code, the structure of the code is as follows: if ((!A || B) && (!C || D)) { . . . } else { if (!C || D) {//if this is true, it implies: (A == true) && (B == false) if (A) {//hence this always evaluates to 'true'... . } . //at this point, C always becomes true, because of: __rb_rotate_right/left(); //and: other = parent->rb_right/left; } . . if (C) {//...and this too ! . } } Signed-off-by: Wolfram Strepp <wstrepp@gmx.de> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Andrea Arcangeli <andrea@qumranet.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> ---- Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12core/rbtree: add const qualifier to some functionsSylvain Munaut1-6/+6
See kernel commit f4b477c47332367d35686bd2b808c2156b96d7c7 ---- The 'rb_first()', 'rb_last()', 'rb_next()' and 'rb_prev()' calls take a pointer to an RB node or RB root. They do not change the pointed objects, so add a 'const' qualifier in order to make life of the users of these functions easier. Indeed, if I have my own constant pointer &const struct my_type *p, and I call 'rb_next(&p->rb)', I get a GCC warning: warning: passing argument 1 of ?~@~Xrb_next?~@~Y discards qualifiers from pointer target type Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> ---- Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-11core/utils: Add a symbol alias for a previous typo for compatibilitySylvain Munaut1-0/+4
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-10utils: Fix a bad double osmo_ prefix for osmo_hexdump_nospcSylvain Munaut1-1/+1
Hopefully no project where using them it seems Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-09freebsd: Provide a dummy backtrace implementation that does nothingHolger Hans Peter Freyther1-0/+4
2011-11-09freebsd: Fixes for the compilation of libosmocore on FreeBSDHolger Hans Peter Freyther3-2/+6
alloca.h is not available on FreeBSD, use the default autoconf function to check for it, there is a complete list[1] of what to do for using alloca but let us see how far we get with this test. Include netinet/in.h for the IPv4 and IPv6 socket address. Check for dlopen in libraries and use this instead of linking -dl. [1] http://www.gnu.org/s/hello/manual/autoconf/Particular-Functions.html