dect
/
libdect
Archived
13
0
Fork 0
Commit Graph

110 Commits

Author SHA1 Message Date
Patrick McHardy c2ac87a9bd lce: remove now unused function dect_profile_indicator()
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-09 20:11:26 +02:00
Patrick McHardy ecc2c7d990 libdect: add preliminary wideband support
Unfinished, so far only meant for testing the kernel side.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-10-05 19:06:54 +02:00
Patrick McHardy 77ace09859 lce: use symbolic identifiers for S-SAP sockaddr
Signed-off-by: Patrick McHardy <kaber <trash.net>
2011-03-21 17:15:04 +01:00
Patrick McHardy 1f428e7139 lce: attempt to support transactions only consisting of a single message
Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-03-20 03:41:50 +01:00
Patrick McHardy 2d98b81231 lce: add proper timer names from EN 300 175 05 to comments and debug messages
Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-02-26 18:00:23 +01:00
Patrick McHardy 42510e7c77 lce: really fix set-up condition
Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-01-11 21:40:32 +01:00
Patrick McHardy a84f643c82 lce: fix condition to decide whether to use direct link establishment
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-11 19:47:12 +01:00
Patrick McHardy ce7df5b796 lce: maintain TPUI assignment in location table
Maintain TPUIs and use for paging PTs.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-01-10 11:01:14 +01:00
Patrick McHardy ff3028a515 lce: maintain LCE location table
Maintain LCE location table and use it for determining paging mode
and setup capabilities.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-01-09 12:17:34 +01:00
Patrick McHardy 5bd59900fd lce: change PMID/IPUI assignment debugging output
Change PMID/IPUIassignment debugging output to match other debugging
messages.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2011-01-07 13:22:41 +01:00
Patrick McHardy 4e04c104d1 libdect: don't reseed PRNG on dect_open_handle()
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-11-14 22:08:45 +01:00
Patrick McHardy ed870d702b ss: fix CLSS message routing
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-10-13 23:18:03 +02:00
Patrick McHardy 11779ea5e8 utils: use single-linked list for struct dect_msg_buf queues
Get rid of libdect.h dependency on list.h.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-10-12 00:00:41 +02:00
Patrick McHardy 4dd834843f utils: add forgotten changes from last commit
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-10-12 00:00:26 +02:00
Patrick McHardy 4e2b153941 utils: uninline message buffer manipulation helpers
Necessary to make them use dect_assert() instead of the regular assert() macro.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-10-11 22:53:06 +02:00
Patrick McHardy ce4da27071 mm: destroy endpoint when link is shut down
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-10 19:57:04 +02:00
Patrick McHardy c05ddcc6ae ss: fix CISS
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-09 07:12:23 +02:00
Patrick McHardy b4b36d1a12 lce: stop SDU timer if already running on partial release
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-10-09 06:49:13 +02:00
Patrick McHardy c589452277 ie: rename DECT_RING_PATTERN_* to DECT_ALERTING_PATTERN_*
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-17 18:02:15 +02:00
Patrick McHardy f8bf6942ab debug: add libdect-specific assert-macro with optional backtrace support
Make assertions more useful by printing a backtrace on failed assertions.
Requires libbfd.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-14 22:07:09 +02:00
Patrick McHardy 073d8f6617 timer: add some debugging code
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-14 00:55:37 +02:00
Patrick McHardy 20d309fc70 lce: move protocol registration to dect_lce_init
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-03 12:18:20 +02:00
Patrick McHardy dc4ad23707 libdect: make handle initialization/shutdown symetrical
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-03 08:53:54 +02:00
Patrick McHardy 1038f1b083 lce: order MM transactions properly
Order MM transactions such that the last one opened is shut down first.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-09-03 04:45:22 +02:00
Patrick McHardy 23e0b42c71 lce: make sure MM transactions are shutdown last
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-25 03:39:06 +02:00
Patrick McHardy f83e4b328a Revert "mm: change PMID when an access rights request is not confirmed"
This reverts commit de54717db0.

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-23 12:17:54 +02:00
Patrick McHardy 3d98bc7b6e lce: set the IPUI for incoming data links as soon as it is known
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-16 02:07:26 +02:00
Patrick McHardy 5a346fac33 lce: don't use full pages by default
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-16 01:07:14 +02:00
Patrick McHardy ded21cc584 lce: add full page support
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-15 22:33:34 +02:00
Patrick McHardy 77f31308d8 libdect: add ConnetionLess Message Service (CLMS) support
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-13 15:07:36 +02:00
Patrick McHardy 906820a35e libdect: prefix IE types with DECT_
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-13 13:03:42 +02:00
Patrick McHardy c2195bb5d2 lce: clear padding in cmsg buffer
Make valgrind happy (tm).

Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-13 07:23:50 +02:00
Patrick McHardy 9801d01020 utils: convert paging to use dect_msg_buf structures
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-13 05:17:13 +02:00
Patrick McHardy 32fe0ad9b2 lce: support sending and receiving full and long page messages
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-13 03:55:45 +02:00
Patrick McHardy c7c118c6d0 lce: use MSG_NOSIGNAL to avoid SIGPIPE signals on stream sockets
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-12 04:13:01 +02:00
Patrick McHardy 0e2e31e0c4 lce: check result of dect_fd_register()
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-03 23:37:11 +02:00
Patrick McHardy 7b406ad5cc lce: clear retransmission pointer when opening/confirming a new transaction
Fix use-after-free when the transaction is used for a second time.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-02 23:31:26 +02:00
Patrick McHardy e999fbe0b6 lce: include <<PORTABLE-IDENTITY>> IE in page reject message
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-02 11:54:39 +02:00
Patrick McHardy 575483c4f3 lce: fix page transaction release mode
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-02 05:50:21 +02:00
Patrick McHardy 7c0e516ed9 libdect: name timer related functions more consistently
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-02 05:25:03 +02:00
Patrick McHardy 3d125cbc83 libdect: name timer related functions more consistently
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-02 05:21:45 +02:00
Patrick McHardy 35dfe2ac3f libdect: name transaction related functions more consistently
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-02 05:15:41 +02:00
Patrick McHardy 81bc245c85 lce: fix segfault when closing S-SAP socket in PP mode
The socket is NULL in PP mode, don't try to close it.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-02 04:53:35 +02:00
Patrick McHardy d74420ac6e lce: only open S-SAP socket in FP mode
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-01 17:18:37 +02:00
Patrick McHardy de54717db0 mm: change PMID when an access rights request is not confirmed
As specified in ETSI EN 300 175-6, section 9.1.2.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-08-01 16:14:18 +02:00
Patrick McHardy 347f6bfe81 lce: add missing newline characters to PMID debugging messages
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-07-31 18:54:18 +02:00
Patrick McHardy 29e67ec155 lce: properly maintain PMID
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-31 14:27:38 +02:00
Patrick McHardy 18b31504df lce: fix indentation
Signed-off-by: Patrick MCHardy <kaber@trash.net>
2010-07-31 14:07:12 +02:00
Patrick McHardy 6f8f9fe140 lce: add support for retransmissions
Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-07-31 12:46:01 +02:00
Patrick McHardy 949b2a8059 lce: add reference counting to message buffers
Required by the next patch, which will add proper retransmission to MM.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2010-07-31 12:41:25 +02:00