diff options
author | Holger Freyther <zecke@selfish.org> | 2009-02-03 20:08:51 +0000 |
---|---|---|
committer | Holger Freyther <zecke@selfish.org> | 2009-02-03 20:08:51 +0000 |
commit | 8c563cf4f9cd49123d761ae3e17f75b3327a4362 (patch) | |
tree | 00d712b400462727a58b37d5efb2ca4e4dedb9b3 | |
parent | bf5e8df424a1258198af82d011bc4d0e9132529f (diff) |
[rsl] Decode RACH Load as well
Print the common field and ignore the Supplementary Information.
Initialize the fields to 0xffffffff in case the payload is malformed
-rw-r--r-- | src/abis_rsl.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/abis_rsl.c b/src/abis_rsl.c index a2c0c7281..eb38a16e3 100644 --- a/src/abis_rsl.c +++ b/src/abis_rsl.c @@ -658,6 +658,9 @@ static int rsl_rx_ccch_load(struct msgb *msg) { struct abis_rsl_dchan_hdr *rslh = msgb_l2(msg); u_int16_t pg_buf_space; + u_int16_t rach_slot_count = -1; + u_int16_t rach_busy_count = -1; + u_int16_t rach_access_count = -1; switch (rslh->data[0]) { case RSL_IE_PAGING_LOAD: @@ -666,7 +669,13 @@ static int rsl_rx_ccch_load(struct msgb *msg) pg_buf_space); break; case RSL_IE_RACH_LOAD: - DEBUGP(DRSL, "CCCH LOAD IND, RACH Load\n"); + if (msg->data_len >= 7) { + rach_slot_count = rslh->data[2] << 8 | rslh->data[3]; + rach_busy_count = rslh->data[4] << 8 | rslh->data[5]; + rach_access_count = rslh->data[6] << 8 | rslh->data[7]; + } + DEBUGP(DRSL, "CCCH LOAD IND, RACH Load Count: %u Busy: %u Access: %u\n", + rach_slot_count, rach_busy_count, rach_access_count); break; default: break; |