summaryrefslogtreecommitdiffstats
path: root/src/lce.c
AgeCommit message (Collapse)AuthorFilesLines
2011-10-09lce: remove now unused function dect_profile_indicator()Patrick McHardy1-12/+0
Profile support is supposed to be handled on the IWU layer, remove unused dect_profile_indicator() function. Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-10-05libdect: add preliminary wideband supportPatrick McHardy1-26/+218
Unfinished, so far only meant for testing the kernel side. Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-03-21lce: use symbolic identifiers for S-SAP sockaddrPatrick McHardy1-2/+2
Signed-off-by: Patrick McHardy <kaber <trash.net>
2011-03-20lce: attempt to support transactions only consisting of a single messagePatrick McHardy1-2/+17
Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-02-26lce: add proper timer names from EN 300 175 05 to comments and debug messagesPatrick McHardy1-7/+7
Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-01-11lce: really fix set-up conditionPatrick McHardy1-1/+1
Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-01-11lce: fix condition to decide whether to use direct link establishmentPatrick McHardy1-2/+1
Indirect link establishment is to be used in FP mode when the PP does not support fast setup. The current condition will also attempt to use it in PP mode. Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-01-10lce: maintain TPUI assignment in location tablePatrick McHardy1-6/+41
Maintain TPUIs and use for paging PTs. Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-01-09lce: maintain LCE location tablePatrick McHardy1-16/+105
Maintain LCE location table and use it for determining paging mode and setup capabilities. Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-01-07lce: change PMID/IPUI assignment debugging outputPatrick McHardy1-4/+4
Change PMID/IPUIassignment debugging output to match other debugging messages. Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-11-14libdect: don't reseed PRNG on dect_open_handle()Patrick McHardy1-1/+1
Move seeding to an __init function to avoid reseeding the PRNG multiple times with the same seed when opening multiple handles in a short amount of time. While at it, switch from rand() to random() since it uses a better PRNG in old libcs and non-Linux systems. Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-10-13ss: fix CLSS message routingPatrick McHardy1-13/+69
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-10-12utils: use single-linked list for struct dect_msg_buf queuesPatrick McHardy1-12/+10
Get rid of libdect.h dependency on list.h. Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-10-12utils: add forgotten changes from last commitPatrick McHardy1-3/+5
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-10-11utils: uninline message buffer manipulation helpersPatrick McHardy1-0/+72
Necessary to make them use dect_assert() instead of the regular assert() macro. Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-10-10mm: destroy endpoint when link is shut downPatrick McHardy1-0/+12
Also rebind the endpoint from the requesting link when an indirect link establishment is complete. Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-10-09ss: fix CISSPatrick McHardy1-1/+1
Fix message types and definitions, only pass messages to clms if protocol discriminator matches. With these fixes, CISS appears to be working properly: LCE: RX: 64 64 05 07 90 a8 00 ba 8a 78 2a 7b 11 81 00 02 |dd.......x*{....| LCE: RX: 3b 09 03 01 01 07 00 04 02 13 01 5b 01 38 |;..........[.8| LCE: link 23 (ESTABLISHED): stop SDU timer LCE: link 23 (ESTABLISHED): new transaction: protocol: Call Independant Supplementary Services F: 0 TV: 6 SS: unknown transaction: msg type: 64 CISS-REGISTER parse {CISS-REGISTER} message IE: <<PORTABLE-IDENTITY>> id: 5 len: 9 dst: 0x8a04240 type: IPEI (10) PUT: N (IPEI) EMC: 0ba8 PSN: a782a IE: <<ESCAPE-TO-PROPRIETARY>> id: 7b len: 19 dst: 0x8a41860 EMC: 2 Content: 3b 09 03 01 01 07 00 04 02 13 01 5b 01 38 LCE: link 23 (ESTABLISHED): set IPUI N EMC: 0ba8 PSN: a782a LCE: link 23 (ESTABLISHED): confirm transaction: Call Independant Supplementary Services TV: 6 Role: 1 SS (link 23): MNSS_SETUP-ind LCE: RX: 64 5a |dZ| SS (link 23): CISS-RELEASE-COM parse {CISS-RELEASE-COM} message SS (link 23): MNSS_RELEASE-ind LCE: link 23 (ESTABLISHED): close transaction: Call Independant Supplementary Services TV: 6 Role: 1 LCE: link 23 (ESTABLISHED): partial release Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-10-09lce: stop SDU timer if already running on partial releasePatrick McHardy1-0/+6
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-17ie: rename DECT_RING_PATTERN_* to DECT_ALERTING_PATTERN_*Patrick McHardy1-1/+1
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-14debug: add libdect-specific assert-macro with optional backtrace supportPatrick McHardy1-4/+4
Make assertions more useful by printing a backtrace on failed assertions. Requires libbfd. Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-14timer: add some debugging codePatrick McHardy1-3/+3
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-03lce: move protocol registration to dect_lce_initPatrick McHardy1-0/+6
Perform protocol initialization outside of __init functions to avoid multiple registration with threaded library users. Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-03libdect: make handle initialization/shutdown symetricalPatrick McHardy1-0/+1
Proper error handling on failed dect_init() calls is currently not possible since dect_close_handle() expects a fully initialized handle. Kill dect_alloc_handle() and add a dect_open_handle() function that performs all setup. Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-03lce: order MM transactions properlyPatrick McHardy1-3/+13
Order MM transactions such that the last one opened is shut down first. Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-25lce: make sure MM transactions are shutdown lastPatrick McHardy1-2/+17
Insert MM transactions at the end of the list to make sure they get destroyed last on shutdown. This makes sure that other protocols which might invoke and wait for the completion of MM transactions have their transactions terminated first and don't mistake a link shutdown or a protocol specific error for a MM error. Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-23Revert "mm: change PMID when an access rights request is not confirmed"Patrick McHardy1-3/+3
This reverts commit de54717db07a467e3777ec23beb184ad1b8ec5a0. Major misunderstanding, the PMID is supposed to get changed on unconfirmed MAC layer Access requests, not on Access rights requests. Signed-off-by: Patrick MCHardy <kaber@trash.net>
2010-08-16lce: set the IPUI for incoming data links as soon as it is knownPatrick McHardy1-4/+21
Set the IPUI of a data link as soon a request containing the portable_identity is received. Additionally verify that the identity matches the IPUI if already set. Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-16lce: don't use full pages by defaultPatrick McHardy1-1/+1
GAP doesn't require full page support, it is only mandatory for the NG-DECT part 1 profile. Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-15lce: add full page supportPatrick McHardy1-8/+104
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-13libdect: add ConnetionLess Message Service (CLMS) supportPatrick McHardy1-3/+5
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-13libdect: prefix IE types with DECT_Patrick McHardy1-9/+9
Use DECT_ as common prefix for all IEs since they need to be exported for the CLMS service. Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-13lce: clear padding in cmsg bufferPatrick McHardy1-0/+1
Make valgrind happy (tm). Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-13utils: convert paging to use dect_msg_buf structuresPatrick McHardy1-22/+22
Change dect_lce_broadcast to take a dect_msg_buf in prepatation for the next patch. Also add an on-stack initializer macro for mb's and make use of it. Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-13lce: support sending and receiving full and long page messagesPatrick McHardy1-23/+113
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-12lce: use MSG_NOSIGNAL to avoid SIGPIPE signals on stream socketsPatrick McHardy1-2/+2
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-03lce: check result of dect_fd_register()Patrick McHardy1-3/+4
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-02lce: clear retransmission pointer when opening/confirming a new transactionPatrick McHardy1-0/+2
Fix use-after-free when the transaction is used for a second time. Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-02lce: include <<PORTABLE-IDENTITY>> IE in page reject messagePatrick McHardy1-4/+5
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-02lce: fix page transaction release modePatrick McHardy1-1/+1
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-02libdect: name timer related functions more consistentlyPatrick McHardy1-16/+16
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-02libdect: name timer related functions more consistentlyPatrick McHardy1-16/+16
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-02libdect: name transaction related functions more consistentlyPatrick McHardy1-8/+8
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-02lce: fix segfault when closing S-SAP socket in PP modePatrick McHardy1-2/+4
The socket is NULL in PP mode, don't try to close it. Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-01lce: only open S-SAP socket in FP modePatrick McHardy1-17/+21
Until there's an interface to indicate PP fast setup capability, disable S-SAP listener sockets in PP mode since they cause bind conflicts wuen running mulitple PP instances in parallel. Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-01mm: change PMID when an access rights request is not confirmedPatrick McHardy1-3/+3
As specified in ETSI EN 300 175-6, section 9.1.2. Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-07-31lce: add missing newline characters to PMID debugging messagesPatrick McHardy1-3/+3
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-07-31lce: properly maintain PMIDPatrick McHardy1-1/+61
Use a default value for PMID while no TPUI is assigned, use an assigned TPUI value otherwise. Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-07-31lce: fix indentationPatrick McHardy1-1/+1
Signed-off-by: Patrick MCHardy <kaber@trash.net>
2010-07-31lce: add support for retransmissionsPatrick McHardy1-4/+24
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-07-31lce: add reference counting to message buffersPatrick McHardy1-5/+15
Required by the next patch, which will add proper retransmission to MM. Signed-off-by: Patrick McHardy <kaber@trash.net>