summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* auth_core: add missing string.h include to reduce warningsHarald Welte2011-12-071-0/+1
|
* auth_core: don't use anonymous unions to make certain gcc versions happyHarald Welte2011-12-072-7/+7
|
* auth_milenage: we now copy RAND in auth_core, no need to do it twiceHarald Welte2011-12-071-1/+0
|
* auth_core: Make sure we always save the RAND in the vectorHarald Welte2011-12-071-1/+8
|
* auth_core: add functions for parsing algorithm namesHarald Welte2011-12-071-0/+20
|
* add milenage internal headers to ensure 'make dist' worksHarald Welte2011-12-071-0/+5
|
* Auth: Import milenage implementation from hostap (Jouni Malinen)Harald Welte2011-12-0614-3/+1659
| | | | ... and add integration into the osmo_auth core.
* Add a generic abstraction for GSM/3G authentication algorithmsHarald Welte2011-12-063-1/+141
| | | | | Indiidual algorithms can be implemented as plugins. libosmogsm itself only provides COMP128v1 via this generic interface.
* comp128: mark ki and srand as 'const' input parametersHarald Welte2011-12-061-1/+1
|
* increment LIBVERSION of libosmocore for new apiHarald Welte2011-12-011-1/+1
|
* SMS: export gsm411_bcdify() and gsm411_unbcdify() functionsHarald Welte2011-12-011-20/+20
| | | | | The same functions are e.g. required by the NITZ code in 04.08, and we don't want copy+paste.
* libosmocore: Update LIBVERSION because of ABI chaangesSylvain Munaut2011-11-241-1/+1
| | | | | | The recent convolutional code changes break the ABI. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* core/conv: Add utility methods to know length of coded/decoded vectorsSylvain Munaut2011-11-241-0/+34
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* core/conv: Add support for other termination types (trunc & tail biting)Sylvain Munaut2011-11-241-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>
* core/conv: Really only consider error for non-zero soft valuesSylvain Munaut2011-11-241-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>
* core/conv: Minor documentation improvementsSylvain Munaut2011-11-241-0/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* gsm/lapd_core: Make sure rc is initialize in lapd_rx_uSylvain Munaut2011-11-201-1/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* core/logging: Remove const qualifier on return of logp2syslog_levelSylvain Munaut2011-11-201-1/+1
| | | | | | This generates a warning because it doesn't "mean" anything. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* core/serial: Fix warning when on platform other than linuxSylvain Munaut2011-11-201-1/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* gsm/a5: Bit faster way to compute parity ...Sylvain Munaut2011-11-201-3/+2
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* utils: Fix alias to weak alias to allow OSX compilationSylvain Munaut2011-11-191-1/+1
| | | | | | Using a weak alias works just as good AFAICT. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* gsm/a5: Add documentationSylvain Munaut2011-11-171-0/+68
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* gsm/a5: Rewrite A5/2 algo to avoid the delayed bitSylvain Munaut2011-11-171-23/+12
| | | | | | It's just clearer that way ... Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* gsm/a5: Add const qualifier on the keySylvain Munaut2011-11-171-3/+3
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* timer: Better fix to the timer re-scheduling situationPablo Neira Ayuso2011-11-131-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>
* gsm/gsm0411_smc: Fix typoSylvain Munaut2011-11-121-1/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* include/gsm_04_11: Fix compatibility issue with GSM411_TMR_TC1ASylvain Munaut2011-11-121-1/+1
| | | | | | We need to keep the old one for compatibility ! Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* gsm/sms: Rewrite of SMR process, extracted from OpenBSCAndreas Eversberg2011-11-122-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>
* gsm/sms: Rewrite of SMC process, extracted from OpenBSCAndreas Eversberg2011-11-122-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>
* gsm/sms: Moved utility functions of SMS processing to new gsm0411_utils.cAndreas.Eversberg2011-11-122-0/+308
| | | | | Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* gsm/sms: Added DLSMS debuggingAndreas Eversberg2011-11-121-0/+6
| | | | | Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* gsm/lapdm: Display SAPI in debug message for easier debugAndreas.Eversberg2011-11-121-2/+2
| | | | | Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* gsm/lapdm: Fix UI frames from BTS->MS have length (B4 format)Andreas.Eversberg2011-11-121-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>
* gsm/lapdm: Fix TA and power level handling in the ACCH headerAndreas.Eversberg2011-11-121-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>
* gsm/lapdm: Set N201 depending on the frame typeAndreas.Eversberg2011-11-121-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>
* gsm/lapdm: Make T200 timer depends on the link type (SACCH is slower)Andreas.Eversberg2011-11-121-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>
* gsm/lapdm: Add missing msgb_free in rslms_rx_rll error casesAndreas.Eversberg2011-11-121-0/+2
| | | | | Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* lapd: Fixed possible double free buf in lapd_core.cAndreas Eversberg2011-11-121-2/+3
| | | | | Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* vty: Fixed vty_down_level to move down from config nodesAndreas.Eversberg2011-11-121-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>
* vty/telnet_interface: Add telnet_exit functionAndreas.Eversberg2011-11-121-0/+12
| | | | | | | This frees socket and pending connections Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* core/timer: Allow an already scheduled timer to be re-scheduled at a new timeSylvain Munaut2011-11-121-2/+6
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* core/rbtree: remove redundant if()-condition in rb_erase()Sylvain Munaut2011-11-121-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>
* core/rbtree: make clear distinction between two different cases in rb_erase()Sylvain Munaut2011-11-121-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>
* core/rbtree: reorganize code in rb_erase() for additional changesSylvain Munaut2011-11-121-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>
* core/rbtree: optimize rb_erase()Sylvain Munaut2011-11-121-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>
* core/rbtree: add const qualifier to some functionsSylvain Munaut2011-11-121-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>
* core/utils: Add a symbol alias for a previous typo for compatibilitySylvain Munaut2011-11-111-0/+4
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* utils: Fix a bad double osmo_ prefix for osmo_hexdump_nospcSylvain Munaut2011-11-101-1/+1
| | | | | | Hopefully no project where using them it seems Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* freebsd: Provide a dummy backtrace implementation that does nothingHolger Hans Peter Freyther2011-11-091-0/+4
|
* freebsd: Fixes for the compilation of libosmocore on FreeBSDHolger Hans Peter Freyther2011-11-093-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