Fork 0
Commit Graph

479 Commits

Author SHA1 Message Date
Patrick McHardy 660297a3dc build: convert build to libnl3
This patch converts libdect to build with libnl3. Older libnl versions will
not work anymore, to fix this the build system will be converted to automake
and pkgconfig soon.

Signed-off-by: Patrick McHardy <>
2013-04-01 12:13:36 +02:00
Patrick McHardy cf705660fe Merge branch 'master' of ssh:// 2012-02-09 21:05:55 +01:00
Patrick McHardy 53f59f4277 utils: resync fallback definitions with current kernel
Signed-off-by: Patrick McHardy <>
2012-02-09 20:43:02 +01:00
Patrick McHardy ee513d78ff build: fix compilation on FC16
FC16 apparently needs -ldl, probably for SDL (examples/).

Signed-off-by: Patrick McHardy <>
2011-12-09 18:44:32 +01:00
Patrick McHardy 5c7fbfa614 utils: resync NETLINK_DECT with kernel headers
Signed-off-by: Patrick McHardy <>
2011-12-08 12:16:02 +01:00
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 <>
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 <>
2011-10-05 19:06:54 +02:00
Patrick McHardy 56e4149e01 utils: resync AF_DECT definition with kernel headers
Signed-off-by: Patrick McHardy <>
2011-10-05 15:33:38 +02:00
Patrick McHardy bec233ed6c s_fmt: dump <IWU-TO-IWU> contents
Signed-off-by: Patrick McHardy <>
2011-08-04 10:49:16 +02:00
Patrick McHardy 4a241273ff sfmt: use trans_table for auth flags
Signed-off-by: Patrick McHardy <>
2011-07-18 21:34:49 +02:00
Patrick McHardy 85d1fb46c5 utils: resync value of NETLINK_DECT with 3.0.0-rc3
Signed-off-by: Patrick McHardy <>
2011-06-18 05:51:43 +02:00
Patrick McHardy 7e73e6223d mm: only complete info request procedure in PP mode
The procedure only consists of a single message in FP->PP direction,
don't terminate prematurely in FP mode.

Signed-off-by: Patrick McHardy <>
2011-05-30 17:04:31 +02:00
Patrick McHardy 7b76f999c8 sfmt: fix parsing of <<REPEAT-INDICATOR>> IEs
The address of the destination element is calculated incorrectly,
the passed IE double pointer points directly to the dect_ie_list
and not to the container.

Signed-off-by: Patrick MCHardy <>
2011-05-05 22:42:35 +02:00
Patrick McHardy b0de27b43d mm: fix typo in debug message
Signed-off-by: Patrick McHardy <>
2011-05-05 22:38:52 +02:00
Patrick McHardy 8dabcb35c6 netlink: include dect_netlink.h
Fix compilation with current gccs which require enum definition.

Signed-off-by: Patrick McHardy <kaber@trash,net>
2011-04-23 14:14:58 +02:00
Patrick McHardy 77ace09859 lce: use symbolic identifiers for S-SAP sockaddr
Signed-off-by: Patrick McHardy <kaber <>
2011-03-21 17:15:04 +01:00
Patrick McHardy 7a75194dde mm: properly complete procedure consisting only of a single message
Signed-off-by: Patrick McHardy <>
2011-03-20 16:20:05 +01:00
Patrick McHardy 1f428e7139 lce: attempt to support transactions only consisting of a single message
Signed-off-by: Patrick McHardy <>
2011-03-20 03:41:50 +01:00
Patrick McHardy 8a59a4cd9d example: fp-locate-suggest
Not working properly without changes to src/mm.c, concretely all FP
transactions only transmitting a single message are currently broken
since the transaction is closed before the PP can respond to the page

Uncomment dect_transaction_close() in dect_mm_info_req() for testing.

Signed-off-by: Patrick McHardy <>
2011-03-20 02:00:00 +01:00
Patrick McHardy f3a25140f0 build: remove libintl.h from AC_CHECK_HEADERS
Signed-off-by: Patrick McHardy <>
2011-03-19 06:08:48 +01:00
Patrick McHardy 2d39f5904e mm: use mme->current in -res primitives instead of hard-coding procedure role
In some cases (f.i. temporary identity assignment) the initiator procedure is
converted, don't hard-code the role.

Signed-off-by: Patrick McHardy <>
2011-02-26 19:23:46 +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 <>
2011-02-26 18:00:23 +01:00
Patrick McHardy f5b3fafa47 cc: convert -res primitives to return void
There is no reasonable way for the caller to respond to an error returned
by a -res primitive, the initiator is responsible for resending the
request. Change all CC -res primitives to return void.

Signed-off-by: Patrick McHardy <>
2011-02-24 21:47:07 +01:00
Patrick McHardy 3b1c1f5e44 mm: convert -res primitives to return void
There is no reasonable way for the caller to respond to an error returned
by a -res primitive, the initiator is responsible for resending the
request. Change all MM -res primitives to complete the procedure on error
and return void.

Signed-off-by: Patrick McHardy <>
2011-02-24 21:47:07 +01:00
Patrick McHardy 601c3808c1 libdect: adjust AF_DECT value for 2.6.38-rc2
Signed-off-by: Patrick McHardy <>
2011-01-24 05:11:14 +01:00
Patrick McHardy 42510e7c77 lce: really fix set-up condition
Signed-off-by: Patrick McHardy <>
2011-01-11 21:40:32 +01:00
Patrick McHardy 3e558a2832 ie: fix compilation with refcount debugging
Signed-off-by: Patrick McHardy <>
2011-01-11 20:13:38 +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 <>
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 <>
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 <>
2011-01-09 12:17:34 +01:00
Patrick McHardy 3973ec108a backtrace: remove dead define
Signed-off-by: Patrick McHardy <>
2011-01-07 13:22:48 +01:00
Patrick McHardy f23a299158 example: update .gitignore
Add fp-siemens-proprietary to .gitignore.

Signed-off-by: Patrick McHardy <>
2011-01-07 13:22:48 +01:00
Patrick McHardy 5bd59900fd lce: change PMID/IPUI assignment debugging output
Change PMID/IPUIassignment debugging output to match other debugging

Signed-off-by: Patrick McHardy <>
2011-01-07 13:22:41 +01:00
Patrick McHardy e9b5827470 ie: add <<SERVICE-CHANGE>> IE
Signed-off-by: Patrick McHardy <>
2010-11-23 15:27:43 +01:00
Patrick McHardy 3dd2f8afdd raw: add dect_raw_close() function
Signed-off-by: Patrick McHardy <>
2010-11-22 16:08:00 +01:00
Patrick Mchardy 102612d5aa netlink: set PARI on dect_llme_mac_me_info_res, clear on dect_llme_scan_req
Signed-off-by: Patrick Mchardy <kaber@t61.localnet>
2010-11-19 20:17:37 +01:00
Patrick McHardy 38d4c54807 netlink: clear ARI to make it usable for dect_ari_cmp()
Signed-off-by: Patrick McHardy <>
2010-11-17 16:11:16 +01:00
Patrick McHardy 17cc9be51e ie: fix SS facility prototol discriminator
Signed-off-by: Patrick McHardy <>
2010-11-16 23:07:19 +01:00
Patrick McHardy 3c41dc14e0 netlink: add MAC_ME_INFO-res and SCAN-req primitives
Signed-off-by: Patrick McHardy <>
2010-11-16 18:54:49 +01:00
Patrick McHardy 293fb1e809 timer: export timer functions declarations
The functions are already exported, also export the declarations
since they are useful and easier to use than f.i. using libevent

Signed-off-by: Patrick McHardy <>
2010-11-16 15:13:28 +01:00
Patrick McHardy d84f619c3a cc: don't stop completion timer if not running

results in:

src/timer.c:99: dect_timer_stop: assertion `timer->state == DECT_TIMER_RUNNING' failed.
#0  0xb76b1548 in dect_backtrace() from /home/kaber/dect/libdect/src/ at debug.c:136
#1  0xb76b1614 in __dect_assert_fail() from /home/kaber/dect/libdect/src/ at debug.c:148
#2  0xb76b0a85 in dect_timer_stop() from /home/kaber/dect/libdect/src/ at timer.c:102
#3  0xb76a343c in dect_cc_rcv_connect() from /home/kaber/dect/libdect/src/ at cc.c:1468
#4  0xb76a0162 in dect_ddl_rcv_msg() from /home/kaber/dect/libdect/src/ at lce.c:746
#5  0xb76a039b in dect_lce_data_link_event() from /home/kaber/dect/libdect/src/ at lce.c:898
#6  0xb76b04cf in dect_fd_process() from /home/kaber/dect/libdect/src/ at io.c:132
#7  0xb7690bdf in event_del() from /usr/lib/ at ??:0
#8  0xb7689934 in ev_invoke_pending() from /usr/lib/ at ??:0
#9  0xb768ef34 in ev_loop() from /usr/lib/ at ??:0
#10 0xb7690874 in event_base_loop() from /usr/lib/ at ??:0
#11 0xb7690907 in event_loop() from /usr/lib/ at ??:0
#12 0x080496dd in dect_event_loop() from /proc/self/exe at event_ops.c:112
#13 0x0804b67c in main() from /proc/self/exe at pp-cc.c:88

Signed-off-by: Patrick McHardy <>
2010-11-16 15:13:18 +01:00
Patrick McHardy db10281fb6 ie: add <<FACILITY>> IE
Signed-off-by: Patrick McHardy <>
2010-11-16 15:08:30 +01:00
Patrick McHardy 8aa6d8f94b clms: hexdump data section contents, decode header as strings
Signed-off-by: Patrick McHardy <>
2010-11-16 15:06:49 +01:00
Patrick McHardy 7ce0366c31 libdect: also clear dect handle private area
Signed-off-by: Patrick McHardy <>
2010-11-16 15:06:43 +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 <>
2010-11-14 22:08:45 +01:00
Patrick McHardy 305e9be660 netlink: restore broadcast reception handler after sending unicast requests
Instead of setting the handler to NULL, restore the broadcast message
reception handler. Otherwise messages will be lost after sending a
unicast request. This currently only works because the requests are
either sent before the broadcast message handler is installed by the
initialization function or (in FP mode) there are no broadcast messages.

Signed-off-by: Patrick McHardy <>
2010-11-14 19:10:48 +01:00
Patrick McHardy ab0a2a6afa identities: add dect_ari_cmp()
Already contained in the header files, but never implemented.

Signed-off-by: Patrick McHardy <>
2010-11-14 19:09:36 +01:00
Patrick McHardy 582a7d50c7 libdect: support allocating per-handle private space
Similar to other objects, support a private data area for libdect handles
for applications dealing with multiple handles simultenously.

Signed-off-by: Patrick McHardy <>
2010-11-14 19:09:33 +01:00
Patrick McHardy 3c8698333b backtrace: fix warnings on 64 bit
src/backtrace.c: In function 'translate_addresses_buf':
src/backtrace.c:158: warning: field width should have type 'int', but argument 4 has type 'long unsigned int'
src/backtrace.c:158: warning: field width should have type 'int', but argument 4 has type 'long unsigned int'

Signed-off-by: Patrick McHardy <>
2010-11-12 11:04:13 +01:00
Patrick McHardy c52d892c62 build: verify that event.h and event library are compatible
libev contains an libevent compat header file that at least on Debian
is only installed optionally. Make sure event.h and the event library
match since their respective struct event definitions don't match.

Signed-off-by: Patrick McHardy <>
2010-11-12 07:04:58 +01:00