From holger at freyther.de Mon May 2 07:19:58 2016 From: holger at freyther.de (Holger Freyther) Date: Mon, 2 May 2016 09:19:58 +0200 Subject: test mailman archive.. Message-ID: <1CDE82B7-4EE4-49E7-9566-F8B5A07EE414@freyther.de> test From holger at freyther.de Mon May 2 07:37:59 2016 From: holger at freyther.de (Holger Freyther) Date: Mon, 2 May 2016 09:37:59 +0200 Subject: osmo-nitb In-Reply-To: References: Message-ID: <5617D687-30F3-419D-8A8E-9378E33F196F@freyther.de> > On 18 Apr 2016, at 18:27, loay abdelrazek wrote: > > Dears, > hope this finds you well, Hi! > kiindly i need to know how to configure the GT and PC for the various simulated nodes in osmo-nitb as am testing some security scripts to simulate different roaming attacks using the MAP protocol can you please introduce yourself. What do you work on? Who do you work for? How does it help the Osmocom project? kind regards holger From loay.razek at gmail.com Mon May 2 08:24:28 2016 From: loay.razek at gmail.com (loay abdelrazek) Date: Mon, 2 May 2016 04:24:28 -0400 Subject: osmo-nitb In-Reply-To: <5617D687-30F3-419D-8A8E-9378E33F196F@freyther.de> References: <5617D687-30F3-419D-8A8E-9378E33F196F@freyther.de> Message-ID: Dear Holger Am a security researcher working at nile university , and we are currently working on developing a signaling IDS so we wanted to simulate first the network and simulate the attacks On Monday, 2 May 2016, Holger Freyther wrote: > > > On 18 Apr 2016, at 18:27, loay abdelrazek > wrote: > > > > Dears, > > hope this finds you well, > > Hi! > > > > kiindly i need to know how to configure the GT and PC for the various > simulated nodes in osmo-nitb as am testing some security scripts to > simulate different roaming attacks using the MAP protocol > > can you please introduce yourself. What do you work on? Who do you work > for? How does it help the Osmocom project? > > kind regards > holger -------------- next part -------------- An HTML attachment was scrubbed... URL: From nhofmeyr at sysmocom.de Mon May 2 12:53:33 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Mon, 2 May 2016 14:53:33 +0200 Subject: test-ranap failures Message-ID: <20160502125333.GB2646@ass40.sysmocom.de> Hi Harald & others, just dropping a note on a recent test failure with some confusion included concerning the osmo-iuh test-ranap.c test suite... I fixed it in master's HEAD 95d0ba5, this mail is just in case anyone else hits this confusion. from Harald's recent commits on osmo-iuh, I see two test failures. The first that came to my attention is a missing free: [[[ --- expout 2016-05-02 14:23:55.303083568 +0200 +++ /n/s/osmo/git/osmo-iuh/src/tests/testsuite.dir/at-groups/3/stdout 2016-05-02 14:23:55.311083487 +0200 @@ -213,6 +213,7 @@ 00 0a 00 11 00 00 01 00 29 40 0a 00 00 01 00 28 40 03 05 c2 d0 report -talloc report on 'asn1_context' (total 0 bytes in 1 blocks) +talloc report on 'asn1_context' (total 40 bytes in 2 blocks) + constr_CHOICE.c:927 contains 40 bytes in 1 blocks (ref 0) 0x1c81690 talloc report on 'msgb' (total 1 bytes in 1 blocks) exit 3. testsuite.at:18: 3. ranap (testsuite.at:18): FAILED (testsuite.at:21) ]]] I found that it is introduced by 14da5411a4fbe05eccff5b4f0934d52773a3f97a ("test-ranap: Add test case about constrained integer range decode") -- merely a missing free of the decoded RANAP_Cause_t*. However, when warping back to that commit I also see an unexpected reversal of the byte order of two bytes in six places, introduced in f764a15c2339d5b24f ("Add test case about RANAP MaxBitrate encoding") and later secretly fixed in bb289e3b810683d ("RAB parameters: add Extended Max Bitrate") which is actually my commit but now appears in master as authored by you. The failure looks like this: [[[ ./testsuite.at:21: $abs_top_builddir/src/tests/test-ranap --- expout 2016-05-02 14:24:18.018852893 +0200 +++ /n/s/osmo/git/osmo-iuh/src/tests/testsuite.dir/at-groups/3/stdout 2016-05-02 14:24:18.046852609 +0200 @@ -88,7 +88,7 @@ 38 02 D8 01 2F A7 20 2F A8 00 00 F4 4C 08 0A 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 - 14 00 3C 40 00 00 00 50 3D 02 02 00 0D C0 35 00 + 14 00 3C 40 00 00 00 50 3D 02 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 00 00 00 01 @@ -101,11 +101,11 @@ 00 00 01 00 35 00 3A 38 02 D8 01 2F A7 20 2F A8 00 00 F4 4C 08 0A 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3C 40 00 00 00 50 3D - 02 02 00 0D C0 35 00 01 0A 0B 0C 0D 40 00 00 00 + 02 00 02 0D C0 35 00 01 0A 0B 0C 0D 40 00 00 00 01 40 01 00 -00 00 00 4b 00 00 01 00 36 40 44 00 00 01 00 35 00 3a 38 02 d8 01 2f a7 20 2f a8 00 00 f4 4c 08 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 3d 02 02 00 0d c0 35 00 01 0a 0b 0c 0d 40 00 00 00 01 40 01 00 +00 00 00 4b 00 00 01 00 36 40 44 00 00 01 00 35 00 3a 38 02 d8 01 2f a7 20 2f a8 00 00 f4 4c 08 0a 02 80 00 51 40 00 27 20 28 14 00 67 40 00 00 22 28 14 00 3c 40 00 00 00 50 3d 02 00 02 0d c0 35 00 01 0a 0b 0c 0d 40 00 00 00 01 40 01 00 ==> RAB ASSIGNMENT COMMAND (DATA) @@ -113,7 +113,7 @@ 38 04 10 DE 18 69 FF 80 0C 34 FF 00 1F 40 08 06 - 08 9E 00 04 00 1B 80 35 00 01 1A 1B 1C 1D 00 11 + 08 9E 00 00 04 1B 80 35 00 01 1A 1B 1C 1D 00 11 22 33 44 @@ -124,12 +124,12 @@ 00 00 01 00 35 00 23 38 04 10 DE 18 69 FF 80 0C - 34 FF 00 1F 40 08 06 08 9E 00 04 00 1B 80 35 00 + 34 FF 00 1F 40 08 06 08 9E 00 00 04 1B 80 35 00 01 1A 1B 1C 1D 00 11 22 33 44 40 06 78 1C 00 00 00 00 -00 00 00 39 00 00 01 00 36 40 32 00 00 01 00 35 00 23 38 04 10 de 18 69 ff 80 0c 34 ff 00 1f 40 08 06 08 9e 00 04 00 1b 80 35 00 01 1a 1b 1c 1d 00 11 22 33 44 40 06 78 1c 00 00 00 00 +00 00 00 39 00 00 01 00 36 40 32 00 00 01 00 35 00 23 38 04 10 de 18 69 ff 80 0c 34 ff 00 1f 40 08 06 08 9e 00 00 04 1b 80 35 00 01 1a 1b 1c 1d 00 11 22 33 44 40 06 78 1c 00 00 00 00 ==> RESET CMD 3. testsuite.at:18: 3. ranap (testsuite.at:18): FAILED (testsuite.at:21) ]]] I'm not sure how this reversal came to be in test-ranap.ok. All I know is it works in master's HEAD, but not in 14da5411a4fbe05eccff5b4f0. ~Neels -- - Neels Hofmeyr http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Gesch?ftsf?hrer / Managing Directors: Holger Freyther, Harald Welte -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From laforge at gnumonks.org Mon May 2 13:08:49 2016 From: laforge at gnumonks.org (Harald Welte) Date: Mon, 2 May 2016 15:08:49 +0200 Subject: test-ranap failures In-Reply-To: <20160502125333.GB2646@ass40.sysmocom.de> References: <20160502125333.GB2646@ass40.sysmocom.de> Message-ID: <20160502130849.GG1619@nataraja> On Mon, May 02, 2016 at 02:53:33PM +0200, Neels Hofmeyr wrote: > I found that it is introduced by 14da5411a4fbe05eccff5b4f0934d52773a3f97a > ("test-ranap: Add test case about constrained integer range decode") > -- merely a missing free of the decoded RANAP_Cause_t*. thanks for spotting it. > However, when warping back to that commit I also see an unexpected reversal of > the byte order of two bytes in six places, introduced in f764a15c2339d5b24f > ("Add test case about RANAP MaxBitrate encoding") and later secretly fixed in > bb289e3b810683d ("RAB parameters: add Extended Max Bitrate") which is actually > my commit but now appears in master as authored by you. My apologies for this. I spotted it only after I had pushed it to git.osmocom.org. I don't know how this happened, I just used git rebase -i and did some manual editing/merging associated with that. Not sure why git changed the author information, that's clearly not my intention. > - 14 00 3C 40 00 00 00 50 3D 02 02 00 0D C0 35 00 > + 14 00 3C 40 00 00 00 50 3D 02 00 02 0D C0 35 00 > I'm not sure how this reversal came to be in test-ranap.ok. All I know is it > works in master's HEAD, but not in 14da5411a4fbe05eccff5b4f0. do you know in which part of the message the byte reversal is happening? did you actually check on your system tu build + run test-ranap in both master and the 14da5411a4fbe05eccff5b4f0 commit? I suspect the difference is actually related to the fact that I switched to an updated/fixed libasn1c in between, something that's unfortunately not visible in the git changelog of osmo-iuh.git :/ -- - Harald Welte http://laforge.gnumonks.org/ ============================================================================ "Privacy in residential applications is a desirable marketing option." (ETSI EN 300 175-7 Ch. A6) From msuraev at sysmocom.de Mon May 2 16:06:34 2016 From: msuraev at sysmocom.de (msuraev at sysmocom.de) Date: Mon, 2 May 2016 18:06:34 +0200 Subject: [PATCH] Make random MSISDN assignment optional Message-ID: <1462205194-18849-1-git-send-email-msuraev@sysmocom.de> From: Max Previously if subscriber was automatically created it got assigned random MSISDN number between 20000 and 49999. Make it optional (defaulting to previous behavior) by adding following: * optional "no-extension" argument to subscriber-create-on-demand * db unit tests * vty test The range for random extension can now be specified with "subscriber-create-on-demand random" command. Fixes: OS#1658 --- openbsc/include/openbsc/db.h | 8 ++- openbsc/include/openbsc/gsm_data.h | 8 +++ openbsc/include/openbsc/gsm_subscriber.h | 5 +- openbsc/src/libbsc/net_init.c | 5 +- openbsc/src/libcommon/gsm_subscriber_base.c | 1 + openbsc/src/libmsc/ctrl_commands.c | 9 ++- openbsc/src/libmsc/db.c | 37 +++++++---- openbsc/src/libmsc/gsm_04_08.c | 12 +++- openbsc/src/libmsc/gsm_subscriber.c | 6 +- openbsc/src/libmsc/vty_interface_layer3.c | 51 +++++++++++++-- openbsc/tests/db/db_test.c | 99 +++++++++++++---------------- openbsc/tests/vty_test_runner.py | 14 ++++ 12 files changed, 169 insertions(+), 86 deletions(-) diff --git a/openbsc/include/openbsc/db.h b/openbsc/include/openbsc/db.h index 6699a86..4da9634 100644 --- a/openbsc/include/openbsc/db.h +++ b/openbsc/include/openbsc/db.h @@ -20,6 +20,8 @@ #ifndef _DB_H #define _DB_H +#include + #include "gsm_subscriber.h" struct gsm_equipment; @@ -35,13 +37,15 @@ int db_prepare(void); int db_fini(void); /* subscriber management */ -struct gsm_subscriber *db_create_subscriber(const char *imsi); +struct gsm_subscriber *db_create_subscriber(const char *imsi, uint64_t smin, + uint64_t smax, bool ext); struct gsm_subscriber *db_get_subscriber(enum gsm_subscriber_field field, const char *subscr); int db_sync_subscriber(struct gsm_subscriber *subscriber); int db_subscriber_expire(void *priv, void (*callback)(void *priv, long long unsigned int id)); int db_subscriber_alloc_tmsi(struct gsm_subscriber *subscriber); -int db_subscriber_alloc_exten(struct gsm_subscriber *subscriber); +int db_subscriber_alloc_exten(struct gsm_subscriber *subscriber, uint64_t smin, + uint64_t smax); int db_subscriber_alloc_token(struct gsm_subscriber *subscriber, uint32_t* token); int db_subscriber_assoc_imei(struct gsm_subscriber *subscriber, char *imei); int db_subscriber_delete(struct gsm_subscriber *subscriber); diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 6d7aba3..14b002a 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -18,6 +18,12 @@ struct gsm_subscriber_group; #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] +enum gsm_subscr_ext { + GSM_SUBSCR_DONT_CREATE = 0, + GSM_SUBSCR_RANDOM_EXT = 1, + GSM_SUBSCR_NO_EXT = 2 +}; + enum gsm_security_event { GSM_SECURITY_NOAVAIL, GSM_SECURITY_AUTH_FAILED, @@ -283,6 +289,8 @@ struct gsm_network { /* subscriber related features */ int create_subscriber; + uint64_t ext_min; + uint64_t ext_max; struct gsm_subscriber_group *subscr_group; struct gsm_sms_queue *sms_queue; diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h index 7d6c776..5030d65 100644 --- a/openbsc/include/openbsc/gsm_subscriber.h +++ b/openbsc/include/openbsc/gsm_subscriber.h @@ -1,6 +1,8 @@ #ifndef _GSM_SUBSCR_H #define _GSM_SUBSCR_H +#include + #include "gsm_data.h" #include @@ -91,7 +93,8 @@ enum gsm_subscriber_update_reason { struct gsm_subscriber *subscr_get(struct gsm_subscriber *subscr); struct gsm_subscriber *subscr_put(struct gsm_subscriber *subscr); struct gsm_subscriber *subscr_create_subscriber(struct gsm_subscriber_group *sgrp, - const char *imsi); + const char *imsi, uint64_t smin, + uint64_t smax, bool ext); struct gsm_subscriber *subscr_get_by_tmsi(struct gsm_subscriber_group *sgrp, uint32_t tmsi); struct gsm_subscriber *subscr_get_by_imsi(struct gsm_subscriber_group *sgrp, diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c index 568a0b8..a524ead 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -48,7 +48,7 @@ struct gsm_network *gsm_network_init(uint16_t country_code, uint16_t network_cod INIT_LLIST_HEAD(&net->bsc_data->mscs); net->subscr_group->net = net; - net->create_subscriber = 1; + net->create_subscriber = GSM_SUBSCR_RANDOM_EXT; net->country_code = country_code; net->network_code = network_code; @@ -104,7 +104,8 @@ struct gsm_network *gsm_network_init(uint16_t country_code, uint16_t network_cod net->stats.bts.rsl_fail = osmo_counter_alloc("net.bts.rsl_fail"); net->mncc_recv = mncc_recv; - + net->ext_min = GSM_MIN_EXTEN; + net->ext_max = GSM_MAX_EXTEN; gsm_net_update_ctype(net); return net; diff --git a/openbsc/src/libcommon/gsm_subscriber_base.c b/openbsc/src/libcommon/gsm_subscriber_base.c index a455824..5f0a1be 100644 --- a/openbsc/src/libcommon/gsm_subscriber_base.c +++ b/openbsc/src/libcommon/gsm_subscriber_base.c @@ -60,6 +60,7 @@ struct gsm_subscriber *subscr_alloc(void) llist_add_tail(&s->entry, &active_subscribers); s->use_count = 1; s->tmsi = GSM_RESERVED_TMSI; + s->extension[0] = '\0'; INIT_LLIST_HEAD(&s->requests); diff --git a/openbsc/src/libmsc/ctrl_commands.c b/openbsc/src/libmsc/ctrl_commands.c index 9ac39de..44b1ebd 100644 --- a/openbsc/src/libmsc/ctrl_commands.c +++ b/openbsc/src/libmsc/ctrl_commands.c @@ -18,6 +18,9 @@ * along with this program. If not, see . * */ + +#include + #include #include #include @@ -83,6 +86,8 @@ static int set_subscriber_modify(struct ctrl_cmd *cmd, void *data) char *tmp, *imsi, *msisdn, *alg, *ki, *saveptr = NULL; struct gsm_subscriber* subscr; int rc; + bool ext = (GSM_SUBSCR_RANDOM_EXT == net->create_subscriber) ? true : + false; tmp = talloc_strdup(cmd, cmd->value); if (!tmp) @@ -95,7 +100,9 @@ static int set_subscriber_modify(struct ctrl_cmd *cmd, void *data) subscr = subscr_get_by_imsi(net->subscr_group, imsi); if (!subscr) - subscr = subscr_create_subscriber(net->subscr_group, imsi); + subscr = subscr_create_subscriber(net->subscr_group, imsi, + net->ext_min, + net->ext_max, ext); if (!subscr) goto fail; diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c index 267b5ef..5e55433 100644 --- a/openbsc/src/libmsc/db.c +++ b/openbsc/src/libmsc/db.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -500,7 +501,8 @@ int db_fini(void) return 0; } -struct gsm_subscriber *db_create_subscriber(const char *imsi) +struct gsm_subscriber *db_create_subscriber(const char *imsi, uint64_t smin, + uint64_t smax, bool ext) { dbi_result result; struct gsm_subscriber *subscr; @@ -532,7 +534,8 @@ struct gsm_subscriber *db_create_subscriber(const char *imsi) strncpy(subscr->imsi, imsi, GSM_IMSI_LENGTH-1); dbi_result_free(result); LOGP(DDB, LOGL_INFO, "New Subscriber: ID %llu, IMSI %s\n", subscr->id, subscr->imsi); - db_subscriber_alloc_exten(subscr); + if (ext) + db_subscriber_alloc_exten(subscr, smin, smax); return subscr; } @@ -937,8 +940,11 @@ int db_sync_subscriber(struct gsm_subscriber *subscriber) dbi_conn_quote_string_copy(conn, subscriber->name, &q_name); - dbi_conn_quote_string_copy(conn, - subscriber->extension, &q_extension); + if ('\0' != subscriber->extension[0]) + dbi_conn_quote_string_copy(conn, + subscriber->extension, &q_extension); + else + q_extension = strdup("NULL"); if (subscriber->tmsi != GSM_RESERVED_TMSI) { sprintf(tmsi, "%u", subscriber->tmsi); @@ -1043,15 +1049,17 @@ int db_subscriber_delete(struct gsm_subscriber *subscr) } dbi_result_free(result); - result = dbi_conn_queryf(conn, - "DELETE FROM SMS WHERE src_addr=%s OR dest_addr=%s", - subscr->extension, subscr->extension); - if (!result) { - LOGP(DDB, LOGL_ERROR, - "Failed to delete SMS for %llu\n", subscr->id); - return -1; + if ('\0' != subscr->extension[0]) { + result = dbi_conn_queryf(conn, + "DELETE FROM SMS WHERE src_addr=%s OR dest_addr=%s", + subscr->extension, subscr->extension); + if (!result) { + LOGP(DDB, LOGL_ERROR, + "Failed to delete SMS for %llu\n", subscr->id); + return -1; + } + dbi_result_free(result); } - dbi_result_free(result); result = dbi_conn_queryf(conn, "DELETE FROM VLR WHERE subscriber_id=%llu", @@ -1231,13 +1239,14 @@ int db_subscriber_alloc_tmsi(struct gsm_subscriber *subscriber) return 0; } -int db_subscriber_alloc_exten(struct gsm_subscriber *subscriber) +int db_subscriber_alloc_exten(struct gsm_subscriber *subscriber, uint64_t smin, + uint64_t smax) { dbi_result result = NULL; uint32_t try; for (;;) { - try = (rand()%(GSM_MAX_EXTEN-GSM_MIN_EXTEN+1)+GSM_MIN_EXTEN); + try = (rand() % (smax - smin + 1) + smin); result = dbi_conn_queryf(conn, "SELECT * FROM Subscriber " "WHERE extension = %i", diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 05cb886..d22db73 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -517,6 +518,8 @@ static int mm_rx_id_resp(struct gsm_subscriber_connection *conn, struct msgb *ms struct gsm_network *net = bts->network; uint8_t mi_type = gh->data[1] & GSM_MI_TYPE_MASK; char mi_string[GSM48_MI_SIZE]; + bool ext = (GSM_SUBSCR_RANDOM_EXT == net->create_subscriber) ? true : + false; gsm48_mi_to_string(mi_string, sizeof(mi_string), &gh->data[1], gh->data[0]); DEBUGP(DMM, "IDENTITY RESPONSE: MI(%s)=%s\n", @@ -532,7 +535,8 @@ static int mm_rx_id_resp(struct gsm_subscriber_connection *conn, struct msgb *ms mi_string); if (!conn->subscr && net->create_subscriber) conn->subscr = subscr_create_subscriber( - net->subscr_group, mi_string); + net->subscr_group, mi_string, + net->ext_min, net->ext_max, ext); } if (!conn->subscr && conn->loc_operation) { gsm0408_loc_upd_rej(conn, bts->network->reject_cause); @@ -593,6 +597,8 @@ static int mm_rx_loc_upd_req(struct gsm_subscriber_connection *conn, struct msgb struct gsm_bts *bts = conn->bts; uint8_t mi_type; char mi_string[GSM48_MI_SIZE]; + bool ext = (GSM_SUBSCR_RANDOM_EXT == bts->network->create_subscriber) ? + true : false; lu = (struct gsm48_loc_upd_req *) gh->data; @@ -643,7 +649,9 @@ static int mm_rx_loc_upd_req(struct gsm_subscriber_connection *conn, struct msgb subscr = subscr_get_by_imsi(bts->network->subscr_group, mi_string); if (!subscr && bts->network->create_subscriber) { subscr = subscr_create_subscriber( - bts->network->subscr_group, mi_string); + bts->network->subscr_group, mi_string, + bts->network->ext_min, bts->network->ext_max, + ext); } if (!subscr) { gsm0408_loc_upd_rej(conn, bts->network->reject_cause); diff --git a/openbsc/src/libmsc/gsm_subscriber.c b/openbsc/src/libmsc/gsm_subscriber.c index 57c10cf..7d62888 100644 --- a/openbsc/src/libmsc/gsm_subscriber.c +++ b/openbsc/src/libmsc/gsm_subscriber.c @@ -203,9 +203,11 @@ void subscr_remove_request(struct subscr_request *request) } struct gsm_subscriber *subscr_create_subscriber(struct gsm_subscriber_group *sgrp, - const char *imsi) + const char *imsi, uint64_t smin, + uint64_t smax, bool ext) { - struct gsm_subscriber *subscr = db_create_subscriber(imsi); + struct gsm_subscriber *subscr = + db_create_subscriber(imsi, smin, smax, ext); if (subscr) subscr->group = sgrp; return subscr; diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 790fedf..51b7258 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -21,6 +21,8 @@ #include #include #include +#include +#include #include #include @@ -235,12 +237,16 @@ DEFUN(subscriber_create, { struct gsm_network *gsmnet = gsmnet_from_vty(vty); struct gsm_subscriber *subscr; + bool ext = (GSM_SUBSCR_RANDOM_EXT == gsmnet->create_subscriber) ? true : + false; subscr = subscr_get_by_imsi(gsmnet->subscr_group, argv[0]); if (subscr) db_sync_subscriber(subscr); else { - subscr = subscr_create_subscriber(gsmnet->subscr_group, argv[0]); + subscr = subscr_create_subscriber(gsmnet->subscr_group, argv[0], + gsmnet->ext_min, + gsmnet->ext_max, ext); if (!subscr) { vty_out(vty, "%% No subscriber created for IMSI %s%s", @@ -1032,11 +1038,33 @@ DEFUN(cfg_nitb, cfg_nitb_cmd, } DEFUN(cfg_nitb_subscr_create, cfg_nitb_subscr_create_cmd, - "subscriber-create-on-demand", - "Make a new record when a subscriber is first seen.\n") + "subscriber-create-on-demand [no-extension]", + "Make a new record when a subscriber is first seen.\n" + "Do not assign random extension when creating subscriber\n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->create_subscriber = 1; + if (argc) + gsmnet->create_subscriber = GSM_SUBSCR_NO_EXT; + else + gsmnet->create_subscriber = GSM_SUBSCR_RANDOM_EXT; + return CMD_SUCCESS; +} + +DEFUN(cfg_nitb_subscr_random, cfg_nitb_subscr_random_cmd, + "subscriber-create-on-demand random <1-99999> <2-99999>", + "Set random parameters for a new record when a subscriber is first seen.\n" + "Set random parameters for a new record when a subscriber is first seen.\n" + "Minimum for subscriber extension\n""Maximum for subscriber extension\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + uint64_t mi = atoi(argv[0]), ma = atoi(argv[1]); + if (mi >= ma) { + vty_out(vty, "Incorrect range: %s >= %s, expected MIN < MAX%s", + argv[0], argv[1], VTY_NEWLINE); + return CMD_WARNING; + } + gsmnet->ext_min = mi; + gsmnet->ext_max = ma; return CMD_SUCCESS; } @@ -1045,7 +1073,7 @@ DEFUN(cfg_nitb_no_subscr_create, cfg_nitb_no_subscr_create_cmd, NO_STR "Make a new record when a subscriber is first seen.\n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->create_subscriber = 0; + gsmnet->create_subscriber = GSM_SUBSCR_DONT_CREATE; return CMD_SUCCESS; } @@ -1070,9 +1098,17 @@ DEFUN(cfg_nitb_no_assign_tmsi, cfg_nitb_no_assign_tmsi_cmd, static int config_write_nitb(struct vty *vty) { struct gsm_network *gsmnet = gsmnet_from_vty(vty); + const char *pref = gsmnet->create_subscriber ? "" : "no ", *post = + (GSM_SUBSCR_NO_EXT == gsmnet->create_subscriber) ? + " no-extension" : ""; + vty_out(vty, "nitb%s", VTY_NEWLINE); - vty_out(vty, " %ssubscriber-create-on-demand%s", - gsmnet->create_subscriber ? "" : "no ", VTY_NEWLINE); + vty_out(vty, " %ssubscriber-create-on-demand%s%s", pref, post, + VTY_NEWLINE); + if (gsmnet->ext_min != GSM_MIN_EXTEN || gsmnet->ext_max != GSM_MAX_EXTEN) + vty_out(vty, "subscriber-create-on-demand random %"PRIu64" %" + PRIu64"%s", gsmnet->ext_min, gsmnet->ext_max, + VTY_NEWLINE); vty_out(vty, " %sassign-tmsi%s", gsmnet->avoid_tmsi ? "no " : "", VTY_NEWLINE); return CMD_SUCCESS; @@ -1127,6 +1163,7 @@ int bsc_vty_init_extra(void) install_element(CONFIG_NODE, &cfg_nitb_cmd); install_node(&nitb_node, config_write_nitb); install_element(NITB_NODE, &cfg_nitb_subscr_create_cmd); + install_element(NITB_NODE, &cfg_nitb_subscr_random_cmd); install_element(NITB_NODE, &cfg_nitb_no_subscr_create_cmd); install_element(NITB_NODE, &cfg_nitb_assign_tmsi_cmd); install_element(NITB_NODE, &cfg_nitb_no_assign_tmsi_cmd); diff --git a/openbsc/tests/db/db_test.c b/openbsc/tests/db/db_test.c index fb159a5..a689789 100644 --- a/openbsc/tests/db/db_test.c +++ b/openbsc/tests/db/db_test.c @@ -28,6 +28,7 @@ #include #include #include +#include #include static struct gsm_network dummy_net; @@ -159,10 +160,44 @@ static void test_sms_migrate(void) subscr_put(rcv_subscr); } -int main() +static void test_subs(const char *alice_imsi, char *imei1, char *imei2, bool ext) { + struct gsm_subscriber *alice = NULL, *alice_db; char scratch_str[256]; + alice = db_create_subscriber(alice_imsi, GSM_MIN_EXTEN, GSM_MAX_EXTEN, + ext); + db_subscriber_assoc_imei(alice, imei1); + if (imei2) + db_subscriber_assoc_imei(alice, imei2); + db_subscriber_alloc_tmsi(alice); + alice->lac=42; + db_sync_subscriber(alice); + /* Get by TMSI */ + snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi); + alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + /* Get by IMSI */ + alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice_imsi); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + /* Get by id */ + snprintf(scratch_str, sizeof(scratch_str), "%llu", alice->id); + alice_db = db_get_subscriber(GSM_SUBSCRIBER_ID, scratch_str); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + /* Get by extension */ + alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); + if (alice_db) { + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + } + SUBSCR_PUT(alice); +} + +int main() +{ printf("Testing subscriber database code.\n"); osmo_init_logging(&log_info); log_set_print_filename(osmo_stderr_target, 0); @@ -186,68 +221,22 @@ int main() struct gsm_subscriber *alice_db; char *alice_imsi = "3243245432345"; - alice = db_create_subscriber(alice_imsi); + alice = db_create_subscriber(alice_imsi, GSM_MIN_EXTEN, GSM_MAX_EXTEN, + true); db_sync_subscriber(alice); alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice->imsi); COMPARE(alice, alice_db); SUBSCR_PUT(alice_db); SUBSCR_PUT(alice); - alice_imsi = "3693245423445"; - alice = db_create_subscriber(alice_imsi); - db_subscriber_assoc_imei(alice, "1234567890"); - db_subscriber_alloc_tmsi(alice); - alice->lac=42; - db_sync_subscriber(alice); - /* Get by TMSI */ - snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by IMSI */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice_imsi); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by id */ - snprintf(scratch_str, sizeof(scratch_str), "%llu", alice->id); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_ID, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by extension */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - SUBSCR_PUT(alice); - - alice_imsi = "9993245423445"; - alice = db_create_subscriber(alice_imsi); - db_subscriber_alloc_tmsi(alice); - alice->lac=42; - db_sync_subscriber(alice); - db_subscriber_assoc_imei(alice, "1234567890"); - db_subscriber_assoc_imei(alice, "6543560920"); - /* Get by TMSI */ - snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by IMSI */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice_imsi); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by id */ - snprintf(scratch_str, sizeof(scratch_str), "%llu", alice->id); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_ID, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by extension */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - SUBSCR_PUT(alice); + test_subs("3693245423445", "1234567890", NULL, true); + test_subs("9993245423445", "1234567890", "6543560920", true); + test_subs("3123122223445", "1234567890", NULL, false); + test_subs("9123121223445", "1234567890", "6543560920", false); /* create it again and see it fails */ - alice = db_create_subscriber(alice_imsi); + alice = db_create_subscriber(alice_imsi, GSM_MIN_EXTEN, GSM_MAX_EXTEN, + true); OSMO_ASSERT(!alice); test_sms(); diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index c088855..6c49a03 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -408,11 +408,13 @@ class TestVTYNITB(TestVTYGenericBSC): self.vty.enable() imsi = "204300854013739" + imsi2 = "204300854013769" wrong_imsi = "204300999999999" # Lets create one res = self.vty.command('subscriber create imsi '+imsi) self.assert_(res.find(" IMSI: "+imsi) > 0) + self.assert_(res.find("Extension") > 0) self.vty.verify('subscriber imsi '+wrong_imsi+' name wrong', ['% No subscriber found for imsi '+wrong_imsi]) res = self.vty.command('subscriber imsi '+imsi+' name '+('X' * 160)) @@ -426,9 +428,21 @@ class TestVTYNITB(TestVTYGenericBSC): self.vty.verify('subscriber imsi '+imsi+' extension '+('1' * 14), ['']) + # Another one - without extension + self.vty.command("configure terminal") + self.vty.command("nitb") + self.vty.command("subscriber-create-on-demand no-extension") + self.vty.command("end") + + res = self.vty.command('subscriber create imsi ' + imsi2) + self.assert_(res.find(" IMSI: " + imsi2) > 0) + self.assertEquals(res.find("Extension"), -1) + # Delete it res = self.vty.command('subscriber delete imsi '+imsi) self.assert_(res != "") + res = self.vty.command('subscriber delete imsi ' + imsi2) + self.assert_(res != "") def testShowPagingGroup(self): res = self.vty.command("show paging-group 255 1234567") -- 2.8.1 From nhofmeyr at sysmocom.de Mon May 2 17:06:17 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Mon, 2 May 2016 19:06:17 +0200 Subject: test-ranap failures In-Reply-To: <20160502130849.GG1619@nataraja> References: <20160502125333.GB2646@ass40.sysmocom.de> <20160502130849.GG1619@nataraja> Message-ID: <20160502170617.GC2646@ass40.sysmocom.de> On Mon, May 02, 2016 at 03:08:49PM +0200, Harald Welte wrote: > why git changed the author information, that's clearly not my intention. np :) > > I'm not sure how this reversal came to be in test-ranap.ok. All I know is it > > works in master's HEAD, but not in 14da5411a4fbe05eccff5b4f0. > > do you know in which part of the message the byte reversal is happening? Checked just now, it appears to be the RANAP_UserPlaneMode_transparent_mode value in first.userPlaneInformation of RANAP_ProtocolIE_ID_id_RAB_SetupOrModifyItem. > did you actually check on your system tu build + run test-ranap in both > master and the 14da5411a4fbe05eccff5b4f0 commit? I rebuilt several commits separately and traced the test failures and test-ranap.ok commits like that. The test failure output in my previous mail is from test runs built on detached-heads of the commits I mentioned. On master there was only the missing free error, on 14da5411a4fbe0 there were both the missing free and the reversed bytes, while its parent f764a15c2339 has only the reversal. > I suspect the difference is actually related to the fact that I switched > to an updated/fixed libasn1c in between, something that's unfortunately > not visible in the git changelog of osmo-iuh.git :/ That would explain it at least :) ~Neels -- - Neels Hofmeyr http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Gesch?ftsf?hrer / Managing Directors: Holger Freyther, Harald Welte -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From msuraev at sysmocom.de Mon May 2 17:16:06 2016 From: msuraev at sysmocom.de (msuraev at sysmocom.de) Date: Mon, 2 May 2016 19:16:06 +0200 Subject: [PATCH] Make random MSISDN assignment optional Message-ID: <1462209366-12110-1-git-send-email-msuraev@sysmocom.de> From: Max Previously if subscriber was automatically created it got assigned random MSISDN number between 20000 and 49999. Make it optional (defaulting to previous behavior) by adding following: * optional "no-extension" argument to subscriber-create-on-demand * db unit tests * vty test The range for random extension can now be specified with "subscriber-create-on-demand random" command. Note: using the db made with new code might result in subscribers with empty extension. Such subscribers cannot be deleted using old code. Make sure not to mix db versions or manually fix it by editing sqlite with external program. Fixes: OS#1658 --- openbsc/include/openbsc/db.h | 8 ++- openbsc/include/openbsc/gsm_data.h | 8 +++ openbsc/include/openbsc/gsm_subscriber.h | 5 +- openbsc/src/libbsc/net_init.c | 5 +- openbsc/src/libcommon/gsm_subscriber_base.c | 1 + openbsc/src/libmsc/ctrl_commands.c | 9 ++- openbsc/src/libmsc/db.c | 37 +++++++---- openbsc/src/libmsc/gsm_04_08.c | 12 +++- openbsc/src/libmsc/gsm_subscriber.c | 6 +- openbsc/src/libmsc/vty_interface_layer3.c | 51 +++++++++++++-- openbsc/tests/db/db_test.c | 99 +++++++++++++---------------- openbsc/tests/vty_test_runner.py | 14 ++++ 12 files changed, 169 insertions(+), 86 deletions(-) diff --git a/openbsc/include/openbsc/db.h b/openbsc/include/openbsc/db.h index 6699a86..4da9634 100644 --- a/openbsc/include/openbsc/db.h +++ b/openbsc/include/openbsc/db.h @@ -20,6 +20,8 @@ #ifndef _DB_H #define _DB_H +#include + #include "gsm_subscriber.h" struct gsm_equipment; @@ -35,13 +37,15 @@ int db_prepare(void); int db_fini(void); /* subscriber management */ -struct gsm_subscriber *db_create_subscriber(const char *imsi); +struct gsm_subscriber *db_create_subscriber(const char *imsi, uint64_t smin, + uint64_t smax, bool ext); struct gsm_subscriber *db_get_subscriber(enum gsm_subscriber_field field, const char *subscr); int db_sync_subscriber(struct gsm_subscriber *subscriber); int db_subscriber_expire(void *priv, void (*callback)(void *priv, long long unsigned int id)); int db_subscriber_alloc_tmsi(struct gsm_subscriber *subscriber); -int db_subscriber_alloc_exten(struct gsm_subscriber *subscriber); +int db_subscriber_alloc_exten(struct gsm_subscriber *subscriber, uint64_t smin, + uint64_t smax); int db_subscriber_alloc_token(struct gsm_subscriber *subscriber, uint32_t* token); int db_subscriber_assoc_imei(struct gsm_subscriber *subscriber, char *imei); int db_subscriber_delete(struct gsm_subscriber *subscriber); diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 6d7aba3..14b002a 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -18,6 +18,12 @@ struct gsm_subscriber_group; #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] +enum gsm_subscr_ext { + GSM_SUBSCR_DONT_CREATE = 0, + GSM_SUBSCR_RANDOM_EXT = 1, + GSM_SUBSCR_NO_EXT = 2 +}; + enum gsm_security_event { GSM_SECURITY_NOAVAIL, GSM_SECURITY_AUTH_FAILED, @@ -283,6 +289,8 @@ struct gsm_network { /* subscriber related features */ int create_subscriber; + uint64_t ext_min; + uint64_t ext_max; struct gsm_subscriber_group *subscr_group; struct gsm_sms_queue *sms_queue; diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h index 7d6c776..5030d65 100644 --- a/openbsc/include/openbsc/gsm_subscriber.h +++ b/openbsc/include/openbsc/gsm_subscriber.h @@ -1,6 +1,8 @@ #ifndef _GSM_SUBSCR_H #define _GSM_SUBSCR_H +#include + #include "gsm_data.h" #include @@ -91,7 +93,8 @@ enum gsm_subscriber_update_reason { struct gsm_subscriber *subscr_get(struct gsm_subscriber *subscr); struct gsm_subscriber *subscr_put(struct gsm_subscriber *subscr); struct gsm_subscriber *subscr_create_subscriber(struct gsm_subscriber_group *sgrp, - const char *imsi); + const char *imsi, uint64_t smin, + uint64_t smax, bool ext); struct gsm_subscriber *subscr_get_by_tmsi(struct gsm_subscriber_group *sgrp, uint32_t tmsi); struct gsm_subscriber *subscr_get_by_imsi(struct gsm_subscriber_group *sgrp, diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c index 568a0b8..a524ead 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -48,7 +48,7 @@ struct gsm_network *gsm_network_init(uint16_t country_code, uint16_t network_cod INIT_LLIST_HEAD(&net->bsc_data->mscs); net->subscr_group->net = net; - net->create_subscriber = 1; + net->create_subscriber = GSM_SUBSCR_RANDOM_EXT; net->country_code = country_code; net->network_code = network_code; @@ -104,7 +104,8 @@ struct gsm_network *gsm_network_init(uint16_t country_code, uint16_t network_cod net->stats.bts.rsl_fail = osmo_counter_alloc("net.bts.rsl_fail"); net->mncc_recv = mncc_recv; - + net->ext_min = GSM_MIN_EXTEN; + net->ext_max = GSM_MAX_EXTEN; gsm_net_update_ctype(net); return net; diff --git a/openbsc/src/libcommon/gsm_subscriber_base.c b/openbsc/src/libcommon/gsm_subscriber_base.c index a455824..5f0a1be 100644 --- a/openbsc/src/libcommon/gsm_subscriber_base.c +++ b/openbsc/src/libcommon/gsm_subscriber_base.c @@ -60,6 +60,7 @@ struct gsm_subscriber *subscr_alloc(void) llist_add_tail(&s->entry, &active_subscribers); s->use_count = 1; s->tmsi = GSM_RESERVED_TMSI; + s->extension[0] = '\0'; INIT_LLIST_HEAD(&s->requests); diff --git a/openbsc/src/libmsc/ctrl_commands.c b/openbsc/src/libmsc/ctrl_commands.c index 9ac39de..44b1ebd 100644 --- a/openbsc/src/libmsc/ctrl_commands.c +++ b/openbsc/src/libmsc/ctrl_commands.c @@ -18,6 +18,9 @@ * along with this program. If not, see . * */ + +#include + #include #include #include @@ -83,6 +86,8 @@ static int set_subscriber_modify(struct ctrl_cmd *cmd, void *data) char *tmp, *imsi, *msisdn, *alg, *ki, *saveptr = NULL; struct gsm_subscriber* subscr; int rc; + bool ext = (GSM_SUBSCR_RANDOM_EXT == net->create_subscriber) ? true : + false; tmp = talloc_strdup(cmd, cmd->value); if (!tmp) @@ -95,7 +100,9 @@ static int set_subscriber_modify(struct ctrl_cmd *cmd, void *data) subscr = subscr_get_by_imsi(net->subscr_group, imsi); if (!subscr) - subscr = subscr_create_subscriber(net->subscr_group, imsi); + subscr = subscr_create_subscriber(net->subscr_group, imsi, + net->ext_min, + net->ext_max, ext); if (!subscr) goto fail; diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c index 267b5ef..1e112cb 100644 --- a/openbsc/src/libmsc/db.c +++ b/openbsc/src/libmsc/db.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -500,7 +501,8 @@ int db_fini(void) return 0; } -struct gsm_subscriber *db_create_subscriber(const char *imsi) +struct gsm_subscriber *db_create_subscriber(const char *imsi, uint64_t smin, + uint64_t smax, bool ext) { dbi_result result; struct gsm_subscriber *subscr; @@ -532,7 +534,8 @@ struct gsm_subscriber *db_create_subscriber(const char *imsi) strncpy(subscr->imsi, imsi, GSM_IMSI_LENGTH-1); dbi_result_free(result); LOGP(DDB, LOGL_INFO, "New Subscriber: ID %llu, IMSI %s\n", subscr->id, subscr->imsi); - db_subscriber_alloc_exten(subscr); + if (ext) + db_subscriber_alloc_exten(subscr, smin, smax); return subscr; } @@ -937,8 +940,11 @@ int db_sync_subscriber(struct gsm_subscriber *subscriber) dbi_conn_quote_string_copy(conn, subscriber->name, &q_name); - dbi_conn_quote_string_copy(conn, - subscriber->extension, &q_extension); + if (subscriber->extension[0] != '\0') + dbi_conn_quote_string_copy(conn, + subscriber->extension, &q_extension); + else + q_extension = strdup("NULL"); if (subscriber->tmsi != GSM_RESERVED_TMSI) { sprintf(tmsi, "%u", subscriber->tmsi); @@ -1043,15 +1049,17 @@ int db_subscriber_delete(struct gsm_subscriber *subscr) } dbi_result_free(result); - result = dbi_conn_queryf(conn, - "DELETE FROM SMS WHERE src_addr=%s OR dest_addr=%s", - subscr->extension, subscr->extension); - if (!result) { - LOGP(DDB, LOGL_ERROR, - "Failed to delete SMS for %llu\n", subscr->id); - return -1; + if (subscr->extension[0] != '\0') { + result = dbi_conn_queryf(conn, + "DELETE FROM SMS WHERE src_addr=%s OR dest_addr=%s", + subscr->extension, subscr->extension); + if (!result) { + LOGP(DDB, LOGL_ERROR, + "Failed to delete SMS for %llu\n", subscr->id); + return -1; + } + dbi_result_free(result); } - dbi_result_free(result); result = dbi_conn_queryf(conn, "DELETE FROM VLR WHERE subscriber_id=%llu", @@ -1231,13 +1239,14 @@ int db_subscriber_alloc_tmsi(struct gsm_subscriber *subscriber) return 0; } -int db_subscriber_alloc_exten(struct gsm_subscriber *subscriber) +int db_subscriber_alloc_exten(struct gsm_subscriber *subscriber, uint64_t smin, + uint64_t smax) { dbi_result result = NULL; uint32_t try; for (;;) { - try = (rand()%(GSM_MAX_EXTEN-GSM_MIN_EXTEN+1)+GSM_MIN_EXTEN); + try = (rand() % (smax - smin + 1) + smin); result = dbi_conn_queryf(conn, "SELECT * FROM Subscriber " "WHERE extension = %i", diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 05cb886..d22db73 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -517,6 +518,8 @@ static int mm_rx_id_resp(struct gsm_subscriber_connection *conn, struct msgb *ms struct gsm_network *net = bts->network; uint8_t mi_type = gh->data[1] & GSM_MI_TYPE_MASK; char mi_string[GSM48_MI_SIZE]; + bool ext = (GSM_SUBSCR_RANDOM_EXT == net->create_subscriber) ? true : + false; gsm48_mi_to_string(mi_string, sizeof(mi_string), &gh->data[1], gh->data[0]); DEBUGP(DMM, "IDENTITY RESPONSE: MI(%s)=%s\n", @@ -532,7 +535,8 @@ static int mm_rx_id_resp(struct gsm_subscriber_connection *conn, struct msgb *ms mi_string); if (!conn->subscr && net->create_subscriber) conn->subscr = subscr_create_subscriber( - net->subscr_group, mi_string); + net->subscr_group, mi_string, + net->ext_min, net->ext_max, ext); } if (!conn->subscr && conn->loc_operation) { gsm0408_loc_upd_rej(conn, bts->network->reject_cause); @@ -593,6 +597,8 @@ static int mm_rx_loc_upd_req(struct gsm_subscriber_connection *conn, struct msgb struct gsm_bts *bts = conn->bts; uint8_t mi_type; char mi_string[GSM48_MI_SIZE]; + bool ext = (GSM_SUBSCR_RANDOM_EXT == bts->network->create_subscriber) ? + true : false; lu = (struct gsm48_loc_upd_req *) gh->data; @@ -643,7 +649,9 @@ static int mm_rx_loc_upd_req(struct gsm_subscriber_connection *conn, struct msgb subscr = subscr_get_by_imsi(bts->network->subscr_group, mi_string); if (!subscr && bts->network->create_subscriber) { subscr = subscr_create_subscriber( - bts->network->subscr_group, mi_string); + bts->network->subscr_group, mi_string, + bts->network->ext_min, bts->network->ext_max, + ext); } if (!subscr) { gsm0408_loc_upd_rej(conn, bts->network->reject_cause); diff --git a/openbsc/src/libmsc/gsm_subscriber.c b/openbsc/src/libmsc/gsm_subscriber.c index 57c10cf..7d62888 100644 --- a/openbsc/src/libmsc/gsm_subscriber.c +++ b/openbsc/src/libmsc/gsm_subscriber.c @@ -203,9 +203,11 @@ void subscr_remove_request(struct subscr_request *request) } struct gsm_subscriber *subscr_create_subscriber(struct gsm_subscriber_group *sgrp, - const char *imsi) + const char *imsi, uint64_t smin, + uint64_t smax, bool ext) { - struct gsm_subscriber *subscr = db_create_subscriber(imsi); + struct gsm_subscriber *subscr = + db_create_subscriber(imsi, smin, smax, ext); if (subscr) subscr->group = sgrp; return subscr; diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 790fedf..51b7258 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -21,6 +21,8 @@ #include #include #include +#include +#include #include #include @@ -235,12 +237,16 @@ DEFUN(subscriber_create, { struct gsm_network *gsmnet = gsmnet_from_vty(vty); struct gsm_subscriber *subscr; + bool ext = (GSM_SUBSCR_RANDOM_EXT == gsmnet->create_subscriber) ? true : + false; subscr = subscr_get_by_imsi(gsmnet->subscr_group, argv[0]); if (subscr) db_sync_subscriber(subscr); else { - subscr = subscr_create_subscriber(gsmnet->subscr_group, argv[0]); + subscr = subscr_create_subscriber(gsmnet->subscr_group, argv[0], + gsmnet->ext_min, + gsmnet->ext_max, ext); if (!subscr) { vty_out(vty, "%% No subscriber created for IMSI %s%s", @@ -1032,11 +1038,33 @@ DEFUN(cfg_nitb, cfg_nitb_cmd, } DEFUN(cfg_nitb_subscr_create, cfg_nitb_subscr_create_cmd, - "subscriber-create-on-demand", - "Make a new record when a subscriber is first seen.\n") + "subscriber-create-on-demand [no-extension]", + "Make a new record when a subscriber is first seen.\n" + "Do not assign random extension when creating subscriber\n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->create_subscriber = 1; + if (argc) + gsmnet->create_subscriber = GSM_SUBSCR_NO_EXT; + else + gsmnet->create_subscriber = GSM_SUBSCR_RANDOM_EXT; + return CMD_SUCCESS; +} + +DEFUN(cfg_nitb_subscr_random, cfg_nitb_subscr_random_cmd, + "subscriber-create-on-demand random <1-99999> <2-99999>", + "Set random parameters for a new record when a subscriber is first seen.\n" + "Set random parameters for a new record when a subscriber is first seen.\n" + "Minimum for subscriber extension\n""Maximum for subscriber extension\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + uint64_t mi = atoi(argv[0]), ma = atoi(argv[1]); + if (mi >= ma) { + vty_out(vty, "Incorrect range: %s >= %s, expected MIN < MAX%s", + argv[0], argv[1], VTY_NEWLINE); + return CMD_WARNING; + } + gsmnet->ext_min = mi; + gsmnet->ext_max = ma; return CMD_SUCCESS; } @@ -1045,7 +1073,7 @@ DEFUN(cfg_nitb_no_subscr_create, cfg_nitb_no_subscr_create_cmd, NO_STR "Make a new record when a subscriber is first seen.\n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->create_subscriber = 0; + gsmnet->create_subscriber = GSM_SUBSCR_DONT_CREATE; return CMD_SUCCESS; } @@ -1070,9 +1098,17 @@ DEFUN(cfg_nitb_no_assign_tmsi, cfg_nitb_no_assign_tmsi_cmd, static int config_write_nitb(struct vty *vty) { struct gsm_network *gsmnet = gsmnet_from_vty(vty); + const char *pref = gsmnet->create_subscriber ? "" : "no ", *post = + (GSM_SUBSCR_NO_EXT == gsmnet->create_subscriber) ? + " no-extension" : ""; + vty_out(vty, "nitb%s", VTY_NEWLINE); - vty_out(vty, " %ssubscriber-create-on-demand%s", - gsmnet->create_subscriber ? "" : "no ", VTY_NEWLINE); + vty_out(vty, " %ssubscriber-create-on-demand%s%s", pref, post, + VTY_NEWLINE); + if (gsmnet->ext_min != GSM_MIN_EXTEN || gsmnet->ext_max != GSM_MAX_EXTEN) + vty_out(vty, "subscriber-create-on-demand random %"PRIu64" %" + PRIu64"%s", gsmnet->ext_min, gsmnet->ext_max, + VTY_NEWLINE); vty_out(vty, " %sassign-tmsi%s", gsmnet->avoid_tmsi ? "no " : "", VTY_NEWLINE); return CMD_SUCCESS; @@ -1127,6 +1163,7 @@ int bsc_vty_init_extra(void) install_element(CONFIG_NODE, &cfg_nitb_cmd); install_node(&nitb_node, config_write_nitb); install_element(NITB_NODE, &cfg_nitb_subscr_create_cmd); + install_element(NITB_NODE, &cfg_nitb_subscr_random_cmd); install_element(NITB_NODE, &cfg_nitb_no_subscr_create_cmd); install_element(NITB_NODE, &cfg_nitb_assign_tmsi_cmd); install_element(NITB_NODE, &cfg_nitb_no_assign_tmsi_cmd); diff --git a/openbsc/tests/db/db_test.c b/openbsc/tests/db/db_test.c index fb159a5..a689789 100644 --- a/openbsc/tests/db/db_test.c +++ b/openbsc/tests/db/db_test.c @@ -28,6 +28,7 @@ #include #include #include +#include #include static struct gsm_network dummy_net; @@ -159,10 +160,44 @@ static void test_sms_migrate(void) subscr_put(rcv_subscr); } -int main() +static void test_subs(const char *alice_imsi, char *imei1, char *imei2, bool ext) { + struct gsm_subscriber *alice = NULL, *alice_db; char scratch_str[256]; + alice = db_create_subscriber(alice_imsi, GSM_MIN_EXTEN, GSM_MAX_EXTEN, + ext); + db_subscriber_assoc_imei(alice, imei1); + if (imei2) + db_subscriber_assoc_imei(alice, imei2); + db_subscriber_alloc_tmsi(alice); + alice->lac=42; + db_sync_subscriber(alice); + /* Get by TMSI */ + snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi); + alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + /* Get by IMSI */ + alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice_imsi); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + /* Get by id */ + snprintf(scratch_str, sizeof(scratch_str), "%llu", alice->id); + alice_db = db_get_subscriber(GSM_SUBSCRIBER_ID, scratch_str); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + /* Get by extension */ + alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); + if (alice_db) { + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + } + SUBSCR_PUT(alice); +} + +int main() +{ printf("Testing subscriber database code.\n"); osmo_init_logging(&log_info); log_set_print_filename(osmo_stderr_target, 0); @@ -186,68 +221,22 @@ int main() struct gsm_subscriber *alice_db; char *alice_imsi = "3243245432345"; - alice = db_create_subscriber(alice_imsi); + alice = db_create_subscriber(alice_imsi, GSM_MIN_EXTEN, GSM_MAX_EXTEN, + true); db_sync_subscriber(alice); alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice->imsi); COMPARE(alice, alice_db); SUBSCR_PUT(alice_db); SUBSCR_PUT(alice); - alice_imsi = "3693245423445"; - alice = db_create_subscriber(alice_imsi); - db_subscriber_assoc_imei(alice, "1234567890"); - db_subscriber_alloc_tmsi(alice); - alice->lac=42; - db_sync_subscriber(alice); - /* Get by TMSI */ - snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by IMSI */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice_imsi); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by id */ - snprintf(scratch_str, sizeof(scratch_str), "%llu", alice->id); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_ID, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by extension */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - SUBSCR_PUT(alice); - - alice_imsi = "9993245423445"; - alice = db_create_subscriber(alice_imsi); - db_subscriber_alloc_tmsi(alice); - alice->lac=42; - db_sync_subscriber(alice); - db_subscriber_assoc_imei(alice, "1234567890"); - db_subscriber_assoc_imei(alice, "6543560920"); - /* Get by TMSI */ - snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by IMSI */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice_imsi); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by id */ - snprintf(scratch_str, sizeof(scratch_str), "%llu", alice->id); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_ID, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by extension */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - SUBSCR_PUT(alice); + test_subs("3693245423445", "1234567890", NULL, true); + test_subs("9993245423445", "1234567890", "6543560920", true); + test_subs("3123122223445", "1234567890", NULL, false); + test_subs("9123121223445", "1234567890", "6543560920", false); /* create it again and see it fails */ - alice = db_create_subscriber(alice_imsi); + alice = db_create_subscriber(alice_imsi, GSM_MIN_EXTEN, GSM_MAX_EXTEN, + true); OSMO_ASSERT(!alice); test_sms(); diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index c088855..6c49a03 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -408,11 +408,13 @@ class TestVTYNITB(TestVTYGenericBSC): self.vty.enable() imsi = "204300854013739" + imsi2 = "204300854013769" wrong_imsi = "204300999999999" # Lets create one res = self.vty.command('subscriber create imsi '+imsi) self.assert_(res.find(" IMSI: "+imsi) > 0) + self.assert_(res.find("Extension") > 0) self.vty.verify('subscriber imsi '+wrong_imsi+' name wrong', ['% No subscriber found for imsi '+wrong_imsi]) res = self.vty.command('subscriber imsi '+imsi+' name '+('X' * 160)) @@ -426,9 +428,21 @@ class TestVTYNITB(TestVTYGenericBSC): self.vty.verify('subscriber imsi '+imsi+' extension '+('1' * 14), ['']) + # Another one - without extension + self.vty.command("configure terminal") + self.vty.command("nitb") + self.vty.command("subscriber-create-on-demand no-extension") + self.vty.command("end") + + res = self.vty.command('subscriber create imsi ' + imsi2) + self.assert_(res.find(" IMSI: " + imsi2) > 0) + self.assertEquals(res.find("Extension"), -1) + # Delete it res = self.vty.command('subscriber delete imsi '+imsi) self.assert_(res != "") + res = self.vty.command('subscriber delete imsi ' + imsi2) + self.assert_(res != "") def testShowPagingGroup(self): res = self.vty.command("show paging-group 255 1234567") -- 2.8.1 From laforge at gnumonks.org Mon May 2 17:39:35 2016 From: laforge at gnumonks.org (Harald Welte) Date: Mon, 2 May 2016 19:39:35 +0200 Subject: [PATCH] Make random MSISDN assignment optional In-Reply-To: <1462209366-12110-1-git-send-email-msuraev@sysmocom.de> References: <1462209366-12110-1-git-send-email-msuraev@sysmocom.de> Message-ID: <20160502173935.GA8476@nataraja> Hi Max, thanks for your patch. On Mon, May 02, 2016 at 07:16:06PM +0200, msuraev at sysmocom.de wrote: > -struct gsm_subscriber *db_create_subscriber(const char *imsi); > +struct gsm_subscriber *db_create_subscriber(const char *imsi, uint64_t smin, > + uint64_t smax, bool ext); I think 'ext' is not very expressive, let's call it 'alloc_ext', 'rand_ext' or something like that, indicating that the argument is about allocation of a random extension number or not. > +enum gsm_subscr_ext { Also here, please use 'gsm_subscr_ext_alloc_policy' to make it more explicit about what it is. > + uint64_t ext_min; > + uint64_t ext_max; pretty large numbers (uint64_t), considering that your VTY code restricts them to five-digit numbers. That's not a problem, it can stay that way, but just something that struck my mind. Maybe it makes sense to allow longer/larger ranges in the VTY? Or is there something in the code restricting it to 5 digits or a low numeric range? Regards, Harald -- - Harald Welte http://laforge.gnumonks.org/ ============================================================================ "Privacy in residential applications is a desirable marketing option." (ETSI EN 300 175-7 Ch. A6) From msuraev at sysmocom.de Tue May 3 08:43:30 2016 From: msuraev at sysmocom.de (msuraev at sysmocom.de) Date: Tue, 3 May 2016 10:43:30 +0200 Subject: [PATCH] Make random MSISDN assignment optional Message-ID: <1462265010-5004-1-git-send-email-msuraev@sysmocom.de> From: Max Previously if subscriber was automatically created it got assigned random MSISDN number between 20000 and 49999. Make it optional (defaulting to previous behavior) by adding following: * optional "no-extension" argument to subscriber-create-on-demand * db unit tests * vty test The range for random extension can now be specified with "subscriber-create-on-demand random" command. Note: using the db made with new code might result in subscribers with empty extension. Such subscribers cannot be deleted using old code. Make sure not to mix db versions or manually fix it by editing sqlite with external program. Fixes: OS#1658 --- openbsc/include/openbsc/db.h | 8 ++- openbsc/include/openbsc/gsm_data.h | 8 +++ openbsc/include/openbsc/gsm_subscriber.h | 5 +- openbsc/src/libbsc/net_init.c | 5 +- openbsc/src/libcommon/gsm_subscriber_base.c | 1 + openbsc/src/libmsc/ctrl_commands.c | 9 ++- openbsc/src/libmsc/db.c | 37 +++++++---- openbsc/src/libmsc/gsm_04_08.c | 12 +++- openbsc/src/libmsc/gsm_subscriber.c | 6 +- openbsc/src/libmsc/vty_interface_layer3.c | 52 +++++++++++++-- openbsc/tests/db/db_test.c | 99 +++++++++++++---------------- openbsc/tests/vty_test_runner.py | 14 ++++ 12 files changed, 170 insertions(+), 86 deletions(-) diff --git a/openbsc/include/openbsc/db.h b/openbsc/include/openbsc/db.h index 6699a86..bb90705 100644 --- a/openbsc/include/openbsc/db.h +++ b/openbsc/include/openbsc/db.h @@ -20,6 +20,8 @@ #ifndef _DB_H #define _DB_H +#include + #include "gsm_subscriber.h" struct gsm_equipment; @@ -35,13 +37,15 @@ int db_prepare(void); int db_fini(void); /* subscriber management */ -struct gsm_subscriber *db_create_subscriber(const char *imsi); +struct gsm_subscriber *db_create_subscriber(const char *imsi, uint64_t smin, + uint64_t smax, bool alloc_exten); struct gsm_subscriber *db_get_subscriber(enum gsm_subscriber_field field, const char *subscr); int db_sync_subscriber(struct gsm_subscriber *subscriber); int db_subscriber_expire(void *priv, void (*callback)(void *priv, long long unsigned int id)); int db_subscriber_alloc_tmsi(struct gsm_subscriber *subscriber); -int db_subscriber_alloc_exten(struct gsm_subscriber *subscriber); +int db_subscriber_alloc_exten(struct gsm_subscriber *subscriber, uint64_t smin, + uint64_t smax); int db_subscriber_alloc_token(struct gsm_subscriber *subscriber, uint32_t* token); int db_subscriber_assoc_imei(struct gsm_subscriber *subscriber, char *imei); int db_subscriber_delete(struct gsm_subscriber *subscriber); diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 6d7aba3..6f94e69 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -18,6 +18,12 @@ struct gsm_subscriber_group; #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] +enum gsm_subscr_ext_alloc_policy { + GSM_SUBSCR_DONT_CREATE = 0, + GSM_SUBSCR_RANDOM_EXT = 1, + GSM_SUBSCR_NO_EXT = 2 +}; + enum gsm_security_event { GSM_SECURITY_NOAVAIL, GSM_SECURITY_AUTH_FAILED, @@ -283,6 +289,8 @@ struct gsm_network { /* subscriber related features */ int create_subscriber; + uint64_t ext_min; + uint64_t ext_max; struct gsm_subscriber_group *subscr_group; struct gsm_sms_queue *sms_queue; diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h index 7d6c776..5030d65 100644 --- a/openbsc/include/openbsc/gsm_subscriber.h +++ b/openbsc/include/openbsc/gsm_subscriber.h @@ -1,6 +1,8 @@ #ifndef _GSM_SUBSCR_H #define _GSM_SUBSCR_H +#include + #include "gsm_data.h" #include @@ -91,7 +93,8 @@ enum gsm_subscriber_update_reason { struct gsm_subscriber *subscr_get(struct gsm_subscriber *subscr); struct gsm_subscriber *subscr_put(struct gsm_subscriber *subscr); struct gsm_subscriber *subscr_create_subscriber(struct gsm_subscriber_group *sgrp, - const char *imsi); + const char *imsi, uint64_t smin, + uint64_t smax, bool ext); struct gsm_subscriber *subscr_get_by_tmsi(struct gsm_subscriber_group *sgrp, uint32_t tmsi); struct gsm_subscriber *subscr_get_by_imsi(struct gsm_subscriber_group *sgrp, diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c index 568a0b8..a524ead 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -48,7 +48,7 @@ struct gsm_network *gsm_network_init(uint16_t country_code, uint16_t network_cod INIT_LLIST_HEAD(&net->bsc_data->mscs); net->subscr_group->net = net; - net->create_subscriber = 1; + net->create_subscriber = GSM_SUBSCR_RANDOM_EXT; net->country_code = country_code; net->network_code = network_code; @@ -104,7 +104,8 @@ struct gsm_network *gsm_network_init(uint16_t country_code, uint16_t network_cod net->stats.bts.rsl_fail = osmo_counter_alloc("net.bts.rsl_fail"); net->mncc_recv = mncc_recv; - + net->ext_min = GSM_MIN_EXTEN; + net->ext_max = GSM_MAX_EXTEN; gsm_net_update_ctype(net); return net; diff --git a/openbsc/src/libcommon/gsm_subscriber_base.c b/openbsc/src/libcommon/gsm_subscriber_base.c index a455824..5f0a1be 100644 --- a/openbsc/src/libcommon/gsm_subscriber_base.c +++ b/openbsc/src/libcommon/gsm_subscriber_base.c @@ -60,6 +60,7 @@ struct gsm_subscriber *subscr_alloc(void) llist_add_tail(&s->entry, &active_subscribers); s->use_count = 1; s->tmsi = GSM_RESERVED_TMSI; + s->extension[0] = '\0'; INIT_LLIST_HEAD(&s->requests); diff --git a/openbsc/src/libmsc/ctrl_commands.c b/openbsc/src/libmsc/ctrl_commands.c index 9ac39de..44b1ebd 100644 --- a/openbsc/src/libmsc/ctrl_commands.c +++ b/openbsc/src/libmsc/ctrl_commands.c @@ -18,6 +18,9 @@ * along with this program. If not, see . * */ + +#include + #include #include #include @@ -83,6 +86,8 @@ static int set_subscriber_modify(struct ctrl_cmd *cmd, void *data) char *tmp, *imsi, *msisdn, *alg, *ki, *saveptr = NULL; struct gsm_subscriber* subscr; int rc; + bool ext = (GSM_SUBSCR_RANDOM_EXT == net->create_subscriber) ? true : + false; tmp = talloc_strdup(cmd, cmd->value); if (!tmp) @@ -95,7 +100,9 @@ static int set_subscriber_modify(struct ctrl_cmd *cmd, void *data) subscr = subscr_get_by_imsi(net->subscr_group, imsi); if (!subscr) - subscr = subscr_create_subscriber(net->subscr_group, imsi); + subscr = subscr_create_subscriber(net->subscr_group, imsi, + net->ext_min, + net->ext_max, ext); if (!subscr) goto fail; diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c index 267b5ef..c2a956d 100644 --- a/openbsc/src/libmsc/db.c +++ b/openbsc/src/libmsc/db.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -500,7 +501,8 @@ int db_fini(void) return 0; } -struct gsm_subscriber *db_create_subscriber(const char *imsi) +struct gsm_subscriber *db_create_subscriber(const char *imsi, uint64_t smin, + uint64_t smax, bool alloc_exten) { dbi_result result; struct gsm_subscriber *subscr; @@ -532,7 +534,8 @@ struct gsm_subscriber *db_create_subscriber(const char *imsi) strncpy(subscr->imsi, imsi, GSM_IMSI_LENGTH-1); dbi_result_free(result); LOGP(DDB, LOGL_INFO, "New Subscriber: ID %llu, IMSI %s\n", subscr->id, subscr->imsi); - db_subscriber_alloc_exten(subscr); + if (alloc_exten) + db_subscriber_alloc_exten(subscr, smin, smax); return subscr; } @@ -937,8 +940,11 @@ int db_sync_subscriber(struct gsm_subscriber *subscriber) dbi_conn_quote_string_copy(conn, subscriber->name, &q_name); - dbi_conn_quote_string_copy(conn, - subscriber->extension, &q_extension); + if (subscriber->extension[0] != '\0') + dbi_conn_quote_string_copy(conn, + subscriber->extension, &q_extension); + else + q_extension = strdup("NULL"); if (subscriber->tmsi != GSM_RESERVED_TMSI) { sprintf(tmsi, "%u", subscriber->tmsi); @@ -1043,15 +1049,17 @@ int db_subscriber_delete(struct gsm_subscriber *subscr) } dbi_result_free(result); - result = dbi_conn_queryf(conn, - "DELETE FROM SMS WHERE src_addr=%s OR dest_addr=%s", - subscr->extension, subscr->extension); - if (!result) { - LOGP(DDB, LOGL_ERROR, - "Failed to delete SMS for %llu\n", subscr->id); - return -1; + if (subscr->extension[0] != '\0') { + result = dbi_conn_queryf(conn, + "DELETE FROM SMS WHERE src_addr=%s OR dest_addr=%s", + subscr->extension, subscr->extension); + if (!result) { + LOGP(DDB, LOGL_ERROR, + "Failed to delete SMS for %llu\n", subscr->id); + return -1; + } + dbi_result_free(result); } - dbi_result_free(result); result = dbi_conn_queryf(conn, "DELETE FROM VLR WHERE subscriber_id=%llu", @@ -1231,13 +1239,14 @@ int db_subscriber_alloc_tmsi(struct gsm_subscriber *subscriber) return 0; } -int db_subscriber_alloc_exten(struct gsm_subscriber *subscriber) +int db_subscriber_alloc_exten(struct gsm_subscriber *subscriber, uint64_t smin, + uint64_t smax) { dbi_result result = NULL; uint32_t try; for (;;) { - try = (rand()%(GSM_MAX_EXTEN-GSM_MIN_EXTEN+1)+GSM_MIN_EXTEN); + try = (rand() % (smax - smin + 1) + smin); result = dbi_conn_queryf(conn, "SELECT * FROM Subscriber " "WHERE extension = %i", diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 05cb886..d22db73 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -517,6 +518,8 @@ static int mm_rx_id_resp(struct gsm_subscriber_connection *conn, struct msgb *ms struct gsm_network *net = bts->network; uint8_t mi_type = gh->data[1] & GSM_MI_TYPE_MASK; char mi_string[GSM48_MI_SIZE]; + bool ext = (GSM_SUBSCR_RANDOM_EXT == net->create_subscriber) ? true : + false; gsm48_mi_to_string(mi_string, sizeof(mi_string), &gh->data[1], gh->data[0]); DEBUGP(DMM, "IDENTITY RESPONSE: MI(%s)=%s\n", @@ -532,7 +535,8 @@ static int mm_rx_id_resp(struct gsm_subscriber_connection *conn, struct msgb *ms mi_string); if (!conn->subscr && net->create_subscriber) conn->subscr = subscr_create_subscriber( - net->subscr_group, mi_string); + net->subscr_group, mi_string, + net->ext_min, net->ext_max, ext); } if (!conn->subscr && conn->loc_operation) { gsm0408_loc_upd_rej(conn, bts->network->reject_cause); @@ -593,6 +597,8 @@ static int mm_rx_loc_upd_req(struct gsm_subscriber_connection *conn, struct msgb struct gsm_bts *bts = conn->bts; uint8_t mi_type; char mi_string[GSM48_MI_SIZE]; + bool ext = (GSM_SUBSCR_RANDOM_EXT == bts->network->create_subscriber) ? + true : false; lu = (struct gsm48_loc_upd_req *) gh->data; @@ -643,7 +649,9 @@ static int mm_rx_loc_upd_req(struct gsm_subscriber_connection *conn, struct msgb subscr = subscr_get_by_imsi(bts->network->subscr_group, mi_string); if (!subscr && bts->network->create_subscriber) { subscr = subscr_create_subscriber( - bts->network->subscr_group, mi_string); + bts->network->subscr_group, mi_string, + bts->network->ext_min, bts->network->ext_max, + ext); } if (!subscr) { gsm0408_loc_upd_rej(conn, bts->network->reject_cause); diff --git a/openbsc/src/libmsc/gsm_subscriber.c b/openbsc/src/libmsc/gsm_subscriber.c index 57c10cf..7d62888 100644 --- a/openbsc/src/libmsc/gsm_subscriber.c +++ b/openbsc/src/libmsc/gsm_subscriber.c @@ -203,9 +203,11 @@ void subscr_remove_request(struct subscr_request *request) } struct gsm_subscriber *subscr_create_subscriber(struct gsm_subscriber_group *sgrp, - const char *imsi) + const char *imsi, uint64_t smin, + uint64_t smax, bool ext) { - struct gsm_subscriber *subscr = db_create_subscriber(imsi); + struct gsm_subscriber *subscr = + db_create_subscriber(imsi, smin, smax, ext); if (subscr) subscr->group = sgrp; return subscr; diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 790fedf..2beb77a 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -21,6 +21,8 @@ #include #include #include +#include +#include #include #include @@ -235,12 +237,16 @@ DEFUN(subscriber_create, { struct gsm_network *gsmnet = gsmnet_from_vty(vty); struct gsm_subscriber *subscr; + bool ext = (GSM_SUBSCR_RANDOM_EXT == gsmnet->create_subscriber) ? true : + false; subscr = subscr_get_by_imsi(gsmnet->subscr_group, argv[0]); if (subscr) db_sync_subscriber(subscr); else { - subscr = subscr_create_subscriber(gsmnet->subscr_group, argv[0]); + subscr = subscr_create_subscriber(gsmnet->subscr_group, argv[0], + gsmnet->ext_min, + gsmnet->ext_max, ext); if (!subscr) { vty_out(vty, "%% No subscriber created for IMSI %s%s", @@ -1032,11 +1038,34 @@ DEFUN(cfg_nitb, cfg_nitb_cmd, } DEFUN(cfg_nitb_subscr_create, cfg_nitb_subscr_create_cmd, - "subscriber-create-on-demand", - "Make a new record when a subscriber is first seen.\n") + "subscriber-create-on-demand [no-extension]", + "Make a new record when a subscriber is first seen.\n" + "Do not assign random extension when creating subscriber\n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->create_subscriber = 1; + if (argc) + gsmnet->create_subscriber = GSM_SUBSCR_NO_EXT; + else + gsmnet->create_subscriber = GSM_SUBSCR_RANDOM_EXT; + return CMD_SUCCESS; +} + +DEFUN(cfg_nitb_subscr_random, cfg_nitb_subscr_random_cmd, + "subscriber-create-on-demand random <1-999999999999999> " + "<2-999999999999999>", + "Set random parameters for a new record when a subscriber is first seen.\n" + "Set random parameters for a new record when a subscriber is first seen.\n" + "Minimum for subscriber extension\n""Maximum for subscriber extension\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + uint64_t mi = atoi(argv[0]), ma = atoi(argv[1]); + if (mi >= ma) { + vty_out(vty, "Incorrect range: %s >= %s, expected MIN < MAX%s", + argv[0], argv[1], VTY_NEWLINE); + return CMD_WARNING; + } + gsmnet->ext_min = mi; + gsmnet->ext_max = ma; return CMD_SUCCESS; } @@ -1045,7 +1074,7 @@ DEFUN(cfg_nitb_no_subscr_create, cfg_nitb_no_subscr_create_cmd, NO_STR "Make a new record when a subscriber is first seen.\n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->create_subscriber = 0; + gsmnet->create_subscriber = GSM_SUBSCR_DONT_CREATE; return CMD_SUCCESS; } @@ -1070,9 +1099,17 @@ DEFUN(cfg_nitb_no_assign_tmsi, cfg_nitb_no_assign_tmsi_cmd, static int config_write_nitb(struct vty *vty) { struct gsm_network *gsmnet = gsmnet_from_vty(vty); + const char *pref = gsmnet->create_subscriber ? "" : "no ", *post = + (GSM_SUBSCR_NO_EXT == gsmnet->create_subscriber) ? + " no-extension" : ""; + vty_out(vty, "nitb%s", VTY_NEWLINE); - vty_out(vty, " %ssubscriber-create-on-demand%s", - gsmnet->create_subscriber ? "" : "no ", VTY_NEWLINE); + vty_out(vty, " %ssubscriber-create-on-demand%s%s", pref, post, + VTY_NEWLINE); + if (gsmnet->ext_min != GSM_MIN_EXTEN || gsmnet->ext_max != GSM_MAX_EXTEN) + vty_out(vty, "subscriber-create-on-demand random %"PRIu64" %" + PRIu64"%s", gsmnet->ext_min, gsmnet->ext_max, + VTY_NEWLINE); vty_out(vty, " %sassign-tmsi%s", gsmnet->avoid_tmsi ? "no " : "", VTY_NEWLINE); return CMD_SUCCESS; @@ -1127,6 +1164,7 @@ int bsc_vty_init_extra(void) install_element(CONFIG_NODE, &cfg_nitb_cmd); install_node(&nitb_node, config_write_nitb); install_element(NITB_NODE, &cfg_nitb_subscr_create_cmd); + install_element(NITB_NODE, &cfg_nitb_subscr_random_cmd); install_element(NITB_NODE, &cfg_nitb_no_subscr_create_cmd); install_element(NITB_NODE, &cfg_nitb_assign_tmsi_cmd); install_element(NITB_NODE, &cfg_nitb_no_assign_tmsi_cmd); diff --git a/openbsc/tests/db/db_test.c b/openbsc/tests/db/db_test.c index fb159a5..a689789 100644 --- a/openbsc/tests/db/db_test.c +++ b/openbsc/tests/db/db_test.c @@ -28,6 +28,7 @@ #include #include #include +#include #include static struct gsm_network dummy_net; @@ -159,10 +160,44 @@ static void test_sms_migrate(void) subscr_put(rcv_subscr); } -int main() +static void test_subs(const char *alice_imsi, char *imei1, char *imei2, bool ext) { + struct gsm_subscriber *alice = NULL, *alice_db; char scratch_str[256]; + alice = db_create_subscriber(alice_imsi, GSM_MIN_EXTEN, GSM_MAX_EXTEN, + ext); + db_subscriber_assoc_imei(alice, imei1); + if (imei2) + db_subscriber_assoc_imei(alice, imei2); + db_subscriber_alloc_tmsi(alice); + alice->lac=42; + db_sync_subscriber(alice); + /* Get by TMSI */ + snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi); + alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + /* Get by IMSI */ + alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice_imsi); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + /* Get by id */ + snprintf(scratch_str, sizeof(scratch_str), "%llu", alice->id); + alice_db = db_get_subscriber(GSM_SUBSCRIBER_ID, scratch_str); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + /* Get by extension */ + alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); + if (alice_db) { + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + } + SUBSCR_PUT(alice); +} + +int main() +{ printf("Testing subscriber database code.\n"); osmo_init_logging(&log_info); log_set_print_filename(osmo_stderr_target, 0); @@ -186,68 +221,22 @@ int main() struct gsm_subscriber *alice_db; char *alice_imsi = "3243245432345"; - alice = db_create_subscriber(alice_imsi); + alice = db_create_subscriber(alice_imsi, GSM_MIN_EXTEN, GSM_MAX_EXTEN, + true); db_sync_subscriber(alice); alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice->imsi); COMPARE(alice, alice_db); SUBSCR_PUT(alice_db); SUBSCR_PUT(alice); - alice_imsi = "3693245423445"; - alice = db_create_subscriber(alice_imsi); - db_subscriber_assoc_imei(alice, "1234567890"); - db_subscriber_alloc_tmsi(alice); - alice->lac=42; - db_sync_subscriber(alice); - /* Get by TMSI */ - snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by IMSI */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice_imsi); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by id */ - snprintf(scratch_str, sizeof(scratch_str), "%llu", alice->id); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_ID, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by extension */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - SUBSCR_PUT(alice); - - alice_imsi = "9993245423445"; - alice = db_create_subscriber(alice_imsi); - db_subscriber_alloc_tmsi(alice); - alice->lac=42; - db_sync_subscriber(alice); - db_subscriber_assoc_imei(alice, "1234567890"); - db_subscriber_assoc_imei(alice, "6543560920"); - /* Get by TMSI */ - snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by IMSI */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice_imsi); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by id */ - snprintf(scratch_str, sizeof(scratch_str), "%llu", alice->id); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_ID, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by extension */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - SUBSCR_PUT(alice); + test_subs("3693245423445", "1234567890", NULL, true); + test_subs("9993245423445", "1234567890", "6543560920", true); + test_subs("3123122223445", "1234567890", NULL, false); + test_subs("9123121223445", "1234567890", "6543560920", false); /* create it again and see it fails */ - alice = db_create_subscriber(alice_imsi); + alice = db_create_subscriber(alice_imsi, GSM_MIN_EXTEN, GSM_MAX_EXTEN, + true); OSMO_ASSERT(!alice); test_sms(); diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index c088855..6c49a03 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -408,11 +408,13 @@ class TestVTYNITB(TestVTYGenericBSC): self.vty.enable() imsi = "204300854013739" + imsi2 = "204300854013769" wrong_imsi = "204300999999999" # Lets create one res = self.vty.command('subscriber create imsi '+imsi) self.assert_(res.find(" IMSI: "+imsi) > 0) + self.assert_(res.find("Extension") > 0) self.vty.verify('subscriber imsi '+wrong_imsi+' name wrong', ['% No subscriber found for imsi '+wrong_imsi]) res = self.vty.command('subscriber imsi '+imsi+' name '+('X' * 160)) @@ -426,9 +428,21 @@ class TestVTYNITB(TestVTYGenericBSC): self.vty.verify('subscriber imsi '+imsi+' extension '+('1' * 14), ['']) + # Another one - without extension + self.vty.command("configure terminal") + self.vty.command("nitb") + self.vty.command("subscriber-create-on-demand no-extension") + self.vty.command("end") + + res = self.vty.command('subscriber create imsi ' + imsi2) + self.assert_(res.find(" IMSI: " + imsi2) > 0) + self.assertEquals(res.find("Extension"), -1) + # Delete it res = self.vty.command('subscriber delete imsi '+imsi) self.assert_(res != "") + res = self.vty.command('subscriber delete imsi ' + imsi2) + self.assert_(res != "") def testShowPagingGroup(self): res = self.vty.command("show paging-group 255 1234567") -- 2.8.2 From holger at freyther.de Tue May 3 09:05:48 2016 From: holger at freyther.de (Holger Freyther) Date: Tue, 3 May 2016 11:05:48 +0200 Subject: [PATCH] Make random MSISDN assignment optional In-Reply-To: <1462265010-5004-1-git-send-email-msuraev@sysmocom.de> References: <1462265010-5004-1-git-send-email-msuraev@sysmocom.de> Message-ID: <824104C7-1A16-4BEB-A8C7-7834D6496635@freyther.de> > On 03 May 2016, at 10:43, msuraev at sysmocom.de wrote: > > + if (subscriber->extension[0] != '\0') > + dbi_conn_quote_string_copy(conn, > + subscriber->extension, &q_extension); > + else > + q_extension = strdup("NULL"); > > if (subscriber->tmsi != GSM_RESERVED_TMSI) { > sprintf(tmsi, "%u", subscriber->tmsi); > @@ -1043,15 +1049,17 @@ int db_subscriber_delete(struct gsm_subscriber *subscr) > } > dbi_result_free(result); > > - result = dbi_conn_queryf(conn, > - "DELETE FROM SMS WHERE src_addr=%s OR dest_addr=%s", > - subscr->extension, subscr->extension); > - if (!result) { > - LOGP(DDB, LOGL_ERROR, > - "Failed to delete SMS for %llu\n", subscr->id); > - return -1; > + if (subscr->extension[0] != '\0') { > + result = dbi_conn_queryf(conn, > + "DELETE FROM SMS WHERE src_addr=%s OR dest_addr=%s", > + subscr->extension, subscr->extension); > + if (!result) { > + LOGP(DDB, LOGL_ERROR, > + "Failed to delete SMS for %llu\n", subscr->id); > + return -1; > + } > + dbi_result_free(result); > } > - dbi_result_free(result); Starts to be less readable, q_extension will leak in the error path as well (and probably leaked before as well). holger From holger at freyther.de Tue May 3 09:06:55 2016 From: holger at freyther.de (Holger Freyther) Date: Tue, 3 May 2016 11:06:55 +0200 Subject: osmo-nitb In-Reply-To: References: <5617D687-30F3-419D-8A8E-9378E33F196F@freyther.de> Message-ID: <13FA98DD-2EA4-446B-8472-0C19999A0F5D@freyther.de> > On 02 May 2016, at 10:24, loay abdelrazek wrote: > > Dear Holger Hi! > > Am a security researcher working at nile university , and we are currently working on developing a signaling IDS so we wanted to simulate first the network and simulate the attacks cool. Can you point me to the public git repository of your project? holger From holger at freyther.de Tue May 3 09:26:42 2016 From: holger at freyther.de (Holger Freyther) Date: Tue, 3 May 2016 11:26:42 +0200 Subject: osmo-nitb In-Reply-To: References: <5617D687-30F3-419D-8A8E-9378E33F196F@freyther.de> <13FA98DD-2EA4-446B-8472-0C19999A0F5D@freyther.de> Message-ID: > On 03 May 2016, at 11:18, loay abdelrazek wrote: > > Dear Holger Hi! > The project is under development yet bec I need to simulate first cases in order to train the algorithms I will use OpenBSC is under development too and yet our sourcecode and intermediate versions are available. If you ask for free help, you should ask yourself what you can provide to the project in return? Anyway, osmo-nitb doesn't have a SIGTRAN/MAP interface. A project like OpenBSC works because people with different interest collaborate and exchange information freely. So please consider making a contribution towards a project like OpenBSC. kind regards holger From msuraev at sysmocom.de Tue May 3 16:43:49 2016 From: msuraev at sysmocom.de (msuraev at sysmocom.de) Date: Tue, 3 May 2016 18:43:49 +0200 Subject: [PATCH 1/5] Use enum for subscriber creation policy Message-ID: <1462293833-29141-1-git-send-email-msuraev@sysmocom.de> From: Max This enables easier expansion of available policies in future. --- openbsc/include/openbsc/gsm_data.h | 5 +++++ openbsc/src/libbsc/net_init.c | 2 +- openbsc/src/libmsc/vty_interface_layer3.c | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 6d7aba3..593a86f 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -18,6 +18,11 @@ struct gsm_subscriber_group; #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] +enum gsm_subscr_ext_alloc_policy { + GSM_SUBSCR_DONT_CREATE = 0, + GSM_SUBSCR_RANDOM_EXT = 1, +}; + enum gsm_security_event { GSM_SECURITY_NOAVAIL, GSM_SECURITY_AUTH_FAILED, diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c index 568a0b8..00a8a9b 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -48,7 +48,7 @@ struct gsm_network *gsm_network_init(uint16_t country_code, uint16_t network_cod INIT_LLIST_HEAD(&net->bsc_data->mscs); net->subscr_group->net = net; - net->create_subscriber = 1; + net->create_subscriber = GSM_SUBSCR_RANDOM_EXT; net->country_code = country_code; net->network_code = network_code; diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 790fedf..4dd0573 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -1036,7 +1036,7 @@ DEFUN(cfg_nitb_subscr_create, cfg_nitb_subscr_create_cmd, "Make a new record when a subscriber is first seen.\n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->create_subscriber = 1; + gsmnet->create_subscriber = GSM_SUBSCR_RANDOM_EXT; return CMD_SUCCESS; } @@ -1045,7 +1045,7 @@ DEFUN(cfg_nitb_no_subscr_create, cfg_nitb_no_subscr_create_cmd, NO_STR "Make a new record when a subscriber is first seen.\n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->create_subscriber = 0; + gsmnet->create_subscriber = GSM_SUBSCR_DONT_CREATE; return CMD_SUCCESS; } -- 2.8.2 From msuraev at sysmocom.de Tue May 3 16:43:51 2016 From: msuraev at sysmocom.de (msuraev at sysmocom.de) Date: Tue, 3 May 2016 18:43:51 +0200 Subject: [PATCH 3/5] Simplify subscriber creation In-Reply-To: <1462293833-29141-1-git-send-email-msuraev@sysmocom.de> References: <1462293833-29141-1-git-send-email-msuraev@sysmocom.de> Message-ID: <1462293833-29141-3-git-send-email-msuraev@sysmocom.de> From: Max Move common code to wrapper function. --- openbsc/src/libmsc/gsm_04_08.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 05cb886..bb1b49a 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -507,6 +507,14 @@ static int mm_tx_identity_req(struct gsm_subscriber_connection *conn, uint8_t id return gsm48_conn_sendmsg(msg, conn, NULL); } +static struct gsm_subscriber *subscr_create(const struct gsm_network *net, + const char *imsi) +{ + if (GSM_SUBSCR_DONT_CREATE == net->create_subscriber) + return NULL; + + return subscr_create_subscriber(net->subscr_group, imsi); +} /* Parse Chapter 9.2.11 Identity Response */ static int mm_rx_id_resp(struct gsm_subscriber_connection *conn, struct msgb *msg) @@ -530,9 +538,8 @@ static int mm_rx_id_resp(struct gsm_subscriber_connection *conn, struct msgb *ms if (!conn->subscr) { conn->subscr = subscr_get_by_imsi(net->subscr_group, mi_string); - if (!conn->subscr && net->create_subscriber) - conn->subscr = subscr_create_subscriber( - net->subscr_group, mi_string); + if (!conn->subscr) + conn->subscr = subscr_create(net, mi_string); } if (!conn->subscr && conn->loc_operation) { gsm0408_loc_upd_rej(conn, bts->network->reject_cause); @@ -641,9 +648,8 @@ static int mm_rx_loc_upd_req(struct gsm_subscriber_connection *conn, struct msgb /* look up subscriber based on IMSI, create if not found */ subscr = subscr_get_by_imsi(bts->network->subscr_group, mi_string); - if (!subscr && bts->network->create_subscriber) { - subscr = subscr_create_subscriber( - bts->network->subscr_group, mi_string); + if (!subscr) { + subscr = subscr_create(bts->network, mi_string); } if (!subscr) { gsm0408_loc_upd_rej(conn, bts->network->reject_cause); -- 2.8.2 From msuraev at sysmocom.de Tue May 3 16:43:52 2016 From: msuraev at sysmocom.de (msuraev at sysmocom.de) Date: Tue, 3 May 2016 18:43:52 +0200 Subject: [PATCH 4/5] Cleanup db tests In-Reply-To: <1462293833-29141-1-git-send-email-msuraev@sysmocom.de> References: <1462293833-29141-1-git-send-email-msuraev@sysmocom.de> Message-ID: <1462293833-29141-4-git-send-email-msuraev@sysmocom.de> From: Max Move copy-pasted code into separate function to make writing more tests easier. --- openbsc/tests/db/db_test.c | 91 +++++++++++++++++++--------------------------- 1 file changed, 37 insertions(+), 54 deletions(-) diff --git a/openbsc/tests/db/db_test.c b/openbsc/tests/db/db_test.c index fb159a5..6b40e84 100644 --- a/openbsc/tests/db/db_test.c +++ b/openbsc/tests/db/db_test.c @@ -159,10 +159,43 @@ static void test_sms_migrate(void) subscr_put(rcv_subscr); } -int main() +static void test_subs(const char *alice_imsi, char *imei1, char *imei2) { - char scratch_str[256]; + struct gsm_subscriber *alice = NULL, *alice_db; + char scratch_str[256]; + alice = db_create_subscriber(alice_imsi); + db_subscriber_assoc_imei(alice, imei1); + if (imei2) + db_subscriber_assoc_imei(alice, imei2); + db_subscriber_alloc_tmsi(alice); + alice->lac=42; + db_sync_subscriber(alice); + /* Get by TMSI */ + snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi); + alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + /* Get by IMSI */ + alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice_imsi); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + /* Get by id */ + snprintf(scratch_str, sizeof(scratch_str), "%llu", alice->id); + alice_db = db_get_subscriber(GSM_SUBSCRIBER_ID, scratch_str); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + /* Get by extension */ + alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); + if (alice_db) { + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + } + SUBSCR_PUT(alice); +} + +int main() +{ printf("Testing subscriber database code.\n"); osmo_init_logging(&log_info); log_set_print_filename(osmo_stderr_target, 0); @@ -193,58 +226,8 @@ int main() SUBSCR_PUT(alice_db); SUBSCR_PUT(alice); - alice_imsi = "3693245423445"; - alice = db_create_subscriber(alice_imsi); - db_subscriber_assoc_imei(alice, "1234567890"); - db_subscriber_alloc_tmsi(alice); - alice->lac=42; - db_sync_subscriber(alice); - /* Get by TMSI */ - snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by IMSI */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice_imsi); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by id */ - snprintf(scratch_str, sizeof(scratch_str), "%llu", alice->id); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_ID, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by extension */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - SUBSCR_PUT(alice); - - alice_imsi = "9993245423445"; - alice = db_create_subscriber(alice_imsi); - db_subscriber_alloc_tmsi(alice); - alice->lac=42; - db_sync_subscriber(alice); - db_subscriber_assoc_imei(alice, "1234567890"); - db_subscriber_assoc_imei(alice, "6543560920"); - /* Get by TMSI */ - snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by IMSI */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice_imsi); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by id */ - snprintf(scratch_str, sizeof(scratch_str), "%llu", alice->id); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_ID, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by extension */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - SUBSCR_PUT(alice); + test_subs("3693245423445", "1234567890", NULL); + test_subs("9993245423445", "1234567890", "6543560920"); /* create it again and see it fails */ alice = db_create_subscriber(alice_imsi); -- 2.8.2 From msuraev at sysmocom.de Tue May 3 16:43:53 2016 From: msuraev at sysmocom.de (msuraev at sysmocom.de) Date: Tue, 3 May 2016 18:43:53 +0200 Subject: [PATCH 5/5] Add IMSI-prefix authorization policy In-Reply-To: <1462293833-29141-1-git-send-email-msuraev@sysmocom.de> References: <1462293833-29141-1-git-send-email-msuraev@sysmocom.de> Message-ID: <1462293833-29141-5-git-send-email-msuraev@sysmocom.de> From: Max * extend "auth policy" vty command with new option "prefix" * add vty command "authorize-prefix" for setting arbitrary prefix * add basic vty test * add optional "imsi-prefix" argument to subscriber-create-on-demand vty command With those in place we can now set the prefix against which MS's IMSI will be checked. If IMSI's prefix match our configuration than MS is allowed to access the network. If subscriber is already marked as authorized in HLR than it'll be allowed regardless of IMSI prefix. The same way we can decide whether to create subscribers on-demand basesd on IMSI prefix match. Note: this is NITB option, not to be confused with SGSN option with the same name. Fixes: OS#1647 --- openbsc/include/openbsc/gprs_sgsn.h | 1 - openbsc/include/openbsc/gsm_data.h | 5 +++++ openbsc/include/openbsc/gsm_subscriber.h | 1 - openbsc/src/libbsc/bsc_vty.c | 27 ++++++++++++++++++++++++--- openbsc/src/libbsc/net_init.c | 1 + openbsc/src/libcommon/gsm_data.c | 1 + openbsc/src/libmsc/gsm_04_08.c | 21 +++++++++++++++++++-- openbsc/src/libmsc/vty_interface_layer3.c | 16 ++++++++++++---- openbsc/tests/vty_test_runner.py | 13 +++++++++++++ 9 files changed, 75 insertions(+), 11 deletions(-) diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h index 49d5407..bf18ea1 100644 --- a/openbsc/include/openbsc/gprs_sgsn.h +++ b/openbsc/include/openbsc/gprs_sgsn.h @@ -12,7 +12,6 @@ #include -#define GSM_IMSI_LENGTH 17 #define GSM_IMEI_LENGTH 17 #define GSM_EXTENSION_LENGTH 15 #define GSM_APN_LENGTH 102 diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 593a86f..4844412 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -8,6 +8,8 @@ #include +#define GSM_IMSI_LENGTH 17 + /** annotations for msgb ownership */ #define __uses @@ -21,6 +23,7 @@ struct gsm_subscriber_group; enum gsm_subscr_ext_alloc_policy { GSM_SUBSCR_DONT_CREATE = 0, GSM_SUBSCR_RANDOM_EXT = 1, + GSM_SUBSCR_MATCH_PREF = 2, }; enum gsm_security_event { @@ -206,6 +209,7 @@ enum gsm_auth_policy { GSM_AUTH_POLICY_CLOSED, /* only subscribers authorized in DB */ GSM_AUTH_POLICY_ACCEPT_ALL, /* accept everyone, even if not authorized in DB */ GSM_AUTH_POLICY_TOKEN, /* accept first, send token per sms, then revoke authorization */ + GSM_AUTH_POLICY_PREFIX, /* accept IMSIs with a given prefix */ }; #define GSM_T3101_DEFAULT 10 @@ -220,6 +224,7 @@ struct gsm_network { char *name_long; char *name_short; enum gsm_auth_policy auth_policy; + char auth_prefix[GSM_IMSI_LENGTH]; enum gsm48_reject_value reject_cause; int a5_encryption; int neci; diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h index 7d6c776..7108bff 100644 --- a/openbsc/include/openbsc/gsm_subscriber.h +++ b/openbsc/include/openbsc/gsm_subscriber.h @@ -5,7 +5,6 @@ #include #define GSM_IMEI_LENGTH 17 -#define GSM_IMSI_LENGTH 17 #define GSM_NAME_LENGTH 160 #define GSM_EXTENSION_LENGTH 15 /* MSISDN can only be 15 digits length */ diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index b928738..dfcca24 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -189,8 +189,11 @@ static void net_dump_vty(struct vty *vty, struct gsm_network *net) net->name_long, VTY_NEWLINE); vty_out(vty, " Short network name: '%s'%s", net->name_short, VTY_NEWLINE); - vty_out(vty, " Authentication policy: %s%s", - gsm_auth_policy_name(net->auth_policy), VTY_NEWLINE); + vty_out(vty, " Authentication policy: %s", + gsm_auth_policy_name(net->auth_policy)); + if (net->auth_prefix[0] != '\0') + vty_out(vty, ", authorized prefix: %s", net->auth_prefix); + vty_out(vty, "%s", VTY_NEWLINE); vty_out(vty, " Location updating reject cause: %u%s", net->reject_cause, VTY_NEWLINE); vty_out(vty, " Encryption: A5/%u%s", net->a5_encryption, @@ -776,6 +779,8 @@ static int config_write_net(struct vty *vty) vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE); vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE); vty_out(vty, " auth policy %s%s", gsm_auth_policy_name(gsmnet->auth_policy), VTY_NEWLINE); + if (gsmnet->auth_prefix[0] != '\0') + vty_out(vty, " authorize-prefix %s%s", gsmnet->auth_prefix, VTY_NEWLINE); vty_out(vty, " location updating reject cause %u%s", gsmnet->reject_cause, VTY_NEWLINE); vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); @@ -1384,11 +1389,12 @@ DEFUN(cfg_net_name_long, DEFUN(cfg_net_auth_policy, cfg_net_auth_policy_cmd, - "auth policy (closed|accept-all|token)", + "auth policy (closed|accept-all|prefix|token)", "Authentication (not cryptographic)\n" "Set the GSM network authentication policy\n" "Require the MS to be activated in HLR\n" "Accept all MS, whether in HLR or not\n" + "Use IMSI prefix for authorization decision\n" "Use SMS-token based authentication\n") { enum gsm_auth_policy policy = gsm_auth_policy_parse(argv[0]); @@ -1399,6 +1405,20 @@ DEFUN(cfg_net_auth_policy, return CMD_SUCCESS; } +/* Note: limit on the prefix length is set by internal vty code limitations */ +DEFUN(cfg_net_authorize_prefix, cfg_net_authorize_prefix_cmd, + "authorize-prefix <0-9999999999>", + "Set IMSI prefix which will be used for authorization decision\n" + "PREFIX of IMSIs which are allowed to use the network\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + + strncpy(gsmnet->auth_prefix, argv[0], GSM_IMSI_LENGTH); + gsmnet->auth_prefix[GSM_IMSI_LENGTH - 1] = '\0'; + + return CMD_SUCCESS; +} + DEFUN(cfg_net_reject_cause, cfg_net_reject_cause_cmd, "location updating reject cause <2-111>", @@ -3912,6 +3932,7 @@ int bsc_vty_init(const struct log_info *cat) install_element(GSMNET_NODE, &cfg_net_name_short_cmd); install_element(GSMNET_NODE, &cfg_net_name_long_cmd); install_element(GSMNET_NODE, &cfg_net_auth_policy_cmd); + install_element(GSMNET_NODE, &cfg_net_authorize_prefix_cmd); install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); install_element(GSMNET_NODE, &cfg_net_neci_cmd); diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c index 00a8a9b..ed23f33 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -54,6 +54,7 @@ struct gsm_network *gsm_network_init(uint16_t country_code, uint16_t network_cod net->network_code = network_code; net->num_bts = 0; net->reject_cause = GSM48_REJECT_ROAMING_NOT_ALLOWED; + net->auth_prefix[GSM_IMSI_LENGTH - 1] = '\0'; net->T3101 = GSM_T3101_DEFAULT; net->T3105 = GSM_T3105_DEFAULT; net->T3113 = GSM_T3113_DEFAULT; diff --git a/openbsc/src/libcommon/gsm_data.c b/openbsc/src/libcommon/gsm_data.c index 242c014..4b4be42 100644 --- a/openbsc/src/libcommon/gsm_data.c +++ b/openbsc/src/libcommon/gsm_data.c @@ -161,6 +161,7 @@ static const struct value_string auth_policy_names[] = { { GSM_AUTH_POLICY_CLOSED, "closed" }, { GSM_AUTH_POLICY_ACCEPT_ALL, "accept-all" }, { GSM_AUTH_POLICY_TOKEN, "token" }, + { GSM_AUTH_POLICY_PREFIX, "prefix" }, { 0, NULL } }; diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index bb1b49a..ab950c7 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -244,8 +245,15 @@ int gsm48_secure_channel(struct gsm_subscriber_connection *conn, int key_seq, return -EINVAL; /* not reached */ } +static bool subscr_prefix_check(const char *auth_prefix, const char *imsi) +{ + return (strncmp(imsi, auth_prefix, strnlen(auth_prefix, + GSM_IMSI_LENGTH)) == 0); +} + static int authorize_subscriber(struct gsm_loc_updating_operation *loc, - struct gsm_subscriber *subscriber) + struct gsm_subscriber *subscriber, + const char *auth_prefix) { if (!subscriber) return 0; @@ -261,6 +269,10 @@ static int authorize_subscriber(struct gsm_loc_updating_operation *loc, switch (subscriber->group->net->auth_policy) { case GSM_AUTH_POLICY_CLOSED: return subscriber->authorized; + case GSM_AUTH_POLICY_PREFIX: + if (subscriber->authorized) + return 1; + return subscr_prefix_check(auth_prefix, subscriber->imsi); case GSM_AUTH_POLICY_TOKEN: if (subscriber->authorized) return subscriber->authorized; @@ -366,7 +378,8 @@ static int gsm0408_authorize(struct gsm_subscriber_connection *conn, struct msgb if (!conn->loc_operation) return 0; - if (authorize_subscriber(conn->loc_operation, conn->subscr)) + if (authorize_subscriber(conn->loc_operation, conn->subscr, + conn->bts->network->auth_prefix)) return gsm48_secure_channel(conn, conn->loc_operation->key_seq, _gsm0408_authorize_sec_cb, NULL); @@ -513,6 +526,10 @@ static struct gsm_subscriber *subscr_create(const struct gsm_network *net, if (GSM_SUBSCR_DONT_CREATE == net->create_subscriber) return NULL; + if (net->create_subscriber & GSM_SUBSCR_MATCH_PREF) + if (!subscr_prefix_check(net->auth_prefix, imsi)) + return NULL; + return subscr_create_subscriber(net->subscr_group, imsi); } diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 4dd0573..0ac2e90 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -1032,11 +1032,15 @@ DEFUN(cfg_nitb, cfg_nitb_cmd, } DEFUN(cfg_nitb_subscr_create, cfg_nitb_subscr_create_cmd, - "subscriber-create-on-demand", - "Make a new record when a subscriber is first seen.\n") + "subscriber-create-on-demand [imsi-prefix]", + "Make a new record when a subscriber is first seen.\n" + "Create subscribers only if IMSI matches the prefix specified in " + "authorize-prefix command \n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); gsmnet->create_subscriber = GSM_SUBSCR_RANDOM_EXT; + if (argc) + gsmnet->create_subscriber |= GSM_SUBSCR_MATCH_PREF; return CMD_SUCCESS; } @@ -1070,9 +1074,13 @@ DEFUN(cfg_nitb_no_assign_tmsi, cfg_nitb_no_assign_tmsi_cmd, static int config_write_nitb(struct vty *vty) { struct gsm_network *gsmnet = gsmnet_from_vty(vty); + const char *pref = gsmnet->create_subscriber ? "" : "no ", + *ims = (gsmnet->create_subscriber & GSM_SUBSCR_MATCH_PREF) ? + " imsi-prefix" : ""; + vty_out(vty, "nitb%s", VTY_NEWLINE); - vty_out(vty, " %ssubscriber-create-on-demand%s", - gsmnet->create_subscriber ? "" : "no ", VTY_NEWLINE); + vty_out(vty, " %ssubscriber-create-on-demand%s%s", + pref, ims, VTY_NEWLINE); vty_out(vty, " %sassign-tmsi%s", gsmnet->avoid_tmsi ? "no " : "", VTY_NEWLINE); return CMD_SUCCESS; diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index c088855..88f6be9 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -231,6 +231,19 @@ class TestVTYNITB(TestVTYGenericBSC): self.assertEquals(self.vty.node(), 'config-mncc-int') + def testVtyAuthorization(self): + self.vty.enable() + self.vty.command("configure terminal") + self.vty.command("network") + self.assertTrue(self.vty.verify("auth policy closed", [''])) + self.assertTrue(self.vty.verify("auth policy prefix", [''])) + self.assertTrue(self.vty.verify("authorize-prefix 100500", [''])) + self.vty.command("end") + self.vty.command("configure terminal") + self.vty.command("nitb") + self.assertTrue(self.vty.verify("subscriber-create-on-demand", [''])) + self.assertTrue(self.vty.verify("subscriber-create-on-demand imsi-prefix", [''])) + def testSi2Q(self): self.vty.enable() self.vty.command("configure terminal") -- 2.8.2 From msuraev at sysmocom.de Tue May 3 16:43:50 2016 From: msuraev at sysmocom.de (msuraev at sysmocom.de) Date: Tue, 3 May 2016 18:43:50 +0200 Subject: [PATCH 2/5] Ignore extended test leftovers In-Reply-To: <1462293833-29141-1-git-send-email-msuraev@sysmocom.de> References: <1462293833-29141-1-git-send-email-msuraev@sysmocom.de> Message-ID: <1462293833-29141-2-git-send-email-msuraev@sysmocom.de> From: Max --- openbsc/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbsc/.gitignore b/openbsc/.gitignore index bae3b65..0a2965d 100644 --- a/openbsc/.gitignore +++ b/openbsc/.gitignore @@ -88,7 +88,7 @@ tests/package.m4 tests/testsuite tests/testsuite.log - +gsn_restart src/openbsc.cfg* writtenconfig/ gtphub_restart_count -- 2.8.2 From holger at freyther.de Tue May 3 22:08:56 2016 From: holger at freyther.de (Holger Freyther) Date: Wed, 4 May 2016 00:08:56 +0200 Subject: Gerrit and which project to migrate first? Message-ID: <3234443B-C9EE-4426-BBF3-1185A9C0CBA1@freyther.de> Hi guys, at our wonderful OsmoDevCon 2016 we have decided to give a Gerrit based workflow a try. Right now the components are set-up and we need to figure out where to start, how to integrate and then also how to migrate. URL: https://gerrit.osmocom.org will host our installation of Gerrit. Authentication: It is using the OpenID authentication scheme to register to it. I have found and massaged a redmine plugin to turn our redmine into an OpenID provider[1]. Set-up/ACLs: There is a complex set of rules for ACLs. In terms of user branches it will be the easiest if they are located at "user/*" instead of our current "*" scheme. For a transition period we can continue to allow to push directly into gerrit as well. Registering: https://gerrit.osmocom.org/login, sign-in with your OpenID provider. And then set a username (this will be used for the git log-in). Register additional email addresses and install your ssh key. Projects: I have currently created "osmo-ci" for some CI scripts and Dockerfiles and started to play with it, e.g. using git to manage notifications of this project. Jenkins: http://jenkins.osmocom.org/jenkins/job/osmo-pcpap-gerrit/16/ is an example of a build triggered (and failed and reported as failure) to the Gerrit installation. Tricks: $ git ls-remote gerrit ... 5f3b6b8472a319d8d1184266cf9f80b5dbb709b6 refs/changes/23/23/1 '23' the 'hashed' structure '23' the actual change #23 '1' the first patch so one can use git fetch to fetch the patchset and browse $ ssh -p 29418 zecke at gerrit.osmocom.org gerrit --help Next: We need to pick some projects to start with. I would propose to start with libosmocore and OpenBSC or one of the two. Approach: Regardless of what we start with the approach would be: * Create project on Gerrit * Make current code available to gerrit * Set-up jenkins integration * Remove all but gerrit's push right for this specific repository * Set-up replication What is missing: * Which projects to migrate when * Gerrit / Jenkins integration * Gerrit => git.osmocom.org replication (and github?) * Additional build jobs (with docker). Decision if we * Group set-up if we want fine-grained review per project. I think we can start without. * Create wiki page/documentation sorry, the mail is a bit too long. holger [1] Don't trust it as your general ID provider, but you might prefer using it for gerrit instead of yahoo or canonical. The URL is https://osmocom.org/openid. The heavy lifting is done by a ruby library (which has some DH code.. but I didn't see a configure knob to change the prime.. so probably everyone is using https://openid.net/specs/openid-authentication-2_0.html#pvalue? From msuraev at sysmocom.de Wed May 4 11:01:42 2016 From: msuraev at sysmocom.de (Max) Date: Wed, 4 May 2016 13:01:42 +0200 Subject: [PATCH] Make random MSISDN assignment optional In-Reply-To: <824104C7-1A16-4BEB-A8C7-7834D6496635@freyther.de> References: <1462265010-5004-1-git-send-email-msuraev@sysmocom.de> <824104C7-1A16-4BEB-A8C7-7834D6496635@freyther.de> Message-ID: <5729D696.1050106@sysmocom.de> I did not managed to reproduce memleak by manually triggering db_sync_subscriber with "subscriber id 2 authorized 1" multiple times. When does it happen? Also, what to you suggest to improve readability? I'll send revised version shortly. On 05/03/2016 11:05 AM, Holger Freyther wrote: >> On 03 May 2016, at 10:43, msuraev at sysmocom.de wrote: >> >> + if (subscriber->extension[0] != '\0') >> + dbi_conn_quote_string_copy(conn, >> + subscriber->extension, &q_extension); >> + else >> + q_extension = strdup("NULL"); >> >> if (subscriber->tmsi != GSM_RESERVED_TMSI) { >> sprintf(tmsi, "%u", subscriber->tmsi); >> @@ -1043,15 +1049,17 @@ int db_subscriber_delete(struct gsm_subscriber *subscr) >> } >> dbi_result_free(result); >> >> - result = dbi_conn_queryf(conn, >> - "DELETE FROM SMS WHERE src_addr=%s OR dest_addr=%s", >> - subscr->extension, subscr->extension); >> - if (!result) { >> - LOGP(DDB, LOGL_ERROR, >> - "Failed to delete SMS for %llu\n", subscr->id); >> - return -1; >> + if (subscr->extension[0] != '\0') { >> + result = dbi_conn_queryf(conn, >> + "DELETE FROM SMS WHERE src_addr=%s OR dest_addr=%s", >> + subscr->extension, subscr->extension); >> + if (!result) { >> + LOGP(DDB, LOGL_ERROR, >> + "Failed to delete SMS for %llu\n", subscr->id); >> + return -1; >> + } >> + dbi_result_free(result); >> } >> - dbi_result_free(result); > Starts to be less readable, q_extension will leak in the error path as well (and probably leaked before as well). > > holger -- Max Suraev http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Geschaeftsfuehrer / Managing Directors: Holger Freyther, Harald Welte From msuraev at sysmocom.de Wed May 4 11:02:33 2016 From: msuraev at sysmocom.de (msuraev at sysmocom.de) Date: Wed, 4 May 2016 13:02:33 +0200 Subject: [PATCH 1/6] Use enum for subscriber creation policy Message-ID: <1462359758-11287-1-git-send-email-msuraev@sysmocom.de> From: Max This enables easier expansion of available policies in future. --- openbsc/include/openbsc/gsm_data.h | 5 +++++ openbsc/src/libbsc/net_init.c | 2 +- openbsc/src/libmsc/vty_interface_layer3.c | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 6d7aba3..593a86f 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -18,6 +18,11 @@ struct gsm_subscriber_group; #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] +enum gsm_subscr_ext_alloc_policy { + GSM_SUBSCR_DONT_CREATE = 0, + GSM_SUBSCR_RANDOM_EXT = 1, +}; + enum gsm_security_event { GSM_SECURITY_NOAVAIL, GSM_SECURITY_AUTH_FAILED, diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c index 568a0b8..00a8a9b 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -48,7 +48,7 @@ struct gsm_network *gsm_network_init(uint16_t country_code, uint16_t network_cod INIT_LLIST_HEAD(&net->bsc_data->mscs); net->subscr_group->net = net; - net->create_subscriber = 1; + net->create_subscriber = GSM_SUBSCR_RANDOM_EXT; net->country_code = country_code; net->network_code = network_code; diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 790fedf..4dd0573 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -1036,7 +1036,7 @@ DEFUN(cfg_nitb_subscr_create, cfg_nitb_subscr_create_cmd, "Make a new record when a subscriber is first seen.\n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->create_subscriber = 1; + gsmnet->create_subscriber = GSM_SUBSCR_RANDOM_EXT; return CMD_SUCCESS; } @@ -1045,7 +1045,7 @@ DEFUN(cfg_nitb_no_subscr_create, cfg_nitb_no_subscr_create_cmd, NO_STR "Make a new record when a subscriber is first seen.\n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->create_subscriber = 0; + gsmnet->create_subscriber = GSM_SUBSCR_DONT_CREATE; return CMD_SUCCESS; } -- 2.8.2 From msuraev at sysmocom.de Wed May 4 11:02:38 2016 From: msuraev at sysmocom.de (msuraev at sysmocom.de) Date: Wed, 4 May 2016 13:02:38 +0200 Subject: [PATCH 6/6] Make random MSISDN assignment optional In-Reply-To: <1462359758-11287-1-git-send-email-msuraev@sysmocom.de> References: <1462359758-11287-1-git-send-email-msuraev@sysmocom.de> Message-ID: <1462359758-11287-6-git-send-email-msuraev@sysmocom.de> From: Max Previously if subscriber was automatically created it got assigned random MSISDN number between 20000 and 49999. Make it optional (defaulting to previous behavior) by adding following: * optional "no-extension" argument to subscriber-create-on-demand * db unit tests * vty test The range for random extension can now be specified with "subscriber-create-on-demand random" command. Note: using the db made with new code might result in subscribers with empty extension. Such subscribers cannot be deleted using old code. Make sure not to mix db versions or manually fix it by editing sqlite with external program. Fixes: OS#1658 --- openbsc/include/openbsc/db.h | 8 +++-- openbsc/include/openbsc/gsm_data.h | 3 ++ openbsc/include/openbsc/gsm_subscriber.h | 5 ++- openbsc/src/libbsc/net_init.c | 3 +- openbsc/src/libcommon/gsm_subscriber_base.c | 1 + openbsc/src/libmsc/ctrl_commands.c | 9 ++++- openbsc/src/libmsc/db.c | 37 ++++++++++++-------- openbsc/src/libmsc/gsm_04_08.c | 10 ++++-- openbsc/src/libmsc/gsm_subscriber.c | 6 ++-- openbsc/src/libmsc/vty_interface_layer3.c | 53 ++++++++++++++++++++++++++--- openbsc/tests/db/db_test.c | 18 ++++++---- openbsc/tests/vty_test_runner.py | 49 ++++++++++++++++++++++++++ 12 files changed, 168 insertions(+), 34 deletions(-) diff --git a/openbsc/include/openbsc/db.h b/openbsc/include/openbsc/db.h index 6699a86..bb90705 100644 --- a/openbsc/include/openbsc/db.h +++ b/openbsc/include/openbsc/db.h @@ -20,6 +20,8 @@ #ifndef _DB_H #define _DB_H +#include + #include "gsm_subscriber.h" struct gsm_equipment; @@ -35,13 +37,15 @@ int db_prepare(void); int db_fini(void); /* subscriber management */ -struct gsm_subscriber *db_create_subscriber(const char *imsi); +struct gsm_subscriber *db_create_subscriber(const char *imsi, uint64_t smin, + uint64_t smax, bool alloc_exten); struct gsm_subscriber *db_get_subscriber(enum gsm_subscriber_field field, const char *subscr); int db_sync_subscriber(struct gsm_subscriber *subscriber); int db_subscriber_expire(void *priv, void (*callback)(void *priv, long long unsigned int id)); int db_subscriber_alloc_tmsi(struct gsm_subscriber *subscriber); -int db_subscriber_alloc_exten(struct gsm_subscriber *subscriber); +int db_subscriber_alloc_exten(struct gsm_subscriber *subscriber, uint64_t smin, + uint64_t smax); int db_subscriber_alloc_token(struct gsm_subscriber *subscriber, uint32_t* token); int db_subscriber_assoc_imei(struct gsm_subscriber *subscriber, char *imei); int db_subscriber_delete(struct gsm_subscriber *subscriber); diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 4844412..8fbb26e 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -24,6 +24,7 @@ enum gsm_subscr_ext_alloc_policy { GSM_SUBSCR_DONT_CREATE = 0, GSM_SUBSCR_RANDOM_EXT = 1, GSM_SUBSCR_MATCH_PREF = 2, + GSM_SUBSCR_NO_EXT = 4 }; enum gsm_security_event { @@ -293,6 +294,8 @@ struct gsm_network { /* subscriber related features */ int create_subscriber; + uint64_t ext_min; + uint64_t ext_max; struct gsm_subscriber_group *subscr_group; struct gsm_sms_queue *sms_queue; diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h index 7108bff..3fabb63 100644 --- a/openbsc/include/openbsc/gsm_subscriber.h +++ b/openbsc/include/openbsc/gsm_subscriber.h @@ -1,6 +1,8 @@ #ifndef _GSM_SUBSCR_H #define _GSM_SUBSCR_H +#include + #include "gsm_data.h" #include @@ -90,7 +92,8 @@ enum gsm_subscriber_update_reason { struct gsm_subscriber *subscr_get(struct gsm_subscriber *subscr); struct gsm_subscriber *subscr_put(struct gsm_subscriber *subscr); struct gsm_subscriber *subscr_create_subscriber(struct gsm_subscriber_group *sgrp, - const char *imsi); + const char *imsi, uint64_t smin, + uint64_t smax, bool ext); struct gsm_subscriber *subscr_get_by_tmsi(struct gsm_subscriber_group *sgrp, uint32_t tmsi); struct gsm_subscriber *subscr_get_by_imsi(struct gsm_subscriber_group *sgrp, diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c index ed23f33..9d47698 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -105,7 +105,8 @@ struct gsm_network *gsm_network_init(uint16_t country_code, uint16_t network_cod net->stats.bts.rsl_fail = osmo_counter_alloc("net.bts.rsl_fail"); net->mncc_recv = mncc_recv; - + net->ext_min = GSM_MIN_EXTEN; + net->ext_max = GSM_MAX_EXTEN; gsm_net_update_ctype(net); return net; diff --git a/openbsc/src/libcommon/gsm_subscriber_base.c b/openbsc/src/libcommon/gsm_subscriber_base.c index a455824..5f0a1be 100644 --- a/openbsc/src/libcommon/gsm_subscriber_base.c +++ b/openbsc/src/libcommon/gsm_subscriber_base.c @@ -60,6 +60,7 @@ struct gsm_subscriber *subscr_alloc(void) llist_add_tail(&s->entry, &active_subscribers); s->use_count = 1; s->tmsi = GSM_RESERVED_TMSI; + s->extension[0] = '\0'; INIT_LLIST_HEAD(&s->requests); diff --git a/openbsc/src/libmsc/ctrl_commands.c b/openbsc/src/libmsc/ctrl_commands.c index 9ac39de..3fd8d0b 100644 --- a/openbsc/src/libmsc/ctrl_commands.c +++ b/openbsc/src/libmsc/ctrl_commands.c @@ -18,6 +18,9 @@ * along with this program. If not, see . * */ + +#include + #include #include #include @@ -83,6 +86,8 @@ static int set_subscriber_modify(struct ctrl_cmd *cmd, void *data) char *tmp, *imsi, *msisdn, *alg, *ki, *saveptr = NULL; struct gsm_subscriber* subscr; int rc; + bool ext = (GSM_SUBSCR_RANDOM_EXT & net->create_subscriber) ? true : + false; tmp = talloc_strdup(cmd, cmd->value); if (!tmp) @@ -95,7 +100,9 @@ static int set_subscriber_modify(struct ctrl_cmd *cmd, void *data) subscr = subscr_get_by_imsi(net->subscr_group, imsi); if (!subscr) - subscr = subscr_create_subscriber(net->subscr_group, imsi); + subscr = subscr_create_subscriber(net->subscr_group, imsi, + net->ext_min, + net->ext_max, ext); if (!subscr) goto fail; diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c index 267b5ef..c2a956d 100644 --- a/openbsc/src/libmsc/db.c +++ b/openbsc/src/libmsc/db.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -500,7 +501,8 @@ int db_fini(void) return 0; } -struct gsm_subscriber *db_create_subscriber(const char *imsi) +struct gsm_subscriber *db_create_subscriber(const char *imsi, uint64_t smin, + uint64_t smax, bool alloc_exten) { dbi_result result; struct gsm_subscriber *subscr; @@ -532,7 +534,8 @@ struct gsm_subscriber *db_create_subscriber(const char *imsi) strncpy(subscr->imsi, imsi, GSM_IMSI_LENGTH-1); dbi_result_free(result); LOGP(DDB, LOGL_INFO, "New Subscriber: ID %llu, IMSI %s\n", subscr->id, subscr->imsi); - db_subscriber_alloc_exten(subscr); + if (alloc_exten) + db_subscriber_alloc_exten(subscr, smin, smax); return subscr; } @@ -937,8 +940,11 @@ int db_sync_subscriber(struct gsm_subscriber *subscriber) dbi_conn_quote_string_copy(conn, subscriber->name, &q_name); - dbi_conn_quote_string_copy(conn, - subscriber->extension, &q_extension); + if (subscriber->extension[0] != '\0') + dbi_conn_quote_string_copy(conn, + subscriber->extension, &q_extension); + else + q_extension = strdup("NULL"); if (subscriber->tmsi != GSM_RESERVED_TMSI) { sprintf(tmsi, "%u", subscriber->tmsi); @@ -1043,15 +1049,17 @@ int db_subscriber_delete(struct gsm_subscriber *subscr) } dbi_result_free(result); - result = dbi_conn_queryf(conn, - "DELETE FROM SMS WHERE src_addr=%s OR dest_addr=%s", - subscr->extension, subscr->extension); - if (!result) { - LOGP(DDB, LOGL_ERROR, - "Failed to delete SMS for %llu\n", subscr->id); - return -1; + if (subscr->extension[0] != '\0') { + result = dbi_conn_queryf(conn, + "DELETE FROM SMS WHERE src_addr=%s OR dest_addr=%s", + subscr->extension, subscr->extension); + if (!result) { + LOGP(DDB, LOGL_ERROR, + "Failed to delete SMS for %llu\n", subscr->id); + return -1; + } + dbi_result_free(result); } - dbi_result_free(result); result = dbi_conn_queryf(conn, "DELETE FROM VLR WHERE subscriber_id=%llu", @@ -1231,13 +1239,14 @@ int db_subscriber_alloc_tmsi(struct gsm_subscriber *subscriber) return 0; } -int db_subscriber_alloc_exten(struct gsm_subscriber *subscriber) +int db_subscriber_alloc_exten(struct gsm_subscriber *subscriber, uint64_t smin, + uint64_t smax) { dbi_result result = NULL; uint32_t try; for (;;) { - try = (rand()%(GSM_MAX_EXTEN-GSM_MIN_EXTEN+1)+GSM_MIN_EXTEN); + try = (rand() % (smax - smin + 1) + smin); result = dbi_conn_queryf(conn, "SELECT * FROM Subscriber " "WHERE extension = %i", diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index ab950c7..e498b6a 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -523,14 +523,19 @@ static int mm_tx_identity_req(struct gsm_subscriber_connection *conn, uint8_t id static struct gsm_subscriber *subscr_create(const struct gsm_network *net, const char *imsi) { + const char *ap = net->auth_prefix; + bool ext = (GSM_SUBSCR_RANDOM_EXT & net->create_subscriber) ? true : + false; + if (GSM_SUBSCR_DONT_CREATE == net->create_subscriber) return NULL; if (net->create_subscriber & GSM_SUBSCR_MATCH_PREF) - if (!subscr_prefix_check(net->auth_prefix, imsi)) + if (!subscr_prefix_check(ap, imsi)) return NULL; - return subscr_create_subscriber(net->subscr_group, imsi); + return subscr_create_subscriber(net->subscr_group, imsi, net->ext_min, + net->ext_max, ext); } /* Parse Chapter 9.2.11 Identity Response */ @@ -582,7 +587,6 @@ static int mm_rx_id_resp(struct gsm_subscriber_connection *conn, struct msgb *ms return gsm0408_authorize(conn, msg); } - static void loc_upd_rej_cb(void *data) { struct gsm_subscriber_connection *conn = data; diff --git a/openbsc/src/libmsc/gsm_subscriber.c b/openbsc/src/libmsc/gsm_subscriber.c index 57c10cf..7d62888 100644 --- a/openbsc/src/libmsc/gsm_subscriber.c +++ b/openbsc/src/libmsc/gsm_subscriber.c @@ -203,9 +203,11 @@ void subscr_remove_request(struct subscr_request *request) } struct gsm_subscriber *subscr_create_subscriber(struct gsm_subscriber_group *sgrp, - const char *imsi) + const char *imsi, uint64_t smin, + uint64_t smax, bool ext) { - struct gsm_subscriber *subscr = db_create_subscriber(imsi); + struct gsm_subscriber *subscr = + db_create_subscriber(imsi, smin, smax, ext); if (subscr) subscr->group = sgrp; return subscr; diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 0ac2e90..bf7a947 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -21,6 +21,8 @@ #include #include #include +#include +#include #include #include @@ -235,12 +237,16 @@ DEFUN(subscriber_create, { struct gsm_network *gsmnet = gsmnet_from_vty(vty); struct gsm_subscriber *subscr; + bool ext = (GSM_SUBSCR_RANDOM_EXT == gsmnet->create_subscriber) ? true : + false; subscr = subscr_get_by_imsi(gsmnet->subscr_group, argv[0]); if (subscr) db_sync_subscriber(subscr); else { - subscr = subscr_create_subscriber(gsmnet->subscr_group, argv[0]); + subscr = subscr_create_subscriber(gsmnet->subscr_group, argv[0], + gsmnet->ext_min, + gsmnet->ext_max, ext); if (!subscr) { vty_out(vty, "%% No subscriber created for IMSI %s%s", @@ -1031,6 +1037,34 @@ DEFUN(cfg_nitb, cfg_nitb_cmd, return CMD_SUCCESS; } +/* Note: limit on the prefix length is set by internal vty code limitations */ +DEFUN(cfg_nitb_subscr_random, cfg_nitb_subscr_random_cmd, + "subscriber-create-on-demand random <1-9999999999> <2-9999999999>", + "Set random parameters for a new record when a subscriber is first seen.\n" + "Set random parameters for a new record when a subscriber is first seen.\n" + "Minimum for subscriber extension\n""Maximum for subscriber extension\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + uint64_t mi = atoi(argv[0]), ma = atoi(argv[1]); + if (mi >= ma) { + vty_out(vty, "Incorrect range: %s >= %s, expected MIN < MAX%s", + argv[0], argv[1], VTY_NEWLINE); + return CMD_WARNING; + } + gsmnet->ext_min = mi; + gsmnet->ext_max = ma; + return CMD_SUCCESS; +} + +DEFUN(cfg_nitb_subscr_noext, cfg_nitb_subscr_noext_cmd, + "subscriber-create-no-extension", + "Do not assign extension when creating subscriber on demand.\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + gsmnet->create_subscriber |= GSM_SUBSCR_NO_EXT; + return CMD_SUCCESS; +} + DEFUN(cfg_nitb_subscr_create, cfg_nitb_subscr_create_cmd, "subscriber-create-on-demand [imsi-prefix]", "Make a new record when a subscriber is first seen.\n" @@ -1038,9 +1072,11 @@ DEFUN(cfg_nitb_subscr_create, cfg_nitb_subscr_create_cmd, "authorize-prefix command \n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->create_subscriber = GSM_SUBSCR_RANDOM_EXT; + if (!gsmnet->create_subscriber) + gsmnet->create_subscriber = GSM_SUBSCR_RANDOM_EXT; if (argc) gsmnet->create_subscriber |= GSM_SUBSCR_MATCH_PREF; + return CMD_SUCCESS; } @@ -1079,8 +1115,15 @@ static int config_write_nitb(struct vty *vty) " imsi-prefix" : ""; vty_out(vty, "nitb%s", VTY_NEWLINE); - vty_out(vty, " %ssubscriber-create-on-demand%s%s", - pref, ims, VTY_NEWLINE); + vty_out(vty, " %ssubscriber-create-on-demand%s%s", pref, ims, + VTY_NEWLINE); + if (gsmnet->create_subscriber & GSM_SUBSCR_NO_EXT) + vty_out(vty, " subscriber-create-no-extension%s", VTY_NEWLINE); + if (gsmnet->ext_min != GSM_MIN_EXTEN || gsmnet->ext_max != GSM_MAX_EXTEN) + vty_out(vty, " subscriber-create-on-demand random %"PRIu64" %" + PRIu64"%s", gsmnet->ext_min, gsmnet->ext_max, + VTY_NEWLINE); + vty_out(vty, " %sassign-tmsi%s", gsmnet->avoid_tmsi ? "no " : "", VTY_NEWLINE); return CMD_SUCCESS; @@ -1135,6 +1178,8 @@ int bsc_vty_init_extra(void) install_element(CONFIG_NODE, &cfg_nitb_cmd); install_node(&nitb_node, config_write_nitb); install_element(NITB_NODE, &cfg_nitb_subscr_create_cmd); + install_element(NITB_NODE, &cfg_nitb_subscr_noext_cmd); + install_element(NITB_NODE, &cfg_nitb_subscr_random_cmd); install_element(NITB_NODE, &cfg_nitb_no_subscr_create_cmd); install_element(NITB_NODE, &cfg_nitb_assign_tmsi_cmd); install_element(NITB_NODE, &cfg_nitb_no_assign_tmsi_cmd); diff --git a/openbsc/tests/db/db_test.c b/openbsc/tests/db/db_test.c index 6b40e84..1deaf1b 100644 --- a/openbsc/tests/db/db_test.c +++ b/openbsc/tests/db/db_test.c @@ -28,6 +28,7 @@ #include #include #include +#include #include static struct gsm_network dummy_net; @@ -159,12 +160,13 @@ static void test_sms_migrate(void) subscr_put(rcv_subscr); } -static void test_subs(const char *alice_imsi, char *imei1, char *imei2) +static void test_subs(const char *alice_imsi, char *imei1, char *imei2, bool ext) { struct gsm_subscriber *alice = NULL, *alice_db; char scratch_str[256]; - alice = db_create_subscriber(alice_imsi); + alice = db_create_subscriber(alice_imsi, GSM_MIN_EXTEN, GSM_MAX_EXTEN, + ext); db_subscriber_assoc_imei(alice, imei1); if (imei2) db_subscriber_assoc_imei(alice, imei2); @@ -219,18 +221,22 @@ int main() struct gsm_subscriber *alice_db; char *alice_imsi = "3243245432345"; - alice = db_create_subscriber(alice_imsi); + alice = db_create_subscriber(alice_imsi, GSM_MIN_EXTEN, GSM_MAX_EXTEN, + true); db_sync_subscriber(alice); alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice->imsi); COMPARE(alice, alice_db); SUBSCR_PUT(alice_db); SUBSCR_PUT(alice); - test_subs("3693245423445", "1234567890", NULL); - test_subs("9993245423445", "1234567890", "6543560920"); + test_subs("3693245423445", "1234567890", NULL, true); + test_subs("9993245423445", "1234567890", "6543560920", true); + test_subs("3123122223445", "1234567890", NULL, false); + test_subs("9123121223445", "1234567890", "6543560920", false); /* create it again and see it fails */ - alice = db_create_subscriber(alice_imsi); + alice = db_create_subscriber(alice_imsi, GSM_MIN_EXTEN, GSM_MAX_EXTEN, + true); OSMO_ASSERT(!alice); test_sms(); diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index e240811..9dd8103 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -422,11 +422,15 @@ class TestVTYNITB(TestVTYGenericBSC): self.vty.enable() imsi = "204300854013739" + imsi2 = "204301824913769" + imsi3 = "100500854113769" + imsi4 = "100583744053769" wrong_imsi = "204300999999999" # Lets create one res = self.vty.command('subscriber create imsi '+imsi) self.assert_(res.find(" IMSI: "+imsi) > 0) + self.assert_(res.find("Extension") > 0) self.vty.verify('subscriber imsi '+wrong_imsi+' name wrong', ['% No subscriber found for imsi '+wrong_imsi]) res = self.vty.command('subscriber imsi '+imsi+' name '+('X' * 160)) @@ -440,9 +444,54 @@ class TestVTYNITB(TestVTYGenericBSC): self.vty.verify('subscriber imsi '+imsi+' extension '+('1' * 14), ['']) + # With narrow random interval + self.vty.command("configure terminal") + self.vty.command("nitb") + self.assertTrue(self.vty.verify("subscriber-create-on-demand", [''])) + # wrong interval + res = self.vty.command("subscriber-create-on-demand random 221 122") + self.assert_(res.find("122") > 0) + self.assert_(res.find("221") > 0) + # correct interval + self.assertTrue(self.vty.verify("subscriber-create-on-demand random 221 222", [''])) + self.vty.command("end") + + res = self.vty.command('subscriber create imsi ' + imsi2) + self.assert_(res.find(" IMSI: " + imsi2) > 0) + self.assert_(res.find("221") > 0 or res.find("222") > 0) + self.assert_(res.find(" Extension: ") > 0) + + # Without extension + self.vty.command("configure terminal") + self.vty.command("nitb") + self.assertTrue(self.vty.verify("subscriber-create-no-extension", [''])) + self.vty.command("end") + + res = self.vty.command('subscriber create imsi ' + imsi3) + self.assert_(res.find(" IMSI: " + imsi3) > 0) + self.assertEquals(res.find("Extension"), -1) + + # With extension again + self.vty.command("configure terminal") + self.vty.command("nitb") + self.assertTrue(self.vty.verify("no subscriber-create-on-demand", [''])) + self.assertTrue(self.vty.verify("subscriber-create-on-demand", [''])) + self.assertTrue(self.vty.verify("subscriber-create-on-demand random 221 666", [''])) + self.vty.command("end") + + res = self.vty.command('subscriber create imsi ' + imsi4) + self.assert_(res.find(" IMSI: " + imsi4) > 0) + self.assert_(res.find(" Extension: ") > 0) + # Delete it res = self.vty.command('subscriber delete imsi '+imsi) self.assert_(res != "") + res = self.vty.command('subscriber delete imsi ' + imsi2) + self.assert_(res != "") + res = self.vty.command('subscriber delete imsi ' + imsi3) + self.assert_(res != "") + res = self.vty.command('subscriber delete imsi ' + imsi4) + self.assert_(res != "") def testShowPagingGroup(self): res = self.vty.command("show paging-group 255 1234567") -- 2.8.2 From msuraev at sysmocom.de Wed May 4 11:02:34 2016 From: msuraev at sysmocom.de (msuraev at sysmocom.de) Date: Wed, 4 May 2016 13:02:34 +0200 Subject: [PATCH 2/6] Ignore extended test leftovers In-Reply-To: <1462359758-11287-1-git-send-email-msuraev@sysmocom.de> References: <1462359758-11287-1-git-send-email-msuraev@sysmocom.de> Message-ID: <1462359758-11287-2-git-send-email-msuraev@sysmocom.de> From: Max --- openbsc/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbsc/.gitignore b/openbsc/.gitignore index bae3b65..0a2965d 100644 --- a/openbsc/.gitignore +++ b/openbsc/.gitignore @@ -88,7 +88,7 @@ tests/package.m4 tests/testsuite tests/testsuite.log - +gsn_restart src/openbsc.cfg* writtenconfig/ gtphub_restart_count -- 2.8.2 From msuraev at sysmocom.de Wed May 4 11:02:35 2016 From: msuraev at sysmocom.de (msuraev at sysmocom.de) Date: Wed, 4 May 2016 13:02:35 +0200 Subject: [PATCH 3/6] Simplify subscriber creation In-Reply-To: <1462359758-11287-1-git-send-email-msuraev@sysmocom.de> References: <1462359758-11287-1-git-send-email-msuraev@sysmocom.de> Message-ID: <1462359758-11287-3-git-send-email-msuraev@sysmocom.de> From: Max Move common code to wrapper function. --- openbsc/src/libmsc/gsm_04_08.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 05cb886..bb1b49a 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -507,6 +507,14 @@ static int mm_tx_identity_req(struct gsm_subscriber_connection *conn, uint8_t id return gsm48_conn_sendmsg(msg, conn, NULL); } +static struct gsm_subscriber *subscr_create(const struct gsm_network *net, + const char *imsi) +{ + if (GSM_SUBSCR_DONT_CREATE == net->create_subscriber) + return NULL; + + return subscr_create_subscriber(net->subscr_group, imsi); +} /* Parse Chapter 9.2.11 Identity Response */ static int mm_rx_id_resp(struct gsm_subscriber_connection *conn, struct msgb *msg) @@ -530,9 +538,8 @@ static int mm_rx_id_resp(struct gsm_subscriber_connection *conn, struct msgb *ms if (!conn->subscr) { conn->subscr = subscr_get_by_imsi(net->subscr_group, mi_string); - if (!conn->subscr && net->create_subscriber) - conn->subscr = subscr_create_subscriber( - net->subscr_group, mi_string); + if (!conn->subscr) + conn->subscr = subscr_create(net, mi_string); } if (!conn->subscr && conn->loc_operation) { gsm0408_loc_upd_rej(conn, bts->network->reject_cause); @@ -641,9 +648,8 @@ static int mm_rx_loc_upd_req(struct gsm_subscriber_connection *conn, struct msgb /* look up subscriber based on IMSI, create if not found */ subscr = subscr_get_by_imsi(bts->network->subscr_group, mi_string); - if (!subscr && bts->network->create_subscriber) { - subscr = subscr_create_subscriber( - bts->network->subscr_group, mi_string); + if (!subscr) { + subscr = subscr_create(bts->network, mi_string); } if (!subscr) { gsm0408_loc_upd_rej(conn, bts->network->reject_cause); -- 2.8.2 From msuraev at sysmocom.de Wed May 4 11:02:36 2016 From: msuraev at sysmocom.de (msuraev at sysmocom.de) Date: Wed, 4 May 2016 13:02:36 +0200 Subject: [PATCH 4/6] Cleanup db tests In-Reply-To: <1462359758-11287-1-git-send-email-msuraev@sysmocom.de> References: <1462359758-11287-1-git-send-email-msuraev@sysmocom.de> Message-ID: <1462359758-11287-4-git-send-email-msuraev@sysmocom.de> From: Max Move copy-pasted code into separate function to make writing more tests easier. --- openbsc/tests/db/db_test.c | 91 +++++++++++++++++++--------------------------- 1 file changed, 37 insertions(+), 54 deletions(-) diff --git a/openbsc/tests/db/db_test.c b/openbsc/tests/db/db_test.c index fb159a5..6b40e84 100644 --- a/openbsc/tests/db/db_test.c +++ b/openbsc/tests/db/db_test.c @@ -159,10 +159,43 @@ static void test_sms_migrate(void) subscr_put(rcv_subscr); } -int main() +static void test_subs(const char *alice_imsi, char *imei1, char *imei2) { - char scratch_str[256]; + struct gsm_subscriber *alice = NULL, *alice_db; + char scratch_str[256]; + alice = db_create_subscriber(alice_imsi); + db_subscriber_assoc_imei(alice, imei1); + if (imei2) + db_subscriber_assoc_imei(alice, imei2); + db_subscriber_alloc_tmsi(alice); + alice->lac=42; + db_sync_subscriber(alice); + /* Get by TMSI */ + snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi); + alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + /* Get by IMSI */ + alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice_imsi); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + /* Get by id */ + snprintf(scratch_str, sizeof(scratch_str), "%llu", alice->id); + alice_db = db_get_subscriber(GSM_SUBSCRIBER_ID, scratch_str); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + /* Get by extension */ + alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); + if (alice_db) { + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + } + SUBSCR_PUT(alice); +} + +int main() +{ printf("Testing subscriber database code.\n"); osmo_init_logging(&log_info); log_set_print_filename(osmo_stderr_target, 0); @@ -193,58 +226,8 @@ int main() SUBSCR_PUT(alice_db); SUBSCR_PUT(alice); - alice_imsi = "3693245423445"; - alice = db_create_subscriber(alice_imsi); - db_subscriber_assoc_imei(alice, "1234567890"); - db_subscriber_alloc_tmsi(alice); - alice->lac=42; - db_sync_subscriber(alice); - /* Get by TMSI */ - snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by IMSI */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice_imsi); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by id */ - snprintf(scratch_str, sizeof(scratch_str), "%llu", alice->id); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_ID, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by extension */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - SUBSCR_PUT(alice); - - alice_imsi = "9993245423445"; - alice = db_create_subscriber(alice_imsi); - db_subscriber_alloc_tmsi(alice); - alice->lac=42; - db_sync_subscriber(alice); - db_subscriber_assoc_imei(alice, "1234567890"); - db_subscriber_assoc_imei(alice, "6543560920"); - /* Get by TMSI */ - snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by IMSI */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice_imsi); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by id */ - snprintf(scratch_str, sizeof(scratch_str), "%llu", alice->id); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_ID, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by extension */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - SUBSCR_PUT(alice); + test_subs("3693245423445", "1234567890", NULL); + test_subs("9993245423445", "1234567890", "6543560920"); /* create it again and see it fails */ alice = db_create_subscriber(alice_imsi); -- 2.8.2 From msuraev at sysmocom.de Wed May 4 11:02:37 2016 From: msuraev at sysmocom.de (msuraev at sysmocom.de) Date: Wed, 4 May 2016 13:02:37 +0200 Subject: [PATCH 5/6] Add IMSI-prefix authorization policy In-Reply-To: <1462359758-11287-1-git-send-email-msuraev@sysmocom.de> References: <1462359758-11287-1-git-send-email-msuraev@sysmocom.de> Message-ID: <1462359758-11287-5-git-send-email-msuraev@sysmocom.de> From: Max * extend "auth policy" vty command with new option "prefix" * add vty command "authorize-prefix" for setting arbitrary prefix * add basic vty test * add optional "imsi-prefix" argument to subscriber-create-on-demand vty command With those in place we can now set the prefix against which MS's IMSI will be checked. If IMSI's prefix match our configuration than MS is allowed to access the network. If subscriber is already marked as authorized in HLR than it'll be allowed regardless of IMSI prefix. The same way we can decide whether to create subscribers on-demand basesd on IMSI prefix match. Similar to authorization this restriction can be overridden by manually creating subscriber via vty, ctrl interface or directly in HLR. Note: this is NITB option, not to be confused with SGSN option with the same name. Fixes: OS#1647 --- openbsc/include/openbsc/gprs_sgsn.h | 1 - openbsc/include/openbsc/gsm_data.h | 5 +++++ openbsc/include/openbsc/gsm_subscriber.h | 1 - openbsc/src/libbsc/bsc_vty.c | 27 ++++++++++++++++++++++++--- openbsc/src/libbsc/net_init.c | 1 + openbsc/src/libcommon/gsm_data.c | 1 + openbsc/src/libmsc/gsm_04_08.c | 21 +++++++++++++++++++-- openbsc/src/libmsc/vty_interface_layer3.c | 16 ++++++++++++---- openbsc/tests/vty_test_runner.py | 14 ++++++++++++++ 9 files changed, 76 insertions(+), 11 deletions(-) diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h index 49d5407..bf18ea1 100644 --- a/openbsc/include/openbsc/gprs_sgsn.h +++ b/openbsc/include/openbsc/gprs_sgsn.h @@ -12,7 +12,6 @@ #include -#define GSM_IMSI_LENGTH 17 #define GSM_IMEI_LENGTH 17 #define GSM_EXTENSION_LENGTH 15 #define GSM_APN_LENGTH 102 diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 593a86f..4844412 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -8,6 +8,8 @@ #include +#define GSM_IMSI_LENGTH 17 + /** annotations for msgb ownership */ #define __uses @@ -21,6 +23,7 @@ struct gsm_subscriber_group; enum gsm_subscr_ext_alloc_policy { GSM_SUBSCR_DONT_CREATE = 0, GSM_SUBSCR_RANDOM_EXT = 1, + GSM_SUBSCR_MATCH_PREF = 2, }; enum gsm_security_event { @@ -206,6 +209,7 @@ enum gsm_auth_policy { GSM_AUTH_POLICY_CLOSED, /* only subscribers authorized in DB */ GSM_AUTH_POLICY_ACCEPT_ALL, /* accept everyone, even if not authorized in DB */ GSM_AUTH_POLICY_TOKEN, /* accept first, send token per sms, then revoke authorization */ + GSM_AUTH_POLICY_PREFIX, /* accept IMSIs with a given prefix */ }; #define GSM_T3101_DEFAULT 10 @@ -220,6 +224,7 @@ struct gsm_network { char *name_long; char *name_short; enum gsm_auth_policy auth_policy; + char auth_prefix[GSM_IMSI_LENGTH]; enum gsm48_reject_value reject_cause; int a5_encryption; int neci; diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h index 7d6c776..7108bff 100644 --- a/openbsc/include/openbsc/gsm_subscriber.h +++ b/openbsc/include/openbsc/gsm_subscriber.h @@ -5,7 +5,6 @@ #include #define GSM_IMEI_LENGTH 17 -#define GSM_IMSI_LENGTH 17 #define GSM_NAME_LENGTH 160 #define GSM_EXTENSION_LENGTH 15 /* MSISDN can only be 15 digits length */ diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index b928738..dfcca24 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -189,8 +189,11 @@ static void net_dump_vty(struct vty *vty, struct gsm_network *net) net->name_long, VTY_NEWLINE); vty_out(vty, " Short network name: '%s'%s", net->name_short, VTY_NEWLINE); - vty_out(vty, " Authentication policy: %s%s", - gsm_auth_policy_name(net->auth_policy), VTY_NEWLINE); + vty_out(vty, " Authentication policy: %s", + gsm_auth_policy_name(net->auth_policy)); + if (net->auth_prefix[0] != '\0') + vty_out(vty, ", authorized prefix: %s", net->auth_prefix); + vty_out(vty, "%s", VTY_NEWLINE); vty_out(vty, " Location updating reject cause: %u%s", net->reject_cause, VTY_NEWLINE); vty_out(vty, " Encryption: A5/%u%s", net->a5_encryption, @@ -776,6 +779,8 @@ static int config_write_net(struct vty *vty) vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE); vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE); vty_out(vty, " auth policy %s%s", gsm_auth_policy_name(gsmnet->auth_policy), VTY_NEWLINE); + if (gsmnet->auth_prefix[0] != '\0') + vty_out(vty, " authorize-prefix %s%s", gsmnet->auth_prefix, VTY_NEWLINE); vty_out(vty, " location updating reject cause %u%s", gsmnet->reject_cause, VTY_NEWLINE); vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); @@ -1384,11 +1389,12 @@ DEFUN(cfg_net_name_long, DEFUN(cfg_net_auth_policy, cfg_net_auth_policy_cmd, - "auth policy (closed|accept-all|token)", + "auth policy (closed|accept-all|prefix|token)", "Authentication (not cryptographic)\n" "Set the GSM network authentication policy\n" "Require the MS to be activated in HLR\n" "Accept all MS, whether in HLR or not\n" + "Use IMSI prefix for authorization decision\n" "Use SMS-token based authentication\n") { enum gsm_auth_policy policy = gsm_auth_policy_parse(argv[0]); @@ -1399,6 +1405,20 @@ DEFUN(cfg_net_auth_policy, return CMD_SUCCESS; } +/* Note: limit on the prefix length is set by internal vty code limitations */ +DEFUN(cfg_net_authorize_prefix, cfg_net_authorize_prefix_cmd, + "authorize-prefix <0-9999999999>", + "Set IMSI prefix which will be used for authorization decision\n" + "PREFIX of IMSIs which are allowed to use the network\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + + strncpy(gsmnet->auth_prefix, argv[0], GSM_IMSI_LENGTH); + gsmnet->auth_prefix[GSM_IMSI_LENGTH - 1] = '\0'; + + return CMD_SUCCESS; +} + DEFUN(cfg_net_reject_cause, cfg_net_reject_cause_cmd, "location updating reject cause <2-111>", @@ -3912,6 +3932,7 @@ int bsc_vty_init(const struct log_info *cat) install_element(GSMNET_NODE, &cfg_net_name_short_cmd); install_element(GSMNET_NODE, &cfg_net_name_long_cmd); install_element(GSMNET_NODE, &cfg_net_auth_policy_cmd); + install_element(GSMNET_NODE, &cfg_net_authorize_prefix_cmd); install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); install_element(GSMNET_NODE, &cfg_net_neci_cmd); diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c index 00a8a9b..ed23f33 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -54,6 +54,7 @@ struct gsm_network *gsm_network_init(uint16_t country_code, uint16_t network_cod net->network_code = network_code; net->num_bts = 0; net->reject_cause = GSM48_REJECT_ROAMING_NOT_ALLOWED; + net->auth_prefix[GSM_IMSI_LENGTH - 1] = '\0'; net->T3101 = GSM_T3101_DEFAULT; net->T3105 = GSM_T3105_DEFAULT; net->T3113 = GSM_T3113_DEFAULT; diff --git a/openbsc/src/libcommon/gsm_data.c b/openbsc/src/libcommon/gsm_data.c index 242c014..4b4be42 100644 --- a/openbsc/src/libcommon/gsm_data.c +++ b/openbsc/src/libcommon/gsm_data.c @@ -161,6 +161,7 @@ static const struct value_string auth_policy_names[] = { { GSM_AUTH_POLICY_CLOSED, "closed" }, { GSM_AUTH_POLICY_ACCEPT_ALL, "accept-all" }, { GSM_AUTH_POLICY_TOKEN, "token" }, + { GSM_AUTH_POLICY_PREFIX, "prefix" }, { 0, NULL } }; diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index bb1b49a..ab950c7 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -244,8 +245,15 @@ int gsm48_secure_channel(struct gsm_subscriber_connection *conn, int key_seq, return -EINVAL; /* not reached */ } +static bool subscr_prefix_check(const char *auth_prefix, const char *imsi) +{ + return (strncmp(imsi, auth_prefix, strnlen(auth_prefix, + GSM_IMSI_LENGTH)) == 0); +} + static int authorize_subscriber(struct gsm_loc_updating_operation *loc, - struct gsm_subscriber *subscriber) + struct gsm_subscriber *subscriber, + const char *auth_prefix) { if (!subscriber) return 0; @@ -261,6 +269,10 @@ static int authorize_subscriber(struct gsm_loc_updating_operation *loc, switch (subscriber->group->net->auth_policy) { case GSM_AUTH_POLICY_CLOSED: return subscriber->authorized; + case GSM_AUTH_POLICY_PREFIX: + if (subscriber->authorized) + return 1; + return subscr_prefix_check(auth_prefix, subscriber->imsi); case GSM_AUTH_POLICY_TOKEN: if (subscriber->authorized) return subscriber->authorized; @@ -366,7 +378,8 @@ static int gsm0408_authorize(struct gsm_subscriber_connection *conn, struct msgb if (!conn->loc_operation) return 0; - if (authorize_subscriber(conn->loc_operation, conn->subscr)) + if (authorize_subscriber(conn->loc_operation, conn->subscr, + conn->bts->network->auth_prefix)) return gsm48_secure_channel(conn, conn->loc_operation->key_seq, _gsm0408_authorize_sec_cb, NULL); @@ -513,6 +526,10 @@ static struct gsm_subscriber *subscr_create(const struct gsm_network *net, if (GSM_SUBSCR_DONT_CREATE == net->create_subscriber) return NULL; + if (net->create_subscriber & GSM_SUBSCR_MATCH_PREF) + if (!subscr_prefix_check(net->auth_prefix, imsi)) + return NULL; + return subscr_create_subscriber(net->subscr_group, imsi); } diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 4dd0573..0ac2e90 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -1032,11 +1032,15 @@ DEFUN(cfg_nitb, cfg_nitb_cmd, } DEFUN(cfg_nitb_subscr_create, cfg_nitb_subscr_create_cmd, - "subscriber-create-on-demand", - "Make a new record when a subscriber is first seen.\n") + "subscriber-create-on-demand [imsi-prefix]", + "Make a new record when a subscriber is first seen.\n" + "Create subscribers only if IMSI matches the prefix specified in " + "authorize-prefix command \n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); gsmnet->create_subscriber = GSM_SUBSCR_RANDOM_EXT; + if (argc) + gsmnet->create_subscriber |= GSM_SUBSCR_MATCH_PREF; return CMD_SUCCESS; } @@ -1070,9 +1074,13 @@ DEFUN(cfg_nitb_no_assign_tmsi, cfg_nitb_no_assign_tmsi_cmd, static int config_write_nitb(struct vty *vty) { struct gsm_network *gsmnet = gsmnet_from_vty(vty); + const char *pref = gsmnet->create_subscriber ? "" : "no ", + *ims = (gsmnet->create_subscriber & GSM_SUBSCR_MATCH_PREF) ? + " imsi-prefix" : ""; + vty_out(vty, "nitb%s", VTY_NEWLINE); - vty_out(vty, " %ssubscriber-create-on-demand%s", - gsmnet->create_subscriber ? "" : "no ", VTY_NEWLINE); + vty_out(vty, " %ssubscriber-create-on-demand%s%s", + pref, ims, VTY_NEWLINE); vty_out(vty, " %sassign-tmsi%s", gsmnet->avoid_tmsi ? "no " : "", VTY_NEWLINE); return CMD_SUCCESS; diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index c088855..e240811 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -231,6 +231,20 @@ class TestVTYNITB(TestVTYGenericBSC): self.assertEquals(self.vty.node(), 'config-mncc-int') + def testVtyAuthorization(self): + self.vty.enable() + self.vty.command("configure terminal") + self.vty.command("network") + self.assertTrue(self.vty.verify("auth policy closed", [''])) + self.assertTrue(self.vty.verify("auth policy prefix", [''])) + self.assertTrue(self.vty.verify("authorize-prefix 220380", [''])) + self.vty.command("end") + self.vty.command("configure terminal") + self.vty.command("nitb") + self.assertTrue(self.vty.verify("subscriber-create-on-demand", [''])) + self.assertTrue(self.vty.verify("subscriber-create-on-demand imsi-prefix", [''])) + self.vty.command("end") + def testSi2Q(self): self.vty.enable() self.vty.command("configure terminal") -- 2.8.2 From laforge at gnumonks.org Wed May 4 10:15:37 2016 From: laforge at gnumonks.org (Harald Welte) Date: Wed, 4 May 2016 12:15:37 +0200 Subject: Gerrit and which project to migrate first? In-Reply-To: <3234443B-C9EE-4426-BBF3-1185A9C0CBA1@freyther.de> References: <3234443B-C9EE-4426-BBF3-1185A9C0CBA1@freyther.de> Message-ID: <20160504101537.GO22427@nataraja> Hi Holger, thanks for getting this started. On Wed, May 04, 2016 at 12:08:56AM +0200, Holger Freyther wrote: > There is a complex set of rules for ACLs. In terms of user branches it > will be the easiest if they are located at "user/*" instead of our > current "*" scheme. works for me. it can probably be extended to group/* for the fairwaves/sysmocom branches, once there are groups defined with the respective developers? I think it is fair to simply rename the current branches when doing the import. > For a transition period we can continue to allow to push directly into > gerrit as well. Not sure if this has any risks? > https://gerrit.osmocom.org/login, sign-in with your OpenID provider. > And then set a username (this will be used for the git log-in). > Register additional email addresses and install your ssh key. thanks, worked for me. > We need to pick some projects to start with. I would propose to start > with libosmocore and OpenBSC or one of the two. I would say let's do it for all the libraries and openbsc.git at the same time. Often, our changes affect libosmocore and -abis, and it would be odd to submit some changes one way, and some the other way. We might also use it for osmo-bts and osmo-pcu at the same time, for the same reason. I'm more in favor of a "transition once, even if it causes fall out" than a "transition slowly with changes every week/month" approach. So my proposal would be to do all the projects below in one go: * libosmocore.git * libosmo-abis.git * libosmo-netif.git * libsmpp34.git * openbsc.git * osmo-bts.git * osmo-iuh.git * osmo-pcu.git > * Which projects to migrate when see above for my initial proposal > * Additional build jobs (with docker). Decision if we if we? Regards, Harald -- - Harald Welte http://laforge.gnumonks.org/ ============================================================================ "Privacy in residential applications is a desirable marketing option." (ETSI EN 300 175-7 Ch. A6) From holger at freyther.de Wed May 4 12:37:26 2016 From: holger at freyther.de (Holger Freyther) Date: Wed, 4 May 2016 14:37:26 +0200 Subject: openbsc.git branch sysmocom/iu updated. 0.15.0-442-gf3bcdd2 In-Reply-To: <201605041201.u44C1bxf098418@git.osmocom.org> References: <201605041201.u44C1bxf098418@git.osmocom.org> Message-ID: <40A79C41-1B47-471B-93CA-06D0876838ED@freyther.de> > On 04 May 2016, at 14:01, gitosis at osmocom.org wrote: Hi > msc subscr: add paging timeout > > In NITB, the paging timeout would be handled from the BSC side. In IuCS, we > need to invalidate the paging request from libmsc alone, so add a paging timer > to gsm_subscriber. > > Possibly, the HNB-GW should respond with a paging failure and libmsc could > trigger on that, nevertheless libmsc should not rely on a failure message to > expire pending pagings. I don't think this belongs into the gsm_subscriber. If you compare this with the architectural change that removed the "subscriber queue" we are going to repeat the same mistake again. The timeout belongs into the logical "operation" and not the subscriber (the object of the logical operation). cheers holger From holger at freyther.de Wed May 4 18:22:54 2016 From: holger at freyther.de (Holger Freyther) Date: Wed, 4 May 2016 20:22:54 +0200 Subject: Gerrit and which project to migrate first? In-Reply-To: <20160504101537.GO22427@nataraja> References: <3234443B-C9EE-4426-BBF3-1185A9C0CBA1@freyther.de> <20160504101537.GO22427@nataraja> Message-ID: > On 04 May 2016, at 12:15, Harald Welte wrote: > > Hi Holger, > works for me. it can probably be extended to group/* for the > fairwaves/sysmocom branches, once there are groups defined with the > respective developers? I think it is fair to simply rename the current > branches when doing the import. If you go to Projects -> All Projects and then to the "Access" (ACL) you see which bits we can set. Yes, we can easily introduce group/*. The ACL is in the end a text file that is managed with git as well. Yes, but we can keep the old branches around? What is the benefit of renaming (if something points to it?) >> For a transition period we can continue to allow to push directly into >> gerrit as well. > > Not sure if this has any risks? no risk. Maybe the easiest to get used to the system without having to wait for the review. > So my proposal would be to do all the projects below in one go: > * libosmocore.git > * libosmo-abis.git > * libosmo-netif.git > * libsmpp34.git > * openbsc.git > * osmo-bts.git > * osmo-iuh.git > * osmo-pcu.git > >> * Which projects to migrate when > > see above for my initial proposal Okay. Switch by next Monday or is that too quick? > >> * Additional build jobs (with docker). Decision if we > > if we? good point. It got late yesterday. Decision if we run tests on more nodes and if one needs to be in a "trusted" group to benefit from the jenkins integration. But we will have a dedicated build machine anyway.. so if it is abused... harm will be limited. holger From the_toph at outlook.com Wed May 4 20:58:29 2016 From: the_toph at outlook.com (Christopher Trudeau) Date: Wed, 4 May 2016 20:58:29 +0000 Subject: "DLP Failed" and "Disabled RSP" from ipAccess BTS Message-ID: I apologize if this is in the incorrect place or if I am not providing the correct information - First time asking a question about this, rather than just figuring it out, so please go easy [?] After upgrading my completely working copy of OpenBSC to the latest git version, it stopped working and is stating an error of "DLP FAILED" and "DISABLED RSP" and the BTS seems to just reboot. This process repeats over and over. Unfortunately I do not have the version/commit of the one it was previously on, however it was likely from a month or two ago. To troubleshoot that my equipment wasn't at fault, i restored a VMWare snapshot I took before upgrading and it worked perfectly. I also reproduced this exact issue by doing a complete new install of Ubuntu and installing OpenBSC (and installing all of the required components), DLP FAILED + DISABLED RSP. Am I missing anything silly here, or is this a bug? I appreciate any help anyone can offer. Thank you. OpenBSC Debug Output: DB: Database initialized. DB: Database prepared. Thu Apr 28 09:56:37 2016 <001a> input/ipa.c:265 accept()ed new link from 10.210.2.167 to port 3002 Thu Apr 28 09:56:37 2016 <0005> abis_nm.c:316 OC=SITE-MANAGER(00) INST=(ff,ff,ff) STATE CHG: OP_STATE=Disabled AVAIL=Not installed(07) Thu Apr 28 09:56:37 2016 <0005> abis_nm.c:316 OC=BTS(01) INST=(00,ff,ff) STATE CHG: OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked Thu Apr 28 09:56:37 2016 <0005> abis_nm.c:316 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked Thu Apr 28 09:56:37 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,00) STATE CHG: OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked Thu Apr 28 09:56:37 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,01) STATE CHG: OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked Thu Apr 28 09:56:37 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,02) STATE CHG: OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked Thu Apr 28 09:56:37 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,03) STATE CHG: OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked Thu Apr 28 09:56:37 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,04) STATE CHG: OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked Thu Apr 28 09:56:37 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,05) STATE CHG: OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked Thu Apr 28 09:56:37 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,06) STATE CHG: OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked Thu Apr 28 09:56:37 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,07) STATE CHG: OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked Thu Apr 28 09:56:37 2016 <0005> abis_nm.c:316 OC=RADIO-CARRIER(02) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked Thu Apr 28 09:56:37 2016 <0005> abis_nm.c:316 OC=GPRS-NSE(f0) INST=(00,ff,ff) STATE CHG: OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked Thu Apr 28 09:56:37 2016 <0005> abis_nm.c:316 OC=GPRS-CELL(f1) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked Thu Apr 28 09:56:37 2016 <0005> abis_nm.c:316 OC=GPRS-NSVC(f2) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked Thu Apr 28 09:56:37 2016 <0005> abis_nm.c:316 OC=GPRS-NSVC(f2) INST=(00,01,ff) STATE CHG: OP_STATE=Disabled AVAIL=Not installed(07) ADM=Locked Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:451 OC=SITE-MANAGER(00) INST=(ff,ff,ff) SW Activate Request: Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:455 Software Activate Request, ACKing and Activating Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:476 Found SW config: 42 12 00 08 31 32 30 61 30 30 32 00 13 00 0a 76 32 30 30 62 33 30 64 30 00 Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:488 Selected sw description 0 of 1 Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=SITE-MANAGER(00) INST=(ff,ff,ff) STATE CHG: OP_STATE=Enabled AVAIL=OK(ff) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1765 OC=SITE-MANAGER(00) INST=(ff,ff,ff) Sending OPSTART Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=SITE-MANAGER(00) INST=(ff,ff,ff) Software Activated Report Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:451 OC=BTS(01) INST=(00,ff,ff) SW Activate Request: Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:455 Software Activate Request, ACKing and Activating Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:476 Found SW config: 42 12 00 08 31 32 30 61 30 30 32 00 13 00 0a 76 32 30 30 62 33 30 64 30 00 Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:488 Selected sw description 0 of 1 Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:451 OC=GPRS-NSE(f0) INST=(00,ff,ff) SW Activate Request: Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:455 Software Activate Request, ACKing and Activating Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:476 Found SW config: 42 12 00 08 31 32 30 61 30 30 32 00 13 00 0a 76 32 30 30 62 33 30 64 30 00 Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:488 Selected sw description 0 of 1 Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=BTS(01) INST=(00,ff,ff) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1449 Set BTS Attr (bts=0) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1765 OC=BTS(01) INST=(00,ff,ff) Sending OPSTART Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=BTS(01) INST=(00,ff,ff) Software Activated Report Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:451 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) SW Activate Request: Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:455 Software Activate Request, ACKing and Activating Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:476 Found SW config: 42 12 00 08 31 32 30 61 30 30 31 00 13 00 0a 76 32 30 30 62 33 30 64 30 00 42 12 00 08 31 32 30 61 30 30 32 00 13 00 0a 76 32 30 30 62 33 30 64 30 00 Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:488 Selected sw description 0 of 2 Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:451 OC=RADIO-CARRIER(02) INST=(00,00,ff) SW Activate Request: Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:455 Software Activate Request, ACKing and Activating Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:476 Found SW config: 42 12 00 08 31 32 30 61 30 30 31 00 13 00 0a 76 32 30 30 62 33 30 64 30 00 42 12 00 08 31 32 30 61 30 30 32 00 13 00 0a 76 32 30 30 62 33 30 64 30 00 Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:488 Selected sw description 0 of 2 Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=GPRS-NSE(f0) INST=(00,ff,ff) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=GPRS-NSE(f0) INST=(00,ff,ff) Software Activated Report Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:451 OC=GPRS-CELL(f1) INST=(00,00,ff) SW Activate Request: Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:455 Software Activate Request, ACKing and Activating Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:476 Found SW config: 42 12 00 08 31 32 30 61 30 30 32 00 13 00 0a 76 32 30 30 62 33 30 64 30 00 Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:488 Selected sw description 0 of 1 Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:451 OC=GPRS-NSVC(f2) INST=(00,00,ff) SW Activate Request: Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:455 Software Activate Request, ACKing and Activating Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:476 Found SW config: 42 12 00 08 31 32 30 61 30 30 32 00 13 00 0a 76 32 30 30 62 33 30 64 30 00 Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:488 Selected sw description 0 of 1 Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:451 OC=GPRS-NSVC(f2) INST=(00,01,ff) SW Activate Request: Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:455 Software Activate Request, ACKing and Activating Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:476 Found SW config: 42 12 00 08 31 32 30 61 30 30 32 00 13 00 0a 76 32 30 30 62 33 30 64 30 00 Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:488 Selected sw description 0 of 1 Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=BTS(01) INST=(00,ff,ff) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) ADM=Unlocked Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=GPRS-CELL(f1) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=GPRS-CELL(f1) INST=(00,00,ff) Software Activated Report Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=GPRS-NSVC(f2) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=GPRS-NSVC(f2) INST=(00,01,ff) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=GPRS-NSVC(f2) INST=(00,00,ff) Software Activated Report Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=GPRS-NSVC(f2) INST=(00,01,ff) Software Activated Report Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) Software Activated Report Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1765 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) Sending OPSTART Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:2584 ip.access RSL CONNECT IP=0.0.0.0 PORT=3003 STREAM=0x00 Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,00) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1658 Set Chan Attr (bts=0,trx=0,ts=0) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1765 OC=CHANNEL(03) INST=(00,00,00) Sending OPSTART Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,01) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1658 Set Chan Attr (bts=0,trx=0,ts=1) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1765 OC=CHANNEL(03) INST=(00,00,01) Sending OPSTART Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,02) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1658 Set Chan Attr (bts=0,trx=0,ts=2) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1765 OC=CHANNEL(03) INST=(00,00,02) Sending OPSTART Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,03) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1658 Set Chan Attr (bts=0,trx=0,ts=3) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1765 OC=CHANNEL(03) INST=(00,00,03) Sending OPSTART Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,04) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1658 Set Chan Attr (bts=0,trx=0,ts=4) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1765 OC=CHANNEL(03) INST=(00,00,04) Sending OPSTART Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,05) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1658 Set Chan Attr (bts=0,trx=0,ts=5) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1765 OC=CHANNEL(03) INST=(00,00,05) Sending OPSTART Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,06) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1658 Set Chan Attr (bts=0,trx=0,ts=6) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1765 OC=CHANNEL(03) INST=(00,00,06) Sending OPSTART Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,07) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1658 Set Chan Attr (bts=0,trx=0,ts=7) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1765 OC=CHANNEL(03) INST=(00,00,07) Sending OPSTART Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,00) Software Activated Report Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,01) Software Activated Report Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,02) Software Activated Report Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,03) Software Activated Report Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,04) Software Activated Report Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,05) Software Activated Report Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,06) Software Activated Report Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,07) Software Activated Report Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) ADM=Unlocked Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=RADIO-CARRIER(02) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=RADIO-CARRIER(02) INST=(00,00,ff) Software Activated Report Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1466 Set TRX Attr (bts=0,trx=0) Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:1765 OC=RADIO-CARRIER(02) INST=(00,00,ff) Sending OPSTART Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:2426 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) IPACCESS(0xe1): RSL CONNECT ACK IP=10.210.2.226 PORT=3003 STREAM=0x00 Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,00) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) ADM=Unlocked Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,01) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) ADM=Unlocked Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,02) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) ADM=Unlocked Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,03) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) ADM=Unlocked Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,04) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) ADM=Unlocked Thu Apr 28 09:56:39 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,05) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) ADM=Unlocked Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,06) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) ADM=Unlocked Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,07) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) ADM=Unlocked Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=RADIO-CARRIER(02) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=OK(ff) ADM=Unlocked Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:1765 OC=RADIO-CARRIER(02) INST=(00,00,ff) Sending OPSTART Thu Apr 28 09:56:40 2016 <001a> input/ipa.c:265 accept()ed new link from 10.210.2.167 to port 3003 Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=RADIO-CARRIER(02) INST=(00,00,ff) STATE CHG: OP_STATE=Enabled AVAIL=OK(ff) Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) STATE CHG: OP_STATE=Enabled AVAIL=OK(ff) Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,00) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,01) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,02) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,03) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,04) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,05) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,06) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,07) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,00) STATE CHG: OP_STATE=Enabled AVAIL=OK(ff) Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=BTS(01) INST=(00,ff,ff) STATE CHG: OP_STATE=Enabled AVAIL=OK(ff) Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,01) STATE CHG: OP_STATE=Enabled AVAIL=OK(ff) Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,02) STATE CHG: OP_STATE=Enabled AVAIL=OK(ff) Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,03) STATE CHG: OP_STATE=Enabled AVAIL=OK(ff) Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,04) STATE CHG: OP_STATE=Enabled AVAIL=OK(ff) Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,05) STATE CHG: OP_STATE=Enabled AVAIL=OK(ff) Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,06) STATE CHG: OP_STATE=Enabled AVAIL=OK(ff) Thu Apr 28 09:56:40 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,07) STATE CHG: OP_STATE=Enabled AVAIL=OK(ff) Thu Apr 28 09:56:43 2016 <0004> bsc_init.c:287 bootstrapping RSL for BTS/TRX (0/0) on ARFCN 514 using MCC=310 MNC=227 LAC=1 CID=0 BSIC=63 Thu Apr 28 09:56:43 2016 <0003> system_information.c:525 Serving cell: 514 Thu Apr 28 09:56:43 2016 <0003> system_information.c:727 SI 2quater is included. Thu Apr 28 09:56:43 2016 <0003> bsc_init.c:104 SI1: 55 06 19 8f 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e5 04 00 2b Thu Apr 28 09:56:43 2016 <0003> bsc_init.c:104 SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff e5 04 00 Thu Apr 28 09:56:43 2016 <0003> bsc_init.c:104 SI2quater: 59 06 07 c0 00 04 86 59 00 03 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b Thu Apr 28 09:56:43 2016 <0003> bsc_init.c:104 SI3: 49 06 1b 00 00 13 70 22 00 01 49 03 05 27 47 40 e5 04 00 38 2b 2b 2b Thu Apr 28 09:56:43 2016 <0003> bsc_init.c:104 SI4: 31 06 1c 13 70 22 00 01 47 40 e5 04 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b Thu Apr 28 09:56:43 2016 <0003> bsc_init.c:104 SI5: 49 06 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b Thu Apr 28 09:56:43 2016 <0003> bsc_init.c:104 SI6: 2d 06 1e 00 00 13 70 22 00 01 27 ff 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b Thu Apr 28 09:56:59 2016 <0005> abis_nm.c:316 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) Failure Event Report Type=processing failure Severity=critical failure Probable cause= 03 00 02 Additional Text=lme_manage_fsm_actions.c:636IPC Ping timeout - DLP FAILED Thu Apr 28 09:56:59 2016 <0005> abis_nm.c:316 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=Failed(01) Thu Apr 28 09:56:59 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,00) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:56:59 2016 <0005> abis_nm.c:316 OC=BTS(01) INST=(00,ff,ff) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:56:59 2016 <0005> abis_nm.c:1449 Set BTS Attr (bts=0) Thu Apr 28 09:56:59 2016 <0005> abis_nm.c:1765 OC=BTS(01) INST=(00,ff,ff) Sending OPSTART Thu Apr 28 09:56:59 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,01) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:56:59 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,02) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:56:59 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,03) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:56:59 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,04) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:56:59 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,05) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:56:59 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,06) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:56:59 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,07) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:316 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) Failure Event Report Type=processing failure Severity=warning level failure Probable cause= 03 00 01 Additional Text=22064:WARN:OAM_RES:res_trx_status.c#209:TRX is not responding - reinitialising Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:316 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:316 OC=RADIO-CARRIER(02) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=Off line(03) Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:316 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,00) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:1658 Set Chan Attr (bts=0,trx=0,ts=0) Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:1765 OC=CHANNEL(03) INST=(00,00,00) Sending OPSTART Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,01) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:1658 Set Chan Attr (bts=0,trx=0,ts=1) Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:1765 OC=CHANNEL(03) INST=(00,00,01) Sending OPSTART Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,02) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:1658 Set Chan Attr (bts=0,trx=0,ts=2) Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:1765 OC=CHANNEL(03) INST=(00,00,02) Sending OPSTART Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,03) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:1658 Set Chan Attr (bts=0,trx=0,ts=3) Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:1765 OC=CHANNEL(03) INST=(00,00,03) Sending OPSTART Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,04) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:1658 Set Chan Attr (bts=0,trx=0,ts=4) Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:1765 OC=CHANNEL(03) INST=(00,00,04) Sending OPSTART Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,05) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:1658 Set Chan Attr (bts=0,trx=0,ts=5) Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:1765 OC=CHANNEL(03) INST=(00,00,05) Sending OPSTART Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,06) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:1658 Set Chan Attr (bts=0,trx=0,ts=6) Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:1765 OC=CHANNEL(03) INST=(00,00,06) Sending OPSTART Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,07) STATE CHG: OP_STATE=Disabled AVAIL=Dependency(05) Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:1658 Set Chan Attr (bts=0,trx=0,ts=7) Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:1765 OC=CHANNEL(03) INST=(00,00,07) Sending OPSTART Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:316 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) Failure Event Report Type=processing failure Severity=warning level failure Probable cause= 03 00 01 Additional Text=FSM Unhandled Event class=Baseband Transceiver inst=0 ev="DISABLED RSP" st=ini Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:316 OC=RADIO-CARRIER(02) INST=(00,00,ff) Failure Event Report Type=processing failure Severity=warning level failure Probable cause= 03 00 01 Additional Text=FSM Unhandled Event class=Radio Carrier inst=0 ev="DISABLED RSP" st=initial Thu Apr 28 09:57:04 2016 <0005> abis_nm.c:316 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) Failure Event Report Type=processing failure Severity=warning level failure Probable cause= 03 00 01 Additional Text=FSM Unhandled Event class=Baseband Transceiver inst=0 ev="CLEAR I REQ" st=init Thu Apr 28 09:57:10 2016 <001a> input/ipaccess.c:236 Sign link vanished, dead socket Thu Apr 28 09:57:10 2016 <001a> input/ipaccess.c:69 Forcing socket shutdown with no signal link set Thu Apr 28 09:57:10 2016 <001c> bsc_init.c:340 Lost some E1 TEI link: 1 0x45c98d0 Thu Apr 28 09:57:10 2016 <001c> bsc_init.c:340 Lost some E1 TEI link: 2 0x45c98d0 [detached from 762.OpenBSC] root at OpenBSC:~/gsm/openbsc/openbsc# ipAccess Telnet Console Output: root at OpenBSC:~# root at OpenBSC:~# ipaccess-telnet 10.210.2.167 nanoBTS (c) ip.access Ltd 2001 9633:DBG:CLI_SKT:Remote client 10.210.2.226 connected >i 9688:DBG:TRX_BOOT:ULM has requested baud rate change to 38400 >i 9705:DBG:TRX_BOOT:Changed baud OK >i 9744:DBG:TRX_BOOT:DEBUG from TRX: Masterloader. >i > Invalid CLI command. > 12119:DBG:TRX_BOOT:DEBUG from TRX: ChangeBaudSlv downloaded to ULS > 12165:DBG:TRX_BOOT:DEBUG from TRX: Changed baud OK > 14462:DBG:TRX_BOOT:DEBUG from TRX: ChangeBaudSlv downloaded to DLP > 14507:DBG:TRX_BOOT:DEBUG from TRX: Changed baud OK > 14520:DBG:TRX_BOOT:Got POST msg for ULS: All OK > 15198:DBG:TRX_BOOT:Got POST msg for DLP: All OK > 15285:DBG:TRX_BOOT:DEBUG from TRX: Got Image Req msg ImageId [0x1003] > 15478:DBG:TRX_BOOT:DEBUG from TRX: Got Image Req msg ImageId [0x1003] > 15647:DBG:TRX_BOOT:DEBUG from TRX: Changed baud OK > 15734:DBG:TRX_BOOT:DEBUG from TRX: Got Image Req msg ImageId [0x1009] > 15751:DBG:TRX_BOOT:Got Image Req msg ImageId [0x1008] > 16210:DBG:TRX_BOOT:DEBUG from TRX: Changed baud OK > 16297:DBG:TRX_BOOT:DEBUG from TRX: Got Image Req msg ImageId [0x1009] > 16314:DBG:TRX_BOOT:Got Image Req msg ImageId [0x1009] > 16835:DBG:TRX_BOOT:Got Image Req msg ImageId [0x1007] > 17348:DBG:TRX_BOOT:TRX status report: Application code activated > 17540:DBG:TRX_BOOT:Booted TRX idx=0 > 17542:DBG:RSL:1423:rsl: EVENT 0x00001008 rxd in STATE initial > 17542:DBG:RSL:1423:rsl: ENTERING open > 18518:DBG:GENIE_SERVER:TRX now ready for genie signals. > 18526:DBG:HDLC_UL:AlarmInd rx'd:":0ULM:ULM_FIFODRV:fifodrv.c#1864 (6082)" > 18526:DBG:HDLC_UL:AlarmInd rx'd:":0TxQueue full" > 18526:DBG:HDLC_UL:AlarmInd rx'd:":0ULM ra=080009b4 sp=40015910" > 18527:DBG:HDLC_UL:AlarmInd rx'd:":0ULM [400158c0] |00000093|4000b588|00002000|00000093|" > 18527:DBG:HDLC_UL:AlarmInd rx'd:":0ULM [400158d0] |40003c6c|00000093|00000040|08000af0|" > 18527:DBG:HDLC_UL:AlarmInd rx'd:":0ULM [400158e0] |40015a10|40004f98|40003c6c|00000000|" > 18527:DBG:HDLC_UL:AlarmInd rx'd:":0ULM [400158f0] |20000093|40003c6c|00000093|4000b520|" > 18527:DBG:HDLC_UL:AlarmInd rx'd:":0ULM [40015900] |00000000|40015910|08000998|080009b4|" > 18527:DBG:HDLC_UL:AlarmInd rx'd:":0ULM [40015910] |08000af0|08000998|00000093|080018a7|" > 18527:DBG:HDLC_UL:AlarmInd rx'd:":0ULM [40015920] |40015a10|40004f98|40003c6c|40015978|" > 18527:DBG:HDLC_UL:AlarmInd rx'd:":0ULM [40015930] |00000000|00000000|80380000|00000000|" > 18527:DBG:HDLC_UL:AlarmInd rx'd:":0ULM [40015940] |40003c6c|40004fcc|40015a10|400159a4|" > 18527:DBG:HDLC_UL:AlarmInd rx'd:":0ULM [40015950] |08002b07|00000093|40015a50|40015a50|" > 18546:DBG:HDLC_UL:AlarmInd rx'd:":0ULS:ULS_FIFODRV:fifodrv.c#1864 (7726)" > 18546:DBG:HDLC_UL:AlarmInd rx'd:":0TxQueue full" > 18546:DBG:HDLC_UL:AlarmInd rx'd:":0ULS ra=08002ad2 sp=4000fc9c" > 18546:DBG:HDLC_UL:AlarmInd rx'd:":0ULS [4000fc4c] |40003b18|00000000|40003b18|08000af0|" > 18547:DBG:HDLC_UL:AlarmInd rx'd:":0ULS [4000fc5c] |08000998|00000093|080018a7|4000fd58|" > 18547:DBG:HDLC_UL:AlarmInd rx'd:":0ULS [4000fc6c] |40004b6c|40003b18|4000fcc0|00000000|" > 18547:DBG:HDLC_UL:AlarmInd rx'd:":0ULS [4000fc7c] |00000000|80380000|00000000|40003b18|" > 18547:DBG:HDLC_UL:AlarmInd rx'd:":0ULS [4000fc8c] |40004ba0|4000fd58|4000fcec|08002b07|" > 18547:DBG:HDLC_UL:AlarmInd rx'd:":0ULS [4000fc9c] |00000093|4000fd98|4000fd98|40004ba8|" > 18547:DBG:HDLC_UL:AlarmInd rx'd:":0ULS [4000fcac] |40004ba8|00000001|4000fd58|40004ba0|" > 18547:DBG:HDLC_UL:AlarmInd rx'd:":0ULS [4000fcbc] |4000fcec|00000001|4000fd58|40004ba0|" > 18547:DBG:HDLC_UL:AlarmInd rx'd:":0ULS [4000fccc] |4000fcec|00000001|00000000|00004008|" > 18547:DBG:HDLC_UL:AlarmInd rx'd:":0ULS [4000fcdc] |08022c48|00000008|4000fd34|08006bf3|" > 18569:DBG:HDLC_UL:AlarmInd rx'd:":0DLP:L2_BCH:l2_bch.c#1065 (2331)" > 18569:DBG:HDLC_UL:AlarmInd rx'd:":0BCHbcchSItypeValid( prim_p->infoType )" > 18569:DBG:HDLC_UL:AlarmInd rx'd:":0DLP ra=0800732c sp=40004e08" > 18569:DBG:HDLC_UL:AlarmInd rx'd:":0DLP [40004db8] |ffffffff|400049e0|40005c70|40004e48|" > 18570:DBG:HDLC_UL:AlarmInd rx'd:":0DLP [40004dc8] |ffffffff|40005c70|00000093|0000000d|" > 18570:DBG:HDLC_UL:AlarmInd rx'd:":0DLP [40004dd8] |400049e0|08002d0f|40007be0|40003d50|" > 18570:DBG:HDLC_UL:AlarmInd rx'd:":0DLP [40004de8] |40005c70|40004e48|00000000|40004ea4|" > 18570:DBG:HDLC_UL:AlarmInd rx'd:":0DLP [40004df8] |0804327c|0000000d|40007d44|08007411|" > 18570:DBG:HDLC_UL:AlarmInd rx'd:":0DLP [40004e08] |40003474|400034b4|0800929b|08001270|" > 18570:DBG:HDLC_UL:AlarmInd rx'd:":0DLP [40004e18] |00000002|40000093|18000008|08043195|" > 18570:DBG:HDLC_UL:AlarmInd rx'd:":0DLP [40004e28] |00000000|40004ea0|00000001|400034a4|" > 18570:DBG:HDLC_UL:AlarmInd rx'd:":0DLP [40004e38] |0000fafe|00000000|00000000|40005588|" > 18570:DBG:HDLC_UL:AlarmInd rx'd:":0DLP [40004e48] |0804327c|00000001|080432b4|0802e338|" > 18880:DBG:OAM_MOI:oid=BBTRX:0-0 publisher attributes set > 18976:DBG:OAM_MOI:oid=Carrier:0-0 subscriber attributes set > 18977:DBG:RSL:2328:rsl: EVENT 0x00001009 rxd in STATE opennotconnected > 18980:DBG:OAM_MOI:oid=BBTRX:0-0 subscriber attributes set > 18981:DBG:OAM_MOI:oid=Carrier:0-0 publisher attributes set > 19018:DBG:RSL:2767:rsl: EVENT 0x00001007 rxd in STATE configurednotconnected > 19018:DBG:RSL:2767:rsl: ENTERING on > 19018:DBG:IP_CHANNEL:Assigning RX Client B > 19019:DBG:RSL:2798:rsl: EVENT 0x00001003 rxd in STATE ongoingconnecting > 19019:DBG:IP_CHAN_RX_B:Attempting connection to 10.210.2.226:3003 > 19021:DBG:RSL:2806:rsl: EVENT 0x00001002 rxd in STATE onconnecting > 19021:DBG:RSL:2806:rsl: ENTERING onconnected > 3906:WARNING:ULM:ULM_FIFODRV:fifodrv.c#1484:IPC Ping timeout - PEER_A FAILED > 4473:WARNING:ULS:ULS_FIFODRV:fifodrv.c#1484:IPC Ping timeout - PEER_A FAILED > 4990:WARNING:ULM:ULM_FIFODRV:fifodrv.c#1484:IPC Ping timeout - PEER_A FAILED > 5557:WARNING:ULS:ULS_FIFODRV:fifodrv.c#1484:IPC Ping timeout - PEER_A FAILED > 6074:WARNING:ULM:ULM_FIFODRV:fifodrv.c#1484:IPC Ping timeout - PEER_A FAILED > 23505:DBG:HDLC_UL:AlarmInd rx'd:"lme_manage_fsm_actions.c:636IPC Ping timeout - DLP FAILED" > 24739:WARN:OAM_RES:res_trx_status.c#209:TRX is not responding - reinitialising the unit... > 25825:DBG:OAM_IM:Stopping "Primary OML Fallback Client" > 25825:DBG:OAM_IM:Stopping "Secondary OML Server" > 25825:DBG:OAM_IM:Not stopping "IML Site Server" - has not been started > 25825:DBG:OAM_IM:Stopping "IML Bts Server" > 25825:DBG:OAM_IM:Stopping "IRL Patched Routing Link" > 25825:DBG:OAM_IM:Failed to inject event=1="STOP" into link source (token=7) > 25857:DBG:RSL:3476:rsl: EVENT 0x00001004 rxd in STATE onconnected > 25857:DBG:RSL:3476:rsl: EXITING on > 25857:DBG:RSL:Removed all traffic routes on chan 0x08 > 25857:DBG:RSL:Removed all traffic routes on chan 0x09 > 25857:DBG:RSL:Removed all traffic routes on chan 0x0A > 25857:DBG:RSL:Removed all traffic routes on chan 0x0B > 25857:DBG:RSL:Removed all traffic routes on chan 0x0C > 25857:DBG:RSL:Removed all traffic routes on chan 0x0D > 25857:DBG:RSL:Removed all traffic routes on chan 0x0E > 25857:DBG:RSL:Removed all traffic routes on chan 0x0F > 25857:DBG:RSL:3476:rsl: ENTERING failed > 25857:DBG:RSL:3476:rsl: ENTERING failedon > 25867:DBG:IP_CHAN_SERVER:Closed server listening on port 3006 > 25867:DBG:IP_CHAN_SERVER:Closed server listening on port 3014 > >SIGINT terminating. root at OpenBSC:~# ipaccess-telnet 10.210.2.167 server() failed: No route to host -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: OutlookEmoji-?.png Type: image/png Size: 488 bytes Desc: OutlookEmoji-?.png URL: From holger at freyther.de Thu May 5 08:54:26 2016 From: holger at freyther.de (Holger Freyther) Date: Thu, 5 May 2016 10:54:26 +0200 Subject: "DLP Failed" and "Disabled RSP" from ipAccess BTS In-Reply-To: References: Message-ID: <83DC31D8-AB7F-4160-909D-00BDCA6A892D@freyther.de> > On 04 May 2016, at 22:58, Christopher Trudeau wrote: > > > After upgrading my completely working copy of OpenBSC to the latest git version, it stopped working and is stating an error of "DLP FAILED" and "DISABLED RSP" and the BTS seems to just reboot. This process repeats over and over. Unfortunately I do not have the version/commit of the one it was previously on, however it was likely from a month or two ago. To troubleshoot that my equipment wasn't at fault, i restored a VMWare snapshot I took before upgrading and it worked perfectly. git reflog should tell you versions you used previously. If you find a working commit then you can use git bisect to find the commit that broke it. > > Thu Apr 28 09:56:43 2016 <0003> system_information.c:727 SI 2quater is included. > Thu Apr 28 09:56:43 2016 <0003> bsc_init.c:104 SI1: 55 06 19 8f 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e5 04 00 2b > Thu Apr 28 09:56:43 2016 <0003> bsc_init.c:104 SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff e5 04 00 > Thu Apr 28 09:56:43 2016 <0003> bsc_init.c:104 SI2quater: 59 06 07 c0 00 04 86 59 00 03 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b > Thu Apr 28 09:56:43 2016 <0003> bsc_init.c:104 SI3: 49 06 1b 00 00 13 70 22 00 01 49 03 05 27 47 40 e5 04 00 38 2b 2b 2b > Thu Apr 28 09:56:43 2016 <0003> bsc_init.c:104 SI4: 31 06 1c 13 70 22 00 01 47 40 e5 04 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b > Thu Apr 28 09:56:43 2016 <0003> bsc_init.c:104 SI5: 49 06 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b > Thu Apr 28 09:56:43 2016 <0003> bsc_init.c:104 SI6: 2d 06 1e 00 00 13 70 22 00 01 27 ff 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b > Thu Apr 28 09:56:59 2016 <0005> abis_nm.c:316 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) Failure Event Report Type=processing failure Severity=critical failure Probable cause= 03 00 02 Additional Text=lme_manage_fsm_actions.c:636IPC Ping timeout - DLP FAILED we have had changes to the generation of SIs (but the default should not have changed). Maybe it is crashing the nanoBTS when it tries to parse it? From laforge at gnumonks.org Thu May 5 09:04:24 2016 From: laforge at gnumonks.org (Harald Welte) Date: Thu, 5 May 2016 11:04:24 +0200 Subject: "DLP Failed" and "Disabled RSP" from ipAccess BTS In-Reply-To: References: Message-ID: <20160505090424.GI22427@nataraja> Hi Christopher, On Wed, May 04, 2016 at 08:58:29PM +0000, Christopher Trudeau wrote: > After upgrading my completely working copy of OpenBSC to the latest > git version, it stopped working and is stating an error of "DLP > FAILED" and "DISABLED RSP" and the BTS seems to just reboot. This > process repeats over and over. Unfortunately I do not have the > version/commit of the one it was previously on, however it was likely > from a month or two ago. To troubleshoot that my equipment wasn't at > fault, i restored a VMWare snapshot I took before upgrading and it > worked perfectly. If you have that vm snapshot, you can simply go back to that snapshot and obtain the version information of openbsc at that time. Theres a 'show version' command in the VTY. The first line should give you version information. I think what you may experience is the fact that maybe nobody actively involved in the development of OpenBSC might still be using nanoBTS at this time. Given that ip.access has never supported this project in any way by themslves either, regressions might have been introduced inadvertently over time. I don't have time to debug this myself, but I would be more than happy to try to fix it once the detailed issue / commit causing the problem has been established. The later should be done by those users interested in continued nanoBTS support, as they have a natural interest in that matter. Also, it would make sense to incoude in your bug report pcap files of the OML for both the working vs. non-working case > Thu Apr 28 09:56:43 2016 <0003> bsc_init.c:104 SI2quater: 59 06 07 c0 00 04 86 59 00 03 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b Just as I see this: Are you sure your BTS actually supports the transmission of SI2 quater? The version from one month ago couldn't yet have had this feature, could it? If so, then please make sure you test with identical configuration file when comparing old and new version. -- - Harald Welte http://laforge.gnumonks.org/ ============================================================================ "Privacy in residential applications is a desirable marketing option." (ETSI EN 300 175-7 Ch. A6) From keith at rhizomatica.org Thu May 5 14:51:59 2016 From: keith at rhizomatica.org (Keith) Date: Thu, 5 May 2016 15:51:59 +0100 Subject: Persistent Uplink activity from Moto KRZR K3 Message-ID: Hi all, I have two Motorola KRZR K3 phones, purchased some years ago. They generate constant bursts on the uplink, and this is what I can see that corresponds from osmo-bts log output: <0000> ../../../../osmo-bts/src/common/rsl.c:1642 (bts=0,trx=0,ts=0,ss=0) Handing RLL msg UNIT_DATA_IND from LAPDm to MEAS REP <0000> ../../../../osmo-bts/src/common/rsl.c:1592 (bts=0,trx=0,ts=0,ss=0) Tx MEAS RES No other handset does this. As this is somewhat irritating, I'd like to fix it and it's a good opportunity for me to dig into the code a little. I'm posting to ask if anyone recognizes the issue or could give me some pointers towards what the MS might be looking for that it is not getting from the network? I considered posting a bunch of other log output, but I'm not sure quite what might be useful. I don't see any remarkable difference in the LUR sequence with this phone and any other for example. Happy to hear some guidance as to what might be useful. I might also mention that this phone fails the USSD *#100# own number request - The message "Not Successful" appears on the screen very quickly if not immediately after pressing send. There is no network communication that I can detect. As a side note, I resolved the somewhat baffling problem with my Ettus N210 recently, uninstalling the UHD from the ettus repo (ubuntu 12) and compiling UHD from git worked. I have not as yet (and probably won't) dig any further into finding out why. But now I have a working environment to test osmo-trx and osmo-bts-trx. Keith. From nhofmeyr at sysmocom.de Fri May 6 18:12:18 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Fri, 6 May 2016 20:12:18 +0200 Subject: openbsc.git branch sysmocom/iu updated. 0.15.0-442-gf3bcdd2 In-Reply-To: <40A79C41-1B47-471B-93CA-06D0876838ED@freyther.de> References: <201605041201.u44C1bxf098418@git.osmocom.org> <40A79C41-1B47-471B-93CA-06D0876838ED@freyther.de> Message-ID: <20160506181218.GA5421@dub6> On Wed, May 04, 2016 at 02:37:26PM +0200, Holger Freyther wrote: > > I don't think this belongs into the gsm_subscriber. If you compare this with the architectural change that removed the "subscriber queue" we are going to repeat the same mistake again. The timeout belongs into the logical "operation" and not the subscriber (the object of the logical operation). I must admit that I haven't fully grokked the master branch aka NITB paging semantics. I've just taken a closer look. It's quite complex... Here is how the paging_timeout ended up in gsm_subscriber: First I wanted to add the paging timeout to a gsm_subscriber_connection, which obviously doesn't make sense. There is no conn yet when we want to page. The next thought would be to add the timeout to struct subscr_request. But taking a look at subscr_request_conn(), I see that gsm_subscriber has an is_paging flag, and when a request comes along while we're already paging, it is just added to the list without launching another paging [1]. So it seems there is a paging semantic that is separate from the request, that's why is_paging is in gsm_subscriber I presume, and that's why I put the paging timeout next to that, but read on. [1] see subscr_request_conn() on sysmocom/iu, or subscr_request_channel() on master Now I understand that the libbsc paging is much more than just one paging request. There's the bts->paging.work_timer that keeps retrying to page as long as requests exist. It rotates every first request to the back and does another paging; I don't really understand the part where the "available slots" of 20 are reduced to zero, where the paging_give_credit() is queued with a separate timeout, which sets the slots back to 20 (20 credits??). Nevertheless, I understand now that is_paging is not about a single paging, but remembers whether we can skip kicking off the cascade of paging retries. Then there's the separate req->T3113 timer which separately removes each request from the list of requests waiting for a paging. I could re-implement this kind of algorithm in libmsc: * Upon first request, start paging * Retry paging "indefinitely" while requests are queued ("paging worker") * Upon second or later request, just add to the queue * Time out each request separately * Stop paging once the queue of requests is empty The current status quo is somewhat simpler: * Upon first request, send out a single paging request * Upon second or later request, add to the queue * If the single paging timed out, discard all requests If I re-implement the more complex algorithm like in libbsc, I would need a paging worker in the gsm_subscriber struct, and a timeout per each subscr_request. OTOH, if the BSC level already has the paging-retries semantics built-in, then it makes sense to send out only a single paging request from the MSC level. It's not as clear cut. osmo-bsc receives a paging request from the MSC, and does numerous paging retries. But it doesn't store the requests in detail, it even has the request callbacks set to NULL. All that happens during a paging response is that a connection to the MSC is initiated. So the knowledge for various detailed requests is in the MSC, while the paging retries still are in osmo-bsc. So it's not trivial to figure out how the various levels should behave. The MSC should not have the same paging resend logic as the BSC, or if it does then with a much longer timeout. It would be interesting to find out whether RNCs resend pagings like our osmo-bsc. I would appreciate opinions on how standalone MSC level paging should behave in detail. Also, could someone please explain the 20 slots and "give credit" semantics I mentioned above? ~Neels -- - Neels Hofmeyr http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Gesch?ftsf?hrer / Managing Directors: Holger Freyther, Harald Welte -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From holger at freyther.de Sat May 7 05:26:03 2016 From: holger at freyther.de (Holger Freyther) Date: Sat, 7 May 2016 07:26:03 +0200 Subject: openbsc.git branch sysmocom/iu updated. 0.15.0-442-gf3bcdd2 In-Reply-To: <20160506181218.GA5421@dub6> References: <201605041201.u44C1bxf098418@git.osmocom.org> <40A79C41-1B47-471B-93CA-06D0876838ED@freyther.de> <20160506181218.GA5421@dub6> Message-ID: > On 06 May 2016, at 20:12, Neels Hofmeyr wrote: > > On Wed, May 04, 2016 at 02:37:26PM +0200, Holger Freyther wrote: Hi Neels, not sure what to respond to the rest as it is long and goes into another area and I am very busy right now. > Also, could someone please explain the 20 slots and "give credit" semantics I > mentioned above? the ip.access nanoBTS crashed with too much paging, it crashed before it would send out watermark information that would have allowed us to throttle/stop paging. So the "slots" is a way to make proprietary equipment work. From nhofmeyr at sysmocom.de Sun May 8 15:02:51 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Sun, 8 May 2016 17:02:51 +0200 Subject: openbsc.git branch sysmocom/iu updated. 0.15.0-442-gf3bcdd2 In-Reply-To: References: <201605041201.u44C1bxf098418@git.osmocom.org> <40A79C41-1B47-471B-93CA-06D0876838ED@freyther.de> <20160506181218.GA5421@dub6> Message-ID: <20160508150251.GA5851@dub6> On Sat, May 07, 2016 at 07:26:03AM +0200, Holger Freyther wrote: > not sure what to respond to the rest as it is long and goes into another area and I am very busy right now. Ok -- I'll keep it simple until we see a need for more elaborate paging timeout semantics. So, I will actually keep the timeout on gsm_subscriber level for now, but will gladly change that when reasons to do so come up. > > Also, could someone please explain the 20 slots and "give credit" semantics I > > mentioned above? > > the ip.access nanoBTS crashed with too much paging, it crashed before it > would send out watermark information that would have allowed us to > throttle/stop paging. So the "slots" is a way to make proprietary equipment > work. Ok, so it does at most 20 pagings and then waits 5 seconds before firing the next 20. BTW, re give_credit(): the meaning of "to give credit to someone" is more like acknowledging that someone has done something well (Anerkennung geben). That's why I was unsure about its purpose. ~Neels -- - Neels Hofmeyr http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Gesch?ftsf?hrer / Managing Directors: Holger Freyther, Harald Welte -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From holger at freyther.de Sun May 8 15:13:51 2016 From: holger at freyther.de (Holger Freyther) Date: Sun, 8 May 2016 17:13:51 +0200 Subject: openbsc.git branch sysmocom/iu updated. 0.15.0-442-gf3bcdd2 In-Reply-To: <20160508150251.GA5851@dub6> References: <201605041201.u44C1bxf098418@git.osmocom.org> <40A79C41-1B47-471B-93CA-06D0876838ED@freyther.de> <20160506181218.GA5421@dub6> <20160508150251.GA5851@dub6> Message-ID: > On 08 May 2016, at 17:02, Neels Hofmeyr wrote: > > On Sat, May 07, 2016 at 07:26:03AM +0200, Holger Freyther wrote: >> not sure what to respond to the rest as it is long and goes into another area and I am very busy right now. > > Ok -- I'll keep it simple until we see a need for more elaborate paging timeout > semantics. So, I will actually keep the timeout on gsm_subscriber level for > now, but will gladly change that when reasons to do so come up. I think I understand your point of view now. Without the GSM paging code there is no component that will inform the SMS/Call code about timeouts. From this point of view the GSM subscriber is a good place to put this timeout. Have you considered removing the "timeout" from the lower GSM paging code? The interface would be start, cancel and only success would be signaled? Both the MSC paging and BSC paging timeout could be fed from the same timeout value? > > Ok, so it does at most 20 pagings and then waits 5 seconds before firing the > next 20. > > BTW, re give_credit(): the meaning of "to give credit to someone" is more like > acknowledging that someone has done something well (Anerkennung geben). That's > why I was unsure about its purpose. top-up? refill? resume paging? From nhofmeyr at sysmocom.de Sun May 8 20:26:31 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Sun, 8 May 2016 22:26:31 +0200 Subject: [PATCH] api doc: auth_core.c: add \returns, cosmetic Message-ID: <1462739191-25885-1-git-send-email-nhofmeyr@sysmocom.de> Add various missing \returns doxygen entries. In osmo_auth_3g_from_2g(), also adjust two comment-closing instances to match common style and add a period to end a sentence. (The recent addition of osmo_auth_3g_from_2g() raised my attention, and I added more return value docs while at it.) --- src/gsm/auth_core.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/gsm/auth_core.c b/src/gsm/auth_core.c index b78cdd5..f1ec2ed 100644 --- a/src/gsm/auth_core.c +++ b/src/gsm/auth_core.c @@ -43,6 +43,7 @@ static struct osmo_auth_impl *selected_auths[_OSMO_AUTH_ALG_NUM]; /*! \brief Register an authentication algorithm implementation with the core * \param[in] impl Structure describing implementation and it's callbacks + * \returns 0 on success, or a negative error code on failure * * This function is called by an authentication implementation plugin to * register itself with the authentication core. @@ -64,6 +65,7 @@ int osmo_auth_register(struct osmo_auth_impl *impl) /*! \brief Load all available authentication plugins from the given path * \param[in] path Path name of the directory containing the plugins + * \returns number of plugins loaded in case of success, negative in case of error * * This function will load all plugins contained in the specified path. */ @@ -75,6 +77,7 @@ int osmo_auth_load(const char *path) /*! \brief Determine if a given authentication algorithm is supported * \param[in] algo Algorithm which should be checked + * \returns 1 if algo is supported, 0 if not, negative error on failure * * This function is used by an application to determine at runtime if a * given authentication algorithm is supported or not. @@ -111,10 +114,12 @@ static inline void c4_function(uint8_t *ck, const uint8_t *kc) /*! \brief Generate 3G CK + IK from 2G authentication vector * \param vec Authentication Vector to be modified + * \returns 1 if the vector was changed, 0 otherwise * * This function performs the C5 and C4 functions to derive the UMTS key * material from the GSM key material in the supplied vector, _if_ the input - * vector doesn't yet have UMTS authentication capability */ + * vector doesn't yet have UMTS authentication capability. + */ int osmo_auth_3g_from_2g(struct osmo_auth_vector *vec) { if ((vec->auth_types & OSMO_AUTH_TYPE_GSM) && @@ -124,7 +129,7 @@ int osmo_auth_3g_from_2g(struct osmo_auth_vector *vec) /* We cannot actually set OSMO_AUTH_TYPE_UMTS as we have no * AUTN and no RES, and thus can only perform GSM * authentication with this tuple. - * */ + */ return 1; } @@ -135,6 +140,7 @@ int osmo_auth_3g_from_2g(struct osmo_auth_vector *vec) * \param[out] vec Generated authentication vector * \param[in] aud Subscriber-specific key material * \param[in] _rand Random challenge to be used + * \returns 0 on success, negative error on failure * * This function performs the core cryptographic function of the AUC, * computing authentication triples/quintuples based on the permanent @@ -167,6 +173,7 @@ int osmo_auth_gen_vec(struct osmo_auth_vector *vec, * \param[in] rand_auts RAND value sent by the SIM/MS * \param[in] auts AUTS value sent by the SIM/MS * \param[in] _rand Random challenge to be used to generate vector + * \returns 0 on success, negative error on failure * * This function performs a special variant of the core cryptographic * function of the AUC: computing authentication triples/quintuples -- 2.1.4 From pablo at netfilter.org Sun May 8 21:59:14 2016 From: pablo at netfilter.org (Pablo Neira Ayuso) Date: Sun, 8 May 2016 23:59:14 +0200 Subject: [PATCH net-next] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) Message-ID: <1462744754-10024-1-git-send-email-pablo@netfilter.org> This is an initial implementation of a netdev driver for GTP datapath (GTP-U) v0 and v1, according to the GSM TS 09.60 and 3GPP TS 29.060 standards. This tunneling protocol is used to prevent subscribers from accessing mobile carrier core network infrastructure. This implementation requires a GGSN userspace daemon that implements the signaling protocol (GTP-C), such as OpenGGSN [1]. This userspace daemon updates the PDP context database that represents active subscriber sessions through a genetlink interface. For more context on this tunneling protocol, you can check the slides that were presented during the NetDev 1.1 [2]. Only IPv4 is supported at this time. [1] http://git.osmocom.org/openggsn/ [2] http://www.netdevconf.org/1.1/proceedings/slides/schultz-welte-osmocom-gtp.pdf Signed-off-by: Pablo Neira Ayuso --- drivers/net/Kconfig | 17 + drivers/net/Makefile | 1 + drivers/net/gtp.c | 1364 ++++++++++++++++++++++++++++++++++++++++++ include/net/gtp.h | 34 ++ include/uapi/linux/Kbuild | 1 + include/uapi/linux/gtp.h | 33 + include/uapi/linux/if_link.h | 10 + include/uapi/linux/udp.h | 3 +- 8 files changed, 1462 insertions(+), 1 deletion(-) create mode 100644 drivers/net/gtp.c create mode 100644 include/net/gtp.h create mode 100644 include/uapi/linux/gtp.h diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index a24c18e..4f13c5c 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -193,6 +193,23 @@ config GENEVE To compile this driver as a module, choose M here: the module will be called geneve. +config GTP + tristate "GPRS Tunneling Protocol datapath (GTP-U)" + depends on INET && NET_UDP_TUNNEL + select NET_IP_TUNNEL + ---help--- + This allows one to create gtp virtual interfaces that provide + the GPRS Tunneling Protocol datapath (GTP-U). This tunneling protocol + is used to prevent subscribers from accessing mobile carrier core + network infrastructure. This driver requires a userspace software that + implements the signaling protocol (GTP-C) to update its PDP context + base, such as OpenGGSN + * + * Author: Harald Welte + * Pablo Neira Ayuso + * Andreas Schultz + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* An active session for the subscriber. */ +struct pdp_ctx { + struct hlist_node hlist_tid; + struct hlist_node hlist_addr; + + union { + u64 tid; + struct { + u64 tid; + u16 flow; + } v0; + struct { + u32 i_tei; + u32 o_tei; + } v1; + } u; + u8 gtp_version; + u16 af; + + struct in_addr ms_addr_ip4; + struct in_addr sgsn_addr_ip4; + + atomic_t tx_seq; + struct rcu_head rcu_head; +}; + +/* One instance of the GTP device. */ +struct gtp_dev { + struct list_head list; + + struct socket *sock0; + struct socket *sock1u; + + struct net *net; + struct net_device *dev; + + unsigned int hash_size; + struct hlist_head *tid_hash; + struct hlist_head *addr_hash; +}; + +static int gtp_net_id __read_mostly; + +struct gtp_net { + struct list_head gtp_dev_list; +}; + +static u32 gtp_h_initval; + +static inline u32 gtp0_hashfn(u64 tid) +{ + u32 *tid32 = (u32 *) &tid; + return jhash_2words(tid32[0], tid32[1], gtp_h_initval); +} + +static inline u32 gtp1u_hashfn(u32 tid) +{ + return jhash_1word(tid, gtp_h_initval); +} + +static inline u32 ipv4_hashfn(__be32 ip) +{ + return jhash_1word((__force u32)ip, gtp_h_initval); +} + +/* Resolve a PDP context structure based on the 64bit TID. */ +static struct pdp_ctx *gtp0_pdp_find(struct gtp_dev *gtp, u64 tid) +{ + struct hlist_head *head; + struct pdp_ctx *pdp; + + head = >p->tid_hash[gtp0_hashfn(tid) % gtp->hash_size]; + + hlist_for_each_entry_rcu(pdp, head, hlist_tid) { + if (pdp->gtp_version == GTP_V0 && + pdp->u.v0.tid == tid) + return pdp; + } + return NULL; +} + +/* Resolve a PDP context structure based on the 32bit TEI. */ +static struct pdp_ctx *gtp1_pdp_find(struct gtp_dev *gtp, u32 tid) +{ + struct hlist_head *head; + struct pdp_ctx *pdp; + + head = >p->tid_hash[gtp1u_hashfn(tid) % gtp->hash_size]; + + hlist_for_each_entry_rcu(pdp, head, hlist_tid) { + if (pdp->gtp_version == GTP_V1 && + pdp->u.v1.i_tei == tid) + return pdp; + } + return NULL; +} + +/* Resolve a PDP context based on IPv4 address of MS. */ +static struct pdp_ctx *ipv4_pdp_find(struct gtp_dev *gtp, __be32 ms_addr) +{ + struct hlist_head *head; + struct pdp_ctx *pdp; + + head = >p->addr_hash[ipv4_hashfn(ms_addr) % gtp->hash_size]; + + hlist_for_each_entry_rcu(pdp, head, hlist_addr) { + if (pdp->af == AF_INET && + pdp->ms_addr_ip4.s_addr == ms_addr) + return pdp; + } + + return NULL; +} + +static bool gtp_check_src_ms_ipv4(struct sk_buff *skb, struct pdp_ctx *pctx, + unsigned int hdrlen) +{ + struct iphdr *iph; + + if (!pskb_may_pull(skb, hdrlen + sizeof(struct iphdr))) + return false; + + iph = (struct iphdr *)(skb->data + hdrlen + sizeof(struct iphdr)); + + return iph->saddr != pctx->ms_addr_ip4.s_addr; +} + +/* Check if the inner IP source address in this packet is assigned to any + * existing mobile subscriber. + */ +static bool gtp_check_src_ms(struct sk_buff *skb, struct pdp_ctx *pctx, + unsigned int hdrlen) +{ + switch (ntohs(skb->protocol)) { + case ETH_P_IP: + return gtp_check_src_ms_ipv4(skb, pctx, hdrlen); + } + return false; +} + +/* 1 means pass up to the stack, -1 means drop and 0 means decapsulated. */ +static int gtp0_udp_encap_recv(struct gtp_dev *gtp, struct sk_buff *skb, + bool xnet) +{ + unsigned int hdrlen = sizeof(struct udphdr) + + sizeof(struct gtp0_header); + struct gtp0_header *gtp0; + struct pdp_ctx *pctx; + int ret = 0; + + if (!pskb_may_pull(skb, hdrlen)) + return -1; + + gtp0 = (struct gtp0_header *)(skb->data + sizeof(struct udphdr)); + + if ((gtp0->flags >> 5) != GTP_V0) + return 1; + + if (gtp0->type != GTP_TPDU) + return 1; + + rcu_read_lock(); + pctx = gtp0_pdp_find(gtp, be64_to_cpu(gtp0->tid)); + if (!pctx) { + netdev_dbg(gtp->dev, "No PDP ctx to decap skb=%p\n", skb); + ret = -1; + goto out_rcu; + } + + if (!gtp_check_src_ms(skb, pctx, hdrlen)) { + netdev_dbg(gtp->dev, "No PDP ctx for this MS\n"); + ret = -1; + goto out_rcu; + } + rcu_read_unlock(); + + /* Get rid of the GTP + UDP headers. */ + return iptunnel_pull_header(skb, hdrlen, skb->protocol, xnet); +out_rcu: + rcu_read_unlock(); + return ret; +} + +static int gtp1u_udp_encap_recv(struct gtp_dev *gtp, struct sk_buff *skb, + bool xnet) +{ + unsigned int hdrlen = sizeof(struct udphdr) + + sizeof(struct gtp1_header); + struct gtp1_header *gtp1; + struct pdp_ctx *pctx; + int ret = 0; + + if (!pskb_may_pull(skb, hdrlen)) + return -1; + + gtp1 = (struct gtp1_header *)(skb->data + sizeof(struct udphdr)); + + if ((gtp1->flags >> 5) != GTP_V1) + return 1; + + if (gtp1->type != GTP_TPDU) + return 1; + + /* From 29.060: "This field shall be present if and only if any one or + * more of the S, PN and E flags are set.". + * + * If any of the bit is set, then the remaining ones also have to be + * set. + */ + if (gtp1->flags & GTP1_F_MASK) + hdrlen += 4; + + /* Make sure the header is larger enough, including extensions. */ + if (!pskb_may_pull(skb, hdrlen)) + return -1; + + rcu_read_lock(); + pctx = gtp1_pdp_find(gtp, ntohl(gtp1->tid)); + if (!pctx) { + netdev_dbg(gtp->dev, "No PDP ctx to decap skb=%p\n", skb); + ret = -1; + goto out_rcu; + } + + if (!gtp_check_src_ms(skb, pctx, hdrlen)) { + netdev_dbg(gtp->dev, "No PDP ctx for this MS\n"); + ret = -1; + goto out_rcu; + } + rcu_read_unlock(); + + /* Get rid of the GTP + UDP headers. */ + return iptunnel_pull_header(skb, hdrlen, skb->protocol, xnet); +out_rcu: + rcu_read_unlock(); + return ret; +} + +static void gtp_encap_disable(struct gtp_dev *gtp) +{ + if (gtp->sock0 && gtp->sock0->sk) { + udp_sk(gtp->sock0->sk)->encap_type = 0; + rcu_assign_sk_user_data(gtp->sock0->sk, NULL); + } + if (gtp->sock1u && gtp->sock1u->sk) { + udp_sk(gtp->sock1u->sk)->encap_type = 0; + rcu_assign_sk_user_data(gtp->sock1u->sk, NULL); + } + + gtp->sock0 = NULL; + gtp->sock1u = NULL; +} + +static void gtp_encap_destroy(struct sock *sk) +{ + struct gtp_dev *gtp; + + gtp = rcu_dereference_sk_user_data(sk); + if (gtp) + gtp_encap_disable(gtp); +} + +/* UDP encapsulation receive handler. See net/ipv4/udp.c. + * Return codes: 0: success, <0: error, >0: pass up to userspace UDP socket. + */ +static int gtp_encap_recv(struct sock *sk, struct sk_buff *skb) +{ + struct pcpu_sw_netstats *stats; + struct gtp_dev *gtp; + bool xnet; + int ret; + + gtp = rcu_dereference_sk_user_data(sk); + if (!gtp) + return 1; + + netdev_dbg(gtp->dev, "encap_recv sk=%p\n", sk); + + xnet = !net_eq(gtp->net, dev_net(gtp->dev)); + + switch (udp_sk(sk)->encap_type) { + case UDP_ENCAP_GTP0: + netdev_dbg(gtp->dev, "received GTP0 packet\n"); + ret = gtp0_udp_encap_recv(gtp, skb, xnet); + break; + case UDP_ENCAP_GTP1U: + netdev_dbg(gtp->dev, "received GTP1U packet\n"); + ret = gtp1u_udp_encap_recv(gtp, skb, xnet); + break; + default: + ret = -1; /* Shouldn't happen. */ + } + + switch (ret) { + case 1: + netdev_dbg(gtp->dev, "pass up to the process\n"); + return 1; + case 0: + netdev_dbg(gtp->dev, "forwarding packet from GGSN to uplink\n"); + break; + case -1: + netdev_dbg(gtp->dev, "GTP packet has been dropped\n"); + kfree_skb(skb); + return 0; + } + + /* Now that the UDP and the GTP header have been removed, set up the + * new network header. This is required by the upper layer to + * calculate the transport header. + */ + skb_reset_network_header(skb); + + skb->dev = gtp->dev; + + stats = this_cpu_ptr(gtp->dev->tstats); + u64_stats_update_begin(&stats->syncp); + stats->rx_packets++; + stats->rx_bytes += skb->len; + u64_stats_update_end(&stats->syncp); + + netif_rx(skb); + + return 0; +} + +static int gtp_dev_init(struct net_device *dev) +{ + struct gtp_dev *gtp = netdev_priv(dev); + + gtp->dev = dev; + + dev->tstats = alloc_percpu(struct pcpu_sw_netstats); + if (!dev->tstats) + return -ENOMEM; + + return 0; +} + +static void gtp_dev_uninit(struct net_device *dev) +{ + struct gtp_dev *gtp = netdev_priv(dev); + + gtp_encap_disable(gtp); + free_percpu(dev->tstats); +} + +static struct rtable *ip4_route_output_gtp(struct net *net, struct flowi4 *fl4, + const struct sock *sk, __be32 daddr) +{ + memset(fl4, 0, sizeof(*fl4)); + fl4->flowi4_oif = sk->sk_bound_dev_if; + fl4->daddr = daddr; + fl4->saddr = inet_sk(sk)->inet_saddr; + fl4->flowi4_tos = RT_CONN_FLAGS(sk); + fl4->flowi4_proto = sk->sk_protocol; + + return ip_route_output_key(net, fl4); +} + +static inline void gtp0_push_header(struct sk_buff *skb, struct pdp_ctx *pctx) +{ + int payload_len = skb->len; + struct gtp0_header *gtp0; + + gtp0 = (struct gtp0_header *) skb_push(skb, sizeof(*gtp0)); + + gtp0->flags = 0x1e; /* v0, GTP-non-prime. */ + gtp0->type = GTP_TPDU; + gtp0->length = htons(payload_len); + gtp0->seq = htons((atomic_inc_return(&pctx->tx_seq) - 1) % 0xffff); + gtp0->flow = htons(pctx->u.v0.flow); + gtp0->number = 0xff; + gtp0->spare[0] = gtp0->spare[1] = gtp0->spare[2] = 0xff; + gtp0->tid = cpu_to_be64(pctx->u.v0.tid); +} + +static inline void gtp1_push_header(struct sk_buff *skb, struct pdp_ctx *pctx) +{ + int payload_len = skb->len; + struct gtp1_header *gtp1; + + gtp1 = (struct gtp1_header *) skb_push(skb, sizeof(*gtp1)); + + /* Bits 8 7 6 5 4 3 2 1 + * +--+--+--+--+--+--+--+--+ + * |version |PT| 1| E| S|PN| + * +--+--+--+--+--+--+--+--+ + * 0 0 1 1 1 0 0 0 + */ + gtp1->flags = 0x38; /* v1, GTP-non-prime. */ + gtp1->type = GTP_TPDU; + gtp1->length = htons(payload_len); + gtp1->tid = htonl(pctx->u.v1.o_tei); + + /* TODO: Suppport for extension header, sequence number and N-PDU. + * Update the length field if any of them is available. + */ +} + +struct gtp_pktinfo { + struct sock *sk; + struct iphdr *iph; + struct flowi4 fl4; + struct rtable *rt; + struct pdp_ctx *pctx; + struct net_device *dev; + __be16 gtph_port; +}; + +static void gtp_push_header(struct sk_buff *skb, struct gtp_pktinfo *pktinfo) +{ + switch (pktinfo->pctx->gtp_version) { + case GTP_V0: + pktinfo->gtph_port = htons(GTP0_PORT); + gtp0_push_header(skb, pktinfo->pctx); + break; + case GTP_V1: + pktinfo->gtph_port = htons(GTP1U_PORT); + gtp1_push_header(skb, pktinfo->pctx); + break; + } +} + +static inline void gtp_set_pktinfo_ipv4(struct gtp_pktinfo *pktinfo, + struct sock *sk, struct iphdr *iph, + struct pdp_ctx *pctx, struct rtable *rt, + struct flowi4 *fl4, + struct net_device *dev) +{ + pktinfo->sk = sk; + pktinfo->iph = iph; + pktinfo->pctx = pctx; + pktinfo->rt = rt; + pktinfo->fl4 = *fl4; + pktinfo->dev = dev; +} + +static int gtp_build_skb_ip4(struct sk_buff *skb, struct net_device *dev, + struct gtp_pktinfo *pktinfo) +{ + struct gtp_dev *gtp = netdev_priv(dev); + struct pdp_ctx *pctx; + struct rtable *rt; + struct flowi4 fl4; + struct iphdr *iph; + struct sock *sk; + __be16 df; + int mtu; + + /* Read the IP destination address and resolve the PDP context. + * Prepend PDP header with TEI/TID from PDP ctx. + */ + iph = ip_hdr(skb); + pctx = ipv4_pdp_find(gtp, iph->daddr); + if (!pctx) { + netdev_dbg(dev, "no PDP ctx found for %pI4, skip\n", + &iph->daddr); + return -ENOENT; + } + netdev_dbg(dev, "found PDP context %p\n", pctx); + + switch (pctx->gtp_version) { + case GTP_V0: + if (gtp->sock0) + sk = gtp->sock0->sk; + else + sk = NULL; + break; + case GTP_V1: + if (gtp->sock1u) + sk = gtp->sock1u->sk; + else + sk = NULL; + break; + default: + return -ENOENT; + } + + if (!sk) { + netdev_dbg(dev, "no userspace socket is available, skip\n"); + return -ENOENT; + } + + rt = ip4_route_output_gtp(sock_net(sk), &fl4, gtp->sock0->sk, + pctx->sgsn_addr_ip4.s_addr); + if (IS_ERR(rt)) { + netdev_dbg(dev, "no route to SSGN %pI4\n", + &pctx->sgsn_addr_ip4.s_addr); + dev->stats.tx_carrier_errors++; + goto err; + } + + if (rt->dst.dev == dev) { + netdev_dbg(dev, "circular route to SSGN %pI4\n", + &pctx->sgsn_addr_ip4.s_addr); + dev->stats.collisions++; + goto err_rt; + } + + skb_dst_drop(skb); + + /* This is similar to tnl_update_pmtu(). */ + df = iph->frag_off; + if (df) { + mtu = dst_mtu(&rt->dst) - dev->hard_header_len - + sizeof(struct iphdr) - sizeof(struct udphdr); + switch (pctx->gtp_version) { + case GTP_V0: + mtu -= sizeof(struct gtp0_header); + break; + case GTP_V1: + mtu -= sizeof(struct gtp1_header); + break; + } + } else { + mtu = dst_mtu(&rt->dst); + } + + rt->dst.ops->update_pmtu(&rt->dst, NULL, skb, mtu); + + if (!skb_is_gso(skb) && (iph->frag_off & htons(IP_DF)) && + mtu < ntohs(iph->tot_len)) { + netdev_dbg(dev, "packet too big, fragmentation needed\n"); + memset(IPCB(skb), 0, sizeof(*IPCB(skb))); + icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, + htonl(mtu)); + goto err_rt; + } + + gtp_set_pktinfo_ipv4(pktinfo, sk, iph, pctx, rt, &fl4, dev); + gtp_push_header(skb, pktinfo); + + return 0; +err_rt: + ip_rt_put(rt); +err: + return -EBADMSG; +} + +static netdev_tx_t gtp_dev_xmit(struct sk_buff *skb, struct net_device *dev) +{ + unsigned int proto = ntohs(skb->protocol); + struct gtp_pktinfo pktinfo; + int err; + + /* Ensure there is sufficient headroom. */ + if (skb_cow_head(skb, dev->needed_headroom)) + goto tx_err; + + skb_reset_inner_headers(skb); + + /* PDP context lookups in gtp_build_skb_*() need rcu read-side lock. */ + rcu_read_lock(); + switch (proto) { + case ETH_P_IP: + err = gtp_build_skb_ip4(skb, dev, &pktinfo); + break; + default: + err = -EOPNOTSUPP; + break; + } + rcu_read_unlock(); + + if (err < 0) + goto tx_err; + + switch (proto) { + case ETH_P_IP: + netdev_dbg(pktinfo.dev, "gtp -> IP src: %pI4 dst: %pI4\n", + &pktinfo.iph->saddr, &pktinfo.iph->daddr); + udp_tunnel_xmit_skb(pktinfo.rt, pktinfo.sk, skb, + pktinfo.fl4.saddr, pktinfo.fl4.daddr, + pktinfo.iph->tos, + ip4_dst_hoplimit(&pktinfo.rt->dst), + htons(IP_DF), + pktinfo.gtph_port, pktinfo.gtph_port, + true, false); + break; + } + + return NETDEV_TX_OK; +tx_err: + dev->stats.tx_errors++; + dev_kfree_skb(skb); + return NETDEV_TX_OK; +} + +static const struct net_device_ops gtp_netdev_ops = { + .ndo_init = gtp_dev_init, + .ndo_uninit = gtp_dev_uninit, + .ndo_start_xmit = gtp_dev_xmit, + .ndo_get_stats64 = ip_tunnel_get_stats64, +}; + +static void gtp_link_setup(struct net_device *dev) +{ + dev->netdev_ops = >p_netdev_ops; + dev->destructor = free_netdev; + + dev->hard_header_len = 0; + dev->addr_len = 0; + + /* Zero header length. */ + dev->type = ARPHRD_NONE; + dev->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST; + + dev->priv_flags |= IFF_NO_QUEUE; + dev->features |= NETIF_F_LLTX; + netif_keep_dst(dev); + + /* Assume largest header, ie. GTPv0. */ + dev->needed_headroom = LL_MAX_HEADER + + sizeof(struct iphdr) + + sizeof(struct udphdr) + + sizeof(struct gtp0_header); +} + +static int gtp_hashtable_new(struct gtp_dev *gtp, int hsize); +static void gtp_hashtable_free(struct gtp_dev *gtp); +static int gtp_encap_enable(struct net_device *dev, struct gtp_dev *gtp, + int fd_gtp0, int fd_gtp1, struct net *src_net); + +static int gtp_newlink(struct net *src_net, struct net_device *dev, + struct nlattr *tb[], struct nlattr *data[]) +{ + int hashsize, err, fd0, fd1; + struct gtp_dev *gtp; + struct gtp_net *gn; + + if (!data[IFLA_GTP_FD0] || !data[IFLA_GTP_FD1]) + return -EINVAL; + + gtp = netdev_priv(dev); + + fd0 = nla_get_u32(data[IFLA_GTP_FD0]); + fd1 = nla_get_u32(data[IFLA_GTP_FD1]); + + err = gtp_encap_enable(dev, gtp, fd0, fd1, src_net); + if (err < 0) + goto out_err; + + if (!data[IFLA_GTP_PDP_HASHSIZE]) + hashsize = 1024; + else + hashsize = nla_get_u32(data[IFLA_GTP_PDP_HASHSIZE]); + + err = gtp_hashtable_new(gtp, hashsize); + if (err < 0) + goto out_encap; + + err = register_netdevice(dev); + if (err < 0) { + netdev_dbg(dev, "failed to register new netdev %d\n", err); + goto out_hashtable; + } + + gn = net_generic(dev_net(dev), gtp_net_id); + list_add_rcu(>p->list, &gn->gtp_dev_list); + + netdev_dbg(dev, "registered new GTP interface\n"); + + return 0; + +out_hashtable: + gtp_hashtable_free(gtp); +out_encap: + gtp_encap_disable(gtp); +out_err: + return err; +} + +static void gtp_dellink(struct net_device *dev, struct list_head *head) +{ + struct gtp_dev *gtp = netdev_priv(dev); + + gtp_encap_disable(gtp); + gtp_hashtable_free(gtp); + list_del_rcu(>p->list); + unregister_netdevice_queue(dev, head); +} + +static const struct nla_policy gtp_policy[IFLA_GTP_MAX + 1] = { + [IFLA_GTP_FD0] = { .type = NLA_U32 }, + [IFLA_GTP_FD1] = { .type = NLA_U32 }, + [IFLA_GTP_PDP_HASHSIZE] = { .type = NLA_U32 }, +}; + +static int gtp_validate(struct nlattr *tb[], struct nlattr *data[]) +{ + if (!data) + return -EINVAL; + + return 0; +} + +static size_t gtp_get_size(const struct net_device *dev) +{ + return nla_total_size(sizeof(__u32)); /* IFLA_GTP_PDP_HASHSIZE */ +} + +static int gtp_fill_info(struct sk_buff *skb, const struct net_device *dev) +{ + struct gtp_dev *gtp = netdev_priv(dev); + + if (nla_put_u32(skb, IFLA_GTP_PDP_HASHSIZE, gtp->hash_size)) + goto nla_put_failure; + + return 0; + +nla_put_failure: + return -EMSGSIZE; +} + +static struct rtnl_link_ops gtp_link_ops __read_mostly = { + .kind = "gtp", + .maxtype = IFLA_GTP_MAX, + .policy = gtp_policy, + .priv_size = sizeof(struct gtp_dev), + .setup = gtp_link_setup, + .validate = gtp_validate, + .newlink = gtp_newlink, + .dellink = gtp_dellink, + .get_size = gtp_get_size, + .fill_info = gtp_fill_info, +}; + +static struct net *gtp_genl_get_net(struct net *src_net, struct nlattr *tb[]) +{ + struct net *net; + + /* Examine the link attributes and figure out which network namespace + * we are talking about. + */ + if (tb[GTPA_NET_NS_FD]) + net = get_net_ns_by_fd(nla_get_u32(tb[GTPA_NET_NS_FD])); + else + net = get_net(src_net); + + return net; +} + +static int gtp_hashtable_new(struct gtp_dev *gtp, int hsize) +{ + int i; + + gtp->addr_hash = kmalloc(sizeof(struct hlist_head) * hsize, GFP_KERNEL); + if (gtp->addr_hash == NULL) + return -ENOMEM; + + gtp->tid_hash = kmalloc(sizeof(struct hlist_head) * hsize, GFP_KERNEL); + if (gtp->tid_hash == NULL) + goto err1; + + gtp->hash_size = hsize; + + for (i = 0; i < hsize; i++) { + INIT_HLIST_HEAD(>p->addr_hash[i]); + INIT_HLIST_HEAD(>p->tid_hash[i]); + } + return 0; +err1: + kfree(gtp->addr_hash); + return -ENOMEM; +} + +static void gtp_hashtable_free(struct gtp_dev *gtp) +{ + struct pdp_ctx *pctx; + int i; + + for (i = 0; i < gtp->hash_size; i++) { + hlist_for_each_entry_rcu(pctx, >p->tid_hash[i], hlist_tid) { + hlist_del_rcu(&pctx->hlist_tid); + hlist_del_rcu(&pctx->hlist_addr); + kfree_rcu(pctx, rcu_head); + } + } + synchronize_rcu(); + kfree(gtp->addr_hash); + kfree(gtp->tid_hash); +} + +static int gtp_encap_enable(struct net_device *dev, struct gtp_dev *gtp, + int fd_gtp0, int fd_gtp1, struct net *src_net) +{ + struct udp_tunnel_sock_cfg tuncfg = {NULL}; + struct socket *sock0, *sock1u; + int err; + + netdev_dbg(dev, "enable gtp on %d, %d\n", fd_gtp0, fd_gtp1); + + sock0 = sockfd_lookup(fd_gtp0, &err); + if (sock0 == NULL) { + netdev_dbg(dev, "socket fd=%d not found (gtp0)\n", fd_gtp0); + return -ENOENT; + } + + if (sock0->sk->sk_protocol != IPPROTO_UDP) { + netdev_dbg(dev, "socket fd=%d not UDP\n", fd_gtp0); + err = -EINVAL; + goto err1; + } + + sock1u = sockfd_lookup(fd_gtp1, &err); + if (sock1u == NULL) { + netdev_dbg(dev, "socket fd=%d not found (gtp1u)\n", fd_gtp1); + err = -ENOENT; + goto err1; + } + + if (sock1u->sk->sk_protocol != IPPROTO_UDP) { + netdev_dbg(dev, "socket fd=%d not UDP\n", fd_gtp1); + err = -EINVAL; + goto err2; + } + + netdev_dbg(dev, "enable gtp on %p, %p\n", sock0, sock1u); + + gtp->sock0 = sock0; + gtp->sock1u = sock1u; + gtp->net = src_net; + + tuncfg.sk_user_data = gtp; + tuncfg.encap_rcv = gtp_encap_recv; + tuncfg.encap_destroy = gtp_encap_destroy; + + tuncfg.encap_type = UDP_ENCAP_GTP0; + setup_udp_tunnel_sock(sock_net(gtp->sock0->sk), gtp->sock0, &tuncfg); + + tuncfg.encap_type = UDP_ENCAP_GTP1U; + setup_udp_tunnel_sock(sock_net(gtp->sock1u->sk), gtp->sock1u, &tuncfg); + + err = 0; +err2: + sockfd_put(sock1u); +err1: + sockfd_put(sock0); + return err; +} + +static struct net_device *gtp_find_dev(struct net *net, int ifindex) +{ + struct gtp_net *gn = net_generic(net, gtp_net_id); + struct gtp_dev *gtp; + + list_for_each_entry_rcu(gtp, &gn->gtp_dev_list, list) { + if (ifindex == gtp->dev->ifindex) + return gtp->dev; + } + return NULL; +} + +static void ipv4_pdp_fill(struct pdp_ctx *pctx, struct genl_info *info) +{ + pctx->gtp_version = nla_get_u32(info->attrs[GTPA_VERSION]); + pctx->af = AF_INET; + pctx->sgsn_addr_ip4.s_addr = + nla_get_be32(info->attrs[GTPA_SGSN_ADDRESS]); + pctx->ms_addr_ip4.s_addr = + nla_get_be32(info->attrs[GTPA_MS_ADDRESS]); + + switch (pctx->gtp_version) { + case GTP_V0: + /* According to TS 09.60, sections 7.5.1 and 7.5.2, the flow + * label needs to be the same for uplink and downlink packets, + * so let's annotate this. + */ + pctx->u.v0.tid = nla_get_u64(info->attrs[GTPA_TID]); + pctx->u.v0.flow = nla_get_u16(info->attrs[GTPA_FLOW]); + break; + case GTP_V1: + pctx->u.v1.i_tei = nla_get_u32(info->attrs[GTPA_I_TEI]); + pctx->u.v1.o_tei = nla_get_u32(info->attrs[GTPA_O_TEI]); + break; + default: + break; + } +} + +static int ipv4_pdp_add(struct net_device *dev, struct genl_info *info) +{ + struct gtp_dev *gtp = netdev_priv(dev); + u32 hash_ms, hash_tid = 0; + struct pdp_ctx *pctx; + bool found = false; + __be32 ms_addr; + + ms_addr = nla_get_be32(info->attrs[GTPA_MS_ADDRESS]); + hash_ms = ipv4_hashfn(ms_addr) % gtp->hash_size; + + hlist_for_each_entry_rcu(pctx, >p->addr_hash[hash_ms], hlist_addr) { + if (pctx->ms_addr_ip4.s_addr == ms_addr) { + found = true; + break; + } + } + + if (found) { + if (info->nlhdr->nlmsg_flags & NLM_F_EXCL) + return -EEXIST; + if (info->nlhdr->nlmsg_flags & NLM_F_REPLACE) + return -EOPNOTSUPP; + + ipv4_pdp_fill(pctx, info); + + if (pctx->gtp_version == GTP_V0) + netdev_dbg(dev, "GTPv0-U: update tunnel id = %llx (pdp %p)\n", + pctx->u.v0.tid, pctx); + else if (pctx->gtp_version == GTP_V1) + netdev_dbg(dev, "GTPv1-U: update tunnel id = %x/%x (pdp %p)\n", + pctx->u.v1.i_tei, pctx->u.v1.o_tei, pctx); + + return 0; + + } + + pctx = kmalloc(sizeof(struct pdp_ctx), GFP_KERNEL); + if (pctx == NULL) + return -ENOMEM; + + ipv4_pdp_fill(pctx, info); + atomic_set(&pctx->tx_seq, 0); + + switch (pctx->gtp_version) { + case GTP_V0: + /* TS 09.60: "The flow label identifies unambiguously a GTP + * flow.". We use the tid for this instead, I cannot find a + * situation in which this doesn't unambiguosly identify the + * PDP context. + */ + hash_tid = gtp0_hashfn(pctx->u.v0.tid) % gtp->hash_size; + break; + case GTP_V1: + hash_tid = gtp1u_hashfn(pctx->u.v1.i_tei) % gtp->hash_size; + break; + } + + hlist_add_head_rcu(&pctx->hlist_addr, >p->addr_hash[hash_ms]); + hlist_add_head_rcu(&pctx->hlist_tid, >p->tid_hash[hash_tid]); + + switch (pctx->gtp_version) { + case GTP_V0: + netdev_dbg(dev, "GTPv0-U: new PDP ctx id=%llx ssgn=%pI4 ms=%pI4 (pdp=%p)\n", + pctx->u.v0.tid, &pctx->sgsn_addr_ip4, + &pctx->ms_addr_ip4, pctx); + break; + case GTP_V1: + netdev_dbg(dev, "GTPv1-U: new PDP ctx id=%x/%x ssgn=%pI4 ms=%pI4 (pdp=%p)\n", + pctx->u.v1.i_tei, pctx->u.v1.o_tei, + &pctx->sgsn_addr_ip4, &pctx->ms_addr_ip4, pctx); + break; + } + + return 0; +} + +static int gtp_genl_new_pdp(struct sk_buff *skb, struct genl_info *info) +{ + struct net_device *dev; + struct net *net; + + if (!info->attrs[GTPA_VERSION] || + !info->attrs[GTPA_LINK] || + !info->attrs[GTPA_SGSN_ADDRESS] || + !info->attrs[GTPA_MS_ADDRESS]) + return -EINVAL; + + switch (nla_get_u32(info->attrs[GTPA_VERSION])) { + case GTP_V0: + if (!info->attrs[GTPA_TID] || + !info->attrs[GTPA_FLOW]) + return -EINVAL; + break; + case GTP_V1: + if (!info->attrs[GTPA_I_TEI] || + !info->attrs[GTPA_O_TEI]) + return -EINVAL; + break; + + default: + return -EINVAL; + } + + net = gtp_genl_get_net(sock_net(skb->sk), info->attrs); + if (IS_ERR(net)) + return PTR_ERR(net); + + /* Check if there's an existing gtpX device to configure */ + dev = gtp_find_dev(net, nla_get_u32(info->attrs[GTPA_LINK])); + if (dev == NULL) + return -ENODEV; + + return ipv4_pdp_add(dev, info); +} + +static int gtp_genl_del_pdp(struct sk_buff *skb, struct genl_info *info) +{ + struct net_device *dev; + struct pdp_ctx *pctx; + struct gtp_dev *gtp; + struct net *net; + + if (!info->attrs[GTPA_VERSION] || + !info->attrs[GTPA_LINK]) + return -EINVAL; + + net = gtp_genl_get_net(sock_net(skb->sk), info->attrs); + if (IS_ERR(net)) + return PTR_ERR(net); + + /* Check if there's an existing gtpX device to configure */ + dev = gtp_find_dev(net, nla_get_u32(info->attrs[GTPA_LINK])); + if (dev == NULL) + return -ENODEV; + + gtp = netdev_priv(dev); + + switch (nla_get_u32(info->attrs[GTPA_VERSION])) { + case GTP_V0: + if (!info->attrs[GTPA_TID]) + return -EINVAL; + pctx = gtp0_pdp_find(gtp, nla_get_u64(info->attrs[GTPA_TID])); + break; + case GTP_V1: + if (!info->attrs[GTPA_I_TEI]) + return -EINVAL; + pctx = gtp1_pdp_find(gtp, nla_get_u64(info->attrs[GTPA_I_TEI])); + break; + + default: + return -EINVAL; + } + + if (pctx == NULL) + return -ENOENT; + + if (pctx->gtp_version == GTP_V0) + netdev_dbg(dev, "GTPv0-U: deleting tunnel id = %llx (pdp %p)\n", + pctx->u.v0.tid, pctx); + else if (pctx->gtp_version == GTP_V1) + netdev_dbg(dev, "GTPv1-U: deleting tunnel id = %x/%x (pdp %p)\n", + pctx->u.v1.i_tei, pctx->u.v1.o_tei, pctx); + + hlist_del_rcu(&pctx->hlist_tid); + hlist_del_rcu(&pctx->hlist_addr); + kfree_rcu(pctx, rcu_head); + + return 0; +} + +static struct genl_family gtp_genl_family = { + .id = GENL_ID_GENERATE, + .name = "gtp", + .version = 0, + .hdrsize = 0, + .maxattr = GTPA_MAX, + .netnsok = true, +}; + +static int gtp_genl_fill_info(struct sk_buff *skb, u32 snd_portid, u32 snd_seq, + u32 type, struct pdp_ctx *pctx) +{ + void *genlh; + + genlh = genlmsg_put(skb, snd_portid, snd_seq, >p_genl_family, 0, + type); + if (genlh == NULL) + goto nlmsg_failure; + + if (nla_put_u32(skb, GTPA_VERSION, pctx->gtp_version) || + nla_put_be32(skb, GTPA_SGSN_ADDRESS, pctx->sgsn_addr_ip4.s_addr) || + nla_put_be32(skb, GTPA_MS_ADDRESS, pctx->ms_addr_ip4.s_addr)) + goto nla_put_failure; + + switch (pctx->gtp_version) { + case GTP_V0: + if (nla_put_u64_64bit(skb, GTPA_TID, pctx->u.v0.tid, GTPA_PAD) || + nla_put_u16(skb, GTPA_FLOW, pctx->u.v0.flow)) + goto nla_put_failure; + break; + case GTP_V1: + if (nla_put_u32(skb, GTPA_I_TEI, pctx->u.v1.i_tei) || + nla_put_u32(skb, GTPA_O_TEI, pctx->u.v1.o_tei)) + goto nla_put_failure; + break; + } + genlmsg_end(skb, genlh); + return 0; + +nlmsg_failure: +nla_put_failure: + genlmsg_cancel(skb, genlh); + return -EMSGSIZE; +} + +static int gtp_genl_get_pdp(struct sk_buff *skb, struct genl_info *info) +{ + struct pdp_ctx *pctx = NULL; + struct net_device *dev; + struct sk_buff *skb2; + struct gtp_dev *gtp; + u32 gtp_version; + struct net *net; + int err; + + if (!info->attrs[GTPA_VERSION] || + !info->attrs[GTPA_LINK]) + return -EINVAL; + + gtp_version = nla_get_u32(info->attrs[GTPA_VERSION]); + switch (gtp_version) { + case GTP_V0: + case GTP_V1: + break; + default: + return -EINVAL; + } + + net = gtp_genl_get_net(sock_net(skb->sk), info->attrs); + if (IS_ERR(net)) + return PTR_ERR(net); + + /* Check if there's an existing gtpX device to configure */ + dev = gtp_find_dev(net, nla_get_u32(info->attrs[GTPA_LINK])); + if (dev == NULL) + return -ENODEV; + + gtp = netdev_priv(dev); + + rcu_read_lock(); + if (gtp_version == GTP_V0 && + info->attrs[GTPA_TID]) { + u64 tid = nla_get_u64(info->attrs[GTPA_TID]); + + pctx = gtp0_pdp_find(gtp, tid); + } else if (gtp_version == GTP_V1 && + info->attrs[GTPA_I_TEI]) { + u32 tid = nla_get_u32(info->attrs[GTPA_I_TEI]); + + pctx = gtp1_pdp_find(gtp, tid); + } else if (info->attrs[GTPA_MS_ADDRESS]) { + __be32 ip = nla_get_be32(info->attrs[GTPA_MS_ADDRESS]); + + pctx = ipv4_pdp_find(gtp, ip); + } + + if (pctx == NULL) { + err = -ENOENT; + goto err_unlock; + } + + skb2 = genlmsg_new(NLMSG_GOODSIZE, GFP_ATOMIC); + if (skb2 == NULL) { + err = -ENOMEM; + goto err_unlock; + } + + err = gtp_genl_fill_info(skb2, NETLINK_CB(skb).portid, + info->snd_seq, info->nlhdr->nlmsg_type, pctx); + if (err < 0) + goto err_unlock_free; + + rcu_read_unlock(); + return genlmsg_unicast(genl_info_net(info), skb2, info->snd_portid); + +err_unlock_free: + kfree_skb(skb2); +err_unlock: + rcu_read_unlock(); + return err; +} + +static int gtp_genl_dump_pdp(struct sk_buff *skb, + struct netlink_callback *cb) +{ + struct gtp_dev *last_gtp = (struct gtp_dev *)cb->args[2], *gtp; + struct net *net = sock_net(skb->sk); + struct gtp_net *gn = net_generic(net, gtp_net_id); + unsigned long tid = cb->args[1]; + int i, k = cb->args[0], ret; + struct pdp_ctx *pctx; + + if (cb->args[4]) + return 0; + + list_for_each_entry_rcu(gtp, &gn->gtp_dev_list, list) { + if (last_gtp && last_gtp != gtp) + continue; + else + last_gtp = NULL; + + for (i = k; i < gtp->hash_size; i++) { + hlist_for_each_entry_rcu(pctx, >p->tid_hash[i], hlist_tid) { + if (tid && tid != pctx->u.tid) + continue; + else + tid = 0; + + ret = gtp_genl_fill_info(skb, + NETLINK_CB(cb->skb).portid, + cb->nlh->nlmsg_seq, + cb->nlh->nlmsg_type, pctx); + if (ret < 0) { + cb->args[0] = i; + cb->args[1] = pctx->u.tid; + cb->args[2] = (unsigned long)gtp; + goto out; + } + } + } + } + cb->args[4] = 1; +out: + return skb->len; +} + +static struct nla_policy gtp_genl_policy[GTPA_MAX + 1] = { + [GTPA_LINK] = { .type = NLA_U32, }, + [GTPA_VERSION] = { .type = NLA_U32, }, + [GTPA_TID] = { .type = NLA_U64, }, + [GTPA_SGSN_ADDRESS] = { .type = NLA_U32, }, + [GTPA_MS_ADDRESS] = { .type = NLA_U32, }, + [GTPA_FLOW] = { .type = NLA_U16, }, + [GTPA_NET_NS_FD] = { .type = NLA_U32, }, + [GTPA_I_TEI] = { .type = NLA_U32, }, + [GTPA_O_TEI] = { .type = NLA_U32, }, +}; + +static const struct genl_ops gtp_genl_ops[] = { + { + .cmd = GTP_CMD_NEWPDP, + .doit = gtp_genl_new_pdp, + .policy = gtp_genl_policy, + .flags = GENL_ADMIN_PERM, + }, + { + .cmd = GTP_CMD_DELPDP, + .doit = gtp_genl_del_pdp, + .policy = gtp_genl_policy, + .flags = GENL_ADMIN_PERM, + }, + { + .cmd = GTP_CMD_GETPDP, + .doit = gtp_genl_get_pdp, + .dumpit = gtp_genl_dump_pdp, + .policy = gtp_genl_policy, + .flags = GENL_ADMIN_PERM, + }, +}; + +static int __net_init gtp_net_init(struct net *net) +{ + struct gtp_net *gn = net_generic(net, gtp_net_id); + + INIT_LIST_HEAD(&gn->gtp_dev_list); + return 0; +} + +static void __net_exit gtp_net_exit(struct net *net) +{ + struct gtp_net *gn = net_generic(net, gtp_net_id); + struct gtp_dev *gtp; + LIST_HEAD(list); + + rtnl_lock(); + list_for_each_entry(gtp, &gn->gtp_dev_list, list) + gtp_dellink(gtp->dev, &list); + + unregister_netdevice_many(&list); + rtnl_unlock(); +} + +static struct pernet_operations gtp_net_ops = { + .init = gtp_net_init, + .exit = gtp_net_exit, + .id = >p_net_id, + .size = sizeof(struct gtp_net), +}; + +static int __init gtp_init(void) +{ + int err; + + get_random_bytes(>p_h_initval, sizeof(gtp_h_initval)); + + err = rtnl_link_register(>p_link_ops); + if (err < 0) + goto error_out; + + err = genl_register_family_with_ops(>p_genl_family, gtp_genl_ops); + if (err < 0) + goto unreg_rtnl_link; + + err = register_pernet_subsys(>p_net_ops); + if (err < 0) + goto unreg_genl_family; + + pr_info("GTP module loaded (pdp ctx size %Zd bytes)\n", + sizeof(struct pdp_ctx)); + return 0; + +unreg_genl_family: + genl_unregister_family(>p_genl_family); +unreg_rtnl_link: + rtnl_link_unregister(>p_link_ops); +error_out: + pr_err("error loading GTP module loaded\n"); + return err; +} +late_initcall(gtp_init); + +static void __exit gtp_fini(void) +{ + unregister_pernet_subsys(>p_net_ops); + genl_unregister_family(>p_genl_family); + rtnl_link_unregister(>p_link_ops); + + pr_info("GTP module unloaded\n"); +} +module_exit(gtp_fini); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Harald Welte "); +MODULE_DESCRIPTION("Interface driver for GTP encapsulated traffic"); +MODULE_ALIAS_RTNL_LINK("gtp"); diff --git a/include/net/gtp.h b/include/net/gtp.h new file mode 100644 index 0000000..894a37b --- /dev/null +++ b/include/net/gtp.h @@ -0,0 +1,34 @@ +#ifndef _GTP_H_ +#define _GTP_H + +/* General GTP protocol related definitions. */ + +#define GTP0_PORT 3386 +#define GTP1U_PORT 2152 + +#define GTP_TPDU 255 + +struct gtp0_header { /* According to GSM TS 09.60. */ + __u8 flags; + __u8 type; + __be16 length; + __be16 seq; + __be16 flow; + __u8 number; + __u8 spare[3]; + __be64 tid; +} __attribute__ ((packed)); + +struct gtp1_header { /* According to 3GPP TS 29.060. */ + __u8 flags; + __u8 type; + __be16 length; + __be32 tid; +} __attribute__ ((packed)); + +#define GTP1_F_NPDU 0x01 +#define GTP1_F_SEQ 0x02 +#define GTP1_F_EXTHDR 0x04 +#define GTP1_F_MASK 0x07 + +#endif diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index 813ffb2e..8bdae34 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild @@ -141,6 +141,7 @@ header-y += gfs2_ondisk.h header-y += gigaset_dev.h header-y += gpio.h header-y += gsmmux.h +header-y += gtp.h header-y += hdlcdrv.h header-y += hdlc.h header-y += hdreg.h diff --git a/include/uapi/linux/gtp.h b/include/uapi/linux/gtp.h new file mode 100644 index 0000000..ca1054d --- /dev/null +++ b/include/uapi/linux/gtp.h @@ -0,0 +1,33 @@ +#ifndef _UAPI_LINUX_GTP_H_ +#define _UAPI_LINUX_GTP_H__ + +enum gtp_genl_cmds { + GTP_CMD_NEWPDP, + GTP_CMD_DELPDP, + GTP_CMD_GETPDP, + + GTP_CMD_MAX, +}; + +enum gtp_version { + GTP_V0 = 0, + GTP_V1, +}; + +enum gtp_attrs { + GTPA_UNSPEC = 0, + GTPA_LINK, + GTPA_VERSION, + GTPA_TID, /* for GTPv0 only */ + GTPA_SGSN_ADDRESS, + GTPA_MS_ADDRESS, + GTPA_FLOW, + GTPA_NET_NS_FD, + GTPA_I_TEI, /* for GTPv1 only */ + GTPA_O_TEI, /* for GTPv1 only */ + GTPA_PAD, + __GTPA_MAX, +}; +#define GTPA_MAX (__GTPA_MAX + 1) + +#endif /* _UAPI_LINUX_GTP_H_ */ diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index ba69d44..a3f53c9 100644 --- a/include/uapi/linux/if_link.h +++ b/include/uapi/linux/if_link.h @@ -517,6 +517,16 @@ enum { }; #define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1) +/* GTP section */ +enum { + IFLA_GTP_UNSPEC, + IFLA_GTP_FD0, + IFLA_GTP_FD1, + IFLA_GTP_PDP_HASHSIZE, + __IFLA_GTP_MAX, +}; +#define IFLA_GTP_MAX (__IFLA_GTP_MAX - 1) + /* Bonding section */ enum { diff --git a/include/uapi/linux/udp.h b/include/uapi/linux/udp.h index 16574ea..2c8180f 100644 --- a/include/uapi/linux/udp.h +++ b/include/uapi/linux/udp.h @@ -36,6 +36,7 @@ struct udphdr { #define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */ #define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-06 */ #define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */ - +#define UDP_ENCAP_GTP0 4 /* GSM TS 09.60 */ +#define UDP_ENCAP_GTP1U 5 /* 3GPP TS 29.060 */ #endif /* _UAPI_LINUX_UDP_H */ -- 2.1.4 From pablo at netfilter.org Sun May 8 22:55:48 2016 From: pablo at netfilter.org (Pablo Neira Ayuso) Date: Mon, 9 May 2016 00:55:48 +0200 Subject: [PATCH nf-next, v2] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) Message-ID: <1462748148-17764-1-git-send-email-pablo@netfilter.org> This is an initial implementation of a netdev driver for GTP datapath (GTP-U) v0 and v1, according to the GSM TS 09.60 and 3GPP TS 29.060 standards. This tunneling protocol is used to prevent subscribers from accessing mobile carrier core network infrastructure. This implementation requires a GGSN userspace daemon that implements the signaling protocol (GTP-C), such as OpenGGSN [1]. This userspace daemon updates the PDP context database that represents active subscriber sessions through a genetlink interface. For more context on this tunneling protocol, you can check the slides that were presented during the NetDev 1.1 [2]. Only IPv4 is supported at this time. [1] http://git.osmocom.org/openggsn/ [2] http://www.netdevconf.org/1.1/proceedings/slides/schultz-welte-osmocom-gtp.pdf Signed-off-by: Pablo Neira Ayuso --- v2: Rebase on top of current HEAD to resolve minor conflict with recent PPP updates in include/uapi/linux/if_link.h so this applies cleanly. drivers/net/Kconfig | 17 + drivers/net/Makefile | 1 + drivers/net/gtp.c | 1364 ++++++++++++++++++++++++++++++++++++++++++ include/net/gtp.h | 34 ++ include/uapi/linux/Kbuild | 1 + include/uapi/linux/gtp.h | 33 + include/uapi/linux/if_link.h | 10 + include/uapi/linux/udp.h | 3 +- 8 files changed, 1462 insertions(+), 1 deletion(-) create mode 100644 drivers/net/gtp.c create mode 100644 include/net/gtp.h create mode 100644 include/uapi/linux/gtp.h diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index befd67d..0c5415b 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -192,6 +192,23 @@ config GENEVE To compile this driver as a module, choose M here: the module will be called geneve. +config GTP + tristate "GPRS Tunneling Protocol datapath (GTP-U)" + depends on INET && NET_UDP_TUNNEL + select NET_IP_TUNNEL + ---help--- + This allows one to create gtp virtual interfaces that provide + the GPRS Tunneling Protocol datapath (GTP-U). This tunneling protocol + is used to prevent subscribers from accessing mobile carrier core + network infrastructure. This driver requires a userspace software that + implements the signaling protocol (GTP-C) to update its PDP context + base, such as OpenGGSN + * + * Author: Harald Welte + * Pablo Neira Ayuso + * Andreas Schultz + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + */ + +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* An active session for the subscriber. */ +struct pdp_ctx { + struct hlist_node hlist_tid; + struct hlist_node hlist_addr; + + union { + u64 tid; + struct { + u64 tid; + u16 flow; + } v0; + struct { + u32 i_tei; + u32 o_tei; + } v1; + } u; + u8 gtp_version; + u16 af; + + struct in_addr ms_addr_ip4; + struct in_addr sgsn_addr_ip4; + + atomic_t tx_seq; + struct rcu_head rcu_head; +}; + +/* One instance of the GTP device. */ +struct gtp_dev { + struct list_head list; + + struct socket *sock0; + struct socket *sock1u; + + struct net *net; + struct net_device *dev; + + unsigned int hash_size; + struct hlist_head *tid_hash; + struct hlist_head *addr_hash; +}; + +static int gtp_net_id __read_mostly; + +struct gtp_net { + struct list_head gtp_dev_list; +}; + +static u32 gtp_h_initval; + +static inline u32 gtp0_hashfn(u64 tid) +{ + u32 *tid32 = (u32 *) &tid; + return jhash_2words(tid32[0], tid32[1], gtp_h_initval); +} + +static inline u32 gtp1u_hashfn(u32 tid) +{ + return jhash_1word(tid, gtp_h_initval); +} + +static inline u32 ipv4_hashfn(__be32 ip) +{ + return jhash_1word((__force u32)ip, gtp_h_initval); +} + +/* Resolve a PDP context structure based on the 64bit TID. */ +static struct pdp_ctx *gtp0_pdp_find(struct gtp_dev *gtp, u64 tid) +{ + struct hlist_head *head; + struct pdp_ctx *pdp; + + head = >p->tid_hash[gtp0_hashfn(tid) % gtp->hash_size]; + + hlist_for_each_entry_rcu(pdp, head, hlist_tid) { + if (pdp->gtp_version == GTP_V0 && + pdp->u.v0.tid == tid) + return pdp; + } + return NULL; +} + +/* Resolve a PDP context structure based on the 32bit TEI. */ +static struct pdp_ctx *gtp1_pdp_find(struct gtp_dev *gtp, u32 tid) +{ + struct hlist_head *head; + struct pdp_ctx *pdp; + + head = >p->tid_hash[gtp1u_hashfn(tid) % gtp->hash_size]; + + hlist_for_each_entry_rcu(pdp, head, hlist_tid) { + if (pdp->gtp_version == GTP_V1 && + pdp->u.v1.i_tei == tid) + return pdp; + } + return NULL; +} + +/* Resolve a PDP context based on IPv4 address of MS. */ +static struct pdp_ctx *ipv4_pdp_find(struct gtp_dev *gtp, __be32 ms_addr) +{ + struct hlist_head *head; + struct pdp_ctx *pdp; + + head = >p->addr_hash[ipv4_hashfn(ms_addr) % gtp->hash_size]; + + hlist_for_each_entry_rcu(pdp, head, hlist_addr) { + if (pdp->af == AF_INET && + pdp->ms_addr_ip4.s_addr == ms_addr) + return pdp; + } + + return NULL; +} + +static bool gtp_check_src_ms_ipv4(struct sk_buff *skb, struct pdp_ctx *pctx, + unsigned int hdrlen) +{ + struct iphdr *iph; + + if (!pskb_may_pull(skb, hdrlen + sizeof(struct iphdr))) + return false; + + iph = (struct iphdr *)(skb->data + hdrlen + sizeof(struct iphdr)); + + return iph->saddr != pctx->ms_addr_ip4.s_addr; +} + +/* Check if the inner IP source address in this packet is assigned to any + * existing mobile subscriber. + */ +static bool gtp_check_src_ms(struct sk_buff *skb, struct pdp_ctx *pctx, + unsigned int hdrlen) +{ + switch (ntohs(skb->protocol)) { + case ETH_P_IP: + return gtp_check_src_ms_ipv4(skb, pctx, hdrlen); + } + return false; +} + +/* 1 means pass up to the stack, -1 means drop and 0 means decapsulated. */ +static int gtp0_udp_encap_recv(struct gtp_dev *gtp, struct sk_buff *skb, + bool xnet) +{ + unsigned int hdrlen = sizeof(struct udphdr) + + sizeof(struct gtp0_header); + struct gtp0_header *gtp0; + struct pdp_ctx *pctx; + int ret = 0; + + if (!pskb_may_pull(skb, hdrlen)) + return -1; + + gtp0 = (struct gtp0_header *)(skb->data + sizeof(struct udphdr)); + + if ((gtp0->flags >> 5) != GTP_V0) + return 1; + + if (gtp0->type != GTP_TPDU) + return 1; + + rcu_read_lock(); + pctx = gtp0_pdp_find(gtp, be64_to_cpu(gtp0->tid)); + if (!pctx) { + netdev_dbg(gtp->dev, "No PDP ctx to decap skb=%p\n", skb); + ret = -1; + goto out_rcu; + } + + if (!gtp_check_src_ms(skb, pctx, hdrlen)) { + netdev_dbg(gtp->dev, "No PDP ctx for this MS\n"); + ret = -1; + goto out_rcu; + } + rcu_read_unlock(); + + /* Get rid of the GTP + UDP headers. */ + return iptunnel_pull_header(skb, hdrlen, skb->protocol, xnet); +out_rcu: + rcu_read_unlock(); + return ret; +} + +static int gtp1u_udp_encap_recv(struct gtp_dev *gtp, struct sk_buff *skb, + bool xnet) +{ + unsigned int hdrlen = sizeof(struct udphdr) + + sizeof(struct gtp1_header); + struct gtp1_header *gtp1; + struct pdp_ctx *pctx; + int ret = 0; + + if (!pskb_may_pull(skb, hdrlen)) + return -1; + + gtp1 = (struct gtp1_header *)(skb->data + sizeof(struct udphdr)); + + if ((gtp1->flags >> 5) != GTP_V1) + return 1; + + if (gtp1->type != GTP_TPDU) + return 1; + + /* From 29.060: "This field shall be present if and only if any one or + * more of the S, PN and E flags are set.". + * + * If any of the bit is set, then the remaining ones also have to be + * set. + */ + if (gtp1->flags & GTP1_F_MASK) + hdrlen += 4; + + /* Make sure the header is larger enough, including extensions. */ + if (!pskb_may_pull(skb, hdrlen)) + return -1; + + rcu_read_lock(); + pctx = gtp1_pdp_find(gtp, ntohl(gtp1->tid)); + if (!pctx) { + netdev_dbg(gtp->dev, "No PDP ctx to decap skb=%p\n", skb); + ret = -1; + goto out_rcu; + } + + if (!gtp_check_src_ms(skb, pctx, hdrlen)) { + netdev_dbg(gtp->dev, "No PDP ctx for this MS\n"); + ret = -1; + goto out_rcu; + } + rcu_read_unlock(); + + /* Get rid of the GTP + UDP headers. */ + return iptunnel_pull_header(skb, hdrlen, skb->protocol, xnet); +out_rcu: + rcu_read_unlock(); + return ret; +} + +static void gtp_encap_disable(struct gtp_dev *gtp) +{ + if (gtp->sock0 && gtp->sock0->sk) { + udp_sk(gtp->sock0->sk)->encap_type = 0; + rcu_assign_sk_user_data(gtp->sock0->sk, NULL); + } + if (gtp->sock1u && gtp->sock1u->sk) { + udp_sk(gtp->sock1u->sk)->encap_type = 0; + rcu_assign_sk_user_data(gtp->sock1u->sk, NULL); + } + + gtp->sock0 = NULL; + gtp->sock1u = NULL; +} + +static void gtp_encap_destroy(struct sock *sk) +{ + struct gtp_dev *gtp; + + gtp = rcu_dereference_sk_user_data(sk); + if (gtp) + gtp_encap_disable(gtp); +} + +/* UDP encapsulation receive handler. See net/ipv4/udp.c. + * Return codes: 0: success, <0: error, >0: pass up to userspace UDP socket. + */ +static int gtp_encap_recv(struct sock *sk, struct sk_buff *skb) +{ + struct pcpu_sw_netstats *stats; + struct gtp_dev *gtp; + bool xnet; + int ret; + + gtp = rcu_dereference_sk_user_data(sk); + if (!gtp) + return 1; + + netdev_dbg(gtp->dev, "encap_recv sk=%p\n", sk); + + xnet = !net_eq(gtp->net, dev_net(gtp->dev)); + + switch (udp_sk(sk)->encap_type) { + case UDP_ENCAP_GTP0: + netdev_dbg(gtp->dev, "received GTP0 packet\n"); + ret = gtp0_udp_encap_recv(gtp, skb, xnet); + break; + case UDP_ENCAP_GTP1U: + netdev_dbg(gtp->dev, "received GTP1U packet\n"); + ret = gtp1u_udp_encap_recv(gtp, skb, xnet); + break; + default: + ret = -1; /* Shouldn't happen. */ + } + + switch (ret) { + case 1: + netdev_dbg(gtp->dev, "pass up to the process\n"); + return 1; + case 0: + netdev_dbg(gtp->dev, "forwarding packet from GGSN to uplink\n"); + break; + case -1: + netdev_dbg(gtp->dev, "GTP packet has been dropped\n"); + kfree_skb(skb); + return 0; + } + + /* Now that the UDP and the GTP header have been removed, set up the + * new network header. This is required by the upper layer to + * calculate the transport header. + */ + skb_reset_network_header(skb); + + skb->dev = gtp->dev; + + stats = this_cpu_ptr(gtp->dev->tstats); + u64_stats_update_begin(&stats->syncp); + stats->rx_packets++; + stats->rx_bytes += skb->len; + u64_stats_update_end(&stats->syncp); + + netif_rx(skb); + + return 0; +} + +static int gtp_dev_init(struct net_device *dev) +{ + struct gtp_dev *gtp = netdev_priv(dev); + + gtp->dev = dev; + + dev->tstats = alloc_percpu(struct pcpu_sw_netstats); + if (!dev->tstats) + return -ENOMEM; + + return 0; +} + +static void gtp_dev_uninit(struct net_device *dev) +{ + struct gtp_dev *gtp = netdev_priv(dev); + + gtp_encap_disable(gtp); + free_percpu(dev->tstats); +} + +static struct rtable *ip4_route_output_gtp(struct net *net, struct flowi4 *fl4, + const struct sock *sk, __be32 daddr) +{ + memset(fl4, 0, sizeof(*fl4)); + fl4->flowi4_oif = sk->sk_bound_dev_if; + fl4->daddr = daddr; + fl4->saddr = inet_sk(sk)->inet_saddr; + fl4->flowi4_tos = RT_CONN_FLAGS(sk); + fl4->flowi4_proto = sk->sk_protocol; + + return ip_route_output_key(net, fl4); +} + +static inline void gtp0_push_header(struct sk_buff *skb, struct pdp_ctx *pctx) +{ + int payload_len = skb->len; + struct gtp0_header *gtp0; + + gtp0 = (struct gtp0_header *) skb_push(skb, sizeof(*gtp0)); + + gtp0->flags = 0x1e; /* v0, GTP-non-prime. */ + gtp0->type = GTP_TPDU; + gtp0->length = htons(payload_len); + gtp0->seq = htons((atomic_inc_return(&pctx->tx_seq) - 1) % 0xffff); + gtp0->flow = htons(pctx->u.v0.flow); + gtp0->number = 0xff; + gtp0->spare[0] = gtp0->spare[1] = gtp0->spare[2] = 0xff; + gtp0->tid = cpu_to_be64(pctx->u.v0.tid); +} + +static inline void gtp1_push_header(struct sk_buff *skb, struct pdp_ctx *pctx) +{ + int payload_len = skb->len; + struct gtp1_header *gtp1; + + gtp1 = (struct gtp1_header *) skb_push(skb, sizeof(*gtp1)); + + /* Bits 8 7 6 5 4 3 2 1 + * +--+--+--+--+--+--+--+--+ + * |version |PT| 1| E| S|PN| + * +--+--+--+--+--+--+--+--+ + * 0 0 1 1 1 0 0 0 + */ + gtp1->flags = 0x38; /* v1, GTP-non-prime. */ + gtp1->type = GTP_TPDU; + gtp1->length = htons(payload_len); + gtp1->tid = htonl(pctx->u.v1.o_tei); + + /* TODO: Suppport for extension header, sequence number and N-PDU. + * Update the length field if any of them is available. + */ +} + +struct gtp_pktinfo { + struct sock *sk; + struct iphdr *iph; + struct flowi4 fl4; + struct rtable *rt; + struct pdp_ctx *pctx; + struct net_device *dev; + __be16 gtph_port; +}; + +static void gtp_push_header(struct sk_buff *skb, struct gtp_pktinfo *pktinfo) +{ + switch (pktinfo->pctx->gtp_version) { + case GTP_V0: + pktinfo->gtph_port = htons(GTP0_PORT); + gtp0_push_header(skb, pktinfo->pctx); + break; + case GTP_V1: + pktinfo->gtph_port = htons(GTP1U_PORT); + gtp1_push_header(skb, pktinfo->pctx); + break; + } +} + +static inline void gtp_set_pktinfo_ipv4(struct gtp_pktinfo *pktinfo, + struct sock *sk, struct iphdr *iph, + struct pdp_ctx *pctx, struct rtable *rt, + struct flowi4 *fl4, + struct net_device *dev) +{ + pktinfo->sk = sk; + pktinfo->iph = iph; + pktinfo->pctx = pctx; + pktinfo->rt = rt; + pktinfo->fl4 = *fl4; + pktinfo->dev = dev; +} + +static int gtp_build_skb_ip4(struct sk_buff *skb, struct net_device *dev, + struct gtp_pktinfo *pktinfo) +{ + struct gtp_dev *gtp = netdev_priv(dev); + struct pdp_ctx *pctx; + struct rtable *rt; + struct flowi4 fl4; + struct iphdr *iph; + struct sock *sk; + __be16 df; + int mtu; + + /* Read the IP destination address and resolve the PDP context. + * Prepend PDP header with TEI/TID from PDP ctx. + */ + iph = ip_hdr(skb); + pctx = ipv4_pdp_find(gtp, iph->daddr); + if (!pctx) { + netdev_dbg(dev, "no PDP ctx found for %pI4, skip\n", + &iph->daddr); + return -ENOENT; + } + netdev_dbg(dev, "found PDP context %p\n", pctx); + + switch (pctx->gtp_version) { + case GTP_V0: + if (gtp->sock0) + sk = gtp->sock0->sk; + else + sk = NULL; + break; + case GTP_V1: + if (gtp->sock1u) + sk = gtp->sock1u->sk; + else + sk = NULL; + break; + default: + return -ENOENT; + } + + if (!sk) { + netdev_dbg(dev, "no userspace socket is available, skip\n"); + return -ENOENT; + } + + rt = ip4_route_output_gtp(sock_net(sk), &fl4, gtp->sock0->sk, + pctx->sgsn_addr_ip4.s_addr); + if (IS_ERR(rt)) { + netdev_dbg(dev, "no route to SSGN %pI4\n", + &pctx->sgsn_addr_ip4.s_addr); + dev->stats.tx_carrier_errors++; + goto err; + } + + if (rt->dst.dev == dev) { + netdev_dbg(dev, "circular route to SSGN %pI4\n", + &pctx->sgsn_addr_ip4.s_addr); + dev->stats.collisions++; + goto err_rt; + } + + skb_dst_drop(skb); + + /* This is similar to tnl_update_pmtu(). */ + df = iph->frag_off; + if (df) { + mtu = dst_mtu(&rt->dst) - dev->hard_header_len - + sizeof(struct iphdr) - sizeof(struct udphdr); + switch (pctx->gtp_version) { + case GTP_V0: + mtu -= sizeof(struct gtp0_header); + break; + case GTP_V1: + mtu -= sizeof(struct gtp1_header); + break; + } + } else { + mtu = dst_mtu(&rt->dst); + } + + rt->dst.ops->update_pmtu(&rt->dst, NULL, skb, mtu); + + if (!skb_is_gso(skb) && (iph->frag_off & htons(IP_DF)) && + mtu < ntohs(iph->tot_len)) { + netdev_dbg(dev, "packet too big, fragmentation needed\n"); + memset(IPCB(skb), 0, sizeof(*IPCB(skb))); + icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, + htonl(mtu)); + goto err_rt; + } + + gtp_set_pktinfo_ipv4(pktinfo, sk, iph, pctx, rt, &fl4, dev); + gtp_push_header(skb, pktinfo); + + return 0; +err_rt: + ip_rt_put(rt); +err: + return -EBADMSG; +} + +static netdev_tx_t gtp_dev_xmit(struct sk_buff *skb, struct net_device *dev) +{ + unsigned int proto = ntohs(skb->protocol); + struct gtp_pktinfo pktinfo; + int err; + + /* Ensure there is sufficient headroom. */ + if (skb_cow_head(skb, dev->needed_headroom)) + goto tx_err; + + skb_reset_inner_headers(skb); + + /* PDP context lookups in gtp_build_skb_*() need rcu read-side lock. */ + rcu_read_lock(); + switch (proto) { + case ETH_P_IP: + err = gtp_build_skb_ip4(skb, dev, &pktinfo); + break; + default: + err = -EOPNOTSUPP; + break; + } + rcu_read_unlock(); + + if (err < 0) + goto tx_err; + + switch (proto) { + case ETH_P_IP: + netdev_dbg(pktinfo.dev, "gtp -> IP src: %pI4 dst: %pI4\n", + &pktinfo.iph->saddr, &pktinfo.iph->daddr); + udp_tunnel_xmit_skb(pktinfo.rt, pktinfo.sk, skb, + pktinfo.fl4.saddr, pktinfo.fl4.daddr, + pktinfo.iph->tos, + ip4_dst_hoplimit(&pktinfo.rt->dst), + htons(IP_DF), + pktinfo.gtph_port, pktinfo.gtph_port, + true, false); + break; + } + + return NETDEV_TX_OK; +tx_err: + dev->stats.tx_errors++; + dev_kfree_skb(skb); + return NETDEV_TX_OK; +} + +static const struct net_device_ops gtp_netdev_ops = { + .ndo_init = gtp_dev_init, + .ndo_uninit = gtp_dev_uninit, + .ndo_start_xmit = gtp_dev_xmit, + .ndo_get_stats64 = ip_tunnel_get_stats64, +}; + +static void gtp_link_setup(struct net_device *dev) +{ + dev->netdev_ops = >p_netdev_ops; + dev->destructor = free_netdev; + + dev->hard_header_len = 0; + dev->addr_len = 0; + + /* Zero header length. */ + dev->type = ARPHRD_NONE; + dev->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST; + + dev->priv_flags |= IFF_NO_QUEUE; + dev->features |= NETIF_F_LLTX; + netif_keep_dst(dev); + + /* Assume largest header, ie. GTPv0. */ + dev->needed_headroom = LL_MAX_HEADER + + sizeof(struct iphdr) + + sizeof(struct udphdr) + + sizeof(struct gtp0_header); +} + +static int gtp_hashtable_new(struct gtp_dev *gtp, int hsize); +static void gtp_hashtable_free(struct gtp_dev *gtp); +static int gtp_encap_enable(struct net_device *dev, struct gtp_dev *gtp, + int fd_gtp0, int fd_gtp1, struct net *src_net); + +static int gtp_newlink(struct net *src_net, struct net_device *dev, + struct nlattr *tb[], struct nlattr *data[]) +{ + int hashsize, err, fd0, fd1; + struct gtp_dev *gtp; + struct gtp_net *gn; + + if (!data[IFLA_GTP_FD0] || !data[IFLA_GTP_FD1]) + return -EINVAL; + + gtp = netdev_priv(dev); + + fd0 = nla_get_u32(data[IFLA_GTP_FD0]); + fd1 = nla_get_u32(data[IFLA_GTP_FD1]); + + err = gtp_encap_enable(dev, gtp, fd0, fd1, src_net); + if (err < 0) + goto out_err; + + if (!data[IFLA_GTP_PDP_HASHSIZE]) + hashsize = 1024; + else + hashsize = nla_get_u32(data[IFLA_GTP_PDP_HASHSIZE]); + + err = gtp_hashtable_new(gtp, hashsize); + if (err < 0) + goto out_encap; + + err = register_netdevice(dev); + if (err < 0) { + netdev_dbg(dev, "failed to register new netdev %d\n", err); + goto out_hashtable; + } + + gn = net_generic(dev_net(dev), gtp_net_id); + list_add_rcu(>p->list, &gn->gtp_dev_list); + + netdev_dbg(dev, "registered new GTP interface\n"); + + return 0; + +out_hashtable: + gtp_hashtable_free(gtp); +out_encap: + gtp_encap_disable(gtp); +out_err: + return err; +} + +static void gtp_dellink(struct net_device *dev, struct list_head *head) +{ + struct gtp_dev *gtp = netdev_priv(dev); + + gtp_encap_disable(gtp); + gtp_hashtable_free(gtp); + list_del_rcu(>p->list); + unregister_netdevice_queue(dev, head); +} + +static const struct nla_policy gtp_policy[IFLA_GTP_MAX + 1] = { + [IFLA_GTP_FD0] = { .type = NLA_U32 }, + [IFLA_GTP_FD1] = { .type = NLA_U32 }, + [IFLA_GTP_PDP_HASHSIZE] = { .type = NLA_U32 }, +}; + +static int gtp_validate(struct nlattr *tb[], struct nlattr *data[]) +{ + if (!data) + return -EINVAL; + + return 0; +} + +static size_t gtp_get_size(const struct net_device *dev) +{ + return nla_total_size(sizeof(__u32)); /* IFLA_GTP_PDP_HASHSIZE */ +} + +static int gtp_fill_info(struct sk_buff *skb, const struct net_device *dev) +{ + struct gtp_dev *gtp = netdev_priv(dev); + + if (nla_put_u32(skb, IFLA_GTP_PDP_HASHSIZE, gtp->hash_size)) + goto nla_put_failure; + + return 0; + +nla_put_failure: + return -EMSGSIZE; +} + +static struct rtnl_link_ops gtp_link_ops __read_mostly = { + .kind = "gtp", + .maxtype = IFLA_GTP_MAX, + .policy = gtp_policy, + .priv_size = sizeof(struct gtp_dev), + .setup = gtp_link_setup, + .validate = gtp_validate, + .newlink = gtp_newlink, + .dellink = gtp_dellink, + .get_size = gtp_get_size, + .fill_info = gtp_fill_info, +}; + +static struct net *gtp_genl_get_net(struct net *src_net, struct nlattr *tb[]) +{ + struct net *net; + + /* Examine the link attributes and figure out which network namespace + * we are talking about. + */ + if (tb[GTPA_NET_NS_FD]) + net = get_net_ns_by_fd(nla_get_u32(tb[GTPA_NET_NS_FD])); + else + net = get_net(src_net); + + return net; +} + +static int gtp_hashtable_new(struct gtp_dev *gtp, int hsize) +{ + int i; + + gtp->addr_hash = kmalloc(sizeof(struct hlist_head) * hsize, GFP_KERNEL); + if (gtp->addr_hash == NULL) + return -ENOMEM; + + gtp->tid_hash = kmalloc(sizeof(struct hlist_head) * hsize, GFP_KERNEL); + if (gtp->tid_hash == NULL) + goto err1; + + gtp->hash_size = hsize; + + for (i = 0; i < hsize; i++) { + INIT_HLIST_HEAD(>p->addr_hash[i]); + INIT_HLIST_HEAD(>p->tid_hash[i]); + } + return 0; +err1: + kfree(gtp->addr_hash); + return -ENOMEM; +} + +static void gtp_hashtable_free(struct gtp_dev *gtp) +{ + struct pdp_ctx *pctx; + int i; + + for (i = 0; i < gtp->hash_size; i++) { + hlist_for_each_entry_rcu(pctx, >p->tid_hash[i], hlist_tid) { + hlist_del_rcu(&pctx->hlist_tid); + hlist_del_rcu(&pctx->hlist_addr); + kfree_rcu(pctx, rcu_head); + } + } + synchronize_rcu(); + kfree(gtp->addr_hash); + kfree(gtp->tid_hash); +} + +static int gtp_encap_enable(struct net_device *dev, struct gtp_dev *gtp, + int fd_gtp0, int fd_gtp1, struct net *src_net) +{ + struct udp_tunnel_sock_cfg tuncfg = {NULL}; + struct socket *sock0, *sock1u; + int err; + + netdev_dbg(dev, "enable gtp on %d, %d\n", fd_gtp0, fd_gtp1); + + sock0 = sockfd_lookup(fd_gtp0, &err); + if (sock0 == NULL) { + netdev_dbg(dev, "socket fd=%d not found (gtp0)\n", fd_gtp0); + return -ENOENT; + } + + if (sock0->sk->sk_protocol != IPPROTO_UDP) { + netdev_dbg(dev, "socket fd=%d not UDP\n", fd_gtp0); + err = -EINVAL; + goto err1; + } + + sock1u = sockfd_lookup(fd_gtp1, &err); + if (sock1u == NULL) { + netdev_dbg(dev, "socket fd=%d not found (gtp1u)\n", fd_gtp1); + err = -ENOENT; + goto err1; + } + + if (sock1u->sk->sk_protocol != IPPROTO_UDP) { + netdev_dbg(dev, "socket fd=%d not UDP\n", fd_gtp1); + err = -EINVAL; + goto err2; + } + + netdev_dbg(dev, "enable gtp on %p, %p\n", sock0, sock1u); + + gtp->sock0 = sock0; + gtp->sock1u = sock1u; + gtp->net = src_net; + + tuncfg.sk_user_data = gtp; + tuncfg.encap_rcv = gtp_encap_recv; + tuncfg.encap_destroy = gtp_encap_destroy; + + tuncfg.encap_type = UDP_ENCAP_GTP0; + setup_udp_tunnel_sock(sock_net(gtp->sock0->sk), gtp->sock0, &tuncfg); + + tuncfg.encap_type = UDP_ENCAP_GTP1U; + setup_udp_tunnel_sock(sock_net(gtp->sock1u->sk), gtp->sock1u, &tuncfg); + + err = 0; +err2: + sockfd_put(sock1u); +err1: + sockfd_put(sock0); + return err; +} + +static struct net_device *gtp_find_dev(struct net *net, int ifindex) +{ + struct gtp_net *gn = net_generic(net, gtp_net_id); + struct gtp_dev *gtp; + + list_for_each_entry_rcu(gtp, &gn->gtp_dev_list, list) { + if (ifindex == gtp->dev->ifindex) + return gtp->dev; + } + return NULL; +} + +static void ipv4_pdp_fill(struct pdp_ctx *pctx, struct genl_info *info) +{ + pctx->gtp_version = nla_get_u32(info->attrs[GTPA_VERSION]); + pctx->af = AF_INET; + pctx->sgsn_addr_ip4.s_addr = + nla_get_be32(info->attrs[GTPA_SGSN_ADDRESS]); + pctx->ms_addr_ip4.s_addr = + nla_get_be32(info->attrs[GTPA_MS_ADDRESS]); + + switch (pctx->gtp_version) { + case GTP_V0: + /* According to TS 09.60, sections 7.5.1 and 7.5.2, the flow + * label needs to be the same for uplink and downlink packets, + * so let's annotate this. + */ + pctx->u.v0.tid = nla_get_u64(info->attrs[GTPA_TID]); + pctx->u.v0.flow = nla_get_u16(info->attrs[GTPA_FLOW]); + break; + case GTP_V1: + pctx->u.v1.i_tei = nla_get_u32(info->attrs[GTPA_I_TEI]); + pctx->u.v1.o_tei = nla_get_u32(info->attrs[GTPA_O_TEI]); + break; + default: + break; + } +} + +static int ipv4_pdp_add(struct net_device *dev, struct genl_info *info) +{ + struct gtp_dev *gtp = netdev_priv(dev); + u32 hash_ms, hash_tid = 0; + struct pdp_ctx *pctx; + bool found = false; + __be32 ms_addr; + + ms_addr = nla_get_be32(info->attrs[GTPA_MS_ADDRESS]); + hash_ms = ipv4_hashfn(ms_addr) % gtp->hash_size; + + hlist_for_each_entry_rcu(pctx, >p->addr_hash[hash_ms], hlist_addr) { + if (pctx->ms_addr_ip4.s_addr == ms_addr) { + found = true; + break; + } + } + + if (found) { + if (info->nlhdr->nlmsg_flags & NLM_F_EXCL) + return -EEXIST; + if (info->nlhdr->nlmsg_flags & NLM_F_REPLACE) + return -EOPNOTSUPP; + + ipv4_pdp_fill(pctx, info); + + if (pctx->gtp_version == GTP_V0) + netdev_dbg(dev, "GTPv0-U: update tunnel id = %llx (pdp %p)\n", + pctx->u.v0.tid, pctx); + else if (pctx->gtp_version == GTP_V1) + netdev_dbg(dev, "GTPv1-U: update tunnel id = %x/%x (pdp %p)\n", + pctx->u.v1.i_tei, pctx->u.v1.o_tei, pctx); + + return 0; + + } + + pctx = kmalloc(sizeof(struct pdp_ctx), GFP_KERNEL); + if (pctx == NULL) + return -ENOMEM; + + ipv4_pdp_fill(pctx, info); + atomic_set(&pctx->tx_seq, 0); + + switch (pctx->gtp_version) { + case GTP_V0: + /* TS 09.60: "The flow label identifies unambiguously a GTP + * flow.". We use the tid for this instead, I cannot find a + * situation in which this doesn't unambiguosly identify the + * PDP context. + */ + hash_tid = gtp0_hashfn(pctx->u.v0.tid) % gtp->hash_size; + break; + case GTP_V1: + hash_tid = gtp1u_hashfn(pctx->u.v1.i_tei) % gtp->hash_size; + break; + } + + hlist_add_head_rcu(&pctx->hlist_addr, >p->addr_hash[hash_ms]); + hlist_add_head_rcu(&pctx->hlist_tid, >p->tid_hash[hash_tid]); + + switch (pctx->gtp_version) { + case GTP_V0: + netdev_dbg(dev, "GTPv0-U: new PDP ctx id=%llx ssgn=%pI4 ms=%pI4 (pdp=%p)\n", + pctx->u.v0.tid, &pctx->sgsn_addr_ip4, + &pctx->ms_addr_ip4, pctx); + break; + case GTP_V1: + netdev_dbg(dev, "GTPv1-U: new PDP ctx id=%x/%x ssgn=%pI4 ms=%pI4 (pdp=%p)\n", + pctx->u.v1.i_tei, pctx->u.v1.o_tei, + &pctx->sgsn_addr_ip4, &pctx->ms_addr_ip4, pctx); + break; + } + + return 0; +} + +static int gtp_genl_new_pdp(struct sk_buff *skb, struct genl_info *info) +{ + struct net_device *dev; + struct net *net; + + if (!info->attrs[GTPA_VERSION] || + !info->attrs[GTPA_LINK] || + !info->attrs[GTPA_SGSN_ADDRESS] || + !info->attrs[GTPA_MS_ADDRESS]) + return -EINVAL; + + switch (nla_get_u32(info->attrs[GTPA_VERSION])) { + case GTP_V0: + if (!info->attrs[GTPA_TID] || + !info->attrs[GTPA_FLOW]) + return -EINVAL; + break; + case GTP_V1: + if (!info->attrs[GTPA_I_TEI] || + !info->attrs[GTPA_O_TEI]) + return -EINVAL; + break; + + default: + return -EINVAL; + } + + net = gtp_genl_get_net(sock_net(skb->sk), info->attrs); + if (IS_ERR(net)) + return PTR_ERR(net); + + /* Check if there's an existing gtpX device to configure */ + dev = gtp_find_dev(net, nla_get_u32(info->attrs[GTPA_LINK])); + if (dev == NULL) + return -ENODEV; + + return ipv4_pdp_add(dev, info); +} + +static int gtp_genl_del_pdp(struct sk_buff *skb, struct genl_info *info) +{ + struct net_device *dev; + struct pdp_ctx *pctx; + struct gtp_dev *gtp; + struct net *net; + + if (!info->attrs[GTPA_VERSION] || + !info->attrs[GTPA_LINK]) + return -EINVAL; + + net = gtp_genl_get_net(sock_net(skb->sk), info->attrs); + if (IS_ERR(net)) + return PTR_ERR(net); + + /* Check if there's an existing gtpX device to configure */ + dev = gtp_find_dev(net, nla_get_u32(info->attrs[GTPA_LINK])); + if (dev == NULL) + return -ENODEV; + + gtp = netdev_priv(dev); + + switch (nla_get_u32(info->attrs[GTPA_VERSION])) { + case GTP_V0: + if (!info->attrs[GTPA_TID]) + return -EINVAL; + pctx = gtp0_pdp_find(gtp, nla_get_u64(info->attrs[GTPA_TID])); + break; + case GTP_V1: + if (!info->attrs[GTPA_I_TEI]) + return -EINVAL; + pctx = gtp1_pdp_find(gtp, nla_get_u64(info->attrs[GTPA_I_TEI])); + break; + + default: + return -EINVAL; + } + + if (pctx == NULL) + return -ENOENT; + + if (pctx->gtp_version == GTP_V0) + netdev_dbg(dev, "GTPv0-U: deleting tunnel id = %llx (pdp %p)\n", + pctx->u.v0.tid, pctx); + else if (pctx->gtp_version == GTP_V1) + netdev_dbg(dev, "GTPv1-U: deleting tunnel id = %x/%x (pdp %p)\n", + pctx->u.v1.i_tei, pctx->u.v1.o_tei, pctx); + + hlist_del_rcu(&pctx->hlist_tid); + hlist_del_rcu(&pctx->hlist_addr); + kfree_rcu(pctx, rcu_head); + + return 0; +} + +static struct genl_family gtp_genl_family = { + .id = GENL_ID_GENERATE, + .name = "gtp", + .version = 0, + .hdrsize = 0, + .maxattr = GTPA_MAX, + .netnsok = true, +}; + +static int gtp_genl_fill_info(struct sk_buff *skb, u32 snd_portid, u32 snd_seq, + u32 type, struct pdp_ctx *pctx) +{ + void *genlh; + + genlh = genlmsg_put(skb, snd_portid, snd_seq, >p_genl_family, 0, + type); + if (genlh == NULL) + goto nlmsg_failure; + + if (nla_put_u32(skb, GTPA_VERSION, pctx->gtp_version) || + nla_put_be32(skb, GTPA_SGSN_ADDRESS, pctx->sgsn_addr_ip4.s_addr) || + nla_put_be32(skb, GTPA_MS_ADDRESS, pctx->ms_addr_ip4.s_addr)) + goto nla_put_failure; + + switch (pctx->gtp_version) { + case GTP_V0: + if (nla_put_u64_64bit(skb, GTPA_TID, pctx->u.v0.tid, GTPA_PAD) || + nla_put_u16(skb, GTPA_FLOW, pctx->u.v0.flow)) + goto nla_put_failure; + break; + case GTP_V1: + if (nla_put_u32(skb, GTPA_I_TEI, pctx->u.v1.i_tei) || + nla_put_u32(skb, GTPA_O_TEI, pctx->u.v1.o_tei)) + goto nla_put_failure; + break; + } + genlmsg_end(skb, genlh); + return 0; + +nlmsg_failure: +nla_put_failure: + genlmsg_cancel(skb, genlh); + return -EMSGSIZE; +} + +static int gtp_genl_get_pdp(struct sk_buff *skb, struct genl_info *info) +{ + struct pdp_ctx *pctx = NULL; + struct net_device *dev; + struct sk_buff *skb2; + struct gtp_dev *gtp; + u32 gtp_version; + struct net *net; + int err; + + if (!info->attrs[GTPA_VERSION] || + !info->attrs[GTPA_LINK]) + return -EINVAL; + + gtp_version = nla_get_u32(info->attrs[GTPA_VERSION]); + switch (gtp_version) { + case GTP_V0: + case GTP_V1: + break; + default: + return -EINVAL; + } + + net = gtp_genl_get_net(sock_net(skb->sk), info->attrs); + if (IS_ERR(net)) + return PTR_ERR(net); + + /* Check if there's an existing gtpX device to configure */ + dev = gtp_find_dev(net, nla_get_u32(info->attrs[GTPA_LINK])); + if (dev == NULL) + return -ENODEV; + + gtp = netdev_priv(dev); + + rcu_read_lock(); + if (gtp_version == GTP_V0 && + info->attrs[GTPA_TID]) { + u64 tid = nla_get_u64(info->attrs[GTPA_TID]); + + pctx = gtp0_pdp_find(gtp, tid); + } else if (gtp_version == GTP_V1 && + info->attrs[GTPA_I_TEI]) { + u32 tid = nla_get_u32(info->attrs[GTPA_I_TEI]); + + pctx = gtp1_pdp_find(gtp, tid); + } else if (info->attrs[GTPA_MS_ADDRESS]) { + __be32 ip = nla_get_be32(info->attrs[GTPA_MS_ADDRESS]); + + pctx = ipv4_pdp_find(gtp, ip); + } + + if (pctx == NULL) { + err = -ENOENT; + goto err_unlock; + } + + skb2 = genlmsg_new(NLMSG_GOODSIZE, GFP_ATOMIC); + if (skb2 == NULL) { + err = -ENOMEM; + goto err_unlock; + } + + err = gtp_genl_fill_info(skb2, NETLINK_CB(skb).portid, + info->snd_seq, info->nlhdr->nlmsg_type, pctx); + if (err < 0) + goto err_unlock_free; + + rcu_read_unlock(); + return genlmsg_unicast(genl_info_net(info), skb2, info->snd_portid); + +err_unlock_free: + kfree_skb(skb2); +err_unlock: + rcu_read_unlock(); + return err; +} + +static int gtp_genl_dump_pdp(struct sk_buff *skb, + struct netlink_callback *cb) +{ + struct gtp_dev *last_gtp = (struct gtp_dev *)cb->args[2], *gtp; + struct net *net = sock_net(skb->sk); + struct gtp_net *gn = net_generic(net, gtp_net_id); + unsigned long tid = cb->args[1]; + int i, k = cb->args[0], ret; + struct pdp_ctx *pctx; + + if (cb->args[4]) + return 0; + + list_for_each_entry_rcu(gtp, &gn->gtp_dev_list, list) { + if (last_gtp && last_gtp != gtp) + continue; + else + last_gtp = NULL; + + for (i = k; i < gtp->hash_size; i++) { + hlist_for_each_entry_rcu(pctx, >p->tid_hash[i], hlist_tid) { + if (tid && tid != pctx->u.tid) + continue; + else + tid = 0; + + ret = gtp_genl_fill_info(skb, + NETLINK_CB(cb->skb).portid, + cb->nlh->nlmsg_seq, + cb->nlh->nlmsg_type, pctx); + if (ret < 0) { + cb->args[0] = i; + cb->args[1] = pctx->u.tid; + cb->args[2] = (unsigned long)gtp; + goto out; + } + } + } + } + cb->args[4] = 1; +out: + return skb->len; +} + +static struct nla_policy gtp_genl_policy[GTPA_MAX + 1] = { + [GTPA_LINK] = { .type = NLA_U32, }, + [GTPA_VERSION] = { .type = NLA_U32, }, + [GTPA_TID] = { .type = NLA_U64, }, + [GTPA_SGSN_ADDRESS] = { .type = NLA_U32, }, + [GTPA_MS_ADDRESS] = { .type = NLA_U32, }, + [GTPA_FLOW] = { .type = NLA_U16, }, + [GTPA_NET_NS_FD] = { .type = NLA_U32, }, + [GTPA_I_TEI] = { .type = NLA_U32, }, + [GTPA_O_TEI] = { .type = NLA_U32, }, +}; + +static const struct genl_ops gtp_genl_ops[] = { + { + .cmd = GTP_CMD_NEWPDP, + .doit = gtp_genl_new_pdp, + .policy = gtp_genl_policy, + .flags = GENL_ADMIN_PERM, + }, + { + .cmd = GTP_CMD_DELPDP, + .doit = gtp_genl_del_pdp, + .policy = gtp_genl_policy, + .flags = GENL_ADMIN_PERM, + }, + { + .cmd = GTP_CMD_GETPDP, + .doit = gtp_genl_get_pdp, + .dumpit = gtp_genl_dump_pdp, + .policy = gtp_genl_policy, + .flags = GENL_ADMIN_PERM, + }, +}; + +static int __net_init gtp_net_init(struct net *net) +{ + struct gtp_net *gn = net_generic(net, gtp_net_id); + + INIT_LIST_HEAD(&gn->gtp_dev_list); + return 0; +} + +static void __net_exit gtp_net_exit(struct net *net) +{ + struct gtp_net *gn = net_generic(net, gtp_net_id); + struct gtp_dev *gtp; + LIST_HEAD(list); + + rtnl_lock(); + list_for_each_entry(gtp, &gn->gtp_dev_list, list) + gtp_dellink(gtp->dev, &list); + + unregister_netdevice_many(&list); + rtnl_unlock(); +} + +static struct pernet_operations gtp_net_ops = { + .init = gtp_net_init, + .exit = gtp_net_exit, + .id = >p_net_id, + .size = sizeof(struct gtp_net), +}; + +static int __init gtp_init(void) +{ + int err; + + get_random_bytes(>p_h_initval, sizeof(gtp_h_initval)); + + err = rtnl_link_register(>p_link_ops); + if (err < 0) + goto error_out; + + err = genl_register_family_with_ops(>p_genl_family, gtp_genl_ops); + if (err < 0) + goto unreg_rtnl_link; + + err = register_pernet_subsys(>p_net_ops); + if (err < 0) + goto unreg_genl_family; + + pr_info("GTP module loaded (pdp ctx size %Zd bytes)\n", + sizeof(struct pdp_ctx)); + return 0; + +unreg_genl_family: + genl_unregister_family(>p_genl_family); +unreg_rtnl_link: + rtnl_link_unregister(>p_link_ops); +error_out: + pr_err("error loading GTP module loaded\n"); + return err; +} +late_initcall(gtp_init); + +static void __exit gtp_fini(void) +{ + unregister_pernet_subsys(>p_net_ops); + genl_unregister_family(>p_genl_family); + rtnl_link_unregister(>p_link_ops); + + pr_info("GTP module unloaded\n"); +} +module_exit(gtp_fini); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Harald Welte "); +MODULE_DESCRIPTION("Interface driver for GTP encapsulated traffic"); +MODULE_ALIAS_RTNL_LINK("gtp"); diff --git a/include/net/gtp.h b/include/net/gtp.h new file mode 100644 index 0000000..894a37b --- /dev/null +++ b/include/net/gtp.h @@ -0,0 +1,34 @@ +#ifndef _GTP_H_ +#define _GTP_H + +/* General GTP protocol related definitions. */ + +#define GTP0_PORT 3386 +#define GTP1U_PORT 2152 + +#define GTP_TPDU 255 + +struct gtp0_header { /* According to GSM TS 09.60. */ + __u8 flags; + __u8 type; + __be16 length; + __be16 seq; + __be16 flow; + __u8 number; + __u8 spare[3]; + __be64 tid; +} __attribute__ ((packed)); + +struct gtp1_header { /* According to 3GPP TS 29.060. */ + __u8 flags; + __u8 type; + __be16 length; + __be32 tid; +} __attribute__ ((packed)); + +#define GTP1_F_NPDU 0x01 +#define GTP1_F_SEQ 0x02 +#define GTP1_F_EXTHDR 0x04 +#define GTP1_F_MASK 0x07 + +#endif diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index 813ffb2e..8bdae34 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild @@ -141,6 +141,7 @@ header-y += gfs2_ondisk.h header-y += gigaset_dev.h header-y += gpio.h header-y += gsmmux.h +header-y += gtp.h header-y += hdlcdrv.h header-y += hdlc.h header-y += hdreg.h diff --git a/include/uapi/linux/gtp.h b/include/uapi/linux/gtp.h new file mode 100644 index 0000000..ca1054d --- /dev/null +++ b/include/uapi/linux/gtp.h @@ -0,0 +1,33 @@ +#ifndef _UAPI_LINUX_GTP_H_ +#define _UAPI_LINUX_GTP_H__ + +enum gtp_genl_cmds { + GTP_CMD_NEWPDP, + GTP_CMD_DELPDP, + GTP_CMD_GETPDP, + + GTP_CMD_MAX, +}; + +enum gtp_version { + GTP_V0 = 0, + GTP_V1, +}; + +enum gtp_attrs { + GTPA_UNSPEC = 0, + GTPA_LINK, + GTPA_VERSION, + GTPA_TID, /* for GTPv0 only */ + GTPA_SGSN_ADDRESS, + GTPA_MS_ADDRESS, + GTPA_FLOW, + GTPA_NET_NS_FD, + GTPA_I_TEI, /* for GTPv1 only */ + GTPA_O_TEI, /* for GTPv1 only */ + GTPA_PAD, + __GTPA_MAX, +}; +#define GTPA_MAX (__GTPA_MAX + 1) + +#endif /* _UAPI_LINUX_GTP_H_ */ diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h index d2d7fd4..bb36bd5 100644 --- a/include/uapi/linux/if_link.h +++ b/include/uapi/linux/if_link.h @@ -529,6 +529,16 @@ enum { }; #define IFLA_PPP_MAX (__IFLA_PPP_MAX - 1) +/* GTP section */ +enum { + IFLA_GTP_UNSPEC, + IFLA_GTP_FD0, + IFLA_GTP_FD1, + IFLA_GTP_PDP_HASHSIZE, + __IFLA_GTP_MAX, +}; +#define IFLA_GTP_MAX (__IFLA_GTP_MAX - 1) + /* Bonding section */ enum { diff --git a/include/uapi/linux/udp.h b/include/uapi/linux/udp.h index 16574ea..2c8180f 100644 --- a/include/uapi/linux/udp.h +++ b/include/uapi/linux/udp.h @@ -36,6 +36,7 @@ struct udphdr { #define UDP_ENCAP_ESPINUDP_NON_IKE 1 /* draft-ietf-ipsec-nat-t-ike-00/01 */ #define UDP_ENCAP_ESPINUDP 2 /* draft-ietf-ipsec-udp-encaps-06 */ #define UDP_ENCAP_L2TPINUDP 3 /* rfc2661 */ - +#define UDP_ENCAP_GTP0 4 /* GSM TS 09.60 */ +#define UDP_ENCAP_GTP1U 5 /* 3GPP TS 29.060 */ #endif /* _UAPI_LINUX_UDP_H */ -- 2.1.4 From nhofmeyr at sysmocom.de Mon May 9 09:49:35 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Mon, 9 May 2016 11:49:35 +0200 Subject: openbsc.git branch sysmocom/iu updated. 0.15.0-442-gf3bcdd2 In-Reply-To: References: <201605041201.u44C1bxf098418@git.osmocom.org> <40A79C41-1B47-471B-93CA-06D0876838ED@freyther.de> <20160506181218.GA5421@dub6> <20160508150251.GA5851@dub6> Message-ID: <20160509094935.GA1744@dub6> On Sun, May 08, 2016 at 05:13:51PM +0200, Holger Freyther wrote: > Have you considered removing the "timeout" from the lower GSM paging code? The interface would be start, cancel and only success would be signaled? Both the MSC paging and BSC paging timeout could be fed from the same timeout value? So the MSC tells the BSC to start and stop paging, such that the T3113 is in the MSC? I'd expect the network design to be intended otherwise, to reduce the amount of work towards the CN (handle as many details as possible in BSC). And we want a way that works both with 2G and 3G. Can we tell an RNC to start and cancel paging? Not that I know of ...? Another thing: I guess that osmo-bsc should not change behavior with respect to 3rd party MSCs, right? > top-up? refill? resume paging? /me favors 'resume_paging' but whether we should spend time changing that is on another page. ~Neels -- - Neels Hofmeyr http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Gesch?ftsf?hrer / Managing Directors: Holger Freyther, Harald Welte -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From msuraev at sysmocom.de Mon May 9 10:36:47 2016 From: msuraev at sysmocom.de (Max) Date: Mon, 9 May 2016 12:36:47 +0200 Subject: rate ctr examples Message-ID: <5730683F.3070008@sysmocom.de> Hi. I'm working on documentation for (rate) counters infrastructure of various Osmocom programs. I've got problems with getting working example for rate_ctr. For instance: ./contrib/bsc_control.py -d localhost -g "rate_ctr.per_hour.nat.bsc.sccp.conn" -p 4250 Got message: ERROR 1 Counter name not found. Although in src/osmo-bsc_nat/bsc_nat_utils.c I see rate_ctr_group_desc with prefix "nat.bsc" and several rate_ctr_desc (including "sccp.conn") defined. What would be the proper way to get those counters? Note: I run ./src/osmo-bsc_nat/osmo-bsc_nat -c ./doc/examples/osmo-bsc_nat/osmo-bsc_nat.cfg for tests built from latest master. -- Max Suraev http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Geschaeftsfuehrer / Managing Directors: Holger Freyther, Harald Welte From nhofmeyr at sysmocom.de Mon May 9 10:40:39 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Mon, 9 May 2016 12:40:39 +0200 Subject: LU counters Message-ID: <20160509104039.GA2127@dub6> Hi list, I'm noticing an inaccuracy/ambiguity in the stat counters concerning Location Updating. So far we have: struct gsmnet_stats { struct { struct osmo_counter *reject; <-- inc when MM LU Reject is sent struct osmo_counter *accept; <-- inc when MM LU Accept is sent } loc_upd_resp; } Looks good? Well, not entirely. (1) When we use TMSIs, we first send a LU Accept with a new TMSI, and then expect the MS to respond with a TMSI Realloc Complete message. When that fails to come through, the LU actually ends in failure, even though a LU Accept was sent. (2) In 3G, if a UE sends an Iu Release during LU (e.g. user enables flight mode), we cancel the LU without sending any reply at all, so nothing would be counted. I would like to change the naming and inc hooks to reflect actual LU success or failure. We don't need to count the actual messages sent, right? ~Neels -- - Neels Hofmeyr http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Gesch?ftsf?hrer / Managing Directors: Holger Freyther, Harald Welte -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From msuraev at sysmocom.de Mon May 9 10:44:44 2016 From: msuraev at sysmocom.de (Max) Date: Mon, 9 May 2016 12:44:44 +0200 Subject: LU counters In-Reply-To: <20160509104039.GA2127@dub6> References: <20160509104039.GA2127@dub6> Message-ID: <57306A1C.6060402@sysmocom.de> While at it you might also use rate_ctr instead of counter. This way I'll have more example for docs :) On 05/09/2016 12:40 PM, Neels Hofmeyr wrote: > Hi list, > > I'm noticing an inaccuracy/ambiguity in the stat counters concerning Location Updating. > So far we have: > > struct gsmnet_stats { > > struct { > struct osmo_counter *reject; <-- inc when MM LU Reject is sent > struct osmo_counter *accept; <-- inc when MM LU Accept is sent > } loc_upd_resp; > } > > Looks good? Well, not entirely. > > (1) > When we use TMSIs, we first send a LU Accept with a new TMSI, and then expect > the MS to respond with a TMSI Realloc Complete message. When that fails to come > through, the LU actually ends in failure, even though a LU Accept was sent. > > (2) > In 3G, if a UE sends an Iu Release during LU (e.g. user enables flight mode), > we cancel the LU without sending any reply at all, so nothing would be counted. > > I would like to change the naming and inc hooks to reflect actual LU success or > failure. We don't need to count the actual messages sent, right? > > ~Neels > -- Max Suraev http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Geschaeftsfuehrer / Managing Directors: Holger Freyther, Harald Welte From holger at freyther.de Mon May 9 14:44:59 2016 From: holger at freyther.de (Holger Freyther) Date: Mon, 9 May 2016 16:44:59 +0200 Subject: [PATCH 5/5] Add IMSI-prefix authorization policy In-Reply-To: <1462293833-29141-5-git-send-email-msuraev@sysmocom.de> References: <1462293833-29141-1-git-send-email-msuraev@sysmocom.de> <1462293833-29141-5-git-send-email-msuraev@sysmocom.de> Message-ID: <7FA51635-A3E9-4DF9-8177-1EC177A6F4CA@freyther.de> > On 03 May 2016, at 18:43, msuraev at sysmocom.de wrote: > > From: Max > > * extend "auth policy" vty command with new option "prefix" > * add vty command "authorize-prefix" for setting arbitrary prefix > * add basic vty test > * add optional "imsi-prefix" argument to subscriber-create-on-demand vty Why not a regexp? I mean if we have a prefix.. then ^26203 is not really that far away from it? holger From holger at freyther.de Mon May 9 14:50:26 2016 From: holger at freyther.de (Holger Freyther) Date: Mon, 9 May 2016 16:50:26 +0200 Subject: [PATCH 4/6] Cleanup db tests In-Reply-To: <1462359758-11287-4-git-send-email-msuraev@sysmocom.de> References: <1462359758-11287-1-git-send-email-msuraev@sysmocom.de> <1462359758-11287-4-git-send-email-msuraev@sysmocom.de> Message-ID: <2B2E538F-E7E7-4250-8498-9421D2E5DA0B@freyther.de> > On 04 May 2016, at 13:02, msuraev at sysmocom.de wrote: > > From: Max > > Move copy-pasted code into separate function to make writing more tests > easier. and change behavior.. > +static void test_subs(const char *alice_imsi, char *imei1, char *imei2) > { > - char scratch_str[256]; > + struct gsm_subscriber *alice = NULL, *alice_db; > + char scratch_str[256]; tabs vs. spaces > + /* Get by extension */ > + alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); > + if (alice_db) { > + COMPARE(alice, alice_db); > + SUBSCR_PUT(alice_db); > + } > + SUBSCR_PUT(alice); The if looks a bit weak here? So no error if the look-up code starts to break? In general I think we want to have strong post conditions. If alice_db should be !NULL then we should aggressively check for it. From holger at freyther.de Mon May 9 14:53:47 2016 From: holger at freyther.de (Holger Freyther) Date: Mon, 9 May 2016 16:53:47 +0200 Subject: [PATCH 1/6] Use enum for subscriber creation policy In-Reply-To: <1462359758-11287-1-git-send-email-msuraev@sysmocom.de> References: <1462359758-11287-1-git-send-email-msuraev@sysmocom.de> Message-ID: <20AFC513-5FBE-4476-B72A-878A74B3426C@freyther.de> > On 04 May 2016, at 13:02, msuraev at sysmocom.de wrote: > > > +enum gsm_subscr_ext_alloc_policy { > + GSM_SUBSCR_DONT_CREATE = 0, > + GSM_SUBSCR_RANDOM_EXT = 1, > +}; Neels reminded us to name things well. "extension alloc policy" is not the right word. The first item doesn't control the creation of the extension but the creation of the subscriber. enum gsm_subscr_creation_mode { GSM_SUBSCR_DONT_CREATE GSM_SUBSCR_CREAT_W_RAND_EXT, GSM_SUBSCR_CREAT_W_NO_EXT }> > + > enum gsm_security_event { > GSM_SECURITY_NOAVAIL, > GSM_SECURITY_AUTH_FAILED, > diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c > index 568a0b8..00a8a9b 100644 > --- a/openbsc/src/libbsc/net_init.c > +++ b/openbsc/src/libbsc/net_init.c > @@ -48,7 +48,7 @@ struct gsm_network *gsm_network_init(uint16_t country_code, uint16_t network_cod > INIT_LLIST_HEAD(&net->bsc_data->mscs); > > net->subscr_group->net = net; > - net->create_subscriber = 1; > + net->create_subscriber = GSM_SUBSCR_RANDOM_EXT; rename variable to creation_mode? or better name? From gerrit-no-reply at lists.osmocom.org Mon May 9 22:08:00 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Mon, 9 May 2016 22:08:00 +0000 Subject: Change in libosmocore[master]: api doc: auth_core.c: add \returns, cosmetic In-Reply-To: References: Message-ID: >From zecke : zecke has posted comments on this change. Change subject: api doc: auth_core.c: add \returns, cosmetic ...................................................................... Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/33/1/src/gsm/auth_core.c File src/gsm/auth_core.c: PS1, Line 46: returns Inline comment to see how it looks like. :) -- To view, visit https://gerrit.osmocom.org/33 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iea71eb666bc061acb6b14215f398bd38d17b3ad3 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: zecke Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon May 9 23:58:30 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Mon, 9 May 2016 23:58:30 +0000 Subject: Change in libosmocore[master]: api doc: auth_core.c: add \returns, cosmetic In-Reply-To: References: Message-ID: >From Neels Hofmeyr : Neels Hofmeyr has posted comments on this change. Change subject: api doc: auth_core.c: add \returns, cosmetic ...................................................................... Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/33/1/src/gsm/auth_core.c File src/gsm/auth_core.c: file comment PS1, Line 46: returns > Inline comment to see how it looks like. :) yellow. -- To view, visit https://gerrit.osmocom.org/33 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iea71eb666bc061acb6b14215f398bd38d17b3ad3 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From holger at freyther.de Tue May 10 07:19:34 2016 From: holger at freyther.de (Holger Freyther) Date: Tue, 10 May 2016 09:19:34 +0200 Subject: OpenBSC and related projects moved to Gerrit Message-ID: <01F3D763-A977-4F41-BCBD-9E22CFC995AD@freyther.de> Hi, as discussed at OsmoDevCon and the mails from last week. The following list of projects have moved to use gerrit for codereview: * libosmocore.git * libosmo-abis.git * libosmo-netif.git * libosmo-sccp.git * libsmpp34.git * openbsc.git * osmo-bts.git * osmo-iuh.git * osmo-pcu.git * cellmgr-ng.git * osmo-sip-connector.git I have created this[1] page with the minimum to set-up gerrit as git-remote, register, configure the account and then hopefully the most frequently used comments. kind regards holger [1] http://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit From alexander.chemeris at gmail.com Tue May 10 08:01:26 2016 From: alexander.chemeris at gmail.com (Alexander Chemeris) Date: Tue, 10 May 2016 11:01:26 +0300 Subject: Persistent Uplink activity from Moto KRZR K3 In-Reply-To: References: Message-ID: Hi Keith, On May 5, 2016 6:02 PM, "Keith" wrote: > > They generate constant bursts on the uplink, and this is what I can see > that corresponds from osmo-bts log output: > > <0000> ../../../../osmo-bts/src/common/rsl.c:1642 > (bts=0,trx=0,ts=0,ss=0) Handing RLL msg UNIT_DATA_IND from LAPDm to MEAS REP > <0000> ../../../../osmo-bts/src/common/rsl.c:1592 > (bts=0,trx=0,ts=0,ss=0) Tx MEAS RES MEAS RES means that there is an open logical channel between the phone and the BTS. Have you looked at the list of open channels at the NITB VTY? > I might also mention that this phone fails the USSD *#100# own number > request - The message "Not Successful" appears on the screen very > quickly if not immediately after pressing send. There is no network > communication that I can detect. Just a suggestion - is the phone network or SIM locked? If it's locked, it may try to send some message to the network to verify that it's connected to an allowed operator. A useful log would be a pcap trace of communication between OpenBSC and OsmoBTS (make sure osmo-trx communication is filtered out). -- Regards, Alexander Chemeris CEO Fairwaves, Inc. https://fairwaves.co -------------- next part -------------- An HTML attachment was scrubbed... URL: From nhofmeyr at sysmocom.de Tue May 10 09:58:36 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Tue, 10 May 2016 11:58:36 +0200 Subject: [PATCH 5/5] Add IMSI-prefix authorization policy In-Reply-To: <7FA51635-A3E9-4DF9-8177-1EC177A6F4CA@freyther.de> References: <1462293833-29141-1-git-send-email-msuraev@sysmocom.de> <1462293833-29141-5-git-send-email-msuraev@sysmocom.de> <7FA51635-A3E9-4DF9-8177-1EC177A6F4CA@freyther.de> Message-ID: <20160510095836.GA1363@ass40.sysmocom.de> On Mon, May 09, 2016 at 04:44:59PM +0200, Holger Freyther wrote: > > > On 03 May 2016, at 18:43, msuraev at sysmocom.de wrote: > > > > From: Max > > > > * extend "auth policy" vty command with new option "prefix" > > * add vty command "authorize-prefix" for setting arbitrary prefix > > * add basic vty test > > * add optional "imsi-prefix" argument to subscriber-create-on-demand vty > > > Why not a regexp? I mean if we have a prefix.. then ^26203 is not really that far away from it? actually '26203.*', because it should probably match the entire IMSI. A regex is of course fully featured, but would introduce corner cases of invalid regular expressions entered by the user. Code bloat? ~Neels -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From gerrit-no-reply at lists.osmocom.org Tue May 10 11:01:12 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 10 May 2016 11:01:12 +0000 Subject: Change in libosmocore[master]: debian: Fix packaging and make sure python2 exists Message-ID: >From Holger Freyther : Holger Freyther has uploaded a new change for review. https://gerrit.osmocom.org/37 Change subject: debian: Fix packaging and make sure python2 exists ...................................................................... debian: Fix packaging and make sure python2 exists Change-Id: Iaa26f4331966d015b193d2ab1e34621b1e319ef1 --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/37/37/1 diff --git a/debian/control b/debian/control index 42ebdba..468bd07 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Section: libs Priority: optional Maintainer: Harald Welte -Build-Depends: debhelper (>= 9), autotools-dev, autoconf, automake, libtool, dh-autoreconf, libdpkg-perl, git, doxygen, libpcsclite-dev, pkg-config, libtalloc-dev +Build-Depends: debhelper (>= 9), autotools-dev, autoconf, automake, libtool, dh-autoreconf, libdpkg-perl, git, doxygen, libpcsclite-dev, pkg-config, libtalloc-dev, python-minimal Standards-Version: 3.9.6 Homepage: http://bb.osmocom.org/trac/wiki/libosmocore Vcs-Git: git://git.osmocom.org/libosmocore.git -- To view, visit https://gerrit.osmocom.org/37 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaa26f4331966d015b193d2ab1e34621b1e319ef1 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Tue May 10 11:05:27 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 10 May 2016 11:05:27 +0000 Subject: Change in libosmocore[master]: api doc: auth_core.c: add \returns, cosmetic In-Reply-To: References: Message-ID: >From Neels Hofmeyr : Neels Hofmeyr has submitted this change and it was merged. Change subject: api doc: auth_core.c: add \returns, cosmetic ...................................................................... api doc: auth_core.c: add \returns, cosmetic Add various missing \returns doxygen entries. In osmo_auth_3g_from_2g(), also adjust two comment-closing instances to match common style and add a period to end a sentence. (The recent addition of osmo_auth_3g_from_2g() raised my attention, and I added more return value docs while at it.) Change-Id: Iea71eb666bc061acb6b14215f398bd38d17b3ad3 Reviewed-on: https://gerrit.osmocom.org/33 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M src/gsm/auth_core.c 1 file changed, 9 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/gsm/auth_core.c b/src/gsm/auth_core.c index b78cdd5..f1ec2ed 100644 --- a/src/gsm/auth_core.c +++ b/src/gsm/auth_core.c @@ -43,6 +43,7 @@ /*! \brief Register an authentication algorithm implementation with the core * \param[in] impl Structure describing implementation and it's callbacks + * \returns 0 on success, or a negative error code on failure * * This function is called by an authentication implementation plugin to * register itself with the authentication core. @@ -64,6 +65,7 @@ /*! \brief Load all available authentication plugins from the given path * \param[in] path Path name of the directory containing the plugins + * \returns number of plugins loaded in case of success, negative in case of error * * This function will load all plugins contained in the specified path. */ @@ -75,6 +77,7 @@ /*! \brief Determine if a given authentication algorithm is supported * \param[in] algo Algorithm which should be checked + * \returns 1 if algo is supported, 0 if not, negative error on failure * * This function is used by an application to determine at runtime if a * given authentication algorithm is supported or not. @@ -111,10 +114,12 @@ /*! \brief Generate 3G CK + IK from 2G authentication vector * \param vec Authentication Vector to be modified + * \returns 1 if the vector was changed, 0 otherwise * * This function performs the C5 and C4 functions to derive the UMTS key * material from the GSM key material in the supplied vector, _if_ the input - * vector doesn't yet have UMTS authentication capability */ + * vector doesn't yet have UMTS authentication capability. + */ int osmo_auth_3g_from_2g(struct osmo_auth_vector *vec) { if ((vec->auth_types & OSMO_AUTH_TYPE_GSM) && @@ -124,7 +129,7 @@ /* We cannot actually set OSMO_AUTH_TYPE_UMTS as we have no * AUTN and no RES, and thus can only perform GSM * authentication with this tuple. - * */ + */ return 1; } @@ -135,6 +140,7 @@ * \param[out] vec Generated authentication vector * \param[in] aud Subscriber-specific key material * \param[in] _rand Random challenge to be used + * \returns 0 on success, negative error on failure * * This function performs the core cryptographic function of the AUC, * computing authentication triples/quintuples based on the permanent @@ -167,6 +173,7 @@ * \param[in] rand_auts RAND value sent by the SIM/MS * \param[in] auts AUTS value sent by the SIM/MS * \param[in] _rand Random challenge to be used to generate vector + * \returns 0 on success, negative error on failure * * This function performs a special variant of the core cryptographic * function of the AUC: computing authentication triples/quintuples -- To view, visit https://gerrit.osmocom.org/33 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iea71eb666bc061acb6b14215f398bd38d17b3ad3 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 10 11:16:42 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 10 May 2016 11:16:42 +0000 Subject: Change in libosmocore[master]: debian: Fix packaging and make sure python2 exists In-Reply-To: References: Message-ID: >From Neels Hofmeyr : Neels Hofmeyr has posted comments on this change. Change subject: debian: Fix packaging and make sure python2 exists ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/37/1//COMMIT_MSG Commit Message: Line 7: debian: Fix packaging and make sure python2 exists "and"? I see only one change. "Fix packaging: make sure python2 exists"? -- To view, visit https://gerrit.osmocom.org/37 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaa26f4331966d015b193d2ab1e34621b1e319ef1 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue May 10 11:23:06 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 10 May 2016 11:23:06 +0000 Subject: Change in libosmocore[master]: debian: Fix packaging by requiring python-minimal In-Reply-To: References: Message-ID: >From Holger Freyther : Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/37 to look at the new patch set (#2). Change subject: debian: Fix packaging by requiring python-minimal ...................................................................... debian: Fix packaging by requiring python-minimal We require the python2 binary to generate code. In Debian this is provided by python-minimal. Add it to the build-depends to fix building packages. Change-Id: Iaa26f4331966d015b193d2ab1e34621b1e319ef1 --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/37/37/2 -- To view, visit https://gerrit.osmocom.org/37 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Iaa26f4331966d015b193d2ab1e34621b1e319ef1 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 10 11:43:24 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 10 May 2016 11:43:24 +0000 Subject: Change in libosmocore[master]: debian: Fix packaging by requiring python-minimal In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: debian: Fix packaging by requiring python-minimal ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/37 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iaa26f4331966d015b193d2ab1e34621b1e319ef1 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 10 11:43:26 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 10 May 2016 11:43:26 +0000 Subject: Change in libosmocore[master]: debian: Fix packaging by requiring python-minimal In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has submitted this change and it was merged. Change subject: debian: Fix packaging by requiring python-minimal ...................................................................... debian: Fix packaging by requiring python-minimal We require the python2 binary to generate code. In Debian this is provided by python-minimal. Add it to the build-depends to fix building packages. Change-Id: Iaa26f4331966d015b193d2ab1e34621b1e319ef1 Reviewed-on: https://gerrit.osmocom.org/37 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M debian/control 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/debian/control b/debian/control index 42ebdba..468bd07 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Section: libs Priority: optional Maintainer: Harald Welte -Build-Depends: debhelper (>= 9), autotools-dev, autoconf, automake, libtool, dh-autoreconf, libdpkg-perl, git, doxygen, libpcsclite-dev, pkg-config, libtalloc-dev +Build-Depends: debhelper (>= 9), autotools-dev, autoconf, automake, libtool, dh-autoreconf, libdpkg-perl, git, doxygen, libpcsclite-dev, pkg-config, libtalloc-dev, python-minimal Standards-Version: 3.9.6 Homepage: http://bb.osmocom.org/trac/wiki/libosmocore Vcs-Git: git://git.osmocom.org/libosmocore.git -- To view, visit https://gerrit.osmocom.org/37 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iaa26f4331966d015b193d2ab1e34621b1e319ef1 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From sipos.csaba at kvk.uni-obuda.hu Tue May 10 12:01:57 2016 From: sipos.csaba at kvk.uni-obuda.hu (Sipos Csaba) Date: Tue, 10 May 2016 14:01:57 +0200 (CEST) Subject: [PATCH net-next] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) In-Reply-To: <1462744754-10024-1-git-send-email-pablo@netfilter.org> References: <1462744754-10024-1-git-send-email-pablo@netfilter.org> Message-ID: <911730956.12103921.1462881717969.JavaMail.zimbra@kvk.uni-obuda.hu> Dear Pablo, Can I ask when this set of patches are going to be merged? I would like to test it and if possible use it with OAI CN for LTE user plane traffic. The current implementation of GTP-U in OAI CN is somewhat buggy, so it would be nice to use this implementation instead of the one we have now. :-) Thanks! Csaba ----- Eredeti ?zenet ----- Felad?: "Pablo Neira Ayuso" C?mzett: netdev at vger.kernel.org M?solatot kap: openbsc at lists.osmocom.org, davem at davemloft.net Elk?ld?tt ?zenetek: Vas?rnap, 2016. M?jus 8. 23:59:14 T?rgy: [PATCH net-next] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) This is an initial implementation of a netdev driver for GTP datapath (GTP-U) v0 and v1, according to the GSM TS 09.60 and 3GPP TS 29.060 standards. This tunneling protocol is used to prevent subscribers from accessing mobile carrier core network infrastructure. This implementation requires a GGSN userspace daemon that implements the signaling protocol (GTP-C), such as OpenGGSN [1]. This userspace daemon updates the PDP context database that represents active subscriber sessions through a genetlink interface. For more context on this tunneling protocol, you can check the slides that were presented during the NetDev 1.1 [2]. Only IPv4 is supported at this time. [1] http://git.osmocom.org/openggsn/ [2] http://www.netdevconf.org/1.1/proceedings/slides/schultz-welte-osmocom-gtp.pdf Signed-off-by: Pablo Neira Ayuso --- From laforge at gnumonks.org Tue May 10 11:32:17 2016 From: laforge at gnumonks.org (Harald Welte) Date: Tue, 10 May 2016 13:32:17 +0200 Subject: strange file names in log (was Re: Persistent Uplink activity from Moto KRZR K3) In-Reply-To: References: Message-ID: <20160510113217.GC13806@nataraja> Hi Keith, On Tue, May 10, 2016 at 11:01:26AM +0300, Alexander Chemeris wrote: > > <0000> ../../../../osmo-bts/src/common/rsl.c:1642 > > (bts=0,trx=0,ts=0,ss=0) Handing RLL msg UNIT_DATA_IND from LAPDm to MEAS REP How did you manage to get the "../../../../" into the filename path? I've not seen this before, normally this just states "rsl.c" or maybe common/rsl.c but not the complete path? What are you doing to build the software this way? I think it is a complete waste of screen real-estate and I would like to do somethign about it. Does anyone have an explanation for this? -- - Harald Welte http://laforge.gnumonks.org/ ============================================================================ "Privacy in residential applications is a desirable marketing option." (ETSI EN 300 175-7 Ch. A6) From holger at freyther.de Tue May 10 12:52:25 2016 From: holger at freyther.de (Holger Freyther) Date: Tue, 10 May 2016 14:52:25 +0200 Subject: strange file names in log (was Re: Persistent Uplink activity from Moto KRZR K3) In-Reply-To: <20160510113217.GC13806@nataraja> References: <20160510113217.GC13806@nataraja> Message-ID: > On 10 May 2016, at 13:32, Harald Welte wrote: > > Hi Keith, > > > Does anyone have an explanation for this? SRC != builddir. I have had something similar with newer versions of Yocto and we should replace __FILE__ with __BASE_FILE__ in the log code. https://lists.yoctoproject.org/pipermail/poky/2015-August/010197.html From laforge at gnumonks.org Tue May 10 12:46:05 2016 From: laforge at gnumonks.org (Harald Welte) Date: Tue, 10 May 2016 14:46:05 +0200 Subject: [PATCH net-next] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) In-Reply-To: <911730956.12103921.1462881717969.JavaMail.zimbra@kvk.uni-obuda.hu> References: <1462744754-10024-1-git-send-email-pablo@netfilter.org> <911730956.12103921.1462881717969.JavaMail.zimbra@kvk.uni-obuda.hu> Message-ID: <20160510124605.GE13806@nataraja> Hi Csaba, > Can I ask when this set of patches are going to be merged? As you may know, the decision on when and if to merge a patch is with the respective subsytem maintainer in the linux kernel. They have been submitted for inclusion and are now under review. David Miller is the networking maintainer, but I don't recommend pestering him with requests. He will merge it once he thinks the code is fit for merge ;) -- - Harald Welte http://laforge.gnumonks.org/ ============================================================================ "Privacy in residential applications is a desirable marketing option." (ETSI EN 300 175-7 Ch. A6) From gerrit-no-reply at lists.osmocom.org Tue May 10 13:29:02 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 10 May 2016 13:29:02 +0000 Subject: Change in libosmocore[master]: logging: Use __BASE_FILE__ instead of __FILE__ Message-ID: >From Harald Welte : Harald Welte has uploaded a new change for review. https://gerrit.osmocom.org/38 Change subject: logging: Use __BASE_FILE__ instead of __FILE__ ...................................................................... logging: Use __BASE_FILE__ instead of __FILE__ Apparently __FILE__ expands to nasty '../../..' paths when BUILDDIR != SRCDIR. This in turn leads to ugly log lines like: <0000> ../../../../osmo-bts/src/common/rsl.c:1642 (bts=0,trx=0,ts=0,ss=0) Handing RLL msg UNIT_DATA_IND from LAPDm to MEAS REP Where we certainly wouldn't want the "../../../../osmo-bts" part. Change-Id: If6d2de33c3b6bb2943954bbd81eff261dc279d58 --- M include/osmocom/core/logging.h M include/osmocom/core/utils.h 2 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/38/38/1 diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h index e51487b..c3b3eb5 100644 --- a/include/osmocom/core/logging.h +++ b/include/osmocom/core/logging.h @@ -22,13 +22,13 @@ #define DEBUGP(ss, fmt, args...) \ do { \ if (log_check_level(ss, LOGL_DEBUG)) \ - logp(ss, __FILE__, __LINE__, 0, fmt, ## args); \ + logp(ss, __BASE_FILE__, __LINE__, 0, fmt, ## args); \ } while(0) #define DEBUGPC(ss, fmt, args...) \ do { \ if (log_check_level(ss, LOGL_DEBUG)) \ - logp(ss, __FILE__, __LINE__, 1, fmt, ## args); \ + logp(ss, __BASE_FILE__, __LINE__, 1, fmt, ## args); \ } while(0) #else @@ -51,7 +51,7 @@ #define LOGP(ss, level, fmt, args...) \ do { \ if (log_check_level(ss, level)) \ - logp2(ss, level, __FILE__, __LINE__, 0, fmt, ##args); \ + logp2(ss, level, __BASE_FILE__, __LINE__, 0, fmt, ##args); \ } while(0) /*! \brief Continue a log message through the Osmocom logging framework @@ -63,7 +63,7 @@ #define LOGPC(ss, level, fmt, args...) \ do { \ if (log_check_level(ss, level)) \ - logp2(ss, level, __FILE__, __LINE__, 1, fmt, ##args); \ + logp2(ss, level, __BASE_FILE__, __LINE__, 1, fmt, ##args); \ } while(0) /*! \brief different log levels */ diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 205fa28..156be1b 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -55,7 +55,7 @@ #define OSMO_ASSERT(exp) \ if (!(exp)) { \ - fprintf(stderr, "Assert failed %s %s:%d\n", #exp, __FILE__, __LINE__); \ + fprintf(stderr, "Assert failed %s %s:%d\n", #exp, __BASE_FILE__, __LINE__); \ osmo_generate_backtrace(); \ abort(); \ } -- To view, visit https://gerrit.osmocom.org/38 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If6d2de33c3b6bb2943954bbd81eff261dc279d58 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue May 10 13:39:20 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 10 May 2016 13:39:20 +0000 Subject: Change in osmo-pcap[master]: todo: Add another of my wishlist items In-Reply-To: References: Message-ID: >From Harald Welte : Harald Welte has posted comments on this change. Change subject: todo: Add another of my wishlist items ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/27 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5a6c473a97d04aecae8101a024edb734bbe24401 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcap Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From alexander.chemeris at gmail.com Tue May 10 13:53:56 2016 From: alexander.chemeris at gmail.com (Alexander Chemeris) Date: Tue, 10 May 2016 16:53:56 +0300 Subject: strange file names in log (was Re: Persistent Uplink activity from Moto KRZR K3) In-Reply-To: <20160510113217.GC13806@nataraja> References: <20160510113217.GC13806@nataraja> Message-ID: On Tue, May 10, 2016 at 2:32 PM, Harald Welte wrote: > On Tue, May 10, 2016 at 11:01:26AM +0300, Alexander Chemeris wrote: > > > <0000> ../../../../osmo-bts/src/common/rsl.c:1642 > > > (bts=0,trx=0,ts=0,ss=0) Handing RLL msg UNIT_DATA_IND from LAPDm to MEAS REP > > How did you manage to get the "../../../../" into the filename path? > I've not seen this before, normally this just states "rsl.c" or maybe > common/rsl.c but not the complete path? This happens when you build in a directory outside of the source path - e.g. we're doing this with the osmo-combo script which I think Keith is using. So yes, Holger is right. -- Regards, Alexander Chemeris. CEO, Fairwaves, Inc. https://fairwaves.co From keith at rhizomatica.org Tue May 10 14:51:23 2016 From: keith at rhizomatica.org (Keith) Date: Tue, 10 May 2016 14:51:23 +0000 Subject: Persistent Uplink activity from Moto KRZR K3 In-Reply-To: References: Message-ID: <0D0C8E75-3CDA-482A-925B-BDF8037CFBA7@rhizomatica.org> On 10 May 2016 09:01:26 GMT+01:00, Alexander Chemeris wrote: >Hi Keith, > Hi! >On May 5, 2016 6:02 PM, "Keith" wrote: >> >> They generate constant bursts on the uplink, and this is what I can >see >> that corresponds from osmo-bts log output: > >Just a suggestion - is the phone network or SIM locked? > >If it's locked, it may try to send some message to the network to >verify >that it's connected to an allowed operator. Nope, it's a factory unlocked phone, with a sysmocom SIM. I shall collect some more log and captures and try a few build combinations. Keith. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Tue May 10 15:17:54 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 10 May 2016 15:17:54 +0000 Subject: Change in libosmocore[master]: Set DTX in Cell Options Message-ID: >From Max : Max has uploaded a new change for review. https://gerrit.osmocom.org/39 Change subject: Set DTX in Cell Options ...................................................................... Set DTX in Cell Options * rename field of struct gsm48_cell_options to better match the spec * add comments with spec references * add function for setting DTX in cell options struct * add necessary enum type Change-Id: I5a8924f57669c951b2e51b663d95f1d360062a54 --- M include/osmocom/gsm/protocol/gsm_04_08.h M src/gsm/gsm48.c M src/gsm/libosmogsm.map 3 files changed, 61 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/39/39/1 diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index 3282bc1..5ee387b 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include @@ -469,11 +470,20 @@ uint8_t t3212; } __attribute__ ((packed)); +enum gsm48_dtx_mode { + GSM48_MAY_USE, + GSM48_SHALL_USE, + GSM48_SHALL_NOT +}; + +/* Cell Options for SI6, SACCH (10.5.2.3a.2) or SI3, BCCH (Table 10.5.2.3.1), + 3GPP TS 44.018 */ struct gsm48_cell_options { uint8_t radio_link_timeout:4, dtx:2, pwrc:1, - spare:1; + /* either DN-IND or top bit of DTX IND */ + d:1; } __attribute__ ((packed)); /* Section 9.2.9 CM service request */ @@ -827,6 +837,9 @@ } } +void gsm48_set_dtx(struct gsm48_cell_options *op, enum gsm48_dtx_mode full, + enum gsm48_dtx_mode half, bool is_bcch); + #define gsm48_hdr_msg_type gsm48_hdr_msg_type_r99 /* Section 10.4 */ diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index ab62605..2a30b3c 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -25,7 +25,7 @@ #include #include #include - +#include #include #include @@ -358,6 +358,50 @@ return 0; } +/*! \brief Set DTX mode in Cell Options IE (3GPP TS 44.018) + * \param[in] op Cell Options structure in which DTX parameters will be set + * \param[in] full Mode for full-rate channels + * \param[in] half Mode for half-rate channels + * \param[in] is_bcch Indicates if we should use 10.5.2.3.1 instead of + * 10.5.2.3a.2 + * + * There is no space for separate DTX settings for Full and Half rate channels + * in BCCH - in this case full setting is used for both and half parameter is + * ignored. + */ +void gsm48_set_dtx(struct gsm48_cell_options *op, enum gsm48_dtx_mode full, + enum gsm48_dtx_mode half, bool is_bcch) +{ + if (is_bcch) { + switch (full) { + case GSM48_MAY_USE: + op->dtx = 0; + return; + case GSM48_SHALL_USE: + op->dtx = 1; + return; + case GSM48_SHALL_NOT: + op->dtx = 2; + return; + } + } else { + switch (full) { + case GSM48_MAY_USE: + op->dtx = (half == GSM48_SHALL_USE) ? 3 : 0; + op->d = (half == GSM48_SHALL_NOT) ? 0 : 1; + return; + case GSM48_SHALL_USE: + op->dtx = (half == GSM48_MAY_USE) ? 3 : 1; + op->d = (half == GSM48_SHALL_USE) ? 1 : 0; + return; + case GSM48_SHALL_NOT: + op->dtx = 2; + op->d = (half == GSM48_SHALL_USE) ? 1 : 0; + return; + } + } +} + int gsm48_generate_mid_from_tmsi(uint8_t *buf, uint32_t tmsi) { uint32_t tmsi_be = htonl(tmsi); diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index e0d9dcb..834e5d6 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -162,6 +162,8 @@ gsm48_number_of_paging_subchannels; gsm48_parse_ra; gsm48_rr_att_tlvdef; +gsm48_set_dtx; +gsm48_dtx_mode; gsm48_mi_type_name; gsm48_mcc_mnc_to_bcd; gsm48_mcc_mnc_from_bcd; -- To view, visit https://gerrit.osmocom.org/39 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5a8924f57669c951b2e51b663d95f1d360062a54 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue May 10 15:19:12 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 10 May 2016 15:19:12 +0000 Subject: Change in openbsc[master]: Fix DTX indicator in SI Message-ID: >From Max : Max has uploaded a new change for review. https://gerrit.osmocom.org/40 Change subject: Fix DTX indicator in SI ...................................................................... Fix DTX indicator in SI Use libsmocore function to properly set DTX value in system information messages: the value depends on SI type. Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 --- M openbsc/src/libbsc/bsc_init.c M openbsc/src/libbsc/system_information.c 2 files changed, 17 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/40/40/1 diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c index fea6562..5c27862 100644 --- a/openbsc/src/libbsc/bsc_init.c +++ b/openbsc/src/libbsc/bsc_init.c @@ -458,12 +458,6 @@ return -EINVAL; } - /* allow/disallow DTXu */ - if (bts->network->dtx_enabled) - bts->si_common.cell_options.dtx = 0; - else - bts->si_common.cell_options.dtx = 2; - bts->si_common.cell_options.pwrc = 0; /* PWRC not set */ bts->si_common.cell_sel_par.acs = 0; diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index 0d96621..af3b07d 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -717,6 +718,14 @@ si3->cell_sel_par = bts->si_common.cell_sel_par; si3->rach_control = bts->si_common.rach_control; + /* allow/disallow DTXu */ + if (bts->network->dtx_enabled) + gsm48_set_dtx(&si3->cell_options, GSM48_MAY_USE, GSM48_MAY_USE, + true); + else + gsm48_set_dtx(&si3->cell_options, GSM48_SHALL_NOT, + GSM48_SHALL_NOT, true); + if ((bts->si_valid & (1 << SYSINFO_TYPE_2ter))) { LOGP(DRR, LOGL_INFO, "SI 2ter is included.\n"); si_info.si2ter_indicator = 1; @@ -929,6 +938,14 @@ si6->cell_options = bts->si_common.cell_options; si6->ncc_permitted = bts->si_common.ncc_permitted; + /* allow/disallow DTXu */ + if (bts->network->dtx_enabled) + gsm48_set_dtx(&si6->cell_options, GSM48_MAY_USE, GSM48_MAY_USE, + false); + else + gsm48_set_dtx(&si6->cell_options, GSM48_SHALL_NOT, + GSM48_SHALL_NOT, false); + /* SI6 Rest Octets: 10.5.2.35a: PCH / NCH info, VBS/VGCS options */ return l2_plen; -- To view, visit https://gerrit.osmocom.org/40 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From sipos.csaba at kvk.uni-obuda.hu Tue May 10 16:00:48 2016 From: sipos.csaba at kvk.uni-obuda.hu (Sipos Csaba) Date: Tue, 10 May 2016 18:00:48 +0200 (CEST) Subject: [PATCH net-next] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) In-Reply-To: <20160510124605.GE13806@nataraja> References: <1462744754-10024-1-git-send-email-pablo@netfilter.org> <911730956.12103921.1462881717969.JavaMail.zimbra@kvk.uni-obuda.hu> <20160510124605.GE13806@nataraja> Message-ID: <316607382.12157119.1462896048227.JavaMail.zimbra@kvk.uni-obuda.hu> Hi Harald, Sorry for that, I forgot about the kernel part. Is there anyway to try it before that happens? I don't want to pester anybody. :-) Regards, Csaba ----- Eredeti ?zenet ----- Felad?: "Harald Welte" C?mzett: "Sipos Csaba" M?solatot kap: "Pablo Neira Ayuso" , openbsc at lists.osmocom.org Elk?ld?tt ?zenetek: Kedd, 2016. M?jus 10. 14:46:05 T?rgy: Re: [PATCH net-next] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) Hi Csaba, > Can I ask when this set of patches are going to be merged? As you may know, the decision on when and if to merge a patch is with the respective subsytem maintainer in the linux kernel. They have been submitted for inclusion and are now under review. David Miller is the networking maintainer, but I don't recommend pestering him with requests. He will merge it once he thinks the code is fit for merge ;) -- - Harald Welte http://laforge.gnumonks.org/ ============================================================================ "Privacy in residential applications is a desirable marketing option." (ETSI EN 300 175-7 Ch. A6) From pablo at netfilter.org Tue May 10 17:10:40 2016 From: pablo at netfilter.org (Pablo Neira Ayuso) Date: Tue, 10 May 2016 19:10:40 +0200 Subject: [PATCH net-next] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) In-Reply-To: <316607382.12157119.1462896048227.JavaMail.zimbra@kvk.uni-obuda.hu> References: <1462744754-10024-1-git-send-email-pablo@netfilter.org> <911730956.12103921.1462881717969.JavaMail.zimbra@kvk.uni-obuda.hu> <20160510124605.GE13806@nataraja> <316607382.12157119.1462896048227.JavaMail.zimbra@kvk.uni-obuda.hu> Message-ID: <20160510171040.GA22699@salvia> On Tue, May 10, 2016 at 06:00:48PM +0200, Sipos Csaba wrote: > Hi Harald, > > Sorry for that, I forgot about the kernel part. > > Is there anyway to try it before that happens? I don't want to pester anybody. :-) Wait for 4.7-rc1 to be released or compile this git tree: http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git In userspace, you require libgtnl, get a fresh git clone from: http://git.osmocom.org/libgtpnl/ and openggsn: http://git.osmocom.org/openggsn/ Then, you have to run: # autoreconf -fi # ./configure --enable-gtp-linux # make to compile the gtp linux kernel driver support. Then indicate 'gtp-linux' in your ggsn.conf file. From pablo at netfilter.org Tue May 10 17:31:28 2016 From: pablo at netfilter.org (Pablo Neira Ayuso) Date: Tue, 10 May 2016 19:31:28 +0200 Subject: [PATCH nf-next,v2] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) In-Reply-To: References: <1462748148-17764-1-git-send-email-pablo@netfilter.org> <20160510.122735.2275935466949423395.davem@davemloft.net> Message-ID: <20160510173128.GA32285@salvia> On Tue, May 10, 2016 at 10:16:33AM -0700, Tom Herbert wrote: > On Tue, May 10, 2016 at 9:27 AM, David Miller wrote: > > From: Pablo Neira Ayuso > > Date: Mon, 9 May 2016 00:55:48 +0200 > > > >> This is an initial implementation of a netdev driver for GTP datapath > >> (GTP-U) v0 and v1, according to the GSM TS 09.60 and 3GPP TS 29.060 > >> standards. This tunneling protocol is used to prevent subscribers from > >> accessing mobile carrier core network infrastructure. > >> > >> This implementation requires a GGSN userspace daemon that implements the > >> signaling protocol (GTP-C), such as OpenGGSN [1]. This userspace daemon > >> updates the PDP context database that represents active subscriber > >> sessions through a genetlink interface. > >> > >> For more context on this tunneling protocol, you can check the slides > >> that were presented during the NetDev 1.1 [2]. > >> > >> Only IPv4 is supported at this time. > >> > > Is there a timeline for adding IPv6 support? There is a preliminary kernel patch to add IPv6 that seems to be untested yet, I can share it with you or anyone else want to have a look. Specifically, there are missing bits on the netlink side of the PDP context database to support SGSN and MS IPv6 address, but that shouldn't be much of a problem. On the userspace side, the userspace daemon OpenGGSN still doesn't support IPv6. Adding IPv6 support to this daemon is a bit of a PITA, several people using it in production told me that the daemon runs stable for production, but from a developer perspective the current codebase look not easy to extend (quite many stuff very IPv4 specific, I already spend time trying to refactor it two years ago to prepare this support). Meanwhile, this triggered a new daemon daemon implementation osmo-ggsn to replace it, I posted a proof-of-concept on the openbsc mailing list, but nobody jumped on this to support this development effort so far. From kino at rhizomatica.org Tue May 10 14:45:32 2016 From: kino at rhizomatica.org (Kino@Rhizo) Date: Tue, 10 May 2016 14:45:32 +0000 Subject: strange file names in log (was Re: Persistent Uplink activity from Moto KRZR K3) In-Reply-To: <20160510113217.GC13806@nataraja> References: <20160510113217.GC13806@nataraja> Message-ID: <3FFFE340-3B7E-48E9-92A5-83855B30371B@rhizomatica.org> On 10 May 2016 12:32:17 GMT+01:00, Harald Welte wrote: >Hi Keith, Hi! > >On Tue, May 10, 2016 at 11:01:26AM +0300, Alexander Chemeris wrote: >> > <0000> ../../../../osmo-bts/src/common/rsl.c:1642 >> > (bts=0,trx=0,ts=0,ss=0) Handing RLL msg UNIT_DATA_IND from LAPDm to >MEAS REP > >How did you manage to get the "../../../../" into the filename path? >I think it is a >complete waste of screen real-estate and I would like to do somethign >about it. I agree! I was going to remove the ../../ from the post, but i'm glad i didn't now. -- Sent from my Android device with K-9 Mail. Please excuse my brevity. From davem at davemloft.net Tue May 10 16:27:35 2016 From: davem at davemloft.net (David Miller) Date: Tue, 10 May 2016 12:27:35 -0400 (EDT) Subject: [PATCH nf-next,v2] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) In-Reply-To: <1462748148-17764-1-git-send-email-pablo@netfilter.org> References: <1462748148-17764-1-git-send-email-pablo@netfilter.org> Message-ID: <20160510.122735.2275935466949423395.davem@davemloft.net> From: Pablo Neira Ayuso Date: Mon, 9 May 2016 00:55:48 +0200 > This is an initial implementation of a netdev driver for GTP datapath > (GTP-U) v0 and v1, according to the GSM TS 09.60 and 3GPP TS 29.060 > standards. This tunneling protocol is used to prevent subscribers from > accessing mobile carrier core network infrastructure. > > This implementation requires a GGSN userspace daemon that implements the > signaling protocol (GTP-C), such as OpenGGSN [1]. This userspace daemon > updates the PDP context database that represents active subscriber > sessions through a genetlink interface. > > For more context on this tunneling protocol, you can check the slides > that were presented during the NetDev 1.1 [2]. > > Only IPv4 is supported at this time. > > [1] http://git.osmocom.org/openggsn/ > [2] http://www.netdevconf.org/1.1/proceedings/slides/schultz-welte-osmocom-gtp.pdf > > Signed-off-by: Pablo Neira Ayuso > --- > v2: Rebase on top of current HEAD to resolve minor conflict with recent PPP > updates in include/uapi/linux/if_link.h so this applies cleanly. Applied, thanks. From tom at herbertland.com Tue May 10 17:16:33 2016 From: tom at herbertland.com (Tom Herbert) Date: Tue, 10 May 2016 10:16:33 -0700 Subject: [PATCH nf-next,v2] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) In-Reply-To: <20160510.122735.2275935466949423395.davem@davemloft.net> References: <1462748148-17764-1-git-send-email-pablo@netfilter.org> <20160510.122735.2275935466949423395.davem@davemloft.net> Message-ID: On Tue, May 10, 2016 at 9:27 AM, David Miller wrote: > From: Pablo Neira Ayuso > Date: Mon, 9 May 2016 00:55:48 +0200 > >> This is an initial implementation of a netdev driver for GTP datapath >> (GTP-U) v0 and v1, according to the GSM TS 09.60 and 3GPP TS 29.060 >> standards. This tunneling protocol is used to prevent subscribers from >> accessing mobile carrier core network infrastructure. >> >> This implementation requires a GGSN userspace daemon that implements the >> signaling protocol (GTP-C), such as OpenGGSN [1]. This userspace daemon >> updates the PDP context database that represents active subscriber >> sessions through a genetlink interface. >> >> For more context on this tunneling protocol, you can check the slides >> that were presented during the NetDev 1.1 [2]. >> >> Only IPv4 is supported at this time. >> Is there a timeline for adding IPv6 support? Tom >> [1] http://git.osmocom.org/openggsn/ >> [2] http://www.netdevconf.org/1.1/proceedings/slides/schultz-welte-osmocom-gtp.pdf >> >> Signed-off-by: Pablo Neira Ayuso >> --- >> v2: Rebase on top of current HEAD to resolve minor conflict with recent PPP >> updates in include/uapi/linux/if_link.h so this applies cleanly. > > Applied, thanks. From eric.dumazet at gmail.com Tue May 10 18:54:07 2016 From: eric.dumazet at gmail.com (Eric Dumazet) Date: Tue, 10 May 2016 11:54:07 -0700 Subject: [PATCH nf-next,v2] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) In-Reply-To: <1462748148-17764-1-git-send-email-pablo@netfilter.org> References: <1462748148-17764-1-git-send-email-pablo@netfilter.org> Message-ID: <1462906447.23934.97.camel@edumazet-glaptop3.roam.corp.google.com> On Mon, 2016-05-09 at 00:55 +0200, Pablo Neira Ayuso wrote: > +static int gtp1u_udp_encap_recv(struct gtp_dev *gtp, struct sk_buff *skb, > + bool xnet) > +{ > + unsigned int hdrlen = sizeof(struct udphdr) + > + sizeof(struct gtp1_header); > + struct gtp1_header *gtp1; > + struct pdp_ctx *pctx; > + int ret = 0; > + > + if (!pskb_may_pull(skb, hdrlen)) > + return -1; > + > + gtp1 = (struct gtp1_header *)(skb->data + sizeof(struct udphdr)); > + > + if ((gtp1->flags >> 5) != GTP_V1) > + return 1; > + > + if (gtp1->type != GTP_TPDU) > + return 1; > + > + /* From 29.060: "This field shall be present if and only if any one or > + * more of the S, PN and E flags are set.". > + * > + * If any of the bit is set, then the remaining ones also have to be > + * set. > + */ > + if (gtp1->flags & GTP1_F_MASK) > + hdrlen += 4; > + > + /* Make sure the header is larger enough, including extensions. */ > + if (!pskb_may_pull(skb, hdrlen)) > + return -1; You need to reload gtp1 here, as the previous pskb_may_pull() might have reallocated skb->head > + > + rcu_read_lock(); > + pctx = gtp1_pdp_find(gtp, ntohl(gtp1->tid)); Or risk a use after free here. > + if (!pctx) { > + netdev_dbg(gtp->dev, "No PDP ctx to decap skb=%p\n", skb); > + ret = -1; > + goto out_rcu; > + } > + > + if (!gtp_check_src_ms(skb, pctx, hdrlen)) { > + netdev_dbg(gtp->dev, "No PDP ctx for this MS\n"); > + ret = -1; > + goto out_rcu; > + } > + rcu_read_unlock(); > + > + /* Get rid of the GTP + UDP headers. */ > + return iptunnel_pull_header(skb, hdrlen, skb->protocol, xnet); > +out_rcu: > + rcu_read_unlock(); > + return ret; > +} From gerrit-no-reply at lists.osmocom.org Tue May 10 19:03:34 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 10 May 2016 19:03:34 +0000 Subject: Change in libosmocore[master]: Set DTX in Cell Options In-Reply-To: References: Message-ID: >From Harald Welte : Harald Welte has posted comments on this change. Change subject: Set DTX in Cell Options ...................................................................... Patch Set 1: Code-Review-1 (1 comment) aside from the naming (see comment) it looks fine to me https://gerrit.osmocom.org/#/c/39/1/include/osmocom/gsm/protocol/gsm_04_08.h File include/osmocom/gsm/protocol/gsm_04_08.h: Line 474: GSM48_MAY_USE, Naming. GSM48_MAY_USE is very generic, as 04.08 covers all of GSM L3. So unless we intend to use the same enum for other topics, too (which we don't, as it is called gsm48_dtx_mode), it should be called GSM48_{MAY,SHALL,SHALL_NOT}_USE_DTX or GSM48_DTX_{MAY,SHALL,SHALL_NOT}_BE_USED -- To view, visit https://gerrit.osmocom.org/39 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5a8924f57669c951b2e51b663d95f1d360062a54 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue May 10 19:05:57 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 10 May 2016 19:05:57 +0000 Subject: Change in openbsc[master]: Fix DTX indicator in SI In-Reply-To: References: Message-ID: >From Harald Welte : Harald Welte has posted comments on this change. Change subject: Fix DTX indicator in SI ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/40/1/openbsc/src/libbsc/system_information.c File openbsc/src/libbsc/system_information.c: Line 722: if (bts->network->dtx_enabled) slightly unrelated to this patch, bu still worth addressing in a separate fix: The DTX configuration should be per BTS and not a global, network-wide setting. There might be a network-wide default with BTS-local overrides, but that probably gets too complex to understand? -- To view, visit https://gerrit.osmocom.org/40 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-HasComments: Yes From sipos.csaba at kvk.uni-obuda.hu Tue May 10 19:31:53 2016 From: sipos.csaba at kvk.uni-obuda.hu (Sipos Csaba) Date: Tue, 10 May 2016 21:31:53 +0200 (CEST) Subject: [PATCH net-next] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) In-Reply-To: <20160510171040.GA22699@salvia> References: <1462744754-10024-1-git-send-email-pablo@netfilter.org> <911730956.12103921.1462881717969.JavaMail.zimbra@kvk.uni-obuda.hu> <20160510124605.GE13806@nataraja> <316607382.12157119.1462896048227.JavaMail.zimbra@kvk.uni-obuda.hu> <20160510171040.GA22699@salvia> Message-ID: <364233309.12185573.1462908713942.JavaMail.zimbra@kvk.uni-obuda.hu> Hi Pablo, Thanks for the info! Just went through the code, and wanted to ask if I am right that this implementation does not support GTP-U echo request/reply yet? I am asking because according to the specs. this is an optional feature, but in practice there are quite a lot of ENB products that require a response to the GTP-U Echo Req. they send, otherwise they are not going to start forwarding any data on the GTP-U path. The reason for this is that in practice the ENB is always connected to more than one MME, and the only way for the ENB to know which SGW is available is to send GTP-U echo requests to check the availability of the service. Just noticed that the link for libgtpnl is not working yet. Regards, Csaba ----- Eredeti ?zenet ----- Felad?: "Pablo Neira Ayuso" C?mzett: "Sipos Csaba" M?solatot kap: "Harald Welte" , openbsc at lists.osmocom.org Elk?ld?tt ?zenetek: Kedd, 2016. M?jus 10. 19:10:40 T?rgy: Re: [PATCH net-next] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) On Tue, May 10, 2016 at 06:00:48PM +0200, Sipos Csaba wrote: > Hi Harald, > > Sorry for that, I forgot about the kernel part. > > Is there anyway to try it before that happens? I don't want to pester anybody. :-) Wait for 4.7-rc1 to be released or compile this git tree: http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git In userspace, you require libgtnl, get a fresh git clone from: http://git.osmocom.org/libgtpnl/ and openggsn: http://git.osmocom.org/openggsn/ Then, you have to run: # autoreconf -fi # ./configure --enable-gtp-linux # make to compile the gtp linux kernel driver support. Then indicate 'gtp-linux' in your ggsn.conf file. From pablo at netfilter.org Tue May 10 20:11:11 2016 From: pablo at netfilter.org (Pablo Neira Ayuso) Date: Tue, 10 May 2016 22:11:11 +0200 Subject: [PATCH net-next] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) In-Reply-To: <364233309.12185573.1462908713942.JavaMail.zimbra@kvk.uni-obuda.hu> References: <1462744754-10024-1-git-send-email-pablo@netfilter.org> <911730956.12103921.1462881717969.JavaMail.zimbra@kvk.uni-obuda.hu> <20160510124605.GE13806@nataraja> <316607382.12157119.1462896048227.JavaMail.zimbra@kvk.uni-obuda.hu> <20160510171040.GA22699@salvia> <364233309.12185573.1462908713942.JavaMail.zimbra@kvk.uni-obuda.hu> Message-ID: <20160510201111.GA7087@salvia> On Tue, May 10, 2016 at 09:31:53PM +0200, Sipos Csaba wrote: > Hi Pablo, > > Thanks for the info! > > Just went through the code, and wanted to ask if I am right that > this implementation does not support GTP-U echo request/reply yet? > > I am asking because according to the specs. this is an optional > feature, but in practice there are quite a lot of ENB products that > require a response to the GTP-U Echo Req. they send, otherwise they > are not going to start forwarding any data on the GTP-U path. The > reason for this is that in practice the ENB is always connected to > more than one MME, and the only way for the ENB to know which SGW is > available is to send GTP-U echo requests to check the availability > of the service. We don't handle this from the kernel, this GTP-U echo request is passed up to userspace. The idea is to support any signaling message from userspace, only G-PDU messages are handled from the kernel itself. Openggsn has code to generate the Echo response for this. > Just noticed that the link for libgtpnl is not working yet. cgit is not working properly for some reason, but the repo can be cloned via: git clone git://git.osmocom.org/libgtpnl From holger at freyther.de Tue May 10 20:42:15 2016 From: holger at freyther.de (Holger Freyther) Date: Tue, 10 May 2016 22:42:15 +0200 Subject: [PATCH net-next] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) In-Reply-To: <20160510201111.GA7087@salvia> References: <1462744754-10024-1-git-send-email-pablo@netfilter.org> <911730956.12103921.1462881717969.JavaMail.zimbra@kvk.uni-obuda.hu> <20160510124605.GE13806@nataraja> <316607382.12157119.1462896048227.JavaMail.zimbra@kvk.uni-obuda.hu> <20160510171040.GA22699@salvia> <364233309.12185573.1462908713942.JavaMail.zimbra@kvk.uni-obuda.hu> <20160510201111.GA7087@salvia> Message-ID: <57CFC1BE-61B2-407D-AEED-2B4A870CEF92@freyther.de> > On 10 May 2016, at 22:11, Pablo Neira Ayuso wrote: > > cgit is not working properly for some reason, but the repo can be we don't export all repos by default and yours needed a chmod o+x on the server. holger From sipos.csaba at kvk.uni-obuda.hu Tue May 10 21:30:19 2016 From: sipos.csaba at kvk.uni-obuda.hu (Sipos Csaba) Date: Tue, 10 May 2016 23:30:19 +0200 (CEST) Subject: [PATCH net-next] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) In-Reply-To: <20160510201111.GA7087@salvia> References: <1462744754-10024-1-git-send-email-pablo@netfilter.org> <911730956.12103921.1462881717969.JavaMail.zimbra@kvk.uni-obuda.hu> <20160510124605.GE13806@nataraja> <316607382.12157119.1462896048227.JavaMail.zimbra@kvk.uni-obuda.hu> <20160510171040.GA22699@salvia> <364233309.12185573.1462908713942.JavaMail.zimbra@kvk.uni-obuda.hu> <20160510201111.GA7087@salvia> Message-ID: <176496614.12197788.1462915819261.JavaMail.zimbra@kvk.uni-obuda.hu> > We don't handle this from the kernel, this GTP-U echo request is > passed up to userspace. The idea is to support any signaling message > from userspace, only G-PDU messages are handled from the kernel > itself. Openggsn has code to generate the Echo response for this. I am not completely sure whats the reason behind it. A similar example would be to move the handling of SCTP heartbeat messages from the SCTP stack to lets say the MME entity. Maybe I am misunderstanding something, but I really don't see what is the reason behind handling the echo requests in the GGSN instead of the gtp-u stack itself. Can someone please shed some light on this one? Regards, Csaba ----- Eredeti ?zenet ----- Felad?: "Pablo Neira Ayuso" C?mzett: "Sipos Csaba" M?solatot kap: "Harald Welte" , openbsc at lists.osmocom.org Elk?ld?tt ?zenetek: Kedd, 2016. M?jus 10. 22:11:11 T?rgy: Re: [PATCH net-next] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) On Tue, May 10, 2016 at 09:31:53PM +0200, Sipos Csaba wrote: > Hi Pablo, > > Thanks for the info! > > Just went through the code, and wanted to ask if I am right that > this implementation does not support GTP-U echo request/reply yet? > > I am asking because according to the specs. this is an optional > feature, but in practice there are quite a lot of ENB products that > require a response to the GTP-U Echo Req. they send, otherwise they > are not going to start forwarding any data on the GTP-U path. The > reason for this is that in practice the ENB is always connected to > more than one MME, and the only way for the ENB to know which SGW is > available is to send GTP-U echo requests to check the availability > of the service. We don't handle this from the kernel, this GTP-U echo request is passed up to userspace. The idea is to support any signaling message from userspace, only G-PDU messages are handled from the kernel itself. Openggsn has code to generate the Echo response for this. > Just noticed that the link for libgtpnl is not working yet. cgit is not working properly for some reason, but the repo can be cloned via: git clone git://git.osmocom.org/libgtpnl From xiyou.wangcong at gmail.com Wed May 11 05:24:56 2016 From: xiyou.wangcong at gmail.com (Cong Wang) Date: Tue, 10 May 2016 22:24:56 -0700 Subject: [PATCH nf-next,v2] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) In-Reply-To: <1462748148-17764-1-git-send-email-pablo@netfilter.org> References: <1462748148-17764-1-git-send-email-pablo@netfilter.org> Message-ID: On Sun, May 8, 2016 at 3:55 PM, Pablo Neira Ayuso wrote: > +static int gtp_genl_new_pdp(struct sk_buff *skb, struct genl_info *info) > +{ ... > + > + net = gtp_genl_get_net(sock_net(skb->sk), info->attrs); > + if (IS_ERR(net)) > + return PTR_ERR(net); > + > + /* Check if there's an existing gtpX device to configure */ > + dev = gtp_find_dev(net, nla_get_u32(info->attrs[GTPA_LINK])); > + if (dev == NULL) > + return -ENODEV; > + > + return ipv4_pdp_add(dev, info); Seems you are leaking struct net at least in the error path. From laforge at netfilter.org Wed May 11 05:47:47 2016 From: laforge at netfilter.org (Harald Welte) Date: Wed, 11 May 2016 07:47:47 +0200 Subject: [PATCH net-next] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) In-Reply-To: <176496614.12197788.1462915819261.JavaMail.zimbra@kvk.uni-obuda.hu> References: <1462744754-10024-1-git-send-email-pablo@netfilter.org> <911730956.12103921.1462881717969.JavaMail.zimbra@kvk.uni-obuda.hu> <20160510124605.GE13806@nataraja> <316607382.12157119.1462896048227.JavaMail.zimbra@kvk.uni-obuda.hu> <20160510171040.GA22699@salvia> <364233309.12185573.1462908713942.JavaMail.zimbra@kvk.uni-obuda.hu> <20160510201111.GA7087@salvia> <176496614.12197788.1462915819261.JavaMail.zimbra@kvk.uni-obuda.hu> Message-ID: <20160511054747.GI13049@nataraja> Hi Sipos, On Tue, May 10, 2016 at 11:30:19PM +0200, Sipos Csaba wrote: > Maybe I am misunderstanding something, but I really don't see what is > the reason behind handling the echo requests in the GGSN instead of > the gtp-u stack itself. Can someone please shed some light on this > one? because when you send an ECHO request, you want to know if the full GTP stack on the other side is still alive, both for control and for user plane? If you automatically replied to them from the kernel, it mihgt be that just the user plane (kernel space) is still alive, while the control plane (user space) is already dead? -- - Harald Welte http://netfilter.org/ ============================================================================ "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie From gerrit-no-reply at lists.osmocom.org Wed May 11 08:23:44 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 08:23:44 +0000 Subject: Change in libosmocore[master]: Set DTX in Cell Options In-Reply-To: References: Message-ID: >From Max : Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/39 to look at the new patch set (#2). Change subject: Set DTX in Cell Options ...................................................................... Set DTX in Cell Options * rename field of struct gsm48_cell_options to better match the spec * add comments with spec references * add function for setting DTX in cell options struct * add necessary enum type Change-Id: I5a8924f57669c951b2e51b663d95f1d360062a54 --- M include/osmocom/gsm/protocol/gsm_04_08.h M src/gsm/gsm48.c M src/gsm/libosmogsm.map 3 files changed, 61 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/39/39/2 -- To view, visit https://gerrit.osmocom.org/39 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I5a8924f57669c951b2e51b663d95f1d360062a54 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed May 11 08:45:11 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 08:45:11 +0000 Subject: Change in libosmocore[master]: Set DTX in Cell Options In-Reply-To: References: Message-ID: >From Max : Max has posted comments on this change. Change subject: Set DTX in Cell Options ...................................................................... Patch Set 2: Build failure in unrelated test bssgp-fc - weird. How can I download testsuite.log from jenkins? -- To view, visit https://gerrit.osmocom.org/39 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5a8924f57669c951b2e51b663d95f1d360062a54 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 11 08:53:12 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 08:53:12 +0000 Subject: Change in openbsc[master]: Ignore extended test leftovers Message-ID: >From Max : Max has uploaded a new change for review. https://gerrit.osmocom.org/41 Change subject: Ignore extended test leftovers ...................................................................... Ignore extended test leftovers Change-Id: If9e3522d934611f631cbfde6e6db52251babc37f --- M openbsc/.gitignore 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/41/41/1 diff --git a/openbsc/.gitignore b/openbsc/.gitignore index bae3b65..0a2965d 100644 --- a/openbsc/.gitignore +++ b/openbsc/.gitignore @@ -88,7 +88,7 @@ tests/testsuite tests/testsuite.log - +gsn_restart src/openbsc.cfg* writtenconfig/ gtphub_restart_count -- To view, visit https://gerrit.osmocom.org/41 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9e3522d934611f631cbfde6e6db52251babc37f Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed May 11 09:24:33 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 09:24:33 +0000 Subject: Change in openbsc[master]: Make extending subscriber creation easier Message-ID: >From Max : Max has uploaded a new change for review. https://gerrit.osmocom.org/42 Change subject: Make extending subscriber creation easier ...................................................................... Make extending subscriber creation easier * rename variable controlling subscriber creation * use enum for subscriber creation policy * move check for subscriber creation policy into separate static function Change-Id: I3b10a9a764fd3a7bb96717a990e52caae16266da --- M openbsc/include/openbsc/gsm_data.h M openbsc/src/libbsc/net_init.c M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/libmsc/vty_interface_layer3.c 4 files changed, 23 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/42/42/1 diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index f229e74..3c7f5d3 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -19,6 +19,12 @@ #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] +enum gsm_subscr_creation_mode { + GSM_SUBSCR_DONT_CREATE = 0, + GSM_SUBSCR_CREAT_W_RAND_EXT = 1, + GSM_SUBSCR_CREAT_W_NO_EXT = 2 +}; + enum gsm_security_event { GSM_SECURITY_NOAVAIL, GSM_SECURITY_AUTH_FAILED, @@ -281,7 +287,7 @@ struct osmo_bsc_data *bsc_data; /* subscriber related features */ - int create_subscriber; + int subscr_creation_mode; struct gsm_subscriber_group *subscr_group; struct gsm_sms_queue *sms_queue; diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c index 568a0b8..afcaaf3 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -48,7 +48,7 @@ INIT_LLIST_HEAD(&net->bsc_data->mscs); net->subscr_group->net = net; - net->create_subscriber = 1; + net->subscr_creation_mode = GSM_SUBSCR_CREAT_W_RAND_EXT; net->country_code = country_code; net->network_code = network_code; diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index f02f784..c93bcb5 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -507,6 +507,14 @@ return gsm48_conn_sendmsg(msg, conn, NULL); } +static struct gsm_subscriber *subscr_create(const struct gsm_network *net, + const char *imsi) +{ + if (GSM_SUBSCR_DONT_CREATE == net->subscr_creation_mode) + return NULL; + + return subscr_create_subscriber(net->subscr_group, imsi); +} /* Parse Chapter 9.2.11 Identity Response */ static int mm_rx_id_resp(struct gsm_subscriber_connection *conn, struct msgb *msg) @@ -530,9 +538,8 @@ if (!conn->subscr) { conn->subscr = subscr_get_by_imsi(net->subscr_group, mi_string); - if (!conn->subscr && net->create_subscriber) - conn->subscr = subscr_create_subscriber( - net->subscr_group, mi_string); + if (!conn->subscr) + conn->subscr = subscr_create(net, mi_string); } if (!conn->subscr && conn->loc_operation) { gsm0408_loc_upd_rej(conn, bts->network->reject_cause); @@ -641,9 +648,8 @@ /* look up subscriber based on IMSI, create if not found */ subscr = subscr_get_by_imsi(bts->network->subscr_group, mi_string); - if (!subscr && bts->network->create_subscriber) { - subscr = subscr_create_subscriber( - bts->network->subscr_group, mi_string); + if (!subscr) { + subscr = subscr_create( bts->network, mi_string); } if (!subscr) { gsm0408_loc_upd_rej(conn, bts->network->reject_cause); diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 4c2088a..5d74e04 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -1036,7 +1036,7 @@ "Make a new record when a subscriber is first seen.\n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->create_subscriber = 1; + gsmnet->subscr_creation_mode = GSM_SUBSCR_CREAT_W_RAND_EXT; return CMD_SUCCESS; } @@ -1045,7 +1045,7 @@ NO_STR "Make a new record when a subscriber is first seen.\n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->create_subscriber = 0; + gsmnet->subscr_creation_mode = GSM_SUBSCR_DONT_CREATE; return CMD_SUCCESS; } @@ -1072,7 +1072,7 @@ struct gsm_network *gsmnet = gsmnet_from_vty(vty); vty_out(vty, "nitb%s", VTY_NEWLINE); vty_out(vty, " %ssubscriber-create-on-demand%s", - gsmnet->create_subscriber ? "" : "no ", VTY_NEWLINE); + gsmnet->subscr_creation_mode ? "" : "no ", VTY_NEWLINE); vty_out(vty, " %sassign-tmsi%s", gsmnet->avoid_tmsi ? "no " : "", VTY_NEWLINE); return CMD_SUCCESS; -- To view, visit https://gerrit.osmocom.org/42 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3b10a9a764fd3a7bb96717a990e52caae16266da Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed May 11 09:39:41 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 09:39:41 +0000 Subject: Change in openbsc[master]: Fix DTX indicator in SI In-Reply-To: References: Message-ID: >From Max : Hello Harald Welte, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/40 to look at the new patch set (#2). Change subject: Fix DTX indicator in SI ...................................................................... Fix DTX indicator in SI Previously hardcoded values were used for DTX indicator which is error prone. The DTX was assigned regardless of SI type. * Use libsmocore function to properly set DTX value in system information messages: the value depends on SI type. * Use flags from gsm_08_58.h for DTX Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 --- M openbsc/src/libbsc/abis_rsl.c M openbsc/src/libbsc/bsc_init.c M openbsc/src/libbsc/system_information.c 3 files changed, 18 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/40/40/2 -- To view, visit https://gerrit.osmocom.org/40 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Wed May 11 09:43:06 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 09:43:06 +0000 Subject: Change in openbsc[master]: Fix DTX indicator in SI In-Reply-To: References: Message-ID: >From Max : Max has posted comments on this change. Change subject: Fix DTX indicator in SI ...................................................................... Patch Set 2: Updated to match changes in libosmocore patch. As for vty change - I agree that it would be simpler to deprecate old network option (which was never fully supported anyway) and introduce per-bts options instead, preferably - separate for DTXu and DTXd. I'll make separate patch for that. -- To view, visit https://gerrit.osmocom.org/40 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 11 10:12:13 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 10:12:13 +0000 Subject: Change in libosmocore[master]: Set DTX in Cell Options In-Reply-To: References: Message-ID: >From Harald Welte : Harald Welte has posted comments on this change. Change subject: Set DTX in Cell Options ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/39 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5a8924f57669c951b2e51b663d95f1d360062a54 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 11 10:12:25 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 10:12:25 +0000 Subject: Change in openbsc[master]: Fix DTX indicator in SI In-Reply-To: References: Message-ID: >From Harald Welte : Harald Welte has posted comments on this change. Change subject: Fix DTX indicator in SI ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/40 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 11 10:14:30 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 10:14:30 +0000 Subject: Change in libosmocore[master]: logging: Use __BASE_FILE__ instead of __FILE__ In-Reply-To: References: Message-ID: >From Harald Welte : Harald Welte has posted comments on this change. Change subject: logging: Use __BASE_FILE__ instead of __FILE__ ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/38 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If6d2de33c3b6bb2943954bbd81eff261dc279d58 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 11 10:15:06 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 10:15:06 +0000 Subject: Change in openbsc[master]: Ignore extended test leftovers In-Reply-To: References: Message-ID: >From Harald Welte : Harald Welte has posted comments on this change. Change subject: Ignore extended test leftovers ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/41 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If9e3522d934611f631cbfde6e6db52251babc37f Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 11 10:17:16 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 10:17:16 +0000 Subject: Change in openbsc[master]: Make extending subscriber creation easier In-Reply-To: References: Message-ID: >From Harald Welte : Harald Welte has posted comments on this change. Change subject: Make extending subscriber creation easier ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/42/1/openbsc/src/libmsc/vty_interface_layer3.c File openbsc/src/libmsc/vty_interface_layer3.c: Line 1075: gsmnet->subscr_creation_mode ? "" : "no ", VTY_NEWLINE); Will you be following-up with another patch that allows us to enable GSM_SUBSCR_CREAT_W_NO_EXT mode? Right now the enum is introduced, but no way to activate it? If you have a follow-up, keep this patch with the new enum value, it doesn't hurt. -- To view, visit https://gerrit.osmocom.org/42 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3b10a9a764fd3a7bb96717a990e52caae16266da Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed May 11 10:21:45 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 10:21:45 +0000 Subject: Change in openbsc[master]: Make extending subscriber creation easier In-Reply-To: References: Message-ID: >From Max : Max has posted comments on this change. Change subject: Make extending subscriber creation easier ...................................................................... Patch Set 1: Yes, definitely, there will be follow-ups. I'm re-sending patch series for imsi authorization and subscribers with no random extension from pre-gerrit time. Both are touching the same code paths. I'm also incorporating feedback received in ML. -- To view, visit https://gerrit.osmocom.org/42 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3b10a9a764fd3a7bb96717a990e52caae16266da Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 11 10:54:32 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 10:54:32 +0000 Subject: Change in openbsc[master]: Ignore extended test leftovers In-Reply-To: References: Message-ID: >From Neels Hofmeyr : Neels Hofmeyr has posted comments on this change. Change subject: Ignore extended test leftovers ...................................................................... Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/41/1/openbsc/.gitignore File openbsc/.gitignore: Line 91: gsn_restart cosmetic: this would make sense to put below, next to gtphub_restart_count -- To view, visit https://gerrit.osmocom.org/41 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If9e3522d934611f631cbfde6e6db52251babc37f Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed May 11 11:09:33 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 11:09:33 +0000 Subject: Change in openbsc[master]: Cleanup and extend db test Message-ID: >From Max : Max has uploaded a new change for review. https://gerrit.osmocom.org/43 Change subject: Cleanup and extend db test ...................................................................... Cleanup and extend db test * Move copy-pasted code into separate function to make writing more tests easier * Add explicit check for db_get_subscriber result to prevent silent segfault of the test Change-Id: I9e39af85718514dd0f081d41c234c9dda77c4b27 --- M openbsc/tests/db/db_test.c 1 file changed, 37 insertions(+), 53 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/43/43/1 diff --git a/openbsc/tests/db/db_test.c b/openbsc/tests/db/db_test.c index fb159a5..a375253 100644 --- a/openbsc/tests/db/db_test.c +++ b/openbsc/tests/db/db_test.c @@ -159,10 +159,44 @@ subscr_put(rcv_subscr); } -int main() +static void test_subs(const char *alice_imsi, char *imei1, char *imei2) { + struct gsm_subscriber *alice = NULL, *alice_db; char scratch_str[256]; + alice = db_create_subscriber(alice_imsi); + db_subscriber_assoc_imei(alice, imei1); + if (imei2) + db_subscriber_assoc_imei(alice, imei2); + db_subscriber_alloc_tmsi(alice); + alice->lac=42; + db_sync_subscriber(alice); + /* Get by TMSI */ + snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi); + alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + /* Get by IMSI */ + alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice_imsi); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + /* Get by id */ + snprintf(scratch_str, sizeof(scratch_str), "%llu", alice->id); + alice_db = db_get_subscriber(GSM_SUBSCRIBER_ID, scratch_str); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + /* Get by extension */ + alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); + if (alice_db) { + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + } else + printf("failed to get subscriber for %s\n", alice->imsi); + SUBSCR_PUT(alice); +} + +int main() +{ printf("Testing subscriber database code.\n"); osmo_init_logging(&log_info); log_set_print_filename(osmo_stderr_target, 0); @@ -193,58 +227,8 @@ SUBSCR_PUT(alice_db); SUBSCR_PUT(alice); - alice_imsi = "3693245423445"; - alice = db_create_subscriber(alice_imsi); - db_subscriber_assoc_imei(alice, "1234567890"); - db_subscriber_alloc_tmsi(alice); - alice->lac=42; - db_sync_subscriber(alice); - /* Get by TMSI */ - snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by IMSI */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice_imsi); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by id */ - snprintf(scratch_str, sizeof(scratch_str), "%llu", alice->id); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_ID, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by extension */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - SUBSCR_PUT(alice); - - alice_imsi = "9993245423445"; - alice = db_create_subscriber(alice_imsi); - db_subscriber_alloc_tmsi(alice); - alice->lac=42; - db_sync_subscriber(alice); - db_subscriber_assoc_imei(alice, "1234567890"); - db_subscriber_assoc_imei(alice, "6543560920"); - /* Get by TMSI */ - snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by IMSI */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice_imsi); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by id */ - snprintf(scratch_str, sizeof(scratch_str), "%llu", alice->id); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_ID, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by extension */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - SUBSCR_PUT(alice); + test_subs("3693245423445", "1234567890", NULL); + test_subs("9993245423445", "1234567890", "6543560920"); /* create it again and see it fails */ alice = db_create_subscriber(alice_imsi); -- To view, visit https://gerrit.osmocom.org/43 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9e39af85718514dd0f081d41c234c9dda77c4b27 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed May 11 11:10:51 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 11:10:51 +0000 Subject: Change in openbsc[master]: Make extending subscriber creation easier In-Reply-To: References: Message-ID: >From Neels Hofmeyr : Neels Hofmeyr has posted comments on this change. Change subject: Make extending subscriber creation easier ...................................................................... Patch Set 1: Code-Review+1 (2 comments) maybe tweak cosmetics, and what hwelte said (vty) https://gerrit.osmocom.org/#/c/42/1/openbsc/src/libmsc/gsm_04_08.c File openbsc/src/libmsc/gsm_04_08.c: Line 513: if (GSM_SUBSCR_DONT_CREATE == net->subscr_creation_mode) yoda conditional Line 652: subscr = subscr_create( bts->network, mi_string); whitespace "(\t" -- To view, visit https://gerrit.osmocom.org/42 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3b10a9a764fd3a7bb96717a990e52caae16266da Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed May 11 14:10:04 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 14:10:04 +0000 Subject: Change in openbsc[master]: Move DTX settings to BTS In-Reply-To: References: Message-ID: >From Max : Hello Harald Welte, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/40 to look at the new patch set (#3). Change subject: Move DTX settings to BTS ...................................................................... Move DTX settings to BTS * Add per-BTS DTX settings * Configure Uplink and Downlink DTX separately * Remove global DTX option (it was never tested/used anyway) * Use libosmocore function for DTX indicator in System Information (previously it was incorrectly assigned for half-rate channels) Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 --- M openbsc/doc/examples/osmo-bsc/osmo-bsc.cfg M openbsc/include/openbsc/gsm_data.h M openbsc/include/openbsc/gsm_data_shared.h M openbsc/src/libbsc/abis_rsl.c M openbsc/src/libbsc/bsc_init.c M openbsc/src/libbsc/bsc_vty.c M openbsc/src/libbsc/system_information.c 7 files changed, 64 insertions(+), 28 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/40/40/3 -- To view, visit https://gerrit.osmocom.org/40 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Wed May 11 14:14:27 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 14:14:27 +0000 Subject: Change in openbsc[master]: Make extending subscriber creation easier In-Reply-To: References: Message-ID: >From Max : Hello Neels Hofmeyr, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/42 to look at the new patch set (#2). Change subject: Make extending subscriber creation easier ...................................................................... Make extending subscriber creation easier * rename variable controlling subscriber creation * use enum for subscriber creation policy * move check for subscriber creation policy into separate static function Change-Id: I3b10a9a764fd3a7bb96717a990e52caae16266da --- M openbsc/include/openbsc/gsm_data.h M openbsc/src/libbsc/net_init.c M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/libmsc/vty_interface_layer3.c 4 files changed, 23 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/42/42/2 -- To view, visit https://gerrit.osmocom.org/42 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3b10a9a764fd3a7bb96717a990e52caae16266da Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed May 11 15:47:49 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 15:47:49 +0000 Subject: Change in libosmocore[master]: Add function to make Uplink Measurement Message-ID: >From Max : Max has uploaded a new change for review. https://gerrit.osmocom.org/44 Change subject: Add function to make Uplink Measurement ...................................................................... Add function to make Uplink Measurement It assembles RSL Uplink Measurement IE according to 3GPP TS 08.58 ?9.3.25. The function is based on lchan_build_rsl_ul_meas() from OsmoBTS but optionally includes DTX information. Change-Id: Ib37107bcc9909e5105ea711de42d3fb1db7e8d9e --- M include/osmocom/gsm/meas_rep.h M src/gsm/gsm_utils.c M src/gsm/libosmogsm.map 3 files changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/44/44/1 diff --git a/include/osmocom/gsm/meas_rep.h b/include/osmocom/gsm/meas_rep.h index 09c2c4f..4eaeb72 100644 --- a/include/osmocom/gsm/meas_rep.h +++ b/include/osmocom/gsm/meas_rep.h @@ -1,6 +1,7 @@ #pragma once #include +#include /* RX Level and RX Quality */ struct gsm_rx_lev_qual { @@ -24,3 +25,6 @@ MEAS_REP_UL_RXQUAL_FULL, MEAS_REP_UL_RXQUAL_SUB, }; + +size_t gsm0858_rsl_ul_meas(struct gsm_meas_rep_unidir *mru, bool dtxd_used, + uint8_t *buf); diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index 5002947..665d4ef 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -66,11 +66,13 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -335,6 +337,24 @@ return y; } +/*! \brief Build the RSL uplink measurement IE (3GPP TS 08.58 ? 9.3.25) + * \param[in] mru Unidirectional measumrement report structure + * \param[in] dtxd_used Indicates if DTXd was used during measurement report + * period + * \param[out] buf Pre-allocated bufer for storing IE + * \returns Number of bytes filled in buf + */ +size_t gsm0858_rsl_ul_meas(struct gsm_meas_rep_unidir *mru, bool dtxd_used, + uint8_t *buf) +{ + buf[0] = dtxd_used ? (1 << 6) : 0; + buf[0] |= (mru->full.rx_lev & 0x3f); + buf[1] = (mru->sub.rx_lev & 0x3f); + buf[2] = ((mru->full.rx_qual & 7) << 3) | (mru->sub.rx_qual & 7); + + return 3; +} + /* convert power class to dBm according to GSM TS 05.05 */ unsigned int ms_class_gmsk_dbm(enum gsm_band band, int class) { diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index e0d9dcb..4c0d054 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -92,6 +92,8 @@ gsm0808_create_sapi_reject; gsm0808_prepend_dtap_header; +gsm0858_rsl_ul_meas; + gsm338_get_sms_alphabet; gsm340_gen_oa; -- To view, visit https://gerrit.osmocom.org/44 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib37107bcc9909e5105ea711de42d3fb1db7e8d9e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From pablo at netfilter.org Wed May 11 16:21:31 2016 From: pablo at netfilter.org (Pablo Neira Ayuso) Date: Wed, 11 May 2016 18:21:31 +0200 Subject: [PATCH net-next] gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) In-Reply-To: <176496614.12197788.1462915819261.JavaMail.zimbra@kvk.uni-obuda.hu> References: <1462744754-10024-1-git-send-email-pablo@netfilter.org> <911730956.12103921.1462881717969.JavaMail.zimbra@kvk.uni-obuda.hu> <20160510124605.GE13806@nataraja> <316607382.12157119.1462896048227.JavaMail.zimbra@kvk.uni-obuda.hu> <20160510171040.GA22699@salvia> <364233309.12185573.1462908713942.JavaMail.zimbra@kvk.uni-obuda.hu> <20160510201111.GA7087@salvia> <176496614.12197788.1462915819261.JavaMail.zimbra@kvk.uni-obuda.hu> Message-ID: <20160511162131.GA30838@salvia> On Tue, May 10, 2016 at 11:30:19PM +0200, Sipos Csaba wrote: > Maybe I am misunderstanding something, but I really don't see what > is the reason behind handling the echo requests in the GGSN instead > of the gtp-u stack itself. Can someone please shed some light on > this one? It's a typical design tradeoff for tunneling drivers: You keep signaling side in userspace. We expect low rate of signaling messages there, so this shouldn't harm performance. The kernel driver takes care of G-PDU hotpath so we save context switches by handling encapsulation/decapsulation without userspace intervention. On top of this, bugs in the signaling don't crash your system, you can just restart the daemon, and you can also easily update the userspace signaling to get new features, while deploying a new kernel in a datacenter is usually a more painful procedure. From gerrit-no-reply at lists.osmocom.org Wed May 11 16:32:44 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 16:32:44 +0000 Subject: Change in libosmocore[master]: Add function to make Uplink Measurement In-Reply-To: References: Message-ID: >From Harald Welte : Harald Welte has posted comments on this change. Change subject: Add function to make Uplink Measurement ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/44/1/include/osmocom/gsm/meas_rep.h File include/osmocom/gsm/meas_rep.h: Line 29: size_t gsm0858_rsl_ul_meas(struct gsm_meas_rep_unidir *mru, bool dtxd_used, In terms of naming, I would again like to see something more explicit. The name tells us the function is related to RSL uplink measurement, but what does it do? encode? decode? ... So gsm0858_rsl_ul_meas_enc or .._enc_ul_meas would be more applicable. -- To view, visit https://gerrit.osmocom.org/44 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib37107bcc9909e5105ea711de42d3fb1db7e8d9e Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed May 11 16:44:00 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 16:44:00 +0000 Subject: Change in libosmocore[master]: Add function to make Uplink Measurement In-Reply-To: References: Message-ID: >From Max : Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/44 to look at the new patch set (#2). Change subject: Add function to make Uplink Measurement ...................................................................... Add function to make Uplink Measurement It assembles RSL Uplink Measurement IE according to 3GPP TS 08.58 ?9.3.25. The function is based on lchan_build_rsl_ul_meas() from OsmoBTS but optionally includes DTX information. Change-Id: Ib37107bcc9909e5105ea711de42d3fb1db7e8d9e --- M include/osmocom/gsm/meas_rep.h M src/gsm/gsm_utils.c M src/gsm/libosmogsm.map 3 files changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/44/44/2 -- To view, visit https://gerrit.osmocom.org/44 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib37107bcc9909e5105ea711de42d3fb1db7e8d9e Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed May 11 18:23:38 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 18:23:38 +0000 Subject: Change in libosmocore[master]: Add function to make Uplink Measurement In-Reply-To: References: Message-ID: >From Harald Welte : Harald Welte has posted comments on this change. Change subject: Add function to make Uplink Measurement ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/44 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib37107bcc9909e5105ea711de42d3fb1db7e8d9e Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 11 18:27:33 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Wed, 11 May 2016 18:27:33 +0000 Subject: Change in openbsc[master]: Move DTX settings to BTS In-Reply-To: References: Message-ID: >From Harald Welte : Harald Welte has posted comments on this change. Change subject: Move DTX settings to BTS ...................................................................... Patch Set 3: Code-Review-1 Verified-1 (1 comment) https://gerrit.osmocom.org/#/c/40/3/openbsc/doc/examples/osmo-bsc/osmo-bsc.cfg File openbsc/doc/examples/osmo-bsc/osmo-bsc.cfg: Line 57: dtxu force I would prefer something more hierarchical like dtx uplink force dtx downlink And of course the respetive "no dtx ..." commands need to exist for disablign the feature. Also, why only change osmo-bsc.cfg? What about all the other config file examples in the tree that have 'dtx-used 0'? They would all fail to start. -- To view, visit https://gerrit.osmocom.org/40 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-HasComments: Yes From ruben.undheim at gmail.com Wed May 11 21:01:58 2016 From: ruben.undheim at gmail.com (Ruben Undheim) Date: Wed, 11 May 2016 23:01:58 +0200 Subject: OpenBSC now in Debian! In-Reply-To: <59873589-C9A0-4BFA-AC7A-93BB5D959E70@freyther.de> References: <20160317175337.GA15384@macbookair> <20160319064607.GA13873@macbookair> <7F2C52C8-5596-45A4-937E-028E692B3326@freyther.de> <20160320110003.GA15008@macbookair> <59873589-C9A0-4BFA-AC7A-93BB5D959E70@freyther.de> Message-ID: <20160511210158.GA16325@macbookair> Hi, > >> yes, libdbi and libdbd-sqlite3 has memory issues. They have been reported two years and remain unfixed. It is best to migrate away from this library. > >> > >> See https://sourceforge.net/p/libdbi/mailman/message/32607036/ > > > a.) Somebody fixes libdbi/libdbd-sqlite3 > b.) Somebody changes OpenBSC to not use libdbi (preferred) > c.) One downgrades to libdbi 0.8.x > d.) One doesn't build 32bit package I believe I've identified the issue in libdbd-sqlite3. See https://bugs.debian.org/824067 . It also seems like the issue has been fixed upstream in libdbi already in the Spring of 2014, but no new releases has been made since then. Could this be all, or are you aware of other memory issues or problems with libdbd? Additionally, I've found another problem for big-endian architectures (https://bugs.debian.org/818566) You'll see my patch here: https://anonscm.debian.org/cgit/debian-science/packages/libosmocore.git/tree/debian/patches/0004-Patched-structs-for-big-endian-architectures.patch?id=cfd8ad8cd4e69a10f5057539eb26e2624df17a85 Half of the patch has already been applied to libosmocore some time ago. Cheers Ruben From nhofmeyr at sysmocom.de Thu May 12 10:31:57 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Thu, 12 May 2016 12:31:57 +0200 Subject: Change in libosmocore[master]: Set DTX in Cell Options In-Reply-To: <20160510190337.33EE61AEC7@lists.osmocom.org> References: <20160510190337.33EE61AEC7@lists.osmocom.org> Message-ID: <20160512103157.GA1468@ass40.sysmocom.de> On Tue, May 10, 2016 at 07:03:34PM +0000, gerrit-no-reply at lists.osmocom.org wrote: > https://gerrit.osmocom.org/#/c/39/1/include/osmocom/gsm/protocol/gsm_04_08.h > GSM48_{MAY,SHALL,SHALL_NOT}_USE_DTX or GSM48_DTX_{MAY,SHALL,SHALL_NOT}_BE_USED I like the latter, with _DTX_ up first. ~Neels -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From msuraev at sysmocom.de Thu May 12 10:38:29 2016 From: msuraev at sysmocom.de (Max) Date: Thu, 12 May 2016 12:38:29 +0200 Subject: Change in libosmocore[master]: Set DTX in Cell Options In-Reply-To: <20160512103157.GA1468@ass40.sysmocom.de> References: <20160510190337.33EE61AEC7@lists.osmocom.org> <20160512103157.GA1468@ass40.sysmocom.de> Message-ID: <57345D25.8040906@sysmocom.de> Already applied in 2nd version of patch. Thanks! On 05/12/2016 12:31 PM, Neels Hofmeyr wrote: > On Tue, May 10, 2016 at 07:03:34PM +0000, gerrit-no-reply at lists.osmocom.org wrote: >> https://gerrit.osmocom.org/#/c/39/1/include/osmocom/gsm/protocol/gsm_04_08.h >> GSM48_{MAY,SHALL,SHALL_NOT}_USE_DTX or GSM48_DTX_{MAY,SHALL,SHALL_NOT}_BE_USED > I like the latter, with _DTX_ up first. > > ~Neels > -- Max Suraev http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Geschaeftsfuehrer / Managing Directors: Holger Freyther, Harald Welte From gerrit-no-reply at lists.osmocom.org Thu May 12 11:13:10 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 11:13:10 +0000 Subject: Change in libosmocore[master]: Add function to make Uplink Measurement In-Reply-To: References: Message-ID: >From Neels Hofmeyr : Neels Hofmeyr has posted comments on this change. Change subject: Add function to make Uplink Measurement ...................................................................... Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/44/2/src/gsm/gsm_utils.c File src/gsm/gsm_utils.c: Line 341: * \param[in] mru Unidirectional measumrement report structure typo measumrement -- To view, visit https://gerrit.osmocom.org/44 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib37107bcc9909e5105ea711de42d3fb1db7e8d9e Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu May 12 11:15:22 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 11:15:22 +0000 Subject: Change in libosmocore[master]: logging: Use __BASE_FILE__ instead of __FILE__ In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has submitted this change and it was merged. Change subject: logging: Use __BASE_FILE__ instead of __FILE__ ...................................................................... logging: Use __BASE_FILE__ instead of __FILE__ Apparently __FILE__ expands to nasty '../../..' paths when BUILDDIR != SRCDIR. This in turn leads to ugly log lines like: <0000> ../../../../osmo-bts/src/common/rsl.c:1642 (bts=0,trx=0,ts=0,ss=0) Handing RLL msg UNIT_DATA_IND from LAPDm to MEAS REP Where we certainly wouldn't want the "../../../../osmo-bts" part. Change-Id: If6d2de33c3b6bb2943954bbd81eff261dc279d58 Reviewed-on: https://gerrit.osmocom.org/38 Tested-by: Jenkins Builder Reviewed-by: Harald Welte --- M include/osmocom/core/logging.h M include/osmocom/core/utils.h 2 files changed, 5 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h index 89d3f94..3da9d33 100644 --- a/include/osmocom/core/logging.h +++ b/include/osmocom/core/logging.h @@ -27,13 +27,13 @@ #define DEBUGP(ss, fmt, args...) \ do { \ if (log_check_level(ss, LOGL_DEBUG)) \ - logp(ss, __FILE__, __LINE__, 0, fmt, ## args); \ + logp(ss, __BASE_FILE__, __LINE__, 0, fmt, ## args); \ } while(0) #define DEBUGPC(ss, fmt, args...) \ do { \ if (log_check_level(ss, LOGL_DEBUG)) \ - logp(ss, __FILE__, __LINE__, 1, fmt, ## args); \ + logp(ss, __BASE_FILE__, __LINE__, 1, fmt, ## args); \ } while(0) #else @@ -56,7 +56,7 @@ #define LOGP(ss, level, fmt, args...) \ do { \ if (log_check_level(ss, level)) \ - logp2(ss, level, __FILE__, __LINE__, 0, fmt, ##args); \ + logp2(ss, level, __BASE_FILE__, __LINE__, 0, fmt, ##args); \ } while(0) /*! \brief Continue a log message through the Osmocom logging framework @@ -68,7 +68,7 @@ #define LOGPC(ss, level, fmt, args...) \ do { \ if (log_check_level(ss, level)) \ - logp2(ss, level, __FILE__, __LINE__, 1, fmt, ##args); \ + logp2(ss, level, __BASE_FILE__, __LINE__, 1, fmt, ##args); \ } while(0) /*! \brief different log levels */ diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index dbc454f..bc39519 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -60,7 +60,7 @@ */ #define OSMO_ASSERT(exp) \ if (!(exp)) { \ - fprintf(stderr, "Assert failed %s %s:%d\n", #exp, __FILE__, __LINE__); \ + fprintf(stderr, "Assert failed %s %s:%d\n", #exp, __BASE_FILE__, __LINE__); \ osmo_generate_backtrace(); \ abort(); \ } -- To view, visit https://gerrit.osmocom.org/38 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If6d2de33c3b6bb2943954bbd81eff261dc279d58 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu May 12 11:18:26 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 11:18:26 +0000 Subject: Change in libosmocore[master]: Add function to make Uplink Measurement In-Reply-To: References: Message-ID: >From Max : Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/44 to look at the new patch set (#3). Change subject: Add function to make Uplink Measurement ...................................................................... Add function to make Uplink Measurement It assembles RSL Uplink Measurement IE according to 3GPP TS 08.58 ?9.3.25. The function is based on lchan_build_rsl_ul_meas() from OsmoBTS but optionally includes DTX information. Change-Id: Ib37107bcc9909e5105ea711de42d3fb1db7e8d9e --- M include/osmocom/gsm/meas_rep.h M src/gsm/gsm_utils.c M src/gsm/libosmogsm.map 3 files changed, 26 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/44/44/3 -- To view, visit https://gerrit.osmocom.org/44 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib37107bcc9909e5105ea711de42d3fb1db7e8d9e Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu May 12 11:22:39 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 11:22:39 +0000 Subject: Change in osmo-pcap[master]: todo: Add another of my wishlist items In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has submitted this change and it was merged. Change subject: todo: Add another of my wishlist items ...................................................................... todo: Add another of my wishlist items Change-Id: I5a6c473a97d04aecae8101a024edb734bbe24401 Reviewed-on: https://gerrit.osmocom.org/27 Tested-by: Jenkins Builder Reviewed-by: Harald Welte --- M TODO 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/TODO b/TODO index 6e39bc9..83f81ae 100644 --- a/TODO +++ b/TODO @@ -19,4 +19,6 @@ * Make the max size and rotate file configurable +* Add a streaming option so one can pipe each packet into tshark + or a similar utility. -- To view, visit https://gerrit.osmocom.org/27 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5a6c473a97d04aecae8101a024edb734bbe24401 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcap Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu May 12 12:10:49 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 12:10:49 +0000 Subject: Change in osmo-pcap[master]: wip Message-ID: >From Holger Freyther : Holger Freyther has uploaded a new change for review. https://gerrit.osmocom.org/53 Change subject: wip ...................................................................... wip Change-Id: I0d9f48746df0fe191d919d0f7f7a75da8a682839 --- A BLA 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/53/53/1 diff --git a/BLA b/BLA new file mode 100644 index 0000000..b7d6715 --- /dev/null +++ b/BLA @@ -0,0 +1 @@ +FOO -- To view, visit https://gerrit.osmocom.org/53 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0d9f48746df0fe191d919d0f7f7a75da8a682839 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcap Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Thu May 12 12:20:25 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 12:20:25 +0000 Subject: Change in openbsc[master]: test.. please ignore Message-ID: >From Holger Freyther : Holger Freyther has uploaded a new change for review. https://gerrit.osmocom.org/55 Change subject: test.. please ignore ...................................................................... test.. please ignore Change-Id: I3458f8f6596ff5446261e7e4c3ef8923cc21db06 --- M openbsc/README 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/55/55/1 diff --git a/openbsc/README b/openbsc/README index 88ea328..c42c207 100644 --- a/openbsc/README +++ b/openbsc/README @@ -37,3 +37,6 @@ http://openbsc.osmocom.org/ Harald Welte + + +Test please ignore -- To view, visit https://gerrit.osmocom.org/55 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3458f8f6596ff5446261e7e4c3ef8923cc21db06 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Thu May 12 12:20:41 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 12:20:41 +0000 Subject: Change in openbsc[master]: test.. please ignore In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has abandoned this change. Change subject: test.. please ignore ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/55 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I3458f8f6596ff5446261e7e4c3ef8923cc21db06 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Thu May 12 12:21:28 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 12:21:28 +0000 Subject: Change in osmo-pcap[master]: wip In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has abandoned this change. Change subject: wip ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/53 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I0d9f48746df0fe191d919d0f7f7a75da8a682839 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcap Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu May 12 12:24:01 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 12:24:01 +0000 Subject: Change in openbsc[master]: Ignore extended test leftovers Message-ID: >From Holger Freyther : Hello Neels Hofmeyr, Harald Welte, I'd like you to do a code review. Please visit https://gerrit.osmocom.org/56 to review the following change. Change subject: Ignore extended test leftovers ...................................................................... Ignore extended test leftovers Change-Id: If9e3522d934611f631cbfde6e6db52251babc37f Reviewed-on: https://gerrit.osmocom.org/41 Reviewed-by: Harald Welte Reviewed-by: Neels Hofmeyr Tested-by: Holger Freyther --- M openbsc/.gitignore 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/56/56/1 diff --git a/openbsc/.gitignore b/openbsc/.gitignore index bae3b65..0a2965d 100644 --- a/openbsc/.gitignore +++ b/openbsc/.gitignore @@ -88,7 +88,7 @@ tests/testsuite tests/testsuite.log - +gsn_restart src/openbsc.cfg* writtenconfig/ gtphub_restart_count -- To view, visit https://gerrit.osmocom.org/56 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9e3522d934611f631cbfde6e6db52251babc37f Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu May 12 12:24:22 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 12:24:22 +0000 Subject: Change in openbsc[master]: Ignore extended test leftovers In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: Ignore extended test leftovers ...................................................................... Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/56 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If9e3522d934611f631cbfde6e6db52251babc37f Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu May 12 12:24:23 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 12:24:23 +0000 Subject: Change in openbsc[master]: Ignore extended test leftovers In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has submitted this change and it was merged. Change subject: Ignore extended test leftovers ...................................................................... Ignore extended test leftovers Change-Id: If9e3522d934611f631cbfde6e6db52251babc37f Reviewed-on: https://gerrit.osmocom.org/41 Reviewed-by: Harald Welte Reviewed-by: Neels Hofmeyr Tested-by: Holger Freyther Reviewed-on: https://gerrit.osmocom.org/56 Reviewed-by: Holger Freyther --- M openbsc/.gitignore 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Holger Freyther: Looks good to me, approved; Verified diff --git a/openbsc/.gitignore b/openbsc/.gitignore index bae3b65..0a2965d 100644 --- a/openbsc/.gitignore +++ b/openbsc/.gitignore @@ -88,7 +88,7 @@ tests/testsuite tests/testsuite.log - +gsn_restart src/openbsc.cfg* writtenconfig/ gtphub_restart_count -- To view, visit https://gerrit.osmocom.org/56 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If9e3522d934611f631cbfde6e6db52251babc37f Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu May 12 13:10:21 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 13:10:21 +0000 Subject: Change in openbsc[master]: Ignore extended test leftovers In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has abandoned this change. Change subject: Ignore extended test leftovers ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/46 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ic2a5c3ce863f87c8efe22b7773b9661d7a02b24e Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu May 12 13:10:43 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 13:10:43 +0000 Subject: Change in openbsc[master]: Ignore extended test leftovers In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has abandoned this change. Change subject: Ignore extended test leftovers ...................................................................... Abandoned Merged in another change... -- To view, visit https://gerrit.osmocom.org/41 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: If9e3522d934611f631cbfde6e6db52251babc37f Gerrit-PatchSet: 8 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu May 12 13:38:57 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 13:38:57 +0000 Subject: Change in openbsc[master]: Cleanup db test In-Reply-To: References: Message-ID: >From Max : Hello Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/43 to look at the new patch set (#2). Change subject: Cleanup db test ...................................................................... Cleanup db test Move copy-pasted code into separate function to make writing more tests easier. Change-Id: I9e39af85718514dd0f081d41c234c9dda77c4b27 --- M openbsc/tests/db/db_test.c 1 file changed, 34 insertions(+), 53 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/43/43/2 -- To view, visit https://gerrit.osmocom.org/43 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9e39af85718514dd0f081d41c234c9dda77c4b27 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu May 12 14:36:30 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 14:36:30 +0000 Subject: Change in openbsc[master]: Move DTX settings to BTS In-Reply-To: References: Message-ID: >From Harald Welte : Harald Welte has posted comments on this change. Change subject: Move DTX settings to BTS ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/40 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Gerrit-PatchSet: 5 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu May 12 15:56:39 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 15:56:39 +0000 Subject: Change in libosmocore[master]: Set DTX in Cell Options In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has submitted this change and it was merged. Change subject: Set DTX in Cell Options ...................................................................... Set DTX in Cell Options * rename field of struct gsm48_cell_options to better match the spec * add comments with spec references * add function for setting DTX in cell options struct * add necessary enum type Change-Id: I5a8924f57669c951b2e51b663d95f1d360062a54 Reviewed-on: https://gerrit.osmocom.org/39 Reviewed-by: Harald Welte Tested-by: Jenkins Builder --- M include/osmocom/gsm/protocol/gsm_04_08.h M src/gsm/gsm48.c M src/gsm/libosmogsm.map 3 files changed, 61 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index 3282bc1..4800b48 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include @@ -469,11 +470,20 @@ uint8_t t3212; } __attribute__ ((packed)); +enum gsm48_dtx_mode { + GSM48_DTX_MAY_BE_USED, + GSM48_DTX_SHALL_BE_USED, + GSM48_DTX_SHALL_NOT_BE_USED +}; + +/* Cell Options for SI6, SACCH (10.5.2.3a.2) or SI3, BCCH (Table 10.5.2.3.1), + 3GPP TS 44.018 */ struct gsm48_cell_options { uint8_t radio_link_timeout:4, dtx:2, pwrc:1, - spare:1; + /* either DN-IND or top bit of DTX IND */ + d:1; } __attribute__ ((packed)); /* Section 9.2.9 CM service request */ @@ -827,6 +837,9 @@ } } +void gsm48_set_dtx(struct gsm48_cell_options *op, enum gsm48_dtx_mode full, + enum gsm48_dtx_mode half, bool is_bcch); + #define gsm48_hdr_msg_type gsm48_hdr_msg_type_r99 /* Section 10.4 */ diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index ab62605..8a46f76 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -25,7 +25,7 @@ #include #include #include - +#include #include #include @@ -358,6 +358,50 @@ return 0; } +/*! \brief Set DTX mode in Cell Options IE (3GPP TS 44.018) + * \param[in] op Cell Options structure in which DTX parameters will be set + * \param[in] full Mode for full-rate channels + * \param[in] half Mode for half-rate channels + * \param[in] is_bcch Indicates if we should use 10.5.2.3.1 instead of + * 10.5.2.3a.2 + * + * There is no space for separate DTX settings for Full and Half rate channels + * in BCCH - in this case full setting is used for both and half parameter is + * ignored. + */ +void gsm48_set_dtx(struct gsm48_cell_options *op, enum gsm48_dtx_mode full, + enum gsm48_dtx_mode half, bool is_bcch) +{ + if (is_bcch) { + switch (full) { + case GSM48_DTX_MAY_BE_USED: + op->dtx = 0; + return; + case GSM48_DTX_SHALL_BE_USED: + op->dtx = 1; + return; + case GSM48_DTX_SHALL_NOT_BE_USED: + op->dtx = 2; + return; + } + } else { + switch (full) { + case GSM48_DTX_MAY_BE_USED: + op->dtx = (half == GSM48_DTX_SHALL_BE_USED) ? 3 : 0; + op->d = (half == GSM48_DTX_SHALL_NOT_BE_USED) ? 0 : 1; + return; + case GSM48_DTX_SHALL_BE_USED: + op->dtx = (half == GSM48_DTX_MAY_BE_USED) ? 3 : 1; + op->d = (half == GSM48_DTX_SHALL_BE_USED) ? 1 : 0; + return; + case GSM48_DTX_SHALL_NOT_BE_USED: + op->dtx = 2; + op->d = (half == GSM48_DTX_SHALL_BE_USED) ? 1 : 0; + return; + } + } +} + int gsm48_generate_mid_from_tmsi(uint8_t *buf, uint32_t tmsi) { uint32_t tmsi_be = htonl(tmsi); diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index e0d9dcb..834e5d6 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -162,6 +162,8 @@ gsm48_number_of_paging_subchannels; gsm48_parse_ra; gsm48_rr_att_tlvdef; +gsm48_set_dtx; +gsm48_dtx_mode; gsm48_mi_type_name; gsm48_mcc_mnc_to_bcd; gsm48_mcc_mnc_from_bcd; -- To view, visit https://gerrit.osmocom.org/39 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5a8924f57669c951b2e51b663d95f1d360062a54 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From holger at freyther.de Thu May 12 16:50:20 2016 From: holger at freyther.de (Holger Freyther) Date: Thu, 12 May 2016 18:50:20 +0200 Subject: OpenBSC now in Debian! In-Reply-To: <20160511210158.GA16325@macbookair> References: <20160317175337.GA15384@macbookair> <20160319064607.GA13873@macbookair> <7F2C52C8-5596-45A4-937E-028E692B3326@freyther.de> <20160320110003.GA15008@macbookair> <59873589-C9A0-4BFA-AC7A-93BB5D959E70@freyther.de> <20160511210158.GA16325@macbookair> Message-ID: > On 11 May 2016, at 23:01, Ruben Undheim wrote: > Hi! > It also seems like the issue has been fixed upstream in libdbi already in the > Spring of 2014, but no new releases has been made since then. > > Could this be all, or are you aware of other memory issues or problems with libdbd? > ah cool. I didn't know that it was fixed by Jan. Can you get this into debian8.0 as a bugfix? > Additionally, I've found another problem for big-endian architectures (https://bugs.debian.org/818566) > You'll see my patch here: > https://anonscm.debian.org/cgit/debian-science/packages/libosmocore.git/tree/debian/patches/0004-Patched-structs-for-big-endian-architectures.patch?id=cfd8ad8cd4e69a10f5057539eb26e2624df17a85 > > Half of the patch has already been applied to libosmocore some time ago. Do you want to try to use gerrit to push the missing hunks? But GCC6 From gerrit-no-reply at lists.osmocom.org Thu May 12 16:57:10 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 16:57:10 +0000 Subject: Change in openbsc[master]: Move DTX settings to BTS In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: Move DTX settings to BTS ...................................................................... Patch Set 5: Code-Review-1 (2 comments) https://gerrit.osmocom.org/#/c/40/5//COMMIT_MSG Commit Message: Line 15: Is there a reference to a ticket? https://gerrit.osmocom.org/#/c/40/5/openbsc/src/libbsc/bsc_vty.c File openbsc/src/libbsc/bsc_vty.c: PS5, Line 1616: Make this deprecated with a warning output and no other implementation. People upgrading should end up with a OpenBSC that continues to start -- To view, visit https://gerrit.osmocom.org/40 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Gerrit-PatchSet: 5 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu May 12 17:18:28 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 17:18:28 +0000 Subject: Change in openbsc[master]: Move DTX settings to BTS In-Reply-To: References: Message-ID: >From Max : Max has posted comments on this change. Change subject: Move DTX settings to BTS ...................................................................... Patch Set 5: Related ticket is OS#22 but this change is only part of the work. How shall I add this to commit message? -- To view, visit https://gerrit.osmocom.org/40 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Gerrit-PatchSet: 5 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu May 12 17:19:12 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 17:19:12 +0000 Subject: Change in openbsc[master]: Move DTX settings to BTS In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: Move DTX settings to BTS ...................................................................... Patch Set 5: (1 comment) https://gerrit.osmocom.org/#/c/40/5//COMMIT_MSG Commit Message: Line 15: > Is there a reference to a ticket? Related: OS#... -- To view, visit https://gerrit.osmocom.org/40 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Gerrit-PatchSet: 5 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu May 12 17:48:31 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 17:48:31 +0000 Subject: Change in openbsc[master]: Move DTX settings to BTS In-Reply-To: References: Message-ID: >From Max : Hello Harald Welte, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/40 to look at the new patch set (#6). Change subject: Move DTX settings to BTS ...................................................................... Move DTX settings to BTS * Add per-BTS DTX settings * Configure Uplink and Downlink DTX separately * Deprecate global DTX option (it was never tested/used anyway) * Use libosmocore function for DTX indicator in System Information (previously it was incorrectly assigned for half-rate channels) Related: OS#22 Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 --- M openbsc/doc/examples/osmo-bsc/osmo-bsc.cfg M openbsc/doc/examples/osmo-nitb/rbs2308/openbsc.cfg M openbsc/include/openbsc/gsm_data.h M openbsc/include/openbsc/gsm_data_shared.h M openbsc/src/libbsc/abis_rsl.c M openbsc/src/libbsc/bsc_init.c M openbsc/src/libbsc/bsc_vty.c M openbsc/src/libbsc/system_information.c 8 files changed, 95 insertions(+), 20 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/40/40/6 -- To view, visit https://gerrit.osmocom.org/40 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Gerrit-PatchSet: 6 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu May 12 17:58:22 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 17:58:22 +0000 Subject: Change in libosmocore[master]: Add function to make Uplink Measurement In-Reply-To: References: Message-ID: >From Harald Welte : Harald Welte has posted comments on this change. Change subject: Add function to make Uplink Measurement ...................................................................... Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/44 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib37107bcc9909e5105ea711de42d3fb1db7e8d9e Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu May 12 18:01:22 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 18:01:22 +0000 Subject: Change in openbsc[master]: Move DTX settings to BTS In-Reply-To: References: Message-ID: >From Harald Welte : Harald Welte has posted comments on this change. Change subject: Move DTX settings to BTS ...................................................................... Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/40 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Gerrit-PatchSet: 6 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu May 12 18:01:47 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 18:01:47 +0000 Subject: Change in openbsc[master]: Make extending subscriber creation easier In-Reply-To: References: Message-ID: >From Harald Welte : Harald Welte has posted comments on this change. Change subject: Make extending subscriber creation easier ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/42 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3b10a9a764fd3a7bb96717a990e52caae16266da Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu May 12 18:14:00 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Thu, 12 May 2016 18:14:00 +0000 Subject: Change in openbsc[master]: Move DTX settings to BTS In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: Move DTX settings to BTS ...................................................................... Patch Set 6: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/40/6/openbsc/src/libbsc/bsc_vty.c File openbsc/src/libbsc/bsc_vty.c: Line 1638: return CMD_SUCCESS; DEFUN_DEPRECATED... and maybe return CMD_WARNING but the later doe snot make a difference. By convention our warnings include %% as well -- To view, visit https://gerrit.osmocom.org/40 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Gerrit-PatchSet: 6 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri May 13 07:16:54 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Fri, 13 May 2016 07:16:54 +0000 Subject: Change in libosmocore[master]: gsm48: move to hex TMSI representation Message-ID: >From Vadim Yanitskiy : Vadim Yanitskiy has uploaded a new change for review. https://gerrit.osmocom.org/57 Change subject: gsm48: move to hex TMSI representation ...................................................................... gsm48: move to hex TMSI representation Previously, we traditionally displayed a TMSI in its integer representation, which is quite unusual in the telecom world. A TMSI is normally printed as a series of 8 hex digits. Change-Id: Ifd25365bfa3b4ee95b16979740c3229948ce17f2 --- M src/gsm/gsm48.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/57/57/1 diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index 8a46f76..74a1e99 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -462,7 +462,7 @@ if (mi_len == GSM48_TMSI_LEN && mi[0] == (0xf0 | GSM_MI_TYPE_TMSI)) { memcpy(&tmsi, &mi[1], 4); tmsi = ntohl(tmsi); - return snprintf(string, str_len, "%u", tmsi); + return snprintf(string, str_len, "0x%08x", tmsi); } break; case GSM_MI_TYPE_IMSI: -- To view, visit https://gerrit.osmocom.org/57 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifd25365bfa3b4ee95b16979740c3229948ce17f2 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Fri May 13 08:10:11 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Fri, 13 May 2016 08:10:11 +0000 Subject: Change in openbsc[master]: Move DTX settings to BTS In-Reply-To: References: Message-ID: >From Max : Hello Harald Welte, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/40 to look at the new patch set (#7). Change subject: Move DTX settings to BTS ...................................................................... Move DTX settings to BTS * Add per-BTS DTX settings * Configure Uplink and Downlink DTX separately * Deprecate global DTX option (it was never tested/used anyway) * Use libosmocore function for DTX indicator in System Information (previously it was incorrectly assigned for half-rate channels) Related: OS#22 Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 --- M openbsc/doc/examples/osmo-bsc/osmo-bsc.cfg M openbsc/doc/examples/osmo-nitb/rbs2308/openbsc.cfg M openbsc/include/openbsc/gsm_data.h M openbsc/include/openbsc/gsm_data_shared.h M openbsc/src/libbsc/abis_rsl.c M openbsc/src/libbsc/bsc_init.c M openbsc/src/libbsc/bsc_vty.c M openbsc/src/libbsc/system_information.c 8 files changed, 99 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/40/40/7 -- To view, visit https://gerrit.osmocom.org/40 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Gerrit-PatchSet: 7 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri May 13 08:35:43 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Fri, 13 May 2016 08:35:43 +0000 Subject: Change in openbsc[master]: Move DTX settings to BTS In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: Move DTX settings to BTS ...................................................................... Patch Set 7: Code-Review+2 (1 comment) Looks good now. Saying +2 because harald said it before and my feedback has been addresses. https://gerrit.osmocom.org/#/c/40/7/openbsc/src/libbsc/bsc_vty.c File openbsc/src/libbsc/bsc_vty.c: Line 1633: ".HIDDEN\n""Obsolete\n""Obsolete\n") Ah interesting. I didn't know .HIDDEN -- To view, visit https://gerrit.osmocom.org/40 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Gerrit-PatchSet: 7 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri May 13 09:38:34 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Fri, 13 May 2016 09:38:34 +0000 Subject: Change in osmo-pcu[master]: Restructure sources Message-ID: >From Max : Max has uploaded a new change for review. https://gerrit.osmocom.org/58 Change subject: Restructure sources ...................................................................... Restructure sources Move hardware-spicefic files into subdirectory similar to the way it's done in OsmoBTS to make adding new hardware support easier. Change-Id: I05004ad9032759a5dbfa57290ed1df83e89d5cb8 Related: SYS#2443 --- M src/Makefile.am R src/osmo-bts-sysmo/femtobts.c R src/osmo-bts-sysmo/femtobts.h R src/osmo-bts-sysmo/sysmo_l1_fwd.c R src/osmo-bts-sysmo/sysmo_l1_hw.c R src/osmo-bts-sysmo/sysmo_l1_if.c R src/osmo-bts-sysmo/sysmo_l1_if.h 7 files changed, 32 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/58/58/1 diff --git a/src/Makefile.am b/src/Makefile.am index 832c3b0..3049744 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -64,11 +64,6 @@ noinst_PROGRAMS = -if ENABLE_SYSMODSP -noinst_PROGRAMS += \ - osmo-pcu-remote -endif - noinst_HEADERS = \ gprs_debug.h \ csn1.h \ @@ -83,8 +78,6 @@ bitvector.h \ pcu_vty.h \ pcu_vty_functions.h \ - sysmo_l1_if.h \ - femtobts.h \ tbf.h \ bts.h \ poll_controller.h \ @@ -101,14 +94,39 @@ osmo_pcu_SOURCES = pcu_main.cpp if ENABLE_SYSMODSP -osmo_pcu_SOURCES += sysmo_l1_if.c \ - sysmo_l1_hw.c \ - femtobts.c +AM_CPPFLAGS += -I$(srcdir)/osmo-bts-sysmo -osmo_pcu_remote_SOURCES = pcu_main.cpp \ - sysmo_l1_if.c \ - sysmo_l1_fwd.c \ - femtobts.c +EXTRA_DIST = \ + osmo-bts-sysmo/sysmo_l1_if.c \ + osmo-bts-sysmo/sysmo_l1_if.h \ + osmo-bts-sysmo/sysmo_l1_hw.c \ + osmo-bts-sysmo/femtobts.c \ + osmo-bts-sysmo/femtobts.h + +noinst_HEADERS += \ + osmo-bts-sysmo/sysmo_l1_if.h \ + osmo-bts-sysmo/femtobts.h + +noinst_PROGRAMS += \ + osmo-pcu-remote + +osmo_pcu_SOURCES += \ + osmo-bts-sysmo/sysmo_l1_if.c \ + osmo-bts-sysmo/sysmo_l1_hw.c \ + osmo-bts-sysmo/femtobts.c + +osmo_pcu_remote_SOURCES = \ + pcu_main.cpp \ + osmo-bts-sysmo/sysmo_l1_if.c \ + osmo-bts-sysmo/sysmo_l1_fwd.c \ + osmo-bts-sysmo/femtobts.c + +osmo_pcu_remote_LDADD = \ + libgprs.la \ + $(LIBOSMOGB_LIBS) \ + $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ + $(COMMON_LA) endif osmo_pcu_LDADD = \ @@ -117,14 +135,5 @@ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(COMMON_LA) - -if ENABLE_SYSMODSP -osmo_pcu_remote_LDADD = \ - libgprs.la \ - $(LIBOSMOGB_LIBS) \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(COMMON_LA) -endif #MOSTLYCLEANFILES += testSource testDestination diff --git a/src/femtobts.c b/src/osmo-bts-sysmo/femtobts.c similarity index 100% rename from src/femtobts.c rename to src/osmo-bts-sysmo/femtobts.c diff --git a/src/femtobts.h b/src/osmo-bts-sysmo/femtobts.h similarity index 100% rename from src/femtobts.h rename to src/osmo-bts-sysmo/femtobts.h diff --git a/src/sysmo_l1_fwd.c b/src/osmo-bts-sysmo/sysmo_l1_fwd.c similarity index 100% rename from src/sysmo_l1_fwd.c rename to src/osmo-bts-sysmo/sysmo_l1_fwd.c diff --git a/src/sysmo_l1_hw.c b/src/osmo-bts-sysmo/sysmo_l1_hw.c similarity index 100% rename from src/sysmo_l1_hw.c rename to src/osmo-bts-sysmo/sysmo_l1_hw.c diff --git a/src/sysmo_l1_if.c b/src/osmo-bts-sysmo/sysmo_l1_if.c similarity index 100% rename from src/sysmo_l1_if.c rename to src/osmo-bts-sysmo/sysmo_l1_if.c diff --git a/src/sysmo_l1_if.h b/src/osmo-bts-sysmo/sysmo_l1_if.h similarity index 100% rename from src/sysmo_l1_if.h rename to src/osmo-bts-sysmo/sysmo_l1_if.h -- To view, visit https://gerrit.osmocom.org/58 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I05004ad9032759a5dbfa57290ed1df83e89d5cb8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri May 13 09:38:34 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Fri, 13 May 2016 09:38:34 +0000 Subject: Change in osmo-pcu[master]: Change internal API for consistency Message-ID: >From Max : Max has uploaded a new change for review. https://gerrit.osmocom.org/59 Change subject: Change internal API for consistency ...................................................................... Change internal API for consistency Use uint8_t for TRX numbering everywhere (we don't expect hardware with more than 256 transceivers in the near future). This change helps to avoid unnecessary casts and make API much clearer. Change-Id: Ic584611184b0c8b5417ecff0ddae3d526b55a079 Related: SYS#2443 --- M src/osmo-bts-sysmo/sysmo_l1_if.c M src/osmo-bts-sysmo/sysmo_l1_if.h M src/pcu_l1_if.cpp 3 files changed, 9 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/59/59/1 diff --git a/src/osmo-bts-sysmo/sysmo_l1_if.c b/src/osmo-bts-sysmo/sysmo_l1_if.c index c7c54dd..4bfcecd 100644 --- a/src/osmo-bts-sysmo/sysmo_l1_if.c +++ b/src/osmo-bts-sysmo/sysmo_l1_if.c @@ -155,7 +155,7 @@ switch (rts_ind->sapi) { case GsmL1_Sapi_Pdtch: case GsmL1_Sapi_Pacch: - rc = pcu_rx_rts_req_pdtch((long)fl1h->priv, rts_ind->u8Tn, + rc = pcu_rx_rts_req_pdtch(fl1h->trx, rts_ind->u8Tn, rts_ind->u16Arfcn, rts_ind->u32Fn, rts_ind->u8BlockNbr); case GsmL1_Sapi_Ptcch: // FIXME @@ -215,7 +215,7 @@ != GsmL1_PdtchPlType_Full) break; /* PDTCH / PACCH frame handling */ - pcu_rx_data_ind_pdtch((long)fl1h->priv, data_ind->u8Tn, + pcu_rx_data_ind_pdtch(fl1h->trx, data_ind->u8Tn, data_ind->msgUnitParam.u8Buffer + 1, data_ind->msgUnitParam.u8Size - 1, data_ind->u32Fn, @@ -357,7 +357,7 @@ return 0; } -void *l1if_open_pdch(void *priv, uint32_t hlayer1, struct gsmtap_inst *gsmtap) +void *l1if_open_pdch(uint8_t trx, uint32_t hlayer1, struct gsmtap_inst *gsmtap) { struct femtol1_hdl *fl1h; int rc; @@ -367,7 +367,7 @@ return NULL; fl1h->hLayer1 = hlayer1; - fl1h->priv = priv; + fl1h->trx = trx; fl1h->clk_cal = 0; /* default clock source: OCXO */ fl1h->clk_src = SuperFemto_ClkSrcId_Ocxo; diff --git a/src/osmo-bts-sysmo/sysmo_l1_if.h b/src/osmo-bts-sysmo/sysmo_l1_if.h index 6b50d4e..83ca481 100644 --- a/src/osmo-bts-sysmo/sysmo_l1_if.h +++ b/src/osmo-bts-sysmo/sysmo_l1_if.h @@ -38,7 +38,7 @@ struct gsmtap_inst *gsmtap; uint32_t gsmtap_sapi_mask; - void *priv; /* user reference */ + uint8_t trx; struct osmo_timer_list alive_timer; unsigned int alive_prim_cnt; diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index 67272ab..17e9d75 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -44,7 +44,7 @@ // FIXME: move this, when changed from c++ to c. extern "C" { -void *l1if_open_pdch(void *priv, uint32_t hlayer1, struct gsmtap_inst *gsmtap); +void *l1if_open_pdch(uint8_t trx, uint32_t hlayer1, struct gsmtap_inst *gsmtap); int l1if_connect_pdch(void *obj, uint8_t ts); int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn, uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len); @@ -330,8 +330,8 @@ struct gprs_bssgp_pcu *pcu; struct gprs_rlcmac_pdch *pdch; struct in_addr ia; - int rc = 0; - int trx, ts; + int rc = 0, ts; + uint8_t trx; int i; if (info_ind->version != PCU_IF_VERSION) { @@ -450,7 +450,7 @@ info_ind->trx[trx].hlayer1); if (!bts->trx[trx].fl1h) bts->trx[trx].fl1h = l1if_open_pdch( - (void *)trx, + trx, info_ind->trx[trx].hlayer1, bts->gsmtap); if (!bts->trx[trx].fl1h) { -- To view, visit https://gerrit.osmocom.org/59 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic584611184b0c8b5417ecff0ddae3d526b55a079 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri May 13 09:38:34 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Fri, 13 May 2016 09:38:34 +0000 Subject: Change in osmo-pcu[master]: Enable subdir-objects automake option Message-ID: >From Max : Max has uploaded a new change for review. https://gerrit.osmocom.org/60 Change subject: Enable subdir-objects automake option ...................................................................... Enable subdir-objects automake option Change-Id: I01fd264fd1f990f39cdbf309149e0eb857d7732f Related: SYS#2443 --- M src/Makefile.am 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/60/60/1 diff --git a/src/Makefile.am b/src/Makefile.am index 3049744..e08ba07 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -18,6 +18,7 @@ # along with this program. If not, see . # +AUTOMAKE_OPTIONS = subdir-objects AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGB_CFLAGS) $(LIBOSMOGSM_CFLAGS) if ENABLE_SYSMODSP -- To view, visit https://gerrit.osmocom.org/60 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I01fd264fd1f990f39cdbf309149e0eb857d7732f Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri May 13 09:38:34 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Fri, 13 May 2016 09:38:34 +0000 Subject: Change in osmo-pcu[master]: Add support for NuRAN Wireless Litecell 1.5 BTS Message-ID: >From Max : Max has uploaded a new change for review. https://gerrit.osmocom.org/61 Change subject: Add support for NuRAN Wireless Litecell 1.5 BTS ...................................................................... Add support for NuRAN Wireless Litecell 1.5 BTS Layer 1 compatibility with previous generation or NuRan GSM product, therefore the support for the Litecell 1.5 uses its own sources instead of using tons of ifdef/endif. Max's amendments: * make headers path configurable * use configured TRX instead of hardcoded value * split subdir-objects into separate commit * cosmetic changes Change-Id: Ib1287375cb10a889625bbac8528fa60deed23a2b Fixes: SYS#2443 --- M configure.ac M src/Makefile.am A src/osmo-bts-litecell15/lc15_l1_hw.c A src/osmo-bts-litecell15/lc15_l1_if.c A src/osmo-bts-litecell15/lc15_l1_if.h A src/osmo-bts-litecell15/lc15bts.c A src/osmo-bts-litecell15/lc15bts.h 7 files changed, 1,166 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/61/61/1 diff --git a/configure.ac b/configure.ac index 5274022..d8fe719 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,25 @@ AC_MSG_RESULT([$enable_sysmocom_dsp]) AM_CONDITIONAL(ENABLE_SYSMODSP, test "x$enable_sysmocom_dsp" = "xyes") +AC_MSG_CHECKING([whether to enable direct PHY access for PDCH of NuRAN Wireless Litecell 1.5 BTS]) +AC_ARG_ENABLE(lc15bts-phy, + AC_HELP_STRING([--enable-lc15bts-phy], + [enable code for Litecell 1.5 PHY [default=no]]), + [enable_lc15bts_phy="$enableval"],[enable_lc15bts_phy="no"]) +AC_ARG_WITH([litecell15], [AS_HELP_STRING([--with-litecell15=INCLUDE_DIR], [Location of the litecell 1.5 API header files])], + [litecell15_incdir="$withval"],[litecell15_incdir="$incdir"]) +AC_SUBST([LITECELL15_INCDIR], $litecell15_incdir) +AC_MSG_RESULT([$enable_lc15bts_phy]) +AM_CONDITIONAL(ENABLE_LC15BTS_PHY, test "x$enable_lc15bts_phy" = "xyes") +if test "$enable_litecell15" = "yes"; then + oldCPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -I$LITECELL15_INCDIR -I$srcdir/include $LIBOSMOCORE_CFLAGS" + AC_CHECK_HEADER([nrw/litecell15/litecell15.h],[], + [AC_MSG_ERROR([nrw/litecell15/litecell15.h can not be found in $litecell15_incdir])], + [#include ]) + CPPFLAGS=$oldCPPFLAGS +fi + AC_ARG_ENABLE([vty_tests], AC_HELP_STRING([--enable-vty-tests], [Include the VTY tests in make check [default=no]]), diff --git a/src/Makefile.am b/src/Makefile.am index e08ba07..9bdec2f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -25,6 +25,10 @@ AM_CPPFLAGS += -DENABLE_DIRECT_PHY endif +if ENABLE_LC15BTS_PHY +AM_CPPFLAGS += -DENABLE_DIRECT_PHY +endif + AM_CXXFLAGS = -Wall -ldl -pthread AM_LDFLAGS = -lrt @@ -130,6 +134,26 @@ $(COMMON_LA) endif +if ENABLE_LC15BTS_PHY +AM_CPPFLAGS += -I$(LITECELL15_INCDIR) -I$(srcdir)/osmo-bts-litecell15 + +EXTRA_DIST = \ + osmo-bts-litecell15/lc15_l1_if.c \ + osmo-bts-litecell15/lc15_l1_if.h \ + osmo-bts-litecell15/lc15_l1_hw.c \ + osmo-bts-litecell15/lc15bts.c \ + osmo-bts-litecell15/lc15bts.h + +noinst_HEADERS += \ + osmo-bts-litecell15/lc15_l1_if.h \ + osmo-bts-litecell15/lc15bts.h + +osmo_pcu_SOURCES += \ + osmo-bts-litecell15/lc15_l1_if.c \ + osmo-bts-litecell15/lc15_l1_hw.c \ + osmo-bts-litecell15/lc15bts.c +endif + osmo_pcu_LDADD = \ libgprs.la \ $(LIBOSMOGB_LIBS) \ diff --git a/src/osmo-bts-litecell15/lc15_l1_hw.c b/src/osmo-bts-litecell15/lc15_l1_hw.c new file mode 100644 index 0000000..3191e75 --- /dev/null +++ b/src/osmo-bts-litecell15/lc15_l1_hw.c @@ -0,0 +1,213 @@ +/* Interface handler for Nuran Wireless Litecell 1.5 L1 (real hardware) */ + +/* Copyright (C) 2015 by Yves Godin + * based on: + * femto_l1_hw.c + * (C) 2011 by Harald Welte + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "gprs_debug.h" +#include "lc15bts.h" +#include "lc15_l1_if.h" + +#define DEV_SYS_DSP2ARM_NAME "/dev/msgq/litecell15_dsp2arm_trx" +#define DEV_SYS_ARM2DSP_NAME "/dev/msgq/litecell15_arm2dsp_trx" +#define DEV_L1_DSP2ARM_NAME "/dev/msgq/gsml1_sig_dsp2arm_trx" +#define DEV_L1_ARM2DSP_NAME "/dev/msgq/gsml1_sig_arm2dsp_trx" + +#define DEV_TCH_DSP2ARM_NAME "/dev/msgq/gsml1_tch_dsp2arm_trx" +#define DEV_TCH_ARM2DSP_NAME "/dev/msgq/gsml1_tch_arm2dsp_trx" +#define DEV_PDTCH_DSP2ARM_NAME "/dev/msgq/gsml1_pdtch_dsp2arm_trx" +#define DEV_PDTCH_ARM2DSP_NAME "/dev/msgq/gsml1_pdtch_arm2dsp_trx" + +static const char *rd_devnames[] = { + [MQ_SYS_READ] = DEV_SYS_DSP2ARM_NAME, + [MQ_L1_READ] = DEV_L1_DSP2ARM_NAME, + [MQ_TCH_READ] = DEV_TCH_DSP2ARM_NAME, + [MQ_PDTCH_READ] = DEV_PDTCH_DSP2ARM_NAME, +}; + +static const char *wr_devnames[] = { + [MQ_SYS_WRITE] = DEV_SYS_ARM2DSP_NAME, + [MQ_L1_WRITE] = DEV_L1_ARM2DSP_NAME, + [MQ_TCH_WRITE] = DEV_TCH_ARM2DSP_NAME, + [MQ_PDTCH_WRITE]= DEV_PDTCH_ARM2DSP_NAME, +}; + +/* callback when there's something to read from the l1 msg_queue */ +static int l1if_fd_cb(struct osmo_fd *ofd, unsigned int what) +{ + //struct msgb *msg = l1p_msgb_alloc(); + struct msgb *msg = msgb_alloc_headroom(sizeof(Litecell15_Prim_t) + 128, + 128, "1l_fd"); + struct lc15l1_hdl *fl1h = ofd->data; + int rc; + + msg->l1h = msg->data; + rc = read(ofd->fd, msg->l1h, msgb_tailroom(msg)); + if (rc < 0) { + if (rc != -1) + LOGP(DL1IF, LOGL_ERROR, "error reading from L1 msg_queue: %s\n", + strerror(errno)); + msgb_free(msg); + return rc; + } + msgb_put(msg, rc); + + switch (ofd->priv_nr) { + case MQ_SYS_WRITE: + if (rc != sizeof(Litecell15_Prim_t)) + LOGP(DL1IF, LOGL_NOTICE, "%u != " + "sizeof(Litecell15_Prim_t)\n", rc); + return l1if_handle_sysprim(fl1h, msg); + case MQ_L1_WRITE: + case MQ_TCH_WRITE: + case MQ_PDTCH_WRITE: + if (rc != sizeof(GsmL1_Prim_t)) + LOGP(DL1IF, LOGL_NOTICE, "%u != " + "sizeof(GsmL1_Prim_t)\n", rc); + return l1if_handle_l1prim(ofd->priv_nr, fl1h, msg); + default: + /* The compiler can't know that priv_nr is an enum. Assist. */ + LOGP(DL1IF, LOGL_FATAL, "writing on a wrong queue: %d\n", + ofd->priv_nr); + exit(0); + break; + } +}; + +/* callback when we can write to one of the l1 msg_queue devices */ +static int l1fd_write_cb(struct osmo_fd *ofd, struct msgb *msg) +{ + int rc; + + rc = write(ofd->fd, msg->l1h, msgb_l1len(msg)); + if (rc < 0) { + LOGP(DL1IF, LOGL_ERROR, "error writing to L1 msg_queue: %s\n", + strerror(errno)); + return rc; + } else if (rc < msg->len) { + LOGP(DL1IF, LOGL_ERROR, "short write to L1 msg_queue: " + "%u < %u\n", rc, msg->len); + return -EIO; + } + + return 0; +} + +int l1if_transport_open(int q, struct lc15l1_hdl *hdl) +{ + int rc; + char buf[PATH_MAX]; + + /* Step 1: Open all msg_queue file descriptors */ + struct osmo_fd *read_ofd = &hdl->read_ofd[q]; + struct osmo_wqueue *wq = &hdl->write_q[q]; + struct osmo_fd *write_ofd = &hdl->write_q[q].bfd; + + snprintf(buf, sizeof(buf)-1, "%s%d", rd_devnames[q], hdl->hw_info.trx_nr); + buf[sizeof(buf)-1] = '\0'; + + rc = open(buf, O_RDONLY); + if (rc < 0) { + LOGP(DL1IF, LOGL_FATAL, "unable to open msg_queue %s: %s\n", + buf, strerror(errno)); + return rc; + } + read_ofd->fd = rc; + read_ofd->priv_nr = q; + read_ofd->data = hdl; + read_ofd->cb = l1if_fd_cb; + read_ofd->when = BSC_FD_READ; + rc = osmo_fd_register(read_ofd); + if (rc < 0) { + close(read_ofd->fd); + read_ofd->fd = -1; + return rc; + } + + snprintf(buf, sizeof(buf)-1, "%s%d", wr_devnames[q], hdl->hw_info.trx_nr); + buf[sizeof(buf)-1] = '\0'; + + rc = open(buf, O_WRONLY); + if (rc < 0) { + LOGP(DL1IF, LOGL_FATAL, "unable to open msg_queue %s: %s\n", + buf, strerror(errno)); + goto out_read; + } + osmo_wqueue_init(wq, 10); + wq->write_cb = l1fd_write_cb; + write_ofd->fd = rc; + write_ofd->priv_nr = q; + write_ofd->data = hdl; + write_ofd->when = BSC_FD_WRITE; + rc = osmo_fd_register(write_ofd); + if (rc < 0) { + close(write_ofd->fd); + write_ofd->fd = -1; + goto out_read; + } + + return 0; + +out_read: + close(hdl->read_ofd[q].fd); + osmo_fd_unregister(&hdl->read_ofd[q]); + + return rc; +} + +int l1if_transport_close(int q, struct lc15l1_hdl *hdl) +{ + struct osmo_fd *read_ofd = &hdl->read_ofd[q]; + struct osmo_fd *write_ofd = &hdl->write_q[q].bfd; + + osmo_fd_unregister(read_ofd); + close(read_ofd->fd); + read_ofd->fd = -1; + + osmo_fd_unregister(write_ofd); + close(write_ofd->fd); + write_ofd->fd = -1; + + return 0; +} diff --git a/src/osmo-bts-litecell15/lc15_l1_if.c b/src/osmo-bts-litecell15/lc15_l1_if.c new file mode 100644 index 0000000..a279b12 --- /dev/null +++ b/src/osmo-bts-litecell15/lc15_l1_if.c @@ -0,0 +1,410 @@ +/* Copyright (C) 2015 by Yves Godin + * based on: + * femto_l1_if.c + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +extern void *tall_pcu_ctx; + +uint32_t l1if_ts_to_hLayer2(uint8_t trx, uint8_t ts) +{ + return (ts << 16) | (trx << 24); +} + +/* allocate a msgb containing a GsmL1_Prim_t */ +struct msgb *l1p_msgb_alloc(void) +{ + struct msgb *msg = msgb_alloc(sizeof(GsmL1_Prim_t), "l1_prim"); + + if (msg) + msg->l1h = msgb_put(msg, sizeof(GsmL1_Prim_t)); + + return msg; +} + +static int l1if_req_pdch(struct lc15l1_hdl *fl1h, struct msgb *msg) +{ + struct osmo_wqueue *wqueue = &fl1h->write_q[MQ_PDTCH_WRITE]; + + if (osmo_wqueue_enqueue(wqueue, msg) != 0) { + LOGP(DL1IF, LOGL_ERROR, "PDTCH queue full. dropping message.\n"); + msgb_free(msg); + } + + return 0; +} + +static void *prim_init(GsmL1_Prim_t *prim, GsmL1_PrimId_t id, struct lc15l1_hdl *gl1) +{ + prim->id = id; + + switch (id) { + case GsmL1_PrimId_MphInitReq: + //prim->u.mphInitReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphCloseReq: + prim->u.mphCloseReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphConnectReq: + prim->u.mphConnectReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphDisconnectReq: + prim->u.mphDisconnectReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphActivateReq: + prim->u.mphActivateReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphDeactivateReq: + prim->u.mphDeactivateReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphConfigReq: + prim->u.mphConfigReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphMeasureReq: + prim->u.mphMeasureReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphInitCnf: + case GsmL1_PrimId_MphCloseCnf: + case GsmL1_PrimId_MphConnectCnf: + case GsmL1_PrimId_MphDisconnectCnf: + case GsmL1_PrimId_MphActivateCnf: + case GsmL1_PrimId_MphDeactivateCnf: + case GsmL1_PrimId_MphConfigCnf: + case GsmL1_PrimId_MphMeasureCnf: + break; + case GsmL1_PrimId_MphTimeInd: + break; + case GsmL1_PrimId_MphSyncInd: + break; + case GsmL1_PrimId_PhEmptyFrameReq: + prim->u.phEmptyFrameReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_PhDataReq: + prim->u.phDataReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_PhConnectInd: + break; + case GsmL1_PrimId_PhReadyToSendInd: + break; + case GsmL1_PrimId_PhDataInd: + break; + case GsmL1_PrimId_PhRaInd: + break; + default: + LOGP(DL1IF, LOGL_ERROR, "unknown L1 primitive %u\n", id); + break; + } + return &prim->u; +} + +struct sapi_dir { + GsmL1_Sapi_t sapi; + GsmL1_Dir_t dir; +}; + +static const struct sapi_dir pdtch_sapis[] = { + { GsmL1_Sapi_Pdtch, GsmL1_Dir_TxDownlink }, + { GsmL1_Sapi_Pdtch, GsmL1_Dir_RxUplink }, + { GsmL1_Sapi_Ptcch, GsmL1_Dir_TxDownlink }, + { GsmL1_Sapi_Prach, GsmL1_Dir_RxUplink }, +#if 0 + { GsmL1_Sapi_Ptcch, GsmL1_Dir_RxUplink }, + { GsmL1_Sapi_Pacch, GsmL1_Dir_TxDownlink }, +#endif +}; + + +/* connect PDTCH */ +int l1if_connect_pdch(void *obj, uint8_t ts) +{ + struct lc15l1_hdl *fl1h = obj; + struct msgb *msg = l1p_msgb_alloc(); + GsmL1_MphConnectReq_t *cr; + + cr = prim_init(msgb_l1prim(msg), GsmL1_PrimId_MphConnectReq, fl1h); + cr->u8Tn = ts; + cr->logChComb = GsmL1_LogChComb_XIII; + + return l1if_req_pdch(fl1h, msg); +} + +static int handle_ph_readytosend_ind(struct lc15l1_hdl *fl1h, + GsmL1_PhReadyToSendInd_t *rts_ind) +{ + struct gsm_time g_time; + int rc = 0; + + gsm_fn2gsmtime(&g_time, rts_ind->u32Fn); + + DEBUGP(DL1IF, "Rx PH-RTS.ind %02u/%02u/%02u SAPI=%s\n", + g_time.t1, g_time.t2, g_time.t3, + get_value_string(lc15bts_l1sapi_names, rts_ind->sapi)); + + switch (rts_ind->sapi) { + case GsmL1_Sapi_Pdtch: + case GsmL1_Sapi_Pacch: + rc = pcu_rx_rts_req_pdtch(fl1h->trx, rts_ind->u8Tn, + rts_ind->u16Arfcn, rts_ind->u32Fn, rts_ind->u8BlockNbr); + case GsmL1_Sapi_Ptcch: + // FIXME + default: + break; + } + + return rc; +} + +static void get_meas(struct pcu_l1_meas *meas, const GsmL1_MeasParam_t *l1_meas) +{ + meas->rssi = (int8_t) (l1_meas->fRssi); + meas->have_rssi = 1; + meas->ber = (uint8_t) (l1_meas->fBer * 100); + meas->have_ber = 1; + meas->bto = (int16_t) (l1_meas->i16BurstTiming); + meas->have_bto = 1; + meas->link_qual = (int16_t) (l1_meas->fLinkQuality); + meas->have_link_qual = 1; +} + +static int handle_ph_data_ind(struct lc15l1_hdl *fl1h, + GsmL1_PhDataInd_t *data_ind, struct msgb *l1p_msg) +{ + int rc = 0; + struct pcu_l1_meas meas = {0}; + + DEBUGP(DL1IF, "Rx PH-DATA.ind %s (hL2 %08x): %s\n", + get_value_string(lc15bts_l1sapi_names, data_ind->sapi), + data_ind->hLayer2, + osmo_hexdump(data_ind->msgUnitParam.u8Buffer, + data_ind->msgUnitParam.u8Size)); + + /* + * TODO: Add proper bad frame handling here. This could be used + * to switch the used CS. Avoid a crash with the PCU right now + * feed "0 - 1" amount of data. + */ + if (data_ind->msgUnitParam.u8Size == 0) + return -1; + + gsmtap_send(fl1h->gsmtap, data_ind->u16Arfcn | GSMTAP_ARFCN_F_UPLINK, + data_ind->u8Tn, GSMTAP_CHANNEL_PACCH, 0, + data_ind->u32Fn, 0, 0, data_ind->msgUnitParam.u8Buffer+1, + data_ind->msgUnitParam.u8Size-1); + + get_meas(&meas, &data_ind->measParam); + + switch (data_ind->sapi) { + case GsmL1_Sapi_Pdtch: + case GsmL1_Sapi_Pacch: + /* drop incomplete UL block */ + if (data_ind->msgUnitParam.u8Buffer[0] + != GsmL1_PdtchPlType_Full) + break; + /* PDTCH / PACCH frame handling */ + pcu_rx_data_ind_pdtch(fl1h->trx, data_ind->u8Tn, + data_ind->msgUnitParam.u8Buffer + 1, + data_ind->msgUnitParam.u8Size - 1, + data_ind->u32Fn, + &meas); + break; + case GsmL1_Sapi_Ptcch: + // FIXME + break; + default: + LOGP(DL1IF, LOGL_NOTICE, "Rx PH-DATA.ind for unknown L1 SAPI %s\n", + get_value_string(lc15bts_l1sapi_names, data_ind->sapi)); + break; + } + + return rc; +} + +#define MIN_QUAL_RACH 5.0f + +static int handle_ph_ra_ind(struct lc15l1_hdl *fl1h, GsmL1_PhRaInd_t *ra_ind) +{ + uint8_t acc_delay; + + if (ra_ind->measParam.fLinkQuality < MIN_QUAL_RACH) + return 0; + + DEBUGP(DL1IF, "Rx PH-RA.ind"); + + /* check for under/overflow / sign */ + if (ra_ind->measParam.i16BurstTiming < 0) + acc_delay = 0; + else + acc_delay = ra_ind->measParam.i16BurstTiming >> 2; + + LOGP(DL1IF, LOGL_NOTICE, "got (P)RACH request, TA = %u (ignored)\n", + acc_delay); + +#warning "The (P)RACH request is just dropped here" + +#if 0 + if (acc_delay > bts->max_ta) { + LOGP(DL1C, LOGL_INFO, "ignoring RACH request %u > max_ta(%u)\n", + acc_delay, btsb->max_ta); + return 0; + } +#endif + + return 0; +} + + +/* handle any random indication from the L1 */ +int l1if_handle_l1prim(int wq, struct lc15l1_hdl *fl1h, struct msgb *msg) +{ + GsmL1_Prim_t *l1p = msgb_l1prim(msg); + int rc = 0; + + LOGP(DL1IF, LOGL_DEBUG, "Rx L1 prim %s on queue %d\n", + get_value_string(lc15bts_l1prim_names, l1p->id), wq); + + switch (l1p->id) { +#if 0 + case GsmL1_PrimId_MphTimeInd: + rc = handle_mph_time_ind(fl1h, &l1p->u.mphTimeInd); + break; + case GsmL1_PrimId_MphSyncInd: + break; + case GsmL1_PrimId_PhConnectInd: + break; +#endif + case GsmL1_PrimId_PhReadyToSendInd: + rc = handle_ph_readytosend_ind(fl1h, &l1p->u.phReadyToSendInd); + break; + case GsmL1_PrimId_PhDataInd: + rc = handle_ph_data_ind(fl1h, &l1p->u.phDataInd, msg); + break; + case GsmL1_PrimId_PhRaInd: + rc = handle_ph_ra_ind(fl1h, &l1p->u.phRaInd); + break; + default: + break; + } + + msgb_free(msg); + + return rc; +} + +int l1if_handle_sysprim(struct lc15l1_hdl *fl1h, struct msgb *msg) +{ + return -ENOTSUP; +} + +/* send packet data request to L1 */ +int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn, + uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len) +{ + struct lc15l1_hdl *fl1h = obj; + struct msgb *msg; + GsmL1_Prim_t *l1p; + GsmL1_PhDataReq_t *data_req; + GsmL1_MsgUnitParam_t *msu_param; + struct gsm_time g_time; + + gsm_fn2gsmtime(&g_time, fn); + + DEBUGP(DL1IF, "TX packet data %02u/%02u/%02u is_ptcch=%d ts=%d " + "block_nr=%d, arfcn=%d, len=%d\n", g_time.t1, g_time.t2, + g_time.t3, is_ptcch, ts, block_nr, arfcn, len); + + msg = l1p_msgb_alloc(); + l1p = msgb_l1prim(msg); + l1p->id = GsmL1_PrimId_PhDataReq; + data_req = &l1p->u.phDataReq; + data_req->hLayer1 = (HANDLE)fl1h->hLayer1; + data_req->sapi = (is_ptcch) ? GsmL1_Sapi_Ptcch : GsmL1_Sapi_Pdtch; + data_req->subCh = GsmL1_SubCh_NA; + data_req->u8BlockNbr = block_nr; + data_req->u8Tn = ts; + data_req->u32Fn = fn; + msu_param = &data_req->msgUnitParam; + msu_param->u8Size = len; + memcpy(msu_param->u8Buffer, data, len); + + gsmtap_send(fl1h->gsmtap, arfcn, data_req->u8Tn, GSMTAP_CHANNEL_PACCH, + 0, data_req->u32Fn, 0, 0, + data_req->msgUnitParam.u8Buffer, + data_req->msgUnitParam.u8Size); + + + /* transmit */ + if (osmo_wqueue_enqueue(&fl1h->write_q[MQ_PDTCH_WRITE], msg) != 0) { + LOGP(DL1IF, LOGL_ERROR, "PDTCH queue full. dropping message.\n"); + msgb_free(msg); + } + + return 0; +} + +void *l1if_open_pdch(uint8_t trx, uint32_t hlayer1) +{ + struct lc15l1_hdl *fl1h; + int rc; + + fl1h = talloc_zero(tall_pcu_ctx, struct lc15l1_hdl); + if (!fl1h) + return NULL; + + fl1h->hLayer1 = hlayer1; + fl1h->trx = trx; + /* hardware queues are numbered starting from 1 */ + fl1h->hw_info.trx_nr = trx + 1; + + DEBUGP(DL1IF, "PCU: Using TRX HW#%u\n", fl1h->hw_info.trx_nr); + + rc = l1if_transport_open(MQ_PDTCH_WRITE, fl1h); + if (rc < 0) { + talloc_free(fl1h); + return NULL; + } + + fl1h->gsmtap = gsmtap_source_init("localhost", GSMTAP_UDP_PORT, 1); + if (fl1h->gsmtap) + gsmtap_source_add_sink(fl1h->gsmtap); + + return fl1h; +} + +int l1if_close_pdch(void *obj) +{ + struct lc15l1_hdl *fl1h = obj; + if (fl1h) + l1if_transport_close(MQ_PDTCH_WRITE, fl1h); + talloc_free(fl1h); + return 0; +} + diff --git a/src/osmo-bts-litecell15/lc15_l1_if.h b/src/osmo-bts-litecell15/lc15_l1_if.h new file mode 100644 index 0000000..5a78ee9 --- /dev/null +++ b/src/osmo-bts-litecell15/lc15_l1_if.h @@ -0,0 +1,104 @@ +/* Copyright (C) 2015 by Yves Godin + * based on: + * femto_l1_if.h + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#ifndef _LC15_L1_IF_H +#define _LC15_L1_IF_H + +#include +#include +#include +#include +#include "lc15bts.h" + +enum { + MQ_SYS_READ, + MQ_L1_READ, + MQ_TCH_READ, + MQ_PDTCH_READ, + _NUM_MQ_READ +}; + +enum { + MQ_SYS_WRITE, + MQ_L1_WRITE, + MQ_TCH_WRITE, + MQ_PDTCH_WRITE, + _NUM_MQ_WRITE +}; + +struct lc15l1_hdl { + struct gsm_time gsm_time; + uint32_t hLayer1; /* handle to the L1 instance in the DSP */ + uint32_t dsp_trace_f; + struct llist_head wlc_list; + + struct gsmtap_inst *gsmtap; + uint32_t gsmtap_sapi_mask; + + uint8_t trx; + + struct osmo_timer_list alive_timer; + unsigned int alive_prim_cnt; + + struct osmo_fd read_ofd[_NUM_MQ_READ]; /* osmo file descriptors */ + struct osmo_wqueue write_q[_NUM_MQ_WRITE]; + + struct { + int trx_nr; /* <1-2> */ + } hw_info; +}; + +#define msgb_l1prim(msg) ((GsmL1_Prim_t *)(msg)->l1h) +#define msgb_sysprim(msg) ((Litecell15_Prim_t *)(msg)->l1h) + +typedef int l1if_compl_cb(struct msgb *l1_msg, void *data); + +/* send a request primitive to the L1 and schedule completion call-back */ +int l1if_req_compl(struct lc15l1_hdl *fl1h, struct msgb *msg, + int is_system_prim, l1if_compl_cb *cb, void *data); + +int l1if_reset(struct lc15l1_hdl *hdl); +int l1if_activate_rf(struct lc15l1_hdl *hdl, int on); +int l1if_set_trace_flags(struct lc15l1_hdl *hdl, uint32_t flags); +int l1if_set_txpower(struct lc15l1_hdl *fl1h, float tx_power); + +struct msgb *l1p_msgb_alloc(void); +struct msgb *sysp_msgb_alloc(void); + +uint32_t l1if_lchan_to_hLayer2(struct gsm_lchan *lchan); +struct gsm_lchan *l1if_hLayer2_to_lchan(struct gsm_bts_trx *trx, uint32_t hLayer2); + +int l1if_handle_sysprim(struct lc15l1_hdl *fl1h, struct msgb *msg); +int l1if_handle_l1prim(int wq, struct lc15l1_hdl *fl1h, struct msgb *msg); + +/* tch.c */ +int l1if_tch_rx(struct gsm_lchan *lchan, struct msgb *l1p_msg); +int l1if_tch_fill(struct gsm_lchan *lchan, uint8_t *l1_buffer); +struct msgb *gen_empty_tch_msg(struct gsm_lchan *lchan); + +/* + * The implementation of these functions is selected by either compiling and + * linking sysmo_l1_hw.c or sysmo_l1_fwd.c + */ +int l1if_transport_open(int q, struct lc15l1_hdl *hdl); +int l1if_transport_close(int q, struct lc15l1_hdl *hdl); + +#endif /* _SYSMO_L1_IF_H */ diff --git a/src/osmo-bts-litecell15/lc15bts.c b/src/osmo-bts-litecell15/lc15bts.c new file mode 100644 index 0000000..172a7e4 --- /dev/null +++ b/src/osmo-bts-litecell15/lc15bts.c @@ -0,0 +1,332 @@ +/* NuRAN Wireless Litecell 1.5 L1 API related definitions */ + +/* Copyright (C) 2015 by Yves Godin + * based on: + * sysmobts.c + * (C) 2011 by Harald Welte + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include + +#include "lc15bts.h" + +enum l1prim_type lc15bts_get_l1prim_type(GsmL1_PrimId_t id) +{ + switch (id) { + case GsmL1_PrimId_MphInitReq: return L1P_T_REQ; + case GsmL1_PrimId_MphCloseReq: return L1P_T_REQ; + case GsmL1_PrimId_MphConnectReq: return L1P_T_REQ; + case GsmL1_PrimId_MphDisconnectReq: return L1P_T_REQ; + case GsmL1_PrimId_MphActivateReq: return L1P_T_REQ; + case GsmL1_PrimId_MphDeactivateReq: return L1P_T_REQ; + case GsmL1_PrimId_MphConfigReq: return L1P_T_REQ; + case GsmL1_PrimId_MphMeasureReq: return L1P_T_REQ; + case GsmL1_PrimId_MphInitCnf: return L1P_T_CONF; + case GsmL1_PrimId_MphCloseCnf: return L1P_T_CONF; + case GsmL1_PrimId_MphConnectCnf: return L1P_T_CONF; + case GsmL1_PrimId_MphDisconnectCnf: return L1P_T_CONF; + case GsmL1_PrimId_MphActivateCnf: return L1P_T_CONF; + case GsmL1_PrimId_MphDeactivateCnf: return L1P_T_CONF; + case GsmL1_PrimId_MphConfigCnf: return L1P_T_CONF; + case GsmL1_PrimId_MphMeasureCnf: return L1P_T_CONF; + case GsmL1_PrimId_PhEmptyFrameReq: return L1P_T_REQ; + case GsmL1_PrimId_PhDataReq: return L1P_T_REQ; + case GsmL1_PrimId_MphTimeInd: return L1P_T_IND; + case GsmL1_PrimId_MphSyncInd: return L1P_T_IND; + case GsmL1_PrimId_PhConnectInd: return L1P_T_IND; + case GsmL1_PrimId_PhReadyToSendInd: return L1P_T_IND; + case GsmL1_PrimId_PhDataInd: return L1P_T_IND; + case GsmL1_PrimId_PhRaInd: return L1P_T_IND; + default: return L1P_T_INVALID; + } +} + +const struct value_string lc15bts_l1prim_names[GsmL1_PrimId_NUM+1] = { + { GsmL1_PrimId_MphInitReq, "MPH-INIT.req" }, + { GsmL1_PrimId_MphCloseReq, "MPH-CLOSE.req" }, + { GsmL1_PrimId_MphConnectReq, "MPH-CONNECT.req" }, + { GsmL1_PrimId_MphDisconnectReq,"MPH-DISCONNECT.req" }, + { GsmL1_PrimId_MphActivateReq, "MPH-ACTIVATE.req" }, + { GsmL1_PrimId_MphDeactivateReq,"MPH-DEACTIVATE.req" }, + { GsmL1_PrimId_MphConfigReq, "MPH-CONFIG.req" }, + { GsmL1_PrimId_MphMeasureReq, "MPH-MEASURE.req" }, + { GsmL1_PrimId_MphInitCnf, "MPH-INIT.conf" }, + { GsmL1_PrimId_MphCloseCnf, "MPH-CLOSE.conf" }, + { GsmL1_PrimId_MphConnectCnf, "MPH-CONNECT.conf" }, + { GsmL1_PrimId_MphDisconnectCnf,"MPH-DISCONNECT.conf" }, + { GsmL1_PrimId_MphActivateCnf, "MPH-ACTIVATE.conf" }, + { GsmL1_PrimId_MphDeactivateCnf,"MPH-DEACTIVATE.conf" }, + { GsmL1_PrimId_MphConfigCnf, "MPH-CONFIG.conf" }, + { GsmL1_PrimId_MphMeasureCnf, "MPH-MEASURE.conf" }, + { GsmL1_PrimId_MphTimeInd, "MPH-TIME.ind" }, + { GsmL1_PrimId_MphSyncInd, "MPH-SYNC.ind" }, + { GsmL1_PrimId_PhEmptyFrameReq, "PH-EMPTY_FRAME.req" }, + { GsmL1_PrimId_PhDataReq, "PH-DATA.req" }, + { GsmL1_PrimId_PhConnectInd, "PH-CONNECT.ind" }, + { GsmL1_PrimId_PhReadyToSendInd,"PH-READY_TO_SEND.ind" }, + { GsmL1_PrimId_PhDataInd, "PH-DATA.ind" }, + { GsmL1_PrimId_PhRaInd, "PH-RA.ind" }, + { 0, NULL } +}; + +GsmL1_PrimId_t lc15bts_get_l1prim_conf(GsmL1_PrimId_t id) +{ + switch (id) { + case GsmL1_PrimId_MphInitReq: return GsmL1_PrimId_MphInitCnf; + case GsmL1_PrimId_MphCloseReq: return GsmL1_PrimId_MphCloseCnf; + case GsmL1_PrimId_MphConnectReq: return GsmL1_PrimId_MphConnectCnf; + case GsmL1_PrimId_MphDisconnectReq: return GsmL1_PrimId_MphDisconnectCnf; + case GsmL1_PrimId_MphActivateReq: return GsmL1_PrimId_MphActivateCnf; + case GsmL1_PrimId_MphDeactivateReq: return GsmL1_PrimId_MphDeactivateCnf; + case GsmL1_PrimId_MphConfigReq: return GsmL1_PrimId_MphConfigCnf; + case GsmL1_PrimId_MphMeasureReq: return GsmL1_PrimId_MphMeasureCnf; + default: return -1; // Weak + } +} + +enum l1prim_type lc15bts_get_sysprim_type(Litecell15_PrimId_t id) +{ + switch (id) { + case Litecell15_PrimId_SystemInfoReq: return L1P_T_REQ; + case Litecell15_PrimId_SystemInfoCnf: return L1P_T_CONF; + case Litecell15_PrimId_SystemFailureInd: return L1P_T_IND; + case Litecell15_PrimId_ActivateRfReq: return L1P_T_REQ; + case Litecell15_PrimId_ActivateRfCnf: return L1P_T_CONF; + case Litecell15_PrimId_DeactivateRfReq: return L1P_T_REQ; + case Litecell15_PrimId_DeactivateRfCnf: return L1P_T_CONF; + case Litecell15_PrimId_SetTraceFlagsReq: return L1P_T_REQ; + case Litecell15_PrimId_Layer1ResetReq: return L1P_T_REQ; + case Litecell15_PrimId_Layer1ResetCnf: return L1P_T_CONF; + case Litecell15_PrimId_SetCalibTblReq: return L1P_T_REQ; + case Litecell15_PrimId_SetCalibTblCnf: return L1P_T_CONF; + case Litecell15_PrimId_MuteRfReq: return L1P_T_REQ; + case Litecell15_PrimId_MuteRfCnf: return L1P_T_CONF; + case Litecell15_PrimId_SetRxAttenReq: return L1P_T_REQ; + case Litecell15_PrimId_SetRxAttenCnf: return L1P_T_CONF; + default: return L1P_T_INVALID; + } +} + +const struct value_string lc15bts_sysprim_names[Litecell15_PrimId_NUM+1] = { + { Litecell15_PrimId_SystemInfoReq, "SYSTEM-INFO.req" }, + { Litecell15_PrimId_SystemInfoCnf, "SYSTEM-INFO.conf" }, + { Litecell15_PrimId_SystemFailureInd, "SYSTEM-FAILURE.ind" }, + { Litecell15_PrimId_ActivateRfReq, "ACTIVATE-RF.req" }, + { Litecell15_PrimId_ActivateRfCnf, "ACTIVATE-RF.conf" }, + { Litecell15_PrimId_DeactivateRfReq, "DEACTIVATE-RF.req" }, + { Litecell15_PrimId_DeactivateRfCnf, "DEACTIVATE-RF.conf" }, + { Litecell15_PrimId_SetTraceFlagsReq, "SET-TRACE-FLAGS.req" }, + { Litecell15_PrimId_Layer1ResetReq, "LAYER1-RESET.req" }, + { Litecell15_PrimId_Layer1ResetCnf, "LAYER1-RESET.conf" }, + { Litecell15_PrimId_SetCalibTblReq, "SET-CALIB.req" }, + { Litecell15_PrimId_SetCalibTblCnf, "SET-CALIB.cnf" }, + { Litecell15_PrimId_MuteRfReq, "MUTE-RF.req" }, + { Litecell15_PrimId_MuteRfCnf, "MUTE-RF.cnf" }, + { Litecell15_PrimId_SetRxAttenReq, "SET-RX-ATTEN.req" }, + { Litecell15_PrimId_SetRxAttenCnf, "SET-RX-ATTEN-CNF.cnf" }, + { 0, NULL } +}; + +Litecell15_PrimId_t lc15bts_get_sysprim_conf(Litecell15_PrimId_t id) +{ + switch (id) { + case Litecell15_PrimId_SystemInfoReq: return Litecell15_PrimId_SystemInfoCnf; + case Litecell15_PrimId_ActivateRfReq: return Litecell15_PrimId_ActivateRfCnf; + case Litecell15_PrimId_DeactivateRfReq: return Litecell15_PrimId_DeactivateRfCnf; + case Litecell15_PrimId_Layer1ResetReq: return Litecell15_PrimId_Layer1ResetCnf; + case Litecell15_PrimId_SetCalibTblReq: return Litecell15_PrimId_SetCalibTblCnf; + case Litecell15_PrimId_MuteRfReq: return Litecell15_PrimId_MuteRfCnf; + case Litecell15_PrimId_SetRxAttenReq: return Litecell15_PrimId_SetRxAttenCnf; + default: return -1; // Weak + } +} + +const struct value_string lc15bts_l1sapi_names[GsmL1_Sapi_NUM+1] = { + { GsmL1_Sapi_Idle, "IDLE" }, + { GsmL1_Sapi_Fcch, "FCCH" }, + { GsmL1_Sapi_Sch, "SCH" }, + { GsmL1_Sapi_Sacch, "SACCH" }, + { GsmL1_Sapi_Sdcch, "SDCCH" }, + { GsmL1_Sapi_Bcch, "BCCH" }, + { GsmL1_Sapi_Pch, "PCH" }, + { GsmL1_Sapi_Agch, "AGCH" }, + { GsmL1_Sapi_Cbch, "CBCH" }, + { GsmL1_Sapi_Rach, "RACH" }, + { GsmL1_Sapi_TchF, "TCH/F" }, + { GsmL1_Sapi_FacchF, "FACCH/F" }, + { GsmL1_Sapi_TchH, "TCH/H" }, + { GsmL1_Sapi_FacchH, "FACCH/H" }, + { GsmL1_Sapi_Nch, "NCH" }, + { GsmL1_Sapi_Pdtch, "PDTCH" }, + { GsmL1_Sapi_Pacch, "PACCH" }, + { GsmL1_Sapi_Pbcch, "PBCCH" }, + { GsmL1_Sapi_Pagch, "PAGCH" }, + { GsmL1_Sapi_Ppch, "PPCH" }, + { GsmL1_Sapi_Pnch, "PNCH" }, + { GsmL1_Sapi_Ptcch, "PTCCH" }, + { GsmL1_Sapi_Prach, "PRACH" }, + { 0, NULL } +}; + +const struct value_string lc15bts_l1status_names[GSML1_STATUS_NUM+1] = { + { GsmL1_Status_Success, "Success" }, + { GsmL1_Status_Generic, "Generic error" }, + { GsmL1_Status_NoMemory, "Not enough memory" }, + { GsmL1_Status_Timeout, "Timeout" }, + { GsmL1_Status_InvalidParam, "Invalid parameter" }, + { GsmL1_Status_Busy, "Resource busy" }, + { GsmL1_Status_NoRessource, "No more resources" }, + { GsmL1_Status_Uninitialized, "Trying to use uninitialized resource" }, + { GsmL1_Status_NullInterface, "Trying to call a NULL interface" }, + { GsmL1_Status_NullFctnPtr, "Trying to call a NULL function ptr" }, + { GsmL1_Status_BadCrc, "Bad CRC" }, + { GsmL1_Status_BadUsf, "Bad USF" }, + { GsmL1_Status_InvalidCPS, "Invalid CPS field" }, + { GsmL1_Status_UnexpectedBurst, "Unexpected burst" }, + { GsmL1_Status_UnavailCodec, "AMR codec is unavailable" }, + { GsmL1_Status_CriticalError, "Critical error" }, + { GsmL1_Status_OverheatError, "Overheat error" }, + { GsmL1_Status_DeviceError, "Device error" }, + { GsmL1_Status_FacchError, "FACCH / TCH order error" }, + { GsmL1_Status_AlreadyDeactivated, "Lchan already deactivated" }, + { GsmL1_Status_TxBurstFifoOvrn, "FIFO overrun" }, + { GsmL1_Status_TxBurstFifoUndr, "FIFO underrun" }, + { GsmL1_Status_NotSynchronized, "Not synchronized" }, + { GsmL1_Status_Unsupported, "Unsupported feature" }, + { GsmL1_Status_ClockError, "System clock error" }, + { 0, NULL } +}; + +const struct value_string lc15bts_tracef_names[29] = { + { DBG_DEBUG, "DEBUG" }, + { DBG_L1WARNING, "L1_WARNING" }, + { DBG_ERROR, "ERROR" }, + { DBG_L1RXMSG, "L1_RX_MSG" }, + { DBG_L1RXMSGBYTE, "L1_RX_MSG_BYTE" }, + { DBG_L1TXMSG, "L1_TX_MSG" }, + { DBG_L1TXMSGBYTE, "L1_TX_MSG_BYTE" }, + { DBG_MPHCNF, "MPH_CNF" }, + { DBG_MPHIND, "MPH_IND" }, + { DBG_MPHREQ, "MPH_REQ" }, + { DBG_PHIND, "PH_IND" }, + { DBG_PHREQ, "PH_REQ" }, + { DBG_PHYRF, "PHY_RF" }, + { DBG_PHYRFMSGBYTE, "PHY_MSG_BYTE" }, + { DBG_MODE, "MODE" }, + { DBG_TDMAINFO, "TDMA_INFO" }, + { DBG_BADCRC, "BAD_CRC" }, + { DBG_PHINDBYTE, "PH_IND_BYTE" }, + { DBG_PHREQBYTE, "PH_REQ_BYTE" }, + { DBG_DEVICEMSG, "DEVICE_MSG" }, + { DBG_RACHINFO, "RACH_INFO" }, + { DBG_LOGCHINFO, "LOG_CH_INFO" }, + { DBG_MEMORY, "MEMORY" }, + { DBG_PROFILING, "PROFILING" }, + { DBG_TESTCOMMENT, "TEST_COMMENT" }, + { DBG_TEST, "TEST" }, + { DBG_STATUS, "STATUS" }, + { 0, NULL } +}; + +const struct value_string lc15bts_tracef_docs[29] = { + { DBG_DEBUG, "Debug Region" }, + { DBG_L1WARNING, "L1 Warning Region" }, + { DBG_ERROR, "Error Region" }, + { DBG_L1RXMSG, "L1_RX_MSG Region" }, + { DBG_L1RXMSGBYTE, "L1_RX_MSG_BYTE Region" }, + { DBG_L1TXMSG, "L1_TX_MSG Region" }, + { DBG_L1TXMSGBYTE, "L1_TX_MSG_BYTE Region" }, + { DBG_MPHCNF, "MphConfirmation Region" }, + { DBG_MPHIND, "MphIndication Region" }, + { DBG_MPHREQ, "MphRequest Region" }, + { DBG_PHIND, "PhIndication Region" }, + { DBG_PHREQ, "PhRequest Region" }, + { DBG_PHYRF, "PhyRF Region" }, + { DBG_PHYRFMSGBYTE, "PhyRF Message Region" }, + { DBG_MODE, "Mode Region" }, + { DBG_TDMAINFO, "TDMA Info Region" }, + { DBG_BADCRC, "Bad CRC Region" }, + { DBG_PHINDBYTE, "PH_IND_BYTE" }, + { DBG_PHREQBYTE, "PH_REQ_BYTE" }, + { DBG_DEVICEMSG, "Device Message Region" }, + { DBG_RACHINFO, "RACH Info" }, + { DBG_LOGCHINFO, "LOG_CH_INFO" }, + { DBG_MEMORY, "Memory Region" }, + { DBG_PROFILING, "Profiling Region" }, + { DBG_TESTCOMMENT, "Test Comments" }, + { DBG_TEST, "Test Region" }, + { DBG_STATUS, "Status Region" }, + { 0, NULL } +}; + +const struct value_string lc15bts_tch_pl_names[] = { + { GsmL1_TchPlType_NA, "N/A" }, + { GsmL1_TchPlType_Fr, "FR" }, + { GsmL1_TchPlType_Hr, "HR" }, + { GsmL1_TchPlType_Efr, "EFR" }, + { GsmL1_TchPlType_Amr, "AMR(IF2)" }, + { GsmL1_TchPlType_Amr_SidBad, "AMR(SID BAD)" }, + { GsmL1_TchPlType_Amr_Onset, "AMR(ONSET)" }, + { GsmL1_TchPlType_Amr_Ratscch, "AMR(RATSCCH)" }, + { GsmL1_TchPlType_Amr_SidUpdateInH, "AMR(SID_UPDATE INH)" }, + { GsmL1_TchPlType_Amr_SidFirstP1, "AMR(SID_FIRST P1)" }, + { GsmL1_TchPlType_Amr_SidFirstP2, "AMR(SID_FIRST P2)" }, + { GsmL1_TchPlType_Amr_SidFirstInH, "AMR(SID_FIRST INH)" }, + { GsmL1_TchPlType_Amr_RatscchMarker, "AMR(RATSCCH MARK)" }, + { GsmL1_TchPlType_Amr_RatscchData, "AMR(RATSCCH DATA)" }, + { 0, NULL } +}; + +const struct value_string lc15bts_dir_names[] = { + { GsmL1_Dir_TxDownlink, "TxDL" }, + { GsmL1_Dir_TxUplink, "TxUL" }, + { GsmL1_Dir_RxUplink, "RxUL" }, + { GsmL1_Dir_RxDownlink, "RxDL" }, + { GsmL1_Dir_TxDownlink|GsmL1_Dir_RxUplink, "BOTH" }, + { 0, NULL } +}; + +const struct value_string lc15bts_chcomb_names[] = { + { GsmL1_LogChComb_0, "dummy" }, + { GsmL1_LogChComb_I, "tch_f" }, + { GsmL1_LogChComb_II, "tch_h" }, + { GsmL1_LogChComb_IV, "ccch" }, + { GsmL1_LogChComb_V, "ccch_sdcch4" }, + { GsmL1_LogChComb_VII, "sdcch8" }, + { GsmL1_LogChComb_XIII, "pdtch" }, + { 0, NULL } +}; + +const uint8_t pdch_msu_size[_NUM_PDCH_CS] = { + [PDCH_CS_1] = 23, + [PDCH_CS_2] = 34, + [PDCH_CS_3] = 40, + [PDCH_CS_4] = 54, + [PDCH_MCS_1] = 27, + [PDCH_MCS_2] = 33, + [PDCH_MCS_3] = 42, + [PDCH_MCS_4] = 49, + [PDCH_MCS_5] = 60, + [PDCH_MCS_6] = 78, + [PDCH_MCS_7] = 118, + [PDCH_MCS_8] = 142, + [PDCH_MCS_9] = 154 +}; diff --git a/src/osmo-bts-litecell15/lc15bts.h b/src/osmo-bts-litecell15/lc15bts.h new file mode 100644 index 0000000..4c40db0 --- /dev/null +++ b/src/osmo-bts-litecell15/lc15bts.h @@ -0,0 +1,64 @@ +#ifndef LC15BTS_H +#define LC15BTS_H + +#include +#include + +#include +#include + +/* + * Depending on the firmware version either GsmL1_Prim_t or Litecell15_Prim_t + * is the bigger struct. For earlier firmware versions the GsmL1_Prim_t was the + * bigger struct. + */ +#define LC15BTS_PRIM_SIZE \ + (OSMO_MAX(sizeof(Litecell15_Prim_t), sizeof(GsmL1_Prim_t)) + 128) + +enum l1prim_type { + L1P_T_INVALID, /* this must be 0 to detect uninitialized elements */ + L1P_T_REQ, + L1P_T_CONF, + L1P_T_IND, +}; + +enum l1prim_type lc15bts_get_l1prim_type(GsmL1_PrimId_t id); +const struct value_string lc15bts_l1prim_names[GsmL1_PrimId_NUM+1]; +GsmL1_PrimId_t lc15bts_get_l1prim_conf(GsmL1_PrimId_t id); + +enum l1prim_type lc15bts_get_sysprim_type(Litecell15_PrimId_t id); +const struct value_string lc15bts_sysprim_names[Litecell15_PrimId_NUM+1]; +Litecell15_PrimId_t lc15bts_get_sysprim_conf(Litecell15_PrimId_t id); + +const struct value_string lc15bts_l1sapi_names[GsmL1_Sapi_NUM+1]; +const struct value_string lc15bts_l1status_names[GSML1_STATUS_NUM+1]; + +const struct value_string lc15bts_tracef_names[29]; +const struct value_string lc15bts_tracef_docs[29]; + +const struct value_string lc15bts_tch_pl_names[15]; + +const struct value_string lc15bts_clksrc_names[10]; + +const struct value_string lc15bts_dir_names[6]; + +enum pdch_cs { + PDCH_CS_1, + PDCH_CS_2, + PDCH_CS_3, + PDCH_CS_4, + PDCH_MCS_1, + PDCH_MCS_2, + PDCH_MCS_3, + PDCH_MCS_4, + PDCH_MCS_5, + PDCH_MCS_6, + PDCH_MCS_7, + PDCH_MCS_8, + PDCH_MCS_9, + _NUM_PDCH_CS +}; + +const uint8_t pdch_msu_size[_NUM_PDCH_CS]; + +#endif /* LC15BTS_H */ -- To view, visit https://gerrit.osmocom.org/61 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib1287375cb10a889625bbac8528fa60deed23a2b Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Fri May 13 09:41:22 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Fri, 13 May 2016 09:41:22 +0000 Subject: Change in openbsc[master]: db.c: implemented incremental migration Message-ID: >From Vadim Yanitskiy : Vadim Yanitskiy has uploaded a new change for review. https://gerrit.osmocom.org/62 Change subject: db.c: implemented incremental migration ...................................................................... db.c: implemented incremental migration In the past, normal migration was possible only if the actual schema version differed from the version used in DB by 1. For example, if DB uses an old version 3 and you need to use it with the code written for version 5, the check_db_revision() will convert it to 4 and DB will still use incompatible schema version during Osmo-NITB running time. After next run it will be converted to version 5. This patch replaces a set of 'else-if' checks by a 'switch' without 'break' statements between 'case' labels (waterfall). It makes you able to migrate from current version to the latest despite any difference between them. Change-Id: Ia9c2aa86f96b88ad8a710d0a23879ce219bc82dc --- M openbsc/src/libmsc/db.c 1 file changed, 35 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/62/62/1 diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c index e5017ae..b3235bb 100644 --- a/openbsc/src/libmsc/db.c +++ b/openbsc/src/libmsc/db.c @@ -374,9 +374,13 @@ { dbi_result result; const char *rev_s; + int db_rev = 0; + /* Make a query */ result = dbi_conn_query(conn, - "SELECT value FROM Meta WHERE key='revision'"); + "SELECT value FROM Meta " + "WHERE key = 'revision'"); + if (!result) return -EINVAL; @@ -384,33 +388,46 @@ dbi_result_free(result); return -EINVAL; } + + /* Fetch the DB schema revision */ rev_s = dbi_result_get_string(result, "value"); if (!rev_s) { dbi_result_free(result); return -EINVAL; } - if (!strcmp(rev_s, "2")) { - if (update_db_revision_2()) { - LOGP(DDB, LOGL_FATAL, "Failed to update database from schema revision '%s'.\n", rev_s); - dbi_result_free(result); - return -EINVAL; - } - } else if (!strcmp(rev_s, "3")) { - if (update_db_revision_3()) { - LOGP(DDB, LOGL_FATAL, "Failed to update database from schema revision '%s'.\n", rev_s); - dbi_result_free(result); - return -EINVAL; - } - } else if (!strcmp(rev_s, SCHEMA_REVISION)) { - /* everything is fine */ - } else { - LOGP(DDB, LOGL_FATAL, "Invalid database schema revision '%s'.\n", rev_s); + + if (!strcmp(rev_s, SCHEMA_REVISION)) { + /* Everything is fine */ dbi_result_free(result); + return 0; + } + + db_rev = atoi(rev_s); + dbi_result_free(result); + + /* Incremental migration waterfall */ + switch (db_rev) { + case 2: + if (update_db_revision_2()) + goto error; + case 3: + if (update_db_revision_3()) + goto error; + + /* The end of waterfall */ + break; + default: + LOGP(DDB, LOGL_FATAL, + "Invalid database schema revision '%d'.\n", db_rev); return -EINVAL; } - dbi_result_free(result); return 0; + +error: + LOGP(DDB, LOGL_FATAL, "Failed to update database " + "from schema revision '%d'.\n", db_rev); + return -EINVAL; } static int db_configure(void) -- To view, visit https://gerrit.osmocom.org/62 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia9c2aa86f96b88ad8a710d0a23879ce219bc82dc Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Fri May 13 10:17:23 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Fri, 13 May 2016 10:17:23 +0000 Subject: Change in openbsc[master]: move to hex TMSI representation Message-ID: >From Vadim Yanitskiy : Vadim Yanitskiy has uploaded a new change for review. https://gerrit.osmocom.org/63 Change subject: move to hex TMSI representation ...................................................................... move to hex TMSI representation In OpenBSC, we traditionally displayed a TMSI in its integer representation, which is quite unusual in the telecom world. A TMSI is normally printed as a series of 8 hex digits. This patch aligns OpenBSC with the telecom industry standard and should be applied with corresponding patch for libosmocore. - Use hex representation in VTY - Increased DB SCHEMA_REVISION - Implemented DB migration code Change-Id: I518c441f11f234b8f34ede5b76671049f06b6599 --- M openbsc/include/openbsc/gsm_subscriber.h M openbsc/src/libmsc/db.c M openbsc/src/libmsc/vty_interface_layer3.c M openbsc/tests/db/db_test.c M openbsc/tests/db/db_test.err M openbsc/tests/gsm0408/gsm0408_test.c 6 files changed, 138 insertions(+), 24 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/63/63/1 diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h index 9df989a..7e9a272 100644 --- a/openbsc/include/openbsc/gsm_subscriber.h +++ b/openbsc/include/openbsc/gsm_subscriber.h @@ -13,7 +13,7 @@ #define GSM_SUBSCRIBER_FIRST_CONTACT 0x00000001 /* gprs_sgsn.h defines additional flags including and above bit 16 (0x10000) */ -#define tmsi_from_string(str) strtoul(str, NULL, 10) +#define tmsi_from_string(str) strtoul(str + 2, NULL, 16) #define GSM_SUBSCRIBER_NO_EXPIRATION 0x0 diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c index b3235bb..087e2cd 100644 --- a/openbsc/src/libmsc/db.c +++ b/openbsc/src/libmsc/db.c @@ -48,7 +48,7 @@ static char *db_dirname = NULL; static dbi_conn conn; -#define SCHEMA_REVISION "4" +#define SCHEMA_REVISION "5" enum { SCHEMA_META, @@ -84,7 +84,7 @@ "name TEXT, " "extension TEXT UNIQUE, " "authorized INTEGER NOT NULL DEFAULT 0, " - "tmsi TEXT UNIQUE, " + "tmsi INTEGER UNIQUE, " "lac INTEGER NOT NULL DEFAULT 0, " "expire_lu TIMESTAMP DEFAULT NULL" ")", @@ -213,6 +213,7 @@ } dbi_result_free(result); + LOGP(DDB, LOGL_NOTICE, "Migration complete.\n"); return 0; } @@ -225,23 +226,27 @@ { struct gsm_sms *sms = sms_alloc(); long long unsigned int sender_id; - struct gsm_subscriber *sender; - const char *text, *daddr; + const char *text, *daddr, *extension; const unsigned char *user_data; - char buf[32]; + dbi_result sender_result; if (!sms) return NULL; - sms->id = dbi_result_get_ulonglong(result, "id"); - sender_id = dbi_result_get_ulonglong(result, "sender_id"); - snprintf(buf, sizeof(buf), "%llu", sender_id); - sender = db_get_subscriber(GSM_SUBSCRIBER_ID, buf); - OSMO_ASSERT(sender); - strncpy(sms->src.addr, sender->extension, sizeof(sms->src.addr)-1); - subscr_direct_free(sender); - sender = NULL; + sms->id = dbi_result_get_ulonglong(result, "id"); + + sender_result = dbi_conn_queryf(conn, + "SELECT * FROM Subscriber " + "WHERE id = %llu", sender_id); + + if (sender_result) { + if (dbi_result_next_row(sender_result)) { + extension = dbi_result_get_string(sender_result, "extension"); + strncpy(sms->src.addr, extension, sizeof(sms->src.addr) - 1); + } + dbi_result_free(sender_result); + } sms->reply_path_req = dbi_result_get_ulonglong(result, "reply_path_req"); sms->status_rep_req = dbi_result_get_ulonglong(result, "status_rep_req"); @@ -358,6 +363,7 @@ else dbi_result_free(result); + LOGP(DDB, LOGL_NOTICE, "Migration complete.\n"); return 0; rollback: @@ -365,6 +371,108 @@ if (!result) LOGP(DDB, LOGL_ERROR, "Rollback failed (upgrade from rev 3).\n"); + else + dbi_result_free(result); + return -EINVAL; +} + +static int update_db_revision_4(void) +{ + dbi_result result; + + LOGP(DDB, LOGL_NOTICE, "Going to migrate from revision 4\n"); + + result = dbi_conn_query(conn, "BEGIN EXCLUSIVE TRANSACTION"); + if (!result) { + LOGP(DDB, LOGL_ERROR, + "Failed to begin transaction " + "(upgrade from rev 4)\n"); + return -EINVAL; + } + dbi_result_free(result); + + /* Rename old Subscriber table to be able create a new one */ + result = dbi_conn_query(conn, + "ALTER TABLE Subscriber RENAME TO Subscriber_4"); + if (!result) { + LOGP(DDB, LOGL_ERROR, + "Failed to rename the old Subscriber table " + "(upgrade from rev 4).\n"); + goto rollback; + } + dbi_result_free(result); + + /* Create new Subscriber table */ + result = dbi_conn_query(conn, create_stmts[SCHEMA_SUBSCRIBER]); + if (!result) { + LOGP(DDB, LOGL_ERROR, + "Failed to create a new Subscriber table " + "(upgrade from rev 4).\n"); + goto rollback; + } + dbi_result_free(result); + + /* Copy subscriber data into the new table */ + result = dbi_conn_query(conn, + "INSERT INTO Subscriber " + "SELECT * FROM Subscriber_4"); + if (!result) { + LOGP(DDB, LOGL_ERROR, + "Failed to copy subscriber data into the new table " + "(upgrade from rev 4).\n"); + goto rollback; + } + dbi_result_free(result); + + /* Remove the temporary table */ + result = dbi_conn_query(conn, "DROP TABLE Subscriber_4"); + if (!result) { + LOGP(DDB, LOGL_ERROR, + "Failed to drop the old Subscriber table " + "(upgrade from rev 4).\n"); + goto rollback; + } + dbi_result_free(result); + + /* We're done. Bump DB Meta revision to 5 */ + result = dbi_conn_query(conn, + "UPDATE Meta " + "SET value = '5' " + "WHERE key = 'revision'"); + if (!result) { + LOGP(DDB, LOGL_ERROR, + "Failed to update DB schema revision " + "(upgrade from rev 4).\n"); + goto rollback; + } + dbi_result_free(result); + + result = dbi_conn_query(conn, "COMMIT TRANSACTION"); + if (!result) { + LOGP(DDB, LOGL_ERROR, + "Failed to commit the transaction " + "(upgrade from rev 4)\n"); + return -EINVAL; + } + + /* Shrink DB file size by actually wiping out Subscriber_4 table data */ + result = dbi_conn_query(conn, "VACUUM"); + if (!result) + LOGP(DDB, LOGL_ERROR, + "VACUUM failed. Ignoring it " + "(upgrade from rev 4).\n"); + else + dbi_result_free(result); + + LOGP(DDB, LOGL_NOTICE, "Migration complete.\n"); + return 0; + +rollback: + result = dbi_conn_query(conn, "ROLLBACK TRANSACTION"); + if (!result) + LOGP(DDB, LOGL_ERROR, + "Rollback failed " + "(upgrade from rev 4).\n"); else dbi_result_free(result); return -EINVAL; @@ -412,6 +520,9 @@ goto error; case 3: if (update_db_revision_3()) + goto error; + case 4: + if (update_db_revision_4()) goto error; /* The end of waterfall */ @@ -823,10 +934,6 @@ if (string) strncpy(subscr->imsi, string, sizeof(subscr->imsi)-1); - string = dbi_result_get_string(result, "tmsi"); - if (string) - subscr->tmsi = tmsi_from_string(string); - string = dbi_result_get_string(result, "name"); if (string) strncpy(subscr->name, string, GSM_NAME_LENGTH); @@ -836,6 +943,7 @@ strncpy(subscr->extension, string, GSM_EXTENSION_LENGTH); subscr->lac = dbi_result_get_ulonglong(result, "lac"); + subscr->tmsi = dbi_result_get_ulonglong(result, "tmsi"); if (!dbi_result_field_is_null(result, "expire_lu")) subscr->expire_lu = dbi_result_get_datetime(result, "expire_lu"); @@ -908,9 +1016,10 @@ subscr->id = dbi_result_get_ulonglong(result, "id"); db_set_from_query(subscr, result); - DEBUGP(DDB, "Found Subscriber: ID %llu, IMSI %s, NAME '%s', TMSI %u, EXTEN '%s', LAC %hu, AUTH %u\n", - subscr->id, subscr->imsi, subscr->name, subscr->tmsi, subscr->extension, - subscr->lac, subscr->authorized); + DEBUGP(DDB, "Found Subscriber: ID %llu, IMSI %s, NAME '%s', " + "TMSI 0x%08x, EXTEN '%s', LAC %hu, AUTH %u\n", + subscr->id, subscr->imsi, subscr->name, subscr->tmsi, + subscr->extension, subscr->lac, subscr->authorized); dbi_result_free(result); get_equipment_by_subscr(subscr); @@ -1240,7 +1349,7 @@ } if (!dbi_result_next_row(result)) { dbi_result_free(result); - DEBUGP(DDB, "Allocated TMSI %u for IMSI %s.\n", + DEBUGP(DDB, "Allocated TMSI 0x%08x for IMSI %s.\n", subscriber->tmsi, subscriber->imsi); return db_sync_subscriber(subscriber); } diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 4c2088a..2fa04c0 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -189,7 +189,8 @@ else if (!strcmp(type, "imsi")) return subscr_get_by_imsi(gsmnet->subscr_group, id); else if (!strcmp(type, "tmsi")) - return subscr_get_by_tmsi(gsmnet->subscr_group, atoi(id)); + return subscr_get_by_tmsi(gsmnet->subscr_group, + tmsi_from_string(id)); else if (!strcmp(type, "id")) return subscr_get_by_id(gsmnet->subscr_group, atoi(id)); diff --git a/openbsc/tests/db/db_test.c b/openbsc/tests/db/db_test.c index fb159a5..4aa537c 100644 --- a/openbsc/tests/db/db_test.c +++ b/openbsc/tests/db/db_test.c @@ -187,6 +187,7 @@ char *alice_imsi = "3243245432345"; alice = db_create_subscriber(alice_imsi); + db_subscriber_alloc_tmsi(alice); db_sync_subscriber(alice); alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice->imsi); COMPARE(alice, alice_db); diff --git a/openbsc/tests/db/db_test.err b/openbsc/tests/db/db_test.err index fa9a54c..d8a3e7f 100644 --- a/openbsc/tests/db/db_test.err +++ b/openbsc/tests/db/db_test.err @@ -1,2 +1,5 @@ Going to migrate from revision 3 +Migration complete. +Going to migrate from revision 4 +Migration complete.  \ No newline at end of file diff --git a/openbsc/tests/gsm0408/gsm0408_test.c b/openbsc/tests/gsm0408/gsm0408_test.c index 9262667..6b1b7ce 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.c +++ b/openbsc/tests/gsm0408/gsm0408_test.c @@ -195,7 +195,7 @@ /* tmsi code */ mi_len = gsm48_generate_mid_from_tmsi(mi, tmsi); gsm48_mi_to_string(mi_parsed, sizeof(mi_parsed), mi + 2, mi_len - 2); - COMPARE((uint32_t)strtoul(mi_parsed, NULL, 10), ==, tmsi); + COMPARE((uint32_t)tmsi_from_string(mi_parsed), ==, tmsi); /* imsi code */ mi_len = gsm48_generate_mid_from_imsi(mi, imsi_odd); -- To view, visit https://gerrit.osmocom.org/63 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I518c441f11f234b8f34ede5b76671049f06b6599 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Fri May 13 10:19:39 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Fri, 13 May 2016 10:19:39 +0000 Subject: Change in openbsc[master]: db.c: implemented incremental migration In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: db.c: implemented incremental migration ...................................................................... Patch Set 1: (2 comments) Could you please add a test db with version 1 preferable and "test" the migration? IIRC we already one case for the SMS conversion I did a couple of years ago. https://gerrit.osmocom.org/#/c/62/1/openbsc/src/libmsc/db.c File openbsc/src/libmsc/db.c: Line 412: goto error; For coverity we will most likely need to add a "fallthrough" comment or such. PS1, Line 418: break indent -- To view, visit https://gerrit.osmocom.org/62 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia9c2aa86f96b88ad8a710d0a23879ce219bc82dc Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri May 13 10:22:59 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Fri, 13 May 2016 10:22:59 +0000 Subject: Change in openbsc[master]: Cleanup db test In-Reply-To: References: Message-ID: >From Max : Hello Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/43 to look at the new patch set (#3). Change subject: Cleanup db test ...................................................................... Cleanup db test Move copy-pasted code into separate function to make writing more tests easier. Related: OS#1658 Change-Id: I9e39af85718514dd0f081d41c234c9dda77c4b27 --- M openbsc/tests/db/db_test.c 1 file changed, 34 insertions(+), 53 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/43/43/3 -- To view, visit https://gerrit.osmocom.org/43 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9e39af85718514dd0f081d41c234c9dda77c4b27 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri May 13 10:38:34 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Fri, 13 May 2016 10:38:34 +0000 Subject: Change in openbsc[master]: db.c: implemented incremental migration In-Reply-To: References: Message-ID: >From Vadim Yanitskiy : Vadim Yanitskiy has posted comments on this change. Change subject: db.c: implemented incremental migration ...................................................................... Patch Set 1: (1 comment) > (2 comments) > > Could you please add a test db with version 1 preferable and "test" > the migration? IIRC we already one case for the SMS conversion I > did a couple of years ago. I have already tested migration process from 3 to 5. Maybe it would be better to do in another commit? We can name it "db.c: implemented update_db_revision_1()" or such. What do you thik about it? https://gerrit.osmocom.org/#/c/62/1/openbsc/src/libmsc/db.c File openbsc/src/libmsc/db.c: Line 412: goto error; > For coverity we will most likely need to add a "fallthrough" comment or suc Should I add this comment before every 'case' statement? Or just replace the 'waterfall' by 'fallthrough'? -- To view, visit https://gerrit.osmocom.org/62 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia9c2aa86f96b88ad8a710d0a23879ce219bc82dc Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri May 13 10:54:06 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Fri, 13 May 2016 10:54:06 +0000 Subject: Change in openbsc[master]: move to hex TMSI representation In-Reply-To: References: Message-ID: >From Vadim Yanitskiy : Vadim Yanitskiy has posted comments on this change. Change subject: move to hex TMSI representation ...................................................................... Patch Set 1: > Build Failed > > http://jenkins.osmocom.org/jenkins/job/OpenBSC-gerrit/12/ : FAILURE This code will work only after applying a previous patch. On my host 'make check' works without any problems. -- To view, visit https://gerrit.osmocom.org/63 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I518c441f11f234b8f34ede5b76671049f06b6599 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri May 13 15:59:09 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Fri, 13 May 2016 15:59:09 +0000 Subject: Change in openbsc[master]: Move DTX settings to BTS In-Reply-To: References: Message-ID: >From Max : Hello Harald Welte, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/40 to look at the new patch set (#8). Change subject: Move DTX settings to BTS ...................................................................... Move DTX settings to BTS * Add per-BTS DTX settings * Configure Uplink and Downlink DTX separately * Deprecate global DTX option (it was never tested/used anyway) * Use libosmocore function for DTX indicator in System Information (previously it was incorrectly assigned for half-rate channels) Related: OS#22 Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 --- M openbsc/doc/examples/osmo-bsc/osmo-bsc.cfg M openbsc/doc/examples/osmo-nitb/rbs2308/openbsc.cfg M openbsc/include/openbsc/gsm_data.h M openbsc/include/openbsc/gsm_data_shared.h M openbsc/src/libbsc/abis_rsl.c M openbsc/src/libbsc/bsc_init.c M openbsc/src/libbsc/bsc_vty.c M openbsc/src/libbsc/system_information.c M openbsc/src/libcommon/gsm_data.c 9 files changed, 98 insertions(+), 28 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/40/40/8 -- To view, visit https://gerrit.osmocom.org/40 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Gerrit-PatchSet: 8 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri May 13 16:00:04 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Fri, 13 May 2016 16:00:04 +0000 Subject: Change in openbsc[master]: Move DTX settings to BTS In-Reply-To: References: Message-ID: >From Max : Max has posted comments on this change. Change subject: Move DTX settings to BTS ...................................................................... Patch Set 8: Moved BTS DTX init to proper place. -- To view, visit https://gerrit.osmocom.org/40 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Gerrit-PatchSet: 8 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From robert.steve07 at gmail.com Fri May 13 16:19:14 2016 From: robert.steve07 at gmail.com (robert) Date: Fri, 13 May 2016 19:19:14 +0300 Subject: BTS power control Message-ID: Hi, In a talk presented by Chris Paget [1] he states that the BTS can tell the MS to add a certain power amount to the signal that it has measured. Is this feature implemented in OpenBSC ? [1]: https://www.google.com.lb/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=0ahUKEwje2dKnuNfMAhXFcRQKHYuJDT4QFggmMAI&url=http%3A%2F%2Fwww.tombom.co.uk%2Fcellphonespying.odp&usg=AFQjCNH7NGwb7waFfPZ1WS4oXNXitLr0ew&sig2=bM6rDu4ILlIz9q4Enhpk-g&bvm=bv.122129774,d.d24 Best regards, Robert Steve, -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit-no-reply at lists.osmocom.org Fri May 13 18:19:38 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Fri, 13 May 2016 18:19:38 +0000 Subject: Change in libosmo-netif[master]: misc: Drop oRTP dependency as there is nothing using it Message-ID: >From Holger Freyther : Holger Freyther has uploaded a new change for review. https://gerrit.osmocom.org/64 Change subject: misc: Drop oRTP dependency as there is nothing using it ...................................................................... misc: Drop oRTP dependency as there is nothing using it This seems to be a copy of paste of libsomo-abis. Let us just drop it here and be done with it. Change-Id: Ia5cb2b572fb5597605284d1c3f657d548aa790f2 --- M configure.ac M debian/control 2 files changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/64/64/1 diff --git a/configure.ac b/configure.ac index 19f7d18..64a7a1e 100644 --- a/configure.ac +++ b/configure.ac @@ -39,7 +39,6 @@ PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.3.0) dnl FIXME: We depend on libosmoabis by now until we can move LAPD code here PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.0.7) -PKG_CHECK_MODULES(ORTP, ortp >= 0.15.0) old_LIBS=$LIBS AC_SEARCH_LIBS([sctp_send], [sctp], [ diff --git a/debian/control b/debian/control index c5bcb43..3953414 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Section: libs Priority: optional Maintainer: Holger Hans Peter Freyther -Build-Depends: debhelper (>= 9), autotools-dev, autoconf, automake, libtool, dh-autoreconf, libdpkg-perl, git, libosmocore-dev, libosmo-abis-dev, pkg-config, libortp-dev, libsctp-dev +Build-Depends: debhelper (>= 9), autotools-dev, autoconf, automake, libtool, dh-autoreconf, libdpkg-perl, git, libosmocore-dev, libosmo-abis-dev, pkg-config, libsctp-dev Standards-Version: 3.9.6 Vcs-Git: git://git.osmocom.org/libosmo-netif.git Vcs-Browser: http://git.osmocom.org/gitweb?p=libosmo-netif.git;a=summary -- To view, visit https://gerrit.osmocom.org/64 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia5cb2b572fb5597605284d1c3f657d548aa790f2 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Holger Freyther From laforge at gnumonks.org Fri May 13 22:59:03 2016 From: laforge at gnumonks.org (Harald Welte) Date: Sat, 14 May 2016 00:59:03 +0200 Subject: BTS power control In-Reply-To: References: Message-ID: <20160513225903.GG6350@nataraja> Hi Robert, On Fri, May 13, 2016 at 07:19:14PM +0300, robert wrote: > In a talk presented by Chris Paget [1] he states that the BTS can tell > the MS to add a certain power amount to the signal that it has > measured. That's not quite correct. The BTS can basically instruct a MS at any time to transmit any of the MS power levels supported by the specific MS power class in a given band. > Is this feature implemented in OpenBSC ? No, because it is fundamentally a feature of the BTS, not the BSC. The power control loop is implemented inside the BTS. OsmoBTS implements the power control loop. Normally it is possible to override the MS power level with some static level via the RSL protocol betewen BSC and BTS, but we don't implement that part. The easiest way to force a MS to transmit with higher power (if that's what you want) is to influence the power control loop inside the BTS, either by changing the code, or (on the osmo-bts-sysmo) you can change the 'target uplink signal level as received by the BTS' to something ridiculously high like -30 dBm, and then the loop will try to make sure to reach that level. As that's virtually impossible, the MS will transmit at its maximum supported power level. -- - Harald Welte http://laforge.gnumonks.org/ ============================================================================ "Privacy in residential applications is a desirable marketing option." (ETSI EN 300 175-7 Ch. A6) From robert.steve07 at gmail.com Sat May 14 08:45:44 2016 From: robert.steve07 at gmail.com (robert) Date: Sat, 14 May 2016 11:45:44 +0300 Subject: BTS power control In-Reply-To: <20160513225903.GG6350@nataraja> References: <20160513225903.GG6350@nataraja> Message-ID: <9A3B1EAA-CB5A-4CBB-82A2-25878F702C7E@gmail.com> Thank you. On May 14, 2016, at 1:59 AM, Harald Welte wrote: > Hi Robert, > > On Fri, May 13, 2016 at 07:19:14PM +0300, robert wrote: >> In a talk presented by Chris Paget [1] he states that the BTS can tell >> the MS to add a certain power amount to the signal that it has >> measured. > > That's not quite correct. The BTS can basically instruct a MS at any > time to transmit any of the MS power levels supported by the specific MS > power class in a given band. > >> Is this feature implemented in OpenBSC ? > > No, because it is fundamentally a feature of the BTS, not the BSC. The > power control loop is implemented inside the BTS. > > OsmoBTS implements the power control loop. Normally it is possible to > override the MS power level with some static level via the RSL protocol > betewen BSC and BTS, but we don't implement that part. > > The easiest way to force a MS to transmit with higher power (if that's > what you want) is to influence the power control loop inside the > BTS, either by changing the code, or (on the osmo-bts-sysmo) you can > change the 'target uplink signal level as received by the BTS' to > something ridiculously high like -30 dBm, and then the loop will try to > make sure to reach that level. As that's virtually impossible, the MS > will transmit at its maximum supported power level. > > -- > - Harald Welte http://laforge.gnumonks.org/ > ============================================================================ > "Privacy in residential applications is a desirable marketing option." > (ETSI EN 300 175-7 Ch. A6) From gerrit-no-reply at lists.osmocom.org Sat May 14 10:06:33 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Sat, 14 May 2016 10:06:33 +0000 Subject: Change in libosmo-netif[master]: misc: Drop oRTP dependency as there is nothing using it In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: misc: Drop oRTP dependency as there is nothing using it ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/64 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia5cb2b572fb5597605284d1c3f657d548aa790f2 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat May 14 10:06:38 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Sat, 14 May 2016 10:06:38 +0000 Subject: Change in libosmo-netif[master]: misc: Drop oRTP dependency as there is nothing using it In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has submitted this change and it was merged. Change subject: misc: Drop oRTP dependency as there is nothing using it ...................................................................... misc: Drop oRTP dependency as there is nothing using it This seems to be a copy of paste of libsomo-abis. Let us just drop it here and be done with it. Change-Id: Ia5cb2b572fb5597605284d1c3f657d548aa790f2 Reviewed-on: https://gerrit.osmocom.org/64 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M configure.ac M debian/control 2 files changed, 1 insertion(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/configure.ac b/configure.ac index 19f7d18..64a7a1e 100644 --- a/configure.ac +++ b/configure.ac @@ -39,7 +39,6 @@ PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.3.0) dnl FIXME: We depend on libosmoabis by now until we can move LAPD code here PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.0.7) -PKG_CHECK_MODULES(ORTP, ortp >= 0.15.0) old_LIBS=$LIBS AC_SEARCH_LIBS([sctp_send], [sctp], [ diff --git a/debian/control b/debian/control index c5bcb43..3953414 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Section: libs Priority: optional Maintainer: Holger Hans Peter Freyther -Build-Depends: debhelper (>= 9), autotools-dev, autoconf, automake, libtool, dh-autoreconf, libdpkg-perl, git, libosmocore-dev, libosmo-abis-dev, pkg-config, libortp-dev, libsctp-dev +Build-Depends: debhelper (>= 9), autotools-dev, autoconf, automake, libtool, dh-autoreconf, libdpkg-perl, git, libosmocore-dev, libosmo-abis-dev, pkg-config, libsctp-dev Standards-Version: 3.9.6 Vcs-Git: git://git.osmocom.org/libosmo-netif.git Vcs-Browser: http://git.osmocom.org/gitweb?p=libosmo-netif.git;a=summary -- To view, visit https://gerrit.osmocom.org/64 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia5cb2b572fb5597605284d1c3f657d548aa790f2 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat May 14 10:15:32 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Sat, 14 May 2016 10:15:32 +0000 Subject: Change in libosmocore[master]: gsm48: move to hex TMSI representation In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: gsm48: move to hex TMSI representation ...................................................................... Patch Set 1: Code-Review+2 (2 comments) https://gerrit.osmocom.org/#/c/57/1/src/gsm/gsm48.c File src/gsm/gsm48.c: PS1, Line 461: It is not a "reverse" anymore. Should the comment be updated? Specially with gsm48_generate_mid_from_tmsi just taking the uint32? PS1, Line 465: string Why do you prefix it with 0x here? In the commit message I would like to have a small statement about the minimum size of the "string" not having. Who consumes the result and does the represntation matter? -- To view, visit https://gerrit.osmocom.org/57 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifd25365bfa3b4ee95b16979740c3229948ce17f2 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat May 14 10:15:40 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Sat, 14 May 2016 10:15:40 +0000 Subject: Change in libosmocore[master]: gsm48: move to hex TMSI representation In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: gsm48: move to hex TMSI representation ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/57 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifd25365bfa3b4ee95b16979740c3229948ce17f2 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat May 14 10:20:13 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Sat, 14 May 2016 10:20:13 +0000 Subject: Change in osmo-pcu[master]: Restructure sources In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: Restructure sources ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/58/1/src/Makefile.am File src/Makefile.am: PS1, Line 67: Why do you remove this guard? -- To view, visit https://gerrit.osmocom.org/58 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I05004ad9032759a5dbfa57290ed1df83e89d5cb8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat May 14 10:21:59 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Sat, 14 May 2016 10:21:59 +0000 Subject: Change in osmo-pcu[master]: Change internal API for consistency In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: Change internal API for consistency ...................................................................... Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/59/1//COMMIT_MSG Commit Message: Line 7: Change internal API for consistency consistency with what? https://gerrit.osmocom.org/#/c/59/1/src/osmo-bts-sysmo/sysmo_l1_if.h File src/osmo-bts-sysmo/sysmo_l1_if.h: Line 41: uint8_t trx; We have a TRX object. Can you call it trx_no? -- To view, visit https://gerrit.osmocom.org/59 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic584611184b0c8b5417ecff0ddae3d526b55a079 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat May 14 16:02:37 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Sat, 14 May 2016 16:02:37 +0000 Subject: Change in libosmocore[master]: gsm48: move to hex TMSI representation In-Reply-To: References: Message-ID: >From Vadim Yanitskiy : Vadim Yanitskiy has posted comments on this change. Change subject: gsm48: move to hex TMSI representation ...................................................................... Patch Set 1: (2 comments) > (2 comments) https://gerrit.osmocom.org/#/c/57/1/src/gsm/gsm48.c File src/gsm/gsm48.c: PS1, Line 461: > It is not a "reverse" anymore. Should the comment be updated? Specially wit I think we can simply delete this comment. PS1, Line 465: string > Why do you prefix it with 0x here? In the commit message I would like to h Because I saw that the 0x%08x format also used in other Osmocom projects, for example in OsmocomBB. Well, the minimum ant the maximum size of the string is always constant and equal to 2 + 8 = 10 (without '\0'). It is mostly consumed by user, so I think we should use the most comfortable for reading format. Would you prefer to avoid the '0x' prefix in this case? Also, what about using '%08X' instead of '%08x'? -- To view, visit https://gerrit.osmocom.org/57 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifd25365bfa3b4ee95b16979740c3229948ce17f2 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes From alexander.huemer at xx.vu Sun May 15 02:52:24 2016 From: alexander.huemer at xx.vu (Alexander Huemer) Date: Sun, 15 May 2016 04:52:24 +0200 Subject: Patch for osmo-iuh master Message-ID: <1463280745-25317-1-git-send-email-alexander.huemer@xx.vu> This is a patch for osmo-iuh From alexander.huemer at xx.vu Sun May 15 02:52:25 2016 From: alexander.huemer at xx.vu (Alexander Huemer) Date: Sun, 15 May 2016 04:52:25 +0200 Subject: [PATCH] attempt to fix parallel build, improve AM logic In-Reply-To: <1463280745-25317-1-git-send-email-alexander.huemer@xx.vu> References: <1463280745-25317-1-git-send-email-alexander.huemer@xx.vu> Message-ID: <1463280745-25317-2-git-send-email-alexander.huemer@xx.vu> The formerly existing make rule caused a race condition in parallel builds and wrongly stated the .c files as targets, which caused make to execute the rule twice (once for each target). This was actually only fallout of the attempt to express the fact that those two files are generated by the rule. The generated file ranap_ies_defs.h was moved by one make job, another job then tried to access the file in the old location and failed. parallel build verified with: $ for i in $(seq 1 10) do echo "XXXX iteration $i" git clean -xfd autoreconf -i ./configure make -j${i} || break done Coauthored by Andreas Rottmann --- .gitignore | 2 + include/osmocom/ranap/ranap_ies_defs.h | 2967 -------------------------------- src/Makefile.am | 5 +- 3 files changed, 5 insertions(+), 2969 deletions(-) delete mode 100644 include/osmocom/ranap/ranap_ies_defs.h diff --git a/.gitignore b/.gitignore index c7a19ee..b2538a7 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,5 @@ src/osmo-hnbgw tags libosmo-ranap.pc m4 +gen_ranap.stamp +include/osmocom/ranap/ranap_ies_defs.h diff --git a/include/osmocom/ranap/ranap_ies_defs.h b/include/osmocom/ranap/ranap_ies_defs.h deleted file mode 100644 index eb4813f..0000000 --- a/include/osmocom/ranap/ranap_ies_defs.h +++ /dev/null @@ -1,2967 +0,0 @@ -/******************************************************************************* - * This file had been created by asn1tostruct.py script v0.5osmo1 - * Please do not modify this file but regenerate it via script. - * Created on: 2016-02-19 16:51:41.625903 by daniel - * from ['../asn1//ranap/RANAP-PDU-Contents.asn'] - ******************************************************************************/ -#include - -#ifndef RANAP_IES_DEFS_H_ -#define RANAP_IES_DEFS_H_ - -typedef struct RANAP_RAB_ReleasedItemIEs_s { - RANAP_RAB_ReleasedItem_t raB_ReleasedItem; -} RANAP_RAB_ReleasedItemIEs_t; - -typedef struct RANAP_Iu_ReleaseRequestIEs_s { - RANAP_Cause_t cause; -} RANAP_Iu_ReleaseRequestIEs_t; - -#define UESPECIFICINFORMATIONINDICATIONIES_RANAP_UESBI_IU_PRESENT (1 << 0) - -typedef struct RANAP_UESpecificInformationIndicationIEs_s { - uint16_t presenceMask; - RANAP_UESBI_Iu_t uesbI_Iu; ///< Optional field -} RANAP_UESpecificInformationIndicationIEs_t; - -#define ENHANCEDRELOCATIONCOMPLETEFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_EnhancedRelocationCompleteFailureIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_EnhancedRelocationCompleteFailureIEs_t; - -#define MBMSCNDE_REGISTRATIONRESPONSEIES_RANAP_CAUSE_PRESENT (1 << 0) -#define MBMSCNDE_REGISTRATIONRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 1) - -typedef struct RANAP_MBMSCNDe_RegistrationResponseIEs_s { - uint16_t presenceMask; - RANAP_TMGI_t tmgi; - RANAP_GlobalRNC_ID_t globalRNC_ID; - RANAP_Cause_t cause; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSCNDe_RegistrationResponseIEs_t; - -#define SECURITYMODEREJECTIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_SecurityModeRejectIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_SecurityModeRejectIEs_t; - -#define RANAP_RELOCATIONINFORMATIONIES_RANAP_RAB_CONTEXTLIST_RANAP_RELOCINF_PRESENT (1 << 0) - -typedef struct RANAP_RANAP_RelocationInformationIEs_s { - uint16_t presenceMask; - RANAP_RAB_ContextList_RANAP_RelocInf_t raB_ContextList_RANAP_RelocInf; ///< Optional field -} RANAP_RANAP_RelocationInformationIEs_t; - -#define RESETACKNOWLEDGEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) -#define RESETACKNOWLEDGEIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 1) - -typedef struct RANAP_ResetAcknowledgeIEs_s { - uint16_t presenceMask; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field -} RANAP_ResetAcknowledgeIEs_t; - -#define RELOCATIONCANCELACKNOWLEDGEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_RelocationCancelAcknowledgeIEs_s { - uint16_t presenceMask; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_RelocationCancelAcknowledgeIEs_t; - -#define SRVCC_CSKEYSRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_SRVCC_CSKeysResponseIEs_s { - uint16_t presenceMask; - RANAP_IntegrityProtectionKey_t integrityProtectionKey; - RANAP_EncryptionKey_t encryptionKey; - RANAP_SRVCC_Information_t srvcC_Information; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_SRVCC_CSKeysResponseIEs_t; - -#define MBMSCNDE_REGISTRATIONREQUESTIES_RANAP_GLOBALCN_ID_PRESENT (1 << 0) - -typedef struct RANAP_MBMSCNDe_RegistrationRequestIEs_s { - uint16_t presenceMask; - RANAP_TMGI_t tmgi; - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field -} RANAP_MBMSCNDe_RegistrationRequestIEs_t; - -#define PAGINGIES_RANAP_TEMPORARYUE_ID_PRESENT (1 << 0) -#define PAGINGIES_RANAP_PAGINGAREAID_PRESENT (1 << 1) -#define PAGINGIES_RANAP_PAGINGCAUSE_PRESENT (1 << 2) -#define PAGINGIES_RANAP_NONSEARCHINGINDICATION_PRESENT (1 << 3) -#define PAGINGIES_RANAP_DRX_CYCLELENGTHCOEFFICIENT_PRESENT (1 << 4) - -typedef struct RANAP_PagingIEs_s { - uint16_t presenceMask; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_PermanentNAS_UE_ID_t permanentNAS_UE_ID; - RANAP_TemporaryUE_ID_t temporaryUE_ID; ///< Optional field - RANAP_PagingAreaID_t pagingAreaID; ///< Optional field - RANAP_PagingCause_t pagingCause; ///< Optional field - RANAP_NonSearchingIndication_t nonSearchingIndication; ///< Optional field - RANAP_DRX_CycleLengthCoefficient_t drX_CycleLengthCoefficient; ///< Optional field -} RANAP_PagingIEs_t; - -typedef struct RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs_s { - RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_Item_t geraN_Iumode_RAB_Failed_RABAssgntResponse_Item; -} RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs_t; - -typedef struct RANAP_ResetResourceItemIEs_s { - RANAP_ResetResourceItem_t iuSigConIdItem; -} RANAP_ResetResourceItemIEs_t; - -typedef struct RANAP_LocationReportingControlIEs_s { - RANAP_RequestType_t requestType; -} RANAP_LocationReportingControlIEs_t; - -#define ENHANCEDRELOCATIONCOMPLETEREQUESTIES_RANAP_EXTENDEDRNC_ID_PRESENT (1 << 0) -#define ENHANCEDRELOCATIONCOMPLETEREQUESTIES_RANAP_EXTENDEDRNC_ID_PRESENT (1 << 1) -#define ENHANCEDRELOCATIONCOMPLETEREQUESTIES_RANAP_RAB_SETUPLIST_ENHANCEDRELOCCOMPLETEREQ_PRESENT (1 << 2) - -typedef struct RANAP_EnhancedRelocationCompleteRequestIEs_s { - uint16_t presenceMask; - RANAP_IuSignallingConnectionIdentifier_t oldIuSigConId; - RANAP_IuSignallingConnectionIdentifier_t iuSigConId; - RANAP_GlobalRNC_ID_t relocation_SourceRNC_ID; - RANAP_ExtendedRNC_ID_t relocation_SourceExtendedRNC_ID; ///< Optional field - RANAP_GlobalRNC_ID_t relocation_TargetRNC_ID; - RANAP_ExtendedRNC_ID_t relocation_TargetExtendedRNC_ID; ///< Optional field - RANAP_RAB_SetupList_EnhancedRelocCompleteReq_t raB_SetupList_EnhancedRelocCompleteReq; ///< Optional field -} RANAP_EnhancedRelocationCompleteRequestIEs_t; - -typedef struct RANAP_RAB_FailedItemIEs_s { - RANAP_RAB_FailedItem_t raB_FailedItem; -} RANAP_RAB_FailedItemIEs_t; - -#define MBMSUELINKINGRESPONSEIES_RANAP_UNSUCCESSFULLINKING_IES_PRESENT (1 << 0) -#define MBMSUELINKINGRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 1) - -typedef struct RANAP_MBMSUELinkingResponseIEs_s { - uint16_t presenceMask; - RANAP_UnsuccessfulLinking_IEs_t unsuccessfulLinkingList; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSUELinkingResponseIEs_t; - -typedef struct RANAP_RAB_QueuedItemIEs_s { - RANAP_RAB_QueuedItem_t raB_QueuedItem; -} RANAP_RAB_QueuedItemIEs_t; - -#define CN_INVOKETRACEIES_RANAP_TRACETYPE_PRESENT (1 << 0) -#define CN_INVOKETRACEIES_RANAP_TRIGGERID_PRESENT (1 << 1) -#define CN_INVOKETRACEIES_RANAP_UE_ID_PRESENT (1 << 2) -#define CN_INVOKETRACEIES_RANAP_OMC_ID_PRESENT (1 << 3) - -typedef struct RANAP_CN_InvokeTraceIEs_s { - uint16_t presenceMask; - RANAP_TraceType_t traceType; ///< Optional field - RANAP_TraceReference_t traceReference; - RANAP_TriggerID_t triggerID; ///< Optional field - RANAP_UE_ID_t ue_id; ///< Optional field - RANAP_OMC_ID_t omc_id; ///< Optional field -} RANAP_CN_InvokeTraceIEs_t; - -typedef struct RANAP_Iu_ReleaseCommandIEs_s { - RANAP_Cause_t cause; -} RANAP_Iu_ReleaseCommandIEs_t; - -#define RELOCATIONREQUESTACKNOWLEDGEIES_RANAP_TARGETRNC_TOSOURCERNC_TRANSPARENTCONTAINER_PRESENT (1 << 0) -#define RELOCATIONREQUESTACKNOWLEDGEIES_RANAP_RAB_SETUPLIST_RELOCREQACK_PRESENT (1 << 1) -#define RELOCATIONREQUESTACKNOWLEDGEIES_RANAP_RAB_FAILEDLIST_PRESENT (1 << 2) -#define RELOCATIONREQUESTACKNOWLEDGEIES_RANAP_CHOSENINTEGRITYPROTECTIONALGORITHM_PRESENT (1 << 3) -#define RELOCATIONREQUESTACKNOWLEDGEIES_RANAP_CHOSENENCRYPTIONALGORITHM_PRESENT (1 << 4) -#define RELOCATIONREQUESTACKNOWLEDGEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 5) - -typedef struct RANAP_RelocationRequestAcknowledgeIEs_s { - uint16_t presenceMask; - RANAP_TargetRNC_ToSourceRNC_TransparentContainer_t target_ToSource_TransparentContainer; ///< Optional field - RANAP_RAB_SetupList_RelocReqAck_t raB_SetupList_RelocReqAck; ///< Optional field - RANAP_RAB_FailedList_t raB_FailedList; ///< Optional field - RANAP_ChosenIntegrityProtectionAlgorithm_t chosenIntegrityProtectionAlgorithm; ///< Optional field - RANAP_ChosenEncryptionAlgorithm_t chosenEncryptionAlgorithm; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_RelocationRequestAcknowledgeIEs_t; - -#define RELOCATIONFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_RelocationFailureIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_RelocationFailureIEs_t; - -typedef struct RANAP_RABs_failed_to_reportItemIEs_s { - RANAP_RABs_failed_to_reportItem_t raB_FailedtoReportItem; -} RANAP_RABs_failed_to_reportItemIEs_t; - -#define RELOCATIONPREPARATIONFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_RelocationPreparationFailureIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_RelocationPreparationFailureIEs_t; - -typedef struct RANAP_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs_s { - RANAP_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_t raB_ToBeReleasedItem_EnhancedRelocCompleteRes; -} RANAP_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs_t; - -typedef struct RANAP_RABs_ContextFailedtoTransferItemIEs_s { - RANAP_RABs_ContextFailedtoTransferItem_t raB_ContextFailedtoTransferItem; -} RANAP_RABs_ContextFailedtoTransferItemIEs_t; - -#define RELOCATIONREQUIREDIES_RANAP_OLDBSS_TONEWBSS_INFORMATION_PRESENT (1 << 0) - -typedef struct RANAP_RelocationRequiredIEs_s { - uint16_t presenceMask; - RANAP_RelocationType_t relocationType; - RANAP_Cause_t cause; - RANAP_SourceID_t sourceID; - RANAP_TargetID_t targetID; - RANAP_OldBSS_ToNewBSS_Information_t oldBSS_ToNewBSS_Information; ///< Optional field -} RANAP_RelocationRequiredIEs_t; - -typedef struct RANAP_MBMSSessionStopIEs_s { - RANAP_MBMSCNDe_Registration_t mbmscnDe_Registration; -} RANAP_MBMSSessionStopIEs_t; - -#define MBMSSESSIONUPDATEFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_MBMSSessionUpdateFailureIEs_s { - uint16_t presenceMask; - RANAP_SessionUpdateID_t sessionUpdateID; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSSessionUpdateFailureIEs_t; - -#define RESETIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 0) - -typedef struct RANAP_ResetIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field -} RANAP_ResetIEs_t; - -typedef struct RANAP_LocationRelatedDataFailureIEs_s { - RANAP_Cause_t cause; -} RANAP_LocationRelatedDataFailureIEs_t; - -#define RESETRESOURCEACKNOWLEDGEIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 0) -#define RESETRESOURCEACKNOWLEDGEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 1) - -typedef struct RANAP_ResetResourceAcknowledgeIEs_s { - uint16_t presenceMask; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_ResetResourceAckList_t iuSigConIdList; - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_ResetResourceAcknowledgeIEs_t; - -#define MBMSREGISTRATIONREQUESTIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 0) - -typedef struct RANAP_MBMSRegistrationRequestIEs_s { - uint16_t presenceMask; - RANAP_MBMSRegistrationRequestType_t mbmsRegistrationRequestType; - RANAP_TMGI_t tmgi; - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field -} RANAP_MBMSRegistrationRequestIEs_t; - -typedef struct RANAP_UplinkInformationExchangeRequestIEs_s { - RANAP_InformationExchangeID_t informationExchangeID; - RANAP_InformationExchangeType_t informationExchangeType; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_GlobalRNC_ID_t globalRNC_ID; -} RANAP_UplinkInformationExchangeRequestIEs_t; - -#define MBMSSESSIONSTOPRESPONSEIES_RANAP_CAUSE_PRESENT (1 << 0) -#define MBMSSESSIONSTOPRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 1) - -typedef struct RANAP_MBMSSessionStopResponseIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSSessionStopResponseIEs_t; - -typedef struct RANAP_RAB_ContextItemIEs_RANAP_RelocInf_s { - RANAP_RAB_ContextItem_RANAP_RelocInf_t raB_ContextItem_RANAP_RelocInf; -} RANAP_RAB_ContextItemIEs_RANAP_RelocInf_t; - -#define LOCATIONRELATEDDATAREQUESTIES_RANAP_LOCATIONRELATEDDATAREQUESTTYPE_PRESENT (1 << 0) - -typedef struct RANAP_LocationRelatedDataRequestIEs_s { - uint16_t presenceMask; - RANAP_LocationRelatedDataRequestType_t locationRelatedDataRequestType; ///< Optional field -} RANAP_LocationRelatedDataRequestIEs_t; - -typedef struct RANAP_RAB_DataForwardingItem_SRNS_CtxReq_IEs_s { - RANAP_RAB_DataForwardingItem_SRNS_CtxReq_t raB_DataForwardingItem_SRNS_CtxReq; -} RANAP_RAB_DataForwardingItem_SRNS_CtxReq_IEs_t; - -typedef struct RANAP_RAB_ReleaseItemIEs_s { - RANAP_RAB_ReleaseItem_t raB_ReleaseItem; -} RANAP_RAB_ReleaseItemIEs_t; - -typedef struct RANAP_RAB_DataVolumeReportRequestItemIEs_s { - RANAP_RAB_DataVolumeReportRequestItem_t raB_DataVolumeReportRequestItem; -} RANAP_RAB_DataVolumeReportRequestItemIEs_t; - -#define INFORMATIONTRANSFERCONFIRMATIONIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_InformationTransferConfirmationIEs_s { - uint16_t presenceMask; - RANAP_InformationTransferID_t informationTransferID; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field - RANAP_GlobalRNC_ID_t globalRNC_ID; -} RANAP_InformationTransferConfirmationIEs_t; - -#define INITIALUE_MESSAGEIES_RANAP_RAC_PRESENT (1 << 0) - -typedef struct RANAP_InitialUE_MessageIEs_s { - uint16_t presenceMask; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_LAI_t lai; - RANAP_RAC_t rac; ///< Conditional field - RANAP_SAI_t sai; - RANAP_NAS_PDU_t nas_pdu; - RANAP_IuSignallingConnectionIdentifier_t iuSigConId; - RANAP_GlobalRNC_ID_t globalRNC_ID; -} RANAP_InitialUE_MessageIEs_t; - -#define SRNS_CONTEXTRESPONSEIES_RANAP_RAB_CONTEXTLIST_PRESENT (1 << 0) -#define SRNS_CONTEXTRESPONSEIES_RANAP_RABS_CONTEXTFAILEDTOTRANSFERLIST_PRESENT (1 << 1) -#define SRNS_CONTEXTRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_SRNS_ContextResponseIEs_s { - uint16_t presenceMask; - RANAP_RAB_ContextList_t raB_ContextList; ///< Optional field - RANAP_RABs_ContextFailedtoTransferList_t raB_ContextFailedtoTransferList; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_SRNS_ContextResponseIEs_t; - -typedef struct RANAP_ResetResourceAckItemIEs_s { - RANAP_ResetResourceAckItem_t iuSigConIdItem; -} RANAP_ResetResourceAckItemIEs_t; - -#define SRNS_DATAFORWARDCOMMANDIES_RANAP_RAB_DATAFORWARDINGLIST_PRESENT (1 << 0) - -typedef struct RANAP_SRNS_DataForwardCommandIEs_s { - uint16_t presenceMask; - RANAP_RAB_DataForwardingList_t raB_DataForwardingList; ///< Optional field -} RANAP_SRNS_DataForwardCommandIEs_t; - -#define RELOCATIONREQUESTIES_RANAP_PERMANENTNAS_UE_ID_PRESENT (1 << 0) -#define RELOCATIONREQUESTIES_RANAP_RAB_SETUPLIST_RELOCREQ_PRESENT (1 << 1) -#define RELOCATIONREQUESTIES_RANAP_INTEGRITYPROTECTIONINFORMATION_PRESENT (1 << 2) -#define RELOCATIONREQUESTIES_RANAP_ENCRYPTIONINFORMATION_PRESENT (1 << 3) - -typedef struct RANAP_RelocationRequestIEs_s { - uint16_t presenceMask; - RANAP_PermanentNAS_UE_ID_t permanentNAS_UE_ID; ///< Optional field - RANAP_Cause_t cause; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_SourceRNC_ToTargetRNC_TransparentContainer_t source_ToTarget_TransparentContainer; - RANAP_RAB_SetupList_RelocReq_t raB_SetupList_RelocReq; ///< Optional field - RANAP_IntegrityProtectionInformation_t integrityProtectionInformation; ///< Optional field - RANAP_EncryptionInformation_t encryptionInformation; ///< Optional field - RANAP_IuSignallingConnectionIdentifier_t iuSigConId; -} RANAP_RelocationRequestIEs_t; - -typedef struct RANAP_SRNS_ContextRequestIEs_s { - RANAP_RAB_DataForwardingList_SRNS_CtxReq_t raB_DataForwardingList_SRNS_CtxReq; -} RANAP_SRNS_ContextRequestIEs_t; - -#define MBMSSESSIONSTARTRESPONSEIES_RANAP_TRANSPORTLAYERINFORMATION_PRESENT (1 << 0) -#define MBMSSESSIONSTARTRESPONSEIES_RANAP_CAUSE_PRESENT (1 << 1) -#define MBMSSESSIONSTARTRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_MBMSSessionStartResponseIEs_s { - uint16_t presenceMask; - RANAP_TransportLayerInformation_t transportLayerInformation; ///< Optional field - RANAP_Cause_t cause; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSSessionStartResponseIEs_t; - -#define DIRECTTRANSFERIES_RANAP_LAI_PRESENT (1 << 0) -#define DIRECTTRANSFERIES_RANAP_RAC_PRESENT (1 << 1) -#define DIRECTTRANSFERIES_RANAP_SAI_PRESENT (1 << 2) -#define DIRECTTRANSFERIES_RANAP_SAPI_PRESENT (1 << 3) - -typedef struct RANAP_DirectTransferIEs_s { - uint16_t presenceMask; - RANAP_NAS_PDU_t nas_pdu; - RANAP_LAI_t lai; ///< Optional field - RANAP_RAC_t rac; ///< Optional field - RANAP_SAI_t sai; ///< Optional field - RANAP_SAPI_t sapi; ///< Optional field -} RANAP_DirectTransferIEs_t; - -#define RESETRESOURCEIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 0) - -typedef struct RANAP_ResetResourceIEs_s { - uint16_t presenceMask; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_Cause_t cause; - RANAP_ResetResourceList_t iuSigConIdList; - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field -} RANAP_ResetResourceIEs_t; - -#define RANAP_ENHANCEDRELOCATIONINFORMATIONRESPONSEIES_RANAP_TARGETRNC_TOSOURCERNC_TRANSPARENTCONTAINER_PRESENT (1 << 0) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONRESPONSEIES_RANAP_RAB_SETUPLIST_ENHRELOCINFORES_PRESENT (1 << 1) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONRESPONSEIES_RANAP_RAB_FAILEDLIST_ENHRELOCINFORES_PRESENT (1 << 2) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 3) - -typedef struct RANAP_RANAP_EnhancedRelocationInformationResponseIEs_s { - uint16_t presenceMask; - RANAP_TargetRNC_ToSourceRNC_TransparentContainer_t target_ToSource_TransparentContainer; ///< Optional field - RANAP_RAB_SetupList_EnhRelocInfoRes_t raB_SetupList_EnhRelocInfoRes; ///< Optional field - RANAP_RAB_FailedList_EnhRelocInfoRes_t raB_FailedList_EnhRelocInfoRes; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_RANAP_EnhancedRelocationInformationResponseIEs_t; - -typedef struct RANAP_RAB_SetupItem_EnhancedRelocCompleteRes_IEs_s { - RANAP_RAB_SetupItem_EnhancedRelocCompleteRes_t raB_SetupItem_EnhancedRelocCompleteRes; -} RANAP_RAB_SetupItem_EnhancedRelocCompleteRes_IEs_t; - -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_IUSIGNALLINGCONNECTIONIDENTIFIER_PRESENT (1 << 0) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_GLOBALCN_ID_PRESENT (1 << 1) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_IUSIGNALLINGCONNECTIONIDENTIFIER_PRESENT (1 << 2) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_GLOBALCN_ID_PRESENT (1 << 3) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_RAB_SETUPLIST_ENHRELOCINFOREQ_PRESENT (1 << 4) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_SNA_ACCESS_INFORMATION_PRESENT (1 << 5) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_UESBI_IU_PRESENT (1 << 6) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_PLMNIDENTITY_PRESENT (1 << 7) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_CNMBMSLINKINGINFORMATION_PRESENT (1 << 8) - -typedef struct RANAP_RANAP_EnhancedRelocationInformationRequestIEs_s { - uint16_t presenceMask; - RANAP_SourceRNC_ToTargetRNC_TransparentContainer_t source_ToTarget_TransparentContainer; - RANAP_IuSignallingConnectionIdentifier_t oldIuSigConIdCS; ///< Optional field - RANAP_GlobalCN_ID_t globalCN_IDCS; ///< Optional field - RANAP_IuSignallingConnectionIdentifier_t oldIuSigConIdPS; ///< Optional field - RANAP_GlobalCN_ID_t globalCN_IDPS; ///< Optional field - RANAP_RAB_SetupList_EnhRelocInfoReq_t raB_SetupList_EnhRelocInfoReq; ///< Optional field - RANAP_SNA_Access_Information_t snA_Access_Information; ///< Optional field - RANAP_UESBI_Iu_t uesbI_Iu; ///< Optional field - RANAP_PLMNidentity_t selectedPLMN_ID; ///< Optional field - RANAP_CNMBMSLinkingInformation_t cnmbmsLinkingInformation; ///< Optional field -} RANAP_RANAP_EnhancedRelocationInformationRequestIEs_t; - -#define SECURITYMODECOMMANDIES_RANAP_ENCRYPTIONINFORMATION_PRESENT (1 << 0) - -typedef struct RANAP_SecurityModeCommandIEs_s { - uint16_t presenceMask; - RANAP_IntegrityProtectionInformation_t integrityProtectionInformation; - RANAP_EncryptionInformation_t encryptionInformation; ///< Optional field - RANAP_KeyStatus_t keyStatus; -} RANAP_SecurityModeCommandIEs_t; - -typedef struct RANAP_RelocationCancelIEs_s { - RANAP_Cause_t cause; -} RANAP_RelocationCancelIEs_t; - -typedef struct RANAP_RAB_SetupItem_RelocReqAck_IEs_s { - RANAP_RAB_SetupItem_RelocReqAck_t raB_SetupItem_RelocReqAck; -} RANAP_RAB_SetupItem_RelocReqAck_IEs_t; - -#define MBMSREGISTRATIONFAILUREIES_RANAP_TMGI_PRESENT (1 << 0) -#define MBMSREGISTRATIONFAILUREIES_RANAP_GLOBALCN_ID_PRESENT (1 << 1) -#define MBMSREGISTRATIONFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_MBMSRegistrationFailureIEs_s { - uint16_t presenceMask; - RANAP_TMGI_t tmgi; ///< Optional field - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSRegistrationFailureIEs_t; - -typedef struct RANAP_MBMSRABEstablishmentIndicationIEs_s { - RANAP_TransportLayerInformation_t transportLayerInformation; -} RANAP_MBMSRABEstablishmentIndicationIEs_t; - -#define MBMSSESSIONSTARTFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_MBMSSessionStartFailureIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSSessionStartFailureIEs_t; - -#define IU_RELEASECOMPLETEIES_RANAP_RAB_DATAVOLUMEREPORTLIST_PRESENT (1 << 0) -#define IU_RELEASECOMPLETEIES_RANAP_RAB_RELEASEDLIST_IURELCOMP_PRESENT (1 << 1) -#define IU_RELEASECOMPLETEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_Iu_ReleaseCompleteIEs_s { - uint16_t presenceMask; - RANAP_RAB_DataVolumeReportList_t raB_DataVolumeReportList; ///< Optional field - RANAP_RAB_ReleasedList_IuRelComp_t raB_ReleasedList_IuRelComp; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_Iu_ReleaseCompleteIEs_t; - -#define CN_DEACTIVATETRACEIES_RANAP_TRIGGERID_PRESENT (1 << 0) - -typedef struct RANAP_CN_DeactivateTraceIEs_s { - uint16_t presenceMask; - RANAP_TraceReference_t traceReference; - RANAP_TriggerID_t triggerID; ///< Optional field -} RANAP_CN_DeactivateTraceIEs_t; - -typedef struct RANAP_DataVolumeReportRequestIEs_s { - RANAP_RAB_DataVolumeReportRequestList_t raB_DataVolumeReportRequestList; -} RANAP_DataVolumeReportRequestIEs_t; - -typedef struct RANAP_RAB_RelocationReleaseItemIEs_s { - RANAP_RAB_RelocationReleaseItem_t raB_RelocationReleaseItem; -} RANAP_RAB_RelocationReleaseItemIEs_t; - -typedef struct RANAP_RAB_ModifyRequestIEs_s { - RANAP_RAB_ModifyList_t raB_ModifyList; -} RANAP_RAB_ModifyRequestIEs_t; - -#define SECURITYMODECOMPLETEIES_RANAP_CHOSENENCRYPTIONALGORITHM_PRESENT (1 << 0) -#define SECURITYMODECOMPLETEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 1) - -typedef struct RANAP_SecurityModeCompleteIEs_s { - uint16_t presenceMask; - RANAP_ChosenIntegrityProtectionAlgorithm_t chosenIntegrityProtectionAlgorithm; - RANAP_ChosenEncryptionAlgorithm_t chosenEncryptionAlgorithm; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_SecurityModeCompleteIEs_t; - -#define MBMSRABRELEASEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_MBMSRABReleaseIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSRABReleaseIEs_t; - -#define OVERLOADIES_RANAP_NUMBEROFSTEPS_PRESENT (1 << 0) -#define OVERLOADIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 1) - -typedef struct RANAP_OverloadIEs_s { - uint16_t presenceMask; - RANAP_NumberOfSteps_t numberOfSteps; ///< Optional field - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field -} RANAP_OverloadIEs_t; - -typedef struct RANAP_RAB_SetupItem_RelocReq_IEs_s { - RANAP_RAB_SetupItem_RelocReq_t raB_SetupItem_RelocReq; -} RANAP_RAB_SetupItem_RelocReq_IEs_t; - -typedef struct RANAP_RAB_ModifyItemIEs_s { - RANAP_RAB_ModifyItem_t raB_ModifyItem; -} RANAP_RAB_ModifyItemIEs_t; - -#define MBMSREGISTRATIONRESPONSEIES_RANAP_TMGI_PRESENT (1 << 0) -#define MBMSREGISTRATIONRESPONSEIES_RANAP_GLOBALCN_ID_PRESENT (1 << 1) -#define MBMSREGISTRATIONRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_MBMSRegistrationResponseIEs_s { - uint16_t presenceMask; - RANAP_TMGI_t tmgi; ///< Optional field - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSRegistrationResponseIEs_t; - -typedef struct RANAP_ForwardSRNS_ContextIEs_s { - RANAP_RAB_ContextList_t raB_ContextList; -} RANAP_ForwardSRNS_ContextIEs_t; - -#define UPLINKINFORMATIONEXCHANGEFAILUREIES_RANAP_GLOBALCN_ID_PRESENT (1 << 0) -#define UPLINKINFORMATIONEXCHANGEFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 1) - -typedef struct RANAP_UplinkInformationExchangeFailureIEs_s { - uint16_t presenceMask; - RANAP_InformationExchangeID_t informationExchangeID; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_UplinkInformationExchangeFailureIEs_t; - -typedef struct RANAP_RAB_SetupItem_EnhRelocInfoRes_IEs_s { - RANAP_RAB_SetupItem_EnhRelocInfoRes_t raB_SetupItem_EnhRelocInfoRes; -} RANAP_RAB_SetupItem_EnhRelocInfoRes_IEs_t; - -#define DATAVOLUMEREPORTIES_RANAP_RAB_DATAVOLUMEREPORTLIST_PRESENT (1 << 0) -#define DATAVOLUMEREPORTIES_RANAP_RABS_FAILED_TO_REPORTLIST_PRESENT (1 << 1) -#define DATAVOLUMEREPORTIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_DataVolumeReportIEs_s { - uint16_t presenceMask; - RANAP_RAB_DataVolumeReportList_t raB_DataVolumeReportList; ///< Optional field - RANAP_RABs_failed_to_reportList_t raB_FailedtoReportList; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_DataVolumeReportIEs_t; - -#define INFORMATIONTRANSFERINDICATIONIES_RANAP_GLOBALCN_ID_PRESENT (1 << 0) - -typedef struct RANAP_InformationTransferIndicationIEs_s { - uint16_t presenceMask; - RANAP_InformationTransferID_t informationTransferID; - RANAP_ProvidedData_t providedData; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field -} RANAP_InformationTransferIndicationIEs_t; - -typedef struct RANAP_RAB_FailedItem_EnhRelocInfoRes_IEs_s { - RANAP_RAB_FailedItem_EnhRelocInfoRes_t raB_FailedItem_EnhRelocInfoRes; -} RANAP_RAB_FailedItem_EnhRelocInfoRes_IEs_t; - -#define INFORMATIONTRANSFERFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_InformationTransferFailureIEs_s { - uint16_t presenceMask; - RANAP_InformationTransferID_t informationTransferID; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field - RANAP_GlobalRNC_ID_t globalRNC_ID; -} RANAP_InformationTransferFailureIEs_t; - -typedef struct RANAP_CommonID_IEs_s { - RANAP_PermanentNAS_UE_ID_t permanentNAS_UE_ID; -} RANAP_CommonID_IEs_t; - -#define MBMSUELINKINGREQUESTIES_RANAP_JOINEDMBMSBEARERSERVICE_IES_PRESENT (1 << 0) -#define MBMSUELINKINGREQUESTIES_RANAP_LEFTMBMSBEARERSERVICE_IES_PRESENT (1 << 1) - -typedef struct RANAP_MBMSUELinkingRequestIEs_s { - uint16_t presenceMask; - RANAP_JoinedMBMSBearerService_IEs_t joinedMBMSBearerServicesList; ///< Optional field - RANAP_LeftMBMSBearerService_IEs_t leftMBMSBearerServicesList; ///< Optional field -} RANAP_MBMSUELinkingRequestIEs_t; - -#define ERRORINDICATIONIES_RANAP_CAUSE_PRESENT (1 << 0) -#define ERRORINDICATIONIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 1) -#define ERRORINDICATIONIES_RANAP_CN_DOMAININDICATOR_PRESENT (1 << 2) -#define ERRORINDICATIONIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 3) - -typedef struct RANAP_ErrorIndicationIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field - RANAP_CN_DomainIndicator_t cN_DomainIndicator; ///< Optional field - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field -} RANAP_ErrorIndicationIEs_t; - -#define REDIRECTIONINDICATION_IES_RANAP_NAS_SEQUENCENUMBER_PRESENT (1 << 0) -#define REDIRECTIONINDICATION_IES_RANAP_PERMANENTNAS_UE_ID_PRESENT (1 << 1) - -typedef struct RANAP_RedirectionIndication_IEs_s { - uint16_t presenceMask; - RANAP_NAS_PDU_t nas_pdu; - RANAP_RejectCauseValue_t rejectCauseValue; - RANAP_NAS_SequenceNumber_t naS_SequenceNumber; ///< Optional field - RANAP_PermanentNAS_UE_ID_t permanentNAS_UE_ID; ///< Optional field -} RANAP_RedirectionIndication_IEs_t; - -typedef struct RANAP_RAB_DataForwardingItemIEs_s { - RANAP_RAB_DataForwardingItem_t raB_DataForwardingItem; -} RANAP_RAB_DataForwardingItemIEs_t; - -typedef struct RANAP_RAB_SetupItem_EnhRelocInfoReq_IEs_s { - RANAP_RAB_SetupItem_EnhRelocInfoReq_t raB_SetupItem_EnhRelocInfoReq; -} RANAP_RAB_SetupItem_EnhRelocInfoReq_IEs_t; - -#define MBMSRABRELEASEFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_MBMSRABReleaseFailureIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSRABReleaseFailureIEs_t; - -typedef struct RANAP_RAB_DataVolumeReportItemIEs_s { - RANAP_RAB_DataVolumeReportItem_t raB_DataVolumeReportItem; -} RANAP_RAB_DataVolumeReportItemIEs_t; - -#define DIRECTINFORMATIONTRANSFERIES_RANAP_INTERSYSTEMINFORMATIONTRANSFERTYPE_PRESENT (1 << 0) -#define DIRECTINFORMATIONTRANSFERIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 1) -#define DIRECTINFORMATIONTRANSFERIES_RANAP_GLOBALCN_ID_PRESENT (1 << 2) - -typedef struct RANAP_DirectInformationTransferIEs_s { - uint16_t presenceMask; - RANAP_InterSystemInformationTransferType_t interSystemInformationTransferType; ///< Optional field - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field -} RANAP_DirectInformationTransferIEs_t; - -#define RELOCATIONCOMMANDIES_RANAP_L3_INFORMATION_PRESENT (1 << 0) -#define RELOCATIONCOMMANDIES_RANAP_RAB_RELOCATIONRELEASELIST_PRESENT (1 << 1) -#define RELOCATIONCOMMANDIES_RANAP_RAB_DATAFORWARDINGLIST_PRESENT (1 << 2) -#define RELOCATIONCOMMANDIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 3) - -typedef struct RANAP_RelocationCommandIEs_s { - uint16_t presenceMask; - RANAP_L3_Information_t l3_Information; ///< Optional field - RANAP_RAB_RelocationReleaseList_t raB_RelocationReleaseList; ///< Optional field - RANAP_RAB_DataForwardingList_t raB_DataForwardingList; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_RelocationCommandIEs_t; - -#define UPLINKINFORMATIONEXCHANGERESPONSEIES_RANAP_INFORMATIONREQUESTED_PRESENT (1 << 0) -#define UPLINKINFORMATIONEXCHANGERESPONSEIES_RANAP_GLOBALCN_ID_PRESENT (1 << 1) -#define UPLINKINFORMATIONEXCHANGERESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_UplinkInformationExchangeResponseIEs_s { - uint16_t presenceMask; - RANAP_InformationExchangeID_t informationExchangeID; - RANAP_InformationRequested_t informationRequested; ///< Optional field - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_UplinkInformationExchangeResponseIEs_t; - -typedef struct RANAP_MBMSRABReleaseRequestIEs_s { - RANAP_Cause_t cause; -} RANAP_MBMSRABReleaseRequestIEs_t; - -#define RAB_ASSIGNMENTREQUESTIES_RANAP_RAB_SETUPORMODIFYLIST_PRESENT (1 << 0) -#define RAB_ASSIGNMENTREQUESTIES_RANAP_RAB_RELEASELIST_PRESENT (1 << 1) - -typedef struct RANAP_RAB_AssignmentRequestIEs_s { - uint16_t presenceMask; - RANAP_RAB_SetupOrModifyList_t raB_SetupOrModifyList; ///< Optional field - RANAP_RAB_ReleaseList_t raB_ReleaseList; ///< Optional field -} RANAP_RAB_AssignmentRequestIEs_t; - -typedef struct RANAP_RAB_ReleasedItem_IuRelComp_IEs_s { - RANAP_RAB_ReleasedItem_IuRelComp_t raB_ReleasedItem_IuRelComp; -} RANAP_RAB_ReleasedItem_IuRelComp_IEs_t; - -#define ENHANCEDRELOCATIONCOMPLETERESPONSEIES_RANAP_RAB_SETUPLIST_ENHANCEDRELOCCOMPLETERES_PRESENT (1 << 0) -#define ENHANCEDRELOCATIONCOMPLETERESPONSEIES_RANAP_RAB_TOBERELEASEDLIST_ENHANCEDRELOCCOMPLETERES_PRESENT (1 << 1) -#define ENHANCEDRELOCATIONCOMPLETERESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_EnhancedRelocationCompleteResponseIEs_s { - uint16_t presenceMask; - RANAP_RAB_SetupList_EnhancedRelocCompleteRes_t raB_SetupList_EnhancedRelocCompleteRes; ///< Optional field - RANAP_RAB_ToBeReleasedList_EnhancedRelocCompleteRes_t raB_ToBeReleasedList_EnhancedRelocCompleteRes; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_EnhancedRelocationCompleteResponseIEs_t; - -#define LOCATIONREPORTIES_RANAP_AREAIDENTITY_PRESENT (1 << 0) -#define LOCATIONREPORTIES_RANAP_CAUSE_PRESENT (1 << 1) -#define LOCATIONREPORTIES_RANAP_REQUESTTYPE_PRESENT (1 << 2) - -typedef struct RANAP_LocationReportIEs_s { - uint16_t presenceMask; - RANAP_AreaIdentity_t areaIdentity; ///< Optional field - RANAP_Cause_t cause; ///< Optional field - RANAP_RequestType_t requestType; ///< Optional field -} RANAP_LocationReportIEs_t; - -typedef struct RANAP_RAB_SetupItem_EnhancedRelocCompleteReq_IEs_s { - RANAP_RAB_SetupItem_EnhancedRelocCompleteReq_t raB_SetupItem_EnhancedRelocCompleteReq; -} RANAP_RAB_SetupItem_EnhancedRelocCompleteReq_IEs_t; - -#define RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_SETUPORMODIFIEDLIST_PRESENT (1 << 0) -#define RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_RELEASEDLIST_PRESENT (1 << 1) -#define RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_QUEUEDLIST_PRESENT (1 << 2) -#define RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_FAILEDLIST_PRESENT (1 << 3) -#define RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_RELEASEFAILEDLIST_PRESENT (1 << 4) -#define RAB_ASSIGNMENTRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 5) - -typedef struct RANAP_RAB_AssignmentResponseIEs_s { - uint16_t presenceMask; - RANAP_RAB_SetupOrModifiedList_t raB_SetupOrModifiedList; ///< Optional field - RANAP_RAB_ReleasedList_t raB_ReleasedList; ///< Optional field - RANAP_RAB_QueuedList_t raB_QueuedList; ///< Optional field - RANAP_RAB_FailedList_t raB_FailedList; ///< Optional field - RANAP_RAB_ReleaseFailedList_t raB_ReleaseFailedList; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_RAB_AssignmentResponseIEs_t; - -typedef struct RANAP_RAB_ContextItemIEs_s { - RANAP_RAB_ContextItem_t raB_ContextItem; -} RANAP_RAB_ContextItemIEs_t; - -#define MBMSSESSIONUPDATERESPONSEIES_RANAP_TRANSPORTLAYERINFORMATION_PRESENT (1 << 0) -#define MBMSSESSIONUPDATERESPONSEIES_RANAP_CAUSE_PRESENT (1 << 1) -#define MBMSSESSIONUPDATERESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_MBMSSessionUpdateResponseIEs_s { - uint16_t presenceMask; - RANAP_SessionUpdateID_t sessionUpdateID; - RANAP_TransportLayerInformation_t transportLayerInformation; ///< Optional field - RANAP_Cause_t cause; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSSessionUpdateResponseIEs_t; - -typedef struct RANAP_UeRadioCapabilityMatchResponseIEs_s { - RANAP_VoiceSupportMatchIndicator_t voiceSupportMatchIndicator; -} RANAP_UeRadioCapabilityMatchResponseIEs_t; - -typedef struct RANAP_RAB_ReleaseRequestIEs_s { - RANAP_RAB_ReleaseList_t raB_ReleaseList; -} RANAP_RAB_ReleaseRequestIEs_t; - -#define ENHANCEDRELOCATIONCOMPLETECONFIRMIES_RANAP_RAB_FAILEDLIST_PRESENT (1 << 0) - -typedef struct RANAP_EnhancedRelocationCompleteConfirmIEs_s { - uint16_t presenceMask; - RANAP_RAB_FailedList_t raB_FailedList; ///< Optional field -} RANAP_EnhancedRelocationCompleteConfirmIEs_t; - -typedef struct RANAP_MBMSSessionUpdateIEs_s { - RANAP_SessionUpdateID_t sessionUpdateID; - RANAP_DeltaRAListofIdleModeUEs_t deltaRAListofIdleModeUEs; -} RANAP_MBMSSessionUpdateIEs_t; - -#define MBMSSESSIONSTARTIES_RANAP_MBMSSESSIONIDENTITY_PRESENT (1 << 0) -#define MBMSSESSIONSTARTIES_RANAP_PDP_TYPEINFORMATION_PRESENT (1 << 1) -#define MBMSSESSIONSTARTIES_RANAP_FREQUENCELAYERCONVERGENCEFLAG_PRESENT (1 << 2) -#define MBMSSESSIONSTARTIES_RANAP_RALISTOFIDLEMODEUES_PRESENT (1 << 3) -#define MBMSSESSIONSTARTIES_RANAP_GLOBALCN_ID_PRESENT (1 << 4) -#define MBMSSESSIONSTARTIES_RANAP_MBMSSESSIONREPETITIONNUMBER_PRESENT (1 << 5) - -typedef struct RANAP_MBMSSessionStartIEs_s { - uint16_t presenceMask; - RANAP_TMGI_t tmgi; - RANAP_MBMSSessionIdentity_t mbmsSessionIdentity; ///< Optional field - RANAP_MBMSBearerServiceType_t mbmsBearerServiceType; - RANAP_IuSignallingConnectionIdentifier_t iuSigConId; - RANAP_RAB_Parameters_t raB_Parameters; - RANAP_PDP_TypeInformation_t pdP_TypeInformation; ///< Optional field - RANAP_MBMSSessionDuration_t mbmsSessionDuration; - RANAP_MBMSServiceArea_t mbmsServiceArea; - RANAP_FrequenceLayerConvergenceFlag_t frequenceLayerConvergenceFlag; ///< Optional field - RANAP_RAListofIdleModeUEs_t raListofIdleModeUEs; ///< Optional field - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field - RANAP_MBMSSessionRepetitionNumber_t mbmsSessionRepetitionNumber; ///< Optional field - RANAP_TimeToMBMSDataTransfer_t timeToMBMSDataTransfer; -} RANAP_MBMSSessionStartIEs_t; - -#define LOCATIONRELATEDDATARESPONSEIES_RANAP_BROADCASTASSISTANCEDATADECIPHERINGKEYS_PRESENT (1 << 0) - -typedef struct RANAP_LocationRelatedDataResponseIEs_s { - uint16_t presenceMask; - RANAP_BroadcastAssistanceDataDecipheringKeys_t broadcastAssistanceDataDecipheringKeys; ///< Optional field -} RANAP_LocationRelatedDataResponseIEs_t; - -typedef struct RANAP_RAB_SetupOrModifiedItemIEs_s { - RANAP_RAB_SetupOrModifiedItem_t raB_SetupOrModifiedItem; -} RANAP_RAB_SetupOrModifiedItemIEs_t; - -typedef struct ranap_message_s { - uint8_t procedureCode; - uint8_t criticality; - uint8_t direction; - union { - RANAP_CN_DeactivateTraceIEs_t cN_DeactivateTraceIEs; - RANAP_CN_InvokeTraceIEs_t cN_InvokeTraceIEs; - RANAP_CommonID_IEs_t commonID_IEs; - RANAP_DataVolumeReportIEs_t dataVolumeReportIEs; - RANAP_DataVolumeReportRequestIEs_t dataVolumeReportRequestIEs; - RANAP_DirectInformationTransferIEs_t directInformationTransferIEs; - RANAP_DirectTransferIEs_t directTransferIEs; - RANAP_EnhancedRelocationCompleteConfirmIEs_t enhancedRelocationCompleteConfirmIEs; - RANAP_EnhancedRelocationCompleteFailureIEs_t enhancedRelocationCompleteFailureIEs; - RANAP_EnhancedRelocationCompleteRequestIEs_t enhancedRelocationCompleteRequestIEs; - RANAP_EnhancedRelocationCompleteResponseIEs_t enhancedRelocationCompleteResponseIEs; - RANAP_ErrorIndicationIEs_t errorIndicationIEs; - RANAP_ForwardSRNS_ContextIEs_t forwardSRNS_ContextIEs; - RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs_t geraN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs; - RANAP_InformationTransferConfirmationIEs_t informationTransferConfirmationIEs; - RANAP_InformationTransferFailureIEs_t informationTransferFailureIEs; - RANAP_InformationTransferIndicationIEs_t informationTransferIndicationIEs; - RANAP_InitialUE_MessageIEs_t initialUE_MessageIEs; - RANAP_Iu_ReleaseCommandIEs_t iu_ReleaseCommandIEs; - RANAP_Iu_ReleaseCompleteIEs_t iu_ReleaseCompleteIEs; - RANAP_Iu_ReleaseRequestIEs_t iu_ReleaseRequestIEs; - RANAP_LocationRelatedDataFailureIEs_t locationRelatedDataFailureIEs; - RANAP_LocationRelatedDataRequestIEs_t locationRelatedDataRequestIEs; - RANAP_LocationRelatedDataResponseIEs_t locationRelatedDataResponseIEs; - RANAP_LocationReportIEs_t locationReportIEs; - RANAP_LocationReportingControlIEs_t locationReportingControlIEs; - RANAP_MBMSCNDe_RegistrationRequestIEs_t mbmscnDe_RegistrationRequestIEs; - RANAP_MBMSCNDe_RegistrationResponseIEs_t mbmscnDe_RegistrationResponseIEs; - RANAP_MBMSRABEstablishmentIndicationIEs_t mbmsrabEstablishmentIndicationIEs; - RANAP_MBMSRABReleaseFailureIEs_t mbmsrabReleaseFailureIEs; - RANAP_MBMSRABReleaseIEs_t mbmsrabReleaseIEs; - RANAP_MBMSRABReleaseRequestIEs_t mbmsrabReleaseRequestIEs; - RANAP_MBMSRegistrationFailureIEs_t mbmsRegistrationFailureIEs; - RANAP_MBMSRegistrationRequestIEs_t mbmsRegistrationRequestIEs; - RANAP_MBMSRegistrationResponseIEs_t mbmsRegistrationResponseIEs; - RANAP_MBMSSessionStartFailureIEs_t mbmsSessionStartFailureIEs; - RANAP_MBMSSessionStartIEs_t mbmsSessionStartIEs; - RANAP_MBMSSessionStartResponseIEs_t mbmsSessionStartResponseIEs; - RANAP_MBMSSessionStopIEs_t mbmsSessionStopIEs; - RANAP_MBMSSessionStopResponseIEs_t mbmsSessionStopResponseIEs; - RANAP_MBMSSessionUpdateFailureIEs_t mbmsSessionUpdateFailureIEs; - RANAP_MBMSSessionUpdateIEs_t mbmsSessionUpdateIEs; - RANAP_MBMSSessionUpdateResponseIEs_t mbmsSessionUpdateResponseIEs; - RANAP_MBMSUELinkingRequestIEs_t mbmsueLinkingRequestIEs; - RANAP_MBMSUELinkingResponseIEs_t mbmsueLinkingResponseIEs; - RANAP_OverloadIEs_t overloadIEs; - RANAP_PagingIEs_t pagingIEs; - RANAP_RAB_AssignmentRequestIEs_t raB_AssignmentRequestIEs; - RANAP_RAB_AssignmentResponseIEs_t raB_AssignmentResponseIEs; - RANAP_RAB_ContextItemIEs_t raB_ContextItemIEs; - RANAP_RAB_ContextItemIEs_RANAP_RelocInf_t raB_ContextItemIEs_RANAP_RelocInf; - RANAP_RAB_DataForwardingItem_SRNS_CtxReq_IEs_t raB_DataForwardingItem_SRNS_CtxReq_IEs; - RANAP_RAB_DataForwardingItemIEs_t raB_DataForwardingItemIEs; - RANAP_RAB_DataVolumeReportItemIEs_t raB_DataVolumeReportItemIEs; - RANAP_RAB_DataVolumeReportRequestItemIEs_t raB_DataVolumeReportRequestItemIEs; - RANAP_RAB_FailedItem_EnhRelocInfoRes_IEs_t raB_FailedItem_EnhRelocInfoRes_IEs; - RANAP_RAB_FailedItemIEs_t raB_FailedItemIEs; - RANAP_RAB_ModifyItemIEs_t raB_ModifyItemIEs; - RANAP_RAB_ModifyRequestIEs_t raB_ModifyRequestIEs; - RANAP_RAB_QueuedItemIEs_t raB_QueuedItemIEs; - RANAP_RAB_ReleaseItemIEs_t raB_ReleaseItemIEs; - RANAP_RAB_ReleaseRequestIEs_t raB_ReleaseRequestIEs; - RANAP_RAB_ReleasedItem_IuRelComp_IEs_t raB_ReleasedItem_IuRelComp_IEs; - RANAP_RAB_ReleasedItemIEs_t raB_ReleasedItemIEs; - RANAP_RAB_RelocationReleaseItemIEs_t raB_RelocationReleaseItemIEs; - RANAP_RAB_SetupItem_EnhRelocInfoReq_IEs_t raB_SetupItem_EnhRelocInfoReq_IEs; - RANAP_RAB_SetupItem_EnhRelocInfoRes_IEs_t raB_SetupItem_EnhRelocInfoRes_IEs; - RANAP_RAB_SetupItem_EnhancedRelocCompleteReq_IEs_t raB_SetupItem_EnhancedRelocCompleteReq_IEs; - RANAP_RAB_SetupItem_EnhancedRelocCompleteRes_IEs_t raB_SetupItem_EnhancedRelocCompleteRes_IEs; - RANAP_RAB_SetupItem_RelocReq_IEs_t raB_SetupItem_RelocReq_IEs; - RANAP_RAB_SetupItem_RelocReqAck_IEs_t raB_SetupItem_RelocReqAck_IEs; - RANAP_RAB_SetupOrModifiedItemIEs_t raB_SetupOrModifiedItemIEs; - RANAP_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs_t raB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs; - RANAP_RABs_ContextFailedtoTransferItemIEs_t raBs_ContextFailedtoTransferItemIEs; - RANAP_RABs_failed_to_reportItemIEs_t raBs_failed_to_reportItemIEs; - RANAP_RANAP_EnhancedRelocationInformationRequestIEs_t ranaP_EnhancedRelocationInformationRequestIEs; - RANAP_RANAP_EnhancedRelocationInformationResponseIEs_t ranaP_EnhancedRelocationInformationResponseIEs; - RANAP_RANAP_RelocationInformationIEs_t ranaP_RelocationInformationIEs; - RANAP_RedirectionIndication_IEs_t redirectionIndication_IEs; - RANAP_RelocationCancelAcknowledgeIEs_t relocationCancelAcknowledgeIEs; - RANAP_RelocationCancelIEs_t relocationCancelIEs; - RANAP_RelocationCommandIEs_t relocationCommandIEs; - RANAP_RelocationFailureIEs_t relocationFailureIEs; - RANAP_RelocationPreparationFailureIEs_t relocationPreparationFailureIEs; - RANAP_RelocationRequestAcknowledgeIEs_t relocationRequestAcknowledgeIEs; - RANAP_RelocationRequestIEs_t relocationRequestIEs; - RANAP_RelocationRequiredIEs_t relocationRequiredIEs; - RANAP_ResetAcknowledgeIEs_t resetAcknowledgeIEs; - RANAP_ResetIEs_t resetIEs; - RANAP_ResetResourceAckItemIEs_t resetResourceAckItemIEs; - RANAP_ResetResourceAcknowledgeIEs_t resetResourceAcknowledgeIEs; - RANAP_ResetResourceIEs_t resetResourceIEs; - RANAP_ResetResourceItemIEs_t resetResourceItemIEs; - RANAP_SRNS_ContextRequestIEs_t srnS_ContextRequestIEs; - RANAP_SRNS_ContextResponseIEs_t srnS_ContextResponseIEs; - RANAP_SRNS_DataForwardCommandIEs_t srnS_DataForwardCommandIEs; - RANAP_SRVCC_CSKeysResponseIEs_t srvcC_CSKeysResponseIEs; - RANAP_SecurityModeCommandIEs_t securityModeCommandIEs; - RANAP_SecurityModeCompleteIEs_t securityModeCompleteIEs; - RANAP_SecurityModeRejectIEs_t securityModeRejectIEs; - RANAP_UESpecificInformationIndicationIEs_t ueSpecificInformationIndicationIEs; - RANAP_UeRadioCapabilityMatchResponseIEs_t ueRadioCapabilityMatchResponseIEs; - RANAP_UplinkInformationExchangeFailureIEs_t uplinkInformationExchangeFailureIEs; - RANAP_UplinkInformationExchangeRequestIEs_t uplinkInformationExchangeRequestIEs; - RANAP_UplinkInformationExchangeResponseIEs_t uplinkInformationExchangeResponseIEs; - } msg; -} ranap_message; - -/** \brief Decode function for RAB-ReleasedItemIEs ies. - * \param raB_ReleasedItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_releaseditemies( - RANAP_RAB_ReleasedItemIEs_t *raB_ReleasedItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ReleasedItemIEs ies. - * \param ranaP_RAB_ReleasedList Pointer to the ASN1 structure. - * \param raB_ReleasedItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_releaseditemies( - RANAP_RAB_ReleasedList_t *ranaP_RAB_ReleasedList, - RANAP_RAB_ReleasedItemIEs_t *raB_ReleasedItemIEs); - -/** \brief Decode function for Iu-ReleaseRequestIEs ies. - * \param iu_ReleaseRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_iu_releaserequesties( - RANAP_Iu_ReleaseRequestIEs_t *iu_ReleaseRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for Iu-ReleaseRequestIEs ies. - * \param ranaP_Iu_ReleaseRequest Pointer to the ASN1 structure. - * \param iu_ReleaseRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_iu_releaserequesties( - RANAP_Iu_ReleaseRequest_t *ranaP_Iu_ReleaseRequest, - RANAP_Iu_ReleaseRequestIEs_t *iu_ReleaseRequestIEs); - -/** \brief Decode function for UESpecificInformationIndicationIEs ies. - * \param ueSpecificInformationIndicationIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_uespecificinformationindicationies( - RANAP_UESpecificInformationIndicationIEs_t *ueSpecificInformationIndicationIEs, - ANY_t *any_p); - -/** \brief Encode function for UESpecificInformationIndicationIEs ies. - * \param ranaP_UESpecificInformationIndication Pointer to the ASN1 structure. - * \param ueSpecificInformationIndicationIEs Pointer to the IES structure. - **/ -int ranap_encode_uespecificinformationindicationies( - RANAP_UESpecificInformationIndication_t *ranaP_UESpecificInformationIndication, - RANAP_UESpecificInformationIndicationIEs_t *ueSpecificInformationIndicationIEs); - -/** \brief Decode function for EnhancedRelocationCompleteFailureIEs ies. - * \param enhancedRelocationCompleteFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_enhancedrelocationcompletefailureies( - RANAP_EnhancedRelocationCompleteFailureIEs_t *enhancedRelocationCompleteFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for EnhancedRelocationCompleteFailureIEs ies. - * \param ranaP_EnhancedRelocationCompleteFailure Pointer to the ASN1 structure. - * \param enhancedRelocationCompleteFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_enhancedrelocationcompletefailureies( - RANAP_EnhancedRelocationCompleteFailure_t *ranaP_EnhancedRelocationCompleteFailure, - RANAP_EnhancedRelocationCompleteFailureIEs_t *enhancedRelocationCompleteFailureIEs); - -/** \brief Decode function for MBMSCNDe-RegistrationResponseIEs ies. - * \param mbmscnDe_RegistrationResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmscnde_registrationresponseies( - RANAP_MBMSCNDe_RegistrationResponseIEs_t *mbmscnDe_RegistrationResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSCNDe-RegistrationResponseIEs ies. - * \param ranaP_MBMSCNDe_RegistrationResponse Pointer to the ASN1 structure. - * \param mbmscnDe_RegistrationResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmscnde_registrationresponseies( - RANAP_MBMSCNDe_RegistrationResponse_t *ranaP_MBMSCNDe_RegistrationResponse, - RANAP_MBMSCNDe_RegistrationResponseIEs_t *mbmscnDe_RegistrationResponseIEs); - -/** \brief Decode function for SecurityModeRejectIEs ies. - * \param securityModeRejectIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_securitymoderejecties( - RANAP_SecurityModeRejectIEs_t *securityModeRejectIEs, - ANY_t *any_p); - -/** \brief Encode function for SecurityModeRejectIEs ies. - * \param ranaP_SecurityModeReject Pointer to the ASN1 structure. - * \param securityModeRejectIEs Pointer to the IES structure. - **/ -int ranap_encode_securitymoderejecties( - RANAP_SecurityModeReject_t *ranaP_SecurityModeReject, - RANAP_SecurityModeRejectIEs_t *securityModeRejectIEs); - -/** \brief Decode function for RANAP-RelocationInformationIEs ies. - * \param ranaP_RelocationInformationIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_ranap_relocationinformationies( - RANAP_RANAP_RelocationInformationIEs_t *ranaP_RelocationInformationIEs, - ANY_t *any_p); - -/** \brief Encode function for RANAP-RelocationInformationIEs ies. - * \param ranaP_RANAP_RelocationInformation Pointer to the ASN1 structure. - * \param ranaP_RelocationInformationIEs Pointer to the IES structure. - **/ -int ranap_encode_ranap_relocationinformationies( - RANAP_RANAP_RelocationInformation_t *ranaP_RANAP_RelocationInformation, - RANAP_RANAP_RelocationInformationIEs_t *ranaP_RelocationInformationIEs); - -/** \brief Decode function for ResetAcknowledgeIEs ies. - * \param resetAcknowledgeIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_resetacknowledgeies( - RANAP_ResetAcknowledgeIEs_t *resetAcknowledgeIEs, - ANY_t *any_p); - -/** \brief Encode function for ResetAcknowledgeIEs ies. - * \param ranaP_ResetAcknowledge Pointer to the ASN1 structure. - * \param resetAcknowledgeIEs Pointer to the IES structure. - **/ -int ranap_encode_resetacknowledgeies( - RANAP_ResetAcknowledge_t *ranaP_ResetAcknowledge, - RANAP_ResetAcknowledgeIEs_t *resetAcknowledgeIEs); - -/** \brief Decode function for RelocationCancelAcknowledgeIEs ies. - * \param relocationCancelAcknowledgeIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationcancelacknowledgeies( - RANAP_RelocationCancelAcknowledgeIEs_t *relocationCancelAcknowledgeIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationCancelAcknowledgeIEs ies. - * \param ranaP_RelocationCancelAcknowledge Pointer to the ASN1 structure. - * \param relocationCancelAcknowledgeIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationcancelacknowledgeies( - RANAP_RelocationCancelAcknowledge_t *ranaP_RelocationCancelAcknowledge, - RANAP_RelocationCancelAcknowledgeIEs_t *relocationCancelAcknowledgeIEs); - -/** \brief Decode function for SRVCC-CSKeysResponseIEs ies. - * \param srvcC_CSKeysResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_srvcc_cskeysresponseies( - RANAP_SRVCC_CSKeysResponseIEs_t *srvcC_CSKeysResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for SRVCC-CSKeysResponseIEs ies. - * \param ranaP_SRVCC_CSKeysResponse Pointer to the ASN1 structure. - * \param srvcC_CSKeysResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_srvcc_cskeysresponseies( - RANAP_SRVCC_CSKeysResponse_t *ranaP_SRVCC_CSKeysResponse, - RANAP_SRVCC_CSKeysResponseIEs_t *srvcC_CSKeysResponseIEs); - -/** \brief Decode function for MBMSCNDe-RegistrationRequestIEs ies. - * \param mbmscnDe_RegistrationRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmscnde_registrationrequesties( - RANAP_MBMSCNDe_RegistrationRequestIEs_t *mbmscnDe_RegistrationRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSCNDe-RegistrationRequestIEs ies. - * \param ranaP_MBMSCNDe_RegistrationRequest Pointer to the ASN1 structure. - * \param mbmscnDe_RegistrationRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmscnde_registrationrequesties( - RANAP_MBMSCNDe_RegistrationRequest_t *ranaP_MBMSCNDe_RegistrationRequest, - RANAP_MBMSCNDe_RegistrationRequestIEs_t *mbmscnDe_RegistrationRequestIEs); - -/** \brief Decode function for PagingIEs ies. - * \param pagingIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_pagingies( - RANAP_PagingIEs_t *pagingIEs, - ANY_t *any_p); - -/** \brief Encode function for PagingIEs ies. - * \param ranaP_Paging Pointer to the ASN1 structure. - * \param pagingIEs Pointer to the IES structure. - **/ -int ranap_encode_pagingies( - RANAP_Paging_t *ranaP_Paging, - RANAP_PagingIEs_t *pagingIEs); - -/** \brief Decode function for GERAN-Iumode-RAB-Failed-RABAssgntResponse-ItemIEs ies. - * \param geraN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_geran_iumode_rab_failed_rabassgntresponse_itemies( - RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs_t *geraN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs, - ANY_t *any_p); - -/** \brief Encode function for GERAN-Iumode-RAB-Failed-RABAssgntResponse-ItemIEs ies. - * \param ranaP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_List Pointer to the ASN1 structure. - * \param geraN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs Pointer to the IES structure. - **/ -int ranap_encode_geran_iumode_rab_failed_rabassgntresponse_itemies( - RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_List_t *ranaP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_List, - RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs_t *geraN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs); - -/** \brief Decode function for ResetResourceItemIEs ies. - * \param resetResourceItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_resetresourceitemies( - RANAP_ResetResourceItemIEs_t *resetResourceItemIEs, - ANY_t *any_p); - -/** \brief Encode function for ResetResourceItemIEs ies. - * \param ranaP_ResetResourceList Pointer to the ASN1 structure. - * \param resetResourceItemIEs Pointer to the IES structure. - **/ -int ranap_encode_resetresourceitemies( - RANAP_ResetResourceList_t *ranaP_ResetResourceList, - RANAP_ResetResourceItemIEs_t *resetResourceItemIEs); - -/** \brief Decode function for LocationReportingControlIEs ies. - * \param locationReportingControlIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_locationreportingcontrolies( - RANAP_LocationReportingControlIEs_t *locationReportingControlIEs, - ANY_t *any_p); - -/** \brief Encode function for LocationReportingControlIEs ies. - * \param ranaP_LocationReportingControl Pointer to the ASN1 structure. - * \param locationReportingControlIEs Pointer to the IES structure. - **/ -int ranap_encode_locationreportingcontrolies( - RANAP_LocationReportingControl_t *ranaP_LocationReportingControl, - RANAP_LocationReportingControlIEs_t *locationReportingControlIEs); - -/** \brief Decode function for EnhancedRelocationCompleteRequestIEs ies. - * \param enhancedRelocationCompleteRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_enhancedrelocationcompleterequesties( - RANAP_EnhancedRelocationCompleteRequestIEs_t *enhancedRelocationCompleteRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for EnhancedRelocationCompleteRequestIEs ies. - * \param ranaP_EnhancedRelocationCompleteRequest Pointer to the ASN1 structure. - * \param enhancedRelocationCompleteRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_enhancedrelocationcompleterequesties( - RANAP_EnhancedRelocationCompleteRequest_t *ranaP_EnhancedRelocationCompleteRequest, - RANAP_EnhancedRelocationCompleteRequestIEs_t *enhancedRelocationCompleteRequestIEs); - -/** \brief Decode function for RAB-FailedItemIEs ies. - * \param raB_FailedItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_faileditemies( - RANAP_RAB_FailedItemIEs_t *raB_FailedItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-FailedItemIEs ies. - * \param ranaP_RAB_FailedList Pointer to the ASN1 structure. - * \param raB_FailedItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_faileditemies( - RANAP_RAB_FailedList_t *ranaP_RAB_FailedList, - RANAP_RAB_FailedItemIEs_t *raB_FailedItemIEs); - -/** \brief Decode function for MBMSUELinkingResponseIEs ies. - * \param mbmsueLinkingResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsuelinkingresponseies( - RANAP_MBMSUELinkingResponseIEs_t *mbmsueLinkingResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSUELinkingResponseIEs ies. - * \param ranaP_MBMSUELinkingResponse Pointer to the ASN1 structure. - * \param mbmsueLinkingResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsuelinkingresponseies( - RANAP_MBMSUELinkingResponse_t *ranaP_MBMSUELinkingResponse, - RANAP_MBMSUELinkingResponseIEs_t *mbmsueLinkingResponseIEs); - -/** \brief Decode function for RAB-QueuedItemIEs ies. - * \param raB_QueuedItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_queueditemies( - RANAP_RAB_QueuedItemIEs_t *raB_QueuedItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-QueuedItemIEs ies. - * \param ranaP_RAB_QueuedList Pointer to the ASN1 structure. - * \param raB_QueuedItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_queueditemies( - RANAP_RAB_QueuedList_t *ranaP_RAB_QueuedList, - RANAP_RAB_QueuedItemIEs_t *raB_QueuedItemIEs); - -/** \brief Decode function for CN-InvokeTraceIEs ies. - * \param cN_InvokeTraceIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_cn_invoketraceies( - RANAP_CN_InvokeTraceIEs_t *cN_InvokeTraceIEs, - ANY_t *any_p); - -/** \brief Encode function for CN-InvokeTraceIEs ies. - * \param ranaP_CN_InvokeTrace Pointer to the ASN1 structure. - * \param cN_InvokeTraceIEs Pointer to the IES structure. - **/ -int ranap_encode_cn_invoketraceies( - RANAP_CN_InvokeTrace_t *ranaP_CN_InvokeTrace, - RANAP_CN_InvokeTraceIEs_t *cN_InvokeTraceIEs); - -/** \brief Decode function for Iu-ReleaseCommandIEs ies. - * \param iu_ReleaseCommandIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_iu_releasecommandies( - RANAP_Iu_ReleaseCommandIEs_t *iu_ReleaseCommandIEs, - ANY_t *any_p); - -/** \brief Encode function for Iu-ReleaseCommandIEs ies. - * \param ranaP_Iu_ReleaseCommand Pointer to the ASN1 structure. - * \param iu_ReleaseCommandIEs Pointer to the IES structure. - **/ -int ranap_encode_iu_releasecommandies( - RANAP_Iu_ReleaseCommand_t *ranaP_Iu_ReleaseCommand, - RANAP_Iu_ReleaseCommandIEs_t *iu_ReleaseCommandIEs); - -/** \brief Decode function for RelocationRequestAcknowledgeIEs ies. - * \param relocationRequestAcknowledgeIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationrequestacknowledgeies( - RANAP_RelocationRequestAcknowledgeIEs_t *relocationRequestAcknowledgeIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationRequestAcknowledgeIEs ies. - * \param ranaP_RelocationRequestAcknowledge Pointer to the ASN1 structure. - * \param relocationRequestAcknowledgeIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationrequestacknowledgeies( - RANAP_RelocationRequestAcknowledge_t *ranaP_RelocationRequestAcknowledge, - RANAP_RelocationRequestAcknowledgeIEs_t *relocationRequestAcknowledgeIEs); - -/** \brief Decode function for RelocationFailureIEs ies. - * \param relocationFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationfailureies( - RANAP_RelocationFailureIEs_t *relocationFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationFailureIEs ies. - * \param ranaP_RelocationFailure Pointer to the ASN1 structure. - * \param relocationFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationfailureies( - RANAP_RelocationFailure_t *ranaP_RelocationFailure, - RANAP_RelocationFailureIEs_t *relocationFailureIEs); - -/** \brief Decode function for RABs-failed-to-reportItemIEs ies. - * \param raBs_failed_to_reportItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rabs_failed_to_reportitemies( - RANAP_RABs_failed_to_reportItemIEs_t *raBs_failed_to_reportItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RABs-failed-to-reportItemIEs ies. - * \param ranaP_RABs_failed_to_reportList Pointer to the ASN1 structure. - * \param raBs_failed_to_reportItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rabs_failed_to_reportitemies( - RANAP_RABs_failed_to_reportList_t *ranaP_RABs_failed_to_reportList, - RANAP_RABs_failed_to_reportItemIEs_t *raBs_failed_to_reportItemIEs); - -/** \brief Decode function for RelocationPreparationFailureIEs ies. - * \param relocationPreparationFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationpreparationfailureies( - RANAP_RelocationPreparationFailureIEs_t *relocationPreparationFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationPreparationFailureIEs ies. - * \param ranaP_RelocationPreparationFailure Pointer to the ASN1 structure. - * \param relocationPreparationFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationpreparationfailureies( - RANAP_RelocationPreparationFailure_t *ranaP_RelocationPreparationFailure, - RANAP_RelocationPreparationFailureIEs_t *relocationPreparationFailureIEs); - -/** \brief Decode function for RAB-ToBeReleasedItem-EnhancedRelocCompleteRes-IEs ies. - * \param raB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_tobereleaseditem_enhancedreloccompleteres_ies( - RANAP_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs_t *raB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ToBeReleasedItem-EnhancedRelocCompleteRes-IEs ies. - * \param ranaP_RAB_ToBeReleasedList_EnhancedRelocCompleteRes Pointer to the ASN1 structure. - * \param raB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_tobereleaseditem_enhancedreloccompleteres_ies( - RANAP_RAB_ToBeReleasedList_EnhancedRelocCompleteRes_t *ranaP_RAB_ToBeReleasedList_EnhancedRelocCompleteRes, - RANAP_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs_t *raB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs); - -/** \brief Decode function for RABs-ContextFailedtoTransferItemIEs ies. - * \param raBs_ContextFailedtoTransferItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rabs_contextfailedtotransferitemies( - RANAP_RABs_ContextFailedtoTransferItemIEs_t *raBs_ContextFailedtoTransferItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RABs-ContextFailedtoTransferItemIEs ies. - * \param ranaP_RABs_ContextFailedtoTransferList Pointer to the ASN1 structure. - * \param raBs_ContextFailedtoTransferItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rabs_contextfailedtotransferitemies( - RANAP_RABs_ContextFailedtoTransferList_t *ranaP_RABs_ContextFailedtoTransferList, - RANAP_RABs_ContextFailedtoTransferItemIEs_t *raBs_ContextFailedtoTransferItemIEs); - -/** \brief Decode function for RelocationRequiredIEs ies. - * \param relocationRequiredIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationrequiredies( - RANAP_RelocationRequiredIEs_t *relocationRequiredIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationRequiredIEs ies. - * \param ranaP_RelocationRequired Pointer to the ASN1 structure. - * \param relocationRequiredIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationrequiredies( - RANAP_RelocationRequired_t *ranaP_RelocationRequired, - RANAP_RelocationRequiredIEs_t *relocationRequiredIEs); - -/** \brief Decode function for MBMSSessionStopIEs ies. - * \param mbmsSessionStopIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionstopies( - RANAP_MBMSSessionStopIEs_t *mbmsSessionStopIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionStopIEs ies. - * \param ranaP_MBMSSessionStop Pointer to the ASN1 structure. - * \param mbmsSessionStopIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionstopies( - RANAP_MBMSSessionStop_t *ranaP_MBMSSessionStop, - RANAP_MBMSSessionStopIEs_t *mbmsSessionStopIEs); - -/** \brief Decode function for MBMSSessionUpdateFailureIEs ies. - * \param mbmsSessionUpdateFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionupdatefailureies( - RANAP_MBMSSessionUpdateFailureIEs_t *mbmsSessionUpdateFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionUpdateFailureIEs ies. - * \param ranaP_MBMSSessionUpdateFailure Pointer to the ASN1 structure. - * \param mbmsSessionUpdateFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionupdatefailureies( - RANAP_MBMSSessionUpdateFailure_t *ranaP_MBMSSessionUpdateFailure, - RANAP_MBMSSessionUpdateFailureIEs_t *mbmsSessionUpdateFailureIEs); - -/** \brief Decode function for ResetIEs ies. - * \param resetIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_reseties( - RANAP_ResetIEs_t *resetIEs, - ANY_t *any_p); - -/** \brief Encode function for ResetIEs ies. - * \param ranaP_Reset Pointer to the ASN1 structure. - * \param resetIEs Pointer to the IES structure. - **/ -int ranap_encode_reseties( - RANAP_Reset_t *ranaP_Reset, - RANAP_ResetIEs_t *resetIEs); - -/** \brief Decode function for LocationRelatedDataFailureIEs ies. - * \param locationRelatedDataFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_locationrelateddatafailureies( - RANAP_LocationRelatedDataFailureIEs_t *locationRelatedDataFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for LocationRelatedDataFailureIEs ies. - * \param ranaP_LocationRelatedDataFailure Pointer to the ASN1 structure. - * \param locationRelatedDataFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_locationrelateddatafailureies( - RANAP_LocationRelatedDataFailure_t *ranaP_LocationRelatedDataFailure, - RANAP_LocationRelatedDataFailureIEs_t *locationRelatedDataFailureIEs); - -/** \brief Decode function for ResetResourceAcknowledgeIEs ies. - * \param resetResourceAcknowledgeIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_resetresourceacknowledgeies( - RANAP_ResetResourceAcknowledgeIEs_t *resetResourceAcknowledgeIEs, - ANY_t *any_p); - -/** \brief Encode function for ResetResourceAcknowledgeIEs ies. - * \param ranaP_ResetResourceAcknowledge Pointer to the ASN1 structure. - * \param resetResourceAcknowledgeIEs Pointer to the IES structure. - **/ -int ranap_encode_resetresourceacknowledgeies( - RANAP_ResetResourceAcknowledge_t *ranaP_ResetResourceAcknowledge, - RANAP_ResetResourceAcknowledgeIEs_t *resetResourceAcknowledgeIEs); - -/** \brief Decode function for MBMSRegistrationRequestIEs ies. - * \param mbmsRegistrationRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsregistrationrequesties( - RANAP_MBMSRegistrationRequestIEs_t *mbmsRegistrationRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSRegistrationRequestIEs ies. - * \param ranaP_MBMSRegistrationRequest Pointer to the ASN1 structure. - * \param mbmsRegistrationRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsregistrationrequesties( - RANAP_MBMSRegistrationRequest_t *ranaP_MBMSRegistrationRequest, - RANAP_MBMSRegistrationRequestIEs_t *mbmsRegistrationRequestIEs); - -/** \brief Decode function for UplinkInformationExchangeRequestIEs ies. - * \param uplinkInformationExchangeRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_uplinkinformationexchangerequesties( - RANAP_UplinkInformationExchangeRequestIEs_t *uplinkInformationExchangeRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for UplinkInformationExchangeRequestIEs ies. - * \param ranaP_UplinkInformationExchangeRequest Pointer to the ASN1 structure. - * \param uplinkInformationExchangeRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_uplinkinformationexchangerequesties( - RANAP_UplinkInformationExchangeRequest_t *ranaP_UplinkInformationExchangeRequest, - RANAP_UplinkInformationExchangeRequestIEs_t *uplinkInformationExchangeRequestIEs); - -/** \brief Decode function for MBMSSessionStopResponseIEs ies. - * \param mbmsSessionStopResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionstopresponseies( - RANAP_MBMSSessionStopResponseIEs_t *mbmsSessionStopResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionStopResponseIEs ies. - * \param ranaP_MBMSSessionStopResponse Pointer to the ASN1 structure. - * \param mbmsSessionStopResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionstopresponseies( - RANAP_MBMSSessionStopResponse_t *ranaP_MBMSSessionStopResponse, - RANAP_MBMSSessionStopResponseIEs_t *mbmsSessionStopResponseIEs); - -/** \brief Decode function for RAB-ContextItemIEs-RANAP-RelocInf ies. - * \param raB_ContextItemIEs_RANAP_RelocInf Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_contextitemies_ranap_relocinf( - RANAP_RAB_ContextItemIEs_RANAP_RelocInf_t *raB_ContextItemIEs_RANAP_RelocInf, - ANY_t *any_p); - -/** \brief Encode function for RAB-ContextItemIEs-RANAP-RelocInf ies. - * \param ranaP_RAB_ContextList_RANAP_RelocInf Pointer to the ASN1 structure. - * \param raB_ContextItemIEs_RANAP_RelocInf Pointer to the IES structure. - **/ -int ranap_encode_rab_contextitemies_ranap_relocinf( - RANAP_RAB_ContextList_RANAP_RelocInf_t *ranaP_RAB_ContextList_RANAP_RelocInf, - RANAP_RAB_ContextItemIEs_RANAP_RelocInf_t *raB_ContextItemIEs_RANAP_RelocInf); - -/** \brief Decode function for LocationRelatedDataRequestIEs ies. - * \param locationRelatedDataRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_locationrelateddatarequesties( - RANAP_LocationRelatedDataRequestIEs_t *locationRelatedDataRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for LocationRelatedDataRequestIEs ies. - * \param ranaP_LocationRelatedDataRequest Pointer to the ASN1 structure. - * \param locationRelatedDataRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_locationrelateddatarequesties( - RANAP_LocationRelatedDataRequest_t *ranaP_LocationRelatedDataRequest, - RANAP_LocationRelatedDataRequestIEs_t *locationRelatedDataRequestIEs); - -/** \brief Decode function for RAB-DataForwardingItem-SRNS-CtxReq-IEs ies. - * \param raB_DataForwardingItem_SRNS_CtxReq_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_dataforwardingitem_srns_ctxreq_ies( - RANAP_RAB_DataForwardingItem_SRNS_CtxReq_IEs_t *raB_DataForwardingItem_SRNS_CtxReq_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-DataForwardingItem-SRNS-CtxReq-IEs ies. - * \param ranaP_RAB_DataForwardingList_SRNS_CtxReq Pointer to the ASN1 structure. - * \param raB_DataForwardingItem_SRNS_CtxReq_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_dataforwardingitem_srns_ctxreq_ies( - RANAP_RAB_DataForwardingList_SRNS_CtxReq_t *ranaP_RAB_DataForwardingList_SRNS_CtxReq, - RANAP_RAB_DataForwardingItem_SRNS_CtxReq_IEs_t *raB_DataForwardingItem_SRNS_CtxReq_IEs); - -/** \brief Decode function for RAB-ReleaseItemIEs ies. - * \param raB_ReleaseItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_releaseitemies( - RANAP_RAB_ReleaseItemIEs_t *raB_ReleaseItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ReleaseItemIEs ies. - * \param ranaP_RAB_ReleaseList Pointer to the ASN1 structure. - * \param raB_ReleaseItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_releaseitemies( - RANAP_RAB_ReleaseList_t *ranaP_RAB_ReleaseList, - RANAP_RAB_ReleaseItemIEs_t *raB_ReleaseItemIEs); - -/** \brief Decode function for RAB-DataVolumeReportRequestItemIEs ies. - * \param raB_DataVolumeReportRequestItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_datavolumereportrequestitemies( - RANAP_RAB_DataVolumeReportRequestItemIEs_t *raB_DataVolumeReportRequestItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-DataVolumeReportRequestItemIEs ies. - * \param ranaP_RAB_DataVolumeReportRequestList Pointer to the ASN1 structure. - * \param raB_DataVolumeReportRequestItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_datavolumereportrequestitemies( - RANAP_RAB_DataVolumeReportRequestList_t *ranaP_RAB_DataVolumeReportRequestList, - RANAP_RAB_DataVolumeReportRequestItemIEs_t *raB_DataVolumeReportRequestItemIEs); - -/** \brief Decode function for InformationTransferConfirmationIEs ies. - * \param informationTransferConfirmationIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_informationtransferconfirmationies( - RANAP_InformationTransferConfirmationIEs_t *informationTransferConfirmationIEs, - ANY_t *any_p); - -/** \brief Encode function for InformationTransferConfirmationIEs ies. - * \param ranaP_InformationTransferConfirmation Pointer to the ASN1 structure. - * \param informationTransferConfirmationIEs Pointer to the IES structure. - **/ -int ranap_encode_informationtransferconfirmationies( - RANAP_InformationTransferConfirmation_t *ranaP_InformationTransferConfirmation, - RANAP_InformationTransferConfirmationIEs_t *informationTransferConfirmationIEs); - -/** \brief Decode function for InitialUE-MessageIEs ies. - * \param initialUE_MessageIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_initialue_messageies( - RANAP_InitialUE_MessageIEs_t *initialUE_MessageIEs, - ANY_t *any_p); - -/** \brief Encode function for InitialUE-MessageIEs ies. - * \param ranaP_InitialUE_Message Pointer to the ASN1 structure. - * \param initialUE_MessageIEs Pointer to the IES structure. - **/ -int ranap_encode_initialue_messageies( - RANAP_InitialUE_Message_t *ranaP_InitialUE_Message, - RANAP_InitialUE_MessageIEs_t *initialUE_MessageIEs); - -/** \brief Decode function for SRNS-ContextResponseIEs ies. - * \param srnS_ContextResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_srns_contextresponseies( - RANAP_SRNS_ContextResponseIEs_t *srnS_ContextResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for SRNS-ContextResponseIEs ies. - * \param ranaP_SRNS_ContextResponse Pointer to the ASN1 structure. - * \param srnS_ContextResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_srns_contextresponseies( - RANAP_SRNS_ContextResponse_t *ranaP_SRNS_ContextResponse, - RANAP_SRNS_ContextResponseIEs_t *srnS_ContextResponseIEs); - -/** \brief Decode function for ResetResourceAckItemIEs ies. - * \param resetResourceAckItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_resetresourceackitemies( - RANAP_ResetResourceAckItemIEs_t *resetResourceAckItemIEs, - ANY_t *any_p); - -/** \brief Encode function for ResetResourceAckItemIEs ies. - * \param ranaP_ResetResourceAckList Pointer to the ASN1 structure. - * \param resetResourceAckItemIEs Pointer to the IES structure. - **/ -int ranap_encode_resetresourceackitemies( - RANAP_ResetResourceAckList_t *ranaP_ResetResourceAckList, - RANAP_ResetResourceAckItemIEs_t *resetResourceAckItemIEs); - -/** \brief Decode function for SRNS-DataForwardCommandIEs ies. - * \param srnS_DataForwardCommandIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_srns_dataforwardcommandies( - RANAP_SRNS_DataForwardCommandIEs_t *srnS_DataForwardCommandIEs, - ANY_t *any_p); - -/** \brief Encode function for SRNS-DataForwardCommandIEs ies. - * \param ranaP_SRNS_DataForwardCommand Pointer to the ASN1 structure. - * \param srnS_DataForwardCommandIEs Pointer to the IES structure. - **/ -int ranap_encode_srns_dataforwardcommandies( - RANAP_SRNS_DataForwardCommand_t *ranaP_SRNS_DataForwardCommand, - RANAP_SRNS_DataForwardCommandIEs_t *srnS_DataForwardCommandIEs); - -/** \brief Decode function for RelocationRequestIEs ies. - * \param relocationRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationrequesties( - RANAP_RelocationRequestIEs_t *relocationRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationRequestIEs ies. - * \param ranaP_RelocationRequest Pointer to the ASN1 structure. - * \param relocationRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationrequesties( - RANAP_RelocationRequest_t *ranaP_RelocationRequest, - RANAP_RelocationRequestIEs_t *relocationRequestIEs); - -/** \brief Decode function for SRNS-ContextRequestIEs ies. - * \param srnS_ContextRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_srns_contextrequesties( - RANAP_SRNS_ContextRequestIEs_t *srnS_ContextRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for SRNS-ContextRequestIEs ies. - * \param ranaP_SRNS_ContextRequest Pointer to the ASN1 structure. - * \param srnS_ContextRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_srns_contextrequesties( - RANAP_SRNS_ContextRequest_t *ranaP_SRNS_ContextRequest, - RANAP_SRNS_ContextRequestIEs_t *srnS_ContextRequestIEs); - -/** \brief Decode function for MBMSSessionStartResponseIEs ies. - * \param mbmsSessionStartResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionstartresponseies( - RANAP_MBMSSessionStartResponseIEs_t *mbmsSessionStartResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionStartResponseIEs ies. - * \param ranaP_MBMSSessionStartResponse Pointer to the ASN1 structure. - * \param mbmsSessionStartResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionstartresponseies( - RANAP_MBMSSessionStartResponse_t *ranaP_MBMSSessionStartResponse, - RANAP_MBMSSessionStartResponseIEs_t *mbmsSessionStartResponseIEs); - -/** \brief Decode function for DirectTransferIEs ies. - * \param directTransferIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_directtransferies( - RANAP_DirectTransferIEs_t *directTransferIEs, - ANY_t *any_p); - -/** \brief Encode function for DirectTransferIEs ies. - * \param ranaP_DirectTransfer Pointer to the ASN1 structure. - * \param directTransferIEs Pointer to the IES structure. - **/ -int ranap_encode_directtransferies( - RANAP_DirectTransfer_t *ranaP_DirectTransfer, - RANAP_DirectTransferIEs_t *directTransferIEs); - -/** \brief Decode function for ResetResourceIEs ies. - * \param resetResourceIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_resetresourceies( - RANAP_ResetResourceIEs_t *resetResourceIEs, - ANY_t *any_p); - -/** \brief Encode function for ResetResourceIEs ies. - * \param ranaP_ResetResource Pointer to the ASN1 structure. - * \param resetResourceIEs Pointer to the IES structure. - **/ -int ranap_encode_resetresourceies( - RANAP_ResetResource_t *ranaP_ResetResource, - RANAP_ResetResourceIEs_t *resetResourceIEs); - -/** \brief Decode function for RANAP-EnhancedRelocationInformationResponseIEs ies. - * \param ranaP_EnhancedRelocationInformationResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_ranap_enhancedrelocationinformationresponseies( - RANAP_RANAP_EnhancedRelocationInformationResponseIEs_t *ranaP_EnhancedRelocationInformationResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for RANAP-EnhancedRelocationInformationResponseIEs ies. - * \param ranaP_RANAP_EnhancedRelocationInformationResponse Pointer to the ASN1 structure. - * \param ranaP_EnhancedRelocationInformationResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_ranap_enhancedrelocationinformationresponseies( - RANAP_RANAP_EnhancedRelocationInformationResponse_t *ranaP_RANAP_EnhancedRelocationInformationResponse, - RANAP_RANAP_EnhancedRelocationInformationResponseIEs_t *ranaP_EnhancedRelocationInformationResponseIEs); - -/** \brief Decode function for RAB-SetupItem-EnhancedRelocCompleteRes-IEs ies. - * \param raB_SetupItem_EnhancedRelocCompleteRes_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_setupitem_enhancedreloccompleteres_ies( - RANAP_RAB_SetupItem_EnhancedRelocCompleteRes_IEs_t *raB_SetupItem_EnhancedRelocCompleteRes_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-SetupItem-EnhancedRelocCompleteRes-IEs ies. - * \param ranaP_RAB_SetupList_EnhancedRelocCompleteRes Pointer to the ASN1 structure. - * \param raB_SetupItem_EnhancedRelocCompleteRes_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_setupitem_enhancedreloccompleteres_ies( - RANAP_RAB_SetupList_EnhancedRelocCompleteRes_t *ranaP_RAB_SetupList_EnhancedRelocCompleteRes, - RANAP_RAB_SetupItem_EnhancedRelocCompleteRes_IEs_t *raB_SetupItem_EnhancedRelocCompleteRes_IEs); - -/** \brief Decode function for RANAP-EnhancedRelocationInformationRequestIEs ies. - * \param ranaP_EnhancedRelocationInformationRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_ranap_enhancedrelocationinformationrequesties( - RANAP_RANAP_EnhancedRelocationInformationRequestIEs_t *ranaP_EnhancedRelocationInformationRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for RANAP-EnhancedRelocationInformationRequestIEs ies. - * \param ranaP_RANAP_EnhancedRelocationInformationRequest Pointer to the ASN1 structure. - * \param ranaP_EnhancedRelocationInformationRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_ranap_enhancedrelocationinformationrequesties( - RANAP_RANAP_EnhancedRelocationInformationRequest_t *ranaP_RANAP_EnhancedRelocationInformationRequest, - RANAP_RANAP_EnhancedRelocationInformationRequestIEs_t *ranaP_EnhancedRelocationInformationRequestIEs); - -/** \brief Decode function for SecurityModeCommandIEs ies. - * \param securityModeCommandIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_securitymodecommandies( - RANAP_SecurityModeCommandIEs_t *securityModeCommandIEs, - ANY_t *any_p); - -/** \brief Encode function for SecurityModeCommandIEs ies. - * \param ranaP_SecurityModeCommand Pointer to the ASN1 structure. - * \param securityModeCommandIEs Pointer to the IES structure. - **/ -int ranap_encode_securitymodecommandies( - RANAP_SecurityModeCommand_t *ranaP_SecurityModeCommand, - RANAP_SecurityModeCommandIEs_t *securityModeCommandIEs); - -/** \brief Decode function for RelocationCancelIEs ies. - * \param relocationCancelIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationcancelies( - RANAP_RelocationCancelIEs_t *relocationCancelIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationCancelIEs ies. - * \param ranaP_RelocationCancel Pointer to the ASN1 structure. - * \param relocationCancelIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationcancelies( - RANAP_RelocationCancel_t *ranaP_RelocationCancel, - RANAP_RelocationCancelIEs_t *relocationCancelIEs); - -/** \brief Decode function for RAB-SetupItem-RelocReqAck-IEs ies. - * \param raB_SetupItem_RelocReqAck_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_setupitem_relocreqack_ies( - RANAP_RAB_SetupItem_RelocReqAck_IEs_t *raB_SetupItem_RelocReqAck_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-SetupItem-RelocReqAck-IEs ies. - * \param ranaP_RAB_SetupList_RelocReqAck Pointer to the ASN1 structure. - * \param raB_SetupItem_RelocReqAck_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_setupitem_relocreqack_ies( - RANAP_RAB_SetupList_RelocReqAck_t *ranaP_RAB_SetupList_RelocReqAck, - RANAP_RAB_SetupItem_RelocReqAck_IEs_t *raB_SetupItem_RelocReqAck_IEs); - -/** \brief Decode function for MBMSRegistrationFailureIEs ies. - * \param mbmsRegistrationFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsregistrationfailureies( - RANAP_MBMSRegistrationFailureIEs_t *mbmsRegistrationFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSRegistrationFailureIEs ies. - * \param ranaP_MBMSRegistrationFailure Pointer to the ASN1 structure. - * \param mbmsRegistrationFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsregistrationfailureies( - RANAP_MBMSRegistrationFailure_t *ranaP_MBMSRegistrationFailure, - RANAP_MBMSRegistrationFailureIEs_t *mbmsRegistrationFailureIEs); - -/** \brief Decode function for MBMSRABEstablishmentIndicationIEs ies. - * \param mbmsrabEstablishmentIndicationIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsrabestablishmentindicationies( - RANAP_MBMSRABEstablishmentIndicationIEs_t *mbmsrabEstablishmentIndicationIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSRABEstablishmentIndicationIEs ies. - * \param ranaP_MBMSRABEstablishmentIndication Pointer to the ASN1 structure. - * \param mbmsrabEstablishmentIndicationIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsrabestablishmentindicationies( - RANAP_MBMSRABEstablishmentIndication_t *ranaP_MBMSRABEstablishmentIndication, - RANAP_MBMSRABEstablishmentIndicationIEs_t *mbmsrabEstablishmentIndicationIEs); - -/** \brief Decode function for MBMSSessionStartFailureIEs ies. - * \param mbmsSessionStartFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionstartfailureies( - RANAP_MBMSSessionStartFailureIEs_t *mbmsSessionStartFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionStartFailureIEs ies. - * \param ranaP_MBMSSessionStartFailure Pointer to the ASN1 structure. - * \param mbmsSessionStartFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionstartfailureies( - RANAP_MBMSSessionStartFailure_t *ranaP_MBMSSessionStartFailure, - RANAP_MBMSSessionStartFailureIEs_t *mbmsSessionStartFailureIEs); - -/** \brief Decode function for Iu-ReleaseCompleteIEs ies. - * \param iu_ReleaseCompleteIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_iu_releasecompleteies( - RANAP_Iu_ReleaseCompleteIEs_t *iu_ReleaseCompleteIEs, - ANY_t *any_p); - -/** \brief Encode function for Iu-ReleaseCompleteIEs ies. - * \param ranaP_Iu_ReleaseComplete Pointer to the ASN1 structure. - * \param iu_ReleaseCompleteIEs Pointer to the IES structure. - **/ -int ranap_encode_iu_releasecompleteies( - RANAP_Iu_ReleaseComplete_t *ranaP_Iu_ReleaseComplete, - RANAP_Iu_ReleaseCompleteIEs_t *iu_ReleaseCompleteIEs); - -/** \brief Decode function for CN-DeactivateTraceIEs ies. - * \param cN_DeactivateTraceIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_cn_deactivatetraceies( - RANAP_CN_DeactivateTraceIEs_t *cN_DeactivateTraceIEs, - ANY_t *any_p); - -/** \brief Encode function for CN-DeactivateTraceIEs ies. - * \param ranaP_CN_DeactivateTrace Pointer to the ASN1 structure. - * \param cN_DeactivateTraceIEs Pointer to the IES structure. - **/ -int ranap_encode_cn_deactivatetraceies( - RANAP_CN_DeactivateTrace_t *ranaP_CN_DeactivateTrace, - RANAP_CN_DeactivateTraceIEs_t *cN_DeactivateTraceIEs); - -/** \brief Decode function for DataVolumeReportRequestIEs ies. - * \param dataVolumeReportRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_datavolumereportrequesties( - RANAP_DataVolumeReportRequestIEs_t *dataVolumeReportRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for DataVolumeReportRequestIEs ies. - * \param ranaP_DataVolumeReportRequest Pointer to the ASN1 structure. - * \param dataVolumeReportRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_datavolumereportrequesties( - RANAP_DataVolumeReportRequest_t *ranaP_DataVolumeReportRequest, - RANAP_DataVolumeReportRequestIEs_t *dataVolumeReportRequestIEs); - -/** \brief Decode function for RAB-RelocationReleaseItemIEs ies. - * \param raB_RelocationReleaseItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_relocationreleaseitemies( - RANAP_RAB_RelocationReleaseItemIEs_t *raB_RelocationReleaseItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-RelocationReleaseItemIEs ies. - * \param ranaP_RAB_RelocationReleaseList Pointer to the ASN1 structure. - * \param raB_RelocationReleaseItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_relocationreleaseitemies( - RANAP_RAB_RelocationReleaseList_t *ranaP_RAB_RelocationReleaseList, - RANAP_RAB_RelocationReleaseItemIEs_t *raB_RelocationReleaseItemIEs); - -/** \brief Decode function for RAB-ModifyRequestIEs ies. - * \param raB_ModifyRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_modifyrequesties( - RANAP_RAB_ModifyRequestIEs_t *raB_ModifyRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ModifyRequestIEs ies. - * \param ranaP_RAB_ModifyRequest Pointer to the ASN1 structure. - * \param raB_ModifyRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_modifyrequesties( - RANAP_RAB_ModifyRequest_t *ranaP_RAB_ModifyRequest, - RANAP_RAB_ModifyRequestIEs_t *raB_ModifyRequestIEs); - -/** \brief Decode function for SecurityModeCompleteIEs ies. - * \param securityModeCompleteIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_securitymodecompleteies( - RANAP_SecurityModeCompleteIEs_t *securityModeCompleteIEs, - ANY_t *any_p); - -/** \brief Encode function for SecurityModeCompleteIEs ies. - * \param ranaP_SecurityModeComplete Pointer to the ASN1 structure. - * \param securityModeCompleteIEs Pointer to the IES structure. - **/ -int ranap_encode_securitymodecompleteies( - RANAP_SecurityModeComplete_t *ranaP_SecurityModeComplete, - RANAP_SecurityModeCompleteIEs_t *securityModeCompleteIEs); - -/** \brief Decode function for MBMSRABReleaseIEs ies. - * \param mbmsrabReleaseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsrabreleaseies( - RANAP_MBMSRABReleaseIEs_t *mbmsrabReleaseIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSRABReleaseIEs ies. - * \param ranaP_MBMSRABRelease Pointer to the ASN1 structure. - * \param mbmsrabReleaseIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsrabreleaseies( - RANAP_MBMSRABRelease_t *ranaP_MBMSRABRelease, - RANAP_MBMSRABReleaseIEs_t *mbmsrabReleaseIEs); - -/** \brief Decode function for OverloadIEs ies. - * \param overloadIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_overloadies( - RANAP_OverloadIEs_t *overloadIEs, - ANY_t *any_p); - -/** \brief Encode function for OverloadIEs ies. - * \param ranaP_Overload Pointer to the ASN1 structure. - * \param overloadIEs Pointer to the IES structure. - **/ -int ranap_encode_overloadies( - RANAP_Overload_t *ranaP_Overload, - RANAP_OverloadIEs_t *overloadIEs); - -/** \brief Decode function for RAB-SetupItem-RelocReq-IEs ies. - * \param raB_SetupItem_RelocReq_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_setupitem_relocreq_ies( - RANAP_RAB_SetupItem_RelocReq_IEs_t *raB_SetupItem_RelocReq_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-SetupItem-RelocReq-IEs ies. - * \param ranaP_RAB_SetupList_RelocReq Pointer to the ASN1 structure. - * \param raB_SetupItem_RelocReq_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_setupitem_relocreq_ies( - RANAP_RAB_SetupList_RelocReq_t *ranaP_RAB_SetupList_RelocReq, - RANAP_RAB_SetupItem_RelocReq_IEs_t *raB_SetupItem_RelocReq_IEs); - -/** \brief Decode function for RAB-ModifyItemIEs ies. - * \param raB_ModifyItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_modifyitemies( - RANAP_RAB_ModifyItemIEs_t *raB_ModifyItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ModifyItemIEs ies. - * \param ranaP_RAB_ModifyList Pointer to the ASN1 structure. - * \param raB_ModifyItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_modifyitemies( - RANAP_RAB_ModifyList_t *ranaP_RAB_ModifyList, - RANAP_RAB_ModifyItemIEs_t *raB_ModifyItemIEs); - -/** \brief Decode function for MBMSRegistrationResponseIEs ies. - * \param mbmsRegistrationResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsregistrationresponseies( - RANAP_MBMSRegistrationResponseIEs_t *mbmsRegistrationResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSRegistrationResponseIEs ies. - * \param ranaP_MBMSRegistrationResponse Pointer to the ASN1 structure. - * \param mbmsRegistrationResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsregistrationresponseies( - RANAP_MBMSRegistrationResponse_t *ranaP_MBMSRegistrationResponse, - RANAP_MBMSRegistrationResponseIEs_t *mbmsRegistrationResponseIEs); - -/** \brief Decode function for ForwardSRNS-ContextIEs ies. - * \param forwardSRNS_ContextIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_forwardsrns_contexties( - RANAP_ForwardSRNS_ContextIEs_t *forwardSRNS_ContextIEs, - ANY_t *any_p); - -/** \brief Encode function for ForwardSRNS-ContextIEs ies. - * \param ranaP_ForwardSRNS_Context Pointer to the ASN1 structure. - * \param forwardSRNS_ContextIEs Pointer to the IES structure. - **/ -int ranap_encode_forwardsrns_contexties( - RANAP_ForwardSRNS_Context_t *ranaP_ForwardSRNS_Context, - RANAP_ForwardSRNS_ContextIEs_t *forwardSRNS_ContextIEs); - -/** \brief Decode function for UplinkInformationExchangeFailureIEs ies. - * \param uplinkInformationExchangeFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_uplinkinformationexchangefailureies( - RANAP_UplinkInformationExchangeFailureIEs_t *uplinkInformationExchangeFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for UplinkInformationExchangeFailureIEs ies. - * \param ranaP_UplinkInformationExchangeFailure Pointer to the ASN1 structure. - * \param uplinkInformationExchangeFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_uplinkinformationexchangefailureies( - RANAP_UplinkInformationExchangeFailure_t *ranaP_UplinkInformationExchangeFailure, - RANAP_UplinkInformationExchangeFailureIEs_t *uplinkInformationExchangeFailureIEs); - -/** \brief Decode function for RAB-SetupItem-EnhRelocInfoRes-IEs ies. - * \param raB_SetupItem_EnhRelocInfoRes_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_setupitem_enhrelocinfores_ies( - RANAP_RAB_SetupItem_EnhRelocInfoRes_IEs_t *raB_SetupItem_EnhRelocInfoRes_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-SetupItem-EnhRelocInfoRes-IEs ies. - * \param ranaP_RAB_SetupList_EnhRelocInfoRes Pointer to the ASN1 structure. - * \param raB_SetupItem_EnhRelocInfoRes_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_setupitem_enhrelocinfores_ies( - RANAP_RAB_SetupList_EnhRelocInfoRes_t *ranaP_RAB_SetupList_EnhRelocInfoRes, - RANAP_RAB_SetupItem_EnhRelocInfoRes_IEs_t *raB_SetupItem_EnhRelocInfoRes_IEs); - -/** \brief Decode function for DataVolumeReportIEs ies. - * \param dataVolumeReportIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_datavolumereporties( - RANAP_DataVolumeReportIEs_t *dataVolumeReportIEs, - ANY_t *any_p); - -/** \brief Encode function for DataVolumeReportIEs ies. - * \param ranaP_DataVolumeReport Pointer to the ASN1 structure. - * \param dataVolumeReportIEs Pointer to the IES structure. - **/ -int ranap_encode_datavolumereporties( - RANAP_DataVolumeReport_t *ranaP_DataVolumeReport, - RANAP_DataVolumeReportIEs_t *dataVolumeReportIEs); - -/** \brief Decode function for InformationTransferIndicationIEs ies. - * \param informationTransferIndicationIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_informationtransferindicationies( - RANAP_InformationTransferIndicationIEs_t *informationTransferIndicationIEs, - ANY_t *any_p); - -/** \brief Encode function for InformationTransferIndicationIEs ies. - * \param ranaP_InformationTransferIndication Pointer to the ASN1 structure. - * \param informationTransferIndicationIEs Pointer to the IES structure. - **/ -int ranap_encode_informationtransferindicationies( - RANAP_InformationTransferIndication_t *ranaP_InformationTransferIndication, - RANAP_InformationTransferIndicationIEs_t *informationTransferIndicationIEs); - -/** \brief Decode function for RAB-FailedItem-EnhRelocInfoRes-IEs ies. - * \param raB_FailedItem_EnhRelocInfoRes_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_faileditem_enhrelocinfores_ies( - RANAP_RAB_FailedItem_EnhRelocInfoRes_IEs_t *raB_FailedItem_EnhRelocInfoRes_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-FailedItem-EnhRelocInfoRes-IEs ies. - * \param ranaP_RAB_FailedList_EnhRelocInfoRes Pointer to the ASN1 structure. - * \param raB_FailedItem_EnhRelocInfoRes_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_faileditem_enhrelocinfores_ies( - RANAP_RAB_FailedList_EnhRelocInfoRes_t *ranaP_RAB_FailedList_EnhRelocInfoRes, - RANAP_RAB_FailedItem_EnhRelocInfoRes_IEs_t *raB_FailedItem_EnhRelocInfoRes_IEs); - -/** \brief Decode function for InformationTransferFailureIEs ies. - * \param informationTransferFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_informationtransferfailureies( - RANAP_InformationTransferFailureIEs_t *informationTransferFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for InformationTransferFailureIEs ies. - * \param ranaP_InformationTransferFailure Pointer to the ASN1 structure. - * \param informationTransferFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_informationtransferfailureies( - RANAP_InformationTransferFailure_t *ranaP_InformationTransferFailure, - RANAP_InformationTransferFailureIEs_t *informationTransferFailureIEs); - -/** \brief Decode function for CommonID-IEs ies. - * \param commonID_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_commonid_ies( - RANAP_CommonID_IEs_t *commonID_IEs, - ANY_t *any_p); - -/** \brief Encode function for CommonID-IEs ies. - * \param ranaP_CommonID Pointer to the ASN1 structure. - * \param commonID_IEs Pointer to the IES structure. - **/ -int ranap_encode_commonid_ies( - RANAP_CommonID_t *ranaP_CommonID, - RANAP_CommonID_IEs_t *commonID_IEs); - -/** \brief Decode function for MBMSUELinkingRequestIEs ies. - * \param mbmsueLinkingRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsuelinkingrequesties( - RANAP_MBMSUELinkingRequestIEs_t *mbmsueLinkingRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSUELinkingRequestIEs ies. - * \param ranaP_MBMSUELinkingRequest Pointer to the ASN1 structure. - * \param mbmsueLinkingRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsuelinkingrequesties( - RANAP_MBMSUELinkingRequest_t *ranaP_MBMSUELinkingRequest, - RANAP_MBMSUELinkingRequestIEs_t *mbmsueLinkingRequestIEs); - -/** \brief Decode function for ErrorIndicationIEs ies. - * \param errorIndicationIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_errorindicationies( - RANAP_ErrorIndicationIEs_t *errorIndicationIEs, - ANY_t *any_p); - -/** \brief Encode function for ErrorIndicationIEs ies. - * \param ranaP_ErrorIndication Pointer to the ASN1 structure. - * \param errorIndicationIEs Pointer to the IES structure. - **/ -int ranap_encode_errorindicationies( - RANAP_ErrorIndication_t *ranaP_ErrorIndication, - RANAP_ErrorIndicationIEs_t *errorIndicationIEs); - -/** \brief Decode function for RedirectionIndication-IEs ies. - * \param redirectionIndication_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_redirectionindication_ies( - RANAP_RedirectionIndication_IEs_t *redirectionIndication_IEs, - ANY_t *any_p); - -/** \brief Encode function for RedirectionIndication-IEs ies. - * \param ranaP_RedirectionIndication Pointer to the ASN1 structure. - * \param redirectionIndication_IEs Pointer to the IES structure. - **/ -int ranap_encode_redirectionindication_ies( - RANAP_RedirectionIndication_t *ranaP_RedirectionIndication, - RANAP_RedirectionIndication_IEs_t *redirectionIndication_IEs); - -/** \brief Decode function for RAB-DataForwardingItemIEs ies. - * \param raB_DataForwardingItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_dataforwardingitemies( - RANAP_RAB_DataForwardingItemIEs_t *raB_DataForwardingItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-DataForwardingItemIEs ies. - * \param ranaP_RAB_DataForwardingList Pointer to the ASN1 structure. - * \param raB_DataForwardingItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_dataforwardingitemies( - RANAP_RAB_DataForwardingList_t *ranaP_RAB_DataForwardingList, - RANAP_RAB_DataForwardingItemIEs_t *raB_DataForwardingItemIEs); - -/** \brief Decode function for RAB-SetupItem-EnhRelocInfoReq-IEs ies. - * \param raB_SetupItem_EnhRelocInfoReq_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_setupitem_enhrelocinforeq_ies( - RANAP_RAB_SetupItem_EnhRelocInfoReq_IEs_t *raB_SetupItem_EnhRelocInfoReq_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-SetupItem-EnhRelocInfoReq-IEs ies. - * \param ranaP_RAB_SetupList_EnhRelocInfoReq Pointer to the ASN1 structure. - * \param raB_SetupItem_EnhRelocInfoReq_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_setupitem_enhrelocinforeq_ies( - RANAP_RAB_SetupList_EnhRelocInfoReq_t *ranaP_RAB_SetupList_EnhRelocInfoReq, - RANAP_RAB_SetupItem_EnhRelocInfoReq_IEs_t *raB_SetupItem_EnhRelocInfoReq_IEs); - -/** \brief Decode function for MBMSRABReleaseFailureIEs ies. - * \param mbmsrabReleaseFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsrabreleasefailureies( - RANAP_MBMSRABReleaseFailureIEs_t *mbmsrabReleaseFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSRABReleaseFailureIEs ies. - * \param ranaP_MBMSRABReleaseFailure Pointer to the ASN1 structure. - * \param mbmsrabReleaseFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsrabreleasefailureies( - RANAP_MBMSRABReleaseFailure_t *ranaP_MBMSRABReleaseFailure, - RANAP_MBMSRABReleaseFailureIEs_t *mbmsrabReleaseFailureIEs); - -/** \brief Decode function for RAB-DataVolumeReportItemIEs ies. - * \param raB_DataVolumeReportItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_datavolumereportitemies( - RANAP_RAB_DataVolumeReportItemIEs_t *raB_DataVolumeReportItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-DataVolumeReportItemIEs ies. - * \param ranaP_RAB_DataVolumeReportList Pointer to the ASN1 structure. - * \param raB_DataVolumeReportItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_datavolumereportitemies( - RANAP_RAB_DataVolumeReportList_t *ranaP_RAB_DataVolumeReportList, - RANAP_RAB_DataVolumeReportItemIEs_t *raB_DataVolumeReportItemIEs); - -/** \brief Decode function for DirectInformationTransferIEs ies. - * \param directInformationTransferIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_directinformationtransferies( - RANAP_DirectInformationTransferIEs_t *directInformationTransferIEs, - ANY_t *any_p); - -/** \brief Encode function for DirectInformationTransferIEs ies. - * \param ranaP_DirectInformationTransfer Pointer to the ASN1 structure. - * \param directInformationTransferIEs Pointer to the IES structure. - **/ -int ranap_encode_directinformationtransferies( - RANAP_DirectInformationTransfer_t *ranaP_DirectInformationTransfer, - RANAP_DirectInformationTransferIEs_t *directInformationTransferIEs); - -/** \brief Decode function for RelocationCommandIEs ies. - * \param relocationCommandIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationcommandies( - RANAP_RelocationCommandIEs_t *relocationCommandIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationCommandIEs ies. - * \param ranaP_RelocationCommand Pointer to the ASN1 structure. - * \param relocationCommandIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationcommandies( - RANAP_RelocationCommand_t *ranaP_RelocationCommand, - RANAP_RelocationCommandIEs_t *relocationCommandIEs); - -/** \brief Decode function for UplinkInformationExchangeResponseIEs ies. - * \param uplinkInformationExchangeResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_uplinkinformationexchangeresponseies( - RANAP_UplinkInformationExchangeResponseIEs_t *uplinkInformationExchangeResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for UplinkInformationExchangeResponseIEs ies. - * \param ranaP_UplinkInformationExchangeResponse Pointer to the ASN1 structure. - * \param uplinkInformationExchangeResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_uplinkinformationexchangeresponseies( - RANAP_UplinkInformationExchangeResponse_t *ranaP_UplinkInformationExchangeResponse, - RANAP_UplinkInformationExchangeResponseIEs_t *uplinkInformationExchangeResponseIEs); - -/** \brief Decode function for MBMSRABReleaseRequestIEs ies. - * \param mbmsrabReleaseRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsrabreleaserequesties( - RANAP_MBMSRABReleaseRequestIEs_t *mbmsrabReleaseRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSRABReleaseRequestIEs ies. - * \param ranaP_MBMSRABReleaseRequest Pointer to the ASN1 structure. - * \param mbmsrabReleaseRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsrabreleaserequesties( - RANAP_MBMSRABReleaseRequest_t *ranaP_MBMSRABReleaseRequest, - RANAP_MBMSRABReleaseRequestIEs_t *mbmsrabReleaseRequestIEs); - -/** \brief Decode function for RAB-AssignmentRequestIEs ies. - * \param raB_AssignmentRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_assignmentrequesties( - RANAP_RAB_AssignmentRequestIEs_t *raB_AssignmentRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-AssignmentRequestIEs ies. - * \param ranaP_RAB_AssignmentRequest Pointer to the ASN1 structure. - * \param raB_AssignmentRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_assignmentrequesties( - RANAP_RAB_AssignmentRequest_t *ranaP_RAB_AssignmentRequest, - RANAP_RAB_AssignmentRequestIEs_t *raB_AssignmentRequestIEs); - -/** \brief Decode function for RAB-ReleasedItem-IuRelComp-IEs ies. - * \param raB_ReleasedItem_IuRelComp_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_releaseditem_iurelcomp_ies( - RANAP_RAB_ReleasedItem_IuRelComp_IEs_t *raB_ReleasedItem_IuRelComp_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ReleasedItem-IuRelComp-IEs ies. - * \param ranaP_RAB_ReleasedList_IuRelComp Pointer to the ASN1 structure. - * \param raB_ReleasedItem_IuRelComp_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_releaseditem_iurelcomp_ies( - RANAP_RAB_ReleasedList_IuRelComp_t *ranaP_RAB_ReleasedList_IuRelComp, - RANAP_RAB_ReleasedItem_IuRelComp_IEs_t *raB_ReleasedItem_IuRelComp_IEs); - -/** \brief Decode function for EnhancedRelocationCompleteResponseIEs ies. - * \param enhancedRelocationCompleteResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_enhancedrelocationcompleteresponseies( - RANAP_EnhancedRelocationCompleteResponseIEs_t *enhancedRelocationCompleteResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for EnhancedRelocationCompleteResponseIEs ies. - * \param ranaP_EnhancedRelocationCompleteResponse Pointer to the ASN1 structure. - * \param enhancedRelocationCompleteResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_enhancedrelocationcompleteresponseies( - RANAP_EnhancedRelocationCompleteResponse_t *ranaP_EnhancedRelocationCompleteResponse, - RANAP_EnhancedRelocationCompleteResponseIEs_t *enhancedRelocationCompleteResponseIEs); - -/** \brief Decode function for LocationReportIEs ies. - * \param locationReportIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_locationreporties( - RANAP_LocationReportIEs_t *locationReportIEs, - ANY_t *any_p); - -/** \brief Encode function for LocationReportIEs ies. - * \param ranaP_LocationReport Pointer to the ASN1 structure. - * \param locationReportIEs Pointer to the IES structure. - **/ -int ranap_encode_locationreporties( - RANAP_LocationReport_t *ranaP_LocationReport, - RANAP_LocationReportIEs_t *locationReportIEs); - -/** \brief Decode function for RAB-SetupItem-EnhancedRelocCompleteReq-IEs ies. - * \param raB_SetupItem_EnhancedRelocCompleteReq_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_setupitem_enhancedreloccompletereq_ies( - RANAP_RAB_SetupItem_EnhancedRelocCompleteReq_IEs_t *raB_SetupItem_EnhancedRelocCompleteReq_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-SetupItem-EnhancedRelocCompleteReq-IEs ies. - * \param ranaP_RAB_SetupList_EnhancedRelocCompleteReq Pointer to the ASN1 structure. - * \param raB_SetupItem_EnhancedRelocCompleteReq_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_setupitem_enhancedreloccompletereq_ies( - RANAP_RAB_SetupList_EnhancedRelocCompleteReq_t *ranaP_RAB_SetupList_EnhancedRelocCompleteReq, - RANAP_RAB_SetupItem_EnhancedRelocCompleteReq_IEs_t *raB_SetupItem_EnhancedRelocCompleteReq_IEs); - -/** \brief Decode function for RAB-AssignmentResponseIEs ies. - * \param raB_AssignmentResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_assignmentresponseies( - RANAP_RAB_AssignmentResponseIEs_t *raB_AssignmentResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-AssignmentResponseIEs ies. - * \param ranaP_RAB_AssignmentResponse Pointer to the ASN1 structure. - * \param raB_AssignmentResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_assignmentresponseies( - RANAP_RAB_AssignmentResponse_t *ranaP_RAB_AssignmentResponse, - RANAP_RAB_AssignmentResponseIEs_t *raB_AssignmentResponseIEs); - -/** \brief Decode function for RAB-ContextItemIEs ies. - * \param raB_ContextItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_contextitemies( - RANAP_RAB_ContextItemIEs_t *raB_ContextItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ContextItemIEs ies. - * \param ranaP_RAB_ContextList Pointer to the ASN1 structure. - * \param raB_ContextItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_contextitemies( - RANAP_RAB_ContextList_t *ranaP_RAB_ContextList, - RANAP_RAB_ContextItemIEs_t *raB_ContextItemIEs); - -/** \brief Decode function for MBMSSessionUpdateResponseIEs ies. - * \param mbmsSessionUpdateResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionupdateresponseies( - RANAP_MBMSSessionUpdateResponseIEs_t *mbmsSessionUpdateResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionUpdateResponseIEs ies. - * \param ranaP_MBMSSessionUpdateResponse Pointer to the ASN1 structure. - * \param mbmsSessionUpdateResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionupdateresponseies( - RANAP_MBMSSessionUpdateResponse_t *ranaP_MBMSSessionUpdateResponse, - RANAP_MBMSSessionUpdateResponseIEs_t *mbmsSessionUpdateResponseIEs); - -/** \brief Decode function for UeRadioCapabilityMatchResponseIEs ies. - * \param ueRadioCapabilityMatchResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_ueradiocapabilitymatchresponseies( - RANAP_UeRadioCapabilityMatchResponseIEs_t *ueRadioCapabilityMatchResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for UeRadioCapabilityMatchResponseIEs ies. - * \param ranaP_UeRadioCapabilityMatchResponse Pointer to the ASN1 structure. - * \param ueRadioCapabilityMatchResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_ueradiocapabilitymatchresponseies( - RANAP_UeRadioCapabilityMatchResponse_t *ranaP_UeRadioCapabilityMatchResponse, - RANAP_UeRadioCapabilityMatchResponseIEs_t *ueRadioCapabilityMatchResponseIEs); - -/** \brief Decode function for RAB-ReleaseRequestIEs ies. - * \param raB_ReleaseRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_releaserequesties( - RANAP_RAB_ReleaseRequestIEs_t *raB_ReleaseRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ReleaseRequestIEs ies. - * \param ranaP_RAB_ReleaseRequest Pointer to the ASN1 structure. - * \param raB_ReleaseRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_releaserequesties( - RANAP_RAB_ReleaseRequest_t *ranaP_RAB_ReleaseRequest, - RANAP_RAB_ReleaseRequestIEs_t *raB_ReleaseRequestIEs); - -/** \brief Decode function for EnhancedRelocationCompleteConfirmIEs ies. - * \param enhancedRelocationCompleteConfirmIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_enhancedrelocationcompleteconfirmies( - RANAP_EnhancedRelocationCompleteConfirmIEs_t *enhancedRelocationCompleteConfirmIEs, - ANY_t *any_p); - -/** \brief Encode function for EnhancedRelocationCompleteConfirmIEs ies. - * \param ranaP_EnhancedRelocationCompleteConfirm Pointer to the ASN1 structure. - * \param enhancedRelocationCompleteConfirmIEs Pointer to the IES structure. - **/ -int ranap_encode_enhancedrelocationcompleteconfirmies( - RANAP_EnhancedRelocationCompleteConfirm_t *ranaP_EnhancedRelocationCompleteConfirm, - RANAP_EnhancedRelocationCompleteConfirmIEs_t *enhancedRelocationCompleteConfirmIEs); - -/** \brief Decode function for MBMSSessionUpdateIEs ies. - * \param mbmsSessionUpdateIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionupdateies( - RANAP_MBMSSessionUpdateIEs_t *mbmsSessionUpdateIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionUpdateIEs ies. - * \param ranaP_MBMSSessionUpdate Pointer to the ASN1 structure. - * \param mbmsSessionUpdateIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionupdateies( - RANAP_MBMSSessionUpdate_t *ranaP_MBMSSessionUpdate, - RANAP_MBMSSessionUpdateIEs_t *mbmsSessionUpdateIEs); - -/** \brief Decode function for MBMSSessionStartIEs ies. - * \param mbmsSessionStartIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionstarties( - RANAP_MBMSSessionStartIEs_t *mbmsSessionStartIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionStartIEs ies. - * \param ranaP_MBMSSessionStart Pointer to the ASN1 structure. - * \param mbmsSessionStartIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionstarties( - RANAP_MBMSSessionStart_t *ranaP_MBMSSessionStart, - RANAP_MBMSSessionStartIEs_t *mbmsSessionStartIEs); - -/** \brief Decode function for LocationRelatedDataResponseIEs ies. - * \param locationRelatedDataResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_locationrelateddataresponseies( - RANAP_LocationRelatedDataResponseIEs_t *locationRelatedDataResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for LocationRelatedDataResponseIEs ies. - * \param ranaP_LocationRelatedDataResponse Pointer to the ASN1 structure. - * \param locationRelatedDataResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_locationrelateddataresponseies( - RANAP_LocationRelatedDataResponse_t *ranaP_LocationRelatedDataResponse, - RANAP_LocationRelatedDataResponseIEs_t *locationRelatedDataResponseIEs); - -/** \brief Decode function for RAB-SetupOrModifiedItemIEs ies. - * \param raB_SetupOrModifiedItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_setupormodifieditemies( - RANAP_RAB_SetupOrModifiedItemIEs_t *raB_SetupOrModifiedItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-SetupOrModifiedItemIEs ies. - * \param ranaP_RAB_SetupOrModifiedList Pointer to the ASN1 structure. - * \param raB_SetupOrModifiedItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_setupormodifieditemies( - RANAP_RAB_SetupOrModifiedList_t *ranaP_RAB_SetupOrModifiedList, - RANAP_RAB_SetupOrModifiedItemIEs_t *raB_SetupOrModifiedItemIEs); - -int ranap_free_rab_releaseditemies( - RANAP_RAB_ReleasedItemIEs_t *raB_ReleasedItemIEs); - -int ranap_free_iu_releaserequesties( - RANAP_Iu_ReleaseRequestIEs_t *iu_ReleaseRequestIEs); - -int ranap_free_uespecificinformationindicationies( - RANAP_UESpecificInformationIndicationIEs_t *ueSpecificInformationIndicationIEs); - -int ranap_free_enhancedrelocationcompletefailureies( - RANAP_EnhancedRelocationCompleteFailureIEs_t *enhancedRelocationCompleteFailureIEs); - -int ranap_free_mbmscnde_registrationresponseies( - RANAP_MBMSCNDe_RegistrationResponseIEs_t *mbmscnDe_RegistrationResponseIEs); - -int ranap_free_securitymoderejecties( - RANAP_SecurityModeRejectIEs_t *securityModeRejectIEs); - -int ranap_free_ranap_relocationinformationies( - RANAP_RANAP_RelocationInformationIEs_t *ranaP_RelocationInformationIEs); - -int ranap_free_resetacknowledgeies( - RANAP_ResetAcknowledgeIEs_t *resetAcknowledgeIEs); - -int ranap_free_relocationcancelacknowledgeies( - RANAP_RelocationCancelAcknowledgeIEs_t *relocationCancelAcknowledgeIEs); - -int ranap_free_srvcc_cskeysresponseies( - RANAP_SRVCC_CSKeysResponseIEs_t *srvcC_CSKeysResponseIEs); - -int ranap_free_mbmscnde_registrationrequesties( - RANAP_MBMSCNDe_RegistrationRequestIEs_t *mbmscnDe_RegistrationRequestIEs); - -int ranap_free_pagingies( - RANAP_PagingIEs_t *pagingIEs); - -int ranap_free_geran_iumode_rab_failed_rabassgntresponse_itemies( - RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs_t *geraN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs); - -int ranap_free_resetresourceitemies( - RANAP_ResetResourceItemIEs_t *resetResourceItemIEs); - -int ranap_free_locationreportingcontrolies( - RANAP_LocationReportingControlIEs_t *locationReportingControlIEs); - -int ranap_free_enhancedrelocationcompleterequesties( - RANAP_EnhancedRelocationCompleteRequestIEs_t *enhancedRelocationCompleteRequestIEs); - -int ranap_free_rab_faileditemies( - RANAP_RAB_FailedItemIEs_t *raB_FailedItemIEs); - -int ranap_free_mbmsuelinkingresponseies( - RANAP_MBMSUELinkingResponseIEs_t *mbmsueLinkingResponseIEs); - -int ranap_free_rab_queueditemies( - RANAP_RAB_QueuedItemIEs_t *raB_QueuedItemIEs); - -int ranap_free_cn_invoketraceies( - RANAP_CN_InvokeTraceIEs_t *cN_InvokeTraceIEs); - -int ranap_free_iu_releasecommandies( - RANAP_Iu_ReleaseCommandIEs_t *iu_ReleaseCommandIEs); - -int ranap_free_relocationrequestacknowledgeies( - RANAP_RelocationRequestAcknowledgeIEs_t *relocationRequestAcknowledgeIEs); - -int ranap_free_relocationfailureies( - RANAP_RelocationFailureIEs_t *relocationFailureIEs); - -int ranap_free_rabs_failed_to_reportitemies( - RANAP_RABs_failed_to_reportItemIEs_t *raBs_failed_to_reportItemIEs); - -int ranap_free_relocationpreparationfailureies( - RANAP_RelocationPreparationFailureIEs_t *relocationPreparationFailureIEs); - -int ranap_free_rab_tobereleaseditem_enhancedreloccompleteres_ies( - RANAP_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs_t *raB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs); - -int ranap_free_rabs_contextfailedtotransferitemies( - RANAP_RABs_ContextFailedtoTransferItemIEs_t *raBs_ContextFailedtoTransferItemIEs); - -int ranap_free_relocationrequiredies( - RANAP_RelocationRequiredIEs_t *relocationRequiredIEs); - -int ranap_free_mbmssessionstopies( - RANAP_MBMSSessionStopIEs_t *mbmsSessionStopIEs); - -int ranap_free_mbmssessionupdatefailureies( - RANAP_MBMSSessionUpdateFailureIEs_t *mbmsSessionUpdateFailureIEs); - -int ranap_free_reseties( - RANAP_ResetIEs_t *resetIEs); - -int ranap_free_locationrelateddatafailureies( - RANAP_LocationRelatedDataFailureIEs_t *locationRelatedDataFailureIEs); - -int ranap_free_resetresourceacknowledgeies( - RANAP_ResetResourceAcknowledgeIEs_t *resetResourceAcknowledgeIEs); - -int ranap_free_mbmsregistrationrequesties( - RANAP_MBMSRegistrationRequestIEs_t *mbmsRegistrationRequestIEs); - -int ranap_free_uplinkinformationexchangerequesties( - RANAP_UplinkInformationExchangeRequestIEs_t *uplinkInformationExchangeRequestIEs); - -int ranap_free_mbmssessionstopresponseies( - RANAP_MBMSSessionStopResponseIEs_t *mbmsSessionStopResponseIEs); - -int ranap_free_rab_contextitemies_ranap_relocinf( - RANAP_RAB_ContextItemIEs_RANAP_RelocInf_t *raB_ContextItemIEs_RANAP_RelocInf); - -int ranap_free_locationrelateddatarequesties( - RANAP_LocationRelatedDataRequestIEs_t *locationRelatedDataRequestIEs); - -int ranap_free_rab_dataforwardingitem_srns_ctxreq_ies( - RANAP_RAB_DataForwardingItem_SRNS_CtxReq_IEs_t *raB_DataForwardingItem_SRNS_CtxReq_IEs); - -int ranap_free_rab_releaseitemies( - RANAP_RAB_ReleaseItemIEs_t *raB_ReleaseItemIEs); - -int ranap_free_rab_datavolumereportrequestitemies( - RANAP_RAB_DataVolumeReportRequestItemIEs_t *raB_DataVolumeReportRequestItemIEs); - -int ranap_free_informationtransferconfirmationies( - RANAP_InformationTransferConfirmationIEs_t *informationTransferConfirmationIEs); - -int ranap_free_initialue_messageies( - RANAP_InitialUE_MessageIEs_t *initialUE_MessageIEs); - -int ranap_free_srns_contextresponseies( - RANAP_SRNS_ContextResponseIEs_t *srnS_ContextResponseIEs); - -int ranap_free_resetresourceackitemies( - RANAP_ResetResourceAckItemIEs_t *resetResourceAckItemIEs); - -int ranap_free_srns_dataforwardcommandies( - RANAP_SRNS_DataForwardCommandIEs_t *srnS_DataForwardCommandIEs); - -int ranap_free_relocationrequesties( - RANAP_RelocationRequestIEs_t *relocationRequestIEs); - -int ranap_free_srns_contextrequesties( - RANAP_SRNS_ContextRequestIEs_t *srnS_ContextRequestIEs); - -int ranap_free_mbmssessionstartresponseies( - RANAP_MBMSSessionStartResponseIEs_t *mbmsSessionStartResponseIEs); - -int ranap_free_directtransferies( - RANAP_DirectTransferIEs_t *directTransferIEs); - -int ranap_free_resetresourceies( - RANAP_ResetResourceIEs_t *resetResourceIEs); - -int ranap_free_ranap_enhancedrelocationinformationresponseies( - RANAP_RANAP_EnhancedRelocationInformationResponseIEs_t *ranaP_EnhancedRelocationInformationResponseIEs); - -int ranap_free_rab_setupitem_enhancedreloccompleteres_ies( - RANAP_RAB_SetupItem_EnhancedRelocCompleteRes_IEs_t *raB_SetupItem_EnhancedRelocCompleteRes_IEs); - -int ranap_free_ranap_enhancedrelocationinformationrequesties( - RANAP_RANAP_EnhancedRelocationInformationRequestIEs_t *ranaP_EnhancedRelocationInformationRequestIEs); - -int ranap_free_securitymodecommandies( - RANAP_SecurityModeCommandIEs_t *securityModeCommandIEs); - -int ranap_free_relocationcancelies( - RANAP_RelocationCancelIEs_t *relocationCancelIEs); - -int ranap_free_rab_setupitem_relocreqack_ies( - RANAP_RAB_SetupItem_RelocReqAck_IEs_t *raB_SetupItem_RelocReqAck_IEs); - -int ranap_free_mbmsregistrationfailureies( - RANAP_MBMSRegistrationFailureIEs_t *mbmsRegistrationFailureIEs); - -int ranap_free_mbmsrabestablishmentindicationies( - RANAP_MBMSRABEstablishmentIndicationIEs_t *mbmsrabEstablishmentIndicationIEs); - -int ranap_free_mbmssessionstartfailureies( - RANAP_MBMSSessionStartFailureIEs_t *mbmsSessionStartFailureIEs); - -int ranap_free_iu_releasecompleteies( - RANAP_Iu_ReleaseCompleteIEs_t *iu_ReleaseCompleteIEs); - -int ranap_free_cn_deactivatetraceies( - RANAP_CN_DeactivateTraceIEs_t *cN_DeactivateTraceIEs); - -int ranap_free_datavolumereportrequesties( - RANAP_DataVolumeReportRequestIEs_t *dataVolumeReportRequestIEs); - -int ranap_free_rab_relocationreleaseitemies( - RANAP_RAB_RelocationReleaseItemIEs_t *raB_RelocationReleaseItemIEs); - -int ranap_free_rab_modifyrequesties( - RANAP_RAB_ModifyRequestIEs_t *raB_ModifyRequestIEs); - -int ranap_free_securitymodecompleteies( - RANAP_SecurityModeCompleteIEs_t *securityModeCompleteIEs); - -int ranap_free_mbmsrabreleaseies( - RANAP_MBMSRABReleaseIEs_t *mbmsrabReleaseIEs); - -int ranap_free_overloadies( - RANAP_OverloadIEs_t *overloadIEs); - -int ranap_free_rab_setupitem_relocreq_ies( - RANAP_RAB_SetupItem_RelocReq_IEs_t *raB_SetupItem_RelocReq_IEs); - -int ranap_free_rab_modifyitemies( - RANAP_RAB_ModifyItemIEs_t *raB_ModifyItemIEs); - -int ranap_free_mbmsregistrationresponseies( - RANAP_MBMSRegistrationResponseIEs_t *mbmsRegistrationResponseIEs); - -int ranap_free_forwardsrns_contexties( - RANAP_ForwardSRNS_ContextIEs_t *forwardSRNS_ContextIEs); - -int ranap_free_uplinkinformationexchangefailureies( - RANAP_UplinkInformationExchangeFailureIEs_t *uplinkInformationExchangeFailureIEs); - -int ranap_free_rab_setupitem_enhrelocinfores_ies( - RANAP_RAB_SetupItem_EnhRelocInfoRes_IEs_t *raB_SetupItem_EnhRelocInfoRes_IEs); - -int ranap_free_datavolumereporties( - RANAP_DataVolumeReportIEs_t *dataVolumeReportIEs); - -int ranap_free_informationtransferindicationies( - RANAP_InformationTransferIndicationIEs_t *informationTransferIndicationIEs); - -int ranap_free_rab_faileditem_enhrelocinfores_ies( - RANAP_RAB_FailedItem_EnhRelocInfoRes_IEs_t *raB_FailedItem_EnhRelocInfoRes_IEs); - -int ranap_free_informationtransferfailureies( - RANAP_InformationTransferFailureIEs_t *informationTransferFailureIEs); - -int ranap_free_commonid_ies( - RANAP_CommonID_IEs_t *commonID_IEs); - -int ranap_free_mbmsuelinkingrequesties( - RANAP_MBMSUELinkingRequestIEs_t *mbmsueLinkingRequestIEs); - -int ranap_free_errorindicationies( - RANAP_ErrorIndicationIEs_t *errorIndicationIEs); - -int ranap_free_redirectionindication_ies( - RANAP_RedirectionIndication_IEs_t *redirectionIndication_IEs); - -int ranap_free_rab_dataforwardingitemies( - RANAP_RAB_DataForwardingItemIEs_t *raB_DataForwardingItemIEs); - -int ranap_free_rab_setupitem_enhrelocinforeq_ies( - RANAP_RAB_SetupItem_EnhRelocInfoReq_IEs_t *raB_SetupItem_EnhRelocInfoReq_IEs); - -int ranap_free_mbmsrabreleasefailureies( - RANAP_MBMSRABReleaseFailureIEs_t *mbmsrabReleaseFailureIEs); - -int ranap_free_rab_datavolumereportitemies( - RANAP_RAB_DataVolumeReportItemIEs_t *raB_DataVolumeReportItemIEs); - -int ranap_free_directinformationtransferies( - RANAP_DirectInformationTransferIEs_t *directInformationTransferIEs); - -int ranap_free_relocationcommandies( - RANAP_RelocationCommandIEs_t *relocationCommandIEs); - -int ranap_free_uplinkinformationexchangeresponseies( - RANAP_UplinkInformationExchangeResponseIEs_t *uplinkInformationExchangeResponseIEs); - -int ranap_free_mbmsrabreleaserequesties( - RANAP_MBMSRABReleaseRequestIEs_t *mbmsrabReleaseRequestIEs); - -int ranap_free_rab_assignmentrequesties( - RANAP_RAB_AssignmentRequestIEs_t *raB_AssignmentRequestIEs); - -int ranap_free_rab_releaseditem_iurelcomp_ies( - RANAP_RAB_ReleasedItem_IuRelComp_IEs_t *raB_ReleasedItem_IuRelComp_IEs); - -int ranap_free_enhancedrelocationcompleteresponseies( - RANAP_EnhancedRelocationCompleteResponseIEs_t *enhancedRelocationCompleteResponseIEs); - -int ranap_free_locationreporties( - RANAP_LocationReportIEs_t *locationReportIEs); - -int ranap_free_rab_setupitem_enhancedreloccompletereq_ies( - RANAP_RAB_SetupItem_EnhancedRelocCompleteReq_IEs_t *raB_SetupItem_EnhancedRelocCompleteReq_IEs); - -int ranap_free_rab_assignmentresponseies( - RANAP_RAB_AssignmentResponseIEs_t *raB_AssignmentResponseIEs); - -int ranap_free_rab_contextitemies( - RANAP_RAB_ContextItemIEs_t *raB_ContextItemIEs); - -int ranap_free_mbmssessionupdateresponseies( - RANAP_MBMSSessionUpdateResponseIEs_t *mbmsSessionUpdateResponseIEs); - -int ranap_free_ueradiocapabilitymatchresponseies( - RANAP_UeRadioCapabilityMatchResponseIEs_t *ueRadioCapabilityMatchResponseIEs); - -int ranap_free_rab_releaserequesties( - RANAP_RAB_ReleaseRequestIEs_t *raB_ReleaseRequestIEs); - -int ranap_free_enhancedrelocationcompleteconfirmies( - RANAP_EnhancedRelocationCompleteConfirmIEs_t *enhancedRelocationCompleteConfirmIEs); - -int ranap_free_mbmssessionupdateies( - RANAP_MBMSSessionUpdateIEs_t *mbmsSessionUpdateIEs); - -int ranap_free_mbmssessionstarties( - RANAP_MBMSSessionStartIEs_t *mbmsSessionStartIEs); - -int ranap_free_locationrelateddataresponseies( - RANAP_LocationRelatedDataResponseIEs_t *locationRelatedDataResponseIEs); - -int ranap_free_rab_setupormodifieditemies( - RANAP_RAB_SetupOrModifiedItemIEs_t *raB_SetupOrModifiedItemIEs); - -#endif /* RANAP_IES_DEFS_H_ */ - diff --git a/src/Makefile.am b/src/Makefile.am index 87d181a..3709cd0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,7 +3,7 @@ SUBDIRS = hnbap rua ranap tests # Build {hnbap,rua,ranap}_{encoder,decoder}.c using asn1tostruct ASN1_ROOT = $(top_builddir)/asn1/ ASN1TOSTRUCT = $(ASN1_ROOT)/utils/asn1tostruct.py -BUILT_SOURCES = hnbap_decoder.c hnbap_encoder.c rua_decoder.c rua_encoder.c ranap_decoder.c ranap_encoder.c +BUILT_SOURCES = hnbap_decoder.c hnbap_encoder.c rua_decoder.c rua_encoder.c gen_ranap.stamp hnbap_encoder.c hnbap_decoder.c hnbap_ies_defs.h: $(ASN1_ROOT)/hnbap/HNBAP-PDU-Contents.asn $(ASN1TOSTRUCT) $(ASN1TOSTRUCT) -f $< @@ -11,7 +11,7 @@ hnbap_encoder.c hnbap_decoder.c hnbap_ies_defs.h: $(ASN1_ROOT)/hnbap/HNBAP-PDU-C rua_encoder.c rua_decoder.c rua_ies_defs.h: $(ASN1_ROOT)/rua/RUA-PDU-Contents.asn $(ASN1TOSTRUCT) $(ASN1TOSTRUCT) -p RUA_ -f $< -ranap_encoder.c ranap_decoder.c: $(ASN1_ROOT)/ranap/RANAP-PDU-Contents.asn $(ASN1TOSTRUCT) +gen_ranap.stamp: $(ASN1_ROOT)/ranap/RANAP-PDU-Contents.asn $(ASN1TOSTRUCT) $(ASN1TOSTRUCT) -p RANAP_ -f $< # We also need to replace the include in the newly generated .c files: sed -i 's,^#include "ranap_ies_defs.h",#include ,' ranap_encoder.c ranap_decoder.c @@ -19,6 +19,7 @@ ranap_encoder.c ranap_decoder.c: $(ASN1_ROOT)/ranap/RANAP-PDU-Contents.asn $(ASN mv ranap_ies_defs.h $(top_srcdir)/include/osmocom/ranap/ # this is ugly ^. ranap_ies_defs.h is generated from asn1tostruct.py here, but # it should live in include/osmocom/ranap/. + touch $(top_builddir)/$@ AM_CFLAGS = -I$(top_srcdir)/include $(OSMOCORE_CFLAGS) $(OSMOVTY_CFLAGS) $(OSMOGSM_CFLAGS) $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS) COMMON_LDADD = -lsctp -- 2.8.0.rc3 From holger at freyther.de Sun May 15 08:03:49 2016 From: holger at freyther.de (Holger Freyther) Date: Sun, 15 May 2016 10:03:49 +0200 Subject: [PATCH] attempt to fix parallel build, improve AM logic In-Reply-To: <1463280745-25317-2-git-send-email-alexander.huemer@xx.vu> References: <1463280745-25317-1-git-send-email-alexander.huemer@xx.vu> <1463280745-25317-2-git-send-email-alexander.huemer@xx.vu> Message-ID: <18FDBCD9-F15F-4B28-AE53-380A5FD768C8@freyther.de> > On 15 May 2016, at 04:52, Alexander Huemer wrote: > > The formerly existing make rule caused a race condition in parallel builds and > wrongly stated the .c files as targets, which caused make to execute the > rule twice (once for each target). This was actually only fallout of the > attempt to express the fact that those two files are generated by the rule. > > The generated file ranap_ies_defs.h was moved by one make job, another > job then tried to access the file in the old location and failed. Great, can you push this to our gerrit[1]. And I think for removing files using the -M option to git send-enail will shorten the reviewable diff. thank you holger [1] http://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit From gerrit-no-reply at lists.osmocom.org Sun May 15 11:44:10 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Sun, 15 May 2016 11:44:10 +0000 Subject: Change in osmo-iuh[master]: attempt to fix parallel build, improve AM logic Message-ID: >From ahuemer : ahuemer has uploaded a new change for review. https://gerrit.osmocom.org/65 Change subject: attempt to fix parallel build, improve AM logic ...................................................................... attempt to fix parallel build, improve AM logic The formerly existing make rule caused a race condition in parallel builds and wrongly stated the .c files as targets, which caused make to execute the rule twice (once for each target). This was actually only fallout of the attempt to express the fact that those two files are generated by the rule. The generated file ranap_ies_defs.h was moved by one make job, another job then tried to access the file in the old location and failed. parallel build verified with: $ for i in $(seq 1 10) do echo "XXXX iteration $i" git clean -xfd autoreconf -i ./configure make -j${i} || break done Coauthored by Andreas Rottmann Change-Id: I439edcb4b7742de861c99ed401114f51061f8088 --- M .gitignore D include/osmocom/ranap/ranap_ies_defs.h M src/Makefile.am 3 files changed, 5 insertions(+), 2,969 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/65/65/1 diff --git a/.gitignore b/.gitignore index c7a19ee..b2538a7 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,5 @@ tags libosmo-ranap.pc m4 +gen_ranap.stamp +include/osmocom/ranap/ranap_ies_defs.h diff --git a/include/osmocom/ranap/ranap_ies_defs.h b/include/osmocom/ranap/ranap_ies_defs.h deleted file mode 100644 index eb4813f..0000000 --- a/include/osmocom/ranap/ranap_ies_defs.h +++ /dev/null @@ -1,2967 +0,0 @@ -/******************************************************************************* - * This file had been created by asn1tostruct.py script v0.5osmo1 - * Please do not modify this file but regenerate it via script. - * Created on: 2016-02-19 16:51:41.625903 by daniel - * from ['../asn1//ranap/RANAP-PDU-Contents.asn'] - ******************************************************************************/ -#include - -#ifndef RANAP_IES_DEFS_H_ -#define RANAP_IES_DEFS_H_ - -typedef struct RANAP_RAB_ReleasedItemIEs_s { - RANAP_RAB_ReleasedItem_t raB_ReleasedItem; -} RANAP_RAB_ReleasedItemIEs_t; - -typedef struct RANAP_Iu_ReleaseRequestIEs_s { - RANAP_Cause_t cause; -} RANAP_Iu_ReleaseRequestIEs_t; - -#define UESPECIFICINFORMATIONINDICATIONIES_RANAP_UESBI_IU_PRESENT (1 << 0) - -typedef struct RANAP_UESpecificInformationIndicationIEs_s { - uint16_t presenceMask; - RANAP_UESBI_Iu_t uesbI_Iu; ///< Optional field -} RANAP_UESpecificInformationIndicationIEs_t; - -#define ENHANCEDRELOCATIONCOMPLETEFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_EnhancedRelocationCompleteFailureIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_EnhancedRelocationCompleteFailureIEs_t; - -#define MBMSCNDE_REGISTRATIONRESPONSEIES_RANAP_CAUSE_PRESENT (1 << 0) -#define MBMSCNDE_REGISTRATIONRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 1) - -typedef struct RANAP_MBMSCNDe_RegistrationResponseIEs_s { - uint16_t presenceMask; - RANAP_TMGI_t tmgi; - RANAP_GlobalRNC_ID_t globalRNC_ID; - RANAP_Cause_t cause; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSCNDe_RegistrationResponseIEs_t; - -#define SECURITYMODEREJECTIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_SecurityModeRejectIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_SecurityModeRejectIEs_t; - -#define RANAP_RELOCATIONINFORMATIONIES_RANAP_RAB_CONTEXTLIST_RANAP_RELOCINF_PRESENT (1 << 0) - -typedef struct RANAP_RANAP_RelocationInformationIEs_s { - uint16_t presenceMask; - RANAP_RAB_ContextList_RANAP_RelocInf_t raB_ContextList_RANAP_RelocInf; ///< Optional field -} RANAP_RANAP_RelocationInformationIEs_t; - -#define RESETACKNOWLEDGEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) -#define RESETACKNOWLEDGEIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 1) - -typedef struct RANAP_ResetAcknowledgeIEs_s { - uint16_t presenceMask; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field -} RANAP_ResetAcknowledgeIEs_t; - -#define RELOCATIONCANCELACKNOWLEDGEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_RelocationCancelAcknowledgeIEs_s { - uint16_t presenceMask; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_RelocationCancelAcknowledgeIEs_t; - -#define SRVCC_CSKEYSRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_SRVCC_CSKeysResponseIEs_s { - uint16_t presenceMask; - RANAP_IntegrityProtectionKey_t integrityProtectionKey; - RANAP_EncryptionKey_t encryptionKey; - RANAP_SRVCC_Information_t srvcC_Information; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_SRVCC_CSKeysResponseIEs_t; - -#define MBMSCNDE_REGISTRATIONREQUESTIES_RANAP_GLOBALCN_ID_PRESENT (1 << 0) - -typedef struct RANAP_MBMSCNDe_RegistrationRequestIEs_s { - uint16_t presenceMask; - RANAP_TMGI_t tmgi; - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field -} RANAP_MBMSCNDe_RegistrationRequestIEs_t; - -#define PAGINGIES_RANAP_TEMPORARYUE_ID_PRESENT (1 << 0) -#define PAGINGIES_RANAP_PAGINGAREAID_PRESENT (1 << 1) -#define PAGINGIES_RANAP_PAGINGCAUSE_PRESENT (1 << 2) -#define PAGINGIES_RANAP_NONSEARCHINGINDICATION_PRESENT (1 << 3) -#define PAGINGIES_RANAP_DRX_CYCLELENGTHCOEFFICIENT_PRESENT (1 << 4) - -typedef struct RANAP_PagingIEs_s { - uint16_t presenceMask; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_PermanentNAS_UE_ID_t permanentNAS_UE_ID; - RANAP_TemporaryUE_ID_t temporaryUE_ID; ///< Optional field - RANAP_PagingAreaID_t pagingAreaID; ///< Optional field - RANAP_PagingCause_t pagingCause; ///< Optional field - RANAP_NonSearchingIndication_t nonSearchingIndication; ///< Optional field - RANAP_DRX_CycleLengthCoefficient_t drX_CycleLengthCoefficient; ///< Optional field -} RANAP_PagingIEs_t; - -typedef struct RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs_s { - RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_Item_t geraN_Iumode_RAB_Failed_RABAssgntResponse_Item; -} RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs_t; - -typedef struct RANAP_ResetResourceItemIEs_s { - RANAP_ResetResourceItem_t iuSigConIdItem; -} RANAP_ResetResourceItemIEs_t; - -typedef struct RANAP_LocationReportingControlIEs_s { - RANAP_RequestType_t requestType; -} RANAP_LocationReportingControlIEs_t; - -#define ENHANCEDRELOCATIONCOMPLETEREQUESTIES_RANAP_EXTENDEDRNC_ID_PRESENT (1 << 0) -#define ENHANCEDRELOCATIONCOMPLETEREQUESTIES_RANAP_EXTENDEDRNC_ID_PRESENT (1 << 1) -#define ENHANCEDRELOCATIONCOMPLETEREQUESTIES_RANAP_RAB_SETUPLIST_ENHANCEDRELOCCOMPLETEREQ_PRESENT (1 << 2) - -typedef struct RANAP_EnhancedRelocationCompleteRequestIEs_s { - uint16_t presenceMask; - RANAP_IuSignallingConnectionIdentifier_t oldIuSigConId; - RANAP_IuSignallingConnectionIdentifier_t iuSigConId; - RANAP_GlobalRNC_ID_t relocation_SourceRNC_ID; - RANAP_ExtendedRNC_ID_t relocation_SourceExtendedRNC_ID; ///< Optional field - RANAP_GlobalRNC_ID_t relocation_TargetRNC_ID; - RANAP_ExtendedRNC_ID_t relocation_TargetExtendedRNC_ID; ///< Optional field - RANAP_RAB_SetupList_EnhancedRelocCompleteReq_t raB_SetupList_EnhancedRelocCompleteReq; ///< Optional field -} RANAP_EnhancedRelocationCompleteRequestIEs_t; - -typedef struct RANAP_RAB_FailedItemIEs_s { - RANAP_RAB_FailedItem_t raB_FailedItem; -} RANAP_RAB_FailedItemIEs_t; - -#define MBMSUELINKINGRESPONSEIES_RANAP_UNSUCCESSFULLINKING_IES_PRESENT (1 << 0) -#define MBMSUELINKINGRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 1) - -typedef struct RANAP_MBMSUELinkingResponseIEs_s { - uint16_t presenceMask; - RANAP_UnsuccessfulLinking_IEs_t unsuccessfulLinkingList; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSUELinkingResponseIEs_t; - -typedef struct RANAP_RAB_QueuedItemIEs_s { - RANAP_RAB_QueuedItem_t raB_QueuedItem; -} RANAP_RAB_QueuedItemIEs_t; - -#define CN_INVOKETRACEIES_RANAP_TRACETYPE_PRESENT (1 << 0) -#define CN_INVOKETRACEIES_RANAP_TRIGGERID_PRESENT (1 << 1) -#define CN_INVOKETRACEIES_RANAP_UE_ID_PRESENT (1 << 2) -#define CN_INVOKETRACEIES_RANAP_OMC_ID_PRESENT (1 << 3) - -typedef struct RANAP_CN_InvokeTraceIEs_s { - uint16_t presenceMask; - RANAP_TraceType_t traceType; ///< Optional field - RANAP_TraceReference_t traceReference; - RANAP_TriggerID_t triggerID; ///< Optional field - RANAP_UE_ID_t ue_id; ///< Optional field - RANAP_OMC_ID_t omc_id; ///< Optional field -} RANAP_CN_InvokeTraceIEs_t; - -typedef struct RANAP_Iu_ReleaseCommandIEs_s { - RANAP_Cause_t cause; -} RANAP_Iu_ReleaseCommandIEs_t; - -#define RELOCATIONREQUESTACKNOWLEDGEIES_RANAP_TARGETRNC_TOSOURCERNC_TRANSPARENTCONTAINER_PRESENT (1 << 0) -#define RELOCATIONREQUESTACKNOWLEDGEIES_RANAP_RAB_SETUPLIST_RELOCREQACK_PRESENT (1 << 1) -#define RELOCATIONREQUESTACKNOWLEDGEIES_RANAP_RAB_FAILEDLIST_PRESENT (1 << 2) -#define RELOCATIONREQUESTACKNOWLEDGEIES_RANAP_CHOSENINTEGRITYPROTECTIONALGORITHM_PRESENT (1 << 3) -#define RELOCATIONREQUESTACKNOWLEDGEIES_RANAP_CHOSENENCRYPTIONALGORITHM_PRESENT (1 << 4) -#define RELOCATIONREQUESTACKNOWLEDGEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 5) - -typedef struct RANAP_RelocationRequestAcknowledgeIEs_s { - uint16_t presenceMask; - RANAP_TargetRNC_ToSourceRNC_TransparentContainer_t target_ToSource_TransparentContainer; ///< Optional field - RANAP_RAB_SetupList_RelocReqAck_t raB_SetupList_RelocReqAck; ///< Optional field - RANAP_RAB_FailedList_t raB_FailedList; ///< Optional field - RANAP_ChosenIntegrityProtectionAlgorithm_t chosenIntegrityProtectionAlgorithm; ///< Optional field - RANAP_ChosenEncryptionAlgorithm_t chosenEncryptionAlgorithm; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_RelocationRequestAcknowledgeIEs_t; - -#define RELOCATIONFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_RelocationFailureIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_RelocationFailureIEs_t; - -typedef struct RANAP_RABs_failed_to_reportItemIEs_s { - RANAP_RABs_failed_to_reportItem_t raB_FailedtoReportItem; -} RANAP_RABs_failed_to_reportItemIEs_t; - -#define RELOCATIONPREPARATIONFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_RelocationPreparationFailureIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_RelocationPreparationFailureIEs_t; - -typedef struct RANAP_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs_s { - RANAP_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_t raB_ToBeReleasedItem_EnhancedRelocCompleteRes; -} RANAP_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs_t; - -typedef struct RANAP_RABs_ContextFailedtoTransferItemIEs_s { - RANAP_RABs_ContextFailedtoTransferItem_t raB_ContextFailedtoTransferItem; -} RANAP_RABs_ContextFailedtoTransferItemIEs_t; - -#define RELOCATIONREQUIREDIES_RANAP_OLDBSS_TONEWBSS_INFORMATION_PRESENT (1 << 0) - -typedef struct RANAP_RelocationRequiredIEs_s { - uint16_t presenceMask; - RANAP_RelocationType_t relocationType; - RANAP_Cause_t cause; - RANAP_SourceID_t sourceID; - RANAP_TargetID_t targetID; - RANAP_OldBSS_ToNewBSS_Information_t oldBSS_ToNewBSS_Information; ///< Optional field -} RANAP_RelocationRequiredIEs_t; - -typedef struct RANAP_MBMSSessionStopIEs_s { - RANAP_MBMSCNDe_Registration_t mbmscnDe_Registration; -} RANAP_MBMSSessionStopIEs_t; - -#define MBMSSESSIONUPDATEFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_MBMSSessionUpdateFailureIEs_s { - uint16_t presenceMask; - RANAP_SessionUpdateID_t sessionUpdateID; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSSessionUpdateFailureIEs_t; - -#define RESETIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 0) - -typedef struct RANAP_ResetIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field -} RANAP_ResetIEs_t; - -typedef struct RANAP_LocationRelatedDataFailureIEs_s { - RANAP_Cause_t cause; -} RANAP_LocationRelatedDataFailureIEs_t; - -#define RESETRESOURCEACKNOWLEDGEIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 0) -#define RESETRESOURCEACKNOWLEDGEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 1) - -typedef struct RANAP_ResetResourceAcknowledgeIEs_s { - uint16_t presenceMask; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_ResetResourceAckList_t iuSigConIdList; - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_ResetResourceAcknowledgeIEs_t; - -#define MBMSREGISTRATIONREQUESTIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 0) - -typedef struct RANAP_MBMSRegistrationRequestIEs_s { - uint16_t presenceMask; - RANAP_MBMSRegistrationRequestType_t mbmsRegistrationRequestType; - RANAP_TMGI_t tmgi; - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field -} RANAP_MBMSRegistrationRequestIEs_t; - -typedef struct RANAP_UplinkInformationExchangeRequestIEs_s { - RANAP_InformationExchangeID_t informationExchangeID; - RANAP_InformationExchangeType_t informationExchangeType; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_GlobalRNC_ID_t globalRNC_ID; -} RANAP_UplinkInformationExchangeRequestIEs_t; - -#define MBMSSESSIONSTOPRESPONSEIES_RANAP_CAUSE_PRESENT (1 << 0) -#define MBMSSESSIONSTOPRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 1) - -typedef struct RANAP_MBMSSessionStopResponseIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSSessionStopResponseIEs_t; - -typedef struct RANAP_RAB_ContextItemIEs_RANAP_RelocInf_s { - RANAP_RAB_ContextItem_RANAP_RelocInf_t raB_ContextItem_RANAP_RelocInf; -} RANAP_RAB_ContextItemIEs_RANAP_RelocInf_t; - -#define LOCATIONRELATEDDATAREQUESTIES_RANAP_LOCATIONRELATEDDATAREQUESTTYPE_PRESENT (1 << 0) - -typedef struct RANAP_LocationRelatedDataRequestIEs_s { - uint16_t presenceMask; - RANAP_LocationRelatedDataRequestType_t locationRelatedDataRequestType; ///< Optional field -} RANAP_LocationRelatedDataRequestIEs_t; - -typedef struct RANAP_RAB_DataForwardingItem_SRNS_CtxReq_IEs_s { - RANAP_RAB_DataForwardingItem_SRNS_CtxReq_t raB_DataForwardingItem_SRNS_CtxReq; -} RANAP_RAB_DataForwardingItem_SRNS_CtxReq_IEs_t; - -typedef struct RANAP_RAB_ReleaseItemIEs_s { - RANAP_RAB_ReleaseItem_t raB_ReleaseItem; -} RANAP_RAB_ReleaseItemIEs_t; - -typedef struct RANAP_RAB_DataVolumeReportRequestItemIEs_s { - RANAP_RAB_DataVolumeReportRequestItem_t raB_DataVolumeReportRequestItem; -} RANAP_RAB_DataVolumeReportRequestItemIEs_t; - -#define INFORMATIONTRANSFERCONFIRMATIONIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_InformationTransferConfirmationIEs_s { - uint16_t presenceMask; - RANAP_InformationTransferID_t informationTransferID; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field - RANAP_GlobalRNC_ID_t globalRNC_ID; -} RANAP_InformationTransferConfirmationIEs_t; - -#define INITIALUE_MESSAGEIES_RANAP_RAC_PRESENT (1 << 0) - -typedef struct RANAP_InitialUE_MessageIEs_s { - uint16_t presenceMask; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_LAI_t lai; - RANAP_RAC_t rac; ///< Conditional field - RANAP_SAI_t sai; - RANAP_NAS_PDU_t nas_pdu; - RANAP_IuSignallingConnectionIdentifier_t iuSigConId; - RANAP_GlobalRNC_ID_t globalRNC_ID; -} RANAP_InitialUE_MessageIEs_t; - -#define SRNS_CONTEXTRESPONSEIES_RANAP_RAB_CONTEXTLIST_PRESENT (1 << 0) -#define SRNS_CONTEXTRESPONSEIES_RANAP_RABS_CONTEXTFAILEDTOTRANSFERLIST_PRESENT (1 << 1) -#define SRNS_CONTEXTRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_SRNS_ContextResponseIEs_s { - uint16_t presenceMask; - RANAP_RAB_ContextList_t raB_ContextList; ///< Optional field - RANAP_RABs_ContextFailedtoTransferList_t raB_ContextFailedtoTransferList; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_SRNS_ContextResponseIEs_t; - -typedef struct RANAP_ResetResourceAckItemIEs_s { - RANAP_ResetResourceAckItem_t iuSigConIdItem; -} RANAP_ResetResourceAckItemIEs_t; - -#define SRNS_DATAFORWARDCOMMANDIES_RANAP_RAB_DATAFORWARDINGLIST_PRESENT (1 << 0) - -typedef struct RANAP_SRNS_DataForwardCommandIEs_s { - uint16_t presenceMask; - RANAP_RAB_DataForwardingList_t raB_DataForwardingList; ///< Optional field -} RANAP_SRNS_DataForwardCommandIEs_t; - -#define RELOCATIONREQUESTIES_RANAP_PERMANENTNAS_UE_ID_PRESENT (1 << 0) -#define RELOCATIONREQUESTIES_RANAP_RAB_SETUPLIST_RELOCREQ_PRESENT (1 << 1) -#define RELOCATIONREQUESTIES_RANAP_INTEGRITYPROTECTIONINFORMATION_PRESENT (1 << 2) -#define RELOCATIONREQUESTIES_RANAP_ENCRYPTIONINFORMATION_PRESENT (1 << 3) - -typedef struct RANAP_RelocationRequestIEs_s { - uint16_t presenceMask; - RANAP_PermanentNAS_UE_ID_t permanentNAS_UE_ID; ///< Optional field - RANAP_Cause_t cause; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_SourceRNC_ToTargetRNC_TransparentContainer_t source_ToTarget_TransparentContainer; - RANAP_RAB_SetupList_RelocReq_t raB_SetupList_RelocReq; ///< Optional field - RANAP_IntegrityProtectionInformation_t integrityProtectionInformation; ///< Optional field - RANAP_EncryptionInformation_t encryptionInformation; ///< Optional field - RANAP_IuSignallingConnectionIdentifier_t iuSigConId; -} RANAP_RelocationRequestIEs_t; - -typedef struct RANAP_SRNS_ContextRequestIEs_s { - RANAP_RAB_DataForwardingList_SRNS_CtxReq_t raB_DataForwardingList_SRNS_CtxReq; -} RANAP_SRNS_ContextRequestIEs_t; - -#define MBMSSESSIONSTARTRESPONSEIES_RANAP_TRANSPORTLAYERINFORMATION_PRESENT (1 << 0) -#define MBMSSESSIONSTARTRESPONSEIES_RANAP_CAUSE_PRESENT (1 << 1) -#define MBMSSESSIONSTARTRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_MBMSSessionStartResponseIEs_s { - uint16_t presenceMask; - RANAP_TransportLayerInformation_t transportLayerInformation; ///< Optional field - RANAP_Cause_t cause; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSSessionStartResponseIEs_t; - -#define DIRECTTRANSFERIES_RANAP_LAI_PRESENT (1 << 0) -#define DIRECTTRANSFERIES_RANAP_RAC_PRESENT (1 << 1) -#define DIRECTTRANSFERIES_RANAP_SAI_PRESENT (1 << 2) -#define DIRECTTRANSFERIES_RANAP_SAPI_PRESENT (1 << 3) - -typedef struct RANAP_DirectTransferIEs_s { - uint16_t presenceMask; - RANAP_NAS_PDU_t nas_pdu; - RANAP_LAI_t lai; ///< Optional field - RANAP_RAC_t rac; ///< Optional field - RANAP_SAI_t sai; ///< Optional field - RANAP_SAPI_t sapi; ///< Optional field -} RANAP_DirectTransferIEs_t; - -#define RESETRESOURCEIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 0) - -typedef struct RANAP_ResetResourceIEs_s { - uint16_t presenceMask; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_Cause_t cause; - RANAP_ResetResourceList_t iuSigConIdList; - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field -} RANAP_ResetResourceIEs_t; - -#define RANAP_ENHANCEDRELOCATIONINFORMATIONRESPONSEIES_RANAP_TARGETRNC_TOSOURCERNC_TRANSPARENTCONTAINER_PRESENT (1 << 0) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONRESPONSEIES_RANAP_RAB_SETUPLIST_ENHRELOCINFORES_PRESENT (1 << 1) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONRESPONSEIES_RANAP_RAB_FAILEDLIST_ENHRELOCINFORES_PRESENT (1 << 2) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 3) - -typedef struct RANAP_RANAP_EnhancedRelocationInformationResponseIEs_s { - uint16_t presenceMask; - RANAP_TargetRNC_ToSourceRNC_TransparentContainer_t target_ToSource_TransparentContainer; ///< Optional field - RANAP_RAB_SetupList_EnhRelocInfoRes_t raB_SetupList_EnhRelocInfoRes; ///< Optional field - RANAP_RAB_FailedList_EnhRelocInfoRes_t raB_FailedList_EnhRelocInfoRes; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_RANAP_EnhancedRelocationInformationResponseIEs_t; - -typedef struct RANAP_RAB_SetupItem_EnhancedRelocCompleteRes_IEs_s { - RANAP_RAB_SetupItem_EnhancedRelocCompleteRes_t raB_SetupItem_EnhancedRelocCompleteRes; -} RANAP_RAB_SetupItem_EnhancedRelocCompleteRes_IEs_t; - -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_IUSIGNALLINGCONNECTIONIDENTIFIER_PRESENT (1 << 0) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_GLOBALCN_ID_PRESENT (1 << 1) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_IUSIGNALLINGCONNECTIONIDENTIFIER_PRESENT (1 << 2) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_GLOBALCN_ID_PRESENT (1 << 3) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_RAB_SETUPLIST_ENHRELOCINFOREQ_PRESENT (1 << 4) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_SNA_ACCESS_INFORMATION_PRESENT (1 << 5) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_UESBI_IU_PRESENT (1 << 6) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_PLMNIDENTITY_PRESENT (1 << 7) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_CNMBMSLINKINGINFORMATION_PRESENT (1 << 8) - -typedef struct RANAP_RANAP_EnhancedRelocationInformationRequestIEs_s { - uint16_t presenceMask; - RANAP_SourceRNC_ToTargetRNC_TransparentContainer_t source_ToTarget_TransparentContainer; - RANAP_IuSignallingConnectionIdentifier_t oldIuSigConIdCS; ///< Optional field - RANAP_GlobalCN_ID_t globalCN_IDCS; ///< Optional field - RANAP_IuSignallingConnectionIdentifier_t oldIuSigConIdPS; ///< Optional field - RANAP_GlobalCN_ID_t globalCN_IDPS; ///< Optional field - RANAP_RAB_SetupList_EnhRelocInfoReq_t raB_SetupList_EnhRelocInfoReq; ///< Optional field - RANAP_SNA_Access_Information_t snA_Access_Information; ///< Optional field - RANAP_UESBI_Iu_t uesbI_Iu; ///< Optional field - RANAP_PLMNidentity_t selectedPLMN_ID; ///< Optional field - RANAP_CNMBMSLinkingInformation_t cnmbmsLinkingInformation; ///< Optional field -} RANAP_RANAP_EnhancedRelocationInformationRequestIEs_t; - -#define SECURITYMODECOMMANDIES_RANAP_ENCRYPTIONINFORMATION_PRESENT (1 << 0) - -typedef struct RANAP_SecurityModeCommandIEs_s { - uint16_t presenceMask; - RANAP_IntegrityProtectionInformation_t integrityProtectionInformation; - RANAP_EncryptionInformation_t encryptionInformation; ///< Optional field - RANAP_KeyStatus_t keyStatus; -} RANAP_SecurityModeCommandIEs_t; - -typedef struct RANAP_RelocationCancelIEs_s { - RANAP_Cause_t cause; -} RANAP_RelocationCancelIEs_t; - -typedef struct RANAP_RAB_SetupItem_RelocReqAck_IEs_s { - RANAP_RAB_SetupItem_RelocReqAck_t raB_SetupItem_RelocReqAck; -} RANAP_RAB_SetupItem_RelocReqAck_IEs_t; - -#define MBMSREGISTRATIONFAILUREIES_RANAP_TMGI_PRESENT (1 << 0) -#define MBMSREGISTRATIONFAILUREIES_RANAP_GLOBALCN_ID_PRESENT (1 << 1) -#define MBMSREGISTRATIONFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_MBMSRegistrationFailureIEs_s { - uint16_t presenceMask; - RANAP_TMGI_t tmgi; ///< Optional field - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSRegistrationFailureIEs_t; - -typedef struct RANAP_MBMSRABEstablishmentIndicationIEs_s { - RANAP_TransportLayerInformation_t transportLayerInformation; -} RANAP_MBMSRABEstablishmentIndicationIEs_t; - -#define MBMSSESSIONSTARTFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_MBMSSessionStartFailureIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSSessionStartFailureIEs_t; - -#define IU_RELEASECOMPLETEIES_RANAP_RAB_DATAVOLUMEREPORTLIST_PRESENT (1 << 0) -#define IU_RELEASECOMPLETEIES_RANAP_RAB_RELEASEDLIST_IURELCOMP_PRESENT (1 << 1) -#define IU_RELEASECOMPLETEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_Iu_ReleaseCompleteIEs_s { - uint16_t presenceMask; - RANAP_RAB_DataVolumeReportList_t raB_DataVolumeReportList; ///< Optional field - RANAP_RAB_ReleasedList_IuRelComp_t raB_ReleasedList_IuRelComp; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_Iu_ReleaseCompleteIEs_t; - -#define CN_DEACTIVATETRACEIES_RANAP_TRIGGERID_PRESENT (1 << 0) - -typedef struct RANAP_CN_DeactivateTraceIEs_s { - uint16_t presenceMask; - RANAP_TraceReference_t traceReference; - RANAP_TriggerID_t triggerID; ///< Optional field -} RANAP_CN_DeactivateTraceIEs_t; - -typedef struct RANAP_DataVolumeReportRequestIEs_s { - RANAP_RAB_DataVolumeReportRequestList_t raB_DataVolumeReportRequestList; -} RANAP_DataVolumeReportRequestIEs_t; - -typedef struct RANAP_RAB_RelocationReleaseItemIEs_s { - RANAP_RAB_RelocationReleaseItem_t raB_RelocationReleaseItem; -} RANAP_RAB_RelocationReleaseItemIEs_t; - -typedef struct RANAP_RAB_ModifyRequestIEs_s { - RANAP_RAB_ModifyList_t raB_ModifyList; -} RANAP_RAB_ModifyRequestIEs_t; - -#define SECURITYMODECOMPLETEIES_RANAP_CHOSENENCRYPTIONALGORITHM_PRESENT (1 << 0) -#define SECURITYMODECOMPLETEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 1) - -typedef struct RANAP_SecurityModeCompleteIEs_s { - uint16_t presenceMask; - RANAP_ChosenIntegrityProtectionAlgorithm_t chosenIntegrityProtectionAlgorithm; - RANAP_ChosenEncryptionAlgorithm_t chosenEncryptionAlgorithm; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_SecurityModeCompleteIEs_t; - -#define MBMSRABRELEASEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_MBMSRABReleaseIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSRABReleaseIEs_t; - -#define OVERLOADIES_RANAP_NUMBEROFSTEPS_PRESENT (1 << 0) -#define OVERLOADIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 1) - -typedef struct RANAP_OverloadIEs_s { - uint16_t presenceMask; - RANAP_NumberOfSteps_t numberOfSteps; ///< Optional field - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field -} RANAP_OverloadIEs_t; - -typedef struct RANAP_RAB_SetupItem_RelocReq_IEs_s { - RANAP_RAB_SetupItem_RelocReq_t raB_SetupItem_RelocReq; -} RANAP_RAB_SetupItem_RelocReq_IEs_t; - -typedef struct RANAP_RAB_ModifyItemIEs_s { - RANAP_RAB_ModifyItem_t raB_ModifyItem; -} RANAP_RAB_ModifyItemIEs_t; - -#define MBMSREGISTRATIONRESPONSEIES_RANAP_TMGI_PRESENT (1 << 0) -#define MBMSREGISTRATIONRESPONSEIES_RANAP_GLOBALCN_ID_PRESENT (1 << 1) -#define MBMSREGISTRATIONRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_MBMSRegistrationResponseIEs_s { - uint16_t presenceMask; - RANAP_TMGI_t tmgi; ///< Optional field - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSRegistrationResponseIEs_t; - -typedef struct RANAP_ForwardSRNS_ContextIEs_s { - RANAP_RAB_ContextList_t raB_ContextList; -} RANAP_ForwardSRNS_ContextIEs_t; - -#define UPLINKINFORMATIONEXCHANGEFAILUREIES_RANAP_GLOBALCN_ID_PRESENT (1 << 0) -#define UPLINKINFORMATIONEXCHANGEFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 1) - -typedef struct RANAP_UplinkInformationExchangeFailureIEs_s { - uint16_t presenceMask; - RANAP_InformationExchangeID_t informationExchangeID; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_UplinkInformationExchangeFailureIEs_t; - -typedef struct RANAP_RAB_SetupItem_EnhRelocInfoRes_IEs_s { - RANAP_RAB_SetupItem_EnhRelocInfoRes_t raB_SetupItem_EnhRelocInfoRes; -} RANAP_RAB_SetupItem_EnhRelocInfoRes_IEs_t; - -#define DATAVOLUMEREPORTIES_RANAP_RAB_DATAVOLUMEREPORTLIST_PRESENT (1 << 0) -#define DATAVOLUMEREPORTIES_RANAP_RABS_FAILED_TO_REPORTLIST_PRESENT (1 << 1) -#define DATAVOLUMEREPORTIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_DataVolumeReportIEs_s { - uint16_t presenceMask; - RANAP_RAB_DataVolumeReportList_t raB_DataVolumeReportList; ///< Optional field - RANAP_RABs_failed_to_reportList_t raB_FailedtoReportList; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_DataVolumeReportIEs_t; - -#define INFORMATIONTRANSFERINDICATIONIES_RANAP_GLOBALCN_ID_PRESENT (1 << 0) - -typedef struct RANAP_InformationTransferIndicationIEs_s { - uint16_t presenceMask; - RANAP_InformationTransferID_t informationTransferID; - RANAP_ProvidedData_t providedData; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field -} RANAP_InformationTransferIndicationIEs_t; - -typedef struct RANAP_RAB_FailedItem_EnhRelocInfoRes_IEs_s { - RANAP_RAB_FailedItem_EnhRelocInfoRes_t raB_FailedItem_EnhRelocInfoRes; -} RANAP_RAB_FailedItem_EnhRelocInfoRes_IEs_t; - -#define INFORMATIONTRANSFERFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_InformationTransferFailureIEs_s { - uint16_t presenceMask; - RANAP_InformationTransferID_t informationTransferID; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field - RANAP_GlobalRNC_ID_t globalRNC_ID; -} RANAP_InformationTransferFailureIEs_t; - -typedef struct RANAP_CommonID_IEs_s { - RANAP_PermanentNAS_UE_ID_t permanentNAS_UE_ID; -} RANAP_CommonID_IEs_t; - -#define MBMSUELINKINGREQUESTIES_RANAP_JOINEDMBMSBEARERSERVICE_IES_PRESENT (1 << 0) -#define MBMSUELINKINGREQUESTIES_RANAP_LEFTMBMSBEARERSERVICE_IES_PRESENT (1 << 1) - -typedef struct RANAP_MBMSUELinkingRequestIEs_s { - uint16_t presenceMask; - RANAP_JoinedMBMSBearerService_IEs_t joinedMBMSBearerServicesList; ///< Optional field - RANAP_LeftMBMSBearerService_IEs_t leftMBMSBearerServicesList; ///< Optional field -} RANAP_MBMSUELinkingRequestIEs_t; - -#define ERRORINDICATIONIES_RANAP_CAUSE_PRESENT (1 << 0) -#define ERRORINDICATIONIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 1) -#define ERRORINDICATIONIES_RANAP_CN_DOMAININDICATOR_PRESENT (1 << 2) -#define ERRORINDICATIONIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 3) - -typedef struct RANAP_ErrorIndicationIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field - RANAP_CN_DomainIndicator_t cN_DomainIndicator; ///< Optional field - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field -} RANAP_ErrorIndicationIEs_t; - -#define REDIRECTIONINDICATION_IES_RANAP_NAS_SEQUENCENUMBER_PRESENT (1 << 0) -#define REDIRECTIONINDICATION_IES_RANAP_PERMANENTNAS_UE_ID_PRESENT (1 << 1) - -typedef struct RANAP_RedirectionIndication_IEs_s { - uint16_t presenceMask; - RANAP_NAS_PDU_t nas_pdu; - RANAP_RejectCauseValue_t rejectCauseValue; - RANAP_NAS_SequenceNumber_t naS_SequenceNumber; ///< Optional field - RANAP_PermanentNAS_UE_ID_t permanentNAS_UE_ID; ///< Optional field -} RANAP_RedirectionIndication_IEs_t; - -typedef struct RANAP_RAB_DataForwardingItemIEs_s { - RANAP_RAB_DataForwardingItem_t raB_DataForwardingItem; -} RANAP_RAB_DataForwardingItemIEs_t; - -typedef struct RANAP_RAB_SetupItem_EnhRelocInfoReq_IEs_s { - RANAP_RAB_SetupItem_EnhRelocInfoReq_t raB_SetupItem_EnhRelocInfoReq; -} RANAP_RAB_SetupItem_EnhRelocInfoReq_IEs_t; - -#define MBMSRABRELEASEFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_MBMSRABReleaseFailureIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSRABReleaseFailureIEs_t; - -typedef struct RANAP_RAB_DataVolumeReportItemIEs_s { - RANAP_RAB_DataVolumeReportItem_t raB_DataVolumeReportItem; -} RANAP_RAB_DataVolumeReportItemIEs_t; - -#define DIRECTINFORMATIONTRANSFERIES_RANAP_INTERSYSTEMINFORMATIONTRANSFERTYPE_PRESENT (1 << 0) -#define DIRECTINFORMATIONTRANSFERIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 1) -#define DIRECTINFORMATIONTRANSFERIES_RANAP_GLOBALCN_ID_PRESENT (1 << 2) - -typedef struct RANAP_DirectInformationTransferIEs_s { - uint16_t presenceMask; - RANAP_InterSystemInformationTransferType_t interSystemInformationTransferType; ///< Optional field - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field -} RANAP_DirectInformationTransferIEs_t; - -#define RELOCATIONCOMMANDIES_RANAP_L3_INFORMATION_PRESENT (1 << 0) -#define RELOCATIONCOMMANDIES_RANAP_RAB_RELOCATIONRELEASELIST_PRESENT (1 << 1) -#define RELOCATIONCOMMANDIES_RANAP_RAB_DATAFORWARDINGLIST_PRESENT (1 << 2) -#define RELOCATIONCOMMANDIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 3) - -typedef struct RANAP_RelocationCommandIEs_s { - uint16_t presenceMask; - RANAP_L3_Information_t l3_Information; ///< Optional field - RANAP_RAB_RelocationReleaseList_t raB_RelocationReleaseList; ///< Optional field - RANAP_RAB_DataForwardingList_t raB_DataForwardingList; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_RelocationCommandIEs_t; - -#define UPLINKINFORMATIONEXCHANGERESPONSEIES_RANAP_INFORMATIONREQUESTED_PRESENT (1 << 0) -#define UPLINKINFORMATIONEXCHANGERESPONSEIES_RANAP_GLOBALCN_ID_PRESENT (1 << 1) -#define UPLINKINFORMATIONEXCHANGERESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_UplinkInformationExchangeResponseIEs_s { - uint16_t presenceMask; - RANAP_InformationExchangeID_t informationExchangeID; - RANAP_InformationRequested_t informationRequested; ///< Optional field - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_UplinkInformationExchangeResponseIEs_t; - -typedef struct RANAP_MBMSRABReleaseRequestIEs_s { - RANAP_Cause_t cause; -} RANAP_MBMSRABReleaseRequestIEs_t; - -#define RAB_ASSIGNMENTREQUESTIES_RANAP_RAB_SETUPORMODIFYLIST_PRESENT (1 << 0) -#define RAB_ASSIGNMENTREQUESTIES_RANAP_RAB_RELEASELIST_PRESENT (1 << 1) - -typedef struct RANAP_RAB_AssignmentRequestIEs_s { - uint16_t presenceMask; - RANAP_RAB_SetupOrModifyList_t raB_SetupOrModifyList; ///< Optional field - RANAP_RAB_ReleaseList_t raB_ReleaseList; ///< Optional field -} RANAP_RAB_AssignmentRequestIEs_t; - -typedef struct RANAP_RAB_ReleasedItem_IuRelComp_IEs_s { - RANAP_RAB_ReleasedItem_IuRelComp_t raB_ReleasedItem_IuRelComp; -} RANAP_RAB_ReleasedItem_IuRelComp_IEs_t; - -#define ENHANCEDRELOCATIONCOMPLETERESPONSEIES_RANAP_RAB_SETUPLIST_ENHANCEDRELOCCOMPLETERES_PRESENT (1 << 0) -#define ENHANCEDRELOCATIONCOMPLETERESPONSEIES_RANAP_RAB_TOBERELEASEDLIST_ENHANCEDRELOCCOMPLETERES_PRESENT (1 << 1) -#define ENHANCEDRELOCATIONCOMPLETERESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_EnhancedRelocationCompleteResponseIEs_s { - uint16_t presenceMask; - RANAP_RAB_SetupList_EnhancedRelocCompleteRes_t raB_SetupList_EnhancedRelocCompleteRes; ///< Optional field - RANAP_RAB_ToBeReleasedList_EnhancedRelocCompleteRes_t raB_ToBeReleasedList_EnhancedRelocCompleteRes; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_EnhancedRelocationCompleteResponseIEs_t; - -#define LOCATIONREPORTIES_RANAP_AREAIDENTITY_PRESENT (1 << 0) -#define LOCATIONREPORTIES_RANAP_CAUSE_PRESENT (1 << 1) -#define LOCATIONREPORTIES_RANAP_REQUESTTYPE_PRESENT (1 << 2) - -typedef struct RANAP_LocationReportIEs_s { - uint16_t presenceMask; - RANAP_AreaIdentity_t areaIdentity; ///< Optional field - RANAP_Cause_t cause; ///< Optional field - RANAP_RequestType_t requestType; ///< Optional field -} RANAP_LocationReportIEs_t; - -typedef struct RANAP_RAB_SetupItem_EnhancedRelocCompleteReq_IEs_s { - RANAP_RAB_SetupItem_EnhancedRelocCompleteReq_t raB_SetupItem_EnhancedRelocCompleteReq; -} RANAP_RAB_SetupItem_EnhancedRelocCompleteReq_IEs_t; - -#define RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_SETUPORMODIFIEDLIST_PRESENT (1 << 0) -#define RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_RELEASEDLIST_PRESENT (1 << 1) -#define RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_QUEUEDLIST_PRESENT (1 << 2) -#define RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_FAILEDLIST_PRESENT (1 << 3) -#define RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_RELEASEFAILEDLIST_PRESENT (1 << 4) -#define RAB_ASSIGNMENTRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 5) - -typedef struct RANAP_RAB_AssignmentResponseIEs_s { - uint16_t presenceMask; - RANAP_RAB_SetupOrModifiedList_t raB_SetupOrModifiedList; ///< Optional field - RANAP_RAB_ReleasedList_t raB_ReleasedList; ///< Optional field - RANAP_RAB_QueuedList_t raB_QueuedList; ///< Optional field - RANAP_RAB_FailedList_t raB_FailedList; ///< Optional field - RANAP_RAB_ReleaseFailedList_t raB_ReleaseFailedList; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_RAB_AssignmentResponseIEs_t; - -typedef struct RANAP_RAB_ContextItemIEs_s { - RANAP_RAB_ContextItem_t raB_ContextItem; -} RANAP_RAB_ContextItemIEs_t; - -#define MBMSSESSIONUPDATERESPONSEIES_RANAP_TRANSPORTLAYERINFORMATION_PRESENT (1 << 0) -#define MBMSSESSIONUPDATERESPONSEIES_RANAP_CAUSE_PRESENT (1 << 1) -#define MBMSSESSIONUPDATERESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_MBMSSessionUpdateResponseIEs_s { - uint16_t presenceMask; - RANAP_SessionUpdateID_t sessionUpdateID; - RANAP_TransportLayerInformation_t transportLayerInformation; ///< Optional field - RANAP_Cause_t cause; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSSessionUpdateResponseIEs_t; - -typedef struct RANAP_UeRadioCapabilityMatchResponseIEs_s { - RANAP_VoiceSupportMatchIndicator_t voiceSupportMatchIndicator; -} RANAP_UeRadioCapabilityMatchResponseIEs_t; - -typedef struct RANAP_RAB_ReleaseRequestIEs_s { - RANAP_RAB_ReleaseList_t raB_ReleaseList; -} RANAP_RAB_ReleaseRequestIEs_t; - -#define ENHANCEDRELOCATIONCOMPLETECONFIRMIES_RANAP_RAB_FAILEDLIST_PRESENT (1 << 0) - -typedef struct RANAP_EnhancedRelocationCompleteConfirmIEs_s { - uint16_t presenceMask; - RANAP_RAB_FailedList_t raB_FailedList; ///< Optional field -} RANAP_EnhancedRelocationCompleteConfirmIEs_t; - -typedef struct RANAP_MBMSSessionUpdateIEs_s { - RANAP_SessionUpdateID_t sessionUpdateID; - RANAP_DeltaRAListofIdleModeUEs_t deltaRAListofIdleModeUEs; -} RANAP_MBMSSessionUpdateIEs_t; - -#define MBMSSESSIONSTARTIES_RANAP_MBMSSESSIONIDENTITY_PRESENT (1 << 0) -#define MBMSSESSIONSTARTIES_RANAP_PDP_TYPEINFORMATION_PRESENT (1 << 1) -#define MBMSSESSIONSTARTIES_RANAP_FREQUENCELAYERCONVERGENCEFLAG_PRESENT (1 << 2) -#define MBMSSESSIONSTARTIES_RANAP_RALISTOFIDLEMODEUES_PRESENT (1 << 3) -#define MBMSSESSIONSTARTIES_RANAP_GLOBALCN_ID_PRESENT (1 << 4) -#define MBMSSESSIONSTARTIES_RANAP_MBMSSESSIONREPETITIONNUMBER_PRESENT (1 << 5) - -typedef struct RANAP_MBMSSessionStartIEs_s { - uint16_t presenceMask; - RANAP_TMGI_t tmgi; - RANAP_MBMSSessionIdentity_t mbmsSessionIdentity; ///< Optional field - RANAP_MBMSBearerServiceType_t mbmsBearerServiceType; - RANAP_IuSignallingConnectionIdentifier_t iuSigConId; - RANAP_RAB_Parameters_t raB_Parameters; - RANAP_PDP_TypeInformation_t pdP_TypeInformation; ///< Optional field - RANAP_MBMSSessionDuration_t mbmsSessionDuration; - RANAP_MBMSServiceArea_t mbmsServiceArea; - RANAP_FrequenceLayerConvergenceFlag_t frequenceLayerConvergenceFlag; ///< Optional field - RANAP_RAListofIdleModeUEs_t raListofIdleModeUEs; ///< Optional field - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field - RANAP_MBMSSessionRepetitionNumber_t mbmsSessionRepetitionNumber; ///< Optional field - RANAP_TimeToMBMSDataTransfer_t timeToMBMSDataTransfer; -} RANAP_MBMSSessionStartIEs_t; - -#define LOCATIONRELATEDDATARESPONSEIES_RANAP_BROADCASTASSISTANCEDATADECIPHERINGKEYS_PRESENT (1 << 0) - -typedef struct RANAP_LocationRelatedDataResponseIEs_s { - uint16_t presenceMask; - RANAP_BroadcastAssistanceDataDecipheringKeys_t broadcastAssistanceDataDecipheringKeys; ///< Optional field -} RANAP_LocationRelatedDataResponseIEs_t; - -typedef struct RANAP_RAB_SetupOrModifiedItemIEs_s { - RANAP_RAB_SetupOrModifiedItem_t raB_SetupOrModifiedItem; -} RANAP_RAB_SetupOrModifiedItemIEs_t; - -typedef struct ranap_message_s { - uint8_t procedureCode; - uint8_t criticality; - uint8_t direction; - union { - RANAP_CN_DeactivateTraceIEs_t cN_DeactivateTraceIEs; - RANAP_CN_InvokeTraceIEs_t cN_InvokeTraceIEs; - RANAP_CommonID_IEs_t commonID_IEs; - RANAP_DataVolumeReportIEs_t dataVolumeReportIEs; - RANAP_DataVolumeReportRequestIEs_t dataVolumeReportRequestIEs; - RANAP_DirectInformationTransferIEs_t directInformationTransferIEs; - RANAP_DirectTransferIEs_t directTransferIEs; - RANAP_EnhancedRelocationCompleteConfirmIEs_t enhancedRelocationCompleteConfirmIEs; - RANAP_EnhancedRelocationCompleteFailureIEs_t enhancedRelocationCompleteFailureIEs; - RANAP_EnhancedRelocationCompleteRequestIEs_t enhancedRelocationCompleteRequestIEs; - RANAP_EnhancedRelocationCompleteResponseIEs_t enhancedRelocationCompleteResponseIEs; - RANAP_ErrorIndicationIEs_t errorIndicationIEs; - RANAP_ForwardSRNS_ContextIEs_t forwardSRNS_ContextIEs; - RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs_t geraN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs; - RANAP_InformationTransferConfirmationIEs_t informationTransferConfirmationIEs; - RANAP_InformationTransferFailureIEs_t informationTransferFailureIEs; - RANAP_InformationTransferIndicationIEs_t informationTransferIndicationIEs; - RANAP_InitialUE_MessageIEs_t initialUE_MessageIEs; - RANAP_Iu_ReleaseCommandIEs_t iu_ReleaseCommandIEs; - RANAP_Iu_ReleaseCompleteIEs_t iu_ReleaseCompleteIEs; - RANAP_Iu_ReleaseRequestIEs_t iu_ReleaseRequestIEs; - RANAP_LocationRelatedDataFailureIEs_t locationRelatedDataFailureIEs; - RANAP_LocationRelatedDataRequestIEs_t locationRelatedDataRequestIEs; - RANAP_LocationRelatedDataResponseIEs_t locationRelatedDataResponseIEs; - RANAP_LocationReportIEs_t locationReportIEs; - RANAP_LocationReportingControlIEs_t locationReportingControlIEs; - RANAP_MBMSCNDe_RegistrationRequestIEs_t mbmscnDe_RegistrationRequestIEs; - RANAP_MBMSCNDe_RegistrationResponseIEs_t mbmscnDe_RegistrationResponseIEs; - RANAP_MBMSRABEstablishmentIndicationIEs_t mbmsrabEstablishmentIndicationIEs; - RANAP_MBMSRABReleaseFailureIEs_t mbmsrabReleaseFailureIEs; - RANAP_MBMSRABReleaseIEs_t mbmsrabReleaseIEs; - RANAP_MBMSRABReleaseRequestIEs_t mbmsrabReleaseRequestIEs; - RANAP_MBMSRegistrationFailureIEs_t mbmsRegistrationFailureIEs; - RANAP_MBMSRegistrationRequestIEs_t mbmsRegistrationRequestIEs; - RANAP_MBMSRegistrationResponseIEs_t mbmsRegistrationResponseIEs; - RANAP_MBMSSessionStartFailureIEs_t mbmsSessionStartFailureIEs; - RANAP_MBMSSessionStartIEs_t mbmsSessionStartIEs; - RANAP_MBMSSessionStartResponseIEs_t mbmsSessionStartResponseIEs; - RANAP_MBMSSessionStopIEs_t mbmsSessionStopIEs; - RANAP_MBMSSessionStopResponseIEs_t mbmsSessionStopResponseIEs; - RANAP_MBMSSessionUpdateFailureIEs_t mbmsSessionUpdateFailureIEs; - RANAP_MBMSSessionUpdateIEs_t mbmsSessionUpdateIEs; - RANAP_MBMSSessionUpdateResponseIEs_t mbmsSessionUpdateResponseIEs; - RANAP_MBMSUELinkingRequestIEs_t mbmsueLinkingRequestIEs; - RANAP_MBMSUELinkingResponseIEs_t mbmsueLinkingResponseIEs; - RANAP_OverloadIEs_t overloadIEs; - RANAP_PagingIEs_t pagingIEs; - RANAP_RAB_AssignmentRequestIEs_t raB_AssignmentRequestIEs; - RANAP_RAB_AssignmentResponseIEs_t raB_AssignmentResponseIEs; - RANAP_RAB_ContextItemIEs_t raB_ContextItemIEs; - RANAP_RAB_ContextItemIEs_RANAP_RelocInf_t raB_ContextItemIEs_RANAP_RelocInf; - RANAP_RAB_DataForwardingItem_SRNS_CtxReq_IEs_t raB_DataForwardingItem_SRNS_CtxReq_IEs; - RANAP_RAB_DataForwardingItemIEs_t raB_DataForwardingItemIEs; - RANAP_RAB_DataVolumeReportItemIEs_t raB_DataVolumeReportItemIEs; - RANAP_RAB_DataVolumeReportRequestItemIEs_t raB_DataVolumeReportRequestItemIEs; - RANAP_RAB_FailedItem_EnhRelocInfoRes_IEs_t raB_FailedItem_EnhRelocInfoRes_IEs; - RANAP_RAB_FailedItemIEs_t raB_FailedItemIEs; - RANAP_RAB_ModifyItemIEs_t raB_ModifyItemIEs; - RANAP_RAB_ModifyRequestIEs_t raB_ModifyRequestIEs; - RANAP_RAB_QueuedItemIEs_t raB_QueuedItemIEs; - RANAP_RAB_ReleaseItemIEs_t raB_ReleaseItemIEs; - RANAP_RAB_ReleaseRequestIEs_t raB_ReleaseRequestIEs; - RANAP_RAB_ReleasedItem_IuRelComp_IEs_t raB_ReleasedItem_IuRelComp_IEs; - RANAP_RAB_ReleasedItemIEs_t raB_ReleasedItemIEs; - RANAP_RAB_RelocationReleaseItemIEs_t raB_RelocationReleaseItemIEs; - RANAP_RAB_SetupItem_EnhRelocInfoReq_IEs_t raB_SetupItem_EnhRelocInfoReq_IEs; - RANAP_RAB_SetupItem_EnhRelocInfoRes_IEs_t raB_SetupItem_EnhRelocInfoRes_IEs; - RANAP_RAB_SetupItem_EnhancedRelocCompleteReq_IEs_t raB_SetupItem_EnhancedRelocCompleteReq_IEs; - RANAP_RAB_SetupItem_EnhancedRelocCompleteRes_IEs_t raB_SetupItem_EnhancedRelocCompleteRes_IEs; - RANAP_RAB_SetupItem_RelocReq_IEs_t raB_SetupItem_RelocReq_IEs; - RANAP_RAB_SetupItem_RelocReqAck_IEs_t raB_SetupItem_RelocReqAck_IEs; - RANAP_RAB_SetupOrModifiedItemIEs_t raB_SetupOrModifiedItemIEs; - RANAP_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs_t raB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs; - RANAP_RABs_ContextFailedtoTransferItemIEs_t raBs_ContextFailedtoTransferItemIEs; - RANAP_RABs_failed_to_reportItemIEs_t raBs_failed_to_reportItemIEs; - RANAP_RANAP_EnhancedRelocationInformationRequestIEs_t ranaP_EnhancedRelocationInformationRequestIEs; - RANAP_RANAP_EnhancedRelocationInformationResponseIEs_t ranaP_EnhancedRelocationInformationResponseIEs; - RANAP_RANAP_RelocationInformationIEs_t ranaP_RelocationInformationIEs; - RANAP_RedirectionIndication_IEs_t redirectionIndication_IEs; - RANAP_RelocationCancelAcknowledgeIEs_t relocationCancelAcknowledgeIEs; - RANAP_RelocationCancelIEs_t relocationCancelIEs; - RANAP_RelocationCommandIEs_t relocationCommandIEs; - RANAP_RelocationFailureIEs_t relocationFailureIEs; - RANAP_RelocationPreparationFailureIEs_t relocationPreparationFailureIEs; - RANAP_RelocationRequestAcknowledgeIEs_t relocationRequestAcknowledgeIEs; - RANAP_RelocationRequestIEs_t relocationRequestIEs; - RANAP_RelocationRequiredIEs_t relocationRequiredIEs; - RANAP_ResetAcknowledgeIEs_t resetAcknowledgeIEs; - RANAP_ResetIEs_t resetIEs; - RANAP_ResetResourceAckItemIEs_t resetResourceAckItemIEs; - RANAP_ResetResourceAcknowledgeIEs_t resetResourceAcknowledgeIEs; - RANAP_ResetResourceIEs_t resetResourceIEs; - RANAP_ResetResourceItemIEs_t resetResourceItemIEs; - RANAP_SRNS_ContextRequestIEs_t srnS_ContextRequestIEs; - RANAP_SRNS_ContextResponseIEs_t srnS_ContextResponseIEs; - RANAP_SRNS_DataForwardCommandIEs_t srnS_DataForwardCommandIEs; - RANAP_SRVCC_CSKeysResponseIEs_t srvcC_CSKeysResponseIEs; - RANAP_SecurityModeCommandIEs_t securityModeCommandIEs; - RANAP_SecurityModeCompleteIEs_t securityModeCompleteIEs; - RANAP_SecurityModeRejectIEs_t securityModeRejectIEs; - RANAP_UESpecificInformationIndicationIEs_t ueSpecificInformationIndicationIEs; - RANAP_UeRadioCapabilityMatchResponseIEs_t ueRadioCapabilityMatchResponseIEs; - RANAP_UplinkInformationExchangeFailureIEs_t uplinkInformationExchangeFailureIEs; - RANAP_UplinkInformationExchangeRequestIEs_t uplinkInformationExchangeRequestIEs; - RANAP_UplinkInformationExchangeResponseIEs_t uplinkInformationExchangeResponseIEs; - } msg; -} ranap_message; - -/** \brief Decode function for RAB-ReleasedItemIEs ies. - * \param raB_ReleasedItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_releaseditemies( - RANAP_RAB_ReleasedItemIEs_t *raB_ReleasedItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ReleasedItemIEs ies. - * \param ranaP_RAB_ReleasedList Pointer to the ASN1 structure. - * \param raB_ReleasedItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_releaseditemies( - RANAP_RAB_ReleasedList_t *ranaP_RAB_ReleasedList, - RANAP_RAB_ReleasedItemIEs_t *raB_ReleasedItemIEs); - -/** \brief Decode function for Iu-ReleaseRequestIEs ies. - * \param iu_ReleaseRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_iu_releaserequesties( - RANAP_Iu_ReleaseRequestIEs_t *iu_ReleaseRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for Iu-ReleaseRequestIEs ies. - * \param ranaP_Iu_ReleaseRequest Pointer to the ASN1 structure. - * \param iu_ReleaseRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_iu_releaserequesties( - RANAP_Iu_ReleaseRequest_t *ranaP_Iu_ReleaseRequest, - RANAP_Iu_ReleaseRequestIEs_t *iu_ReleaseRequestIEs); - -/** \brief Decode function for UESpecificInformationIndicationIEs ies. - * \param ueSpecificInformationIndicationIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_uespecificinformationindicationies( - RANAP_UESpecificInformationIndicationIEs_t *ueSpecificInformationIndicationIEs, - ANY_t *any_p); - -/** \brief Encode function for UESpecificInformationIndicationIEs ies. - * \param ranaP_UESpecificInformationIndication Pointer to the ASN1 structure. - * \param ueSpecificInformationIndicationIEs Pointer to the IES structure. - **/ -int ranap_encode_uespecificinformationindicationies( - RANAP_UESpecificInformationIndication_t *ranaP_UESpecificInformationIndication, - RANAP_UESpecificInformationIndicationIEs_t *ueSpecificInformationIndicationIEs); - -/** \brief Decode function for EnhancedRelocationCompleteFailureIEs ies. - * \param enhancedRelocationCompleteFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_enhancedrelocationcompletefailureies( - RANAP_EnhancedRelocationCompleteFailureIEs_t *enhancedRelocationCompleteFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for EnhancedRelocationCompleteFailureIEs ies. - * \param ranaP_EnhancedRelocationCompleteFailure Pointer to the ASN1 structure. - * \param enhancedRelocationCompleteFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_enhancedrelocationcompletefailureies( - RANAP_EnhancedRelocationCompleteFailure_t *ranaP_EnhancedRelocationCompleteFailure, - RANAP_EnhancedRelocationCompleteFailureIEs_t *enhancedRelocationCompleteFailureIEs); - -/** \brief Decode function for MBMSCNDe-RegistrationResponseIEs ies. - * \param mbmscnDe_RegistrationResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmscnde_registrationresponseies( - RANAP_MBMSCNDe_RegistrationResponseIEs_t *mbmscnDe_RegistrationResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSCNDe-RegistrationResponseIEs ies. - * \param ranaP_MBMSCNDe_RegistrationResponse Pointer to the ASN1 structure. - * \param mbmscnDe_RegistrationResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmscnde_registrationresponseies( - RANAP_MBMSCNDe_RegistrationResponse_t *ranaP_MBMSCNDe_RegistrationResponse, - RANAP_MBMSCNDe_RegistrationResponseIEs_t *mbmscnDe_RegistrationResponseIEs); - -/** \brief Decode function for SecurityModeRejectIEs ies. - * \param securityModeRejectIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_securitymoderejecties( - RANAP_SecurityModeRejectIEs_t *securityModeRejectIEs, - ANY_t *any_p); - -/** \brief Encode function for SecurityModeRejectIEs ies. - * \param ranaP_SecurityModeReject Pointer to the ASN1 structure. - * \param securityModeRejectIEs Pointer to the IES structure. - **/ -int ranap_encode_securitymoderejecties( - RANAP_SecurityModeReject_t *ranaP_SecurityModeReject, - RANAP_SecurityModeRejectIEs_t *securityModeRejectIEs); - -/** \brief Decode function for RANAP-RelocationInformationIEs ies. - * \param ranaP_RelocationInformationIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_ranap_relocationinformationies( - RANAP_RANAP_RelocationInformationIEs_t *ranaP_RelocationInformationIEs, - ANY_t *any_p); - -/** \brief Encode function for RANAP-RelocationInformationIEs ies. - * \param ranaP_RANAP_RelocationInformation Pointer to the ASN1 structure. - * \param ranaP_RelocationInformationIEs Pointer to the IES structure. - **/ -int ranap_encode_ranap_relocationinformationies( - RANAP_RANAP_RelocationInformation_t *ranaP_RANAP_RelocationInformation, - RANAP_RANAP_RelocationInformationIEs_t *ranaP_RelocationInformationIEs); - -/** \brief Decode function for ResetAcknowledgeIEs ies. - * \param resetAcknowledgeIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_resetacknowledgeies( - RANAP_ResetAcknowledgeIEs_t *resetAcknowledgeIEs, - ANY_t *any_p); - -/** \brief Encode function for ResetAcknowledgeIEs ies. - * \param ranaP_ResetAcknowledge Pointer to the ASN1 structure. - * \param resetAcknowledgeIEs Pointer to the IES structure. - **/ -int ranap_encode_resetacknowledgeies( - RANAP_ResetAcknowledge_t *ranaP_ResetAcknowledge, - RANAP_ResetAcknowledgeIEs_t *resetAcknowledgeIEs); - -/** \brief Decode function for RelocationCancelAcknowledgeIEs ies. - * \param relocationCancelAcknowledgeIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationcancelacknowledgeies( - RANAP_RelocationCancelAcknowledgeIEs_t *relocationCancelAcknowledgeIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationCancelAcknowledgeIEs ies. - * \param ranaP_RelocationCancelAcknowledge Pointer to the ASN1 structure. - * \param relocationCancelAcknowledgeIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationcancelacknowledgeies( - RANAP_RelocationCancelAcknowledge_t *ranaP_RelocationCancelAcknowledge, - RANAP_RelocationCancelAcknowledgeIEs_t *relocationCancelAcknowledgeIEs); - -/** \brief Decode function for SRVCC-CSKeysResponseIEs ies. - * \param srvcC_CSKeysResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_srvcc_cskeysresponseies( - RANAP_SRVCC_CSKeysResponseIEs_t *srvcC_CSKeysResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for SRVCC-CSKeysResponseIEs ies. - * \param ranaP_SRVCC_CSKeysResponse Pointer to the ASN1 structure. - * \param srvcC_CSKeysResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_srvcc_cskeysresponseies( - RANAP_SRVCC_CSKeysResponse_t *ranaP_SRVCC_CSKeysResponse, - RANAP_SRVCC_CSKeysResponseIEs_t *srvcC_CSKeysResponseIEs); - -/** \brief Decode function for MBMSCNDe-RegistrationRequestIEs ies. - * \param mbmscnDe_RegistrationRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmscnde_registrationrequesties( - RANAP_MBMSCNDe_RegistrationRequestIEs_t *mbmscnDe_RegistrationRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSCNDe-RegistrationRequestIEs ies. - * \param ranaP_MBMSCNDe_RegistrationRequest Pointer to the ASN1 structure. - * \param mbmscnDe_RegistrationRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmscnde_registrationrequesties( - RANAP_MBMSCNDe_RegistrationRequest_t *ranaP_MBMSCNDe_RegistrationRequest, - RANAP_MBMSCNDe_RegistrationRequestIEs_t *mbmscnDe_RegistrationRequestIEs); - -/** \brief Decode function for PagingIEs ies. - * \param pagingIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_pagingies( - RANAP_PagingIEs_t *pagingIEs, - ANY_t *any_p); - -/** \brief Encode function for PagingIEs ies. - * \param ranaP_Paging Pointer to the ASN1 structure. - * \param pagingIEs Pointer to the IES structure. - **/ -int ranap_encode_pagingies( - RANAP_Paging_t *ranaP_Paging, - RANAP_PagingIEs_t *pagingIEs); - -/** \brief Decode function for GERAN-Iumode-RAB-Failed-RABAssgntResponse-ItemIEs ies. - * \param geraN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_geran_iumode_rab_failed_rabassgntresponse_itemies( - RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs_t *geraN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs, - ANY_t *any_p); - -/** \brief Encode function for GERAN-Iumode-RAB-Failed-RABAssgntResponse-ItemIEs ies. - * \param ranaP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_List Pointer to the ASN1 structure. - * \param geraN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs Pointer to the IES structure. - **/ -int ranap_encode_geran_iumode_rab_failed_rabassgntresponse_itemies( - RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_List_t *ranaP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_List, - RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs_t *geraN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs); - -/** \brief Decode function for ResetResourceItemIEs ies. - * \param resetResourceItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_resetresourceitemies( - RANAP_ResetResourceItemIEs_t *resetResourceItemIEs, - ANY_t *any_p); - -/** \brief Encode function for ResetResourceItemIEs ies. - * \param ranaP_ResetResourceList Pointer to the ASN1 structure. - * \param resetResourceItemIEs Pointer to the IES structure. - **/ -int ranap_encode_resetresourceitemies( - RANAP_ResetResourceList_t *ranaP_ResetResourceList, - RANAP_ResetResourceItemIEs_t *resetResourceItemIEs); - -/** \brief Decode function for LocationReportingControlIEs ies. - * \param locationReportingControlIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_locationreportingcontrolies( - RANAP_LocationReportingControlIEs_t *locationReportingControlIEs, - ANY_t *any_p); - -/** \brief Encode function for LocationReportingControlIEs ies. - * \param ranaP_LocationReportingControl Pointer to the ASN1 structure. - * \param locationReportingControlIEs Pointer to the IES structure. - **/ -int ranap_encode_locationreportingcontrolies( - RANAP_LocationReportingControl_t *ranaP_LocationReportingControl, - RANAP_LocationReportingControlIEs_t *locationReportingControlIEs); - -/** \brief Decode function for EnhancedRelocationCompleteRequestIEs ies. - * \param enhancedRelocationCompleteRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_enhancedrelocationcompleterequesties( - RANAP_EnhancedRelocationCompleteRequestIEs_t *enhancedRelocationCompleteRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for EnhancedRelocationCompleteRequestIEs ies. - * \param ranaP_EnhancedRelocationCompleteRequest Pointer to the ASN1 structure. - * \param enhancedRelocationCompleteRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_enhancedrelocationcompleterequesties( - RANAP_EnhancedRelocationCompleteRequest_t *ranaP_EnhancedRelocationCompleteRequest, - RANAP_EnhancedRelocationCompleteRequestIEs_t *enhancedRelocationCompleteRequestIEs); - -/** \brief Decode function for RAB-FailedItemIEs ies. - * \param raB_FailedItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_faileditemies( - RANAP_RAB_FailedItemIEs_t *raB_FailedItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-FailedItemIEs ies. - * \param ranaP_RAB_FailedList Pointer to the ASN1 structure. - * \param raB_FailedItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_faileditemies( - RANAP_RAB_FailedList_t *ranaP_RAB_FailedList, - RANAP_RAB_FailedItemIEs_t *raB_FailedItemIEs); - -/** \brief Decode function for MBMSUELinkingResponseIEs ies. - * \param mbmsueLinkingResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsuelinkingresponseies( - RANAP_MBMSUELinkingResponseIEs_t *mbmsueLinkingResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSUELinkingResponseIEs ies. - * \param ranaP_MBMSUELinkingResponse Pointer to the ASN1 structure. - * \param mbmsueLinkingResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsuelinkingresponseies( - RANAP_MBMSUELinkingResponse_t *ranaP_MBMSUELinkingResponse, - RANAP_MBMSUELinkingResponseIEs_t *mbmsueLinkingResponseIEs); - -/** \brief Decode function for RAB-QueuedItemIEs ies. - * \param raB_QueuedItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_queueditemies( - RANAP_RAB_QueuedItemIEs_t *raB_QueuedItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-QueuedItemIEs ies. - * \param ranaP_RAB_QueuedList Pointer to the ASN1 structure. - * \param raB_QueuedItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_queueditemies( - RANAP_RAB_QueuedList_t *ranaP_RAB_QueuedList, - RANAP_RAB_QueuedItemIEs_t *raB_QueuedItemIEs); - -/** \brief Decode function for CN-InvokeTraceIEs ies. - * \param cN_InvokeTraceIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_cn_invoketraceies( - RANAP_CN_InvokeTraceIEs_t *cN_InvokeTraceIEs, - ANY_t *any_p); - -/** \brief Encode function for CN-InvokeTraceIEs ies. - * \param ranaP_CN_InvokeTrace Pointer to the ASN1 structure. - * \param cN_InvokeTraceIEs Pointer to the IES structure. - **/ -int ranap_encode_cn_invoketraceies( - RANAP_CN_InvokeTrace_t *ranaP_CN_InvokeTrace, - RANAP_CN_InvokeTraceIEs_t *cN_InvokeTraceIEs); - -/** \brief Decode function for Iu-ReleaseCommandIEs ies. - * \param iu_ReleaseCommandIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_iu_releasecommandies( - RANAP_Iu_ReleaseCommandIEs_t *iu_ReleaseCommandIEs, - ANY_t *any_p); - -/** \brief Encode function for Iu-ReleaseCommandIEs ies. - * \param ranaP_Iu_ReleaseCommand Pointer to the ASN1 structure. - * \param iu_ReleaseCommandIEs Pointer to the IES structure. - **/ -int ranap_encode_iu_releasecommandies( - RANAP_Iu_ReleaseCommand_t *ranaP_Iu_ReleaseCommand, - RANAP_Iu_ReleaseCommandIEs_t *iu_ReleaseCommandIEs); - -/** \brief Decode function for RelocationRequestAcknowledgeIEs ies. - * \param relocationRequestAcknowledgeIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationrequestacknowledgeies( - RANAP_RelocationRequestAcknowledgeIEs_t *relocationRequestAcknowledgeIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationRequestAcknowledgeIEs ies. - * \param ranaP_RelocationRequestAcknowledge Pointer to the ASN1 structure. - * \param relocationRequestAcknowledgeIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationrequestacknowledgeies( - RANAP_RelocationRequestAcknowledge_t *ranaP_RelocationRequestAcknowledge, - RANAP_RelocationRequestAcknowledgeIEs_t *relocationRequestAcknowledgeIEs); - -/** \brief Decode function for RelocationFailureIEs ies. - * \param relocationFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationfailureies( - RANAP_RelocationFailureIEs_t *relocationFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationFailureIEs ies. - * \param ranaP_RelocationFailure Pointer to the ASN1 structure. - * \param relocationFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationfailureies( - RANAP_RelocationFailure_t *ranaP_RelocationFailure, - RANAP_RelocationFailureIEs_t *relocationFailureIEs); - -/** \brief Decode function for RABs-failed-to-reportItemIEs ies. - * \param raBs_failed_to_reportItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rabs_failed_to_reportitemies( - RANAP_RABs_failed_to_reportItemIEs_t *raBs_failed_to_reportItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RABs-failed-to-reportItemIEs ies. - * \param ranaP_RABs_failed_to_reportList Pointer to the ASN1 structure. - * \param raBs_failed_to_reportItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rabs_failed_to_reportitemies( - RANAP_RABs_failed_to_reportList_t *ranaP_RABs_failed_to_reportList, - RANAP_RABs_failed_to_reportItemIEs_t *raBs_failed_to_reportItemIEs); - -/** \brief Decode function for RelocationPreparationFailureIEs ies. - * \param relocationPreparationFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationpreparationfailureies( - RANAP_RelocationPreparationFailureIEs_t *relocationPreparationFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationPreparationFailureIEs ies. - * \param ranaP_RelocationPreparationFailure Pointer to the ASN1 structure. - * \param relocationPreparationFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationpreparationfailureies( - RANAP_RelocationPreparationFailure_t *ranaP_RelocationPreparationFailure, - RANAP_RelocationPreparationFailureIEs_t *relocationPreparationFailureIEs); - -/** \brief Decode function for RAB-ToBeReleasedItem-EnhancedRelocCompleteRes-IEs ies. - * \param raB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_tobereleaseditem_enhancedreloccompleteres_ies( - RANAP_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs_t *raB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ToBeReleasedItem-EnhancedRelocCompleteRes-IEs ies. - * \param ranaP_RAB_ToBeReleasedList_EnhancedRelocCompleteRes Pointer to the ASN1 structure. - * \param raB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_tobereleaseditem_enhancedreloccompleteres_ies( - RANAP_RAB_ToBeReleasedList_EnhancedRelocCompleteRes_t *ranaP_RAB_ToBeReleasedList_EnhancedRelocCompleteRes, - RANAP_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs_t *raB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs); - -/** \brief Decode function for RABs-ContextFailedtoTransferItemIEs ies. - * \param raBs_ContextFailedtoTransferItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rabs_contextfailedtotransferitemies( - RANAP_RABs_ContextFailedtoTransferItemIEs_t *raBs_ContextFailedtoTransferItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RABs-ContextFailedtoTransferItemIEs ies. - * \param ranaP_RABs_ContextFailedtoTransferList Pointer to the ASN1 structure. - * \param raBs_ContextFailedtoTransferItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rabs_contextfailedtotransferitemies( - RANAP_RABs_ContextFailedtoTransferList_t *ranaP_RABs_ContextFailedtoTransferList, - RANAP_RABs_ContextFailedtoTransferItemIEs_t *raBs_ContextFailedtoTransferItemIEs); - -/** \brief Decode function for RelocationRequiredIEs ies. - * \param relocationRequiredIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationrequiredies( - RANAP_RelocationRequiredIEs_t *relocationRequiredIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationRequiredIEs ies. - * \param ranaP_RelocationRequired Pointer to the ASN1 structure. - * \param relocationRequiredIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationrequiredies( - RANAP_RelocationRequired_t *ranaP_RelocationRequired, - RANAP_RelocationRequiredIEs_t *relocationRequiredIEs); - -/** \brief Decode function for MBMSSessionStopIEs ies. - * \param mbmsSessionStopIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionstopies( - RANAP_MBMSSessionStopIEs_t *mbmsSessionStopIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionStopIEs ies. - * \param ranaP_MBMSSessionStop Pointer to the ASN1 structure. - * \param mbmsSessionStopIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionstopies( - RANAP_MBMSSessionStop_t *ranaP_MBMSSessionStop, - RANAP_MBMSSessionStopIEs_t *mbmsSessionStopIEs); - -/** \brief Decode function for MBMSSessionUpdateFailureIEs ies. - * \param mbmsSessionUpdateFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionupdatefailureies( - RANAP_MBMSSessionUpdateFailureIEs_t *mbmsSessionUpdateFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionUpdateFailureIEs ies. - * \param ranaP_MBMSSessionUpdateFailure Pointer to the ASN1 structure. - * \param mbmsSessionUpdateFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionupdatefailureies( - RANAP_MBMSSessionUpdateFailure_t *ranaP_MBMSSessionUpdateFailure, - RANAP_MBMSSessionUpdateFailureIEs_t *mbmsSessionUpdateFailureIEs); - -/** \brief Decode function for ResetIEs ies. - * \param resetIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_reseties( - RANAP_ResetIEs_t *resetIEs, - ANY_t *any_p); - -/** \brief Encode function for ResetIEs ies. - * \param ranaP_Reset Pointer to the ASN1 structure. - * \param resetIEs Pointer to the IES structure. - **/ -int ranap_encode_reseties( - RANAP_Reset_t *ranaP_Reset, - RANAP_ResetIEs_t *resetIEs); - -/** \brief Decode function for LocationRelatedDataFailureIEs ies. - * \param locationRelatedDataFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_locationrelateddatafailureies( - RANAP_LocationRelatedDataFailureIEs_t *locationRelatedDataFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for LocationRelatedDataFailureIEs ies. - * \param ranaP_LocationRelatedDataFailure Pointer to the ASN1 structure. - * \param locationRelatedDataFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_locationrelateddatafailureies( - RANAP_LocationRelatedDataFailure_t *ranaP_LocationRelatedDataFailure, - RANAP_LocationRelatedDataFailureIEs_t *locationRelatedDataFailureIEs); - -/** \brief Decode function for ResetResourceAcknowledgeIEs ies. - * \param resetResourceAcknowledgeIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_resetresourceacknowledgeies( - RANAP_ResetResourceAcknowledgeIEs_t *resetResourceAcknowledgeIEs, - ANY_t *any_p); - -/** \brief Encode function for ResetResourceAcknowledgeIEs ies. - * \param ranaP_ResetResourceAcknowledge Pointer to the ASN1 structure. - * \param resetResourceAcknowledgeIEs Pointer to the IES structure. - **/ -int ranap_encode_resetresourceacknowledgeies( - RANAP_ResetResourceAcknowledge_t *ranaP_ResetResourceAcknowledge, - RANAP_ResetResourceAcknowledgeIEs_t *resetResourceAcknowledgeIEs); - -/** \brief Decode function for MBMSRegistrationRequestIEs ies. - * \param mbmsRegistrationRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsregistrationrequesties( - RANAP_MBMSRegistrationRequestIEs_t *mbmsRegistrationRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSRegistrationRequestIEs ies. - * \param ranaP_MBMSRegistrationRequest Pointer to the ASN1 structure. - * \param mbmsRegistrationRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsregistrationrequesties( - RANAP_MBMSRegistrationRequest_t *ranaP_MBMSRegistrationRequest, - RANAP_MBMSRegistrationRequestIEs_t *mbmsRegistrationRequestIEs); - -/** \brief Decode function for UplinkInformationExchangeRequestIEs ies. - * \param uplinkInformationExchangeRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_uplinkinformationexchangerequesties( - RANAP_UplinkInformationExchangeRequestIEs_t *uplinkInformationExchangeRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for UplinkInformationExchangeRequestIEs ies. - * \param ranaP_UplinkInformationExchangeRequest Pointer to the ASN1 structure. - * \param uplinkInformationExchangeRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_uplinkinformationexchangerequesties( - RANAP_UplinkInformationExchangeRequest_t *ranaP_UplinkInformationExchangeRequest, - RANAP_UplinkInformationExchangeRequestIEs_t *uplinkInformationExchangeRequestIEs); - -/** \brief Decode function for MBMSSessionStopResponseIEs ies. - * \param mbmsSessionStopResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionstopresponseies( - RANAP_MBMSSessionStopResponseIEs_t *mbmsSessionStopResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionStopResponseIEs ies. - * \param ranaP_MBMSSessionStopResponse Pointer to the ASN1 structure. - * \param mbmsSessionStopResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionstopresponseies( - RANAP_MBMSSessionStopResponse_t *ranaP_MBMSSessionStopResponse, - RANAP_MBMSSessionStopResponseIEs_t *mbmsSessionStopResponseIEs); - -/** \brief Decode function for RAB-ContextItemIEs-RANAP-RelocInf ies. - * \param raB_ContextItemIEs_RANAP_RelocInf Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_contextitemies_ranap_relocinf( - RANAP_RAB_ContextItemIEs_RANAP_RelocInf_t *raB_ContextItemIEs_RANAP_RelocInf, - ANY_t *any_p); - -/** \brief Encode function for RAB-ContextItemIEs-RANAP-RelocInf ies. - * \param ranaP_RAB_ContextList_RANAP_RelocInf Pointer to the ASN1 structure. - * \param raB_ContextItemIEs_RANAP_RelocInf Pointer to the IES structure. - **/ -int ranap_encode_rab_contextitemies_ranap_relocinf( - RANAP_RAB_ContextList_RANAP_RelocInf_t *ranaP_RAB_ContextList_RANAP_RelocInf, - RANAP_RAB_ContextItemIEs_RANAP_RelocInf_t *raB_ContextItemIEs_RANAP_RelocInf); - -/** \brief Decode function for LocationRelatedDataRequestIEs ies. - * \param locationRelatedDataRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_locationrelateddatarequesties( - RANAP_LocationRelatedDataRequestIEs_t *locationRelatedDataRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for LocationRelatedDataRequestIEs ies. - * \param ranaP_LocationRelatedDataRequest Pointer to the ASN1 structure. - * \param locationRelatedDataRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_locationrelateddatarequesties( - RANAP_LocationRelatedDataRequest_t *ranaP_LocationRelatedDataRequest, - RANAP_LocationRelatedDataRequestIEs_t *locationRelatedDataRequestIEs); - -/** \brief Decode function for RAB-DataForwardingItem-SRNS-CtxReq-IEs ies. - * \param raB_DataForwardingItem_SRNS_CtxReq_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_dataforwardingitem_srns_ctxreq_ies( - RANAP_RAB_DataForwardingItem_SRNS_CtxReq_IEs_t *raB_DataForwardingItem_SRNS_CtxReq_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-DataForwardingItem-SRNS-CtxReq-IEs ies. - * \param ranaP_RAB_DataForwardingList_SRNS_CtxReq Pointer to the ASN1 structure. - * \param raB_DataForwardingItem_SRNS_CtxReq_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_dataforwardingitem_srns_ctxreq_ies( - RANAP_RAB_DataForwardingList_SRNS_CtxReq_t *ranaP_RAB_DataForwardingList_SRNS_CtxReq, - RANAP_RAB_DataForwardingItem_SRNS_CtxReq_IEs_t *raB_DataForwardingItem_SRNS_CtxReq_IEs); - -/** \brief Decode function for RAB-ReleaseItemIEs ies. - * \param raB_ReleaseItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_releaseitemies( - RANAP_RAB_ReleaseItemIEs_t *raB_ReleaseItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ReleaseItemIEs ies. - * \param ranaP_RAB_ReleaseList Pointer to the ASN1 structure. - * \param raB_ReleaseItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_releaseitemies( - RANAP_RAB_ReleaseList_t *ranaP_RAB_ReleaseList, - RANAP_RAB_ReleaseItemIEs_t *raB_ReleaseItemIEs); - -/** \brief Decode function for RAB-DataVolumeReportRequestItemIEs ies. - * \param raB_DataVolumeReportRequestItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_datavolumereportrequestitemies( - RANAP_RAB_DataVolumeReportRequestItemIEs_t *raB_DataVolumeReportRequestItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-DataVolumeReportRequestItemIEs ies. - * \param ranaP_RAB_DataVolumeReportRequestList Pointer to the ASN1 structure. - * \param raB_DataVolumeReportRequestItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_datavolumereportrequestitemies( - RANAP_RAB_DataVolumeReportRequestList_t *ranaP_RAB_DataVolumeReportRequestList, - RANAP_RAB_DataVolumeReportRequestItemIEs_t *raB_DataVolumeReportRequestItemIEs); - -/** \brief Decode function for InformationTransferConfirmationIEs ies. - * \param informationTransferConfirmationIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_informationtransferconfirmationies( - RANAP_InformationTransferConfirmationIEs_t *informationTransferConfirmationIEs, - ANY_t *any_p); - -/** \brief Encode function for InformationTransferConfirmationIEs ies. - * \param ranaP_InformationTransferConfirmation Pointer to the ASN1 structure. - * \param informationTransferConfirmationIEs Pointer to the IES structure. - **/ -int ranap_encode_informationtransferconfirmationies( - RANAP_InformationTransferConfirmation_t *ranaP_InformationTransferConfirmation, - RANAP_InformationTransferConfirmationIEs_t *informationTransferConfirmationIEs); - -/** \brief Decode function for InitialUE-MessageIEs ies. - * \param initialUE_MessageIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_initialue_messageies( - RANAP_InitialUE_MessageIEs_t *initialUE_MessageIEs, - ANY_t *any_p); - -/** \brief Encode function for InitialUE-MessageIEs ies. - * \param ranaP_InitialUE_Message Pointer to the ASN1 structure. - * \param initialUE_MessageIEs Pointer to the IES structure. - **/ -int ranap_encode_initialue_messageies( - RANAP_InitialUE_Message_t *ranaP_InitialUE_Message, - RANAP_InitialUE_MessageIEs_t *initialUE_MessageIEs); - -/** \brief Decode function for SRNS-ContextResponseIEs ies. - * \param srnS_ContextResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_srns_contextresponseies( - RANAP_SRNS_ContextResponseIEs_t *srnS_ContextResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for SRNS-ContextResponseIEs ies. - * \param ranaP_SRNS_ContextResponse Pointer to the ASN1 structure. - * \param srnS_ContextResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_srns_contextresponseies( - RANAP_SRNS_ContextResponse_t *ranaP_SRNS_ContextResponse, - RANAP_SRNS_ContextResponseIEs_t *srnS_ContextResponseIEs); - -/** \brief Decode function for ResetResourceAckItemIEs ies. - * \param resetResourceAckItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_resetresourceackitemies( - RANAP_ResetResourceAckItemIEs_t *resetResourceAckItemIEs, - ANY_t *any_p); - -/** \brief Encode function for ResetResourceAckItemIEs ies. - * \param ranaP_ResetResourceAckList Pointer to the ASN1 structure. - * \param resetResourceAckItemIEs Pointer to the IES structure. - **/ -int ranap_encode_resetresourceackitemies( - RANAP_ResetResourceAckList_t *ranaP_ResetResourceAckList, - RANAP_ResetResourceAckItemIEs_t *resetResourceAckItemIEs); - -/** \brief Decode function for SRNS-DataForwardCommandIEs ies. - * \param srnS_DataForwardCommandIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_srns_dataforwardcommandies( - RANAP_SRNS_DataForwardCommandIEs_t *srnS_DataForwardCommandIEs, - ANY_t *any_p); - -/** \brief Encode function for SRNS-DataForwardCommandIEs ies. - * \param ranaP_SRNS_DataForwardCommand Pointer to the ASN1 structure. - * \param srnS_DataForwardCommandIEs Pointer to the IES structure. - **/ -int ranap_encode_srns_dataforwardcommandies( - RANAP_SRNS_DataForwardCommand_t *ranaP_SRNS_DataForwardCommand, - RANAP_SRNS_DataForwardCommandIEs_t *srnS_DataForwardCommandIEs); - -/** \brief Decode function for RelocationRequestIEs ies. - * \param relocationRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationrequesties( - RANAP_RelocationRequestIEs_t *relocationRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationRequestIEs ies. - * \param ranaP_RelocationRequest Pointer to the ASN1 structure. - * \param relocationRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationrequesties( - RANAP_RelocationRequest_t *ranaP_RelocationRequest, - RANAP_RelocationRequestIEs_t *relocationRequestIEs); - -/** \brief Decode function for SRNS-ContextRequestIEs ies. - * \param srnS_ContextRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_srns_contextrequesties( - RANAP_SRNS_ContextRequestIEs_t *srnS_ContextRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for SRNS-ContextRequestIEs ies. - * \param ranaP_SRNS_ContextRequest Pointer to the ASN1 structure. - * \param srnS_ContextRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_srns_contextrequesties( - RANAP_SRNS_ContextRequest_t *ranaP_SRNS_ContextRequest, - RANAP_SRNS_ContextRequestIEs_t *srnS_ContextRequestIEs); - -/** \brief Decode function for MBMSSessionStartResponseIEs ies. - * \param mbmsSessionStartResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionstartresponseies( - RANAP_MBMSSessionStartResponseIEs_t *mbmsSessionStartResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionStartResponseIEs ies. - * \param ranaP_MBMSSessionStartResponse Pointer to the ASN1 structure. - * \param mbmsSessionStartResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionstartresponseies( - RANAP_MBMSSessionStartResponse_t *ranaP_MBMSSessionStartResponse, - RANAP_MBMSSessionStartResponseIEs_t *mbmsSessionStartResponseIEs); - -/** \brief Decode function for DirectTransferIEs ies. - * \param directTransferIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_directtransferies( - RANAP_DirectTransferIEs_t *directTransferIEs, - ANY_t *any_p); - -/** \brief Encode function for DirectTransferIEs ies. - * \param ranaP_DirectTransfer Pointer to the ASN1 structure. - * \param directTransferIEs Pointer to the IES structure. - **/ -int ranap_encode_directtransferies( - RANAP_DirectTransfer_t *ranaP_DirectTransfer, - RANAP_DirectTransferIEs_t *directTransferIEs); - -/** \brief Decode function for ResetResourceIEs ies. - * \param resetResourceIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_resetresourceies( - RANAP_ResetResourceIEs_t *resetResourceIEs, - ANY_t *any_p); - -/** \brief Encode function for ResetResourceIEs ies. - * \param ranaP_ResetResource Pointer to the ASN1 structure. - * \param resetResourceIEs Pointer to the IES structure. - **/ -int ranap_encode_resetresourceies( - RANAP_ResetResource_t *ranaP_ResetResource, - RANAP_ResetResourceIEs_t *resetResourceIEs); - -/** \brief Decode function for RANAP-EnhancedRelocationInformationResponseIEs ies. - * \param ranaP_EnhancedRelocationInformationResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_ranap_enhancedrelocationinformationresponseies( - RANAP_RANAP_EnhancedRelocationInformationResponseIEs_t *ranaP_EnhancedRelocationInformationResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for RANAP-EnhancedRelocationInformationResponseIEs ies. - * \param ranaP_RANAP_EnhancedRelocationInformationResponse Pointer to the ASN1 structure. - * \param ranaP_EnhancedRelocationInformationResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_ranap_enhancedrelocationinformationresponseies( - RANAP_RANAP_EnhancedRelocationInformationResponse_t *ranaP_RANAP_EnhancedRelocationInformationResponse, - RANAP_RANAP_EnhancedRelocationInformationResponseIEs_t *ranaP_EnhancedRelocationInformationResponseIEs); - -/** \brief Decode function for RAB-SetupItem-EnhancedRelocCompleteRes-IEs ies. - * \param raB_SetupItem_EnhancedRelocCompleteRes_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_setupitem_enhancedreloccompleteres_ies( - RANAP_RAB_SetupItem_EnhancedRelocCompleteRes_IEs_t *raB_SetupItem_EnhancedRelocCompleteRes_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-SetupItem-EnhancedRelocCompleteRes-IEs ies. - * \param ranaP_RAB_SetupList_EnhancedRelocCompleteRes Pointer to the ASN1 structure. - * \param raB_SetupItem_EnhancedRelocCompleteRes_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_setupitem_enhancedreloccompleteres_ies( - RANAP_RAB_SetupList_EnhancedRelocCompleteRes_t *ranaP_RAB_SetupList_EnhancedRelocCompleteRes, - RANAP_RAB_SetupItem_EnhancedRelocCompleteRes_IEs_t *raB_SetupItem_EnhancedRelocCompleteRes_IEs); - -/** \brief Decode function for RANAP-EnhancedRelocationInformationRequestIEs ies. - * \param ranaP_EnhancedRelocationInformationRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_ranap_enhancedrelocationinformationrequesties( - RANAP_RANAP_EnhancedRelocationInformationRequestIEs_t *ranaP_EnhancedRelocationInformationRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for RANAP-EnhancedRelocationInformationRequestIEs ies. - * \param ranaP_RANAP_EnhancedRelocationInformationRequest Pointer to the ASN1 structure. - * \param ranaP_EnhancedRelocationInformationRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_ranap_enhancedrelocationinformationrequesties( - RANAP_RANAP_EnhancedRelocationInformationRequest_t *ranaP_RANAP_EnhancedRelocationInformationRequest, - RANAP_RANAP_EnhancedRelocationInformationRequestIEs_t *ranaP_EnhancedRelocationInformationRequestIEs); - -/** \brief Decode function for SecurityModeCommandIEs ies. - * \param securityModeCommandIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_securitymodecommandies( - RANAP_SecurityModeCommandIEs_t *securityModeCommandIEs, - ANY_t *any_p); - -/** \brief Encode function for SecurityModeCommandIEs ies. - * \param ranaP_SecurityModeCommand Pointer to the ASN1 structure. - * \param securityModeCommandIEs Pointer to the IES structure. - **/ -int ranap_encode_securitymodecommandies( - RANAP_SecurityModeCommand_t *ranaP_SecurityModeCommand, - RANAP_SecurityModeCommandIEs_t *securityModeCommandIEs); - -/** \brief Decode function for RelocationCancelIEs ies. - * \param relocationCancelIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationcancelies( - RANAP_RelocationCancelIEs_t *relocationCancelIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationCancelIEs ies. - * \param ranaP_RelocationCancel Pointer to the ASN1 structure. - * \param relocationCancelIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationcancelies( - RANAP_RelocationCancel_t *ranaP_RelocationCancel, - RANAP_RelocationCancelIEs_t *relocationCancelIEs); - -/** \brief Decode function for RAB-SetupItem-RelocReqAck-IEs ies. - * \param raB_SetupItem_RelocReqAck_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_setupitem_relocreqack_ies( - RANAP_RAB_SetupItem_RelocReqAck_IEs_t *raB_SetupItem_RelocReqAck_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-SetupItem-RelocReqAck-IEs ies. - * \param ranaP_RAB_SetupList_RelocReqAck Pointer to the ASN1 structure. - * \param raB_SetupItem_RelocReqAck_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_setupitem_relocreqack_ies( - RANAP_RAB_SetupList_RelocReqAck_t *ranaP_RAB_SetupList_RelocReqAck, - RANAP_RAB_SetupItem_RelocReqAck_IEs_t *raB_SetupItem_RelocReqAck_IEs); - -/** \brief Decode function for MBMSRegistrationFailureIEs ies. - * \param mbmsRegistrationFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsregistrationfailureies( - RANAP_MBMSRegistrationFailureIEs_t *mbmsRegistrationFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSRegistrationFailureIEs ies. - * \param ranaP_MBMSRegistrationFailure Pointer to the ASN1 structure. - * \param mbmsRegistrationFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsregistrationfailureies( - RANAP_MBMSRegistrationFailure_t *ranaP_MBMSRegistrationFailure, - RANAP_MBMSRegistrationFailureIEs_t *mbmsRegistrationFailureIEs); - -/** \brief Decode function for MBMSRABEstablishmentIndicationIEs ies. - * \param mbmsrabEstablishmentIndicationIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsrabestablishmentindicationies( - RANAP_MBMSRABEstablishmentIndicationIEs_t *mbmsrabEstablishmentIndicationIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSRABEstablishmentIndicationIEs ies. - * \param ranaP_MBMSRABEstablishmentIndication Pointer to the ASN1 structure. - * \param mbmsrabEstablishmentIndicationIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsrabestablishmentindicationies( - RANAP_MBMSRABEstablishmentIndication_t *ranaP_MBMSRABEstablishmentIndication, - RANAP_MBMSRABEstablishmentIndicationIEs_t *mbmsrabEstablishmentIndicationIEs); - -/** \brief Decode function for MBMSSessionStartFailureIEs ies. - * \param mbmsSessionStartFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionstartfailureies( - RANAP_MBMSSessionStartFailureIEs_t *mbmsSessionStartFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionStartFailureIEs ies. - * \param ranaP_MBMSSessionStartFailure Pointer to the ASN1 structure. - * \param mbmsSessionStartFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionstartfailureies( - RANAP_MBMSSessionStartFailure_t *ranaP_MBMSSessionStartFailure, - RANAP_MBMSSessionStartFailureIEs_t *mbmsSessionStartFailureIEs); - -/** \brief Decode function for Iu-ReleaseCompleteIEs ies. - * \param iu_ReleaseCompleteIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_iu_releasecompleteies( - RANAP_Iu_ReleaseCompleteIEs_t *iu_ReleaseCompleteIEs, - ANY_t *any_p); - -/** \brief Encode function for Iu-ReleaseCompleteIEs ies. - * \param ranaP_Iu_ReleaseComplete Pointer to the ASN1 structure. - * \param iu_ReleaseCompleteIEs Pointer to the IES structure. - **/ -int ranap_encode_iu_releasecompleteies( - RANAP_Iu_ReleaseComplete_t *ranaP_Iu_ReleaseComplete, - RANAP_Iu_ReleaseCompleteIEs_t *iu_ReleaseCompleteIEs); - -/** \brief Decode function for CN-DeactivateTraceIEs ies. - * \param cN_DeactivateTraceIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_cn_deactivatetraceies( - RANAP_CN_DeactivateTraceIEs_t *cN_DeactivateTraceIEs, - ANY_t *any_p); - -/** \brief Encode function for CN-DeactivateTraceIEs ies. - * \param ranaP_CN_DeactivateTrace Pointer to the ASN1 structure. - * \param cN_DeactivateTraceIEs Pointer to the IES structure. - **/ -int ranap_encode_cn_deactivatetraceies( - RANAP_CN_DeactivateTrace_t *ranaP_CN_DeactivateTrace, - RANAP_CN_DeactivateTraceIEs_t *cN_DeactivateTraceIEs); - -/** \brief Decode function for DataVolumeReportRequestIEs ies. - * \param dataVolumeReportRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_datavolumereportrequesties( - RANAP_DataVolumeReportRequestIEs_t *dataVolumeReportRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for DataVolumeReportRequestIEs ies. - * \param ranaP_DataVolumeReportRequest Pointer to the ASN1 structure. - * \param dataVolumeReportRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_datavolumereportrequesties( - RANAP_DataVolumeReportRequest_t *ranaP_DataVolumeReportRequest, - RANAP_DataVolumeReportRequestIEs_t *dataVolumeReportRequestIEs); - -/** \brief Decode function for RAB-RelocationReleaseItemIEs ies. - * \param raB_RelocationReleaseItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_relocationreleaseitemies( - RANAP_RAB_RelocationReleaseItemIEs_t *raB_RelocationReleaseItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-RelocationReleaseItemIEs ies. - * \param ranaP_RAB_RelocationReleaseList Pointer to the ASN1 structure. - * \param raB_RelocationReleaseItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_relocationreleaseitemies( - RANAP_RAB_RelocationReleaseList_t *ranaP_RAB_RelocationReleaseList, - RANAP_RAB_RelocationReleaseItemIEs_t *raB_RelocationReleaseItemIEs); - -/** \brief Decode function for RAB-ModifyRequestIEs ies. - * \param raB_ModifyRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_modifyrequesties( - RANAP_RAB_ModifyRequestIEs_t *raB_ModifyRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ModifyRequestIEs ies. - * \param ranaP_RAB_ModifyRequest Pointer to the ASN1 structure. - * \param raB_ModifyRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_modifyrequesties( - RANAP_RAB_ModifyRequest_t *ranaP_RAB_ModifyRequest, - RANAP_RAB_ModifyRequestIEs_t *raB_ModifyRequestIEs); - -/** \brief Decode function for SecurityModeCompleteIEs ies. - * \param securityModeCompleteIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_securitymodecompleteies( - RANAP_SecurityModeCompleteIEs_t *securityModeCompleteIEs, - ANY_t *any_p); - -/** \brief Encode function for SecurityModeCompleteIEs ies. - * \param ranaP_SecurityModeComplete Pointer to the ASN1 structure. - * \param securityModeCompleteIEs Pointer to the IES structure. - **/ -int ranap_encode_securitymodecompleteies( - RANAP_SecurityModeComplete_t *ranaP_SecurityModeComplete, - RANAP_SecurityModeCompleteIEs_t *securityModeCompleteIEs); - -/** \brief Decode function for MBMSRABReleaseIEs ies. - * \param mbmsrabReleaseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsrabreleaseies( - RANAP_MBMSRABReleaseIEs_t *mbmsrabReleaseIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSRABReleaseIEs ies. - * \param ranaP_MBMSRABRelease Pointer to the ASN1 structure. - * \param mbmsrabReleaseIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsrabreleaseies( - RANAP_MBMSRABRelease_t *ranaP_MBMSRABRelease, - RANAP_MBMSRABReleaseIEs_t *mbmsrabReleaseIEs); - -/** \brief Decode function for OverloadIEs ies. - * \param overloadIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_overloadies( - RANAP_OverloadIEs_t *overloadIEs, - ANY_t *any_p); - -/** \brief Encode function for OverloadIEs ies. - * \param ranaP_Overload Pointer to the ASN1 structure. - * \param overloadIEs Pointer to the IES structure. - **/ -int ranap_encode_overloadies( - RANAP_Overload_t *ranaP_Overload, - RANAP_OverloadIEs_t *overloadIEs); - -/** \brief Decode function for RAB-SetupItem-RelocReq-IEs ies. - * \param raB_SetupItem_RelocReq_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_setupitem_relocreq_ies( - RANAP_RAB_SetupItem_RelocReq_IEs_t *raB_SetupItem_RelocReq_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-SetupItem-RelocReq-IEs ies. - * \param ranaP_RAB_SetupList_RelocReq Pointer to the ASN1 structure. - * \param raB_SetupItem_RelocReq_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_setupitem_relocreq_ies( - RANAP_RAB_SetupList_RelocReq_t *ranaP_RAB_SetupList_RelocReq, - RANAP_RAB_SetupItem_RelocReq_IEs_t *raB_SetupItem_RelocReq_IEs); - -/** \brief Decode function for RAB-ModifyItemIEs ies. - * \param raB_ModifyItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_modifyitemies( - RANAP_RAB_ModifyItemIEs_t *raB_ModifyItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ModifyItemIEs ies. - * \param ranaP_RAB_ModifyList Pointer to the ASN1 structure. - * \param raB_ModifyItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_modifyitemies( - RANAP_RAB_ModifyList_t *ranaP_RAB_ModifyList, - RANAP_RAB_ModifyItemIEs_t *raB_ModifyItemIEs); - -/** \brief Decode function for MBMSRegistrationResponseIEs ies. - * \param mbmsRegistrationResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsregistrationresponseies( - RANAP_MBMSRegistrationResponseIEs_t *mbmsRegistrationResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSRegistrationResponseIEs ies. - * \param ranaP_MBMSRegistrationResponse Pointer to the ASN1 structure. - * \param mbmsRegistrationResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsregistrationresponseies( - RANAP_MBMSRegistrationResponse_t *ranaP_MBMSRegistrationResponse, - RANAP_MBMSRegistrationResponseIEs_t *mbmsRegistrationResponseIEs); - -/** \brief Decode function for ForwardSRNS-ContextIEs ies. - * \param forwardSRNS_ContextIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_forwardsrns_contexties( - RANAP_ForwardSRNS_ContextIEs_t *forwardSRNS_ContextIEs, - ANY_t *any_p); - -/** \brief Encode function for ForwardSRNS-ContextIEs ies. - * \param ranaP_ForwardSRNS_Context Pointer to the ASN1 structure. - * \param forwardSRNS_ContextIEs Pointer to the IES structure. - **/ -int ranap_encode_forwardsrns_contexties( - RANAP_ForwardSRNS_Context_t *ranaP_ForwardSRNS_Context, - RANAP_ForwardSRNS_ContextIEs_t *forwardSRNS_ContextIEs); - -/** \brief Decode function for UplinkInformationExchangeFailureIEs ies. - * \param uplinkInformationExchangeFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_uplinkinformationexchangefailureies( - RANAP_UplinkInformationExchangeFailureIEs_t *uplinkInformationExchangeFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for UplinkInformationExchangeFailureIEs ies. - * \param ranaP_UplinkInformationExchangeFailure Pointer to the ASN1 structure. - * \param uplinkInformationExchangeFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_uplinkinformationexchangefailureies( - RANAP_UplinkInformationExchangeFailure_t *ranaP_UplinkInformationExchangeFailure, - RANAP_UplinkInformationExchangeFailureIEs_t *uplinkInformationExchangeFailureIEs); - -/** \brief Decode function for RAB-SetupItem-EnhRelocInfoRes-IEs ies. - * \param raB_SetupItem_EnhRelocInfoRes_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_setupitem_enhrelocinfores_ies( - RANAP_RAB_SetupItem_EnhRelocInfoRes_IEs_t *raB_SetupItem_EnhRelocInfoRes_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-SetupItem-EnhRelocInfoRes-IEs ies. - * \param ranaP_RAB_SetupList_EnhRelocInfoRes Pointer to the ASN1 structure. - * \param raB_SetupItem_EnhRelocInfoRes_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_setupitem_enhrelocinfores_ies( - RANAP_RAB_SetupList_EnhRelocInfoRes_t *ranaP_RAB_SetupList_EnhRelocInfoRes, - RANAP_RAB_SetupItem_EnhRelocInfoRes_IEs_t *raB_SetupItem_EnhRelocInfoRes_IEs); - -/** \brief Decode function for DataVolumeReportIEs ies. - * \param dataVolumeReportIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_datavolumereporties( - RANAP_DataVolumeReportIEs_t *dataVolumeReportIEs, - ANY_t *any_p); - -/** \brief Encode function for DataVolumeReportIEs ies. - * \param ranaP_DataVolumeReport Pointer to the ASN1 structure. - * \param dataVolumeReportIEs Pointer to the IES structure. - **/ -int ranap_encode_datavolumereporties( - RANAP_DataVolumeReport_t *ranaP_DataVolumeReport, - RANAP_DataVolumeReportIEs_t *dataVolumeReportIEs); - -/** \brief Decode function for InformationTransferIndicationIEs ies. - * \param informationTransferIndicationIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_informationtransferindicationies( - RANAP_InformationTransferIndicationIEs_t *informationTransferIndicationIEs, - ANY_t *any_p); - -/** \brief Encode function for InformationTransferIndicationIEs ies. - * \param ranaP_InformationTransferIndication Pointer to the ASN1 structure. - * \param informationTransferIndicationIEs Pointer to the IES structure. - **/ -int ranap_encode_informationtransferindicationies( - RANAP_InformationTransferIndication_t *ranaP_InformationTransferIndication, - RANAP_InformationTransferIndicationIEs_t *informationTransferIndicationIEs); - -/** \brief Decode function for RAB-FailedItem-EnhRelocInfoRes-IEs ies. - * \param raB_FailedItem_EnhRelocInfoRes_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_faileditem_enhrelocinfores_ies( - RANAP_RAB_FailedItem_EnhRelocInfoRes_IEs_t *raB_FailedItem_EnhRelocInfoRes_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-FailedItem-EnhRelocInfoRes-IEs ies. - * \param ranaP_RAB_FailedList_EnhRelocInfoRes Pointer to the ASN1 structure. - * \param raB_FailedItem_EnhRelocInfoRes_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_faileditem_enhrelocinfores_ies( - RANAP_RAB_FailedList_EnhRelocInfoRes_t *ranaP_RAB_FailedList_EnhRelocInfoRes, - RANAP_RAB_FailedItem_EnhRelocInfoRes_IEs_t *raB_FailedItem_EnhRelocInfoRes_IEs); - -/** \brief Decode function for InformationTransferFailureIEs ies. - * \param informationTransferFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_informationtransferfailureies( - RANAP_InformationTransferFailureIEs_t *informationTransferFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for InformationTransferFailureIEs ies. - * \param ranaP_InformationTransferFailure Pointer to the ASN1 structure. - * \param informationTransferFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_informationtransferfailureies( - RANAP_InformationTransferFailure_t *ranaP_InformationTransferFailure, - RANAP_InformationTransferFailureIEs_t *informationTransferFailureIEs); - -/** \brief Decode function for CommonID-IEs ies. - * \param commonID_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_commonid_ies( - RANAP_CommonID_IEs_t *commonID_IEs, - ANY_t *any_p); - -/** \brief Encode function for CommonID-IEs ies. - * \param ranaP_CommonID Pointer to the ASN1 structure. - * \param commonID_IEs Pointer to the IES structure. - **/ -int ranap_encode_commonid_ies( - RANAP_CommonID_t *ranaP_CommonID, - RANAP_CommonID_IEs_t *commonID_IEs); - -/** \brief Decode function for MBMSUELinkingRequestIEs ies. - * \param mbmsueLinkingRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsuelinkingrequesties( - RANAP_MBMSUELinkingRequestIEs_t *mbmsueLinkingRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSUELinkingRequestIEs ies. - * \param ranaP_MBMSUELinkingRequest Pointer to the ASN1 structure. - * \param mbmsueLinkingRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsuelinkingrequesties( - RANAP_MBMSUELinkingRequest_t *ranaP_MBMSUELinkingRequest, - RANAP_MBMSUELinkingRequestIEs_t *mbmsueLinkingRequestIEs); - -/** \brief Decode function for ErrorIndicationIEs ies. - * \param errorIndicationIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_errorindicationies( - RANAP_ErrorIndicationIEs_t *errorIndicationIEs, - ANY_t *any_p); - -/** \brief Encode function for ErrorIndicationIEs ies. - * \param ranaP_ErrorIndication Pointer to the ASN1 structure. - * \param errorIndicationIEs Pointer to the IES structure. - **/ -int ranap_encode_errorindicationies( - RANAP_ErrorIndication_t *ranaP_ErrorIndication, - RANAP_ErrorIndicationIEs_t *errorIndicationIEs); - -/** \brief Decode function for RedirectionIndication-IEs ies. - * \param redirectionIndication_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_redirectionindication_ies( - RANAP_RedirectionIndication_IEs_t *redirectionIndication_IEs, - ANY_t *any_p); - -/** \brief Encode function for RedirectionIndication-IEs ies. - * \param ranaP_RedirectionIndication Pointer to the ASN1 structure. - * \param redirectionIndication_IEs Pointer to the IES structure. - **/ -int ranap_encode_redirectionindication_ies( - RANAP_RedirectionIndication_t *ranaP_RedirectionIndication, - RANAP_RedirectionIndication_IEs_t *redirectionIndication_IEs); - -/** \brief Decode function for RAB-DataForwardingItemIEs ies. - * \param raB_DataForwardingItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_dataforwardingitemies( - RANAP_RAB_DataForwardingItemIEs_t *raB_DataForwardingItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-DataForwardingItemIEs ies. - * \param ranaP_RAB_DataForwardingList Pointer to the ASN1 structure. - * \param raB_DataForwardingItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_dataforwardingitemies( - RANAP_RAB_DataForwardingList_t *ranaP_RAB_DataForwardingList, - RANAP_RAB_DataForwardingItemIEs_t *raB_DataForwardingItemIEs); - -/** \brief Decode function for RAB-SetupItem-EnhRelocInfoReq-IEs ies. - * \param raB_SetupItem_EnhRelocInfoReq_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_setupitem_enhrelocinforeq_ies( - RANAP_RAB_SetupItem_EnhRelocInfoReq_IEs_t *raB_SetupItem_EnhRelocInfoReq_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-SetupItem-EnhRelocInfoReq-IEs ies. - * \param ranaP_RAB_SetupList_EnhRelocInfoReq Pointer to the ASN1 structure. - * \param raB_SetupItem_EnhRelocInfoReq_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_setupitem_enhrelocinforeq_ies( - RANAP_RAB_SetupList_EnhRelocInfoReq_t *ranaP_RAB_SetupList_EnhRelocInfoReq, - RANAP_RAB_SetupItem_EnhRelocInfoReq_IEs_t *raB_SetupItem_EnhRelocInfoReq_IEs); - -/** \brief Decode function for MBMSRABReleaseFailureIEs ies. - * \param mbmsrabReleaseFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsrabreleasefailureies( - RANAP_MBMSRABReleaseFailureIEs_t *mbmsrabReleaseFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSRABReleaseFailureIEs ies. - * \param ranaP_MBMSRABReleaseFailure Pointer to the ASN1 structure. - * \param mbmsrabReleaseFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsrabreleasefailureies( - RANAP_MBMSRABReleaseFailure_t *ranaP_MBMSRABReleaseFailure, - RANAP_MBMSRABReleaseFailureIEs_t *mbmsrabReleaseFailureIEs); - -/** \brief Decode function for RAB-DataVolumeReportItemIEs ies. - * \param raB_DataVolumeReportItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_datavolumereportitemies( - RANAP_RAB_DataVolumeReportItemIEs_t *raB_DataVolumeReportItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-DataVolumeReportItemIEs ies. - * \param ranaP_RAB_DataVolumeReportList Pointer to the ASN1 structure. - * \param raB_DataVolumeReportItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_datavolumereportitemies( - RANAP_RAB_DataVolumeReportList_t *ranaP_RAB_DataVolumeReportList, - RANAP_RAB_DataVolumeReportItemIEs_t *raB_DataVolumeReportItemIEs); - -/** \brief Decode function for DirectInformationTransferIEs ies. - * \param directInformationTransferIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_directinformationtransferies( - RANAP_DirectInformationTransferIEs_t *directInformationTransferIEs, - ANY_t *any_p); - -/** \brief Encode function for DirectInformationTransferIEs ies. - * \param ranaP_DirectInformationTransfer Pointer to the ASN1 structure. - * \param directInformationTransferIEs Pointer to the IES structure. - **/ -int ranap_encode_directinformationtransferies( - RANAP_DirectInformationTransfer_t *ranaP_DirectInformationTransfer, - RANAP_DirectInformationTransferIEs_t *directInformationTransferIEs); - -/** \brief Decode function for RelocationCommandIEs ies. - * \param relocationCommandIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationcommandies( - RANAP_RelocationCommandIEs_t *relocationCommandIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationCommandIEs ies. - * \param ranaP_RelocationCommand Pointer to the ASN1 structure. - * \param relocationCommandIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationcommandies( - RANAP_RelocationCommand_t *ranaP_RelocationCommand, - RANAP_RelocationCommandIEs_t *relocationCommandIEs); - -/** \brief Decode function for UplinkInformationExchangeResponseIEs ies. - * \param uplinkInformationExchangeResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_uplinkinformationexchangeresponseies( - RANAP_UplinkInformationExchangeResponseIEs_t *uplinkInformationExchangeResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for UplinkInformationExchangeResponseIEs ies. - * \param ranaP_UplinkInformationExchangeResponse Pointer to the ASN1 structure. - * \param uplinkInformationExchangeResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_uplinkinformationexchangeresponseies( - RANAP_UplinkInformationExchangeResponse_t *ranaP_UplinkInformationExchangeResponse, - RANAP_UplinkInformationExchangeResponseIEs_t *uplinkInformationExchangeResponseIEs); - -/** \brief Decode function for MBMSRABReleaseRequestIEs ies. - * \param mbmsrabReleaseRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsrabreleaserequesties( - RANAP_MBMSRABReleaseRequestIEs_t *mbmsrabReleaseRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSRABReleaseRequestIEs ies. - * \param ranaP_MBMSRABReleaseRequest Pointer to the ASN1 structure. - * \param mbmsrabReleaseRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsrabreleaserequesties( - RANAP_MBMSRABReleaseRequest_t *ranaP_MBMSRABReleaseRequest, - RANAP_MBMSRABReleaseRequestIEs_t *mbmsrabReleaseRequestIEs); - -/** \brief Decode function for RAB-AssignmentRequestIEs ies. - * \param raB_AssignmentRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_assignmentrequesties( - RANAP_RAB_AssignmentRequestIEs_t *raB_AssignmentRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-AssignmentRequestIEs ies. - * \param ranaP_RAB_AssignmentRequest Pointer to the ASN1 structure. - * \param raB_AssignmentRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_assignmentrequesties( - RANAP_RAB_AssignmentRequest_t *ranaP_RAB_AssignmentRequest, - RANAP_RAB_AssignmentRequestIEs_t *raB_AssignmentRequestIEs); - -/** \brief Decode function for RAB-ReleasedItem-IuRelComp-IEs ies. - * \param raB_ReleasedItem_IuRelComp_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_releaseditem_iurelcomp_ies( - RANAP_RAB_ReleasedItem_IuRelComp_IEs_t *raB_ReleasedItem_IuRelComp_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ReleasedItem-IuRelComp-IEs ies. - * \param ranaP_RAB_ReleasedList_IuRelComp Pointer to the ASN1 structure. - * \param raB_ReleasedItem_IuRelComp_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_releaseditem_iurelcomp_ies( - RANAP_RAB_ReleasedList_IuRelComp_t *ranaP_RAB_ReleasedList_IuRelComp, - RANAP_RAB_ReleasedItem_IuRelComp_IEs_t *raB_ReleasedItem_IuRelComp_IEs); - -/** \brief Decode function for EnhancedRelocationCompleteResponseIEs ies. - * \param enhancedRelocationCompleteResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_enhancedrelocationcompleteresponseies( - RANAP_EnhancedRelocationCompleteResponseIEs_t *enhancedRelocationCompleteResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for EnhancedRelocationCompleteResponseIEs ies. - * \param ranaP_EnhancedRelocationCompleteResponse Pointer to the ASN1 structure. - * \param enhancedRelocationCompleteResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_enhancedrelocationcompleteresponseies( - RANAP_EnhancedRelocationCompleteResponse_t *ranaP_EnhancedRelocationCompleteResponse, - RANAP_EnhancedRelocationCompleteResponseIEs_t *enhancedRelocationCompleteResponseIEs); - -/** \brief Decode function for LocationReportIEs ies. - * \param locationReportIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_locationreporties( - RANAP_LocationReportIEs_t *locationReportIEs, - ANY_t *any_p); - -/** \brief Encode function for LocationReportIEs ies. - * \param ranaP_LocationReport Pointer to the ASN1 structure. - * \param locationReportIEs Pointer to the IES structure. - **/ -int ranap_encode_locationreporties( - RANAP_LocationReport_t *ranaP_LocationReport, - RANAP_LocationReportIEs_t *locationReportIEs); - -/** \brief Decode function for RAB-SetupItem-EnhancedRelocCompleteReq-IEs ies. - * \param raB_SetupItem_EnhancedRelocCompleteReq_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_setupitem_enhancedreloccompletereq_ies( - RANAP_RAB_SetupItem_EnhancedRelocCompleteReq_IEs_t *raB_SetupItem_EnhancedRelocCompleteReq_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-SetupItem-EnhancedRelocCompleteReq-IEs ies. - * \param ranaP_RAB_SetupList_EnhancedRelocCompleteReq Pointer to the ASN1 structure. - * \param raB_SetupItem_EnhancedRelocCompleteReq_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_setupitem_enhancedreloccompletereq_ies( - RANAP_RAB_SetupList_EnhancedRelocCompleteReq_t *ranaP_RAB_SetupList_EnhancedRelocCompleteReq, - RANAP_RAB_SetupItem_EnhancedRelocCompleteReq_IEs_t *raB_SetupItem_EnhancedRelocCompleteReq_IEs); - -/** \brief Decode function for RAB-AssignmentResponseIEs ies. - * \param raB_AssignmentResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_assignmentresponseies( - RANAP_RAB_AssignmentResponseIEs_t *raB_AssignmentResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-AssignmentResponseIEs ies. - * \param ranaP_RAB_AssignmentResponse Pointer to the ASN1 structure. - * \param raB_AssignmentResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_assignmentresponseies( - RANAP_RAB_AssignmentResponse_t *ranaP_RAB_AssignmentResponse, - RANAP_RAB_AssignmentResponseIEs_t *raB_AssignmentResponseIEs); - -/** \brief Decode function for RAB-ContextItemIEs ies. - * \param raB_ContextItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_contextitemies( - RANAP_RAB_ContextItemIEs_t *raB_ContextItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ContextItemIEs ies. - * \param ranaP_RAB_ContextList Pointer to the ASN1 structure. - * \param raB_ContextItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_contextitemies( - RANAP_RAB_ContextList_t *ranaP_RAB_ContextList, - RANAP_RAB_ContextItemIEs_t *raB_ContextItemIEs); - -/** \brief Decode function for MBMSSessionUpdateResponseIEs ies. - * \param mbmsSessionUpdateResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionupdateresponseies( - RANAP_MBMSSessionUpdateResponseIEs_t *mbmsSessionUpdateResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionUpdateResponseIEs ies. - * \param ranaP_MBMSSessionUpdateResponse Pointer to the ASN1 structure. - * \param mbmsSessionUpdateResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionupdateresponseies( - RANAP_MBMSSessionUpdateResponse_t *ranaP_MBMSSessionUpdateResponse, - RANAP_MBMSSessionUpdateResponseIEs_t *mbmsSessionUpdateResponseIEs); - -/** \brief Decode function for UeRadioCapabilityMatchResponseIEs ies. - * \param ueRadioCapabilityMatchResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_ueradiocapabilitymatchresponseies( - RANAP_UeRadioCapabilityMatchResponseIEs_t *ueRadioCapabilityMatchResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for UeRadioCapabilityMatchResponseIEs ies. - * \param ranaP_UeRadioCapabilityMatchResponse Pointer to the ASN1 structure. - * \param ueRadioCapabilityMatchResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_ueradiocapabilitymatchresponseies( - RANAP_UeRadioCapabilityMatchResponse_t *ranaP_UeRadioCapabilityMatchResponse, - RANAP_UeRadioCapabilityMatchResponseIEs_t *ueRadioCapabilityMatchResponseIEs); - -/** \brief Decode function for RAB-ReleaseRequestIEs ies. - * \param raB_ReleaseRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_releaserequesties( - RANAP_RAB_ReleaseRequestIEs_t *raB_ReleaseRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ReleaseRequestIEs ies. - * \param ranaP_RAB_ReleaseRequest Pointer to the ASN1 structure. - * \param raB_ReleaseRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_releaserequesties( - RANAP_RAB_ReleaseRequest_t *ranaP_RAB_ReleaseRequest, - RANAP_RAB_ReleaseRequestIEs_t *raB_ReleaseRequestIEs); - -/** \brief Decode function for EnhancedRelocationCompleteConfirmIEs ies. - * \param enhancedRelocationCompleteConfirmIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_enhancedrelocationcompleteconfirmies( - RANAP_EnhancedRelocationCompleteConfirmIEs_t *enhancedRelocationCompleteConfirmIEs, - ANY_t *any_p); - -/** \brief Encode function for EnhancedRelocationCompleteConfirmIEs ies. - * \param ranaP_EnhancedRelocationCompleteConfirm Pointer to the ASN1 structure. - * \param enhancedRelocationCompleteConfirmIEs Pointer to the IES structure. - **/ -int ranap_encode_enhancedrelocationcompleteconfirmies( - RANAP_EnhancedRelocationCompleteConfirm_t *ranaP_EnhancedRelocationCompleteConfirm, - RANAP_EnhancedRelocationCompleteConfirmIEs_t *enhancedRelocationCompleteConfirmIEs); - -/** \brief Decode function for MBMSSessionUpdateIEs ies. - * \param mbmsSessionUpdateIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionupdateies( - RANAP_MBMSSessionUpdateIEs_t *mbmsSessionUpdateIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionUpdateIEs ies. - * \param ranaP_MBMSSessionUpdate Pointer to the ASN1 structure. - * \param mbmsSessionUpdateIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionupdateies( - RANAP_MBMSSessionUpdate_t *ranaP_MBMSSessionUpdate, - RANAP_MBMSSessionUpdateIEs_t *mbmsSessionUpdateIEs); - -/** \brief Decode function for MBMSSessionStartIEs ies. - * \param mbmsSessionStartIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionstarties( - RANAP_MBMSSessionStartIEs_t *mbmsSessionStartIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionStartIEs ies. - * \param ranaP_MBMSSessionStart Pointer to the ASN1 structure. - * \param mbmsSessionStartIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionstarties( - RANAP_MBMSSessionStart_t *ranaP_MBMSSessionStart, - RANAP_MBMSSessionStartIEs_t *mbmsSessionStartIEs); - -/** \brief Decode function for LocationRelatedDataResponseIEs ies. - * \param locationRelatedDataResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_locationrelateddataresponseies( - RANAP_LocationRelatedDataResponseIEs_t *locationRelatedDataResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for LocationRelatedDataResponseIEs ies. - * \param ranaP_LocationRelatedDataResponse Pointer to the ASN1 structure. - * \param locationRelatedDataResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_locationrelateddataresponseies( - RANAP_LocationRelatedDataResponse_t *ranaP_LocationRelatedDataResponse, - RANAP_LocationRelatedDataResponseIEs_t *locationRelatedDataResponseIEs); - -/** \brief Decode function for RAB-SetupOrModifiedItemIEs ies. - * \param raB_SetupOrModifiedItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_setupormodifieditemies( - RANAP_RAB_SetupOrModifiedItemIEs_t *raB_SetupOrModifiedItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-SetupOrModifiedItemIEs ies. - * \param ranaP_RAB_SetupOrModifiedList Pointer to the ASN1 structure. - * \param raB_SetupOrModifiedItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_setupormodifieditemies( - RANAP_RAB_SetupOrModifiedList_t *ranaP_RAB_SetupOrModifiedList, - RANAP_RAB_SetupOrModifiedItemIEs_t *raB_SetupOrModifiedItemIEs); - -int ranap_free_rab_releaseditemies( - RANAP_RAB_ReleasedItemIEs_t *raB_ReleasedItemIEs); - -int ranap_free_iu_releaserequesties( - RANAP_Iu_ReleaseRequestIEs_t *iu_ReleaseRequestIEs); - -int ranap_free_uespecificinformationindicationies( - RANAP_UESpecificInformationIndicationIEs_t *ueSpecificInformationIndicationIEs); - -int ranap_free_enhancedrelocationcompletefailureies( - RANAP_EnhancedRelocationCompleteFailureIEs_t *enhancedRelocationCompleteFailureIEs); - -int ranap_free_mbmscnde_registrationresponseies( - RANAP_MBMSCNDe_RegistrationResponseIEs_t *mbmscnDe_RegistrationResponseIEs); - -int ranap_free_securitymoderejecties( - RANAP_SecurityModeRejectIEs_t *securityModeRejectIEs); - -int ranap_free_ranap_relocationinformationies( - RANAP_RANAP_RelocationInformationIEs_t *ranaP_RelocationInformationIEs); - -int ranap_free_resetacknowledgeies( - RANAP_ResetAcknowledgeIEs_t *resetAcknowledgeIEs); - -int ranap_free_relocationcancelacknowledgeies( - RANAP_RelocationCancelAcknowledgeIEs_t *relocationCancelAcknowledgeIEs); - -int ranap_free_srvcc_cskeysresponseies( - RANAP_SRVCC_CSKeysResponseIEs_t *srvcC_CSKeysResponseIEs); - -int ranap_free_mbmscnde_registrationrequesties( - RANAP_MBMSCNDe_RegistrationRequestIEs_t *mbmscnDe_RegistrationRequestIEs); - -int ranap_free_pagingies( - RANAP_PagingIEs_t *pagingIEs); - -int ranap_free_geran_iumode_rab_failed_rabassgntresponse_itemies( - RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs_t *geraN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs); - -int ranap_free_resetresourceitemies( - RANAP_ResetResourceItemIEs_t *resetResourceItemIEs); - -int ranap_free_locationreportingcontrolies( - RANAP_LocationReportingControlIEs_t *locationReportingControlIEs); - -int ranap_free_enhancedrelocationcompleterequesties( - RANAP_EnhancedRelocationCompleteRequestIEs_t *enhancedRelocationCompleteRequestIEs); - -int ranap_free_rab_faileditemies( - RANAP_RAB_FailedItemIEs_t *raB_FailedItemIEs); - -int ranap_free_mbmsuelinkingresponseies( - RANAP_MBMSUELinkingResponseIEs_t *mbmsueLinkingResponseIEs); - -int ranap_free_rab_queueditemies( - RANAP_RAB_QueuedItemIEs_t *raB_QueuedItemIEs); - -int ranap_free_cn_invoketraceies( - RANAP_CN_InvokeTraceIEs_t *cN_InvokeTraceIEs); - -int ranap_free_iu_releasecommandies( - RANAP_Iu_ReleaseCommandIEs_t *iu_ReleaseCommandIEs); - -int ranap_free_relocationrequestacknowledgeies( - RANAP_RelocationRequestAcknowledgeIEs_t *relocationRequestAcknowledgeIEs); - -int ranap_free_relocationfailureies( - RANAP_RelocationFailureIEs_t *relocationFailureIEs); - -int ranap_free_rabs_failed_to_reportitemies( - RANAP_RABs_failed_to_reportItemIEs_t *raBs_failed_to_reportItemIEs); - -int ranap_free_relocationpreparationfailureies( - RANAP_RelocationPreparationFailureIEs_t *relocationPreparationFailureIEs); - -int ranap_free_rab_tobereleaseditem_enhancedreloccompleteres_ies( - RANAP_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs_t *raB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs); - -int ranap_free_rabs_contextfailedtotransferitemies( - RANAP_RABs_ContextFailedtoTransferItemIEs_t *raBs_ContextFailedtoTransferItemIEs); - -int ranap_free_relocationrequiredies( - RANAP_RelocationRequiredIEs_t *relocationRequiredIEs); - -int ranap_free_mbmssessionstopies( - RANAP_MBMSSessionStopIEs_t *mbmsSessionStopIEs); - -int ranap_free_mbmssessionupdatefailureies( - RANAP_MBMSSessionUpdateFailureIEs_t *mbmsSessionUpdateFailureIEs); - -int ranap_free_reseties( - RANAP_ResetIEs_t *resetIEs); - -int ranap_free_locationrelateddatafailureies( - RANAP_LocationRelatedDataFailureIEs_t *locationRelatedDataFailureIEs); - -int ranap_free_resetresourceacknowledgeies( - RANAP_ResetResourceAcknowledgeIEs_t *resetResourceAcknowledgeIEs); - -int ranap_free_mbmsregistrationrequesties( - RANAP_MBMSRegistrationRequestIEs_t *mbmsRegistrationRequestIEs); - -int ranap_free_uplinkinformationexchangerequesties( - RANAP_UplinkInformationExchangeRequestIEs_t *uplinkInformationExchangeRequestIEs); - -int ranap_free_mbmssessionstopresponseies( - RANAP_MBMSSessionStopResponseIEs_t *mbmsSessionStopResponseIEs); - -int ranap_free_rab_contextitemies_ranap_relocinf( - RANAP_RAB_ContextItemIEs_RANAP_RelocInf_t *raB_ContextItemIEs_RANAP_RelocInf); - -int ranap_free_locationrelateddatarequesties( - RANAP_LocationRelatedDataRequestIEs_t *locationRelatedDataRequestIEs); - -int ranap_free_rab_dataforwardingitem_srns_ctxreq_ies( - RANAP_RAB_DataForwardingItem_SRNS_CtxReq_IEs_t *raB_DataForwardingItem_SRNS_CtxReq_IEs); - -int ranap_free_rab_releaseitemies( - RANAP_RAB_ReleaseItemIEs_t *raB_ReleaseItemIEs); - -int ranap_free_rab_datavolumereportrequestitemies( - RANAP_RAB_DataVolumeReportRequestItemIEs_t *raB_DataVolumeReportRequestItemIEs); - -int ranap_free_informationtransferconfirmationies( - RANAP_InformationTransferConfirmationIEs_t *informationTransferConfirmationIEs); - -int ranap_free_initialue_messageies( - RANAP_InitialUE_MessageIEs_t *initialUE_MessageIEs); - -int ranap_free_srns_contextresponseies( - RANAP_SRNS_ContextResponseIEs_t *srnS_ContextResponseIEs); - -int ranap_free_resetresourceackitemies( - RANAP_ResetResourceAckItemIEs_t *resetResourceAckItemIEs); - -int ranap_free_srns_dataforwardcommandies( - RANAP_SRNS_DataForwardCommandIEs_t *srnS_DataForwardCommandIEs); - -int ranap_free_relocationrequesties( - RANAP_RelocationRequestIEs_t *relocationRequestIEs); - -int ranap_free_srns_contextrequesties( - RANAP_SRNS_ContextRequestIEs_t *srnS_ContextRequestIEs); - -int ranap_free_mbmssessionstartresponseies( - RANAP_MBMSSessionStartResponseIEs_t *mbmsSessionStartResponseIEs); - -int ranap_free_directtransferies( - RANAP_DirectTransferIEs_t *directTransferIEs); - -int ranap_free_resetresourceies( - RANAP_ResetResourceIEs_t *resetResourceIEs); - -int ranap_free_ranap_enhancedrelocationinformationresponseies( - RANAP_RANAP_EnhancedRelocationInformationResponseIEs_t *ranaP_EnhancedRelocationInformationResponseIEs); - -int ranap_free_rab_setupitem_enhancedreloccompleteres_ies( - RANAP_RAB_SetupItem_EnhancedRelocCompleteRes_IEs_t *raB_SetupItem_EnhancedRelocCompleteRes_IEs); - -int ranap_free_ranap_enhancedrelocationinformationrequesties( - RANAP_RANAP_EnhancedRelocationInformationRequestIEs_t *ranaP_EnhancedRelocationInformationRequestIEs); - -int ranap_free_securitymodecommandies( - RANAP_SecurityModeCommandIEs_t *securityModeCommandIEs); - -int ranap_free_relocationcancelies( - RANAP_RelocationCancelIEs_t *relocationCancelIEs); - -int ranap_free_rab_setupitem_relocreqack_ies( - RANAP_RAB_SetupItem_RelocReqAck_IEs_t *raB_SetupItem_RelocReqAck_IEs); - -int ranap_free_mbmsregistrationfailureies( - RANAP_MBMSRegistrationFailureIEs_t *mbmsRegistrationFailureIEs); - -int ranap_free_mbmsrabestablishmentindicationies( - RANAP_MBMSRABEstablishmentIndicationIEs_t *mbmsrabEstablishmentIndicationIEs); - -int ranap_free_mbmssessionstartfailureies( - RANAP_MBMSSessionStartFailureIEs_t *mbmsSessionStartFailureIEs); - -int ranap_free_iu_releasecompleteies( - RANAP_Iu_ReleaseCompleteIEs_t *iu_ReleaseCompleteIEs); - -int ranap_free_cn_deactivatetraceies( - RANAP_CN_DeactivateTraceIEs_t *cN_DeactivateTraceIEs); - -int ranap_free_datavolumereportrequesties( - RANAP_DataVolumeReportRequestIEs_t *dataVolumeReportRequestIEs); - -int ranap_free_rab_relocationreleaseitemies( - RANAP_RAB_RelocationReleaseItemIEs_t *raB_RelocationReleaseItemIEs); - -int ranap_free_rab_modifyrequesties( - RANAP_RAB_ModifyRequestIEs_t *raB_ModifyRequestIEs); - -int ranap_free_securitymodecompleteies( - RANAP_SecurityModeCompleteIEs_t *securityModeCompleteIEs); - -int ranap_free_mbmsrabreleaseies( - RANAP_MBMSRABReleaseIEs_t *mbmsrabReleaseIEs); - -int ranap_free_overloadies( - RANAP_OverloadIEs_t *overloadIEs); - -int ranap_free_rab_setupitem_relocreq_ies( - RANAP_RAB_SetupItem_RelocReq_IEs_t *raB_SetupItem_RelocReq_IEs); - -int ranap_free_rab_modifyitemies( - RANAP_RAB_ModifyItemIEs_t *raB_ModifyItemIEs); - -int ranap_free_mbmsregistrationresponseies( - RANAP_MBMSRegistrationResponseIEs_t *mbmsRegistrationResponseIEs); - -int ranap_free_forwardsrns_contexties( - RANAP_ForwardSRNS_ContextIEs_t *forwardSRNS_ContextIEs); - -int ranap_free_uplinkinformationexchangefailureies( - RANAP_UplinkInformationExchangeFailureIEs_t *uplinkInformationExchangeFailureIEs); - -int ranap_free_rab_setupitem_enhrelocinfores_ies( - RANAP_RAB_SetupItem_EnhRelocInfoRes_IEs_t *raB_SetupItem_EnhRelocInfoRes_IEs); - -int ranap_free_datavolumereporties( - RANAP_DataVolumeReportIEs_t *dataVolumeReportIEs); - -int ranap_free_informationtransferindicationies( - RANAP_InformationTransferIndicationIEs_t *informationTransferIndicationIEs); - -int ranap_free_rab_faileditem_enhrelocinfores_ies( - RANAP_RAB_FailedItem_EnhRelocInfoRes_IEs_t *raB_FailedItem_EnhRelocInfoRes_IEs); - -int ranap_free_informationtransferfailureies( - RANAP_InformationTransferFailureIEs_t *informationTransferFailureIEs); - -int ranap_free_commonid_ies( - RANAP_CommonID_IEs_t *commonID_IEs); - -int ranap_free_mbmsuelinkingrequesties( - RANAP_MBMSUELinkingRequestIEs_t *mbmsueLinkingRequestIEs); - -int ranap_free_errorindicationies( - RANAP_ErrorIndicationIEs_t *errorIndicationIEs); - -int ranap_free_redirectionindication_ies( - RANAP_RedirectionIndication_IEs_t *redirectionIndication_IEs); - -int ranap_free_rab_dataforwardingitemies( - RANAP_RAB_DataForwardingItemIEs_t *raB_DataForwardingItemIEs); - -int ranap_free_rab_setupitem_enhrelocinforeq_ies( - RANAP_RAB_SetupItem_EnhRelocInfoReq_IEs_t *raB_SetupItem_EnhRelocInfoReq_IEs); - -int ranap_free_mbmsrabreleasefailureies( - RANAP_MBMSRABReleaseFailureIEs_t *mbmsrabReleaseFailureIEs); - -int ranap_free_rab_datavolumereportitemies( - RANAP_RAB_DataVolumeReportItemIEs_t *raB_DataVolumeReportItemIEs); - -int ranap_free_directinformationtransferies( - RANAP_DirectInformationTransferIEs_t *directInformationTransferIEs); - -int ranap_free_relocationcommandies( - RANAP_RelocationCommandIEs_t *relocationCommandIEs); - -int ranap_free_uplinkinformationexchangeresponseies( - RANAP_UplinkInformationExchangeResponseIEs_t *uplinkInformationExchangeResponseIEs); - -int ranap_free_mbmsrabreleaserequesties( - RANAP_MBMSRABReleaseRequestIEs_t *mbmsrabReleaseRequestIEs); - -int ranap_free_rab_assignmentrequesties( - RANAP_RAB_AssignmentRequestIEs_t *raB_AssignmentRequestIEs); - -int ranap_free_rab_releaseditem_iurelcomp_ies( - RANAP_RAB_ReleasedItem_IuRelComp_IEs_t *raB_ReleasedItem_IuRelComp_IEs); - -int ranap_free_enhancedrelocationcompleteresponseies( - RANAP_EnhancedRelocationCompleteResponseIEs_t *enhancedRelocationCompleteResponseIEs); - -int ranap_free_locationreporties( - RANAP_LocationReportIEs_t *locationReportIEs); - -int ranap_free_rab_setupitem_enhancedreloccompletereq_ies( - RANAP_RAB_SetupItem_EnhancedRelocCompleteReq_IEs_t *raB_SetupItem_EnhancedRelocCompleteReq_IEs); - -int ranap_free_rab_assignmentresponseies( - RANAP_RAB_AssignmentResponseIEs_t *raB_AssignmentResponseIEs); - -int ranap_free_rab_contextitemies( - RANAP_RAB_ContextItemIEs_t *raB_ContextItemIEs); - -int ranap_free_mbmssessionupdateresponseies( - RANAP_MBMSSessionUpdateResponseIEs_t *mbmsSessionUpdateResponseIEs); - -int ranap_free_ueradiocapabilitymatchresponseies( - RANAP_UeRadioCapabilityMatchResponseIEs_t *ueRadioCapabilityMatchResponseIEs); - -int ranap_free_rab_releaserequesties( - RANAP_RAB_ReleaseRequestIEs_t *raB_ReleaseRequestIEs); - -int ranap_free_enhancedrelocationcompleteconfirmies( - RANAP_EnhancedRelocationCompleteConfirmIEs_t *enhancedRelocationCompleteConfirmIEs); - -int ranap_free_mbmssessionupdateies( - RANAP_MBMSSessionUpdateIEs_t *mbmsSessionUpdateIEs); - -int ranap_free_mbmssessionstarties( - RANAP_MBMSSessionStartIEs_t *mbmsSessionStartIEs); - -int ranap_free_locationrelateddataresponseies( - RANAP_LocationRelatedDataResponseIEs_t *locationRelatedDataResponseIEs); - -int ranap_free_rab_setupormodifieditemies( - RANAP_RAB_SetupOrModifiedItemIEs_t *raB_SetupOrModifiedItemIEs); - -#endif /* RANAP_IES_DEFS_H_ */ - diff --git a/src/Makefile.am b/src/Makefile.am index 87d181a..3709cd0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,7 +3,7 @@ # Build {hnbap,rua,ranap}_{encoder,decoder}.c using asn1tostruct ASN1_ROOT = $(top_builddir)/asn1/ ASN1TOSTRUCT = $(ASN1_ROOT)/utils/asn1tostruct.py -BUILT_SOURCES = hnbap_decoder.c hnbap_encoder.c rua_decoder.c rua_encoder.c ranap_decoder.c ranap_encoder.c +BUILT_SOURCES = hnbap_decoder.c hnbap_encoder.c rua_decoder.c rua_encoder.c gen_ranap.stamp hnbap_encoder.c hnbap_decoder.c hnbap_ies_defs.h: $(ASN1_ROOT)/hnbap/HNBAP-PDU-Contents.asn $(ASN1TOSTRUCT) $(ASN1TOSTRUCT) -f $< @@ -11,7 +11,7 @@ rua_encoder.c rua_decoder.c rua_ies_defs.h: $(ASN1_ROOT)/rua/RUA-PDU-Contents.asn $(ASN1TOSTRUCT) $(ASN1TOSTRUCT) -p RUA_ -f $< -ranap_encoder.c ranap_decoder.c: $(ASN1_ROOT)/ranap/RANAP-PDU-Contents.asn $(ASN1TOSTRUCT) +gen_ranap.stamp: $(ASN1_ROOT)/ranap/RANAP-PDU-Contents.asn $(ASN1TOSTRUCT) $(ASN1TOSTRUCT) -p RANAP_ -f $< # We also need to replace the include in the newly generated .c files: sed -i 's,^#include "ranap_ies_defs.h",#include ,' ranap_encoder.c ranap_decoder.c @@ -19,6 +19,7 @@ mv ranap_ies_defs.h $(top_srcdir)/include/osmocom/ranap/ # this is ugly ^. ranap_ies_defs.h is generated from asn1tostruct.py here, but # it should live in include/osmocom/ranap/. + touch $(top_builddir)/$@ AM_CFLAGS = -I$(top_srcdir)/include $(OSMOCORE_CFLAGS) $(OSMOVTY_CFLAGS) $(OSMOGSM_CFLAGS) $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS) COMMON_LDADD = -lsctp -- To view, visit https://gerrit.osmocom.org/65 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I439edcb4b7742de861c99ed401114f51061f8088 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: ahuemer From gerrit-no-reply at lists.osmocom.org Sun May 15 12:09:04 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Sun, 15 May 2016 12:09:04 +0000 Subject: Change in osmo-iuh[master]: attempt to fix parallel build, improve AM logic In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: attempt to fix parallel build, improve AM logic ...................................................................... Patch Set 1: Code-Review+1 Looks good. In ./contrib/jenkins.sh you could put back $PARALLEL_MAKE again or I can do it as a follow-up -- To view, visit https://gerrit.osmocom.org/65 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I439edcb4b7742de861c99ed401114f51061f8088 Gerrit-PatchSet: 1 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: ahuemer Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun May 15 17:51:18 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Sun, 15 May 2016 17:51:18 +0000 Subject: Change in osmo-iuh[master]: attempt to fix parallel build, improve AM logic In-Reply-To: References: Message-ID: >From ahuemer : Hello Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/65 to look at the new patch set (#2). Change subject: attempt to fix parallel build, improve AM logic ...................................................................... attempt to fix parallel build, improve AM logic The formerly existing make rule caused a race condition in parallel builds and wrongly stated the .c files as targets, which caused make to execute the rule twice (once for each target). This was actually only fallout of the attempt to express the fact that those two files are generated by the rule. The generated file ranap_ies_defs.h was moved by one make job, another job then tried to access the file in the old location and failed. parallel build verified with: $ for i in $(seq 1 10) do echo "XXXX iteration $i" git clean -xfd autoreconf -i ./configure make -j${i} || break done Coauthored by Andreas Rottmann Change-Id: I439edcb4b7742de861c99ed401114f51061f8088 --- M .gitignore M contrib/jenkins.sh D include/osmocom/ranap/ranap_ies_defs.h M src/Makefile.am 4 files changed, 8 insertions(+), 2,972 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/65/65/2 -- To view, visit https://gerrit.osmocom.org/65 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I439edcb4b7742de861c99ed401114f51061f8088 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: ahuemer Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun May 15 19:31:18 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Sun, 15 May 2016 19:31:18 +0000 Subject: Change in openbsc[master]: db.c: implemented incremental migration In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has submitted this change and it was merged. Change subject: db.c: implemented incremental migration ...................................................................... db.c: implemented incremental migration In the past, normal migration was possible only if the actual schema version differed from the version used in DB by 1. For example, if DB uses an old version 3 and you need to use it with the code written for version 5, the check_db_revision() will convert it to 4 and DB will still use incompatible schema version during Osmo-NITB running time. After next run it will be converted to version 5. This patch replaces a set of 'else-if' checks by a 'switch' without 'break' statements between 'case' labels (waterfall). It makes you able to migrate from current version to the latest despite any difference between them. Change-Id: Ia9c2aa86f96b88ad8a710d0a23879ce219bc82dc Reviewed-on: https://gerrit.osmocom.org/62 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M openbsc/src/libmsc/db.c 1 file changed, 35 insertions(+), 18 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c index e5017ae..b3235bb 100644 --- a/openbsc/src/libmsc/db.c +++ b/openbsc/src/libmsc/db.c @@ -374,9 +374,13 @@ { dbi_result result; const char *rev_s; + int db_rev = 0; + /* Make a query */ result = dbi_conn_query(conn, - "SELECT value FROM Meta WHERE key='revision'"); + "SELECT value FROM Meta " + "WHERE key = 'revision'"); + if (!result) return -EINVAL; @@ -384,33 +388,46 @@ dbi_result_free(result); return -EINVAL; } + + /* Fetch the DB schema revision */ rev_s = dbi_result_get_string(result, "value"); if (!rev_s) { dbi_result_free(result); return -EINVAL; } - if (!strcmp(rev_s, "2")) { - if (update_db_revision_2()) { - LOGP(DDB, LOGL_FATAL, "Failed to update database from schema revision '%s'.\n", rev_s); - dbi_result_free(result); - return -EINVAL; - } - } else if (!strcmp(rev_s, "3")) { - if (update_db_revision_3()) { - LOGP(DDB, LOGL_FATAL, "Failed to update database from schema revision '%s'.\n", rev_s); - dbi_result_free(result); - return -EINVAL; - } - } else if (!strcmp(rev_s, SCHEMA_REVISION)) { - /* everything is fine */ - } else { - LOGP(DDB, LOGL_FATAL, "Invalid database schema revision '%s'.\n", rev_s); + + if (!strcmp(rev_s, SCHEMA_REVISION)) { + /* Everything is fine */ dbi_result_free(result); + return 0; + } + + db_rev = atoi(rev_s); + dbi_result_free(result); + + /* Incremental migration waterfall */ + switch (db_rev) { + case 2: + if (update_db_revision_2()) + goto error; + case 3: + if (update_db_revision_3()) + goto error; + + /* The end of waterfall */ + break; + default: + LOGP(DDB, LOGL_FATAL, + "Invalid database schema revision '%d'.\n", db_rev); return -EINVAL; } - dbi_result_free(result); return 0; + +error: + LOGP(DDB, LOGL_FATAL, "Failed to update database " + "from schema revision '%d'.\n", db_rev); + return -EINVAL; } static int db_configure(void) -- To view, visit https://gerrit.osmocom.org/62 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia9c2aa86f96b88ad8a710d0a23879ce219bc82dc Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Sun May 15 19:36:56 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Sun, 15 May 2016 19:36:56 +0000 Subject: Change in osmo-pcu[master]: Change internal API for consistency In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: Change internal API for consistency ...................................................................... Patch Set 1: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/59 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic584611184b0c8b5417ecff0ddae3d526b55a079 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun May 15 21:20:36 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Sun, 15 May 2016 21:20:36 +0000 Subject: Change in osmo-iuh[master]: attempt to fix parallel build, improve AM logic In-Reply-To: References: Message-ID: >From Harald Welte : Harald Welte has posted comments on this change. Change subject: attempt to fix parallel build, improve AM logic ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/65 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I439edcb4b7742de861c99ed401114f51061f8088 Gerrit-PatchSet: 2 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: ahuemer Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun May 15 21:23:12 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Sun, 15 May 2016 21:23:12 +0000 Subject: Change in libosmocore[master]: gsm48: move to hex TMSI representation In-Reply-To: References: Message-ID: >From Harald Welte : Harald Welte has posted comments on this change. Change subject: gsm48: move to hex TMSI representation ...................................................................... Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/57/1/src/gsm/gsm48.c File src/gsm/gsm48.c: PS1, Line 465: string > Because I saw that the 0x%08x format also used in other Osmocom projects, f I think the general representation in the industry would be all-uppercase and without 0x, so "%08X". However, as we used to have integer representation in OpenBSC so far, it might be a good idea to give the '0x' as a hint to the user, so he knows this version of the log statement/vty output is in hex, as opposed to earlier versions. -- To view, visit https://gerrit.osmocom.org/57 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifd25365bfa3b4ee95b16979740c3229948ce17f2 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun May 15 21:25:39 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Sun, 15 May 2016 21:25:39 +0000 Subject: Change in osmo-pcu[master]: Add support for NuRAN Wireless Litecell 1.5 BTS In-Reply-To: References: Message-ID: >From Harald Welte : Harald Welte has posted comments on this change. Change subject: Add support for NuRAN Wireless Litecell 1.5 BTS ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/61 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib1287375cb10a889625bbac8528fa60deed23a2b Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun May 15 23:28:14 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Sun, 15 May 2016 23:28:14 +0000 Subject: Change in osmo-iuh[master]: attempt to fix parallel build, improve AM logic In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has submitted this change and it was merged. Change subject: attempt to fix parallel build, improve AM logic ...................................................................... attempt to fix parallel build, improve AM logic The formerly existing make rule caused a race condition in parallel builds and wrongly stated the .c files as targets, which caused make to execute the rule twice (once for each target). This was actually only fallout of the attempt to express the fact that those two files are generated by the rule. The generated file ranap_ies_defs.h was moved by one make job, another job then tried to access the file in the old location and failed. parallel build verified with: $ for i in $(seq 1 10) do echo "XXXX iteration $i" git clean -xfd autoreconf -i ./configure make -j${i} || break done Coauthored by Andreas Rottmann Change-Id: I439edcb4b7742de861c99ed401114f51061f8088 Reviewed-on: https://gerrit.osmocom.org/65 Tested-by: Jenkins Builder Reviewed-by: Harald Welte --- M .gitignore M contrib/jenkins.sh D include/osmocom/ranap/ranap_ies_defs.h M src/Makefile.am 4 files changed, 8 insertions(+), 2,972 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/.gitignore b/.gitignore index c7a19ee..b2538a7 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,5 @@ tags libosmo-ranap.pc m4 +gen_ranap.stamp +include/osmocom/ranap/ranap_ies_defs.h diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index abe1db5..5c7317a 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -55,10 +55,10 @@ cd ../../ autoreconf --install --force PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH ./configure -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH $MAKE +PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH $MAKE $PARALLEL_MAKE PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE check # distcheck is broken #PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE distcheck -PATH=$PWD/deps/install/bin:$PATH PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH $MAKE -C src regen -PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH $MAKE +PATH=$PWD/deps/install/bin:$PATH PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH $MAKE $PARALLEL_MAKE -C src regen +PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH $MAKE $PARALLEL_MAKE PKG_CONFIG_PATH=$PWD/deps/install/lib/pkgconfig:$PKG_CONFIG_PATH LD_LIBRARY_PATH=$PWD/deps/install/lib $MAKE check diff --git a/include/osmocom/ranap/ranap_ies_defs.h b/include/osmocom/ranap/ranap_ies_defs.h deleted file mode 100644 index eb4813f..0000000 --- a/include/osmocom/ranap/ranap_ies_defs.h +++ /dev/null @@ -1,2967 +0,0 @@ -/******************************************************************************* - * This file had been created by asn1tostruct.py script v0.5osmo1 - * Please do not modify this file but regenerate it via script. - * Created on: 2016-02-19 16:51:41.625903 by daniel - * from ['../asn1//ranap/RANAP-PDU-Contents.asn'] - ******************************************************************************/ -#include - -#ifndef RANAP_IES_DEFS_H_ -#define RANAP_IES_DEFS_H_ - -typedef struct RANAP_RAB_ReleasedItemIEs_s { - RANAP_RAB_ReleasedItem_t raB_ReleasedItem; -} RANAP_RAB_ReleasedItemIEs_t; - -typedef struct RANAP_Iu_ReleaseRequestIEs_s { - RANAP_Cause_t cause; -} RANAP_Iu_ReleaseRequestIEs_t; - -#define UESPECIFICINFORMATIONINDICATIONIES_RANAP_UESBI_IU_PRESENT (1 << 0) - -typedef struct RANAP_UESpecificInformationIndicationIEs_s { - uint16_t presenceMask; - RANAP_UESBI_Iu_t uesbI_Iu; ///< Optional field -} RANAP_UESpecificInformationIndicationIEs_t; - -#define ENHANCEDRELOCATIONCOMPLETEFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_EnhancedRelocationCompleteFailureIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_EnhancedRelocationCompleteFailureIEs_t; - -#define MBMSCNDE_REGISTRATIONRESPONSEIES_RANAP_CAUSE_PRESENT (1 << 0) -#define MBMSCNDE_REGISTRATIONRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 1) - -typedef struct RANAP_MBMSCNDe_RegistrationResponseIEs_s { - uint16_t presenceMask; - RANAP_TMGI_t tmgi; - RANAP_GlobalRNC_ID_t globalRNC_ID; - RANAP_Cause_t cause; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSCNDe_RegistrationResponseIEs_t; - -#define SECURITYMODEREJECTIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_SecurityModeRejectIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_SecurityModeRejectIEs_t; - -#define RANAP_RELOCATIONINFORMATIONIES_RANAP_RAB_CONTEXTLIST_RANAP_RELOCINF_PRESENT (1 << 0) - -typedef struct RANAP_RANAP_RelocationInformationIEs_s { - uint16_t presenceMask; - RANAP_RAB_ContextList_RANAP_RelocInf_t raB_ContextList_RANAP_RelocInf; ///< Optional field -} RANAP_RANAP_RelocationInformationIEs_t; - -#define RESETACKNOWLEDGEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) -#define RESETACKNOWLEDGEIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 1) - -typedef struct RANAP_ResetAcknowledgeIEs_s { - uint16_t presenceMask; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field -} RANAP_ResetAcknowledgeIEs_t; - -#define RELOCATIONCANCELACKNOWLEDGEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_RelocationCancelAcknowledgeIEs_s { - uint16_t presenceMask; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_RelocationCancelAcknowledgeIEs_t; - -#define SRVCC_CSKEYSRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_SRVCC_CSKeysResponseIEs_s { - uint16_t presenceMask; - RANAP_IntegrityProtectionKey_t integrityProtectionKey; - RANAP_EncryptionKey_t encryptionKey; - RANAP_SRVCC_Information_t srvcC_Information; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_SRVCC_CSKeysResponseIEs_t; - -#define MBMSCNDE_REGISTRATIONREQUESTIES_RANAP_GLOBALCN_ID_PRESENT (1 << 0) - -typedef struct RANAP_MBMSCNDe_RegistrationRequestIEs_s { - uint16_t presenceMask; - RANAP_TMGI_t tmgi; - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field -} RANAP_MBMSCNDe_RegistrationRequestIEs_t; - -#define PAGINGIES_RANAP_TEMPORARYUE_ID_PRESENT (1 << 0) -#define PAGINGIES_RANAP_PAGINGAREAID_PRESENT (1 << 1) -#define PAGINGIES_RANAP_PAGINGCAUSE_PRESENT (1 << 2) -#define PAGINGIES_RANAP_NONSEARCHINGINDICATION_PRESENT (1 << 3) -#define PAGINGIES_RANAP_DRX_CYCLELENGTHCOEFFICIENT_PRESENT (1 << 4) - -typedef struct RANAP_PagingIEs_s { - uint16_t presenceMask; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_PermanentNAS_UE_ID_t permanentNAS_UE_ID; - RANAP_TemporaryUE_ID_t temporaryUE_ID; ///< Optional field - RANAP_PagingAreaID_t pagingAreaID; ///< Optional field - RANAP_PagingCause_t pagingCause; ///< Optional field - RANAP_NonSearchingIndication_t nonSearchingIndication; ///< Optional field - RANAP_DRX_CycleLengthCoefficient_t drX_CycleLengthCoefficient; ///< Optional field -} RANAP_PagingIEs_t; - -typedef struct RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs_s { - RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_Item_t geraN_Iumode_RAB_Failed_RABAssgntResponse_Item; -} RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs_t; - -typedef struct RANAP_ResetResourceItemIEs_s { - RANAP_ResetResourceItem_t iuSigConIdItem; -} RANAP_ResetResourceItemIEs_t; - -typedef struct RANAP_LocationReportingControlIEs_s { - RANAP_RequestType_t requestType; -} RANAP_LocationReportingControlIEs_t; - -#define ENHANCEDRELOCATIONCOMPLETEREQUESTIES_RANAP_EXTENDEDRNC_ID_PRESENT (1 << 0) -#define ENHANCEDRELOCATIONCOMPLETEREQUESTIES_RANAP_EXTENDEDRNC_ID_PRESENT (1 << 1) -#define ENHANCEDRELOCATIONCOMPLETEREQUESTIES_RANAP_RAB_SETUPLIST_ENHANCEDRELOCCOMPLETEREQ_PRESENT (1 << 2) - -typedef struct RANAP_EnhancedRelocationCompleteRequestIEs_s { - uint16_t presenceMask; - RANAP_IuSignallingConnectionIdentifier_t oldIuSigConId; - RANAP_IuSignallingConnectionIdentifier_t iuSigConId; - RANAP_GlobalRNC_ID_t relocation_SourceRNC_ID; - RANAP_ExtendedRNC_ID_t relocation_SourceExtendedRNC_ID; ///< Optional field - RANAP_GlobalRNC_ID_t relocation_TargetRNC_ID; - RANAP_ExtendedRNC_ID_t relocation_TargetExtendedRNC_ID; ///< Optional field - RANAP_RAB_SetupList_EnhancedRelocCompleteReq_t raB_SetupList_EnhancedRelocCompleteReq; ///< Optional field -} RANAP_EnhancedRelocationCompleteRequestIEs_t; - -typedef struct RANAP_RAB_FailedItemIEs_s { - RANAP_RAB_FailedItem_t raB_FailedItem; -} RANAP_RAB_FailedItemIEs_t; - -#define MBMSUELINKINGRESPONSEIES_RANAP_UNSUCCESSFULLINKING_IES_PRESENT (1 << 0) -#define MBMSUELINKINGRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 1) - -typedef struct RANAP_MBMSUELinkingResponseIEs_s { - uint16_t presenceMask; - RANAP_UnsuccessfulLinking_IEs_t unsuccessfulLinkingList; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSUELinkingResponseIEs_t; - -typedef struct RANAP_RAB_QueuedItemIEs_s { - RANAP_RAB_QueuedItem_t raB_QueuedItem; -} RANAP_RAB_QueuedItemIEs_t; - -#define CN_INVOKETRACEIES_RANAP_TRACETYPE_PRESENT (1 << 0) -#define CN_INVOKETRACEIES_RANAP_TRIGGERID_PRESENT (1 << 1) -#define CN_INVOKETRACEIES_RANAP_UE_ID_PRESENT (1 << 2) -#define CN_INVOKETRACEIES_RANAP_OMC_ID_PRESENT (1 << 3) - -typedef struct RANAP_CN_InvokeTraceIEs_s { - uint16_t presenceMask; - RANAP_TraceType_t traceType; ///< Optional field - RANAP_TraceReference_t traceReference; - RANAP_TriggerID_t triggerID; ///< Optional field - RANAP_UE_ID_t ue_id; ///< Optional field - RANAP_OMC_ID_t omc_id; ///< Optional field -} RANAP_CN_InvokeTraceIEs_t; - -typedef struct RANAP_Iu_ReleaseCommandIEs_s { - RANAP_Cause_t cause; -} RANAP_Iu_ReleaseCommandIEs_t; - -#define RELOCATIONREQUESTACKNOWLEDGEIES_RANAP_TARGETRNC_TOSOURCERNC_TRANSPARENTCONTAINER_PRESENT (1 << 0) -#define RELOCATIONREQUESTACKNOWLEDGEIES_RANAP_RAB_SETUPLIST_RELOCREQACK_PRESENT (1 << 1) -#define RELOCATIONREQUESTACKNOWLEDGEIES_RANAP_RAB_FAILEDLIST_PRESENT (1 << 2) -#define RELOCATIONREQUESTACKNOWLEDGEIES_RANAP_CHOSENINTEGRITYPROTECTIONALGORITHM_PRESENT (1 << 3) -#define RELOCATIONREQUESTACKNOWLEDGEIES_RANAP_CHOSENENCRYPTIONALGORITHM_PRESENT (1 << 4) -#define RELOCATIONREQUESTACKNOWLEDGEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 5) - -typedef struct RANAP_RelocationRequestAcknowledgeIEs_s { - uint16_t presenceMask; - RANAP_TargetRNC_ToSourceRNC_TransparentContainer_t target_ToSource_TransparentContainer; ///< Optional field - RANAP_RAB_SetupList_RelocReqAck_t raB_SetupList_RelocReqAck; ///< Optional field - RANAP_RAB_FailedList_t raB_FailedList; ///< Optional field - RANAP_ChosenIntegrityProtectionAlgorithm_t chosenIntegrityProtectionAlgorithm; ///< Optional field - RANAP_ChosenEncryptionAlgorithm_t chosenEncryptionAlgorithm; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_RelocationRequestAcknowledgeIEs_t; - -#define RELOCATIONFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_RelocationFailureIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_RelocationFailureIEs_t; - -typedef struct RANAP_RABs_failed_to_reportItemIEs_s { - RANAP_RABs_failed_to_reportItem_t raB_FailedtoReportItem; -} RANAP_RABs_failed_to_reportItemIEs_t; - -#define RELOCATIONPREPARATIONFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_RelocationPreparationFailureIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_RelocationPreparationFailureIEs_t; - -typedef struct RANAP_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs_s { - RANAP_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_t raB_ToBeReleasedItem_EnhancedRelocCompleteRes; -} RANAP_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs_t; - -typedef struct RANAP_RABs_ContextFailedtoTransferItemIEs_s { - RANAP_RABs_ContextFailedtoTransferItem_t raB_ContextFailedtoTransferItem; -} RANAP_RABs_ContextFailedtoTransferItemIEs_t; - -#define RELOCATIONREQUIREDIES_RANAP_OLDBSS_TONEWBSS_INFORMATION_PRESENT (1 << 0) - -typedef struct RANAP_RelocationRequiredIEs_s { - uint16_t presenceMask; - RANAP_RelocationType_t relocationType; - RANAP_Cause_t cause; - RANAP_SourceID_t sourceID; - RANAP_TargetID_t targetID; - RANAP_OldBSS_ToNewBSS_Information_t oldBSS_ToNewBSS_Information; ///< Optional field -} RANAP_RelocationRequiredIEs_t; - -typedef struct RANAP_MBMSSessionStopIEs_s { - RANAP_MBMSCNDe_Registration_t mbmscnDe_Registration; -} RANAP_MBMSSessionStopIEs_t; - -#define MBMSSESSIONUPDATEFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_MBMSSessionUpdateFailureIEs_s { - uint16_t presenceMask; - RANAP_SessionUpdateID_t sessionUpdateID; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSSessionUpdateFailureIEs_t; - -#define RESETIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 0) - -typedef struct RANAP_ResetIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field -} RANAP_ResetIEs_t; - -typedef struct RANAP_LocationRelatedDataFailureIEs_s { - RANAP_Cause_t cause; -} RANAP_LocationRelatedDataFailureIEs_t; - -#define RESETRESOURCEACKNOWLEDGEIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 0) -#define RESETRESOURCEACKNOWLEDGEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 1) - -typedef struct RANAP_ResetResourceAcknowledgeIEs_s { - uint16_t presenceMask; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_ResetResourceAckList_t iuSigConIdList; - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_ResetResourceAcknowledgeIEs_t; - -#define MBMSREGISTRATIONREQUESTIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 0) - -typedef struct RANAP_MBMSRegistrationRequestIEs_s { - uint16_t presenceMask; - RANAP_MBMSRegistrationRequestType_t mbmsRegistrationRequestType; - RANAP_TMGI_t tmgi; - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field -} RANAP_MBMSRegistrationRequestIEs_t; - -typedef struct RANAP_UplinkInformationExchangeRequestIEs_s { - RANAP_InformationExchangeID_t informationExchangeID; - RANAP_InformationExchangeType_t informationExchangeType; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_GlobalRNC_ID_t globalRNC_ID; -} RANAP_UplinkInformationExchangeRequestIEs_t; - -#define MBMSSESSIONSTOPRESPONSEIES_RANAP_CAUSE_PRESENT (1 << 0) -#define MBMSSESSIONSTOPRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 1) - -typedef struct RANAP_MBMSSessionStopResponseIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSSessionStopResponseIEs_t; - -typedef struct RANAP_RAB_ContextItemIEs_RANAP_RelocInf_s { - RANAP_RAB_ContextItem_RANAP_RelocInf_t raB_ContextItem_RANAP_RelocInf; -} RANAP_RAB_ContextItemIEs_RANAP_RelocInf_t; - -#define LOCATIONRELATEDDATAREQUESTIES_RANAP_LOCATIONRELATEDDATAREQUESTTYPE_PRESENT (1 << 0) - -typedef struct RANAP_LocationRelatedDataRequestIEs_s { - uint16_t presenceMask; - RANAP_LocationRelatedDataRequestType_t locationRelatedDataRequestType; ///< Optional field -} RANAP_LocationRelatedDataRequestIEs_t; - -typedef struct RANAP_RAB_DataForwardingItem_SRNS_CtxReq_IEs_s { - RANAP_RAB_DataForwardingItem_SRNS_CtxReq_t raB_DataForwardingItem_SRNS_CtxReq; -} RANAP_RAB_DataForwardingItem_SRNS_CtxReq_IEs_t; - -typedef struct RANAP_RAB_ReleaseItemIEs_s { - RANAP_RAB_ReleaseItem_t raB_ReleaseItem; -} RANAP_RAB_ReleaseItemIEs_t; - -typedef struct RANAP_RAB_DataVolumeReportRequestItemIEs_s { - RANAP_RAB_DataVolumeReportRequestItem_t raB_DataVolumeReportRequestItem; -} RANAP_RAB_DataVolumeReportRequestItemIEs_t; - -#define INFORMATIONTRANSFERCONFIRMATIONIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_InformationTransferConfirmationIEs_s { - uint16_t presenceMask; - RANAP_InformationTransferID_t informationTransferID; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field - RANAP_GlobalRNC_ID_t globalRNC_ID; -} RANAP_InformationTransferConfirmationIEs_t; - -#define INITIALUE_MESSAGEIES_RANAP_RAC_PRESENT (1 << 0) - -typedef struct RANAP_InitialUE_MessageIEs_s { - uint16_t presenceMask; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_LAI_t lai; - RANAP_RAC_t rac; ///< Conditional field - RANAP_SAI_t sai; - RANAP_NAS_PDU_t nas_pdu; - RANAP_IuSignallingConnectionIdentifier_t iuSigConId; - RANAP_GlobalRNC_ID_t globalRNC_ID; -} RANAP_InitialUE_MessageIEs_t; - -#define SRNS_CONTEXTRESPONSEIES_RANAP_RAB_CONTEXTLIST_PRESENT (1 << 0) -#define SRNS_CONTEXTRESPONSEIES_RANAP_RABS_CONTEXTFAILEDTOTRANSFERLIST_PRESENT (1 << 1) -#define SRNS_CONTEXTRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_SRNS_ContextResponseIEs_s { - uint16_t presenceMask; - RANAP_RAB_ContextList_t raB_ContextList; ///< Optional field - RANAP_RABs_ContextFailedtoTransferList_t raB_ContextFailedtoTransferList; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_SRNS_ContextResponseIEs_t; - -typedef struct RANAP_ResetResourceAckItemIEs_s { - RANAP_ResetResourceAckItem_t iuSigConIdItem; -} RANAP_ResetResourceAckItemIEs_t; - -#define SRNS_DATAFORWARDCOMMANDIES_RANAP_RAB_DATAFORWARDINGLIST_PRESENT (1 << 0) - -typedef struct RANAP_SRNS_DataForwardCommandIEs_s { - uint16_t presenceMask; - RANAP_RAB_DataForwardingList_t raB_DataForwardingList; ///< Optional field -} RANAP_SRNS_DataForwardCommandIEs_t; - -#define RELOCATIONREQUESTIES_RANAP_PERMANENTNAS_UE_ID_PRESENT (1 << 0) -#define RELOCATIONREQUESTIES_RANAP_RAB_SETUPLIST_RELOCREQ_PRESENT (1 << 1) -#define RELOCATIONREQUESTIES_RANAP_INTEGRITYPROTECTIONINFORMATION_PRESENT (1 << 2) -#define RELOCATIONREQUESTIES_RANAP_ENCRYPTIONINFORMATION_PRESENT (1 << 3) - -typedef struct RANAP_RelocationRequestIEs_s { - uint16_t presenceMask; - RANAP_PermanentNAS_UE_ID_t permanentNAS_UE_ID; ///< Optional field - RANAP_Cause_t cause; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_SourceRNC_ToTargetRNC_TransparentContainer_t source_ToTarget_TransparentContainer; - RANAP_RAB_SetupList_RelocReq_t raB_SetupList_RelocReq; ///< Optional field - RANAP_IntegrityProtectionInformation_t integrityProtectionInformation; ///< Optional field - RANAP_EncryptionInformation_t encryptionInformation; ///< Optional field - RANAP_IuSignallingConnectionIdentifier_t iuSigConId; -} RANAP_RelocationRequestIEs_t; - -typedef struct RANAP_SRNS_ContextRequestIEs_s { - RANAP_RAB_DataForwardingList_SRNS_CtxReq_t raB_DataForwardingList_SRNS_CtxReq; -} RANAP_SRNS_ContextRequestIEs_t; - -#define MBMSSESSIONSTARTRESPONSEIES_RANAP_TRANSPORTLAYERINFORMATION_PRESENT (1 << 0) -#define MBMSSESSIONSTARTRESPONSEIES_RANAP_CAUSE_PRESENT (1 << 1) -#define MBMSSESSIONSTARTRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_MBMSSessionStartResponseIEs_s { - uint16_t presenceMask; - RANAP_TransportLayerInformation_t transportLayerInformation; ///< Optional field - RANAP_Cause_t cause; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSSessionStartResponseIEs_t; - -#define DIRECTTRANSFERIES_RANAP_LAI_PRESENT (1 << 0) -#define DIRECTTRANSFERIES_RANAP_RAC_PRESENT (1 << 1) -#define DIRECTTRANSFERIES_RANAP_SAI_PRESENT (1 << 2) -#define DIRECTTRANSFERIES_RANAP_SAPI_PRESENT (1 << 3) - -typedef struct RANAP_DirectTransferIEs_s { - uint16_t presenceMask; - RANAP_NAS_PDU_t nas_pdu; - RANAP_LAI_t lai; ///< Optional field - RANAP_RAC_t rac; ///< Optional field - RANAP_SAI_t sai; ///< Optional field - RANAP_SAPI_t sapi; ///< Optional field -} RANAP_DirectTransferIEs_t; - -#define RESETRESOURCEIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 0) - -typedef struct RANAP_ResetResourceIEs_s { - uint16_t presenceMask; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_Cause_t cause; - RANAP_ResetResourceList_t iuSigConIdList; - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field -} RANAP_ResetResourceIEs_t; - -#define RANAP_ENHANCEDRELOCATIONINFORMATIONRESPONSEIES_RANAP_TARGETRNC_TOSOURCERNC_TRANSPARENTCONTAINER_PRESENT (1 << 0) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONRESPONSEIES_RANAP_RAB_SETUPLIST_ENHRELOCINFORES_PRESENT (1 << 1) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONRESPONSEIES_RANAP_RAB_FAILEDLIST_ENHRELOCINFORES_PRESENT (1 << 2) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 3) - -typedef struct RANAP_RANAP_EnhancedRelocationInformationResponseIEs_s { - uint16_t presenceMask; - RANAP_TargetRNC_ToSourceRNC_TransparentContainer_t target_ToSource_TransparentContainer; ///< Optional field - RANAP_RAB_SetupList_EnhRelocInfoRes_t raB_SetupList_EnhRelocInfoRes; ///< Optional field - RANAP_RAB_FailedList_EnhRelocInfoRes_t raB_FailedList_EnhRelocInfoRes; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_RANAP_EnhancedRelocationInformationResponseIEs_t; - -typedef struct RANAP_RAB_SetupItem_EnhancedRelocCompleteRes_IEs_s { - RANAP_RAB_SetupItem_EnhancedRelocCompleteRes_t raB_SetupItem_EnhancedRelocCompleteRes; -} RANAP_RAB_SetupItem_EnhancedRelocCompleteRes_IEs_t; - -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_IUSIGNALLINGCONNECTIONIDENTIFIER_PRESENT (1 << 0) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_GLOBALCN_ID_PRESENT (1 << 1) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_IUSIGNALLINGCONNECTIONIDENTIFIER_PRESENT (1 << 2) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_GLOBALCN_ID_PRESENT (1 << 3) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_RAB_SETUPLIST_ENHRELOCINFOREQ_PRESENT (1 << 4) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_SNA_ACCESS_INFORMATION_PRESENT (1 << 5) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_UESBI_IU_PRESENT (1 << 6) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_PLMNIDENTITY_PRESENT (1 << 7) -#define RANAP_ENHANCEDRELOCATIONINFORMATIONREQUESTIES_RANAP_CNMBMSLINKINGINFORMATION_PRESENT (1 << 8) - -typedef struct RANAP_RANAP_EnhancedRelocationInformationRequestIEs_s { - uint16_t presenceMask; - RANAP_SourceRNC_ToTargetRNC_TransparentContainer_t source_ToTarget_TransparentContainer; - RANAP_IuSignallingConnectionIdentifier_t oldIuSigConIdCS; ///< Optional field - RANAP_GlobalCN_ID_t globalCN_IDCS; ///< Optional field - RANAP_IuSignallingConnectionIdentifier_t oldIuSigConIdPS; ///< Optional field - RANAP_GlobalCN_ID_t globalCN_IDPS; ///< Optional field - RANAP_RAB_SetupList_EnhRelocInfoReq_t raB_SetupList_EnhRelocInfoReq; ///< Optional field - RANAP_SNA_Access_Information_t snA_Access_Information; ///< Optional field - RANAP_UESBI_Iu_t uesbI_Iu; ///< Optional field - RANAP_PLMNidentity_t selectedPLMN_ID; ///< Optional field - RANAP_CNMBMSLinkingInformation_t cnmbmsLinkingInformation; ///< Optional field -} RANAP_RANAP_EnhancedRelocationInformationRequestIEs_t; - -#define SECURITYMODECOMMANDIES_RANAP_ENCRYPTIONINFORMATION_PRESENT (1 << 0) - -typedef struct RANAP_SecurityModeCommandIEs_s { - uint16_t presenceMask; - RANAP_IntegrityProtectionInformation_t integrityProtectionInformation; - RANAP_EncryptionInformation_t encryptionInformation; ///< Optional field - RANAP_KeyStatus_t keyStatus; -} RANAP_SecurityModeCommandIEs_t; - -typedef struct RANAP_RelocationCancelIEs_s { - RANAP_Cause_t cause; -} RANAP_RelocationCancelIEs_t; - -typedef struct RANAP_RAB_SetupItem_RelocReqAck_IEs_s { - RANAP_RAB_SetupItem_RelocReqAck_t raB_SetupItem_RelocReqAck; -} RANAP_RAB_SetupItem_RelocReqAck_IEs_t; - -#define MBMSREGISTRATIONFAILUREIES_RANAP_TMGI_PRESENT (1 << 0) -#define MBMSREGISTRATIONFAILUREIES_RANAP_GLOBALCN_ID_PRESENT (1 << 1) -#define MBMSREGISTRATIONFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_MBMSRegistrationFailureIEs_s { - uint16_t presenceMask; - RANAP_TMGI_t tmgi; ///< Optional field - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSRegistrationFailureIEs_t; - -typedef struct RANAP_MBMSRABEstablishmentIndicationIEs_s { - RANAP_TransportLayerInformation_t transportLayerInformation; -} RANAP_MBMSRABEstablishmentIndicationIEs_t; - -#define MBMSSESSIONSTARTFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_MBMSSessionStartFailureIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSSessionStartFailureIEs_t; - -#define IU_RELEASECOMPLETEIES_RANAP_RAB_DATAVOLUMEREPORTLIST_PRESENT (1 << 0) -#define IU_RELEASECOMPLETEIES_RANAP_RAB_RELEASEDLIST_IURELCOMP_PRESENT (1 << 1) -#define IU_RELEASECOMPLETEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_Iu_ReleaseCompleteIEs_s { - uint16_t presenceMask; - RANAP_RAB_DataVolumeReportList_t raB_DataVolumeReportList; ///< Optional field - RANAP_RAB_ReleasedList_IuRelComp_t raB_ReleasedList_IuRelComp; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_Iu_ReleaseCompleteIEs_t; - -#define CN_DEACTIVATETRACEIES_RANAP_TRIGGERID_PRESENT (1 << 0) - -typedef struct RANAP_CN_DeactivateTraceIEs_s { - uint16_t presenceMask; - RANAP_TraceReference_t traceReference; - RANAP_TriggerID_t triggerID; ///< Optional field -} RANAP_CN_DeactivateTraceIEs_t; - -typedef struct RANAP_DataVolumeReportRequestIEs_s { - RANAP_RAB_DataVolumeReportRequestList_t raB_DataVolumeReportRequestList; -} RANAP_DataVolumeReportRequestIEs_t; - -typedef struct RANAP_RAB_RelocationReleaseItemIEs_s { - RANAP_RAB_RelocationReleaseItem_t raB_RelocationReleaseItem; -} RANAP_RAB_RelocationReleaseItemIEs_t; - -typedef struct RANAP_RAB_ModifyRequestIEs_s { - RANAP_RAB_ModifyList_t raB_ModifyList; -} RANAP_RAB_ModifyRequestIEs_t; - -#define SECURITYMODECOMPLETEIES_RANAP_CHOSENENCRYPTIONALGORITHM_PRESENT (1 << 0) -#define SECURITYMODECOMPLETEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 1) - -typedef struct RANAP_SecurityModeCompleteIEs_s { - uint16_t presenceMask; - RANAP_ChosenIntegrityProtectionAlgorithm_t chosenIntegrityProtectionAlgorithm; - RANAP_ChosenEncryptionAlgorithm_t chosenEncryptionAlgorithm; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_SecurityModeCompleteIEs_t; - -#define MBMSRABRELEASEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_MBMSRABReleaseIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSRABReleaseIEs_t; - -#define OVERLOADIES_RANAP_NUMBEROFSTEPS_PRESENT (1 << 0) -#define OVERLOADIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 1) - -typedef struct RANAP_OverloadIEs_s { - uint16_t presenceMask; - RANAP_NumberOfSteps_t numberOfSteps; ///< Optional field - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field -} RANAP_OverloadIEs_t; - -typedef struct RANAP_RAB_SetupItem_RelocReq_IEs_s { - RANAP_RAB_SetupItem_RelocReq_t raB_SetupItem_RelocReq; -} RANAP_RAB_SetupItem_RelocReq_IEs_t; - -typedef struct RANAP_RAB_ModifyItemIEs_s { - RANAP_RAB_ModifyItem_t raB_ModifyItem; -} RANAP_RAB_ModifyItemIEs_t; - -#define MBMSREGISTRATIONRESPONSEIES_RANAP_TMGI_PRESENT (1 << 0) -#define MBMSREGISTRATIONRESPONSEIES_RANAP_GLOBALCN_ID_PRESENT (1 << 1) -#define MBMSREGISTRATIONRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_MBMSRegistrationResponseIEs_s { - uint16_t presenceMask; - RANAP_TMGI_t tmgi; ///< Optional field - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSRegistrationResponseIEs_t; - -typedef struct RANAP_ForwardSRNS_ContextIEs_s { - RANAP_RAB_ContextList_t raB_ContextList; -} RANAP_ForwardSRNS_ContextIEs_t; - -#define UPLINKINFORMATIONEXCHANGEFAILUREIES_RANAP_GLOBALCN_ID_PRESENT (1 << 0) -#define UPLINKINFORMATIONEXCHANGEFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 1) - -typedef struct RANAP_UplinkInformationExchangeFailureIEs_s { - uint16_t presenceMask; - RANAP_InformationExchangeID_t informationExchangeID; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_UplinkInformationExchangeFailureIEs_t; - -typedef struct RANAP_RAB_SetupItem_EnhRelocInfoRes_IEs_s { - RANAP_RAB_SetupItem_EnhRelocInfoRes_t raB_SetupItem_EnhRelocInfoRes; -} RANAP_RAB_SetupItem_EnhRelocInfoRes_IEs_t; - -#define DATAVOLUMEREPORTIES_RANAP_RAB_DATAVOLUMEREPORTLIST_PRESENT (1 << 0) -#define DATAVOLUMEREPORTIES_RANAP_RABS_FAILED_TO_REPORTLIST_PRESENT (1 << 1) -#define DATAVOLUMEREPORTIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_DataVolumeReportIEs_s { - uint16_t presenceMask; - RANAP_RAB_DataVolumeReportList_t raB_DataVolumeReportList; ///< Optional field - RANAP_RABs_failed_to_reportList_t raB_FailedtoReportList; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_DataVolumeReportIEs_t; - -#define INFORMATIONTRANSFERINDICATIONIES_RANAP_GLOBALCN_ID_PRESENT (1 << 0) - -typedef struct RANAP_InformationTransferIndicationIEs_s { - uint16_t presenceMask; - RANAP_InformationTransferID_t informationTransferID; - RANAP_ProvidedData_t providedData; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field -} RANAP_InformationTransferIndicationIEs_t; - -typedef struct RANAP_RAB_FailedItem_EnhRelocInfoRes_IEs_s { - RANAP_RAB_FailedItem_EnhRelocInfoRes_t raB_FailedItem_EnhRelocInfoRes; -} RANAP_RAB_FailedItem_EnhRelocInfoRes_IEs_t; - -#define INFORMATIONTRANSFERFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_InformationTransferFailureIEs_s { - uint16_t presenceMask; - RANAP_InformationTransferID_t informationTransferID; - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field - RANAP_GlobalRNC_ID_t globalRNC_ID; -} RANAP_InformationTransferFailureIEs_t; - -typedef struct RANAP_CommonID_IEs_s { - RANAP_PermanentNAS_UE_ID_t permanentNAS_UE_ID; -} RANAP_CommonID_IEs_t; - -#define MBMSUELINKINGREQUESTIES_RANAP_JOINEDMBMSBEARERSERVICE_IES_PRESENT (1 << 0) -#define MBMSUELINKINGREQUESTIES_RANAP_LEFTMBMSBEARERSERVICE_IES_PRESENT (1 << 1) - -typedef struct RANAP_MBMSUELinkingRequestIEs_s { - uint16_t presenceMask; - RANAP_JoinedMBMSBearerService_IEs_t joinedMBMSBearerServicesList; ///< Optional field - RANAP_LeftMBMSBearerService_IEs_t leftMBMSBearerServicesList; ///< Optional field -} RANAP_MBMSUELinkingRequestIEs_t; - -#define ERRORINDICATIONIES_RANAP_CAUSE_PRESENT (1 << 0) -#define ERRORINDICATIONIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 1) -#define ERRORINDICATIONIES_RANAP_CN_DOMAININDICATOR_PRESENT (1 << 2) -#define ERRORINDICATIONIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 3) - -typedef struct RANAP_ErrorIndicationIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field - RANAP_CN_DomainIndicator_t cN_DomainIndicator; ///< Optional field - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field -} RANAP_ErrorIndicationIEs_t; - -#define REDIRECTIONINDICATION_IES_RANAP_NAS_SEQUENCENUMBER_PRESENT (1 << 0) -#define REDIRECTIONINDICATION_IES_RANAP_PERMANENTNAS_UE_ID_PRESENT (1 << 1) - -typedef struct RANAP_RedirectionIndication_IEs_s { - uint16_t presenceMask; - RANAP_NAS_PDU_t nas_pdu; - RANAP_RejectCauseValue_t rejectCauseValue; - RANAP_NAS_SequenceNumber_t naS_SequenceNumber; ///< Optional field - RANAP_PermanentNAS_UE_ID_t permanentNAS_UE_ID; ///< Optional field -} RANAP_RedirectionIndication_IEs_t; - -typedef struct RANAP_RAB_DataForwardingItemIEs_s { - RANAP_RAB_DataForwardingItem_t raB_DataForwardingItem; -} RANAP_RAB_DataForwardingItemIEs_t; - -typedef struct RANAP_RAB_SetupItem_EnhRelocInfoReq_IEs_s { - RANAP_RAB_SetupItem_EnhRelocInfoReq_t raB_SetupItem_EnhRelocInfoReq; -} RANAP_RAB_SetupItem_EnhRelocInfoReq_IEs_t; - -#define MBMSRABRELEASEFAILUREIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 0) - -typedef struct RANAP_MBMSRABReleaseFailureIEs_s { - uint16_t presenceMask; - RANAP_Cause_t cause; - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSRABReleaseFailureIEs_t; - -typedef struct RANAP_RAB_DataVolumeReportItemIEs_s { - RANAP_RAB_DataVolumeReportItem_t raB_DataVolumeReportItem; -} RANAP_RAB_DataVolumeReportItemIEs_t; - -#define DIRECTINFORMATIONTRANSFERIES_RANAP_INTERSYSTEMINFORMATIONTRANSFERTYPE_PRESENT (1 << 0) -#define DIRECTINFORMATIONTRANSFERIES_RANAP_GLOBALRNC_ID_PRESENT (1 << 1) -#define DIRECTINFORMATIONTRANSFERIES_RANAP_GLOBALCN_ID_PRESENT (1 << 2) - -typedef struct RANAP_DirectInformationTransferIEs_s { - uint16_t presenceMask; - RANAP_InterSystemInformationTransferType_t interSystemInformationTransferType; ///< Optional field - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_GlobalRNC_ID_t globalRNC_ID; ///< Optional field - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field -} RANAP_DirectInformationTransferIEs_t; - -#define RELOCATIONCOMMANDIES_RANAP_L3_INFORMATION_PRESENT (1 << 0) -#define RELOCATIONCOMMANDIES_RANAP_RAB_RELOCATIONRELEASELIST_PRESENT (1 << 1) -#define RELOCATIONCOMMANDIES_RANAP_RAB_DATAFORWARDINGLIST_PRESENT (1 << 2) -#define RELOCATIONCOMMANDIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 3) - -typedef struct RANAP_RelocationCommandIEs_s { - uint16_t presenceMask; - RANAP_L3_Information_t l3_Information; ///< Optional field - RANAP_RAB_RelocationReleaseList_t raB_RelocationReleaseList; ///< Optional field - RANAP_RAB_DataForwardingList_t raB_DataForwardingList; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_RelocationCommandIEs_t; - -#define UPLINKINFORMATIONEXCHANGERESPONSEIES_RANAP_INFORMATIONREQUESTED_PRESENT (1 << 0) -#define UPLINKINFORMATIONEXCHANGERESPONSEIES_RANAP_GLOBALCN_ID_PRESENT (1 << 1) -#define UPLINKINFORMATIONEXCHANGERESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_UplinkInformationExchangeResponseIEs_s { - uint16_t presenceMask; - RANAP_InformationExchangeID_t informationExchangeID; - RANAP_InformationRequested_t informationRequested; ///< Optional field - RANAP_CN_DomainIndicator_t cN_DomainIndicator; - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_UplinkInformationExchangeResponseIEs_t; - -typedef struct RANAP_MBMSRABReleaseRequestIEs_s { - RANAP_Cause_t cause; -} RANAP_MBMSRABReleaseRequestIEs_t; - -#define RAB_ASSIGNMENTREQUESTIES_RANAP_RAB_SETUPORMODIFYLIST_PRESENT (1 << 0) -#define RAB_ASSIGNMENTREQUESTIES_RANAP_RAB_RELEASELIST_PRESENT (1 << 1) - -typedef struct RANAP_RAB_AssignmentRequestIEs_s { - uint16_t presenceMask; - RANAP_RAB_SetupOrModifyList_t raB_SetupOrModifyList; ///< Optional field - RANAP_RAB_ReleaseList_t raB_ReleaseList; ///< Optional field -} RANAP_RAB_AssignmentRequestIEs_t; - -typedef struct RANAP_RAB_ReleasedItem_IuRelComp_IEs_s { - RANAP_RAB_ReleasedItem_IuRelComp_t raB_ReleasedItem_IuRelComp; -} RANAP_RAB_ReleasedItem_IuRelComp_IEs_t; - -#define ENHANCEDRELOCATIONCOMPLETERESPONSEIES_RANAP_RAB_SETUPLIST_ENHANCEDRELOCCOMPLETERES_PRESENT (1 << 0) -#define ENHANCEDRELOCATIONCOMPLETERESPONSEIES_RANAP_RAB_TOBERELEASEDLIST_ENHANCEDRELOCCOMPLETERES_PRESENT (1 << 1) -#define ENHANCEDRELOCATIONCOMPLETERESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_EnhancedRelocationCompleteResponseIEs_s { - uint16_t presenceMask; - RANAP_RAB_SetupList_EnhancedRelocCompleteRes_t raB_SetupList_EnhancedRelocCompleteRes; ///< Optional field - RANAP_RAB_ToBeReleasedList_EnhancedRelocCompleteRes_t raB_ToBeReleasedList_EnhancedRelocCompleteRes; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_EnhancedRelocationCompleteResponseIEs_t; - -#define LOCATIONREPORTIES_RANAP_AREAIDENTITY_PRESENT (1 << 0) -#define LOCATIONREPORTIES_RANAP_CAUSE_PRESENT (1 << 1) -#define LOCATIONREPORTIES_RANAP_REQUESTTYPE_PRESENT (1 << 2) - -typedef struct RANAP_LocationReportIEs_s { - uint16_t presenceMask; - RANAP_AreaIdentity_t areaIdentity; ///< Optional field - RANAP_Cause_t cause; ///< Optional field - RANAP_RequestType_t requestType; ///< Optional field -} RANAP_LocationReportIEs_t; - -typedef struct RANAP_RAB_SetupItem_EnhancedRelocCompleteReq_IEs_s { - RANAP_RAB_SetupItem_EnhancedRelocCompleteReq_t raB_SetupItem_EnhancedRelocCompleteReq; -} RANAP_RAB_SetupItem_EnhancedRelocCompleteReq_IEs_t; - -#define RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_SETUPORMODIFIEDLIST_PRESENT (1 << 0) -#define RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_RELEASEDLIST_PRESENT (1 << 1) -#define RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_QUEUEDLIST_PRESENT (1 << 2) -#define RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_FAILEDLIST_PRESENT (1 << 3) -#define RAB_ASSIGNMENTRESPONSEIES_RANAP_RAB_RELEASEFAILEDLIST_PRESENT (1 << 4) -#define RAB_ASSIGNMENTRESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 5) - -typedef struct RANAP_RAB_AssignmentResponseIEs_s { - uint16_t presenceMask; - RANAP_RAB_SetupOrModifiedList_t raB_SetupOrModifiedList; ///< Optional field - RANAP_RAB_ReleasedList_t raB_ReleasedList; ///< Optional field - RANAP_RAB_QueuedList_t raB_QueuedList; ///< Optional field - RANAP_RAB_FailedList_t raB_FailedList; ///< Optional field - RANAP_RAB_ReleaseFailedList_t raB_ReleaseFailedList; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_RAB_AssignmentResponseIEs_t; - -typedef struct RANAP_RAB_ContextItemIEs_s { - RANAP_RAB_ContextItem_t raB_ContextItem; -} RANAP_RAB_ContextItemIEs_t; - -#define MBMSSESSIONUPDATERESPONSEIES_RANAP_TRANSPORTLAYERINFORMATION_PRESENT (1 << 0) -#define MBMSSESSIONUPDATERESPONSEIES_RANAP_CAUSE_PRESENT (1 << 1) -#define MBMSSESSIONUPDATERESPONSEIES_RANAP_CRITICALITYDIAGNOSTICS_PRESENT (1 << 2) - -typedef struct RANAP_MBMSSessionUpdateResponseIEs_s { - uint16_t presenceMask; - RANAP_SessionUpdateID_t sessionUpdateID; - RANAP_TransportLayerInformation_t transportLayerInformation; ///< Optional field - RANAP_Cause_t cause; ///< Optional field - RANAP_CriticalityDiagnostics_t criticalityDiagnostics; ///< Optional field -} RANAP_MBMSSessionUpdateResponseIEs_t; - -typedef struct RANAP_UeRadioCapabilityMatchResponseIEs_s { - RANAP_VoiceSupportMatchIndicator_t voiceSupportMatchIndicator; -} RANAP_UeRadioCapabilityMatchResponseIEs_t; - -typedef struct RANAP_RAB_ReleaseRequestIEs_s { - RANAP_RAB_ReleaseList_t raB_ReleaseList; -} RANAP_RAB_ReleaseRequestIEs_t; - -#define ENHANCEDRELOCATIONCOMPLETECONFIRMIES_RANAP_RAB_FAILEDLIST_PRESENT (1 << 0) - -typedef struct RANAP_EnhancedRelocationCompleteConfirmIEs_s { - uint16_t presenceMask; - RANAP_RAB_FailedList_t raB_FailedList; ///< Optional field -} RANAP_EnhancedRelocationCompleteConfirmIEs_t; - -typedef struct RANAP_MBMSSessionUpdateIEs_s { - RANAP_SessionUpdateID_t sessionUpdateID; - RANAP_DeltaRAListofIdleModeUEs_t deltaRAListofIdleModeUEs; -} RANAP_MBMSSessionUpdateIEs_t; - -#define MBMSSESSIONSTARTIES_RANAP_MBMSSESSIONIDENTITY_PRESENT (1 << 0) -#define MBMSSESSIONSTARTIES_RANAP_PDP_TYPEINFORMATION_PRESENT (1 << 1) -#define MBMSSESSIONSTARTIES_RANAP_FREQUENCELAYERCONVERGENCEFLAG_PRESENT (1 << 2) -#define MBMSSESSIONSTARTIES_RANAP_RALISTOFIDLEMODEUES_PRESENT (1 << 3) -#define MBMSSESSIONSTARTIES_RANAP_GLOBALCN_ID_PRESENT (1 << 4) -#define MBMSSESSIONSTARTIES_RANAP_MBMSSESSIONREPETITIONNUMBER_PRESENT (1 << 5) - -typedef struct RANAP_MBMSSessionStartIEs_s { - uint16_t presenceMask; - RANAP_TMGI_t tmgi; - RANAP_MBMSSessionIdentity_t mbmsSessionIdentity; ///< Optional field - RANAP_MBMSBearerServiceType_t mbmsBearerServiceType; - RANAP_IuSignallingConnectionIdentifier_t iuSigConId; - RANAP_RAB_Parameters_t raB_Parameters; - RANAP_PDP_TypeInformation_t pdP_TypeInformation; ///< Optional field - RANAP_MBMSSessionDuration_t mbmsSessionDuration; - RANAP_MBMSServiceArea_t mbmsServiceArea; - RANAP_FrequenceLayerConvergenceFlag_t frequenceLayerConvergenceFlag; ///< Optional field - RANAP_RAListofIdleModeUEs_t raListofIdleModeUEs; ///< Optional field - RANAP_GlobalCN_ID_t globalCN_ID; ///< Optional field - RANAP_MBMSSessionRepetitionNumber_t mbmsSessionRepetitionNumber; ///< Optional field - RANAP_TimeToMBMSDataTransfer_t timeToMBMSDataTransfer; -} RANAP_MBMSSessionStartIEs_t; - -#define LOCATIONRELATEDDATARESPONSEIES_RANAP_BROADCASTASSISTANCEDATADECIPHERINGKEYS_PRESENT (1 << 0) - -typedef struct RANAP_LocationRelatedDataResponseIEs_s { - uint16_t presenceMask; - RANAP_BroadcastAssistanceDataDecipheringKeys_t broadcastAssistanceDataDecipheringKeys; ///< Optional field -} RANAP_LocationRelatedDataResponseIEs_t; - -typedef struct RANAP_RAB_SetupOrModifiedItemIEs_s { - RANAP_RAB_SetupOrModifiedItem_t raB_SetupOrModifiedItem; -} RANAP_RAB_SetupOrModifiedItemIEs_t; - -typedef struct ranap_message_s { - uint8_t procedureCode; - uint8_t criticality; - uint8_t direction; - union { - RANAP_CN_DeactivateTraceIEs_t cN_DeactivateTraceIEs; - RANAP_CN_InvokeTraceIEs_t cN_InvokeTraceIEs; - RANAP_CommonID_IEs_t commonID_IEs; - RANAP_DataVolumeReportIEs_t dataVolumeReportIEs; - RANAP_DataVolumeReportRequestIEs_t dataVolumeReportRequestIEs; - RANAP_DirectInformationTransferIEs_t directInformationTransferIEs; - RANAP_DirectTransferIEs_t directTransferIEs; - RANAP_EnhancedRelocationCompleteConfirmIEs_t enhancedRelocationCompleteConfirmIEs; - RANAP_EnhancedRelocationCompleteFailureIEs_t enhancedRelocationCompleteFailureIEs; - RANAP_EnhancedRelocationCompleteRequestIEs_t enhancedRelocationCompleteRequestIEs; - RANAP_EnhancedRelocationCompleteResponseIEs_t enhancedRelocationCompleteResponseIEs; - RANAP_ErrorIndicationIEs_t errorIndicationIEs; - RANAP_ForwardSRNS_ContextIEs_t forwardSRNS_ContextIEs; - RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs_t geraN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs; - RANAP_InformationTransferConfirmationIEs_t informationTransferConfirmationIEs; - RANAP_InformationTransferFailureIEs_t informationTransferFailureIEs; - RANAP_InformationTransferIndicationIEs_t informationTransferIndicationIEs; - RANAP_InitialUE_MessageIEs_t initialUE_MessageIEs; - RANAP_Iu_ReleaseCommandIEs_t iu_ReleaseCommandIEs; - RANAP_Iu_ReleaseCompleteIEs_t iu_ReleaseCompleteIEs; - RANAP_Iu_ReleaseRequestIEs_t iu_ReleaseRequestIEs; - RANAP_LocationRelatedDataFailureIEs_t locationRelatedDataFailureIEs; - RANAP_LocationRelatedDataRequestIEs_t locationRelatedDataRequestIEs; - RANAP_LocationRelatedDataResponseIEs_t locationRelatedDataResponseIEs; - RANAP_LocationReportIEs_t locationReportIEs; - RANAP_LocationReportingControlIEs_t locationReportingControlIEs; - RANAP_MBMSCNDe_RegistrationRequestIEs_t mbmscnDe_RegistrationRequestIEs; - RANAP_MBMSCNDe_RegistrationResponseIEs_t mbmscnDe_RegistrationResponseIEs; - RANAP_MBMSRABEstablishmentIndicationIEs_t mbmsrabEstablishmentIndicationIEs; - RANAP_MBMSRABReleaseFailureIEs_t mbmsrabReleaseFailureIEs; - RANAP_MBMSRABReleaseIEs_t mbmsrabReleaseIEs; - RANAP_MBMSRABReleaseRequestIEs_t mbmsrabReleaseRequestIEs; - RANAP_MBMSRegistrationFailureIEs_t mbmsRegistrationFailureIEs; - RANAP_MBMSRegistrationRequestIEs_t mbmsRegistrationRequestIEs; - RANAP_MBMSRegistrationResponseIEs_t mbmsRegistrationResponseIEs; - RANAP_MBMSSessionStartFailureIEs_t mbmsSessionStartFailureIEs; - RANAP_MBMSSessionStartIEs_t mbmsSessionStartIEs; - RANAP_MBMSSessionStartResponseIEs_t mbmsSessionStartResponseIEs; - RANAP_MBMSSessionStopIEs_t mbmsSessionStopIEs; - RANAP_MBMSSessionStopResponseIEs_t mbmsSessionStopResponseIEs; - RANAP_MBMSSessionUpdateFailureIEs_t mbmsSessionUpdateFailureIEs; - RANAP_MBMSSessionUpdateIEs_t mbmsSessionUpdateIEs; - RANAP_MBMSSessionUpdateResponseIEs_t mbmsSessionUpdateResponseIEs; - RANAP_MBMSUELinkingRequestIEs_t mbmsueLinkingRequestIEs; - RANAP_MBMSUELinkingResponseIEs_t mbmsueLinkingResponseIEs; - RANAP_OverloadIEs_t overloadIEs; - RANAP_PagingIEs_t pagingIEs; - RANAP_RAB_AssignmentRequestIEs_t raB_AssignmentRequestIEs; - RANAP_RAB_AssignmentResponseIEs_t raB_AssignmentResponseIEs; - RANAP_RAB_ContextItemIEs_t raB_ContextItemIEs; - RANAP_RAB_ContextItemIEs_RANAP_RelocInf_t raB_ContextItemIEs_RANAP_RelocInf; - RANAP_RAB_DataForwardingItem_SRNS_CtxReq_IEs_t raB_DataForwardingItem_SRNS_CtxReq_IEs; - RANAP_RAB_DataForwardingItemIEs_t raB_DataForwardingItemIEs; - RANAP_RAB_DataVolumeReportItemIEs_t raB_DataVolumeReportItemIEs; - RANAP_RAB_DataVolumeReportRequestItemIEs_t raB_DataVolumeReportRequestItemIEs; - RANAP_RAB_FailedItem_EnhRelocInfoRes_IEs_t raB_FailedItem_EnhRelocInfoRes_IEs; - RANAP_RAB_FailedItemIEs_t raB_FailedItemIEs; - RANAP_RAB_ModifyItemIEs_t raB_ModifyItemIEs; - RANAP_RAB_ModifyRequestIEs_t raB_ModifyRequestIEs; - RANAP_RAB_QueuedItemIEs_t raB_QueuedItemIEs; - RANAP_RAB_ReleaseItemIEs_t raB_ReleaseItemIEs; - RANAP_RAB_ReleaseRequestIEs_t raB_ReleaseRequestIEs; - RANAP_RAB_ReleasedItem_IuRelComp_IEs_t raB_ReleasedItem_IuRelComp_IEs; - RANAP_RAB_ReleasedItemIEs_t raB_ReleasedItemIEs; - RANAP_RAB_RelocationReleaseItemIEs_t raB_RelocationReleaseItemIEs; - RANAP_RAB_SetupItem_EnhRelocInfoReq_IEs_t raB_SetupItem_EnhRelocInfoReq_IEs; - RANAP_RAB_SetupItem_EnhRelocInfoRes_IEs_t raB_SetupItem_EnhRelocInfoRes_IEs; - RANAP_RAB_SetupItem_EnhancedRelocCompleteReq_IEs_t raB_SetupItem_EnhancedRelocCompleteReq_IEs; - RANAP_RAB_SetupItem_EnhancedRelocCompleteRes_IEs_t raB_SetupItem_EnhancedRelocCompleteRes_IEs; - RANAP_RAB_SetupItem_RelocReq_IEs_t raB_SetupItem_RelocReq_IEs; - RANAP_RAB_SetupItem_RelocReqAck_IEs_t raB_SetupItem_RelocReqAck_IEs; - RANAP_RAB_SetupOrModifiedItemIEs_t raB_SetupOrModifiedItemIEs; - RANAP_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs_t raB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs; - RANAP_RABs_ContextFailedtoTransferItemIEs_t raBs_ContextFailedtoTransferItemIEs; - RANAP_RABs_failed_to_reportItemIEs_t raBs_failed_to_reportItemIEs; - RANAP_RANAP_EnhancedRelocationInformationRequestIEs_t ranaP_EnhancedRelocationInformationRequestIEs; - RANAP_RANAP_EnhancedRelocationInformationResponseIEs_t ranaP_EnhancedRelocationInformationResponseIEs; - RANAP_RANAP_RelocationInformationIEs_t ranaP_RelocationInformationIEs; - RANAP_RedirectionIndication_IEs_t redirectionIndication_IEs; - RANAP_RelocationCancelAcknowledgeIEs_t relocationCancelAcknowledgeIEs; - RANAP_RelocationCancelIEs_t relocationCancelIEs; - RANAP_RelocationCommandIEs_t relocationCommandIEs; - RANAP_RelocationFailureIEs_t relocationFailureIEs; - RANAP_RelocationPreparationFailureIEs_t relocationPreparationFailureIEs; - RANAP_RelocationRequestAcknowledgeIEs_t relocationRequestAcknowledgeIEs; - RANAP_RelocationRequestIEs_t relocationRequestIEs; - RANAP_RelocationRequiredIEs_t relocationRequiredIEs; - RANAP_ResetAcknowledgeIEs_t resetAcknowledgeIEs; - RANAP_ResetIEs_t resetIEs; - RANAP_ResetResourceAckItemIEs_t resetResourceAckItemIEs; - RANAP_ResetResourceAcknowledgeIEs_t resetResourceAcknowledgeIEs; - RANAP_ResetResourceIEs_t resetResourceIEs; - RANAP_ResetResourceItemIEs_t resetResourceItemIEs; - RANAP_SRNS_ContextRequestIEs_t srnS_ContextRequestIEs; - RANAP_SRNS_ContextResponseIEs_t srnS_ContextResponseIEs; - RANAP_SRNS_DataForwardCommandIEs_t srnS_DataForwardCommandIEs; - RANAP_SRVCC_CSKeysResponseIEs_t srvcC_CSKeysResponseIEs; - RANAP_SecurityModeCommandIEs_t securityModeCommandIEs; - RANAP_SecurityModeCompleteIEs_t securityModeCompleteIEs; - RANAP_SecurityModeRejectIEs_t securityModeRejectIEs; - RANAP_UESpecificInformationIndicationIEs_t ueSpecificInformationIndicationIEs; - RANAP_UeRadioCapabilityMatchResponseIEs_t ueRadioCapabilityMatchResponseIEs; - RANAP_UplinkInformationExchangeFailureIEs_t uplinkInformationExchangeFailureIEs; - RANAP_UplinkInformationExchangeRequestIEs_t uplinkInformationExchangeRequestIEs; - RANAP_UplinkInformationExchangeResponseIEs_t uplinkInformationExchangeResponseIEs; - } msg; -} ranap_message; - -/** \brief Decode function for RAB-ReleasedItemIEs ies. - * \param raB_ReleasedItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_releaseditemies( - RANAP_RAB_ReleasedItemIEs_t *raB_ReleasedItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ReleasedItemIEs ies. - * \param ranaP_RAB_ReleasedList Pointer to the ASN1 structure. - * \param raB_ReleasedItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_releaseditemies( - RANAP_RAB_ReleasedList_t *ranaP_RAB_ReleasedList, - RANAP_RAB_ReleasedItemIEs_t *raB_ReleasedItemIEs); - -/** \brief Decode function for Iu-ReleaseRequestIEs ies. - * \param iu_ReleaseRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_iu_releaserequesties( - RANAP_Iu_ReleaseRequestIEs_t *iu_ReleaseRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for Iu-ReleaseRequestIEs ies. - * \param ranaP_Iu_ReleaseRequest Pointer to the ASN1 structure. - * \param iu_ReleaseRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_iu_releaserequesties( - RANAP_Iu_ReleaseRequest_t *ranaP_Iu_ReleaseRequest, - RANAP_Iu_ReleaseRequestIEs_t *iu_ReleaseRequestIEs); - -/** \brief Decode function for UESpecificInformationIndicationIEs ies. - * \param ueSpecificInformationIndicationIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_uespecificinformationindicationies( - RANAP_UESpecificInformationIndicationIEs_t *ueSpecificInformationIndicationIEs, - ANY_t *any_p); - -/** \brief Encode function for UESpecificInformationIndicationIEs ies. - * \param ranaP_UESpecificInformationIndication Pointer to the ASN1 structure. - * \param ueSpecificInformationIndicationIEs Pointer to the IES structure. - **/ -int ranap_encode_uespecificinformationindicationies( - RANAP_UESpecificInformationIndication_t *ranaP_UESpecificInformationIndication, - RANAP_UESpecificInformationIndicationIEs_t *ueSpecificInformationIndicationIEs); - -/** \brief Decode function for EnhancedRelocationCompleteFailureIEs ies. - * \param enhancedRelocationCompleteFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_enhancedrelocationcompletefailureies( - RANAP_EnhancedRelocationCompleteFailureIEs_t *enhancedRelocationCompleteFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for EnhancedRelocationCompleteFailureIEs ies. - * \param ranaP_EnhancedRelocationCompleteFailure Pointer to the ASN1 structure. - * \param enhancedRelocationCompleteFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_enhancedrelocationcompletefailureies( - RANAP_EnhancedRelocationCompleteFailure_t *ranaP_EnhancedRelocationCompleteFailure, - RANAP_EnhancedRelocationCompleteFailureIEs_t *enhancedRelocationCompleteFailureIEs); - -/** \brief Decode function for MBMSCNDe-RegistrationResponseIEs ies. - * \param mbmscnDe_RegistrationResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmscnde_registrationresponseies( - RANAP_MBMSCNDe_RegistrationResponseIEs_t *mbmscnDe_RegistrationResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSCNDe-RegistrationResponseIEs ies. - * \param ranaP_MBMSCNDe_RegistrationResponse Pointer to the ASN1 structure. - * \param mbmscnDe_RegistrationResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmscnde_registrationresponseies( - RANAP_MBMSCNDe_RegistrationResponse_t *ranaP_MBMSCNDe_RegistrationResponse, - RANAP_MBMSCNDe_RegistrationResponseIEs_t *mbmscnDe_RegistrationResponseIEs); - -/** \brief Decode function for SecurityModeRejectIEs ies. - * \param securityModeRejectIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_securitymoderejecties( - RANAP_SecurityModeRejectIEs_t *securityModeRejectIEs, - ANY_t *any_p); - -/** \brief Encode function for SecurityModeRejectIEs ies. - * \param ranaP_SecurityModeReject Pointer to the ASN1 structure. - * \param securityModeRejectIEs Pointer to the IES structure. - **/ -int ranap_encode_securitymoderejecties( - RANAP_SecurityModeReject_t *ranaP_SecurityModeReject, - RANAP_SecurityModeRejectIEs_t *securityModeRejectIEs); - -/** \brief Decode function for RANAP-RelocationInformationIEs ies. - * \param ranaP_RelocationInformationIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_ranap_relocationinformationies( - RANAP_RANAP_RelocationInformationIEs_t *ranaP_RelocationInformationIEs, - ANY_t *any_p); - -/** \brief Encode function for RANAP-RelocationInformationIEs ies. - * \param ranaP_RANAP_RelocationInformation Pointer to the ASN1 structure. - * \param ranaP_RelocationInformationIEs Pointer to the IES structure. - **/ -int ranap_encode_ranap_relocationinformationies( - RANAP_RANAP_RelocationInformation_t *ranaP_RANAP_RelocationInformation, - RANAP_RANAP_RelocationInformationIEs_t *ranaP_RelocationInformationIEs); - -/** \brief Decode function for ResetAcknowledgeIEs ies. - * \param resetAcknowledgeIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_resetacknowledgeies( - RANAP_ResetAcknowledgeIEs_t *resetAcknowledgeIEs, - ANY_t *any_p); - -/** \brief Encode function for ResetAcknowledgeIEs ies. - * \param ranaP_ResetAcknowledge Pointer to the ASN1 structure. - * \param resetAcknowledgeIEs Pointer to the IES structure. - **/ -int ranap_encode_resetacknowledgeies( - RANAP_ResetAcknowledge_t *ranaP_ResetAcknowledge, - RANAP_ResetAcknowledgeIEs_t *resetAcknowledgeIEs); - -/** \brief Decode function for RelocationCancelAcknowledgeIEs ies. - * \param relocationCancelAcknowledgeIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationcancelacknowledgeies( - RANAP_RelocationCancelAcknowledgeIEs_t *relocationCancelAcknowledgeIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationCancelAcknowledgeIEs ies. - * \param ranaP_RelocationCancelAcknowledge Pointer to the ASN1 structure. - * \param relocationCancelAcknowledgeIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationcancelacknowledgeies( - RANAP_RelocationCancelAcknowledge_t *ranaP_RelocationCancelAcknowledge, - RANAP_RelocationCancelAcknowledgeIEs_t *relocationCancelAcknowledgeIEs); - -/** \brief Decode function for SRVCC-CSKeysResponseIEs ies. - * \param srvcC_CSKeysResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_srvcc_cskeysresponseies( - RANAP_SRVCC_CSKeysResponseIEs_t *srvcC_CSKeysResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for SRVCC-CSKeysResponseIEs ies. - * \param ranaP_SRVCC_CSKeysResponse Pointer to the ASN1 structure. - * \param srvcC_CSKeysResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_srvcc_cskeysresponseies( - RANAP_SRVCC_CSKeysResponse_t *ranaP_SRVCC_CSKeysResponse, - RANAP_SRVCC_CSKeysResponseIEs_t *srvcC_CSKeysResponseIEs); - -/** \brief Decode function for MBMSCNDe-RegistrationRequestIEs ies. - * \param mbmscnDe_RegistrationRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmscnde_registrationrequesties( - RANAP_MBMSCNDe_RegistrationRequestIEs_t *mbmscnDe_RegistrationRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSCNDe-RegistrationRequestIEs ies. - * \param ranaP_MBMSCNDe_RegistrationRequest Pointer to the ASN1 structure. - * \param mbmscnDe_RegistrationRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmscnde_registrationrequesties( - RANAP_MBMSCNDe_RegistrationRequest_t *ranaP_MBMSCNDe_RegistrationRequest, - RANAP_MBMSCNDe_RegistrationRequestIEs_t *mbmscnDe_RegistrationRequestIEs); - -/** \brief Decode function for PagingIEs ies. - * \param pagingIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_pagingies( - RANAP_PagingIEs_t *pagingIEs, - ANY_t *any_p); - -/** \brief Encode function for PagingIEs ies. - * \param ranaP_Paging Pointer to the ASN1 structure. - * \param pagingIEs Pointer to the IES structure. - **/ -int ranap_encode_pagingies( - RANAP_Paging_t *ranaP_Paging, - RANAP_PagingIEs_t *pagingIEs); - -/** \brief Decode function for GERAN-Iumode-RAB-Failed-RABAssgntResponse-ItemIEs ies. - * \param geraN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_geran_iumode_rab_failed_rabassgntresponse_itemies( - RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs_t *geraN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs, - ANY_t *any_p); - -/** \brief Encode function for GERAN-Iumode-RAB-Failed-RABAssgntResponse-ItemIEs ies. - * \param ranaP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_List Pointer to the ASN1 structure. - * \param geraN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs Pointer to the IES structure. - **/ -int ranap_encode_geran_iumode_rab_failed_rabassgntresponse_itemies( - RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_List_t *ranaP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_List, - RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs_t *geraN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs); - -/** \brief Decode function for ResetResourceItemIEs ies. - * \param resetResourceItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_resetresourceitemies( - RANAP_ResetResourceItemIEs_t *resetResourceItemIEs, - ANY_t *any_p); - -/** \brief Encode function for ResetResourceItemIEs ies. - * \param ranaP_ResetResourceList Pointer to the ASN1 structure. - * \param resetResourceItemIEs Pointer to the IES structure. - **/ -int ranap_encode_resetresourceitemies( - RANAP_ResetResourceList_t *ranaP_ResetResourceList, - RANAP_ResetResourceItemIEs_t *resetResourceItemIEs); - -/** \brief Decode function for LocationReportingControlIEs ies. - * \param locationReportingControlIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_locationreportingcontrolies( - RANAP_LocationReportingControlIEs_t *locationReportingControlIEs, - ANY_t *any_p); - -/** \brief Encode function for LocationReportingControlIEs ies. - * \param ranaP_LocationReportingControl Pointer to the ASN1 structure. - * \param locationReportingControlIEs Pointer to the IES structure. - **/ -int ranap_encode_locationreportingcontrolies( - RANAP_LocationReportingControl_t *ranaP_LocationReportingControl, - RANAP_LocationReportingControlIEs_t *locationReportingControlIEs); - -/** \brief Decode function for EnhancedRelocationCompleteRequestIEs ies. - * \param enhancedRelocationCompleteRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_enhancedrelocationcompleterequesties( - RANAP_EnhancedRelocationCompleteRequestIEs_t *enhancedRelocationCompleteRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for EnhancedRelocationCompleteRequestIEs ies. - * \param ranaP_EnhancedRelocationCompleteRequest Pointer to the ASN1 structure. - * \param enhancedRelocationCompleteRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_enhancedrelocationcompleterequesties( - RANAP_EnhancedRelocationCompleteRequest_t *ranaP_EnhancedRelocationCompleteRequest, - RANAP_EnhancedRelocationCompleteRequestIEs_t *enhancedRelocationCompleteRequestIEs); - -/** \brief Decode function for RAB-FailedItemIEs ies. - * \param raB_FailedItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_faileditemies( - RANAP_RAB_FailedItemIEs_t *raB_FailedItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-FailedItemIEs ies. - * \param ranaP_RAB_FailedList Pointer to the ASN1 structure. - * \param raB_FailedItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_faileditemies( - RANAP_RAB_FailedList_t *ranaP_RAB_FailedList, - RANAP_RAB_FailedItemIEs_t *raB_FailedItemIEs); - -/** \brief Decode function for MBMSUELinkingResponseIEs ies. - * \param mbmsueLinkingResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsuelinkingresponseies( - RANAP_MBMSUELinkingResponseIEs_t *mbmsueLinkingResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSUELinkingResponseIEs ies. - * \param ranaP_MBMSUELinkingResponse Pointer to the ASN1 structure. - * \param mbmsueLinkingResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsuelinkingresponseies( - RANAP_MBMSUELinkingResponse_t *ranaP_MBMSUELinkingResponse, - RANAP_MBMSUELinkingResponseIEs_t *mbmsueLinkingResponseIEs); - -/** \brief Decode function for RAB-QueuedItemIEs ies. - * \param raB_QueuedItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_queueditemies( - RANAP_RAB_QueuedItemIEs_t *raB_QueuedItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-QueuedItemIEs ies. - * \param ranaP_RAB_QueuedList Pointer to the ASN1 structure. - * \param raB_QueuedItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_queueditemies( - RANAP_RAB_QueuedList_t *ranaP_RAB_QueuedList, - RANAP_RAB_QueuedItemIEs_t *raB_QueuedItemIEs); - -/** \brief Decode function for CN-InvokeTraceIEs ies. - * \param cN_InvokeTraceIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_cn_invoketraceies( - RANAP_CN_InvokeTraceIEs_t *cN_InvokeTraceIEs, - ANY_t *any_p); - -/** \brief Encode function for CN-InvokeTraceIEs ies. - * \param ranaP_CN_InvokeTrace Pointer to the ASN1 structure. - * \param cN_InvokeTraceIEs Pointer to the IES structure. - **/ -int ranap_encode_cn_invoketraceies( - RANAP_CN_InvokeTrace_t *ranaP_CN_InvokeTrace, - RANAP_CN_InvokeTraceIEs_t *cN_InvokeTraceIEs); - -/** \brief Decode function for Iu-ReleaseCommandIEs ies. - * \param iu_ReleaseCommandIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_iu_releasecommandies( - RANAP_Iu_ReleaseCommandIEs_t *iu_ReleaseCommandIEs, - ANY_t *any_p); - -/** \brief Encode function for Iu-ReleaseCommandIEs ies. - * \param ranaP_Iu_ReleaseCommand Pointer to the ASN1 structure. - * \param iu_ReleaseCommandIEs Pointer to the IES structure. - **/ -int ranap_encode_iu_releasecommandies( - RANAP_Iu_ReleaseCommand_t *ranaP_Iu_ReleaseCommand, - RANAP_Iu_ReleaseCommandIEs_t *iu_ReleaseCommandIEs); - -/** \brief Decode function for RelocationRequestAcknowledgeIEs ies. - * \param relocationRequestAcknowledgeIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationrequestacknowledgeies( - RANAP_RelocationRequestAcknowledgeIEs_t *relocationRequestAcknowledgeIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationRequestAcknowledgeIEs ies. - * \param ranaP_RelocationRequestAcknowledge Pointer to the ASN1 structure. - * \param relocationRequestAcknowledgeIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationrequestacknowledgeies( - RANAP_RelocationRequestAcknowledge_t *ranaP_RelocationRequestAcknowledge, - RANAP_RelocationRequestAcknowledgeIEs_t *relocationRequestAcknowledgeIEs); - -/** \brief Decode function for RelocationFailureIEs ies. - * \param relocationFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationfailureies( - RANAP_RelocationFailureIEs_t *relocationFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationFailureIEs ies. - * \param ranaP_RelocationFailure Pointer to the ASN1 structure. - * \param relocationFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationfailureies( - RANAP_RelocationFailure_t *ranaP_RelocationFailure, - RANAP_RelocationFailureIEs_t *relocationFailureIEs); - -/** \brief Decode function for RABs-failed-to-reportItemIEs ies. - * \param raBs_failed_to_reportItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rabs_failed_to_reportitemies( - RANAP_RABs_failed_to_reportItemIEs_t *raBs_failed_to_reportItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RABs-failed-to-reportItemIEs ies. - * \param ranaP_RABs_failed_to_reportList Pointer to the ASN1 structure. - * \param raBs_failed_to_reportItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rabs_failed_to_reportitemies( - RANAP_RABs_failed_to_reportList_t *ranaP_RABs_failed_to_reportList, - RANAP_RABs_failed_to_reportItemIEs_t *raBs_failed_to_reportItemIEs); - -/** \brief Decode function for RelocationPreparationFailureIEs ies. - * \param relocationPreparationFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationpreparationfailureies( - RANAP_RelocationPreparationFailureIEs_t *relocationPreparationFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationPreparationFailureIEs ies. - * \param ranaP_RelocationPreparationFailure Pointer to the ASN1 structure. - * \param relocationPreparationFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationpreparationfailureies( - RANAP_RelocationPreparationFailure_t *ranaP_RelocationPreparationFailure, - RANAP_RelocationPreparationFailureIEs_t *relocationPreparationFailureIEs); - -/** \brief Decode function for RAB-ToBeReleasedItem-EnhancedRelocCompleteRes-IEs ies. - * \param raB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_tobereleaseditem_enhancedreloccompleteres_ies( - RANAP_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs_t *raB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ToBeReleasedItem-EnhancedRelocCompleteRes-IEs ies. - * \param ranaP_RAB_ToBeReleasedList_EnhancedRelocCompleteRes Pointer to the ASN1 structure. - * \param raB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_tobereleaseditem_enhancedreloccompleteres_ies( - RANAP_RAB_ToBeReleasedList_EnhancedRelocCompleteRes_t *ranaP_RAB_ToBeReleasedList_EnhancedRelocCompleteRes, - RANAP_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs_t *raB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs); - -/** \brief Decode function for RABs-ContextFailedtoTransferItemIEs ies. - * \param raBs_ContextFailedtoTransferItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rabs_contextfailedtotransferitemies( - RANAP_RABs_ContextFailedtoTransferItemIEs_t *raBs_ContextFailedtoTransferItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RABs-ContextFailedtoTransferItemIEs ies. - * \param ranaP_RABs_ContextFailedtoTransferList Pointer to the ASN1 structure. - * \param raBs_ContextFailedtoTransferItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rabs_contextfailedtotransferitemies( - RANAP_RABs_ContextFailedtoTransferList_t *ranaP_RABs_ContextFailedtoTransferList, - RANAP_RABs_ContextFailedtoTransferItemIEs_t *raBs_ContextFailedtoTransferItemIEs); - -/** \brief Decode function for RelocationRequiredIEs ies. - * \param relocationRequiredIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationrequiredies( - RANAP_RelocationRequiredIEs_t *relocationRequiredIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationRequiredIEs ies. - * \param ranaP_RelocationRequired Pointer to the ASN1 structure. - * \param relocationRequiredIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationrequiredies( - RANAP_RelocationRequired_t *ranaP_RelocationRequired, - RANAP_RelocationRequiredIEs_t *relocationRequiredIEs); - -/** \brief Decode function for MBMSSessionStopIEs ies. - * \param mbmsSessionStopIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionstopies( - RANAP_MBMSSessionStopIEs_t *mbmsSessionStopIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionStopIEs ies. - * \param ranaP_MBMSSessionStop Pointer to the ASN1 structure. - * \param mbmsSessionStopIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionstopies( - RANAP_MBMSSessionStop_t *ranaP_MBMSSessionStop, - RANAP_MBMSSessionStopIEs_t *mbmsSessionStopIEs); - -/** \brief Decode function for MBMSSessionUpdateFailureIEs ies. - * \param mbmsSessionUpdateFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionupdatefailureies( - RANAP_MBMSSessionUpdateFailureIEs_t *mbmsSessionUpdateFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionUpdateFailureIEs ies. - * \param ranaP_MBMSSessionUpdateFailure Pointer to the ASN1 structure. - * \param mbmsSessionUpdateFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionupdatefailureies( - RANAP_MBMSSessionUpdateFailure_t *ranaP_MBMSSessionUpdateFailure, - RANAP_MBMSSessionUpdateFailureIEs_t *mbmsSessionUpdateFailureIEs); - -/** \brief Decode function for ResetIEs ies. - * \param resetIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_reseties( - RANAP_ResetIEs_t *resetIEs, - ANY_t *any_p); - -/** \brief Encode function for ResetIEs ies. - * \param ranaP_Reset Pointer to the ASN1 structure. - * \param resetIEs Pointer to the IES structure. - **/ -int ranap_encode_reseties( - RANAP_Reset_t *ranaP_Reset, - RANAP_ResetIEs_t *resetIEs); - -/** \brief Decode function for LocationRelatedDataFailureIEs ies. - * \param locationRelatedDataFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_locationrelateddatafailureies( - RANAP_LocationRelatedDataFailureIEs_t *locationRelatedDataFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for LocationRelatedDataFailureIEs ies. - * \param ranaP_LocationRelatedDataFailure Pointer to the ASN1 structure. - * \param locationRelatedDataFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_locationrelateddatafailureies( - RANAP_LocationRelatedDataFailure_t *ranaP_LocationRelatedDataFailure, - RANAP_LocationRelatedDataFailureIEs_t *locationRelatedDataFailureIEs); - -/** \brief Decode function for ResetResourceAcknowledgeIEs ies. - * \param resetResourceAcknowledgeIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_resetresourceacknowledgeies( - RANAP_ResetResourceAcknowledgeIEs_t *resetResourceAcknowledgeIEs, - ANY_t *any_p); - -/** \brief Encode function for ResetResourceAcknowledgeIEs ies. - * \param ranaP_ResetResourceAcknowledge Pointer to the ASN1 structure. - * \param resetResourceAcknowledgeIEs Pointer to the IES structure. - **/ -int ranap_encode_resetresourceacknowledgeies( - RANAP_ResetResourceAcknowledge_t *ranaP_ResetResourceAcknowledge, - RANAP_ResetResourceAcknowledgeIEs_t *resetResourceAcknowledgeIEs); - -/** \brief Decode function for MBMSRegistrationRequestIEs ies. - * \param mbmsRegistrationRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsregistrationrequesties( - RANAP_MBMSRegistrationRequestIEs_t *mbmsRegistrationRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSRegistrationRequestIEs ies. - * \param ranaP_MBMSRegistrationRequest Pointer to the ASN1 structure. - * \param mbmsRegistrationRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsregistrationrequesties( - RANAP_MBMSRegistrationRequest_t *ranaP_MBMSRegistrationRequest, - RANAP_MBMSRegistrationRequestIEs_t *mbmsRegistrationRequestIEs); - -/** \brief Decode function for UplinkInformationExchangeRequestIEs ies. - * \param uplinkInformationExchangeRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_uplinkinformationexchangerequesties( - RANAP_UplinkInformationExchangeRequestIEs_t *uplinkInformationExchangeRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for UplinkInformationExchangeRequestIEs ies. - * \param ranaP_UplinkInformationExchangeRequest Pointer to the ASN1 structure. - * \param uplinkInformationExchangeRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_uplinkinformationexchangerequesties( - RANAP_UplinkInformationExchangeRequest_t *ranaP_UplinkInformationExchangeRequest, - RANAP_UplinkInformationExchangeRequestIEs_t *uplinkInformationExchangeRequestIEs); - -/** \brief Decode function for MBMSSessionStopResponseIEs ies. - * \param mbmsSessionStopResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionstopresponseies( - RANAP_MBMSSessionStopResponseIEs_t *mbmsSessionStopResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionStopResponseIEs ies. - * \param ranaP_MBMSSessionStopResponse Pointer to the ASN1 structure. - * \param mbmsSessionStopResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionstopresponseies( - RANAP_MBMSSessionStopResponse_t *ranaP_MBMSSessionStopResponse, - RANAP_MBMSSessionStopResponseIEs_t *mbmsSessionStopResponseIEs); - -/** \brief Decode function for RAB-ContextItemIEs-RANAP-RelocInf ies. - * \param raB_ContextItemIEs_RANAP_RelocInf Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_contextitemies_ranap_relocinf( - RANAP_RAB_ContextItemIEs_RANAP_RelocInf_t *raB_ContextItemIEs_RANAP_RelocInf, - ANY_t *any_p); - -/** \brief Encode function for RAB-ContextItemIEs-RANAP-RelocInf ies. - * \param ranaP_RAB_ContextList_RANAP_RelocInf Pointer to the ASN1 structure. - * \param raB_ContextItemIEs_RANAP_RelocInf Pointer to the IES structure. - **/ -int ranap_encode_rab_contextitemies_ranap_relocinf( - RANAP_RAB_ContextList_RANAP_RelocInf_t *ranaP_RAB_ContextList_RANAP_RelocInf, - RANAP_RAB_ContextItemIEs_RANAP_RelocInf_t *raB_ContextItemIEs_RANAP_RelocInf); - -/** \brief Decode function for LocationRelatedDataRequestIEs ies. - * \param locationRelatedDataRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_locationrelateddatarequesties( - RANAP_LocationRelatedDataRequestIEs_t *locationRelatedDataRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for LocationRelatedDataRequestIEs ies. - * \param ranaP_LocationRelatedDataRequest Pointer to the ASN1 structure. - * \param locationRelatedDataRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_locationrelateddatarequesties( - RANAP_LocationRelatedDataRequest_t *ranaP_LocationRelatedDataRequest, - RANAP_LocationRelatedDataRequestIEs_t *locationRelatedDataRequestIEs); - -/** \brief Decode function for RAB-DataForwardingItem-SRNS-CtxReq-IEs ies. - * \param raB_DataForwardingItem_SRNS_CtxReq_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_dataforwardingitem_srns_ctxreq_ies( - RANAP_RAB_DataForwardingItem_SRNS_CtxReq_IEs_t *raB_DataForwardingItem_SRNS_CtxReq_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-DataForwardingItem-SRNS-CtxReq-IEs ies. - * \param ranaP_RAB_DataForwardingList_SRNS_CtxReq Pointer to the ASN1 structure. - * \param raB_DataForwardingItem_SRNS_CtxReq_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_dataforwardingitem_srns_ctxreq_ies( - RANAP_RAB_DataForwardingList_SRNS_CtxReq_t *ranaP_RAB_DataForwardingList_SRNS_CtxReq, - RANAP_RAB_DataForwardingItem_SRNS_CtxReq_IEs_t *raB_DataForwardingItem_SRNS_CtxReq_IEs); - -/** \brief Decode function for RAB-ReleaseItemIEs ies. - * \param raB_ReleaseItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_releaseitemies( - RANAP_RAB_ReleaseItemIEs_t *raB_ReleaseItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ReleaseItemIEs ies. - * \param ranaP_RAB_ReleaseList Pointer to the ASN1 structure. - * \param raB_ReleaseItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_releaseitemies( - RANAP_RAB_ReleaseList_t *ranaP_RAB_ReleaseList, - RANAP_RAB_ReleaseItemIEs_t *raB_ReleaseItemIEs); - -/** \brief Decode function for RAB-DataVolumeReportRequestItemIEs ies. - * \param raB_DataVolumeReportRequestItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_datavolumereportrequestitemies( - RANAP_RAB_DataVolumeReportRequestItemIEs_t *raB_DataVolumeReportRequestItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-DataVolumeReportRequestItemIEs ies. - * \param ranaP_RAB_DataVolumeReportRequestList Pointer to the ASN1 structure. - * \param raB_DataVolumeReportRequestItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_datavolumereportrequestitemies( - RANAP_RAB_DataVolumeReportRequestList_t *ranaP_RAB_DataVolumeReportRequestList, - RANAP_RAB_DataVolumeReportRequestItemIEs_t *raB_DataVolumeReportRequestItemIEs); - -/** \brief Decode function for InformationTransferConfirmationIEs ies. - * \param informationTransferConfirmationIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_informationtransferconfirmationies( - RANAP_InformationTransferConfirmationIEs_t *informationTransferConfirmationIEs, - ANY_t *any_p); - -/** \brief Encode function for InformationTransferConfirmationIEs ies. - * \param ranaP_InformationTransferConfirmation Pointer to the ASN1 structure. - * \param informationTransferConfirmationIEs Pointer to the IES structure. - **/ -int ranap_encode_informationtransferconfirmationies( - RANAP_InformationTransferConfirmation_t *ranaP_InformationTransferConfirmation, - RANAP_InformationTransferConfirmationIEs_t *informationTransferConfirmationIEs); - -/** \brief Decode function for InitialUE-MessageIEs ies. - * \param initialUE_MessageIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_initialue_messageies( - RANAP_InitialUE_MessageIEs_t *initialUE_MessageIEs, - ANY_t *any_p); - -/** \brief Encode function for InitialUE-MessageIEs ies. - * \param ranaP_InitialUE_Message Pointer to the ASN1 structure. - * \param initialUE_MessageIEs Pointer to the IES structure. - **/ -int ranap_encode_initialue_messageies( - RANAP_InitialUE_Message_t *ranaP_InitialUE_Message, - RANAP_InitialUE_MessageIEs_t *initialUE_MessageIEs); - -/** \brief Decode function for SRNS-ContextResponseIEs ies. - * \param srnS_ContextResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_srns_contextresponseies( - RANAP_SRNS_ContextResponseIEs_t *srnS_ContextResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for SRNS-ContextResponseIEs ies. - * \param ranaP_SRNS_ContextResponse Pointer to the ASN1 structure. - * \param srnS_ContextResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_srns_contextresponseies( - RANAP_SRNS_ContextResponse_t *ranaP_SRNS_ContextResponse, - RANAP_SRNS_ContextResponseIEs_t *srnS_ContextResponseIEs); - -/** \brief Decode function for ResetResourceAckItemIEs ies. - * \param resetResourceAckItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_resetresourceackitemies( - RANAP_ResetResourceAckItemIEs_t *resetResourceAckItemIEs, - ANY_t *any_p); - -/** \brief Encode function for ResetResourceAckItemIEs ies. - * \param ranaP_ResetResourceAckList Pointer to the ASN1 structure. - * \param resetResourceAckItemIEs Pointer to the IES structure. - **/ -int ranap_encode_resetresourceackitemies( - RANAP_ResetResourceAckList_t *ranaP_ResetResourceAckList, - RANAP_ResetResourceAckItemIEs_t *resetResourceAckItemIEs); - -/** \brief Decode function for SRNS-DataForwardCommandIEs ies. - * \param srnS_DataForwardCommandIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_srns_dataforwardcommandies( - RANAP_SRNS_DataForwardCommandIEs_t *srnS_DataForwardCommandIEs, - ANY_t *any_p); - -/** \brief Encode function for SRNS-DataForwardCommandIEs ies. - * \param ranaP_SRNS_DataForwardCommand Pointer to the ASN1 structure. - * \param srnS_DataForwardCommandIEs Pointer to the IES structure. - **/ -int ranap_encode_srns_dataforwardcommandies( - RANAP_SRNS_DataForwardCommand_t *ranaP_SRNS_DataForwardCommand, - RANAP_SRNS_DataForwardCommandIEs_t *srnS_DataForwardCommandIEs); - -/** \brief Decode function for RelocationRequestIEs ies. - * \param relocationRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationrequesties( - RANAP_RelocationRequestIEs_t *relocationRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationRequestIEs ies. - * \param ranaP_RelocationRequest Pointer to the ASN1 structure. - * \param relocationRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationrequesties( - RANAP_RelocationRequest_t *ranaP_RelocationRequest, - RANAP_RelocationRequestIEs_t *relocationRequestIEs); - -/** \brief Decode function for SRNS-ContextRequestIEs ies. - * \param srnS_ContextRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_srns_contextrequesties( - RANAP_SRNS_ContextRequestIEs_t *srnS_ContextRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for SRNS-ContextRequestIEs ies. - * \param ranaP_SRNS_ContextRequest Pointer to the ASN1 structure. - * \param srnS_ContextRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_srns_contextrequesties( - RANAP_SRNS_ContextRequest_t *ranaP_SRNS_ContextRequest, - RANAP_SRNS_ContextRequestIEs_t *srnS_ContextRequestIEs); - -/** \brief Decode function for MBMSSessionStartResponseIEs ies. - * \param mbmsSessionStartResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionstartresponseies( - RANAP_MBMSSessionStartResponseIEs_t *mbmsSessionStartResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionStartResponseIEs ies. - * \param ranaP_MBMSSessionStartResponse Pointer to the ASN1 structure. - * \param mbmsSessionStartResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionstartresponseies( - RANAP_MBMSSessionStartResponse_t *ranaP_MBMSSessionStartResponse, - RANAP_MBMSSessionStartResponseIEs_t *mbmsSessionStartResponseIEs); - -/** \brief Decode function for DirectTransferIEs ies. - * \param directTransferIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_directtransferies( - RANAP_DirectTransferIEs_t *directTransferIEs, - ANY_t *any_p); - -/** \brief Encode function for DirectTransferIEs ies. - * \param ranaP_DirectTransfer Pointer to the ASN1 structure. - * \param directTransferIEs Pointer to the IES structure. - **/ -int ranap_encode_directtransferies( - RANAP_DirectTransfer_t *ranaP_DirectTransfer, - RANAP_DirectTransferIEs_t *directTransferIEs); - -/** \brief Decode function for ResetResourceIEs ies. - * \param resetResourceIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_resetresourceies( - RANAP_ResetResourceIEs_t *resetResourceIEs, - ANY_t *any_p); - -/** \brief Encode function for ResetResourceIEs ies. - * \param ranaP_ResetResource Pointer to the ASN1 structure. - * \param resetResourceIEs Pointer to the IES structure. - **/ -int ranap_encode_resetresourceies( - RANAP_ResetResource_t *ranaP_ResetResource, - RANAP_ResetResourceIEs_t *resetResourceIEs); - -/** \brief Decode function for RANAP-EnhancedRelocationInformationResponseIEs ies. - * \param ranaP_EnhancedRelocationInformationResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_ranap_enhancedrelocationinformationresponseies( - RANAP_RANAP_EnhancedRelocationInformationResponseIEs_t *ranaP_EnhancedRelocationInformationResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for RANAP-EnhancedRelocationInformationResponseIEs ies. - * \param ranaP_RANAP_EnhancedRelocationInformationResponse Pointer to the ASN1 structure. - * \param ranaP_EnhancedRelocationInformationResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_ranap_enhancedrelocationinformationresponseies( - RANAP_RANAP_EnhancedRelocationInformationResponse_t *ranaP_RANAP_EnhancedRelocationInformationResponse, - RANAP_RANAP_EnhancedRelocationInformationResponseIEs_t *ranaP_EnhancedRelocationInformationResponseIEs); - -/** \brief Decode function for RAB-SetupItem-EnhancedRelocCompleteRes-IEs ies. - * \param raB_SetupItem_EnhancedRelocCompleteRes_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_setupitem_enhancedreloccompleteres_ies( - RANAP_RAB_SetupItem_EnhancedRelocCompleteRes_IEs_t *raB_SetupItem_EnhancedRelocCompleteRes_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-SetupItem-EnhancedRelocCompleteRes-IEs ies. - * \param ranaP_RAB_SetupList_EnhancedRelocCompleteRes Pointer to the ASN1 structure. - * \param raB_SetupItem_EnhancedRelocCompleteRes_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_setupitem_enhancedreloccompleteres_ies( - RANAP_RAB_SetupList_EnhancedRelocCompleteRes_t *ranaP_RAB_SetupList_EnhancedRelocCompleteRes, - RANAP_RAB_SetupItem_EnhancedRelocCompleteRes_IEs_t *raB_SetupItem_EnhancedRelocCompleteRes_IEs); - -/** \brief Decode function for RANAP-EnhancedRelocationInformationRequestIEs ies. - * \param ranaP_EnhancedRelocationInformationRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_ranap_enhancedrelocationinformationrequesties( - RANAP_RANAP_EnhancedRelocationInformationRequestIEs_t *ranaP_EnhancedRelocationInformationRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for RANAP-EnhancedRelocationInformationRequestIEs ies. - * \param ranaP_RANAP_EnhancedRelocationInformationRequest Pointer to the ASN1 structure. - * \param ranaP_EnhancedRelocationInformationRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_ranap_enhancedrelocationinformationrequesties( - RANAP_RANAP_EnhancedRelocationInformationRequest_t *ranaP_RANAP_EnhancedRelocationInformationRequest, - RANAP_RANAP_EnhancedRelocationInformationRequestIEs_t *ranaP_EnhancedRelocationInformationRequestIEs); - -/** \brief Decode function for SecurityModeCommandIEs ies. - * \param securityModeCommandIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_securitymodecommandies( - RANAP_SecurityModeCommandIEs_t *securityModeCommandIEs, - ANY_t *any_p); - -/** \brief Encode function for SecurityModeCommandIEs ies. - * \param ranaP_SecurityModeCommand Pointer to the ASN1 structure. - * \param securityModeCommandIEs Pointer to the IES structure. - **/ -int ranap_encode_securitymodecommandies( - RANAP_SecurityModeCommand_t *ranaP_SecurityModeCommand, - RANAP_SecurityModeCommandIEs_t *securityModeCommandIEs); - -/** \brief Decode function for RelocationCancelIEs ies. - * \param relocationCancelIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationcancelies( - RANAP_RelocationCancelIEs_t *relocationCancelIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationCancelIEs ies. - * \param ranaP_RelocationCancel Pointer to the ASN1 structure. - * \param relocationCancelIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationcancelies( - RANAP_RelocationCancel_t *ranaP_RelocationCancel, - RANAP_RelocationCancelIEs_t *relocationCancelIEs); - -/** \brief Decode function for RAB-SetupItem-RelocReqAck-IEs ies. - * \param raB_SetupItem_RelocReqAck_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_setupitem_relocreqack_ies( - RANAP_RAB_SetupItem_RelocReqAck_IEs_t *raB_SetupItem_RelocReqAck_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-SetupItem-RelocReqAck-IEs ies. - * \param ranaP_RAB_SetupList_RelocReqAck Pointer to the ASN1 structure. - * \param raB_SetupItem_RelocReqAck_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_setupitem_relocreqack_ies( - RANAP_RAB_SetupList_RelocReqAck_t *ranaP_RAB_SetupList_RelocReqAck, - RANAP_RAB_SetupItem_RelocReqAck_IEs_t *raB_SetupItem_RelocReqAck_IEs); - -/** \brief Decode function for MBMSRegistrationFailureIEs ies. - * \param mbmsRegistrationFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsregistrationfailureies( - RANAP_MBMSRegistrationFailureIEs_t *mbmsRegistrationFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSRegistrationFailureIEs ies. - * \param ranaP_MBMSRegistrationFailure Pointer to the ASN1 structure. - * \param mbmsRegistrationFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsregistrationfailureies( - RANAP_MBMSRegistrationFailure_t *ranaP_MBMSRegistrationFailure, - RANAP_MBMSRegistrationFailureIEs_t *mbmsRegistrationFailureIEs); - -/** \brief Decode function for MBMSRABEstablishmentIndicationIEs ies. - * \param mbmsrabEstablishmentIndicationIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsrabestablishmentindicationies( - RANAP_MBMSRABEstablishmentIndicationIEs_t *mbmsrabEstablishmentIndicationIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSRABEstablishmentIndicationIEs ies. - * \param ranaP_MBMSRABEstablishmentIndication Pointer to the ASN1 structure. - * \param mbmsrabEstablishmentIndicationIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsrabestablishmentindicationies( - RANAP_MBMSRABEstablishmentIndication_t *ranaP_MBMSRABEstablishmentIndication, - RANAP_MBMSRABEstablishmentIndicationIEs_t *mbmsrabEstablishmentIndicationIEs); - -/** \brief Decode function for MBMSSessionStartFailureIEs ies. - * \param mbmsSessionStartFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionstartfailureies( - RANAP_MBMSSessionStartFailureIEs_t *mbmsSessionStartFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionStartFailureIEs ies. - * \param ranaP_MBMSSessionStartFailure Pointer to the ASN1 structure. - * \param mbmsSessionStartFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionstartfailureies( - RANAP_MBMSSessionStartFailure_t *ranaP_MBMSSessionStartFailure, - RANAP_MBMSSessionStartFailureIEs_t *mbmsSessionStartFailureIEs); - -/** \brief Decode function for Iu-ReleaseCompleteIEs ies. - * \param iu_ReleaseCompleteIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_iu_releasecompleteies( - RANAP_Iu_ReleaseCompleteIEs_t *iu_ReleaseCompleteIEs, - ANY_t *any_p); - -/** \brief Encode function for Iu-ReleaseCompleteIEs ies. - * \param ranaP_Iu_ReleaseComplete Pointer to the ASN1 structure. - * \param iu_ReleaseCompleteIEs Pointer to the IES structure. - **/ -int ranap_encode_iu_releasecompleteies( - RANAP_Iu_ReleaseComplete_t *ranaP_Iu_ReleaseComplete, - RANAP_Iu_ReleaseCompleteIEs_t *iu_ReleaseCompleteIEs); - -/** \brief Decode function for CN-DeactivateTraceIEs ies. - * \param cN_DeactivateTraceIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_cn_deactivatetraceies( - RANAP_CN_DeactivateTraceIEs_t *cN_DeactivateTraceIEs, - ANY_t *any_p); - -/** \brief Encode function for CN-DeactivateTraceIEs ies. - * \param ranaP_CN_DeactivateTrace Pointer to the ASN1 structure. - * \param cN_DeactivateTraceIEs Pointer to the IES structure. - **/ -int ranap_encode_cn_deactivatetraceies( - RANAP_CN_DeactivateTrace_t *ranaP_CN_DeactivateTrace, - RANAP_CN_DeactivateTraceIEs_t *cN_DeactivateTraceIEs); - -/** \brief Decode function for DataVolumeReportRequestIEs ies. - * \param dataVolumeReportRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_datavolumereportrequesties( - RANAP_DataVolumeReportRequestIEs_t *dataVolumeReportRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for DataVolumeReportRequestIEs ies. - * \param ranaP_DataVolumeReportRequest Pointer to the ASN1 structure. - * \param dataVolumeReportRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_datavolumereportrequesties( - RANAP_DataVolumeReportRequest_t *ranaP_DataVolumeReportRequest, - RANAP_DataVolumeReportRequestIEs_t *dataVolumeReportRequestIEs); - -/** \brief Decode function for RAB-RelocationReleaseItemIEs ies. - * \param raB_RelocationReleaseItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_relocationreleaseitemies( - RANAP_RAB_RelocationReleaseItemIEs_t *raB_RelocationReleaseItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-RelocationReleaseItemIEs ies. - * \param ranaP_RAB_RelocationReleaseList Pointer to the ASN1 structure. - * \param raB_RelocationReleaseItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_relocationreleaseitemies( - RANAP_RAB_RelocationReleaseList_t *ranaP_RAB_RelocationReleaseList, - RANAP_RAB_RelocationReleaseItemIEs_t *raB_RelocationReleaseItemIEs); - -/** \brief Decode function for RAB-ModifyRequestIEs ies. - * \param raB_ModifyRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_modifyrequesties( - RANAP_RAB_ModifyRequestIEs_t *raB_ModifyRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ModifyRequestIEs ies. - * \param ranaP_RAB_ModifyRequest Pointer to the ASN1 structure. - * \param raB_ModifyRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_modifyrequesties( - RANAP_RAB_ModifyRequest_t *ranaP_RAB_ModifyRequest, - RANAP_RAB_ModifyRequestIEs_t *raB_ModifyRequestIEs); - -/** \brief Decode function for SecurityModeCompleteIEs ies. - * \param securityModeCompleteIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_securitymodecompleteies( - RANAP_SecurityModeCompleteIEs_t *securityModeCompleteIEs, - ANY_t *any_p); - -/** \brief Encode function for SecurityModeCompleteIEs ies. - * \param ranaP_SecurityModeComplete Pointer to the ASN1 structure. - * \param securityModeCompleteIEs Pointer to the IES structure. - **/ -int ranap_encode_securitymodecompleteies( - RANAP_SecurityModeComplete_t *ranaP_SecurityModeComplete, - RANAP_SecurityModeCompleteIEs_t *securityModeCompleteIEs); - -/** \brief Decode function for MBMSRABReleaseIEs ies. - * \param mbmsrabReleaseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsrabreleaseies( - RANAP_MBMSRABReleaseIEs_t *mbmsrabReleaseIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSRABReleaseIEs ies. - * \param ranaP_MBMSRABRelease Pointer to the ASN1 structure. - * \param mbmsrabReleaseIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsrabreleaseies( - RANAP_MBMSRABRelease_t *ranaP_MBMSRABRelease, - RANAP_MBMSRABReleaseIEs_t *mbmsrabReleaseIEs); - -/** \brief Decode function for OverloadIEs ies. - * \param overloadIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_overloadies( - RANAP_OverloadIEs_t *overloadIEs, - ANY_t *any_p); - -/** \brief Encode function for OverloadIEs ies. - * \param ranaP_Overload Pointer to the ASN1 structure. - * \param overloadIEs Pointer to the IES structure. - **/ -int ranap_encode_overloadies( - RANAP_Overload_t *ranaP_Overload, - RANAP_OverloadIEs_t *overloadIEs); - -/** \brief Decode function for RAB-SetupItem-RelocReq-IEs ies. - * \param raB_SetupItem_RelocReq_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_setupitem_relocreq_ies( - RANAP_RAB_SetupItem_RelocReq_IEs_t *raB_SetupItem_RelocReq_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-SetupItem-RelocReq-IEs ies. - * \param ranaP_RAB_SetupList_RelocReq Pointer to the ASN1 structure. - * \param raB_SetupItem_RelocReq_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_setupitem_relocreq_ies( - RANAP_RAB_SetupList_RelocReq_t *ranaP_RAB_SetupList_RelocReq, - RANAP_RAB_SetupItem_RelocReq_IEs_t *raB_SetupItem_RelocReq_IEs); - -/** \brief Decode function for RAB-ModifyItemIEs ies. - * \param raB_ModifyItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_modifyitemies( - RANAP_RAB_ModifyItemIEs_t *raB_ModifyItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ModifyItemIEs ies. - * \param ranaP_RAB_ModifyList Pointer to the ASN1 structure. - * \param raB_ModifyItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_modifyitemies( - RANAP_RAB_ModifyList_t *ranaP_RAB_ModifyList, - RANAP_RAB_ModifyItemIEs_t *raB_ModifyItemIEs); - -/** \brief Decode function for MBMSRegistrationResponseIEs ies. - * \param mbmsRegistrationResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsregistrationresponseies( - RANAP_MBMSRegistrationResponseIEs_t *mbmsRegistrationResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSRegistrationResponseIEs ies. - * \param ranaP_MBMSRegistrationResponse Pointer to the ASN1 structure. - * \param mbmsRegistrationResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsregistrationresponseies( - RANAP_MBMSRegistrationResponse_t *ranaP_MBMSRegistrationResponse, - RANAP_MBMSRegistrationResponseIEs_t *mbmsRegistrationResponseIEs); - -/** \brief Decode function for ForwardSRNS-ContextIEs ies. - * \param forwardSRNS_ContextIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_forwardsrns_contexties( - RANAP_ForwardSRNS_ContextIEs_t *forwardSRNS_ContextIEs, - ANY_t *any_p); - -/** \brief Encode function for ForwardSRNS-ContextIEs ies. - * \param ranaP_ForwardSRNS_Context Pointer to the ASN1 structure. - * \param forwardSRNS_ContextIEs Pointer to the IES structure. - **/ -int ranap_encode_forwardsrns_contexties( - RANAP_ForwardSRNS_Context_t *ranaP_ForwardSRNS_Context, - RANAP_ForwardSRNS_ContextIEs_t *forwardSRNS_ContextIEs); - -/** \brief Decode function for UplinkInformationExchangeFailureIEs ies. - * \param uplinkInformationExchangeFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_uplinkinformationexchangefailureies( - RANAP_UplinkInformationExchangeFailureIEs_t *uplinkInformationExchangeFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for UplinkInformationExchangeFailureIEs ies. - * \param ranaP_UplinkInformationExchangeFailure Pointer to the ASN1 structure. - * \param uplinkInformationExchangeFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_uplinkinformationexchangefailureies( - RANAP_UplinkInformationExchangeFailure_t *ranaP_UplinkInformationExchangeFailure, - RANAP_UplinkInformationExchangeFailureIEs_t *uplinkInformationExchangeFailureIEs); - -/** \brief Decode function for RAB-SetupItem-EnhRelocInfoRes-IEs ies. - * \param raB_SetupItem_EnhRelocInfoRes_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_setupitem_enhrelocinfores_ies( - RANAP_RAB_SetupItem_EnhRelocInfoRes_IEs_t *raB_SetupItem_EnhRelocInfoRes_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-SetupItem-EnhRelocInfoRes-IEs ies. - * \param ranaP_RAB_SetupList_EnhRelocInfoRes Pointer to the ASN1 structure. - * \param raB_SetupItem_EnhRelocInfoRes_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_setupitem_enhrelocinfores_ies( - RANAP_RAB_SetupList_EnhRelocInfoRes_t *ranaP_RAB_SetupList_EnhRelocInfoRes, - RANAP_RAB_SetupItem_EnhRelocInfoRes_IEs_t *raB_SetupItem_EnhRelocInfoRes_IEs); - -/** \brief Decode function for DataVolumeReportIEs ies. - * \param dataVolumeReportIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_datavolumereporties( - RANAP_DataVolumeReportIEs_t *dataVolumeReportIEs, - ANY_t *any_p); - -/** \brief Encode function for DataVolumeReportIEs ies. - * \param ranaP_DataVolumeReport Pointer to the ASN1 structure. - * \param dataVolumeReportIEs Pointer to the IES structure. - **/ -int ranap_encode_datavolumereporties( - RANAP_DataVolumeReport_t *ranaP_DataVolumeReport, - RANAP_DataVolumeReportIEs_t *dataVolumeReportIEs); - -/** \brief Decode function for InformationTransferIndicationIEs ies. - * \param informationTransferIndicationIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_informationtransferindicationies( - RANAP_InformationTransferIndicationIEs_t *informationTransferIndicationIEs, - ANY_t *any_p); - -/** \brief Encode function for InformationTransferIndicationIEs ies. - * \param ranaP_InformationTransferIndication Pointer to the ASN1 structure. - * \param informationTransferIndicationIEs Pointer to the IES structure. - **/ -int ranap_encode_informationtransferindicationies( - RANAP_InformationTransferIndication_t *ranaP_InformationTransferIndication, - RANAP_InformationTransferIndicationIEs_t *informationTransferIndicationIEs); - -/** \brief Decode function for RAB-FailedItem-EnhRelocInfoRes-IEs ies. - * \param raB_FailedItem_EnhRelocInfoRes_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_faileditem_enhrelocinfores_ies( - RANAP_RAB_FailedItem_EnhRelocInfoRes_IEs_t *raB_FailedItem_EnhRelocInfoRes_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-FailedItem-EnhRelocInfoRes-IEs ies. - * \param ranaP_RAB_FailedList_EnhRelocInfoRes Pointer to the ASN1 structure. - * \param raB_FailedItem_EnhRelocInfoRes_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_faileditem_enhrelocinfores_ies( - RANAP_RAB_FailedList_EnhRelocInfoRes_t *ranaP_RAB_FailedList_EnhRelocInfoRes, - RANAP_RAB_FailedItem_EnhRelocInfoRes_IEs_t *raB_FailedItem_EnhRelocInfoRes_IEs); - -/** \brief Decode function for InformationTransferFailureIEs ies. - * \param informationTransferFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_informationtransferfailureies( - RANAP_InformationTransferFailureIEs_t *informationTransferFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for InformationTransferFailureIEs ies. - * \param ranaP_InformationTransferFailure Pointer to the ASN1 structure. - * \param informationTransferFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_informationtransferfailureies( - RANAP_InformationTransferFailure_t *ranaP_InformationTransferFailure, - RANAP_InformationTransferFailureIEs_t *informationTransferFailureIEs); - -/** \brief Decode function for CommonID-IEs ies. - * \param commonID_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_commonid_ies( - RANAP_CommonID_IEs_t *commonID_IEs, - ANY_t *any_p); - -/** \brief Encode function for CommonID-IEs ies. - * \param ranaP_CommonID Pointer to the ASN1 structure. - * \param commonID_IEs Pointer to the IES structure. - **/ -int ranap_encode_commonid_ies( - RANAP_CommonID_t *ranaP_CommonID, - RANAP_CommonID_IEs_t *commonID_IEs); - -/** \brief Decode function for MBMSUELinkingRequestIEs ies. - * \param mbmsueLinkingRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsuelinkingrequesties( - RANAP_MBMSUELinkingRequestIEs_t *mbmsueLinkingRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSUELinkingRequestIEs ies. - * \param ranaP_MBMSUELinkingRequest Pointer to the ASN1 structure. - * \param mbmsueLinkingRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsuelinkingrequesties( - RANAP_MBMSUELinkingRequest_t *ranaP_MBMSUELinkingRequest, - RANAP_MBMSUELinkingRequestIEs_t *mbmsueLinkingRequestIEs); - -/** \brief Decode function for ErrorIndicationIEs ies. - * \param errorIndicationIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_errorindicationies( - RANAP_ErrorIndicationIEs_t *errorIndicationIEs, - ANY_t *any_p); - -/** \brief Encode function for ErrorIndicationIEs ies. - * \param ranaP_ErrorIndication Pointer to the ASN1 structure. - * \param errorIndicationIEs Pointer to the IES structure. - **/ -int ranap_encode_errorindicationies( - RANAP_ErrorIndication_t *ranaP_ErrorIndication, - RANAP_ErrorIndicationIEs_t *errorIndicationIEs); - -/** \brief Decode function for RedirectionIndication-IEs ies. - * \param redirectionIndication_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_redirectionindication_ies( - RANAP_RedirectionIndication_IEs_t *redirectionIndication_IEs, - ANY_t *any_p); - -/** \brief Encode function for RedirectionIndication-IEs ies. - * \param ranaP_RedirectionIndication Pointer to the ASN1 structure. - * \param redirectionIndication_IEs Pointer to the IES structure. - **/ -int ranap_encode_redirectionindication_ies( - RANAP_RedirectionIndication_t *ranaP_RedirectionIndication, - RANAP_RedirectionIndication_IEs_t *redirectionIndication_IEs); - -/** \brief Decode function for RAB-DataForwardingItemIEs ies. - * \param raB_DataForwardingItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_dataforwardingitemies( - RANAP_RAB_DataForwardingItemIEs_t *raB_DataForwardingItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-DataForwardingItemIEs ies. - * \param ranaP_RAB_DataForwardingList Pointer to the ASN1 structure. - * \param raB_DataForwardingItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_dataforwardingitemies( - RANAP_RAB_DataForwardingList_t *ranaP_RAB_DataForwardingList, - RANAP_RAB_DataForwardingItemIEs_t *raB_DataForwardingItemIEs); - -/** \brief Decode function for RAB-SetupItem-EnhRelocInfoReq-IEs ies. - * \param raB_SetupItem_EnhRelocInfoReq_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_setupitem_enhrelocinforeq_ies( - RANAP_RAB_SetupItem_EnhRelocInfoReq_IEs_t *raB_SetupItem_EnhRelocInfoReq_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-SetupItem-EnhRelocInfoReq-IEs ies. - * \param ranaP_RAB_SetupList_EnhRelocInfoReq Pointer to the ASN1 structure. - * \param raB_SetupItem_EnhRelocInfoReq_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_setupitem_enhrelocinforeq_ies( - RANAP_RAB_SetupList_EnhRelocInfoReq_t *ranaP_RAB_SetupList_EnhRelocInfoReq, - RANAP_RAB_SetupItem_EnhRelocInfoReq_IEs_t *raB_SetupItem_EnhRelocInfoReq_IEs); - -/** \brief Decode function for MBMSRABReleaseFailureIEs ies. - * \param mbmsrabReleaseFailureIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsrabreleasefailureies( - RANAP_MBMSRABReleaseFailureIEs_t *mbmsrabReleaseFailureIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSRABReleaseFailureIEs ies. - * \param ranaP_MBMSRABReleaseFailure Pointer to the ASN1 structure. - * \param mbmsrabReleaseFailureIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsrabreleasefailureies( - RANAP_MBMSRABReleaseFailure_t *ranaP_MBMSRABReleaseFailure, - RANAP_MBMSRABReleaseFailureIEs_t *mbmsrabReleaseFailureIEs); - -/** \brief Decode function for RAB-DataVolumeReportItemIEs ies. - * \param raB_DataVolumeReportItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_datavolumereportitemies( - RANAP_RAB_DataVolumeReportItemIEs_t *raB_DataVolumeReportItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-DataVolumeReportItemIEs ies. - * \param ranaP_RAB_DataVolumeReportList Pointer to the ASN1 structure. - * \param raB_DataVolumeReportItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_datavolumereportitemies( - RANAP_RAB_DataVolumeReportList_t *ranaP_RAB_DataVolumeReportList, - RANAP_RAB_DataVolumeReportItemIEs_t *raB_DataVolumeReportItemIEs); - -/** \brief Decode function for DirectInformationTransferIEs ies. - * \param directInformationTransferIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_directinformationtransferies( - RANAP_DirectInformationTransferIEs_t *directInformationTransferIEs, - ANY_t *any_p); - -/** \brief Encode function for DirectInformationTransferIEs ies. - * \param ranaP_DirectInformationTransfer Pointer to the ASN1 structure. - * \param directInformationTransferIEs Pointer to the IES structure. - **/ -int ranap_encode_directinformationtransferies( - RANAP_DirectInformationTransfer_t *ranaP_DirectInformationTransfer, - RANAP_DirectInformationTransferIEs_t *directInformationTransferIEs); - -/** \brief Decode function for RelocationCommandIEs ies. - * \param relocationCommandIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_relocationcommandies( - RANAP_RelocationCommandIEs_t *relocationCommandIEs, - ANY_t *any_p); - -/** \brief Encode function for RelocationCommandIEs ies. - * \param ranaP_RelocationCommand Pointer to the ASN1 structure. - * \param relocationCommandIEs Pointer to the IES structure. - **/ -int ranap_encode_relocationcommandies( - RANAP_RelocationCommand_t *ranaP_RelocationCommand, - RANAP_RelocationCommandIEs_t *relocationCommandIEs); - -/** \brief Decode function for UplinkInformationExchangeResponseIEs ies. - * \param uplinkInformationExchangeResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_uplinkinformationexchangeresponseies( - RANAP_UplinkInformationExchangeResponseIEs_t *uplinkInformationExchangeResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for UplinkInformationExchangeResponseIEs ies. - * \param ranaP_UplinkInformationExchangeResponse Pointer to the ASN1 structure. - * \param uplinkInformationExchangeResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_uplinkinformationexchangeresponseies( - RANAP_UplinkInformationExchangeResponse_t *ranaP_UplinkInformationExchangeResponse, - RANAP_UplinkInformationExchangeResponseIEs_t *uplinkInformationExchangeResponseIEs); - -/** \brief Decode function for MBMSRABReleaseRequestIEs ies. - * \param mbmsrabReleaseRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmsrabreleaserequesties( - RANAP_MBMSRABReleaseRequestIEs_t *mbmsrabReleaseRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSRABReleaseRequestIEs ies. - * \param ranaP_MBMSRABReleaseRequest Pointer to the ASN1 structure. - * \param mbmsrabReleaseRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmsrabreleaserequesties( - RANAP_MBMSRABReleaseRequest_t *ranaP_MBMSRABReleaseRequest, - RANAP_MBMSRABReleaseRequestIEs_t *mbmsrabReleaseRequestIEs); - -/** \brief Decode function for RAB-AssignmentRequestIEs ies. - * \param raB_AssignmentRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_assignmentrequesties( - RANAP_RAB_AssignmentRequestIEs_t *raB_AssignmentRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-AssignmentRequestIEs ies. - * \param ranaP_RAB_AssignmentRequest Pointer to the ASN1 structure. - * \param raB_AssignmentRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_assignmentrequesties( - RANAP_RAB_AssignmentRequest_t *ranaP_RAB_AssignmentRequest, - RANAP_RAB_AssignmentRequestIEs_t *raB_AssignmentRequestIEs); - -/** \brief Decode function for RAB-ReleasedItem-IuRelComp-IEs ies. - * \param raB_ReleasedItem_IuRelComp_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_releaseditem_iurelcomp_ies( - RANAP_RAB_ReleasedItem_IuRelComp_IEs_t *raB_ReleasedItem_IuRelComp_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ReleasedItem-IuRelComp-IEs ies. - * \param ranaP_RAB_ReleasedList_IuRelComp Pointer to the ASN1 structure. - * \param raB_ReleasedItem_IuRelComp_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_releaseditem_iurelcomp_ies( - RANAP_RAB_ReleasedList_IuRelComp_t *ranaP_RAB_ReleasedList_IuRelComp, - RANAP_RAB_ReleasedItem_IuRelComp_IEs_t *raB_ReleasedItem_IuRelComp_IEs); - -/** \brief Decode function for EnhancedRelocationCompleteResponseIEs ies. - * \param enhancedRelocationCompleteResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_enhancedrelocationcompleteresponseies( - RANAP_EnhancedRelocationCompleteResponseIEs_t *enhancedRelocationCompleteResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for EnhancedRelocationCompleteResponseIEs ies. - * \param ranaP_EnhancedRelocationCompleteResponse Pointer to the ASN1 structure. - * \param enhancedRelocationCompleteResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_enhancedrelocationcompleteresponseies( - RANAP_EnhancedRelocationCompleteResponse_t *ranaP_EnhancedRelocationCompleteResponse, - RANAP_EnhancedRelocationCompleteResponseIEs_t *enhancedRelocationCompleteResponseIEs); - -/** \brief Decode function for LocationReportIEs ies. - * \param locationReportIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_locationreporties( - RANAP_LocationReportIEs_t *locationReportIEs, - ANY_t *any_p); - -/** \brief Encode function for LocationReportIEs ies. - * \param ranaP_LocationReport Pointer to the ASN1 structure. - * \param locationReportIEs Pointer to the IES structure. - **/ -int ranap_encode_locationreporties( - RANAP_LocationReport_t *ranaP_LocationReport, - RANAP_LocationReportIEs_t *locationReportIEs); - -/** \brief Decode function for RAB-SetupItem-EnhancedRelocCompleteReq-IEs ies. - * \param raB_SetupItem_EnhancedRelocCompleteReq_IEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_setupitem_enhancedreloccompletereq_ies( - RANAP_RAB_SetupItem_EnhancedRelocCompleteReq_IEs_t *raB_SetupItem_EnhancedRelocCompleteReq_IEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-SetupItem-EnhancedRelocCompleteReq-IEs ies. - * \param ranaP_RAB_SetupList_EnhancedRelocCompleteReq Pointer to the ASN1 structure. - * \param raB_SetupItem_EnhancedRelocCompleteReq_IEs Pointer to the IES structure. - **/ -int ranap_encode_rab_setupitem_enhancedreloccompletereq_ies( - RANAP_RAB_SetupList_EnhancedRelocCompleteReq_t *ranaP_RAB_SetupList_EnhancedRelocCompleteReq, - RANAP_RAB_SetupItem_EnhancedRelocCompleteReq_IEs_t *raB_SetupItem_EnhancedRelocCompleteReq_IEs); - -/** \brief Decode function for RAB-AssignmentResponseIEs ies. - * \param raB_AssignmentResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_assignmentresponseies( - RANAP_RAB_AssignmentResponseIEs_t *raB_AssignmentResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-AssignmentResponseIEs ies. - * \param ranaP_RAB_AssignmentResponse Pointer to the ASN1 structure. - * \param raB_AssignmentResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_assignmentresponseies( - RANAP_RAB_AssignmentResponse_t *ranaP_RAB_AssignmentResponse, - RANAP_RAB_AssignmentResponseIEs_t *raB_AssignmentResponseIEs); - -/** \brief Decode function for RAB-ContextItemIEs ies. - * \param raB_ContextItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_contextitemies( - RANAP_RAB_ContextItemIEs_t *raB_ContextItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ContextItemIEs ies. - * \param ranaP_RAB_ContextList Pointer to the ASN1 structure. - * \param raB_ContextItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_contextitemies( - RANAP_RAB_ContextList_t *ranaP_RAB_ContextList, - RANAP_RAB_ContextItemIEs_t *raB_ContextItemIEs); - -/** \brief Decode function for MBMSSessionUpdateResponseIEs ies. - * \param mbmsSessionUpdateResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionupdateresponseies( - RANAP_MBMSSessionUpdateResponseIEs_t *mbmsSessionUpdateResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionUpdateResponseIEs ies. - * \param ranaP_MBMSSessionUpdateResponse Pointer to the ASN1 structure. - * \param mbmsSessionUpdateResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionupdateresponseies( - RANAP_MBMSSessionUpdateResponse_t *ranaP_MBMSSessionUpdateResponse, - RANAP_MBMSSessionUpdateResponseIEs_t *mbmsSessionUpdateResponseIEs); - -/** \brief Decode function for UeRadioCapabilityMatchResponseIEs ies. - * \param ueRadioCapabilityMatchResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_ueradiocapabilitymatchresponseies( - RANAP_UeRadioCapabilityMatchResponseIEs_t *ueRadioCapabilityMatchResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for UeRadioCapabilityMatchResponseIEs ies. - * \param ranaP_UeRadioCapabilityMatchResponse Pointer to the ASN1 structure. - * \param ueRadioCapabilityMatchResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_ueradiocapabilitymatchresponseies( - RANAP_UeRadioCapabilityMatchResponse_t *ranaP_UeRadioCapabilityMatchResponse, - RANAP_UeRadioCapabilityMatchResponseIEs_t *ueRadioCapabilityMatchResponseIEs); - -/** \brief Decode function for RAB-ReleaseRequestIEs ies. - * \param raB_ReleaseRequestIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_releaserequesties( - RANAP_RAB_ReleaseRequestIEs_t *raB_ReleaseRequestIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-ReleaseRequestIEs ies. - * \param ranaP_RAB_ReleaseRequest Pointer to the ASN1 structure. - * \param raB_ReleaseRequestIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_releaserequesties( - RANAP_RAB_ReleaseRequest_t *ranaP_RAB_ReleaseRequest, - RANAP_RAB_ReleaseRequestIEs_t *raB_ReleaseRequestIEs); - -/** \brief Decode function for EnhancedRelocationCompleteConfirmIEs ies. - * \param enhancedRelocationCompleteConfirmIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_enhancedrelocationcompleteconfirmies( - RANAP_EnhancedRelocationCompleteConfirmIEs_t *enhancedRelocationCompleteConfirmIEs, - ANY_t *any_p); - -/** \brief Encode function for EnhancedRelocationCompleteConfirmIEs ies. - * \param ranaP_EnhancedRelocationCompleteConfirm Pointer to the ASN1 structure. - * \param enhancedRelocationCompleteConfirmIEs Pointer to the IES structure. - **/ -int ranap_encode_enhancedrelocationcompleteconfirmies( - RANAP_EnhancedRelocationCompleteConfirm_t *ranaP_EnhancedRelocationCompleteConfirm, - RANAP_EnhancedRelocationCompleteConfirmIEs_t *enhancedRelocationCompleteConfirmIEs); - -/** \brief Decode function for MBMSSessionUpdateIEs ies. - * \param mbmsSessionUpdateIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionupdateies( - RANAP_MBMSSessionUpdateIEs_t *mbmsSessionUpdateIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionUpdateIEs ies. - * \param ranaP_MBMSSessionUpdate Pointer to the ASN1 structure. - * \param mbmsSessionUpdateIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionupdateies( - RANAP_MBMSSessionUpdate_t *ranaP_MBMSSessionUpdate, - RANAP_MBMSSessionUpdateIEs_t *mbmsSessionUpdateIEs); - -/** \brief Decode function for MBMSSessionStartIEs ies. - * \param mbmsSessionStartIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_mbmssessionstarties( - RANAP_MBMSSessionStartIEs_t *mbmsSessionStartIEs, - ANY_t *any_p); - -/** \brief Encode function for MBMSSessionStartIEs ies. - * \param ranaP_MBMSSessionStart Pointer to the ASN1 structure. - * \param mbmsSessionStartIEs Pointer to the IES structure. - **/ -int ranap_encode_mbmssessionstarties( - RANAP_MBMSSessionStart_t *ranaP_MBMSSessionStart, - RANAP_MBMSSessionStartIEs_t *mbmsSessionStartIEs); - -/** \brief Decode function for LocationRelatedDataResponseIEs ies. - * \param locationRelatedDataResponseIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_locationrelateddataresponseies( - RANAP_LocationRelatedDataResponseIEs_t *locationRelatedDataResponseIEs, - ANY_t *any_p); - -/** \brief Encode function for LocationRelatedDataResponseIEs ies. - * \param ranaP_LocationRelatedDataResponse Pointer to the ASN1 structure. - * \param locationRelatedDataResponseIEs Pointer to the IES structure. - **/ -int ranap_encode_locationrelateddataresponseies( - RANAP_LocationRelatedDataResponse_t *ranaP_LocationRelatedDataResponse, - RANAP_LocationRelatedDataResponseIEs_t *locationRelatedDataResponseIEs); - -/** \brief Decode function for RAB-SetupOrModifiedItemIEs ies. - * \param raB_SetupOrModifiedItemIEs Pointer to ASN1 structure in which data will be stored - * \param any_p Pointer to the ANY value to decode. - **/ -int ranap_decode_rab_setupormodifieditemies( - RANAP_RAB_SetupOrModifiedItemIEs_t *raB_SetupOrModifiedItemIEs, - ANY_t *any_p); - -/** \brief Encode function for RAB-SetupOrModifiedItemIEs ies. - * \param ranaP_RAB_SetupOrModifiedList Pointer to the ASN1 structure. - * \param raB_SetupOrModifiedItemIEs Pointer to the IES structure. - **/ -int ranap_encode_rab_setupormodifieditemies( - RANAP_RAB_SetupOrModifiedList_t *ranaP_RAB_SetupOrModifiedList, - RANAP_RAB_SetupOrModifiedItemIEs_t *raB_SetupOrModifiedItemIEs); - -int ranap_free_rab_releaseditemies( - RANAP_RAB_ReleasedItemIEs_t *raB_ReleasedItemIEs); - -int ranap_free_iu_releaserequesties( - RANAP_Iu_ReleaseRequestIEs_t *iu_ReleaseRequestIEs); - -int ranap_free_uespecificinformationindicationies( - RANAP_UESpecificInformationIndicationIEs_t *ueSpecificInformationIndicationIEs); - -int ranap_free_enhancedrelocationcompletefailureies( - RANAP_EnhancedRelocationCompleteFailureIEs_t *enhancedRelocationCompleteFailureIEs); - -int ranap_free_mbmscnde_registrationresponseies( - RANAP_MBMSCNDe_RegistrationResponseIEs_t *mbmscnDe_RegistrationResponseIEs); - -int ranap_free_securitymoderejecties( - RANAP_SecurityModeRejectIEs_t *securityModeRejectIEs); - -int ranap_free_ranap_relocationinformationies( - RANAP_RANAP_RelocationInformationIEs_t *ranaP_RelocationInformationIEs); - -int ranap_free_resetacknowledgeies( - RANAP_ResetAcknowledgeIEs_t *resetAcknowledgeIEs); - -int ranap_free_relocationcancelacknowledgeies( - RANAP_RelocationCancelAcknowledgeIEs_t *relocationCancelAcknowledgeIEs); - -int ranap_free_srvcc_cskeysresponseies( - RANAP_SRVCC_CSKeysResponseIEs_t *srvcC_CSKeysResponseIEs); - -int ranap_free_mbmscnde_registrationrequesties( - RANAP_MBMSCNDe_RegistrationRequestIEs_t *mbmscnDe_RegistrationRequestIEs); - -int ranap_free_pagingies( - RANAP_PagingIEs_t *pagingIEs); - -int ranap_free_geran_iumode_rab_failed_rabassgntresponse_itemies( - RANAP_GERAN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs_t *geraN_Iumode_RAB_Failed_RABAssgntResponse_ItemIEs); - -int ranap_free_resetresourceitemies( - RANAP_ResetResourceItemIEs_t *resetResourceItemIEs); - -int ranap_free_locationreportingcontrolies( - RANAP_LocationReportingControlIEs_t *locationReportingControlIEs); - -int ranap_free_enhancedrelocationcompleterequesties( - RANAP_EnhancedRelocationCompleteRequestIEs_t *enhancedRelocationCompleteRequestIEs); - -int ranap_free_rab_faileditemies( - RANAP_RAB_FailedItemIEs_t *raB_FailedItemIEs); - -int ranap_free_mbmsuelinkingresponseies( - RANAP_MBMSUELinkingResponseIEs_t *mbmsueLinkingResponseIEs); - -int ranap_free_rab_queueditemies( - RANAP_RAB_QueuedItemIEs_t *raB_QueuedItemIEs); - -int ranap_free_cn_invoketraceies( - RANAP_CN_InvokeTraceIEs_t *cN_InvokeTraceIEs); - -int ranap_free_iu_releasecommandies( - RANAP_Iu_ReleaseCommandIEs_t *iu_ReleaseCommandIEs); - -int ranap_free_relocationrequestacknowledgeies( - RANAP_RelocationRequestAcknowledgeIEs_t *relocationRequestAcknowledgeIEs); - -int ranap_free_relocationfailureies( - RANAP_RelocationFailureIEs_t *relocationFailureIEs); - -int ranap_free_rabs_failed_to_reportitemies( - RANAP_RABs_failed_to_reportItemIEs_t *raBs_failed_to_reportItemIEs); - -int ranap_free_relocationpreparationfailureies( - RANAP_RelocationPreparationFailureIEs_t *relocationPreparationFailureIEs); - -int ranap_free_rab_tobereleaseditem_enhancedreloccompleteres_ies( - RANAP_RAB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs_t *raB_ToBeReleasedItem_EnhancedRelocCompleteRes_IEs); - -int ranap_free_rabs_contextfailedtotransferitemies( - RANAP_RABs_ContextFailedtoTransferItemIEs_t *raBs_ContextFailedtoTransferItemIEs); - -int ranap_free_relocationrequiredies( - RANAP_RelocationRequiredIEs_t *relocationRequiredIEs); - -int ranap_free_mbmssessionstopies( - RANAP_MBMSSessionStopIEs_t *mbmsSessionStopIEs); - -int ranap_free_mbmssessionupdatefailureies( - RANAP_MBMSSessionUpdateFailureIEs_t *mbmsSessionUpdateFailureIEs); - -int ranap_free_reseties( - RANAP_ResetIEs_t *resetIEs); - -int ranap_free_locationrelateddatafailureies( - RANAP_LocationRelatedDataFailureIEs_t *locationRelatedDataFailureIEs); - -int ranap_free_resetresourceacknowledgeies( - RANAP_ResetResourceAcknowledgeIEs_t *resetResourceAcknowledgeIEs); - -int ranap_free_mbmsregistrationrequesties( - RANAP_MBMSRegistrationRequestIEs_t *mbmsRegistrationRequestIEs); - -int ranap_free_uplinkinformationexchangerequesties( - RANAP_UplinkInformationExchangeRequestIEs_t *uplinkInformationExchangeRequestIEs); - -int ranap_free_mbmssessionstopresponseies( - RANAP_MBMSSessionStopResponseIEs_t *mbmsSessionStopResponseIEs); - -int ranap_free_rab_contextitemies_ranap_relocinf( - RANAP_RAB_ContextItemIEs_RANAP_RelocInf_t *raB_ContextItemIEs_RANAP_RelocInf); - -int ranap_free_locationrelateddatarequesties( - RANAP_LocationRelatedDataRequestIEs_t *locationRelatedDataRequestIEs); - -int ranap_free_rab_dataforwardingitem_srns_ctxreq_ies( - RANAP_RAB_DataForwardingItem_SRNS_CtxReq_IEs_t *raB_DataForwardingItem_SRNS_CtxReq_IEs); - -int ranap_free_rab_releaseitemies( - RANAP_RAB_ReleaseItemIEs_t *raB_ReleaseItemIEs); - -int ranap_free_rab_datavolumereportrequestitemies( - RANAP_RAB_DataVolumeReportRequestItemIEs_t *raB_DataVolumeReportRequestItemIEs); - -int ranap_free_informationtransferconfirmationies( - RANAP_InformationTransferConfirmationIEs_t *informationTransferConfirmationIEs); - -int ranap_free_initialue_messageies( - RANAP_InitialUE_MessageIEs_t *initialUE_MessageIEs); - -int ranap_free_srns_contextresponseies( - RANAP_SRNS_ContextResponseIEs_t *srnS_ContextResponseIEs); - -int ranap_free_resetresourceackitemies( - RANAP_ResetResourceAckItemIEs_t *resetResourceAckItemIEs); - -int ranap_free_srns_dataforwardcommandies( - RANAP_SRNS_DataForwardCommandIEs_t *srnS_DataForwardCommandIEs); - -int ranap_free_relocationrequesties( - RANAP_RelocationRequestIEs_t *relocationRequestIEs); - -int ranap_free_srns_contextrequesties( - RANAP_SRNS_ContextRequestIEs_t *srnS_ContextRequestIEs); - -int ranap_free_mbmssessionstartresponseies( - RANAP_MBMSSessionStartResponseIEs_t *mbmsSessionStartResponseIEs); - -int ranap_free_directtransferies( - RANAP_DirectTransferIEs_t *directTransferIEs); - -int ranap_free_resetresourceies( - RANAP_ResetResourceIEs_t *resetResourceIEs); - -int ranap_free_ranap_enhancedrelocationinformationresponseies( - RANAP_RANAP_EnhancedRelocationInformationResponseIEs_t *ranaP_EnhancedRelocationInformationResponseIEs); - -int ranap_free_rab_setupitem_enhancedreloccompleteres_ies( - RANAP_RAB_SetupItem_EnhancedRelocCompleteRes_IEs_t *raB_SetupItem_EnhancedRelocCompleteRes_IEs); - -int ranap_free_ranap_enhancedrelocationinformationrequesties( - RANAP_RANAP_EnhancedRelocationInformationRequestIEs_t *ranaP_EnhancedRelocationInformationRequestIEs); - -int ranap_free_securitymodecommandies( - RANAP_SecurityModeCommandIEs_t *securityModeCommandIEs); - -int ranap_free_relocationcancelies( - RANAP_RelocationCancelIEs_t *relocationCancelIEs); - -int ranap_free_rab_setupitem_relocreqack_ies( - RANAP_RAB_SetupItem_RelocReqAck_IEs_t *raB_SetupItem_RelocReqAck_IEs); - -int ranap_free_mbmsregistrationfailureies( - RANAP_MBMSRegistrationFailureIEs_t *mbmsRegistrationFailureIEs); - -int ranap_free_mbmsrabestablishmentindicationies( - RANAP_MBMSRABEstablishmentIndicationIEs_t *mbmsrabEstablishmentIndicationIEs); - -int ranap_free_mbmssessionstartfailureies( - RANAP_MBMSSessionStartFailureIEs_t *mbmsSessionStartFailureIEs); - -int ranap_free_iu_releasecompleteies( - RANAP_Iu_ReleaseCompleteIEs_t *iu_ReleaseCompleteIEs); - -int ranap_free_cn_deactivatetraceies( - RANAP_CN_DeactivateTraceIEs_t *cN_DeactivateTraceIEs); - -int ranap_free_datavolumereportrequesties( - RANAP_DataVolumeReportRequestIEs_t *dataVolumeReportRequestIEs); - -int ranap_free_rab_relocationreleaseitemies( - RANAP_RAB_RelocationReleaseItemIEs_t *raB_RelocationReleaseItemIEs); - -int ranap_free_rab_modifyrequesties( - RANAP_RAB_ModifyRequestIEs_t *raB_ModifyRequestIEs); - -int ranap_free_securitymodecompleteies( - RANAP_SecurityModeCompleteIEs_t *securityModeCompleteIEs); - -int ranap_free_mbmsrabreleaseies( - RANAP_MBMSRABReleaseIEs_t *mbmsrabReleaseIEs); - -int ranap_free_overloadies( - RANAP_OverloadIEs_t *overloadIEs); - -int ranap_free_rab_setupitem_relocreq_ies( - RANAP_RAB_SetupItem_RelocReq_IEs_t *raB_SetupItem_RelocReq_IEs); - -int ranap_free_rab_modifyitemies( - RANAP_RAB_ModifyItemIEs_t *raB_ModifyItemIEs); - -int ranap_free_mbmsregistrationresponseies( - RANAP_MBMSRegistrationResponseIEs_t *mbmsRegistrationResponseIEs); - -int ranap_free_forwardsrns_contexties( - RANAP_ForwardSRNS_ContextIEs_t *forwardSRNS_ContextIEs); - -int ranap_free_uplinkinformationexchangefailureies( - RANAP_UplinkInformationExchangeFailureIEs_t *uplinkInformationExchangeFailureIEs); - -int ranap_free_rab_setupitem_enhrelocinfores_ies( - RANAP_RAB_SetupItem_EnhRelocInfoRes_IEs_t *raB_SetupItem_EnhRelocInfoRes_IEs); - -int ranap_free_datavolumereporties( - RANAP_DataVolumeReportIEs_t *dataVolumeReportIEs); - -int ranap_free_informationtransferindicationies( - RANAP_InformationTransferIndicationIEs_t *informationTransferIndicationIEs); - -int ranap_free_rab_faileditem_enhrelocinfores_ies( - RANAP_RAB_FailedItem_EnhRelocInfoRes_IEs_t *raB_FailedItem_EnhRelocInfoRes_IEs); - -int ranap_free_informationtransferfailureies( - RANAP_InformationTransferFailureIEs_t *informationTransferFailureIEs); - -int ranap_free_commonid_ies( - RANAP_CommonID_IEs_t *commonID_IEs); - -int ranap_free_mbmsuelinkingrequesties( - RANAP_MBMSUELinkingRequestIEs_t *mbmsueLinkingRequestIEs); - -int ranap_free_errorindicationies( - RANAP_ErrorIndicationIEs_t *errorIndicationIEs); - -int ranap_free_redirectionindication_ies( - RANAP_RedirectionIndication_IEs_t *redirectionIndication_IEs); - -int ranap_free_rab_dataforwardingitemies( - RANAP_RAB_DataForwardingItemIEs_t *raB_DataForwardingItemIEs); - -int ranap_free_rab_setupitem_enhrelocinforeq_ies( - RANAP_RAB_SetupItem_EnhRelocInfoReq_IEs_t *raB_SetupItem_EnhRelocInfoReq_IEs); - -int ranap_free_mbmsrabreleasefailureies( - RANAP_MBMSRABReleaseFailureIEs_t *mbmsrabReleaseFailureIEs); - -int ranap_free_rab_datavolumereportitemies( - RANAP_RAB_DataVolumeReportItemIEs_t *raB_DataVolumeReportItemIEs); - -int ranap_free_directinformationtransferies( - RANAP_DirectInformationTransferIEs_t *directInformationTransferIEs); - -int ranap_free_relocationcommandies( - RANAP_RelocationCommandIEs_t *relocationCommandIEs); - -int ranap_free_uplinkinformationexchangeresponseies( - RANAP_UplinkInformationExchangeResponseIEs_t *uplinkInformationExchangeResponseIEs); - -int ranap_free_mbmsrabreleaserequesties( - RANAP_MBMSRABReleaseRequestIEs_t *mbmsrabReleaseRequestIEs); - -int ranap_free_rab_assignmentrequesties( - RANAP_RAB_AssignmentRequestIEs_t *raB_AssignmentRequestIEs); - -int ranap_free_rab_releaseditem_iurelcomp_ies( - RANAP_RAB_ReleasedItem_IuRelComp_IEs_t *raB_ReleasedItem_IuRelComp_IEs); - -int ranap_free_enhancedrelocationcompleteresponseies( - RANAP_EnhancedRelocationCompleteResponseIEs_t *enhancedRelocationCompleteResponseIEs); - -int ranap_free_locationreporties( - RANAP_LocationReportIEs_t *locationReportIEs); - -int ranap_free_rab_setupitem_enhancedreloccompletereq_ies( - RANAP_RAB_SetupItem_EnhancedRelocCompleteReq_IEs_t *raB_SetupItem_EnhancedRelocCompleteReq_IEs); - -int ranap_free_rab_assignmentresponseies( - RANAP_RAB_AssignmentResponseIEs_t *raB_AssignmentResponseIEs); - -int ranap_free_rab_contextitemies( - RANAP_RAB_ContextItemIEs_t *raB_ContextItemIEs); - -int ranap_free_mbmssessionupdateresponseies( - RANAP_MBMSSessionUpdateResponseIEs_t *mbmsSessionUpdateResponseIEs); - -int ranap_free_ueradiocapabilitymatchresponseies( - RANAP_UeRadioCapabilityMatchResponseIEs_t *ueRadioCapabilityMatchResponseIEs); - -int ranap_free_rab_releaserequesties( - RANAP_RAB_ReleaseRequestIEs_t *raB_ReleaseRequestIEs); - -int ranap_free_enhancedrelocationcompleteconfirmies( - RANAP_EnhancedRelocationCompleteConfirmIEs_t *enhancedRelocationCompleteConfirmIEs); - -int ranap_free_mbmssessionupdateies( - RANAP_MBMSSessionUpdateIEs_t *mbmsSessionUpdateIEs); - -int ranap_free_mbmssessionstarties( - RANAP_MBMSSessionStartIEs_t *mbmsSessionStartIEs); - -int ranap_free_locationrelateddataresponseies( - RANAP_LocationRelatedDataResponseIEs_t *locationRelatedDataResponseIEs); - -int ranap_free_rab_setupormodifieditemies( - RANAP_RAB_SetupOrModifiedItemIEs_t *raB_SetupOrModifiedItemIEs); - -#endif /* RANAP_IES_DEFS_H_ */ - diff --git a/src/Makefile.am b/src/Makefile.am index 87d181a..3709cd0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,7 +3,7 @@ # Build {hnbap,rua,ranap}_{encoder,decoder}.c using asn1tostruct ASN1_ROOT = $(top_builddir)/asn1/ ASN1TOSTRUCT = $(ASN1_ROOT)/utils/asn1tostruct.py -BUILT_SOURCES = hnbap_decoder.c hnbap_encoder.c rua_decoder.c rua_encoder.c ranap_decoder.c ranap_encoder.c +BUILT_SOURCES = hnbap_decoder.c hnbap_encoder.c rua_decoder.c rua_encoder.c gen_ranap.stamp hnbap_encoder.c hnbap_decoder.c hnbap_ies_defs.h: $(ASN1_ROOT)/hnbap/HNBAP-PDU-Contents.asn $(ASN1TOSTRUCT) $(ASN1TOSTRUCT) -f $< @@ -11,7 +11,7 @@ rua_encoder.c rua_decoder.c rua_ies_defs.h: $(ASN1_ROOT)/rua/RUA-PDU-Contents.asn $(ASN1TOSTRUCT) $(ASN1TOSTRUCT) -p RUA_ -f $< -ranap_encoder.c ranap_decoder.c: $(ASN1_ROOT)/ranap/RANAP-PDU-Contents.asn $(ASN1TOSTRUCT) +gen_ranap.stamp: $(ASN1_ROOT)/ranap/RANAP-PDU-Contents.asn $(ASN1TOSTRUCT) $(ASN1TOSTRUCT) -p RANAP_ -f $< # We also need to replace the include in the newly generated .c files: sed -i 's,^#include "ranap_ies_defs.h",#include ,' ranap_encoder.c ranap_decoder.c @@ -19,6 +19,7 @@ mv ranap_ies_defs.h $(top_srcdir)/include/osmocom/ranap/ # this is ugly ^. ranap_ies_defs.h is generated from asn1tostruct.py here, but # it should live in include/osmocom/ranap/. + touch $(top_builddir)/$@ AM_CFLAGS = -I$(top_srcdir)/include $(OSMOCORE_CFLAGS) $(OSMOVTY_CFLAGS) $(OSMOGSM_CFLAGS) $(OSMONETIF_CFLAGS) $(ASN1C_CFLAGS) $(OSMOSIGTRAN_CFLAGS) COMMON_LDADD = -lsctp -- To view, visit https://gerrit.osmocom.org/65 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I439edcb4b7742de861c99ed401114f51061f8088 Gerrit-PatchSet: 3 Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Owner: ahuemer Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From holger at freyther.de Mon May 16 08:41:48 2016 From: holger at freyther.de (Holger Freyther) Date: Mon, 16 May 2016 10:41:48 +0200 Subject: Gerrit mails, from address, verbosity, etc Message-ID: <44F3A00E-2E73-40E9-80F2-09D0B7CBC4A8@freyther.de> Hi, we have the first round of contributions through Gerrit and maybe now is a good time to look at the mail setup. My goal was to: * Have diff's/patches be sent to the MailingList to see what is going on * Have comments be sent to the MailingList to have people learn from feedback In terms of technology Gerrit offers us the following notifications[1] new_changes Somebody created a new change new_patchsets Somebody updated/added a patch(set) to a change all_comments Somebody but jenkins commented submitted_changes Somebody has pushed the submit button and it is in abandoned_changes Somebody gave up on the change all Everything Currently we are using "all" and maybe we want to limit it to "new_patchsets" and "all_comments". "all_comments" is a bit troublesome as it includes empty messages like "+2" with actual review comments. What would be the close to ideal solution? * Be able to reply by mail to changes (most likely not to come) * Mails sent have the author name as From (but gerrit mail address)? * Empty mails like "+2" not sent to the Mailinglist? * Subject changed? [PATCH] and omit branch name? Or omit project name? Other proposals? Move it to a new mailinglist and leave OpenBSC as low-volume mailinglist? comments? feedback? ideas? holger [1] https://gerrit-review.googlesource.com/Documentation/user-notify.html#notify.name.type From nhofmeyr at sysmocom.de Mon May 16 23:48:05 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Tue, 17 May 2016 01:48:05 +0200 Subject: Gerrit mails, from address, verbosity, etc In-Reply-To: <44F3A00E-2E73-40E9-80F2-09D0B7CBC4A8@freyther.de> References: <44F3A00E-2E73-40E9-80F2-09D0B7CBC4A8@freyther.de> Message-ID: <20160516234805.GC9110@dub6> On Mon, May 16, 2016 at 10:41:48AM +0200, Holger Freyther wrote: > Hi, > > we have the first round of contributions through Gerrit and maybe now is a good time to look at the mail setup. My goal was to: > > * Have diff's/patches be sent to the MailingList to see what is going on > * Have comments be sent to the MailingList to have people learn from feedback > > In terms of technology Gerrit offers us the following notifications[1] > > new_changes Somebody created a new change > new_patchsets Somebody updated/added a patch(set) to a change > all_comments Somebody but jenkins commented > submitted_changes Somebody has pushed the submit button and it is in > abandoned_changes Somebody gave up on the change > all Everything > > > Currently we are using "all" and maybe we want to limit it to "new_patchsets" and "all_comments". "all_comments" is a bit troublesome as it includes empty messages like "+2" with actual review comments. I like to see everything on a mailing list so that I get updated as I read mails in my mail client, without having to navigate to some other place and klick 100 times. I was thinking though about local filtering to direct the pretty high volume and for my taste too verbose (s.b.) messages in a separate mail folder. Maybe having a separate mailing list would make sense there for easier filtering. Also the 'no-reply' sender is cumbersome, it should be sent by or have a Reply-To: header so that replies go back to the mailing list instead of individual recipients. (whether openbsc@ or a new gerrit ML, don't know) Details on my "too verbose" opinion: I'd prefer to have none of the automatic palaver words in the mails, and the subject should show the nature of the notification, with only project name and log summary. Ideally I want to see events of a given patch in a single mail thread on the first glance: [PATCH] openbsc: frobnicate fringlebroods ??> [+0] openbsc: frobnicate fringlebroods ??> [-1] openbsc: frobnicate fringlebroods ??> [PATCH] openbsc: frobnicate fringlebroods (#2) ??> [+2] openbsc: frobnicate fringlebroods (#2) ??> [MERGED] openbsc: frobnicate fringlebroods (#2) and the meat of the events in the mail body, without cruft. (Not sure how much of it is easily available... just brainstorming) For example: (1) Instead of Subject: Change in osmo-pcu[master]: Restructure sources Body: From Max : Max has uploaded a new change for review. https://gerrit.osmocom.org/58 Change subject: Restructure sources I would prefer Subject: [PATCH] osmo-pcu: Restructure sources Body: New patch: https://gerrit.osmocom.org/58 By: msuraev (2) Instead of Subject: Change in osmo-iuh[master]: attempt to fix parallel build, improve AM logic Body: From ahuemer : Hello Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/65 to look at the new patch set (#2). I would prefer Subject: [+0] osmo-iuh: attempt to fix parallel build, improve AM logic Body: New comment: https://gerrit.osmocom.org/65 By: ahuemer (3) Instead of Subject: Change in openbsc[master]: db.c: implemented incremental migration Body: Holger Freyther has submitted this change and it was merged.[...] I would prefer Subject: [MERGED] openbsc: db.c: implemented incremental migration Body: Merged: https://gerrit.osmocom.org/99 (all other info is available in previous mails) The question though is, if the mail subjects vary depending on new patch/comment/merged/..., will mail clients still show them in the same thread? Maybe the already present In-Reply-To: header is sufficient there? ~Neels -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From msuraev at sysmocom.de Tue May 17 08:01:38 2016 From: msuraev at sysmocom.de (Max) Date: Tue, 17 May 2016 10:01:38 +0200 Subject: Gerrit mails, from address, verbosity, etc In-Reply-To: <44F3A00E-2E73-40E9-80F2-09D0B7CBC4A8@freyther.de> References: <44F3A00E-2E73-40E9-80F2-09D0B7CBC4A8@freyther.de> Message-ID: <573ACFE2.80104@sysmocom.de> Hi. Lot's of projects have separate mailing list *-commits (or smth like that) for such auto-generated emails. I like this option most - it helps to keep large volume of emails which are of interest to rather small group of developers clearly separated from much small number of emails which might be of general interest for users. On 05/16/2016 10:41 AM, Holger Freyther wrote: > Hi, > > we have the first round of contributions through Gerrit and maybe now is a good time to look at the mail setup. My goal was to: > > * Have diff's/patches be sent to the MailingList to see what is going on > * Have comments be sent to the MailingList to have people learn from feedback > > In terms of technology Gerrit offers us the following notifications[1] > > new_changes Somebody created a new change > new_patchsets Somebody updated/added a patch(set) to a change > all_comments Somebody but jenkins commented > submitted_changes Somebody has pushed the submit button and it is in > abandoned_changes Somebody gave up on the change > all Everything > > > Currently we are using "all" and maybe we want to limit it to "new_patchsets" and "all_comments". "all_comments" is a bit troublesome as it includes empty messages like "+2" with actual review comments. > > What would be the close to ideal solution? > > * Be able to reply by mail to changes (most likely not to come) > * Mails sent have the author name as From (but gerrit mail address)? > * Empty mails like "+2" not sent to the Mailinglist? > * Subject changed? [PATCH] and omit branch name? Or omit project name? > > Other proposals? Move it to a new mailinglist and leave OpenBSC as low-volume mailinglist? > > > comments? feedback? ideas? > > holger > > > [1] https://gerrit-review.googlesource.com/Documentation/user-notify.html#notify.name.type > > > -- Max Suraev http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Geschaeftsfuehrer / Managing Directors: Holger Freyther, Harald Welte From gerrit-no-reply at lists.osmocom.org Tue May 17 08:05:18 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 08:05:18 +0000 Subject: Change in osmo-pcu[master]: Restructure sources In-Reply-To: References: Message-ID: >From Max : Max has posted comments on this change. Change subject: Restructure sources ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/58/1/src/Makefile.am File src/Makefile.am: PS1, Line 67: > Why do you remove this guard? It's not removed - previously there were several guards, now they are merged into single one: see for osmo-pcu-remote below. -- To view, visit https://gerrit.osmocom.org/58 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I05004ad9032759a5dbfa57290ed1df83e89d5cb8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From laforge at gnumonks.org Tue May 17 09:42:25 2016 From: laforge at gnumonks.org (Harald Welte) Date: Tue, 17 May 2016 11:42:25 +0200 Subject: Gerrit mails, from address, verbosity, etc In-Reply-To: <573ACFE2.80104@sysmocom.de> References: <44F3A00E-2E73-40E9-80F2-09D0B7CBC4A8@freyther.de> <573ACFE2.80104@sysmocom.de> Message-ID: <20160517094225.GC5414@nataraja> Hi Max, Holger and others, On Tue, May 17, 2016 at 10:01:38AM +0200, Max wrote: > Lot's of projects have separate mailing list *-commits (or smth like > that) for such auto-generated emails. I like this option most - it helps > to keep large volume of emails which are of interest to rather small > group of developers clearly separated from much small number of emails > which might be of general interest for users. Agreed, and we already have that with the osmocom-commitlog mailing list. I'm not sure how this list is used in context of the new gerrit setup. Does it only receive the 'accepted/approved' changes that were merged into master. Holger? We should definitely still keep pushing notifications to that list, IMHO. The reason for having patch submissions + related discussions on the main mailing list is IMHO exactly to ensure that people who are not using gerrit every day are able to follow what's happening and able to provide their feedback. I would thus be in favor of having the following on the main mailing list: > > new_changes Somebody created a new change > > new_patchsets Somebody updated/added a patch(set) to a change and not have those: > > all_comments Somebody but jenkins commented > > submitted_changes Somebody has pushed the submit button and it is in > > abandoned_changes Somebody gave up on the change > > > > Currently we are using "all" and maybe we want to limit it to > > "new_patchsets" and "all_comments". "all_comments" is a bit > > troublesome as it includes empty messages like "+2" with actual > > review comments. I would think that new_patchsets possibly with new_changes should be in, but for comments I would rather disable them. The "Foo has voded +2" mails are absolutely not aceptable to me. I'd rather have all comment notifications disabled than to have those on the list. Even if we can filter, I'm not sure if we want all the comments on the list or not... -- - Harald Welte http://laforge.gnumonks.org/ ============================================================================ "Privacy in residential applications is a desirable marketing option." (ETSI EN 300 175-7 Ch. A6) From holger at freyther.de Tue May 17 10:22:49 2016 From: holger at freyther.de (Holger Freyther) Date: Tue, 17 May 2016 12:22:49 +0200 Subject: Gerrit mails, from address, verbosity, etc In-Reply-To: <20160517094225.GC5414@nataraja> References: <44F3A00E-2E73-40E9-80F2-09D0B7CBC4A8@freyther.de> <573ACFE2.80104@sysmocom.de> <20160517094225.GC5414@nataraja> Message-ID: <2A437E4D-33F2-486F-945D-4D4CBD9EB972@freyther.de> > On 17 May 2016, at 11:42, Harald Welte wrote: > > > Agreed, and we already have that with the osmocom-commitlog mailing > list. I'm not sure how this list is used in context of the new gerrit > setup. Does it only receive the 'accepted/approved' changes that were > merged into master. Holger? We should definitely still keep pushing > notifications to that list, IMHO. Once it is submitted in Gerrit, it will be replicated to git.osmocom.org at which point the usual commit message will be generated. > and not have those: > >>> all_comments Somebody but jenkins commented > > The "Foo has voded +2" mails are absolutely not aceptable to me. I'd > rather have all comment notifications disabled than to have those on the > list. Even if we can filter, I'm not sure if we want all the comments > on the list or not... Let's take the "moving" of the DTX VTY command from global to per BTS. I said that we should not break old/currently used configuration files, pointed to DEFUN_DEPRECATED and Max found .HIDDEN_STR (.HIDDEN_TEXT?). I think it would still be nice (in terms of learning) to see them even for changes I do not review. Is there a middle ground? A separate mailinglist? Add some code to create a "all_human_comments"? that include a personal comment (and only such?)? holger From gerrit-no-reply at lists.osmocom.org Tue May 17 14:06:36 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 14:06:36 +0000 Subject: Change in openbsc[master]: Use proper measurement for handover Message-ID: >From Max : Max has uploaded a new change for review. https://gerrit.osmocom.org/66 Change subject: Use proper measurement for handover ...................................................................... Use proper measurement for handover Previously *FULL measurements were always used for handover decisions. Those are incorrect in case of DTX - check if it was enabled and use *SUB instead. Note: *SUB values have higher variance so there might be more "bad" values compared to *FULL although real quality remains the same. Change-Id: I95e8e544047a83a256e057a47458678f40a19a15 Related: OS#1701 --- M openbsc/src/libbsc/handover_decision.c 1 file changed, 12 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/66/66/1 diff --git a/openbsc/src/libbsc/handover_decision.c b/openbsc/src/libbsc/handover_decision.c index 24c0f79..0f07bca 100644 --- a/openbsc/src/libbsc/handover_decision.c +++ b/openbsc/src/libbsc/handover_decision.c @@ -228,6 +228,7 @@ static int process_meas_rep(struct gsm_meas_rep *mr) { struct gsm_network *net = mr->lchan->ts->trx->bts->network; + enum meas_rep_field dlev, dqual; int av_rxlev; /* we currently only do handover for TCH channels */ @@ -239,22 +240,28 @@ return 0; } + if (mr->flags & MEAS_REP_F_DL_DTX) { + dlev = MEAS_REP_DL_RXLEV_SUB; + dqual = MEAS_REP_DL_RXQUAL_SUB; + } else { + dlev = MEAS_REP_DL_RXLEV_FULL; + dqual = MEAS_REP_DL_RXQUAL_FULL; + } + /* parse actual neighbor cell info */ if (mr->num_cell > 0 && mr->num_cell < 7) process_meas_neigh(mr); - av_rxlev = get_meas_rep_avg(mr->lchan, MEAS_REP_DL_RXLEV_FULL, + av_rxlev = get_meas_rep_avg(mr->lchan, dlev, net->handover.win_rxlev_avg); /* Interference HO */ if (rxlev2dbm(av_rxlev) > -85 && - meas_rep_n_out_of_m_be(mr->lchan, MEAS_REP_DL_RXQUAL_FULL, - 3, 4, 5)) + meas_rep_n_out_of_m_be(mr->lchan, dqual, 3, 4, 5)) return attempt_handover(mr); /* Bad Quality */ - if (meas_rep_n_out_of_m_be(mr->lchan, MEAS_REP_DL_RXQUAL_FULL, - 3, 4, 5)) + if (meas_rep_n_out_of_m_be(mr->lchan, dqual, 3, 4, 5)) return attempt_handover(mr); /* Low Level */ -- To view, visit https://gerrit.osmocom.org/66 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I95e8e544047a83a256e057a47458678f40a19a15 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue May 17 15:52:58 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 15:52:58 +0000 Subject: Change in osmo-pcu[master]: bts/counter: remove trailing white spaces from descriptions Message-ID: >From lynxis lazus : lynxis lazus has uploaded a new change for review. https://gerrit.osmocom.org/67 Change subject: bts/counter: remove trailing white spaces from descriptions ...................................................................... bts/counter: remove trailing white spaces from descriptions Change-Id: Id852f3671d76a32df903f7a936b348b0d856d9c2 --- M src/bts.cpp 1 file changed, 29 insertions(+), 29 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/67/67/1 diff --git a/src/bts.cpp b/src/bts.cpp index 715fb51..ccc433b 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -50,35 +50,35 @@ * the code below. */ static const struct rate_ctr_desc bts_ctr_description[] = { - { "tbf.dl.alloc", "TBF DL Allocated "}, - { "tbf.dl.freed", "TBF DL Freed "}, - { "tbf.dl.aborted", "TBF DL Aborted "}, - { "tbf.ul.alloc", "TBF UL Allocated "}, - { "tbf.ul.freed", "TBF UL Freed "}, - { "tbf.ul.aborted", "TBF UL Aborted "}, - { "tbf.reused", "TBF Reused "}, - { "tbf.alloc.algo-a", "TBF Alloc Algo A "}, - { "tbf.alloc.algo-b", "TBF Alloc Algo B "}, + { "tbf.dl.alloc", "TBF DL Allocated" }, + { "tbf.dl.freed", "TBF DL Freed" }, + { "tbf.dl.aborted", "TBF DL Aborted" }, + { "tbf.ul.alloc", "TBF UL Allocated" }, + { "tbf.ul.freed", "TBF UL Freed" }, + { "tbf.ul.aborted", "TBF UL Aborted" }, + { "tbf.reused", "TBF Reused" }, + { "tbf.alloc.algo-a", "TBF Alloc Algo A" }, + { "tbf.alloc.algo-b", "TBF Alloc Algo B" }, { "tbf.failed.egprs-only", "TBF Failed EGPRS-only"}, - { "rlc.sent", "RLC Sent "}, - { "rlc.resent", "RLC Resent "}, - { "rlc.restarted", "RLC Restarted "}, - { "rlc.stalled", "RLC Stalled "}, - { "rlc.nacked", "RLC Nacked "}, - { "rlc.ass.timedout", "RLC Assign Timeout "}, - { "rlc.ass.failed", "RLC Assign Failed "}, - { "rlc.ack.timedout", "RLC Ack Timeout "}, - { "rlc.ack.failed", "RLC Ack Failed "}, - { "rlc.rel.timedout", "RLC Release Timeout "}, - { "rlc.late-block", "RLC Late Block "}, - { "decode.errors", "Decode Errors "}, - { "sba.allocated", "SBA Allocated "}, - { "sba.freed", "SBA Freed "}, - { "sba.timedout", "SBA Timeout "}, - { "llc.timeout", "Timedout Frames "}, - { "llc.dropped", "Dropped Frames "}, - { "llc.scheduled", "Scheduled Frames "}, - { "rach.requests", "RACH requests "}, + { "rlc.sent", "RLC Sent" }, + { "rlc.resent", "RLC Resent" }, + { "rlc.restarted", "RLC Restarted" }, + { "rlc.stalled", "RLC Stalled" }, + { "rlc.nacked", "RLC Nacked" }, + { "rlc.ass.timedout", "RLC Assign Timeout" }, + { "rlc.ass.failed", "RLC Assign Failed" }, + { "rlc.ack.timedout", "RLC Ack Timeout" }, + { "rlc.ack.failed", "RLC Ack Failed" }, + { "rlc.rel.timedout", "RLC Release Timeout" }, + { "rlc.late-block", "RLC Late Block" }, + { "decode.errors", "Decode Errors" }, + { "sba.allocated", "SBA Allocated" }, + { "sba.freed", "SBA Freed" }, + { "sba.timedout", "SBA Timeout" }, + { "llc.timeout", "Timedout Frames" }, + { "llc.dropped", "Dropped Frames" }, + { "llc.scheduled", "Scheduled Frames" }, + { "rach.requests", "RACH requests" }, }; static const struct rate_ctr_group_desc bts_ctrg_desc = { @@ -90,7 +90,7 @@ }; static const struct osmo_stat_item_desc bts_stat_item_description[] = { - { "ms.present", "MS Present ", + { "ms.present", "MS Present", OSMO_STAT_ITEM_NO_UNIT, 4, 0}, }; -- To view, visit https://gerrit.osmocom.org/67 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id852f3671d76a32df903f7a936b348b0d856d9c2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue May 17 15:54:21 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 15:54:21 +0000 Subject: Change in osmo-pcu[master]: add .gitreview Message-ID: >From lynxis lazus : lynxis lazus has uploaded a new change for review. https://gerrit.osmocom.org/68 Change subject: add .gitreview ...................................................................... add .gitreview This adds a .gitreview file for use with the git-review tool. More information about git review https://www.mediawiki.org/wiki/Gerrit/git-review Change-Id: I03cbdf3a95bcf36a7388b5fa2652fd774b8f0f5b --- A .gitreview 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/68/68/1 diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..628d176 --- /dev/null +++ b/.gitreview @@ -0,0 +1,3 @@ +[gerrit] +host=gerrit.osmocom.org +project=osmo-pcu -- To view, visit https://gerrit.osmocom.org/68 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I03cbdf3a95bcf36a7388b5fa2652fd774b8f0f5b Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue May 17 15:58:27 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 15:58:27 +0000 Subject: Change in osmo-pcu[master]: add .gitreview In-Reply-To: References: Message-ID: >From lynxis lazus : lynxis lazus has uploaded a new patch set (#2). Change subject: add .gitreview ...................................................................... add .gitreview A .gitreview file is required to use git review. More information about git review https://www.mediawiki.org/wiki/Gerrit/git-review Change-Id: I03cbdf3a95bcf36a7388b5fa2652fd774b8f0f5b --- A .gitreview 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/68/68/2 -- To view, visit https://gerrit.osmocom.org/68 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I03cbdf3a95bcf36a7388b5fa2652fd774b8f0f5b Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue May 17 15:58:47 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 15:58:47 +0000 Subject: Change in libosmocore[master]: add .gitreview Message-ID: >From lynxis lazus : lynxis lazus has uploaded a new change for review. https://gerrit.osmocom.org/69 Change subject: add .gitreview ...................................................................... add .gitreview A gitreview file is required to use git review. More information about git review https://www.mediawiki.org/wiki/Gerrit/git-review Change-Id: I95235dddf60670c38a5a7a726c2a77f09d03c303 --- A .gitreview 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/69/69/1 diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..e0ebd90 --- /dev/null +++ b/.gitreview @@ -0,0 +1,3 @@ +[gerrit] +host=gerrit.osmocom.org +project=libosmocore -- To view, visit https://gerrit.osmocom.org/69 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I95235dddf60670c38a5a7a726c2a77f09d03c303 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue May 17 16:01:53 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:01:53 +0000 Subject: Change in osmo-pcu[master]: bts/counter: remove trailing white spaces from descriptions In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: bts/counter: remove trailing white spaces from descriptions ...................................................................... Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/67/1//COMMIT_MSG Commit Message: Line 7: bts/counter: remove trailing white spaces from descriptions I think that something like show statistics will now put the ':' all over the place. Can you put the before/after as comment somewhere to ack/nack my statement? -- To view, visit https://gerrit.osmocom.org/67 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id852f3671d76a32df903f7a936b348b0d856d9c2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue May 17 16:02:02 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:02:02 +0000 Subject: Change in libosmocore[master]: add vty call show asciidoc: generate a documentation for cou... Message-ID: >From lynxis lazus : lynxis lazus has uploaded a new change for review. https://gerrit.osmocom.org/70 Change subject: add vty call show asciidoc: generate a documentation for counters ...................................................................... add vty call show asciidoc: generate a documentation for counters For each counter group a ascii doc table is generated containing all single counter with a reference to a section to add additional information to the counter Change-Id: Ia8af883167e5ee631059299b107ea83c8bbffdfb --- M src/vty/stats_vty.c 1 file changed, 111 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/70/70/1 diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c index e0239bf..2193e70 100644 --- a/src/vty/stats_vty.c +++ b/src/vty/stats_vty.c @@ -33,6 +33,8 @@ #include #include +#include +#include #define CFG_STATS_STR "Configure stats sub-system\n" #define CFG_REPORTER_STR "Configure a stats reporter\n" @@ -355,6 +357,113 @@ return CMD_SUCCESS; } +static int ascii_handle_counter(struct osmo_counter *counter, void *sctx_) +{ + struct vty *vty = sctx_; + const char *description = counter->description ? counter->description : ""; + + /* | name | This document & | description | */ + vty_out(vty, "| %s | <> | %s%s", + counter->name, + counter->name, + description, + VTY_NEWLINE); + + return 0; +} + +static void ascii_counter_generate(struct vty *vty) +{ + vty_out(vty, "// ungrouped osmo_counters%s", VTY_NEWLINE); + vty_out(vty, ".ungrouped osmo counters%s", VTY_NEWLINE); + vty_out(vty, "|===%s", VTY_NEWLINE); + vty_out(vty, "| name | This document & | description%s", VTY_NEWLINE); + osmo_counters_for_each(ascii_handle_counter, vty); + vty_out(vty, "|===%s", VTY_NEWLINE); +} + +static int asciidoc_rate_ctr_handler( + struct rate_ctr_group *ctrg, struct rate_ctr *ctr, + const struct rate_ctr_desc *desc, void *sctx_) +{ + struct vty *vty = sctx_; + const char *description = desc->description ? desc->description : ""; + + /* | name | This document & | description | */ + vty_out(vty, "| %s | <<%s_%s>> | %s%s", + desc->name, + ctrg->desc->group_name_prefix, + desc->name, + description, + VTY_NEWLINE); + return 0; +} + +static int asciidoc_rate_ctr_group_handler(struct rate_ctr_group *ctrg, void *sctx_) +{ + struct vty *vty = sctx_; + vty_out(vty, "// rate_ctr_group table %s%s", ctrg->desc->group_description, VTY_NEWLINE); + vty_out(vty, ".%s - %s %s", ctrg->desc->group_name_prefix, ctrg->desc->group_description, VTY_NEWLINE); + vty_out(vty, "|===%s", VTY_NEWLINE); + vty_out(vty, "| name | This document & | description%s", VTY_NEWLINE); + rate_ctr_for_each_counter(ctrg, asciidoc_rate_ctr_handler, sctx_); + vty_out(vty, "|===%s", VTY_NEWLINE); + + return 0; +} + +static int asciidoc_osmo_stat_item_handler( + struct osmo_stat_item_group *statg, struct osmo_stat_item *item, void *sctx_) +{ + struct vty *vty = sctx_; + + const char *description = item->desc->description ? item->desc->description : ""; + const char *unit = item->desc->unit ? item->desc->unit : ""; + + /* | name | This document & | description | unit | */ + vty_out(vty, "| %s | <<%s_%s>> | %s | %s%s", + item->desc->name, + statg->desc->group_name_prefix, + item->desc->name, + description, + unit, + VTY_NEWLINE); + + return 0; +} + +static int asciidoc_osmo_stat_item_group_handler(struct osmo_stat_item_group *statg, void *sctx_) +{ + struct vty *vty = sctx_; + vty_out(vty, "%s%s", statg->desc->group_description, VTY_NEWLINE); + + vty_out(vty, "// osmo_stat_item_group table %s%s", statg->desc->group_description, VTY_NEWLINE); + vty_out(vty, ".%s - %s %s", statg->desc->group_name_prefix, statg->desc->group_description, VTY_NEWLINE); + vty_out(vty, "|===%s", VTY_NEWLINE); + vty_out(vty, "| name | This document & | description | unit%s", VTY_NEWLINE); + osmo_stat_item_for_each_item(statg, asciidoc_osmo_stat_item_handler, sctx_); + vty_out(vty, "|===%s", VTY_NEWLINE); + + + return 0; +} + +DEFUN(show_stats_asciidoc_table, + show_stats_asciidoc_table_cmd, + "show asciidoc", + "Generate an ascii doc table of all registered counters.\n") +{ + vty_out(vty, "// generating tables for rate_ctr_group%s", VTY_NEWLINE); + rate_ctr_for_each_group(asciidoc_rate_ctr_group_handler, vty); + + vty_out(vty, "// generating tables for osmo_stat_items%s", VTY_NEWLINE); + osmo_stat_item_for_each_group(asciidoc_osmo_stat_item_group_handler, vty); + + vty_out(vty, "// generating tables for osmo_counters%s", VTY_NEWLINE); + ascii_counter_generate(vty); + return CMD_SUCCESS; +} + static int config_write_stats_reporter(struct vty *vty, struct osmo_stats_reporter *srep) { if (srep == NULL) @@ -443,4 +552,6 @@ install_element(CFG_STATS_NODE, &cfg_stats_reporter_level_cmd); install_element(CFG_STATS_NODE, &cfg_stats_reporter_enable_cmd); install_element(CFG_STATS_NODE, &cfg_stats_reporter_disable_cmd); + + install_element_ve(&show_stats_asciidoc_table_cmd); } -- To view, visit https://gerrit.osmocom.org/70 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia8af883167e5ee631059299b107ea83c8bbffdfb Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue May 17 16:03:52 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:03:52 +0000 Subject: Change in libosmocore[master]: add .gitreview In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: add .gitreview ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/69/1//COMMIT_MSG Commit Message: Line 11: https://www.mediawiki.org/wiki/Gerrit/git-review This requires the user to have .ssh/config entry? Most people have one? -- To view, visit https://gerrit.osmocom.org/69 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I95235dddf60670c38a5a7a726c2a77f09d03c303 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue May 17 16:09:19 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:09:19 +0000 Subject: Change in libosmocore[master]: add vty call show asciidoc: generate a documentation for cou... In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: add vty call show asciidoc: generate a documentation for counters ...................................................................... Patch Set 1: Code-Review+1 (3 comments) https://gerrit.osmocom.org/#/c/70/1/src/vty/stats_vty.c File src/vty/stats_vty.c: Line 362: struct vty *vty = sctx_; I think you will not find another place with a '_' as suffix to a parameter. What is the semantic for that? (I assume you use it in other projects?) Line 363: const char *description = counter->description ? counter->description : ""; Have you encountered counters without a description? Line 397: description, For XML there is something like xml_escape. Do we need (and can we) escape characters for asciidoc? E.g. if the description includes '|'? -- To view, visit https://gerrit.osmocom.org/70 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia8af883167e5ee631059299b107ea83c8bbffdfb Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue May 17 16:10:32 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:10:32 +0000 Subject: Change in libosmocore[master]: Add function to make Uplink Measurement In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has submitted this change and it was merged. Change subject: Add function to make Uplink Measurement ...................................................................... Add function to make Uplink Measurement It assembles RSL Uplink Measurement IE according to 3GPP TS 08.58 ?9.3.25. The function is based on lchan_build_rsl_ul_meas() from OsmoBTS but optionally includes DTX information. Change-Id: Ib37107bcc9909e5105ea711de42d3fb1db7e8d9e Reviewed-on: https://gerrit.osmocom.org/44 Tested-by: Jenkins Builder Reviewed-by: Harald Welte --- M include/osmocom/gsm/meas_rep.h M src/gsm/gsm_utils.c M src/gsm/libosmogsm.map 3 files changed, 26 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/meas_rep.h b/include/osmocom/gsm/meas_rep.h index 09c2c4f..90c981d 100644 --- a/include/osmocom/gsm/meas_rep.h +++ b/include/osmocom/gsm/meas_rep.h @@ -1,6 +1,7 @@ #pragma once #include +#include /* RX Level and RX Quality */ struct gsm_rx_lev_qual { @@ -24,3 +25,6 @@ MEAS_REP_UL_RXQUAL_FULL, MEAS_REP_UL_RXQUAL_SUB, }; + +size_t gsm0858_rsl_ul_meas_enc(struct gsm_meas_rep_unidir *mru, bool dtxd_used, + uint8_t *buf); diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c index 5002947..7365ab7 100644 --- a/src/gsm/gsm_utils.c +++ b/src/gsm/gsm_utils.c @@ -66,11 +66,13 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -335,6 +337,24 @@ return y; } +/*! \brief Build the RSL uplink measurement IE (3GPP TS 08.58 ? 9.3.25) + * \param[in] mru Unidirectional measurement report structure + * \param[in] dtxd_used Indicates if DTXd was used during measurement report + * period + * \param[out] buf Pre-allocated bufer for storing IE + * \returns Number of bytes filled in buf + */ +size_t gsm0858_rsl_ul_meas_enc(struct gsm_meas_rep_unidir *mru, bool dtxd_used, + uint8_t *buf) +{ + buf[0] = dtxd_used ? (1 << 6) : 0; + buf[0] |= (mru->full.rx_lev & 0x3f); + buf[1] = (mru->sub.rx_lev & 0x3f); + buf[2] = ((mru->full.rx_qual & 7) << 3) | (mru->sub.rx_qual & 7); + + return 3; +} + /* convert power class to dBm according to GSM TS 05.05 */ unsigned int ms_class_gmsk_dbm(enum gsm_band band, int class) { diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 834e5d6..1e2d323 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -92,6 +92,8 @@ gsm0808_create_sapi_reject; gsm0808_prepend_dtap_header; +gsm0858_rsl_ul_meas_enc; + gsm338_get_sms_alphabet; gsm340_gen_oa; -- To view, visit https://gerrit.osmocom.org/44 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib37107bcc9909e5105ea711de42d3fb1db7e8d9e Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 17 16:11:48 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:11:48 +0000 Subject: Change in openbsc[master]: Make extending subscriber creation easier In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: Make extending subscriber creation easier ...................................................................... Patch Set 3: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/42/3/openbsc/src/libmsc/gsm_04_08.c File openbsc/src/libmsc/gsm_04_08.c: PS3, Line 652: subscr still coding style issue with {} for a single line. -- To view, visit https://gerrit.osmocom.org/42 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3b10a9a764fd3a7bb96717a990e52caae16266da Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue May 17 16:14:04 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:14:04 +0000 Subject: Change in openbsc[master]: Cleanup db test In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: Cleanup db test ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/43 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9e39af85718514dd0f081d41c234c9dda77c4b27 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 17 16:14:06 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:14:06 +0000 Subject: Change in openbsc[master]: Cleanup db test In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has submitted this change and it was merged. Change subject: Cleanup db test ...................................................................... Cleanup db test Move copy-pasted code into separate function to make writing more tests easier. Related: OS#1658 Change-Id: I9e39af85718514dd0f081d41c234c9dda77c4b27 Reviewed-on: https://gerrit.osmocom.org/43 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M openbsc/tests/db/db_test.c 1 file changed, 34 insertions(+), 53 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/openbsc/tests/db/db_test.c b/openbsc/tests/db/db_test.c index fb159a5..ee0cbca 100644 --- a/openbsc/tests/db/db_test.c +++ b/openbsc/tests/db/db_test.c @@ -159,10 +159,41 @@ subscr_put(rcv_subscr); } -int main() +static void test_subs(const char *alice_imsi, char *imei1, char *imei2) { + struct gsm_subscriber *alice = NULL, *alice_db; char scratch_str[256]; + alice = db_create_subscriber(alice_imsi); + db_subscriber_assoc_imei(alice, imei1); + if (imei2) + db_subscriber_assoc_imei(alice, imei2); + db_subscriber_alloc_tmsi(alice); + alice->lac=42; + db_sync_subscriber(alice); + /* Get by TMSI */ + snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi); + alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + /* Get by IMSI */ + alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice_imsi); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + /* Get by id */ + snprintf(scratch_str, sizeof(scratch_str), "%llu", alice->id); + alice_db = db_get_subscriber(GSM_SUBSCRIBER_ID, scratch_str); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + /* Get by extension */ + alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); + COMPARE(alice, alice_db); + SUBSCR_PUT(alice_db); + SUBSCR_PUT(alice); +} + +int main() +{ printf("Testing subscriber database code.\n"); osmo_init_logging(&log_info); log_set_print_filename(osmo_stderr_target, 0); @@ -193,58 +224,8 @@ SUBSCR_PUT(alice_db); SUBSCR_PUT(alice); - alice_imsi = "3693245423445"; - alice = db_create_subscriber(alice_imsi); - db_subscriber_assoc_imei(alice, "1234567890"); - db_subscriber_alloc_tmsi(alice); - alice->lac=42; - db_sync_subscriber(alice); - /* Get by TMSI */ - snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by IMSI */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice_imsi); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by id */ - snprintf(scratch_str, sizeof(scratch_str), "%llu", alice->id); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_ID, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by extension */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - SUBSCR_PUT(alice); - - alice_imsi = "9993245423445"; - alice = db_create_subscriber(alice_imsi); - db_subscriber_alloc_tmsi(alice); - alice->lac=42; - db_sync_subscriber(alice); - db_subscriber_assoc_imei(alice, "1234567890"); - db_subscriber_assoc_imei(alice, "6543560920"); - /* Get by TMSI */ - snprintf(scratch_str, sizeof(scratch_str), "%"PRIu32, alice->tmsi); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_TMSI, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by IMSI */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_IMSI, alice_imsi); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by id */ - snprintf(scratch_str, sizeof(scratch_str), "%llu", alice->id); - alice_db = db_get_subscriber(GSM_SUBSCRIBER_ID, scratch_str); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - /* Get by extension */ - alice_db = db_get_subscriber(GSM_SUBSCRIBER_EXTENSION, alice->extension); - COMPARE(alice, alice_db); - SUBSCR_PUT(alice_db); - SUBSCR_PUT(alice); + test_subs("3693245423445", "1234567890", NULL); + test_subs("9993245423445", "1234567890", "6543560920"); /* create it again and see it fails */ alice = db_create_subscriber(alice_imsi); -- To view, visit https://gerrit.osmocom.org/43 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9e39af85718514dd0f081d41c234c9dda77c4b27 Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 17 16:14:51 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:14:51 +0000 Subject: Change in osmo-pcu[master]: Add support for NuRAN Wireless Litecell 1.5 BTS In-Reply-To: References: Message-ID: >From Max : Max has posted comments on this change. Change subject: Add support for NuRAN Wireless Litecell 1.5 BTS ...................................................................... Patch Set 2: Note: this should be merged only after changes #58-60. -- To view, visit https://gerrit.osmocom.org/61 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib1287375cb10a889625bbac8528fa60deed23a2b Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 17 16:15:22 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:15:22 +0000 Subject: Change in libosmocore[master]: gsm48: move to hex TMSI representation In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: gsm48: move to hex TMSI representation ...................................................................... Patch Set 1: Dear Vadim, could you address the review feedback and then use git push gerrit.. to upload a new patchset with the changes requested? As you and Harald proposed we use 0x -- To view, visit https://gerrit.osmocom.org/57 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifd25365bfa3b4ee95b16979740c3229948ce17f2 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 17 16:17:44 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:17:44 +0000 Subject: Change in openbsc[master]: Move DTX settings to BTS In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: Move DTX settings to BTS ...................................................................... Patch Set 8: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/40/8/openbsc/doc/examples/osmo-bsc/osmo-bsc.cfg File openbsc/doc/examples/osmo-bsc/osmo-bsc.cfg: Line 58: dtx downlink It was off before and is now enabled in both directions? -- To view, visit https://gerrit.osmocom.org/40 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Gerrit-PatchSet: 8 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue May 17 16:17:54 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:17:54 +0000 Subject: Change in openbsc[master]: Move DTX settings to BTS In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has submitted this change and it was merged. Change subject: Move DTX settings to BTS ...................................................................... Move DTX settings to BTS * Add per-BTS DTX settings * Configure Uplink and Downlink DTX separately * Deprecate global DTX option (it was never tested/used anyway) * Use libosmocore function for DTX indicator in System Information (previously it was incorrectly assigned for half-rate channels) Related: OS#22 Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Reviewed-on: https://gerrit.osmocom.org/40 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M openbsc/doc/examples/osmo-bsc/osmo-bsc.cfg M openbsc/doc/examples/osmo-nitb/rbs2308/openbsc.cfg M openbsc/include/openbsc/gsm_data.h M openbsc/include/openbsc/gsm_data_shared.h M openbsc/src/libbsc/abis_rsl.c M openbsc/src/libbsc/bsc_init.c M openbsc/src/libbsc/bsc_vty.c M openbsc/src/libbsc/system_information.c M openbsc/src/libcommon/gsm_data.c 9 files changed, 98 insertions(+), 28 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/openbsc/doc/examples/osmo-bsc/osmo-bsc.cfg b/openbsc/doc/examples/osmo-bsc/osmo-bsc.cfg index a17127d..56e4724 100644 --- a/openbsc/doc/examples/osmo-bsc/osmo-bsc.cfg +++ b/openbsc/doc/examples/osmo-bsc/osmo-bsc.cfg @@ -40,7 +40,6 @@ timer t3119 0 timer t3122 0 timer t3141 0 - dtx-used 0 subscriber-keep-in-ram 0 bts 0 type nanobts @@ -55,6 +54,8 @@ channel allocator ascending rach tx integer 9 rach max transmission 7 + dtx uplink force + dtx downlink ip.access unit_id 0 0 oml ip.access stream_id 255 line 0 neighbor-list mode manual-si5 diff --git a/openbsc/doc/examples/osmo-nitb/rbs2308/openbsc.cfg b/openbsc/doc/examples/osmo-nitb/rbs2308/openbsc.cfg index b1ebdd2..0226920 100644 --- a/openbsc/doc/examples/osmo-nitb/rbs2308/openbsc.cfg +++ b/openbsc/doc/examples/osmo-nitb/rbs2308/openbsc.cfg @@ -37,7 +37,6 @@ timer t3119 0 timer t3122 0 timer t3141 0 - dtx-used 0 subscriber-keep-in-ram 0 bts 0 type rbs2000 diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index f229e74..91d84db 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -269,9 +269,6 @@ enum rrlp_mode mode; } rrlp; - /* enable the DTXu and DTXd for this network */ - int dtx_enabled; - enum gsm_chan_t ctype_by_chreq[16]; /* Use a TCH for handling requests of type paging any */ diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index 8658fe7..c3d5978 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -14,7 +14,7 @@ #include #include #include - +#include #include #include @@ -594,6 +594,10 @@ /* number of this BTS on given E1 link */ uint8_t bts_nr; + /* DTX features of this BTS */ + enum gsm48_dtx_mode dtxu; + bool dtxd; + /* paging state and control */ struct gsm_bts_paging_state paging; diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c index df76788..6cf4e0b 100644 --- a/openbsc/src/libbsc/abis_rsl.c +++ b/openbsc/src/libbsc/abis_rsl.c @@ -35,6 +35,8 @@ #include #include #include +#include +#include #include #include #include @@ -345,10 +347,11 @@ memset(cm, 0, sizeof(*cm)); /* FIXME: what to do with data calls ? */ - if (lchan->ts->trx->bts->network->dtx_enabled) - cm->dtx_dtu = 0x03; - else - cm->dtx_dtu = 0x00; + cm->dtx_dtu = 0; + if (lchan->ts->trx->bts->dtxu != GSM48_DTX_SHALL_NOT_BE_USED) + cm->dtx_dtu |= RSL_CMOD_DTXu; + if (lchan->ts->trx->bts->dtxd) + cm->dtx_dtu |= RSL_CMOD_DTXd; /* set TCH Speech/Data */ cm->spd_ind = lchan->rsl_cmode; diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c index fea6562..5c27862 100644 --- a/openbsc/src/libbsc/bsc_init.c +++ b/openbsc/src/libbsc/bsc_init.c @@ -458,12 +458,6 @@ return -EINVAL; } - /* allow/disallow DTXu */ - if (bts->network->dtx_enabled) - bts->si_common.cell_options.dtx = 0; - else - bts->si_common.cell_options.dtx = 2; - bts->si_common.cell_options.pwrc = 0; /* PWRC not set */ bts->si_common.cell_sel_par.acs = 0; diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index b928738..46ad457 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -18,6 +18,7 @@ */ #include +#include #include #include @@ -27,7 +28,7 @@ #include #include #include - +#include #include #include @@ -273,6 +274,14 @@ VTY_NEWLINE); if (bts->si_common.rach_control.cell_bar) vty_out(vty, " CELL IS BARRED%s", VTY_NEWLINE); + if (bts->dtxu != GSM48_DTX_SHALL_NOT_BE_USED) + vty_out(vty, "Uplink DTX: %s%s", + (bts->dtxu != GSM48_DTX_SHALL_BE_USED) ? + "enabled" : "forced", VTY_NEWLINE); + else + vty_out(vty, "Uplink DTX: not enabled%s", VTY_NEWLINE); + vty_out(vty, "Downlink DTX: %senabled%s", bts->dtxd ? "" : "not ", + VTY_NEWLINE); vty_out(vty, "Channel Description Attachment: %s%s", (bts->si_common.chan_desc.att) ? "yes" : "no", VTY_NEWLINE); vty_out(vty, "Channel Description BS-PA-MFRMS: %u%s", @@ -549,6 +558,12 @@ vty_out(vty, " cell_identity %u%s", bts->cell_identity, VTY_NEWLINE); vty_out(vty, " location_area_code %u%s", bts->location_area_code, VTY_NEWLINE); + if (bts->dtxu != GSM48_DTX_SHALL_NOT_BE_USED) + vty_out(vty, " dtx uplink%s%s", + (bts->dtxu != GSM48_DTX_SHALL_BE_USED) ? "" : " force", + VTY_NEWLINE); + if (bts->dtxd) + vty_out(vty, " dtx downlink%s", VTY_NEWLINE); vty_out(vty, " base_station_id_code %u%s", bts->bsic, VTY_NEWLINE); if (bts->tz.override != 0) { if (bts->tz.dst) @@ -809,7 +824,6 @@ vty_out(vty, " timer t3119 %u%s", gsmnet->T3119, VTY_NEWLINE); vty_out(vty, " timer t3122 %u%s", gsmnet->T3122, VTY_NEWLINE); vty_out(vty, " timer t3141 %u%s", gsmnet->T3141, VTY_NEWLINE); - vty_out(vty, " dtx-used %u%s", gsmnet->dtx_enabled, VTY_NEWLINE); vty_out(vty, " subscriber-keep-in-ram %d%s", gsmnet->subscr_group->keep_subscr, VTY_NEWLINE); @@ -1613,15 +1627,14 @@ DECLARE_TIMER(3122, "Waiting time (seconds) after IMM ASS REJECT\n") DECLARE_TIMER(3141, "Currently not used.\n") -DEFUN(cfg_net_dtx, - cfg_net_dtx_cmd, - "dtx-used (0|1)", - "Enable the usage of DTX.\n" - "DTX is disabled\n" "DTX is enabled\n") +DEFUN_DEPRECATED(cfg_net_dtx, + cfg_net_dtx_cmd, + "dtx-used (0|1)", + ".HIDDEN\n""Obsolete\n""Obsolete\n") { - struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->dtx_enabled = atoi(argv[0]); - return CMD_SUCCESS; + vty_out(vty, "%% 'dtx-used' is now deprecated: use dtx * " + "configuration options of BTS instead%s", VTY_NEWLINE); + return CMD_SUCCESS; } DEFUN(cfg_net_subscr_keep, @@ -1700,6 +1713,54 @@ } bts->band = band; + + return CMD_SUCCESS; +} + +DEFUN(cfg_bts_dtxu, cfg_bts_dtxu_cmd, "dtx uplink [force]", + "Configure discontinuous transmission\n" + "Enable Uplink DTX for this BTS\n" + "MS 'shall' use DTXu instead of 'may' use (might not be supported by " + "older phones).\n") +{ + struct gsm_bts *bts = vty->index; + + bts->dtxu = (argc > 0) ? GSM48_DTX_SHALL_BE_USED : GSM48_DTX_MAY_BE_USED; + + return CMD_SUCCESS; +} + +DEFUN(cfg_bts_no_dtxu, cfg_bts_no_dtxu_cmd, "no dtx uplink", + NO_STR + "Configure discontinuous transmission\n" + "Disable Uplink DTX for this BTS\n") +{ + struct gsm_bts *bts = vty->index; + + bts->dtxu = GSM48_DTX_SHALL_NOT_BE_USED; + + return CMD_SUCCESS; +} + +DEFUN(cfg_bts_dtxd, cfg_bts_dtxd_cmd, "dtx downlink", + "Configure discontinuous transmission\n" + "Enable Downlink DTX for this BTS\n") +{ + struct gsm_bts *bts = vty->index; + + bts->dtxd = true; + + return CMD_SUCCESS; +} + +DEFUN(cfg_bts_no_dtxd, cfg_bts_no_dtxd_cmd, "no dtx downlink", + NO_STR + "Configure discontinuous transmission\n" + "Disable Downlink DTX for this BTS\n") +{ + struct gsm_bts *bts = vty->index; + + bts->dtxd = false; return CMD_SUCCESS; } @@ -3948,6 +4009,10 @@ install_element(BTS_NODE, &cfg_no_description_cmd); install_element(BTS_NODE, &cfg_bts_band_cmd); install_element(BTS_NODE, &cfg_bts_ci_cmd); + install_element(BTS_NODE, &cfg_bts_dtxu_cmd); + install_element(BTS_NODE, &cfg_bts_dtxd_cmd); + install_element(BTS_NODE, &cfg_bts_no_dtxu_cmd); + install_element(BTS_NODE, &cfg_bts_no_dtxd_cmd); install_element(BTS_NODE, &cfg_bts_lac_cmd); install_element(BTS_NODE, &cfg_bts_tsc_cmd); install_element(BTS_NODE, &cfg_bts_bsic_cmd); diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index 0d96621..1f1d81e 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -717,6 +717,9 @@ si3->cell_sel_par = bts->si_common.cell_sel_par; si3->rach_control = bts->si_common.rach_control; + /* allow/disallow DTXu */ + gsm48_set_dtx(&si3->cell_options, bts->dtxu, bts->dtxu, true); + if ((bts->si_valid & (1 << SYSINFO_TYPE_2ter))) { LOGP(DRR, LOGL_INFO, "SI 2ter is included.\n"); si_info.si2ter_indicator = 1; @@ -928,6 +931,8 @@ bts->location_area_code); si6->cell_options = bts->si_common.cell_options; si6->ncc_permitted = bts->si_common.ncc_permitted; + /* allow/disallow DTXu */ + gsm48_set_dtx(&si6->cell_options, bts->dtxu, bts->dtxu, true); /* SI6 Rest Octets: 10.5.2.35a: PCH / NCH info, VBS/VGCS options */ diff --git a/openbsc/src/libcommon/gsm_data.c b/openbsc/src/libcommon/gsm_data.c index 242c014..4e235fd 100644 --- a/openbsc/src/libcommon/gsm_data.c +++ b/openbsc/src/libcommon/gsm_data.c @@ -23,7 +23,7 @@ #include #include #include - +#include #include #include @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -311,7 +312,8 @@ bts->type = type; bts->model = model; bts->bsic = bsic; - + bts->dtxu = GSM48_DTX_SHALL_NOT_BE_USED; + bts->dtxd = false; bts->neigh_list_manual_mode = 0; bts->si_common.cell_sel_par.cell_resel_hyst = 2; /* 4 dB */ bts->si_common.cell_sel_par.rxlev_acc_min = 0; -- To view, visit https://gerrit.osmocom.org/40 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3d55168475ad47044b6238b55846ea22bdd518a4 Gerrit-PatchSet: 9 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue May 17 16:19:09 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:19:09 +0000 Subject: Change in osmo-pcu[master]: Enable subdir-objects automake option In-Reply-To: References: Message-ID: >From Harald Welte : Harald Welte has posted comments on this change. Change subject: Enable subdir-objects automake option ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/60 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I01fd264fd1f990f39cdbf309149e0eb857d7732f Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 17 16:19:28 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:19:28 +0000 Subject: Change in osmo-pcu[master]: Restructure sources In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: Restructure sources ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/58 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I05004ad9032759a5dbfa57290ed1df83e89d5cb8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 17 16:19:32 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:19:32 +0000 Subject: Change in osmo-pcu[master]: Restructure sources In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has submitted this change and it was merged. Change subject: Restructure sources ...................................................................... Restructure sources Move hardware-spicefic files into subdirectory similar to the way it's done in OsmoBTS to make adding new hardware support easier. Change-Id: I05004ad9032759a5dbfa57290ed1df83e89d5cb8 Related: SYS#2443 Reviewed-on: https://gerrit.osmocom.org/58 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M src/Makefile.am R src/osmo-bts-sysmo/femtobts.c R src/osmo-bts-sysmo/femtobts.h R src/osmo-bts-sysmo/sysmo_l1_fwd.c R src/osmo-bts-sysmo/sysmo_l1_hw.c R src/osmo-bts-sysmo/sysmo_l1_if.c R src/osmo-bts-sysmo/sysmo_l1_if.h 7 files changed, 32 insertions(+), 23 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/Makefile.am b/src/Makefile.am index 832c3b0..3049744 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -64,11 +64,6 @@ noinst_PROGRAMS = -if ENABLE_SYSMODSP -noinst_PROGRAMS += \ - osmo-pcu-remote -endif - noinst_HEADERS = \ gprs_debug.h \ csn1.h \ @@ -83,8 +78,6 @@ bitvector.h \ pcu_vty.h \ pcu_vty_functions.h \ - sysmo_l1_if.h \ - femtobts.h \ tbf.h \ bts.h \ poll_controller.h \ @@ -101,14 +94,39 @@ osmo_pcu_SOURCES = pcu_main.cpp if ENABLE_SYSMODSP -osmo_pcu_SOURCES += sysmo_l1_if.c \ - sysmo_l1_hw.c \ - femtobts.c +AM_CPPFLAGS += -I$(srcdir)/osmo-bts-sysmo -osmo_pcu_remote_SOURCES = pcu_main.cpp \ - sysmo_l1_if.c \ - sysmo_l1_fwd.c \ - femtobts.c +EXTRA_DIST = \ + osmo-bts-sysmo/sysmo_l1_if.c \ + osmo-bts-sysmo/sysmo_l1_if.h \ + osmo-bts-sysmo/sysmo_l1_hw.c \ + osmo-bts-sysmo/femtobts.c \ + osmo-bts-sysmo/femtobts.h + +noinst_HEADERS += \ + osmo-bts-sysmo/sysmo_l1_if.h \ + osmo-bts-sysmo/femtobts.h + +noinst_PROGRAMS += \ + osmo-pcu-remote + +osmo_pcu_SOURCES += \ + osmo-bts-sysmo/sysmo_l1_if.c \ + osmo-bts-sysmo/sysmo_l1_hw.c \ + osmo-bts-sysmo/femtobts.c + +osmo_pcu_remote_SOURCES = \ + pcu_main.cpp \ + osmo-bts-sysmo/sysmo_l1_if.c \ + osmo-bts-sysmo/sysmo_l1_fwd.c \ + osmo-bts-sysmo/femtobts.c + +osmo_pcu_remote_LDADD = \ + libgprs.la \ + $(LIBOSMOGB_LIBS) \ + $(LIBOSMOCORE_LIBS) \ + $(LIBOSMOGSM_LIBS) \ + $(COMMON_LA) endif osmo_pcu_LDADD = \ @@ -117,14 +135,5 @@ $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) \ $(COMMON_LA) - -if ENABLE_SYSMODSP -osmo_pcu_remote_LDADD = \ - libgprs.la \ - $(LIBOSMOGB_LIBS) \ - $(LIBOSMOCORE_LIBS) \ - $(LIBOSMOGSM_LIBS) \ - $(COMMON_LA) -endif #MOSTLYCLEANFILES += testSource testDestination diff --git a/src/femtobts.c b/src/osmo-bts-sysmo/femtobts.c similarity index 100% rename from src/femtobts.c rename to src/osmo-bts-sysmo/femtobts.c diff --git a/src/femtobts.h b/src/osmo-bts-sysmo/femtobts.h similarity index 100% rename from src/femtobts.h rename to src/osmo-bts-sysmo/femtobts.h diff --git a/src/sysmo_l1_fwd.c b/src/osmo-bts-sysmo/sysmo_l1_fwd.c similarity index 100% rename from src/sysmo_l1_fwd.c rename to src/osmo-bts-sysmo/sysmo_l1_fwd.c diff --git a/src/sysmo_l1_hw.c b/src/osmo-bts-sysmo/sysmo_l1_hw.c similarity index 100% rename from src/sysmo_l1_hw.c rename to src/osmo-bts-sysmo/sysmo_l1_hw.c diff --git a/src/sysmo_l1_if.c b/src/osmo-bts-sysmo/sysmo_l1_if.c similarity index 100% rename from src/sysmo_l1_if.c rename to src/osmo-bts-sysmo/sysmo_l1_if.c diff --git a/src/sysmo_l1_if.h b/src/osmo-bts-sysmo/sysmo_l1_if.h similarity index 100% rename from src/sysmo_l1_if.h rename to src/osmo-bts-sysmo/sysmo_l1_if.h -- To view, visit https://gerrit.osmocom.org/58 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I05004ad9032759a5dbfa57290ed1df83e89d5cb8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue May 17 16:20:45 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:20:45 +0000 Subject: Change in openbsc[master]: Make extending subscriber creation easier In-Reply-To: References: Message-ID: >From Max : Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/42 to look at the new patch set (#4). Change subject: Make extending subscriber creation easier ...................................................................... Make extending subscriber creation easier * rename variable controlling subscriber creation * use enum for subscriber creation policy * move check for subscriber creation policy into separate static function Change-Id: I3b10a9a764fd3a7bb96717a990e52caae16266da --- M openbsc/include/openbsc/gsm_data.h M openbsc/src/libbsc/net_init.c M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/libmsc/vty_interface_layer3.c 4 files changed, 24 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/42/42/4 -- To view, visit https://gerrit.osmocom.org/42 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3b10a9a764fd3a7bb96717a990e52caae16266da Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 17 16:21:03 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:21:03 +0000 Subject: Change in osmo-pcu[master]: bts/counter: remove trailing white spaces from descriptions In-Reply-To: References: Message-ID: >From Harald Welte : Harald Welte has posted comments on this change. Change subject: bts/counter: remove trailing white spaces from descriptions ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/67/1//COMMIT_MSG Commit Message: Line 7: bts/counter: remove trailing white spaces from descriptions > I think that something like show statistics will now put the ':' all over t Well, then the counter description/name has been abused by the PCU code so far. The code that prints the statistics should then do some %20s or other formatting "trick" to do the padding. Having the padding inside the counter description/name itself looks like a hack to me. -- To view, visit https://gerrit.osmocom.org/67 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id852f3671d76a32df903f7a936b348b0d856d9c2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue May 17 16:22:20 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:22:20 +0000 Subject: Change in openbsc[master]: Use proper measurement for handover In-Reply-To: References: Message-ID: >From Harald Welte : Harald Welte has posted comments on this change. Change subject: Use proper measurement for handover ...................................................................... Patch Set 1: Code-Review+1 looks fine to me. Did you test/confirm hand-over operation after this change with both no-DTX and DTX enabled? -- To view, visit https://gerrit.osmocom.org/66 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I95e8e544047a83a256e057a47458678f40a19a15 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 17 16:23:32 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:23:32 +0000 Subject: Change in openbsc[master]: Use proper measurement for handover In-Reply-To: References: Message-ID: >From Max : Max has posted comments on this change. Change subject: Use proper measurement for handover ...................................................................... Patch Set 1: Not yet - the osmo-bts changes are not ready for test yet. -- To view, visit https://gerrit.osmocom.org/66 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I95e8e544047a83a256e057a47458678f40a19a15 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 17 16:24:20 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:24:20 +0000 Subject: Change in osmo-pcu[master]: bts/counter: remove trailing white spaces from descriptions In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: bts/counter: remove trailing white spaces from descriptions ...................................................................... Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/67/1//COMMIT_MSG Commit Message: Line 7: bts/counter: remove trailing white spaces from descriptions > Well, then the counter description/name has been abused by the PCU code so Yes, it looks like a hack. But I see the same in gprs_ns.c of libosmocore, gb_proxy.c of OpenBSC/src/gprs and probably more. So let's see if we need the hack and then remove it? -- To view, visit https://gerrit.osmocom.org/67 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id852f3671d76a32df903f7a936b348b0d856d9c2 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue May 17 16:38:35 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:38:35 +0000 Subject: Change in osmo-pcu[master]: Change internal API for consistency In-Reply-To: References: Message-ID: >From Max : Hello Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/59 to look at the new patch set (#2). Change subject: Change internal API for consistency ...................................................................... Change internal API for consistency Make TRX API (void *) consistent with the way it's used (integer). Use uint8_t for TRX numbering everywhere (we don't expect hardware with more than 256 transceivers in the near future). This change helps to avoid unnecessary casts and make API much clearer. Change-Id: Ic584611184b0c8b5417ecff0ddae3d526b55a079 Related: SYS#2443 --- M src/osmo-bts-sysmo/sysmo_l1_if.c M src/osmo-bts-sysmo/sysmo_l1_if.h M src/pcu_l1_if.cpp 3 files changed, 10 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/59/59/2 -- To view, visit https://gerrit.osmocom.org/59 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ic584611184b0c8b5417ecff0ddae3d526b55a079 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue May 17 16:41:19 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 16:41:19 +0000 Subject: Change in osmo-pcu[master]: Enable subdir-objects automake option In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has submitted this change and it was merged. Change subject: Enable subdir-objects automake option ...................................................................... Enable subdir-objects automake option Change-Id: I01fd264fd1f990f39cdbf309149e0eb857d7732f Related: SYS#2443 Reviewed-on: https://gerrit.osmocom.org/60 Reviewed-by: Harald Welte Tested-by: Jenkins Builder --- M src/Makefile.am 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/Makefile.am b/src/Makefile.am index 3049744..e08ba07 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -18,6 +18,7 @@ # along with this program. If not, see . # +AUTOMAKE_OPTIONS = subdir-objects AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGB_CFLAGS) $(LIBOSMOGSM_CFLAGS) if ENABLE_SYSMODSP -- To view, visit https://gerrit.osmocom.org/60 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I01fd264fd1f990f39cdbf309149e0eb857d7732f Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From holger at freyther.de Tue May 17 19:06:26 2016 From: holger at freyther.de (Holger Freyther) Date: Tue, 17 May 2016 21:06:26 +0200 Subject: SI2qter on no neighbor cell Message-ID: Hi Max, shall we generate SI2qter for a cell with no neighborcells at all? Where is the point in scheduling it? holger From gerrit-no-reply at lists.osmocom.org Tue May 17 21:22:28 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 21:22:28 +0000 Subject: Change in openbsc[master]: bsc: Create minimal SI6 rest octets Message-ID: >From Holger Freyther : Holger Freyther has uploaded a new change for review. https://gerrit.osmocom.org/71 Change subject: bsc: Create minimal SI6 rest octets ...................................................................... bsc: Create minimal SI6 rest octets In GSM R99 SI6 has mandatory SI6 rest octets and so far we did not include them. Add minimal support to generate the right band indicator. Change-Id: I417a40eb91f42a3416b4e07bb9fb4d7a01aaa36b Fixes: OS#1698 Related: OS#1725 --- M openbsc/include/openbsc/rest_octets.h M openbsc/src/libbsc/rest_octets.c M openbsc/src/libbsc/system_information.c 3 files changed, 43 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/71/71/1 diff --git a/openbsc/include/openbsc/rest_octets.h b/openbsc/include/openbsc/rest_octets.h index 32b9963..8d17ddb 100644 --- a/openbsc/include/openbsc/rest_octets.h +++ b/openbsc/include/openbsc/rest_octets.h @@ -12,6 +12,7 @@ int rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net); int rest_octets_si2quater(uint8_t *data, const struct osmo_earfcn_si2q *e, const uint16_t *u, const uint16_t *sc, size_t u_len); +int rest_octets_si6(uint8_t *data, int is1800_net); struct gsm48_si_selection_params { uint16_t penalty_time:5, diff --git a/openbsc/src/libbsc/rest_octets.c b/openbsc/src/libbsc/rest_octets.c index aa286e5..229c4ab 100644 --- a/openbsc/src/libbsc/rest_octets.c +++ b/openbsc/src/libbsc/rest_octets.c @@ -450,6 +450,45 @@ return bv.data_len; } + +/* GSM 04.18 ETSI TS 101 503 V8.27.0 (2006-05) + + ::= +{L | H } +{L | H } +{ < DTM_support : bit == L > I < DTM_support : bit == H > +< RAC : bit (8) > +< MAX_LAPDm : bit (3) > } +< Band indicator > +{ L | H < GPRS_MS_TXPWR_MAX_CCH : bit (5) > } +; +*/ +int rest_octets_si6(uint8_t *data, int is1800_net) +{ + struct bitvec bv; + + memset(&bv, 0, sizeof(bv)); + bv.data = data; + bv.data_len = 1; + + /* no PCH/NCH info */ + bitvec_set_bit(&bv, L); + /* no VBS/VGCS options */ + bitvec_set_bit(&bv, L); + /* no DTM_support */ + bitvec_set_bit(&bv, L); + /* band indicator */ + if (is1800_net) + bitvec_set_bit(&bv, L); + else + bitvec_set_bit(&bv, H); + /* no GPRS_MS_TXPWR_MAX_CCH */ + bitvec_set_bit(&bv, L); + + bitvec_spare_padding(&bv, 3); + return bv.data_len; +} + /* GPRS Mobile Allocation as per TS 04.60 Chapter 12.10a: < GPRS Mobile Allocation IE > ::= < HSN : bit (6) > diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index 1f1d81e..8f9fb9b 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -905,6 +905,7 @@ { struct gsm48_system_information_type_6 *si6; int l2_plen = 11; + int rc; memset(output, GSM_MACBLOCK_PADDING, GSM_MACBLOCK_LEN); @@ -935,8 +936,9 @@ gsm48_set_dtx(&si6->cell_options, bts->dtxu, bts->dtxu, true); /* SI6 Rest Octets: 10.5.2.35a: PCH / NCH info, VBS/VGCS options */ + rc = rest_octets_si6(si6->rest_octets, is_dcs_net(bts)); - return l2_plen; + return l2_plen + rc; } static struct gsm48_si13_info si13_default = { -- To view, visit https://gerrit.osmocom.org/71 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I417a40eb91f42a3416b4e07bb9fb4d7a01aaa36b Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Tue May 17 21:32:44 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 21:32:44 +0000 Subject: Change in libosmo-sccp[master]: Ignore more build/libtool products Message-ID: >From Arran Cudbard-bell : Arran Cudbard-bell has uploaded a new change for review. https://gerrit.osmocom.org/72 Change subject: Ignore more build/libtool products ...................................................................... Ignore more build/libtool products Change-Id: I7b0825112afcb630f40b2d2670952e0beea0a436 --- M .gitignore 1 file changed, 10 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/72/72/1 diff --git a/.gitignore b/.gitignore index 48b2e76..06a39f6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ *.o *.a +*.lo +*.la .deps Makefile Makefile.in @@ -25,10 +27,14 @@ missing stamp-h1 +# libtool +ltmain.sh +libtool +src/.libs + # git-version-gen magic .tarball-version .version - # apps and app data hlr.sqlite3 @@ -52,12 +58,14 @@ tests/sccp/sccp_test tests/sms/sms_test tests/timer/timer_test +tests/sigtran/sua_server_test +tests/sigtran/sua_client_test +tests/sigtran/.libs tests/atconfig tests/package.m4 tests/testsuite tests/testsuite.log - *.pc config.* -- To view, visit https://gerrit.osmocom.org/72 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7b0825112afcb630f40b2d2670952e0beea0a436 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell From gerrit-no-reply at lists.osmocom.org Tue May 17 21:37:05 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 21:37:05 +0000 Subject: Change in libosmo-sccp[master]: Add selector for ANSI or ITU variant Message-ID: >From Arran Cudbard-bell : Arran Cudbard-bell has uploaded a new change for review. https://gerrit.osmocom.org/73 Change subject: Add selector for ANSI or ITU variant ...................................................................... Add selector for ANSI or ITU variant Change-Id: Ia17eef8c9b7d8e1092c587f469b4a68aa9702651 --- M include/sccp/sccp.h M include/sccp/sccp_types.h M src/sccp.c 3 files changed, 124 insertions(+), 46 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/73/73/1 diff --git a/include/sccp/sccp.h b/include/sccp/sccp.h index 36b424f..665422e 100644 --- a/include/sccp/sccp.h +++ b/include/sccp/sccp.h @@ -46,11 +46,24 @@ SCCP_CONNECTION_STATE_SETUP_ERROR, }; +struct sccp_variant { + uint8_t ai_nb; /* National or reserved bit */ + uint8_t ai_gti; /* GTI mask */ + uint8_t ai_pc_ind; /* Point code indicator mask */ + uint8_t ai_ssn_ind; /* SSN indicator mask */ + uint8_t ai_route; /* Route type mask */ + uint8_t pc_len; /* Point code length */ + uint8_t pc_first; /* whether the pointcode comes before the SSN */ +}; + struct sockaddr_sccp { - sa_family_t sccp_family; /* AF_SCCP in the future??? */ + sa_family_t sccp_family; /* AF_SCCP in the future??? */ + + int use_ssn; uint8_t sccp_ssn; /* subssystem number for routing */ - /* TODO fill in address indicator... if that is ever needed */ + int nb; /* National bit (8) */ + int route_on_ssn; /* Force routing on SSN instead of GTI */ /* optional gti information */ uint8_t *gti; @@ -60,7 +73,7 @@ uint8_t gti_ind; int use_poi; - uint8_t poi[2]; + uint8_t poi[3]; /* Allows ITU 14bit and ANSI 24bit */ /* not sure about these */ /* uint8_t sccp_class; */ @@ -70,9 +83,8 @@ * parsed structure of an address */ struct sccp_address { - struct sccp_called_party_address address; uint8_t ssn; - uint8_t poi[2]; + uint8_t poi[3]; /* Allows ITU 14bit and ANSI 24bit */ uint8_t *gti_data; int gti_len; @@ -103,6 +115,8 @@ int incoming; }; +extern struct sccp_variant sccp_variant[]; + /** * system functionality to implement on top of any other transport layer: * call sccp_system_incoming for incoming data (from the network) @@ -122,7 +136,7 @@ int sccp_connection_free(struct sccp_connection *connection); /** - * internal.. + * internal.. */ int sccp_connection_force_free(struct sccp_connection *conn); @@ -157,6 +171,7 @@ int sccp_set_read(const struct sockaddr_sccp *sock, int (*read_cb)(struct msgb *msgb, unsigned int, void *user_data), void *user_data); +void sccp_set_variant(int variant); /* generic sock addresses */ extern const struct sockaddr_sccp sccp_ssn_bssap; diff --git a/include/sccp/sccp_types.h b/include/sccp/sccp_types.h index 986de0d..cd60c25 100644 --- a/include/sccp/sccp_types.h +++ b/include/sccp/sccp_types.h @@ -26,6 +26,12 @@ #include +/* Which variant of SCCP we're using */ +enum { + SCCP_VARIANT_ITU, + SCCP_VARIANT_ANSI +}; + /* Table 1/Q.713 - SCCP message types */ enum sccp_message_types { SCCP_MSG_TYPE_CR = 1, diff --git a/src/sccp.c b/src/sccp.c index e6c538d..a3cda90 100644 --- a/src/sccp.c +++ b/src/sccp.c @@ -46,16 +46,40 @@ .sccp_ssn = SCCP_SSN_BSSAP, }; +struct sccp_variant sccp_variant[] = { + [SCCP_VARIANT_ITU] = { + .ai_nb = 0x80, + .ai_gti = 0x3c, + .ai_pc_ind = 0x01, + .ai_ssn_ind = 0x02, + .ai_route = 0x40, + .pc_len = 2, + .pc_first = 1 + }, + [SCCP_VARIANT_ANSI] = { + .ai_nb = 0x80, + .ai_gti = 0x3c, + .ai_pc_ind = 0x02, + .ai_ssn_ind = 0x01, + .ai_route = 0x40, + .pc_len = 3, + .pc_first = 0, + } +}; + struct sccp_system { /* layer3 -> layer2 */ void (*write_data)(struct sccp_connection *conn, struct msgb *data, void *gctx, void *ctx); void *write_context; + + int variant; }; static struct sccp_system sccp_system = { .write_data = NULL, + .variant = SCCP_VARIANT_ITU }; struct sccp_data_callback { @@ -105,11 +129,13 @@ */ static int copy_address(struct sccp_address *addr, uint8_t offset, struct msgb *msgb) { - struct sccp_called_party_address *party; - int room = msgb_l2len(msgb) - offset; - uint8_t read = 0; + + uint8_t *data; + uint8_t read = 1; uint8_t length; + uint8_t ai; + uint8_t pc_len = sccp_variant[sccp_system.variant].pc_len; if (room <= 0) { LOGP(DSCCP, LOGL_ERROR, "Not enough room for an address: %u\n", room); @@ -122,36 +148,48 @@ return -1; } + data = msgb->l2h + offset + 1; + ai = data[0]; + data++; - party = (struct sccp_called_party_address *)(msgb->l2h + offset + 1); - if (party->point_code_indicator) { - if (length <= read + 2) { - LOGP(DSCCP, LOGL_ERROR, "POI does not fit %u\n", length); - return -1; - } +#define PARSE_POI \ + do { \ + if (ai & sccp_variant[sccp_system.variant].ai_pc_ind) { \ + if (length <= read + pc_len) { \ + LOGP(DSCCP, LOGL_ERROR, "POI does not fit %u\n", length); \ + return -1; \ + } \ + memcpy(&addr->poi, &data[read], pc_len); \ + read += pc_len; \ + } \ + } while (0) +#define PARSE_SSN \ + do { \ + if (ai & sccp_variant[sccp_system.variant].ai_ssn_ind) { \ + if (length <= read + 1) { \ + LOGP(DSCCP, LOGL_ERROR, "SSN does not fit %u\n", length); \ + return -1; \ + } \ + addr->ssn = data[read]; \ + read += 1; \ + } \ + } while (0) - memcpy(&addr->poi, &party->data[read], 2); - read += 2; - } - - if (party->ssn_indicator) { - if (length <= read + 1) { - LOGP(DSCCP, LOGL_ERROR, "SSN does not fit %u\n", length); - return -1; - } - - addr->ssn = party->data[read]; - read += 1; + if (sccp_variant[sccp_system.variant].pc_first) { + PARSE_POI; + PARSE_SSN; + } else { + PARSE_SSN; + PARSE_POI; } /* copy the GTI over */ - if (party->global_title_indicator) { - addr->gti_len = length - read - 1; - addr->gti_data = &party->data[read]; + if (ai & sccp_variant[sccp_system.variant].ai_gti) { + addr->gti_len = length - read; + addr->gti_data = &data[read]; } - addr->address = *party; return 0; } @@ -173,7 +211,6 @@ uint8_t length = msgb->l2h[offset + read + 1]; read += 2 + length; - if (room <= read) { LOGP(DSCCP, LOGL_ERROR, @@ -486,28 +523,43 @@ int sccp_create_sccp_addr(struct msgb *msg, const struct sockaddr_sccp *sock) { uint8_t *len, *ai, *gti; + uint8_t *poi; + uint8_t pc_len = sccp_variant[sccp_system.variant].pc_len; len = msgb_put(msg, 1); ai = msgb_put(msg, 1); + if (sock->gti) ai[0] = (sock->gti_ind & 0x0f) << 2; + if (sock->route_on_ssn || !sock->gti) ai[0] |= sccp_variant[sccp_system.variant].ai_route; - if (sock->gti) - ai[0] = 0 << 6 | (sock->gti_ind & 0x0f) << 2 | 1 << 1; - else - ai[0] = 1 << 6 | 1 << 1; + /* National/reserved bit */ + if (sock->nb) ai[0] |= sccp_variant[sccp_system.variant].ai_nb; - /* store a point code */ - if (sock->use_poi) { - uint8_t *poi; + /* Pointcode ind */ + if (sock->use_poi) ai[0] |= sccp_variant[sccp_system.variant].ai_pc_ind; - ai[0] |= 0x01; - poi = msgb_put(msg, 2); - poi[0] = sock->poi[0]; - poi[1] = sock->poi[1]; + /* SSN ind */ + ai[0] |= sccp_variant[sccp_system.variant].ai_ssn_ind; + +#define ADD_POI \ + do { \ + if (sock->use_poi) { \ + poi = msgb_put(msg, pc_len); \ + if (!poi) return -1; \ + memcpy(poi, &sock->poi[0], pc_len); \ + } \ + } while (0) + +#define ADD_SSN \ + msgb_v_put(msg, sock->sccp_ssn) + + if (sccp_variant[sccp_system.variant].pc_first) { + ADD_POI; + ADD_SSN; + } else { + ADD_SSN; + ADD_POI; } - - /* copy the SSN */ - msgb_v_put(msg, sock->sccp_ssn); /* copy the gti if it is present */ gti = msgb_put(msg, sock->gti_len); @@ -1225,6 +1277,11 @@ return 0; } +void sccp_set_variant(int variant) +{ + sccp_system.variant = variant; +} + /* oh my god a real SCCP packet. need to dispatch it now */ int sccp_system_incoming(struct msgb *msgb) { -- To view, visit https://gerrit.osmocom.org/73 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia17eef8c9b7d8e1092c587f469b4a68aa9702651 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell From gerrit-no-reply at lists.osmocom.org Tue May 17 21:38:47 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 21:38:47 +0000 Subject: Change in libosmo-sccp[master]: Add selector for ANSI or ITU variant In-Reply-To: References: Message-ID: >From Arran Cudbard-bell : Arran Cudbard-bell has posted comments on this change. Change subject: Add selector for ANSI or ITU variant ...................................................................... Patch Set 1: This is for initial review. Wouldn't expect this to be merged as is (needs tests for a start). More to get feedback on whether ANSI support is desired. In the project we're doing currently it is. I have similar patches for the MTP3 layer in osmobsc, but there needs to be more discussion around that. -- To view, visit https://gerrit.osmocom.org/73 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia17eef8c9b7d8e1092c587f469b4a68aa9702651 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Arran Cudbard-bell Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 17 21:53:22 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 21:53:22 +0000 Subject: Change in libosmo-sccp[master]: Add selector for ANSI or ITU variant In-Reply-To: References: Message-ID: >From Holger Freyther : Holger Freyther has posted comments on this change. Change subject: Add selector for ANSI or ITU variant ...................................................................... Patch Set 1: > This is for initial review. Wouldn't expect this to be merged as > is (needs tests for a start). > > More to get feedback on whether ANSI support is desired. In the > project we're doing currently it is. I have similar patches for > the MTP3 layer in osmobsc, but there needs to be more discussion > around that. Yes, ANSI (and Japan, China?) would be nice to have (for being complete). I don't know much about the differences of ANSI SCCP. In general: * It should not break ITU support * It should not make code more ugly/slower (not saying the patch does) * ANSI code should have test cases by itself (and preferable make traces available, e.g. to the wireshark Sample Captures). -- To view, visit https://gerrit.osmocom.org/73 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia17eef8c9b7d8e1092c587f469b4a68aa9702651 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Arran Cudbard-bell Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 17 21:58:46 2016 From: gerrit-no-reply at lists.osmocom.org (gerrit-no-reply at lists.osmocom.org) Date: Tue, 17 May 2016 21:58:46 +0000 Subject: Change in libosmo-sccp[master]: Add selector for ANSI or ITU variant In-Reply-To: References: Message-ID: >From Arran Cudbard-bell : Arran Cudbard-bell has posted comments on this change. Change subject: Add selector for ANSI or ITU variant ...................................................................... Patch Set 1: Yes, oops. Should have run the test suite *first*. Is the general method of dealing with the variations OK? It seemed cleaner than lots of if/else if statements, and the performance hit should be minimal. -- To view, visit https://gerrit.osmocom.org/73 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia17eef8c9b7d8e1092c587f469b4a68aa9702651 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Arran Cudbard-bell Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 17 23:02:01 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 17 May 2016 23:02:01 +0000 Subject: Change in osmo-pcap[master]: wip In-Reply-To: References: Message-ID: Holger Freyther has posted comments on this change. Change subject: wip ...................................................................... Patch Set 1: testing from.. of email comment -- To view, visit https://gerrit.osmocom.org/53 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0d9f48746df0fe191d919d0f7f7a75da8a682839 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcap Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 17 23:04:31 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 17 May 2016 23:04:31 +0000 Subject: Change in osmo-pcap[master]: wip In-Reply-To: References: Message-ID: Patch Set 1: Reducing whitespace and redundancy in mail comment? -- To view, visit https://gerrit.osmocom.org/53 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0d9f48746df0fe191d919d0f7f7a75da8a682839 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcap Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 18 01:55:37 2016 From: gerrit-no-reply at lists.osmocom.org (Arran Cudbard-bell) Date: Wed, 18 May 2016 01:55:37 +0000 Subject: Change in libosmocore[master]: Ignore config.cache Message-ID: Arran Cudbard-bell has uploaded a new change for review. https://gerrit.osmocom.org/74 Change subject: Ignore config.cache ...................................................................... Ignore config.cache Change-Id: I580a500edcf4812e570be586890abef746083a8c --- M .gitignore M include/osmocom/core/endian.h M src/stats.c 3 files changed, 25 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/74/74/1 diff --git a/.gitignore b/.gitignore index 32915aa..03ce379 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ aminclude.am m4/*.m4 autom4te.cache +config.cache config.h* config.sub config.log diff --git a/include/osmocom/core/endian.h b/include/osmocom/core/endian.h index c890fd7..4616a65 100644 --- a/include/osmocom/core/endian.h +++ b/include/osmocom/core/endian.h @@ -23,6 +23,17 @@ #else #error "Unknown endian" #endif +#elif defined(__APPLE__) +#include + #if defined(__DARWIN_LITTLE_ENDIAN) + #define OSMO_IS_LITTLE_ENDIAN 1 + #define OSMO_IS_BIG_ENDIAN 0 + #elif define(__DARWIN_BIG_ENDIAN) + #define OSMO_IS_LITTLE_ENDIAN 1 + #define OSMO_IS_BIG_ENDIAN 0 + #else + #error "Unknown endian" + #endif #else #include #if __BYTE_ORDER == __LITTLE_ENDIAN diff --git a/src/stats.c b/src/stats.c index 73b2703..5f1d028 100644 --- a/src/stats.c +++ b/src/stats.c @@ -301,6 +301,14 @@ if (sock == -1) return -errno; +#if defined(__APPLE__) && !defined(MSG_NOSIGNAL) + { + static int val = 1; + + rc = setsockopt(sock, SOL_SOCKET, SO_NOSIGPIPE, (void*)&val, sizeof(val)); + goto failed; + } +#endif if (srep->bind_addr_len > 0) { rc = bind(sock, &srep->bind_addr, srep->bind_addr_len); if (rc == -1) @@ -345,7 +353,11 @@ { int rc; - rc = sendto(srep->fd, data, data_len, MSG_NOSIGNAL | MSG_DONTWAIT, + rc = sendto(srep->fd, data, data_len, +#ifdef MSG_NOSIGNAL + MSG_NOSIGNAL | +#endif + MSG_DONTWAIT, &srep->dest_addr, srep->dest_addr_len); if (rc == -1) -- To view, visit https://gerrit.osmocom.org/74 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I580a500edcf4812e570be586890abef746083a8c Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell From gerrit-no-reply at lists.osmocom.org Wed May 18 01:56:42 2016 From: gerrit-no-reply at lists.osmocom.org (Arran Cudbard-bell) Date: Wed, 18 May 2016 01:56:42 +0000 Subject: Change in libosmocore[master]: Fix build for OSX In-Reply-To: References: Message-ID: Arran Cudbard-bell has uploaded a new patch set (#2). Change subject: Fix build for OSX ...................................................................... Fix build for OSX Change-Id: I580a500edcf4812e570be586890abef746083a8c --- M .gitignore M include/osmocom/core/endian.h M src/stats.c 3 files changed, 25 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/74/74/2 -- To view, visit https://gerrit.osmocom.org/74 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I580a500edcf4812e570be586890abef746083a8c Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed May 18 02:00:37 2016 From: gerrit-no-reply at lists.osmocom.org (Arran Cudbard-bell) Date: Wed, 18 May 2016 02:00:37 +0000 Subject: Change in libosmocore[master]: Fix build for OSX In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/74 to look at the new patch set (#3). Change subject: Fix build for OSX ...................................................................... Fix build for OSX Change-Id: I580a500edcf4812e570be586890abef746083a8c --- M .gitignore M include/osmocom/core/endian.h M src/stats.c 3 files changed, 25 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/74/74/3 -- To view, visit https://gerrit.osmocom.org/74 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I580a500edcf4812e570be586890abef746083a8c Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed May 18 03:56:19 2016 From: gerrit-no-reply at lists.osmocom.org (Arran Cudbard-bell) Date: Wed, 18 May 2016 03:56:19 +0000 Subject: Change in libosmo-sccp[master]: Add selector for ANSI or ITU variant In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/73 to look at the new patch set (#2). Change subject: Add selector for ANSI or ITU variant ...................................................................... Add selector for ANSI or ITU variant Change-Id: Ia17eef8c9b7d8e1092c587f469b4a68aa9702651 --- M include/sccp/sccp.h M include/sccp/sccp_types.h M src/sccp.c M tests/sccp/sccp_test.c 4 files changed, 124 insertions(+), 46 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/73/73/2 -- To view, visit https://gerrit.osmocom.org/73 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia17eef8c9b7d8e1092c587f469b4a68aa9702651 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Arran Cudbard-bell Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed May 18 04:00:46 2016 From: gerrit-no-reply at lists.osmocom.org (Arran Cudbard-bell) Date: Wed, 18 May 2016 04:00:46 +0000 Subject: Change in libosmo-sccp[master]: Add selector for ANSI or ITU variant In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/73 to look at the new patch set (#3). Change subject: Add selector for ANSI or ITU variant ...................................................................... Add selector for ANSI or ITU variant Change-Id: Ia17eef8c9b7d8e1092c587f469b4a68aa9702651 --- M include/sccp/sccp.h M include/sccp/sccp_types.h M src/sccp.c M tests/sccp/sccp_test.c 4 files changed, 126 insertions(+), 48 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/73/73/3 -- To view, visit https://gerrit.osmocom.org/73 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia17eef8c9b7d8e1092c587f469b4a68aa9702651 Gerrit-PatchSet: 3 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Arran Cudbard-bell Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed May 18 07:29:24 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 18 May 2016 07:29:24 +0000 Subject: Change in libosmocore[master]: Fix build for OSX In-Reply-To: References: Message-ID: Patch Set 3: Hi, we (specially I am) are a bit picky on granularity of changes. Could you move the .gitignore part to a different patch please. In terms of OSX did you try to run make check? We hijack/overload/interpose some of the "libc" symbols in our tests and this fails on OSX because in OSX the symbol look-up is per DSO. There is an option in the OSX linker to disable it but I never made up my mind if: * we skip these test on OSX * force the linker to be more like GNU/Linux and FreeBSD Do you have an opinion? -- To view, visit https://gerrit.osmocom.org/74 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I580a500edcf4812e570be586890abef746083a8c Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From holger at freyther.de Wed May 18 07:31:14 2016 From: holger at freyther.de (Holger Freyther) Date: Wed, 18 May 2016 09:31:14 +0200 Subject: Gerrit mails, from address, verbosity, etc In-Reply-To: <20160516234805.GC9110@dub6> References: <44F3A00E-2E73-40E9-80F2-09D0B7CBC4A8@freyther.de> <20160516234805.GC9110@dub6> Message-ID: <5201FF17-6549-4360-96FB-960E6AEB29BF@freyther.de> > On 17 May 2016, at 01:48, Neels Hofmeyr wrote: > > > [PATCH] openbsc: frobnicate fringlebroods > ??> [+0] openbsc: frobnicate fringlebroods > ??> [-1] openbsc: frobnicate fringlebroods > ??> [PATCH] openbsc: frobnicate fringlebroods (#2) > ??> [+2] openbsc: frobnicate fringlebroods (#2) > ??> [MERGED] openbsc: frobnicate fringlebroods (#2) https://gist.github.com/foerster/1861014 so maybe all but the +0/-1/+2 is possible. In terms of GIT [PATCH v2] would probably be the more "correct" way. I am trying to understand the template logic more but the email code is very self contained in Gerrit and I am confident to modify templates and code in reasonable amount of time. I have already found a way to have a more nice 'From' of the mail and shorten one template. Let me see how much effort it is to get the verdict in it. And to do bikeshedding do you think we should support +0 and -0 ;) holger -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 163 bytes Desc: Message signed with OpenPGP using GPGMail URL: From msuraev at sysmocom.de Wed May 18 09:03:25 2016 From: msuraev at sysmocom.de (Max) Date: Wed, 18 May 2016 11:03:25 +0200 Subject: SI2qter on no neighbor cell In-Reply-To: References: Message-ID: <573C2FDD.40009@sysmocom.de> No, SI2qter is completely optional. The presence of it is indicated in SI3 - see commit f3f3505f493f63e9e79c72e407907783913b9c9c in openbsc. The scheduler is in src/common/sysinfo.c - see f3ee66207de2859cf4751b44241c0f84cf0999b4 in osmobts. On 05/17/2016 09:06 PM, Holger Freyther wrote: > Hi Max, > > shall we generate SI2qter for a cell with no neighborcells at all? Where is the point in scheduling it? > > holger -- Max Suraev http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Geschaeftsfuehrer / Managing Directors: Holger Freyther, Harald Welte From holger at freyther.de Wed May 18 09:04:45 2016 From: holger at freyther.de (Holger Freyther) Date: Wed, 18 May 2016 11:04:45 +0200 Subject: SI2qter on no neighbor cell In-Reply-To: <573C2FDD.40009@sysmocom.de> References: <573C2FDD.40009@sysmocom.de> Message-ID: > On 18 May 2016, at 11:03, Max wrote: > > No, SI2qter is completely optional. The presence of it is indicated in > SI3 - see commit f3f3505f493f63e9e79c72e407907783913b9c9c in openbsc. > The scheduler is in src/common/sysinfo.c - see > f3ee66207de2859cf4751b44241c0f84cf0999b4 in osmobts. yes, but why do we schedule SI2qter for a GSM1900 cell that has absolutely no neighbors? From msuraev at sysmocom.de Wed May 18 09:06:15 2016 From: msuraev at sysmocom.de (Max) Date: Wed, 18 May 2016 11:06:15 +0200 Subject: SI2qter on no neighbor cell In-Reply-To: References: <573C2FDD.40009@sysmocom.de> Message-ID: <573C3087.3000902@sysmocom.de> Seems like a bug. Does it only happens for 1900? On 05/18/2016 11:04 AM, Holger Freyther wrote: >> On 18 May 2016, at 11:03, Max wrote: >> >> No, SI2qter is completely optional. The presence of it is indicated in >> SI3 - see commit f3f3505f493f63e9e79c72e407907783913b9c9c in openbsc. >> The scheduler is in src/common/sysinfo.c - see >> f3ee66207de2859cf4751b44241c0f84cf0999b4 in osmobts. > yes, but why do we schedule SI2qter for a GSM1900 cell that has absolutely no neighbors? -- Max Suraev http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Geschaeftsfuehrer / Managing Directors: Holger Freyther, Harald Welte From gerrit-no-reply at lists.osmocom.org Wed May 18 09:11:54 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 18 May 2016 09:11:54 +0000 Subject: [PATCH] openbsc[master]: WIP.. check the subject says patch.. Message-ID: Holger Freyther has uploaded a new change for review. https://gerrit.osmocom.org/79 Change subject: WIP.. check the subject says patch.. ...................................................................... WIP.. check the subject says patch.. Change-Id: Id7d323083e5055b3f1d74012078a1a67642c1de9 --- M openbsc/README 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/79/79/1 diff --git a/openbsc/README b/openbsc/README index 88ea328..25da821 100644 --- a/openbsc/README +++ b/openbsc/README @@ -37,3 +37,5 @@ http://openbsc.osmocom.org/ Harald Welte + +Testing gerrit subject rewrite -- To view, visit https://gerrit.osmocom.org/79 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id7d323083e5055b3f1d74012078a1a67642c1de9 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed May 18 09:17:05 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 18 May 2016 09:17:05 +0000 Subject: [PATCH] openbsc[master]: WIP.. check the subject says patch.. Message-ID: https://gerrit.osmocom.org/80 WIP.. check the subject says patch.. And shorter mail? Change-Id: I30bf477e4946a3c7debb90dad8fb7392fb4e2344 --- M openbsc/README 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/80/80/1 diff --git a/openbsc/README b/openbsc/README index 88ea328..25da821 100644 --- a/openbsc/README +++ b/openbsc/README @@ -37,3 +37,5 @@ http://openbsc.osmocom.org/ Harald Welte + +Testing gerrit subject rewrite -- To view, visit https://gerrit.osmocom.org/80 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I30bf477e4946a3c7debb90dad8fb7392fb4e2344 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed May 18 09:20:33 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 18 May 2016 09:20:33 +0000 Subject: [PATCH] openbsc[master]: WIP.. check the subject says patch.. In-Reply-To: References: Message-ID: WIP.. check the subject says patch.. And shorter mail? Foo. Change-Id: I30bf477e4946a3c7debb90dad8fb7392fb4e2344 --- M openbsc/README 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/80/80/5 -- To view, visit https://gerrit.osmocom.org/80 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I30bf477e4946a3c7debb90dad8fb7392fb4e2344 Gerrit-PatchSet: 5 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed May 18 09:21:51 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 18 May 2016 09:21:51 +0000 Subject: [PATCH] openbsc[master]: WIP.. check the subject says patch.. In-Reply-To: References: Message-ID: WIP.. check the subject says patch.. And shorter mail? Foo. Change-Id: I30bf477e4946a3c7debb90dad8fb7392fb4e2344 --- M openbsc/README 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/80/80/6 diff --git a/openbsc/README b/openbsc/README index 88ea328..144fb6b 100644 --- a/openbsc/README +++ b/openbsc/README @@ -37,3 +37,5 @@ http://openbsc.osmocom.org/ Harald Welte + +Testing gerrit subject rewrite updating patchset. Bla -- To view, visit https://gerrit.osmocom.org/80 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I30bf477e4946a3c7debb90dad8fb7392fb4e2344 Gerrit-PatchSet: 6 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed May 18 09:30:36 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 18 May 2016 09:30:36 +0000 Subject: [ABANDON]openbsc[master]: WIP.. check the subject says patch.. In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: WIP.. check the subject says patch.. ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/79 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Id7d323083e5055b3f1d74012078a1a67642c1de9 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed May 18 09:30:44 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 18 May 2016 09:30:44 +0000 Subject: [ABANDON]openbsc[master]: WIP.. check the subject says patch.. In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: WIP.. check the subject says patch.. ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/78 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I000859e3e4b0689a4ba8bcc947882ceeaed79f58 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed May 18 09:30:52 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 18 May 2016 09:30:52 +0000 Subject: [ABANDON]openbsc[master]: WIP.. check the subject says patch.. In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: WIP.. check the subject says patch.. ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/77 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I0b6896a8a248b6324e5ddd2b1f0dd078013261f2 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed May 18 09:30:56 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 18 May 2016 09:30:56 +0000 Subject: [ABANDON]openbsc[master]: WIP.. check the subject says patch.. In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: WIP.. check the subject says patch.. ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/76 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I1120a8f5584313497f52f1b3b27158ef28adb567 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed May 18 11:09:11 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 18 May 2016 11:09:11 +0000 Subject: [PATCH] openbsc[master]: Make si2q scheduling optional Message-ID: Review at https://gerrit.osmocom.org/81 Make si2q scheduling optional Previously si2quater SI messages were always scheduled. Check for neighbor configuration and only schedule si2q when necessary. Change-Id: Ibe997803ffb894133fd4d838410fe735791d414f Fixes: OS#1727 --- M openbsc/src/libbsc/system_information.c 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/81/81/1 diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index 1f1d81e..8e59817 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -648,7 +648,7 @@ static int generate_si2quater(uint8_t *output, struct gsm_bts *bts) { - int rc; + int rc, i; struct gsm48_system_information_type_2quater *si2q = (struct gsm48_system_information_type_2quater *) output; @@ -667,6 +667,13 @@ if (rc < 0) return rc; + for (i = 0; i < MAX_EARFCN_LIST; i++) + if (bts->si_common.si2quater_neigh_list.arfcn[i] != + OSMO_EARFCN_INVALID) + break; + if (!bts->si_common.uarfcn_length && i == MAX_EARFCN_LIST) + bts->si_valid &= ~(1 << SYSINFO_TYPE_2quater); + return sizeof(*si2q) + rc; } -- To view, visit https://gerrit.osmocom.org/81 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibe997803ffb894133fd4d838410fe735791d414f Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed May 18 12:53:46 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 18 May 2016 12:53:46 +0000 Subject: [PATCH] openbsc[master]: Make si2q scheduling optional In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/81 to look at the new patch set (#2). Make si2q scheduling optional Previously si2quater SI messages were always scheduled. Check for neighbor configuration and only schedule si2q when necessary. Change-Id: Ibe997803ffb894133fd4d838410fe735791d414f Fixes: OS#1727 --- M openbsc/src/libbsc/system_information.c 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/81/81/2 diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index 1f1d81e..dc69dd0 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -648,7 +648,7 @@ static int generate_si2quater(uint8_t *output, struct gsm_bts *bts) { - int rc; + int rc, i = MAX_EARFCN_LIST; struct gsm48_system_information_type_2quater *si2q = (struct gsm48_system_information_type_2quater *) output; @@ -667,6 +667,14 @@ if (rc < 0) return rc; + if (bts->si_common.si2quater_neigh_list.arfcn) + for (i = 0; i < MAX_EARFCN_LIST; i++) + if (bts->si_common.si2quater_neigh_list.arfcn[i] != + OSMO_EARFCN_INVALID) + break; + if (!bts->si_common.uarfcn_length && i == MAX_EARFCN_LIST) + bts->si_valid &= ~(1 << SYSINFO_TYPE_2quater); + return sizeof(*si2q) + rc; } -- To view, visit https://gerrit.osmocom.org/81 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibe997803ffb894133fd4d838410fe735791d414f Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed May 18 13:24:03 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Wed, 18 May 2016 13:24:03 +0000 Subject: libosmocore[master]: add vty call show asciidoc: generate a documentation for cou... In-Reply-To: References: Message-ID: Patch Set 1: (3 comments) https://gerrit.osmocom.org/#/c/70/1/src/vty/stats_vty.c File src/vty/stats_vty.c: Line 362: struct vty *vty = sctx_; > I think you will not find another place with a '_' as suffix to a parameter No idea what's the semantic, but I did it similiar to http://git.osmocom.org/libosmocore/tree/src/stats.c#n479 Line 363: const char *description = counter->description ? counter->description : ""; > Have you encountered counters without a description? yes. `struct osmo_counter` doesn't have one. Line 397: description, > For XML there is something like xml_escape. Do we need (and can we) escape we can escape those by backslashes. Do we need this to do it right now? http://www.methods.co.nz/asciidoc/faq.html#_how_can_i_escape_asciidoc_markup -- To view, visit https://gerrit.osmocom.org/70 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia8af883167e5ee631059299b107ea83c8bbffdfb Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed May 18 13:25:49 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Wed, 18 May 2016 13:25:49 +0000 Subject: libosmocore[master]: add .gitreview In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/69/1//COMMIT_MSG Commit Message: Line 11: https://www.mediawiki.org/wiki/Gerrit/git-review > This requires the user to have .ssh/config entry? Most people have one? There is no need for a ssh/config entry. The default port for gerrit is 29418. -- To view, visit https://gerrit.osmocom.org/69 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I95235dddf60670c38a5a7a726c2a77f09d03c303 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed May 18 13:54:40 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 18 May 2016 13:54:40 +0000 Subject: [PATCH] libosmo-abis[master]: Extend osmo_rtp_send_frame API Message-ID: Review at https://gerrit.osmocom.org/82 Extend osmo_rtp_send_frame API Add boolean parameter to osmo_rtp_send_frame() to explicitly set marker bit in RTP header. Previously it was always unset which resulted in degradation of speech quality for codecs with explicit talkspurt events (was tested with AMR's ONSET). Related: OS#1562 Change-Id: I23e6dccfad5643e662391a0a2abebbb45597ffd9 --- M TODO-RELEASE M include/osmocom/trau/osmo_ortp.h M src/trau/osmo_ortp.c 3 files changed, 8 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/82/82/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 43b1e8e..2ba3b29 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -1 +1,2 @@ #library what description / commit summary line +libosmo-abis API change signature of osmo_rtp_send_frame diff --git a/include/osmocom/trau/osmo_ortp.h b/include/osmocom/trau/osmo_ortp.h index 9512759..58d2860 100644 --- a/include/osmocom/trau/osmo_ortp.h +++ b/include/osmocom/trau/osmo_ortp.h @@ -2,6 +2,7 @@ #define _OSMO_ORTP_H #include +#include #include #include @@ -66,7 +67,8 @@ int osmo_rtp_socket_set_pt(struct osmo_rtp_socket *rs, int payload_type); int osmo_rtp_socket_free(struct osmo_rtp_socket *rs); int osmo_rtp_send_frame(struct osmo_rtp_socket *rs, const uint8_t *payload, - unsigned int payload_len, unsigned int duration); + unsigned int payload_len, unsigned int duration, + bool marker); int osmo_rtp_socket_poll(struct osmo_rtp_socket *rs); int osmo_rtp_get_bound_ip_port(struct osmo_rtp_socket *rs, diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index 3313798..cb167d7 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -23,6 +23,7 @@ */ #include +#include #include #include @@ -415,7 +416,8 @@ * \returns 0 on success, <0 in case of error. */ int osmo_rtp_send_frame(struct osmo_rtp_socket *rs, const uint8_t *payload, - unsigned int payload_len, unsigned int duration) + unsigned int payload_len, unsigned int duration, + bool marker) { mblk_t *mblk; int rc; @@ -428,6 +430,7 @@ if (!mblk) return -ENOMEM; + rtp_set_markbit(mblk, marker); rc = rtp_session_sendm_with_ts(rs->sess, mblk, rs->tx_timestamp); rs->tx_timestamp += duration; -- To view, visit https://gerrit.osmocom.org/82 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I23e6dccfad5643e662391a0a2abebbb45597ffd9 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Thu May 19 04:19:51 2016 From: gerrit-no-reply at lists.osmocom.org (Arran Cudbard-bell) Date: Thu, 19 May 2016 04:19:51 +0000 Subject: [PATCH] libosmocore[master]: Fix build for OSX In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/74 to look at the new patch set (#4). Fix build for OSX Change-Id: I580a500edcf4812e570be586890abef746083a8c --- M include/osmocom/core/endian.h M src/stats.c 2 files changed, 24 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/74/74/4 diff --git a/include/osmocom/core/endian.h b/include/osmocom/core/endian.h index c890fd7..02c6406 100644 --- a/include/osmocom/core/endian.h +++ b/include/osmocom/core/endian.h @@ -23,6 +23,17 @@ #else #error "Unknown endian" #endif +#elif defined(__APPLE__) +#include + #if defined(__DARWIN_LITTLE_ENDIAN) + #define OSMO_IS_LITTLE_ENDIAN 1 + #define OSMO_IS_BIG_ENDIAN 0 + #elif define(__DARWIN_BIG_ENDIAN) + #define OSMO_IS_LITTLE_ENDIAN 0 + #define OSMO_IS_BIG_ENDIAN 1 + #else + #error "Unknown endian" + #endif #else #include #if __BYTE_ORDER == __LITTLE_ENDIAN diff --git a/src/stats.c b/src/stats.c index 73b2703..5f1d028 100644 --- a/src/stats.c +++ b/src/stats.c @@ -301,6 +301,14 @@ if (sock == -1) return -errno; +#if defined(__APPLE__) && !defined(MSG_NOSIGNAL) + { + static int val = 1; + + rc = setsockopt(sock, SOL_SOCKET, SO_NOSIGPIPE, (void*)&val, sizeof(val)); + goto failed; + } +#endif if (srep->bind_addr_len > 0) { rc = bind(sock, &srep->bind_addr, srep->bind_addr_len); if (rc == -1) @@ -345,7 +353,11 @@ { int rc; - rc = sendto(srep->fd, data, data_len, MSG_NOSIGNAL | MSG_DONTWAIT, + rc = sendto(srep->fd, data, data_len, +#ifdef MSG_NOSIGNAL + MSG_NOSIGNAL | +#endif + MSG_DONTWAIT, &srep->dest_addr, srep->dest_addr_len); if (rc == -1) -- To view, visit https://gerrit.osmocom.org/74 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I580a500edcf4812e570be586890abef746083a8c Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu May 19 04:19:52 2016 From: gerrit-no-reply at lists.osmocom.org (Arran Cudbard-bell) Date: Thu, 19 May 2016 04:19:52 +0000 Subject: [PATCH] libosmocore[master]: Ignore config.cache Message-ID: Review at https://gerrit.osmocom.org/83 Ignore config.cache Change-Id: Ida2294e490eb5eec515aa00742fb6cfc29b11b48 --- M .gitignore 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/83/83/1 diff --git a/.gitignore b/.gitignore index 32915aa..03ce379 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ aminclude.am m4/*.m4 autom4te.cache +config.cache config.h* config.sub config.log -- To view, visit https://gerrit.osmocom.org/83 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ida2294e490eb5eec515aa00742fb6cfc29b11b48 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell From gerrit-no-reply at lists.osmocom.org Thu May 19 06:31:29 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 19 May 2016 06:31:29 +0000 Subject: libosmocore[master]: Ignore config.cache In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/83 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ida2294e490eb5eec515aa00742fb6cfc29b11b48 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu May 19 06:31:34 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 19 May 2016 06:31:34 +0000 Subject: [MERGED] libosmocore[master]: Ignore config.cache In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: Ignore config.cache ...................................................................... Ignore config.cache Change-Id: Ida2294e490eb5eec515aa00742fb6cfc29b11b48 Reviewed-on: https://gerrit.osmocom.org/83 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M .gitignore 1 file changed, 1 insertion(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/.gitignore b/.gitignore index 32915aa..03ce379 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ aminclude.am m4/*.m4 autom4te.cache +config.cache config.h* config.sub config.log -- To view, visit https://gerrit.osmocom.org/83 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ida2294e490eb5eec515aa00742fb6cfc29b11b48 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu May 19 06:37:33 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 19 May 2016 06:37:33 +0000 Subject: libosmocore[master]: Fix build for OSX In-Reply-To: References: Message-ID: Patch Set 4: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/74/4/src/stats.c File src/stats.c: Line 357: #ifdef MSG_NOSIGNAL I don't like #ifdefs in code too much. I will let this one in but in general maybe having a #ifdef __APPLE__ #define MSG_NOSIGNAL 0 #endif at the top is a better idea? 0 | .. will result in a working bitmask and the problem of SIGPIPE might still be the case not that I think we will hit it here. -- To view, visit https://gerrit.osmocom.org/74 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I580a500edcf4812e570be586890abef746083a8c Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu May 19 06:39:11 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 19 May 2016 06:39:11 +0000 Subject: libosmocore[master]: add .gitreview In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/69 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I95235dddf60670c38a5a7a726c2a77f09d03c303 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu May 19 06:39:13 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 19 May 2016 06:39:13 +0000 Subject: [MERGED] libosmocore[master]: add .gitreview In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: add .gitreview ...................................................................... add .gitreview A gitreview file is required to use git review. More information about git review https://www.mediawiki.org/wiki/Gerrit/git-review Change-Id: I95235dddf60670c38a5a7a726c2a77f09d03c303 Reviewed-on: https://gerrit.osmocom.org/69 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- A .gitreview 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..e0ebd90 --- /dev/null +++ b/.gitreview @@ -0,0 +1,3 @@ +[gerrit] +host=gerrit.osmocom.org +project=libosmocore -- To view, visit https://gerrit.osmocom.org/69 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I95235dddf60670c38a5a7a726c2a77f09d03c303 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Thu May 19 06:39:26 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 19 May 2016 06:39:26 +0000 Subject: [ABANDON] openbsc[master]: WIP.. check the subject says patch.. In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: WIP.. check the subject says patch.. ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/80 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I30bf477e4946a3c7debb90dad8fb7392fb4e2344 Gerrit-PatchSet: 6 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu May 19 06:39:43 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 19 May 2016 06:39:43 +0000 Subject: osmo-pcu[master]: add .gitreview In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/68 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I03cbdf3a95bcf36a7388b5fa2652fd774b8f0f5b Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu May 19 06:39:45 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 19 May 2016 06:39:45 +0000 Subject: [MERGED] osmo-pcu[master]: add .gitreview In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: add .gitreview ...................................................................... add .gitreview A .gitreview file is required to use git review. More information about git review https://www.mediawiki.org/wiki/Gerrit/git-review Change-Id: I03cbdf3a95bcf36a7388b5fa2652fd774b8f0f5b Reviewed-on: https://gerrit.osmocom.org/68 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- A .gitreview 1 file changed, 3 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..628d176 --- /dev/null +++ b/.gitreview @@ -0,0 +1,3 @@ +[gerrit] +host=gerrit.osmocom.org +project=osmo-pcu -- To view, visit https://gerrit.osmocom.org/68 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I03cbdf3a95bcf36a7388b5fa2652fd774b8f0f5b Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu May 19 06:40:23 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 19 May 2016 06:40:23 +0000 Subject: osmo-pcu[master]: Change internal API for consistency In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/59 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic584611184b0c8b5417ecff0ddae3d526b55a079 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu May 19 06:40:26 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 19 May 2016 06:40:26 +0000 Subject: [MERGED] osmo-pcu[master]: Change internal API for consistency In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: Change internal API for consistency ...................................................................... Change internal API for consistency Make TRX API (void *) consistent with the way it's used (integer). Use uint8_t for TRX numbering everywhere (we don't expect hardware with more than 256 transceivers in the near future). This change helps to avoid unnecessary casts and make API much clearer. Change-Id: Ic584611184b0c8b5417ecff0ddae3d526b55a079 Related: SYS#2443 Reviewed-on: https://gerrit.osmocom.org/59 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M src/osmo-bts-sysmo/sysmo_l1_if.c M src/osmo-bts-sysmo/sysmo_l1_if.h M src/pcu_l1_if.cpp 3 files changed, 10 insertions(+), 9 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/osmo-bts-sysmo/sysmo_l1_if.c b/src/osmo-bts-sysmo/sysmo_l1_if.c index c7c54dd..c072c1a 100644 --- a/src/osmo-bts-sysmo/sysmo_l1_if.c +++ b/src/osmo-bts-sysmo/sysmo_l1_if.c @@ -155,7 +155,7 @@ switch (rts_ind->sapi) { case GsmL1_Sapi_Pdtch: case GsmL1_Sapi_Pacch: - rc = pcu_rx_rts_req_pdtch((long)fl1h->priv, rts_ind->u8Tn, + rc = pcu_rx_rts_req_pdtch(fl1h->trx_no, rts_ind->u8Tn, rts_ind->u16Arfcn, rts_ind->u32Fn, rts_ind->u8BlockNbr); case GsmL1_Sapi_Ptcch: // FIXME @@ -215,7 +215,7 @@ != GsmL1_PdtchPlType_Full) break; /* PDTCH / PACCH frame handling */ - pcu_rx_data_ind_pdtch((long)fl1h->priv, data_ind->u8Tn, + pcu_rx_data_ind_pdtch(fl1h->trx_no, data_ind->u8Tn, data_ind->msgUnitParam.u8Buffer + 1, data_ind->msgUnitParam.u8Size - 1, data_ind->u32Fn, @@ -357,7 +357,7 @@ return 0; } -void *l1if_open_pdch(void *priv, uint32_t hlayer1, struct gsmtap_inst *gsmtap) +void *l1if_open_pdch(uint8_t trx_no, uint32_t hlayer1, struct gsmtap_inst *gsmtap) { struct femtol1_hdl *fl1h; int rc; @@ -367,7 +367,7 @@ return NULL; fl1h->hLayer1 = hlayer1; - fl1h->priv = priv; + fl1h->trx_no = trx_no; fl1h->clk_cal = 0; /* default clock source: OCXO */ fl1h->clk_src = SuperFemto_ClkSrcId_Ocxo; diff --git a/src/osmo-bts-sysmo/sysmo_l1_if.h b/src/osmo-bts-sysmo/sysmo_l1_if.h index 6b50d4e..8f1857e 100644 --- a/src/osmo-bts-sysmo/sysmo_l1_if.h +++ b/src/osmo-bts-sysmo/sysmo_l1_if.h @@ -38,7 +38,7 @@ struct gsmtap_inst *gsmtap; uint32_t gsmtap_sapi_mask; - void *priv; /* user reference */ + uint8_t trx_no; struct osmo_timer_list alive_timer; unsigned int alive_prim_cnt; diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index 67272ab..790789c 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -44,7 +44,8 @@ // FIXME: move this, when changed from c++ to c. extern "C" { -void *l1if_open_pdch(void *priv, uint32_t hlayer1, struct gsmtap_inst *gsmtap); +void *l1if_open_pdch(uint8_t trx_no, uint32_t hlayer1, + struct gsmtap_inst *gsmtap); int l1if_connect_pdch(void *obj, uint8_t ts); int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn, uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len); @@ -330,8 +331,8 @@ struct gprs_bssgp_pcu *pcu; struct gprs_rlcmac_pdch *pdch; struct in_addr ia; - int rc = 0; - int trx, ts; + int rc = 0, ts; + uint8_t trx; int i; if (info_ind->version != PCU_IF_VERSION) { @@ -450,7 +451,7 @@ info_ind->trx[trx].hlayer1); if (!bts->trx[trx].fl1h) bts->trx[trx].fl1h = l1if_open_pdch( - (void *)trx, + trx, info_ind->trx[trx].hlayer1, bts->gsmtap); if (!bts->trx[trx].fl1h) { -- To view, visit https://gerrit.osmocom.org/59 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic584611184b0c8b5417ecff0ddae3d526b55a079 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu May 19 06:41:34 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 19 May 2016 06:41:34 +0000 Subject: libosmo-sccp[master]: Ignore more build/libtool products In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/72/1/.gitignore File .gitignore: Line 33: src/.libs just move .libs to the top as well? Because you ignore it in the sigtran tests as well. -- To view, visit https://gerrit.osmocom.org/72 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7b0825112afcb630f40b2d2670952e0beea0a436 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu May 19 06:53:48 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 19 May 2016 06:53:48 +0000 Subject: openbsc[master]: Make extending subscriber creation easier In-Reply-To: References: Message-ID: Patch Set 5: (1 comment) Last comment about the vty write but we can move to the follow up patch soon. Is there a ticket reference as well? https://gerrit.osmocom.org/#/c/42/5/openbsc/src/libmsc/vty_interface_layer3.c File openbsc/src/libmsc/vty_interface_layer3.c: Line 1075: gsmnet->subscr_creation_mode ? "" : "no ", VTY_NEWLINE); You change that to a switch in a follow-up commit? Then maybe have the enum only have the two values 0 / 1 so this doesn't look as fragile? -- To view, visit https://gerrit.osmocom.org/42 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3b10a9a764fd3a7bb96717a990e52caae16266da Gerrit-PatchSet: 5 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Thu May 19 09:00:03 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 19 May 2016 09:00:03 +0000 Subject: [PATCH] openbsc[master]: Make extending subscriber creation easier In-Reply-To: References: Message-ID: Hello Neels Hofmeyr, Harald Welte, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/42 to look at the new patch set (#6). Make extending subscriber creation easier * rename variable controlling subscriber creation * use enum for subscriber creation policy * move check for subscriber creation policy into separate static function Related: OS#1658, OS#1647 Change-Id: I3b10a9a764fd3a7bb96717a990e52caae16266da --- M openbsc/include/openbsc/gsm_data.h M openbsc/src/libbsc/net_init.c M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/libmsc/vty_interface_layer3.c 4 files changed, 23 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/42/42/6 diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 91d84db..a08938c 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -19,6 +19,11 @@ #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] +enum gsm_subscr_creation_mode { + GSM_SUBSCR_DONT_CREATE = 0, + GSM_SUBSCR_CREAT_W_RAND_EXT = 1, +}; + enum gsm_security_event { GSM_SECURITY_NOAVAIL, GSM_SECURITY_AUTH_FAILED, @@ -278,7 +283,7 @@ struct osmo_bsc_data *bsc_data; /* subscriber related features */ - int create_subscriber; + int subscr_creation_mode; struct gsm_subscriber_group *subscr_group; struct gsm_sms_queue *sms_queue; diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c index 568a0b8..afcaaf3 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -48,7 +48,7 @@ INIT_LLIST_HEAD(&net->bsc_data->mscs); net->subscr_group->net = net; - net->create_subscriber = 1; + net->subscr_creation_mode = GSM_SUBSCR_CREAT_W_RAND_EXT; net->country_code = country_code; net->network_code = network_code; diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index f02f784..0f00db1 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -507,6 +507,14 @@ return gsm48_conn_sendmsg(msg, conn, NULL); } +static struct gsm_subscriber *subscr_create(const struct gsm_network *net, + const char *imsi) +{ + if (net->subscr_creation_mode != GSM_SUBSCR_DONT_CREATE) + return subscr_create_subscriber(net->subscr_group, imsi); + + return NULL; +} /* Parse Chapter 9.2.11 Identity Response */ static int mm_rx_id_resp(struct gsm_subscriber_connection *conn, struct msgb *msg) @@ -530,9 +538,8 @@ if (!conn->subscr) { conn->subscr = subscr_get_by_imsi(net->subscr_group, mi_string); - if (!conn->subscr && net->create_subscriber) - conn->subscr = subscr_create_subscriber( - net->subscr_group, mi_string); + if (!conn->subscr) + conn->subscr = subscr_create(net, mi_string); } if (!conn->subscr && conn->loc_operation) { gsm0408_loc_upd_rej(conn, bts->network->reject_cause); @@ -641,10 +648,9 @@ /* look up subscriber based on IMSI, create if not found */ subscr = subscr_get_by_imsi(bts->network->subscr_group, mi_string); - if (!subscr && bts->network->create_subscriber) { - subscr = subscr_create_subscriber( - bts->network->subscr_group, mi_string); - } + if (!subscr) + subscr = subscr_create(bts->network, mi_string); + if (!subscr) { gsm0408_loc_upd_rej(conn, bts->network->reject_cause); release_loc_updating_req(conn, 0); diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 4c2088a..5d74e04 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -1036,7 +1036,7 @@ "Make a new record when a subscriber is first seen.\n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->create_subscriber = 1; + gsmnet->subscr_creation_mode = GSM_SUBSCR_CREAT_W_RAND_EXT; return CMD_SUCCESS; } @@ -1045,7 +1045,7 @@ NO_STR "Make a new record when a subscriber is first seen.\n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->create_subscriber = 0; + gsmnet->subscr_creation_mode = GSM_SUBSCR_DONT_CREATE; return CMD_SUCCESS; } @@ -1072,7 +1072,7 @@ struct gsm_network *gsmnet = gsmnet_from_vty(vty); vty_out(vty, "nitb%s", VTY_NEWLINE); vty_out(vty, " %ssubscriber-create-on-demand%s", - gsmnet->create_subscriber ? "" : "no ", VTY_NEWLINE); + gsmnet->subscr_creation_mode ? "" : "no ", VTY_NEWLINE); vty_out(vty, " %sassign-tmsi%s", gsmnet->avoid_tmsi ? "no " : "", VTY_NEWLINE); return CMD_SUCCESS; -- To view, visit https://gerrit.osmocom.org/42 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I3b10a9a764fd3a7bb96717a990e52caae16266da Gerrit-PatchSet: 6 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Thu May 19 09:23:00 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 19 May 2016 09:23:00 +0000 Subject: [PATCH] osmo-pcu[master]: Add support for NuRAN Wireless Litecell 1.5 BTS In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/61 to look at the new patch set (#3). Add support for NuRAN Wireless Litecell 1.5 BTS Layer 1 compatibility with previous generation or NuRan GSM product, therefore the support for the Litecell 1.5 uses its own sources instead of using tons of ifdef/endif. Max's amendments: * make headers path configurable * use configured TRX instead of hardcoded value * split subdir-objects into separate commit * cosmetic changes Change-Id: Ib1287375cb10a889625bbac8528fa60deed23a2b Fixes: SYS#2443 --- M configure.ac M src/Makefile.am A src/osmo-bts-litecell15/lc15_l1_hw.c A src/osmo-bts-litecell15/lc15_l1_if.c A src/osmo-bts-litecell15/lc15_l1_if.h A src/osmo-bts-litecell15/lc15bts.c A src/osmo-bts-litecell15/lc15bts.h 7 files changed, 1,166 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/61/61/3 diff --git a/configure.ac b/configure.ac index 5274022..d8fe719 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,25 @@ AC_MSG_RESULT([$enable_sysmocom_dsp]) AM_CONDITIONAL(ENABLE_SYSMODSP, test "x$enable_sysmocom_dsp" = "xyes") +AC_MSG_CHECKING([whether to enable direct PHY access for PDCH of NuRAN Wireless Litecell 1.5 BTS]) +AC_ARG_ENABLE(lc15bts-phy, + AC_HELP_STRING([--enable-lc15bts-phy], + [enable code for Litecell 1.5 PHY [default=no]]), + [enable_lc15bts_phy="$enableval"],[enable_lc15bts_phy="no"]) +AC_ARG_WITH([litecell15], [AS_HELP_STRING([--with-litecell15=INCLUDE_DIR], [Location of the litecell 1.5 API header files])], + [litecell15_incdir="$withval"],[litecell15_incdir="$incdir"]) +AC_SUBST([LITECELL15_INCDIR], $litecell15_incdir) +AC_MSG_RESULT([$enable_lc15bts_phy]) +AM_CONDITIONAL(ENABLE_LC15BTS_PHY, test "x$enable_lc15bts_phy" = "xyes") +if test "$enable_litecell15" = "yes"; then + oldCPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -I$LITECELL15_INCDIR -I$srcdir/include $LIBOSMOCORE_CFLAGS" + AC_CHECK_HEADER([nrw/litecell15/litecell15.h],[], + [AC_MSG_ERROR([nrw/litecell15/litecell15.h can not be found in $litecell15_incdir])], + [#include ]) + CPPFLAGS=$oldCPPFLAGS +fi + AC_ARG_ENABLE([vty_tests], AC_HELP_STRING([--enable-vty-tests], [Include the VTY tests in make check [default=no]]), diff --git a/src/Makefile.am b/src/Makefile.am index e08ba07..9bdec2f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -25,6 +25,10 @@ AM_CPPFLAGS += -DENABLE_DIRECT_PHY endif +if ENABLE_LC15BTS_PHY +AM_CPPFLAGS += -DENABLE_DIRECT_PHY +endif + AM_CXXFLAGS = -Wall -ldl -pthread AM_LDFLAGS = -lrt @@ -130,6 +134,26 @@ $(COMMON_LA) endif +if ENABLE_LC15BTS_PHY +AM_CPPFLAGS += -I$(LITECELL15_INCDIR) -I$(srcdir)/osmo-bts-litecell15 + +EXTRA_DIST = \ + osmo-bts-litecell15/lc15_l1_if.c \ + osmo-bts-litecell15/lc15_l1_if.h \ + osmo-bts-litecell15/lc15_l1_hw.c \ + osmo-bts-litecell15/lc15bts.c \ + osmo-bts-litecell15/lc15bts.h + +noinst_HEADERS += \ + osmo-bts-litecell15/lc15_l1_if.h \ + osmo-bts-litecell15/lc15bts.h + +osmo_pcu_SOURCES += \ + osmo-bts-litecell15/lc15_l1_if.c \ + osmo-bts-litecell15/lc15_l1_hw.c \ + osmo-bts-litecell15/lc15bts.c +endif + osmo_pcu_LDADD = \ libgprs.la \ $(LIBOSMOGB_LIBS) \ diff --git a/src/osmo-bts-litecell15/lc15_l1_hw.c b/src/osmo-bts-litecell15/lc15_l1_hw.c new file mode 100644 index 0000000..051dc5c --- /dev/null +++ b/src/osmo-bts-litecell15/lc15_l1_hw.c @@ -0,0 +1,213 @@ +/* Interface handler for Nuran Wireless Litecell 1.5 L1 (real hardware) */ + +/* Copyright (C) 2015 by Yves Godin + * based on: + * femto_l1_hw.c + * (C) 2011 by Harald Welte + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "gprs_debug.h" +#include "lc15bts.h" +#include "lc15_l1_if.h" + +#define DEV_SYS_DSP2ARM_NAME "/dev/msgq/litecell15_dsp2arm_trx" +#define DEV_SYS_ARM2DSP_NAME "/dev/msgq/litecell15_arm2dsp_trx" +#define DEV_L1_DSP2ARM_NAME "/dev/msgq/gsml1_sig_dsp2arm_trx" +#define DEV_L1_ARM2DSP_NAME "/dev/msgq/gsml1_sig_arm2dsp_trx" + +#define DEV_TCH_DSP2ARM_NAME "/dev/msgq/gsml1_tch_dsp2arm_trx" +#define DEV_TCH_ARM2DSP_NAME "/dev/msgq/gsml1_tch_arm2dsp_trx" +#define DEV_PDTCH_DSP2ARM_NAME "/dev/msgq/gsml1_pdtch_dsp2arm_trx" +#define DEV_PDTCH_ARM2DSP_NAME "/dev/msgq/gsml1_pdtch_arm2dsp_trx" + +static const char *rd_devnames[] = { + [MQ_SYS_READ] = DEV_SYS_DSP2ARM_NAME, + [MQ_L1_READ] = DEV_L1_DSP2ARM_NAME, + [MQ_TCH_READ] = DEV_TCH_DSP2ARM_NAME, + [MQ_PDTCH_READ] = DEV_PDTCH_DSP2ARM_NAME, +}; + +static const char *wr_devnames[] = { + [MQ_SYS_WRITE] = DEV_SYS_ARM2DSP_NAME, + [MQ_L1_WRITE] = DEV_L1_ARM2DSP_NAME, + [MQ_TCH_WRITE] = DEV_TCH_ARM2DSP_NAME, + [MQ_PDTCH_WRITE]= DEV_PDTCH_ARM2DSP_NAME, +}; + +/* callback when there's something to read from the l1 msg_queue */ +static int l1if_fd_cb(struct osmo_fd *ofd, unsigned int what) +{ + //struct msgb *msg = l1p_msgb_alloc(); + struct msgb *msg = msgb_alloc_headroom(sizeof(Litecell15_Prim_t) + 128, + 128, "1l_fd"); + struct lc15l1_hdl *fl1h = ofd->data; + int rc; + + msg->l1h = msg->data; + rc = read(ofd->fd, msg->l1h, msgb_tailroom(msg)); + if (rc < 0) { + if (rc != -1) + LOGP(DL1IF, LOGL_ERROR, "error reading from L1 msg_queue: %s\n", + strerror(errno)); + msgb_free(msg); + return rc; + } + msgb_put(msg, rc); + + switch (ofd->priv_nr) { + case MQ_SYS_WRITE: + if (rc != sizeof(Litecell15_Prim_t)) + LOGP(DL1IF, LOGL_NOTICE, "%u != " + "sizeof(Litecell15_Prim_t)\n", rc); + return l1if_handle_sysprim(fl1h, msg); + case MQ_L1_WRITE: + case MQ_TCH_WRITE: + case MQ_PDTCH_WRITE: + if (rc != sizeof(GsmL1_Prim_t)) + LOGP(DL1IF, LOGL_NOTICE, "%u != " + "sizeof(GsmL1_Prim_t)\n", rc); + return l1if_handle_l1prim(ofd->priv_nr, fl1h, msg); + default: + /* The compiler can't know that priv_nr is an enum. Assist. */ + LOGP(DL1IF, LOGL_FATAL, "writing on a wrong queue: %d\n", + ofd->priv_nr); + exit(0); + break; + } +}; + +/* callback when we can write to one of the l1 msg_queue devices */ +static int l1fd_write_cb(struct osmo_fd *ofd, struct msgb *msg) +{ + int rc; + + rc = write(ofd->fd, msg->l1h, msgb_l1len(msg)); + if (rc < 0) { + LOGP(DL1IF, LOGL_ERROR, "error writing to L1 msg_queue: %s\n", + strerror(errno)); + return rc; + } else if (rc < msg->len) { + LOGP(DL1IF, LOGL_ERROR, "short write to L1 msg_queue: " + "%u < %u\n", rc, msg->len); + return -EIO; + } + + return 0; +} + +int l1if_transport_open(int q, struct lc15l1_hdl *hdl) +{ + int rc; + char buf[PATH_MAX]; + + /* Step 1: Open all msg_queue file descriptors */ + struct osmo_fd *read_ofd = &hdl->read_ofd[q]; + struct osmo_wqueue *wq = &hdl->write_q[q]; + struct osmo_fd *write_ofd = &hdl->write_q[q].bfd; + + snprintf(buf, sizeof(buf)-1, "%s%d", rd_devnames[q], hdl->hw_info.trx_nr); + buf[sizeof(buf)-1] = '\0'; + + rc = open(buf, O_RDONLY); + if (rc < 0) { + LOGP(DL1IF, LOGL_FATAL, "unable to open msg_queue %s: %s\n", + buf, strerror(errno)); + return rc; + } + read_ofd->fd = rc; + read_ofd->priv_nr = q; + read_ofd->data = hdl; + read_ofd->cb = l1if_fd_cb; + read_ofd->when = BSC_FD_READ; + rc = osmo_fd_register(read_ofd); + if (rc < 0) { + close(read_ofd->fd); + read_ofd->fd = -1; + return rc; + } + + snprintf(buf, sizeof(buf)-1, "%s%d", wr_devnames[q], hdl->hw_info.trx_nr); + buf[sizeof(buf)-1] = '\0'; + + rc = open(buf, O_WRONLY); + if (rc < 0) { + LOGP(DL1IF, LOGL_FATAL, "unable to open msg_queue %s: %s\n", + buf, strerror(errno)); + goto out_read; + } + osmo_wqueue_init(wq, 10); + wq->write_cb = l1fd_write_cb; + write_ofd->fd = rc; + write_ofd->priv_nr = q; + write_ofd->data = hdl; + write_ofd->when = BSC_FD_WRITE; + rc = osmo_fd_register(write_ofd); + if (rc < 0) { + close(write_ofd->fd); + write_ofd->fd = -1; + goto out_read; + } + + return 0; + +out_read: + close(hdl->read_ofd[q].fd); + osmo_fd_unregister(&hdl->read_ofd[q]); + + return rc; +} + +int l1if_transport_close(int q, struct lc15l1_hdl *hdl) +{ + struct osmo_fd *read_ofd = &hdl->read_ofd[q]; + struct osmo_fd *write_ofd = &hdl->write_q[q].bfd; + + osmo_fd_unregister(read_ofd); + close(read_ofd->fd); + read_ofd->fd = -1; + + osmo_fd_unregister(write_ofd); + close(write_ofd->fd); + write_ofd->fd = -1; + + return 0; +} diff --git a/src/osmo-bts-litecell15/lc15_l1_if.c b/src/osmo-bts-litecell15/lc15_l1_if.c new file mode 100644 index 0000000..2cda5b8 --- /dev/null +++ b/src/osmo-bts-litecell15/lc15_l1_if.c @@ -0,0 +1,410 @@ +/* Copyright (C) 2015 by Yves Godin + * based on: + * femto_l1_if.c + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +extern void *tall_pcu_ctx; + +uint32_t l1if_ts_to_hLayer2(uint8_t trx, uint8_t ts) +{ + return (ts << 16) | (trx << 24); +} + +/* allocate a msgb containing a GsmL1_Prim_t */ +struct msgb *l1p_msgb_alloc(void) +{ + struct msgb *msg = msgb_alloc(sizeof(GsmL1_Prim_t), "l1_prim"); + + if (msg) + msg->l1h = msgb_put(msg, sizeof(GsmL1_Prim_t)); + + return msg; +} + +static int l1if_req_pdch(struct lc15l1_hdl *fl1h, struct msgb *msg) +{ + struct osmo_wqueue *wqueue = &fl1h->write_q[MQ_PDTCH_WRITE]; + + if (osmo_wqueue_enqueue(wqueue, msg) != 0) { + LOGP(DL1IF, LOGL_ERROR, "PDTCH queue full. dropping message.\n"); + msgb_free(msg); + } + + return 0; +} + +static void *prim_init(GsmL1_Prim_t *prim, GsmL1_PrimId_t id, struct lc15l1_hdl *gl1) +{ + prim->id = id; + + switch (id) { + case GsmL1_PrimId_MphInitReq: + //prim->u.mphInitReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphCloseReq: + prim->u.mphCloseReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphConnectReq: + prim->u.mphConnectReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphDisconnectReq: + prim->u.mphDisconnectReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphActivateReq: + prim->u.mphActivateReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphDeactivateReq: + prim->u.mphDeactivateReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphConfigReq: + prim->u.mphConfigReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphMeasureReq: + prim->u.mphMeasureReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphInitCnf: + case GsmL1_PrimId_MphCloseCnf: + case GsmL1_PrimId_MphConnectCnf: + case GsmL1_PrimId_MphDisconnectCnf: + case GsmL1_PrimId_MphActivateCnf: + case GsmL1_PrimId_MphDeactivateCnf: + case GsmL1_PrimId_MphConfigCnf: + case GsmL1_PrimId_MphMeasureCnf: + break; + case GsmL1_PrimId_MphTimeInd: + break; + case GsmL1_PrimId_MphSyncInd: + break; + case GsmL1_PrimId_PhEmptyFrameReq: + prim->u.phEmptyFrameReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_PhDataReq: + prim->u.phDataReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_PhConnectInd: + break; + case GsmL1_PrimId_PhReadyToSendInd: + break; + case GsmL1_PrimId_PhDataInd: + break; + case GsmL1_PrimId_PhRaInd: + break; + default: + LOGP(DL1IF, LOGL_ERROR, "unknown L1 primitive %u\n", id); + break; + } + return &prim->u; +} + +struct sapi_dir { + GsmL1_Sapi_t sapi; + GsmL1_Dir_t dir; +}; + +static const struct sapi_dir pdtch_sapis[] = { + { GsmL1_Sapi_Pdtch, GsmL1_Dir_TxDownlink }, + { GsmL1_Sapi_Pdtch, GsmL1_Dir_RxUplink }, + { GsmL1_Sapi_Ptcch, GsmL1_Dir_TxDownlink }, + { GsmL1_Sapi_Prach, GsmL1_Dir_RxUplink }, +#if 0 + { GsmL1_Sapi_Ptcch, GsmL1_Dir_RxUplink }, + { GsmL1_Sapi_Pacch, GsmL1_Dir_TxDownlink }, +#endif +}; + + +/* connect PDTCH */ +int l1if_connect_pdch(void *obj, uint8_t ts) +{ + struct lc15l1_hdl *fl1h = obj; + struct msgb *msg = l1p_msgb_alloc(); + GsmL1_MphConnectReq_t *cr; + + cr = prim_init(msgb_l1prim(msg), GsmL1_PrimId_MphConnectReq, fl1h); + cr->u8Tn = ts; + cr->logChComb = GsmL1_LogChComb_XIII; + + return l1if_req_pdch(fl1h, msg); +} + +static int handle_ph_readytosend_ind(struct lc15l1_hdl *fl1h, + GsmL1_PhReadyToSendInd_t *rts_ind) +{ + struct gsm_time g_time; + int rc = 0; + + gsm_fn2gsmtime(&g_time, rts_ind->u32Fn); + + DEBUGP(DL1IF, "Rx PH-RTS.ind %02u/%02u/%02u SAPI=%s\n", + g_time.t1, g_time.t2, g_time.t3, + get_value_string(lc15bts_l1sapi_names, rts_ind->sapi)); + + switch (rts_ind->sapi) { + case GsmL1_Sapi_Pdtch: + case GsmL1_Sapi_Pacch: + rc = pcu_rx_rts_req_pdtch(fl1h->trx_no, rts_ind->u8Tn, + rts_ind->u16Arfcn, rts_ind->u32Fn, rts_ind->u8BlockNbr); + case GsmL1_Sapi_Ptcch: + // FIXME + default: + break; + } + + return rc; +} + +static void get_meas(struct pcu_l1_meas *meas, const GsmL1_MeasParam_t *l1_meas) +{ + meas->rssi = (int8_t) (l1_meas->fRssi); + meas->have_rssi = 1; + meas->ber = (uint8_t) (l1_meas->fBer * 100); + meas->have_ber = 1; + meas->bto = (int16_t) (l1_meas->i16BurstTiming); + meas->have_bto = 1; + meas->link_qual = (int16_t) (l1_meas->fLinkQuality); + meas->have_link_qual = 1; +} + +static int handle_ph_data_ind(struct lc15l1_hdl *fl1h, + GsmL1_PhDataInd_t *data_ind, struct msgb *l1p_msg) +{ + int rc = 0; + struct pcu_l1_meas meas = {0}; + + DEBUGP(DL1IF, "Rx PH-DATA.ind %s (hL2 %08x): %s\n", + get_value_string(lc15bts_l1sapi_names, data_ind->sapi), + data_ind->hLayer2, + osmo_hexdump(data_ind->msgUnitParam.u8Buffer, + data_ind->msgUnitParam.u8Size)); + + /* + * TODO: Add proper bad frame handling here. This could be used + * to switch the used CS. Avoid a crash with the PCU right now + * feed "0 - 1" amount of data. + */ + if (data_ind->msgUnitParam.u8Size == 0) + return -1; + + gsmtap_send(fl1h->gsmtap, data_ind->u16Arfcn | GSMTAP_ARFCN_F_UPLINK, + data_ind->u8Tn, GSMTAP_CHANNEL_PACCH, 0, + data_ind->u32Fn, 0, 0, data_ind->msgUnitParam.u8Buffer+1, + data_ind->msgUnitParam.u8Size-1); + + get_meas(&meas, &data_ind->measParam); + + switch (data_ind->sapi) { + case GsmL1_Sapi_Pdtch: + case GsmL1_Sapi_Pacch: + /* drop incomplete UL block */ + if (data_ind->msgUnitParam.u8Buffer[0] + != GsmL1_PdtchPlType_Full) + break; + /* PDTCH / PACCH frame handling */ + pcu_rx_data_ind_pdtch(fl1h->trx_no, data_ind->u8Tn, + data_ind->msgUnitParam.u8Buffer + 1, + data_ind->msgUnitParam.u8Size - 1, + data_ind->u32Fn, + &meas); + break; + case GsmL1_Sapi_Ptcch: + // FIXME + break; + default: + LOGP(DL1IF, LOGL_NOTICE, "Rx PH-DATA.ind for unknown L1 SAPI %s\n", + get_value_string(lc15bts_l1sapi_names, data_ind->sapi)); + break; + } + + return rc; +} + +#define MIN_QUAL_RACH 5.0f + +static int handle_ph_ra_ind(struct lc15l1_hdl *fl1h, GsmL1_PhRaInd_t *ra_ind) +{ + uint8_t acc_delay; + + if (ra_ind->measParam.fLinkQuality < MIN_QUAL_RACH) + return 0; + + DEBUGP(DL1IF, "Rx PH-RA.ind"); + + /* check for under/overflow / sign */ + if (ra_ind->measParam.i16BurstTiming < 0) + acc_delay = 0; + else + acc_delay = ra_ind->measParam.i16BurstTiming >> 2; + + LOGP(DL1IF, LOGL_NOTICE, "got (P)RACH request, TA = %u (ignored)\n", + acc_delay); + +#warning "The (P)RACH request is just dropped here" + +#if 0 + if (acc_delay > bts->max_ta) { + LOGP(DL1C, LOGL_INFO, "ignoring RACH request %u > max_ta(%u)\n", + acc_delay, btsb->max_ta); + return 0; + } +#endif + + return 0; +} + + +/* handle any random indication from the L1 */ +int l1if_handle_l1prim(int wq, struct lc15l1_hdl *fl1h, struct msgb *msg) +{ + GsmL1_Prim_t *l1p = msgb_l1prim(msg); + int rc = 0; + + LOGP(DL1IF, LOGL_DEBUG, "Rx L1 prim %s on queue %d\n", + get_value_string(lc15bts_l1prim_names, l1p->id), wq); + + switch (l1p->id) { +#if 0 + case GsmL1_PrimId_MphTimeInd: + rc = handle_mph_time_ind(fl1h, &l1p->u.mphTimeInd); + break; + case GsmL1_PrimId_MphSyncInd: + break; + case GsmL1_PrimId_PhConnectInd: + break; +#endif + case GsmL1_PrimId_PhReadyToSendInd: + rc = handle_ph_readytosend_ind(fl1h, &l1p->u.phReadyToSendInd); + break; + case GsmL1_PrimId_PhDataInd: + rc = handle_ph_data_ind(fl1h, &l1p->u.phDataInd, msg); + break; + case GsmL1_PrimId_PhRaInd: + rc = handle_ph_ra_ind(fl1h, &l1p->u.phRaInd); + break; + default: + break; + } + + msgb_free(msg); + + return rc; +} + +int l1if_handle_sysprim(struct lc15l1_hdl *fl1h, struct msgb *msg) +{ + return -ENOTSUP; +} + +/* send packet data request to L1 */ +int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn, + uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len) +{ + struct lc15l1_hdl *fl1h = obj; + struct msgb *msg; + GsmL1_Prim_t *l1p; + GsmL1_PhDataReq_t *data_req; + GsmL1_MsgUnitParam_t *msu_param; + struct gsm_time g_time; + + gsm_fn2gsmtime(&g_time, fn); + + DEBUGP(DL1IF, "TX packet data %02u/%02u/%02u is_ptcch=%d ts=%d " + "block_nr=%d, arfcn=%d, len=%d\n", g_time.t1, g_time.t2, + g_time.t3, is_ptcch, ts, block_nr, arfcn, len); + + msg = l1p_msgb_alloc(); + l1p = msgb_l1prim(msg); + l1p->id = GsmL1_PrimId_PhDataReq; + data_req = &l1p->u.phDataReq; + data_req->hLayer1 = (HANDLE)fl1h->hLayer1; + data_req->sapi = (is_ptcch) ? GsmL1_Sapi_Ptcch : GsmL1_Sapi_Pdtch; + data_req->subCh = GsmL1_SubCh_NA; + data_req->u8BlockNbr = block_nr; + data_req->u8Tn = ts; + data_req->u32Fn = fn; + msu_param = &data_req->msgUnitParam; + msu_param->u8Size = len; + memcpy(msu_param->u8Buffer, data, len); + + gsmtap_send(fl1h->gsmtap, arfcn, data_req->u8Tn, GSMTAP_CHANNEL_PACCH, + 0, data_req->u32Fn, 0, 0, + data_req->msgUnitParam.u8Buffer, + data_req->msgUnitParam.u8Size); + + + /* transmit */ + if (osmo_wqueue_enqueue(&fl1h->write_q[MQ_PDTCH_WRITE], msg) != 0) { + LOGP(DL1IF, LOGL_ERROR, "PDTCH queue full. dropping message.\n"); + msgb_free(msg); + } + + return 0; +} + +void *l1if_open_pdch(uint8_t trx_no, uint32_t hlayer1) +{ + struct lc15l1_hdl *fl1h; + int rc; + + fl1h = talloc_zero(tall_pcu_ctx, struct lc15l1_hdl); + if (!fl1h) + return NULL; + + fl1h->hLayer1 = hlayer1; + fl1h->trx_no = trx_no; + /* hardware queues are numbered starting from 1 */ + fl1h->hw_info.trx_nr = trx_no + 1; + + DEBUGP(DL1IF, "PCU: Using TRX HW#%u\n", fl1h->hw_info.trx_nr); + + rc = l1if_transport_open(MQ_PDTCH_WRITE, fl1h); + if (rc < 0) { + talloc_free(fl1h); + return NULL; + } + + fl1h->gsmtap = gsmtap_source_init("localhost", GSMTAP_UDP_PORT, 1); + if (fl1h->gsmtap) + gsmtap_source_add_sink(fl1h->gsmtap); + + return fl1h; +} + +int l1if_close_pdch(void *obj) +{ + struct lc15l1_hdl *fl1h = obj; + if (fl1h) + l1if_transport_close(MQ_PDTCH_WRITE, fl1h); + talloc_free(fl1h); + return 0; +} + diff --git a/src/osmo-bts-litecell15/lc15_l1_if.h b/src/osmo-bts-litecell15/lc15_l1_if.h new file mode 100644 index 0000000..0589919 --- /dev/null +++ b/src/osmo-bts-litecell15/lc15_l1_if.h @@ -0,0 +1,104 @@ +/* Copyright (C) 2015 by Yves Godin + * based on: + * femto_l1_if.h + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#ifndef _LC15_L1_IF_H +#define _LC15_L1_IF_H + +#include +#include +#include +#include +#include "lc15bts.h" + +enum { + MQ_SYS_READ, + MQ_L1_READ, + MQ_TCH_READ, + MQ_PDTCH_READ, + _NUM_MQ_READ +}; + +enum { + MQ_SYS_WRITE, + MQ_L1_WRITE, + MQ_TCH_WRITE, + MQ_PDTCH_WRITE, + _NUM_MQ_WRITE +}; + +struct lc15l1_hdl { + struct gsm_time gsm_time; + uint32_t hLayer1; /* handle to the L1 instance in the DSP */ + uint32_t dsp_trace_f; + struct llist_head wlc_list; + + struct gsmtap_inst *gsmtap; + uint32_t gsmtap_sapi_mask; + + uint8_t trx_no; + + struct osmo_timer_list alive_timer; + unsigned int alive_prim_cnt; + + struct osmo_fd read_ofd[_NUM_MQ_READ]; /* osmo file descriptors */ + struct osmo_wqueue write_q[_NUM_MQ_WRITE]; + + struct { + int trx_nr; /* <1-2> */ + } hw_info; +}; + +#define msgb_l1prim(msg) ((GsmL1_Prim_t *)(msg)->l1h) +#define msgb_sysprim(msg) ((Litecell15_Prim_t *)(msg)->l1h) + +typedef int l1if_compl_cb(struct msgb *l1_msg, void *data); + +/* send a request primitive to the L1 and schedule completion call-back */ +int l1if_req_compl(struct lc15l1_hdl *fl1h, struct msgb *msg, + int is_system_prim, l1if_compl_cb *cb, void *data); + +int l1if_reset(struct lc15l1_hdl *hdl); +int l1if_activate_rf(struct lc15l1_hdl *hdl, int on); +int l1if_set_trace_flags(struct lc15l1_hdl *hdl, uint32_t flags); +int l1if_set_txpower(struct lc15l1_hdl *fl1h, float tx_power); + +struct msgb *l1p_msgb_alloc(void); +struct msgb *sysp_msgb_alloc(void); + +uint32_t l1if_lchan_to_hLayer2(struct gsm_lchan *lchan); +struct gsm_lchan *l1if_hLayer2_to_lchan(struct gsm_bts_trx *trx, uint32_t hLayer2); + +int l1if_handle_sysprim(struct lc15l1_hdl *fl1h, struct msgb *msg); +int l1if_handle_l1prim(int wq, struct lc15l1_hdl *fl1h, struct msgb *msg); + +/* tch.c */ +int l1if_tch_rx(struct gsm_lchan *lchan, struct msgb *l1p_msg); +int l1if_tch_fill(struct gsm_lchan *lchan, uint8_t *l1_buffer); +struct msgb *gen_empty_tch_msg(struct gsm_lchan *lchan); + +/* + * The implementation of these functions is selected by either compiling and + * linking sysmo_l1_hw.c or sysmo_l1_fwd.c + */ +int l1if_transport_open(int q, struct lc15l1_hdl *hdl); +int l1if_transport_close(int q, struct lc15l1_hdl *hdl); + +#endif /* _SYSMO_L1_IF_H */ diff --git a/src/osmo-bts-litecell15/lc15bts.c b/src/osmo-bts-litecell15/lc15bts.c new file mode 100644 index 0000000..172a7e4 --- /dev/null +++ b/src/osmo-bts-litecell15/lc15bts.c @@ -0,0 +1,332 @@ +/* NuRAN Wireless Litecell 1.5 L1 API related definitions */ + +/* Copyright (C) 2015 by Yves Godin + * based on: + * sysmobts.c + * (C) 2011 by Harald Welte + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include + +#include "lc15bts.h" + +enum l1prim_type lc15bts_get_l1prim_type(GsmL1_PrimId_t id) +{ + switch (id) { + case GsmL1_PrimId_MphInitReq: return L1P_T_REQ; + case GsmL1_PrimId_MphCloseReq: return L1P_T_REQ; + case GsmL1_PrimId_MphConnectReq: return L1P_T_REQ; + case GsmL1_PrimId_MphDisconnectReq: return L1P_T_REQ; + case GsmL1_PrimId_MphActivateReq: return L1P_T_REQ; + case GsmL1_PrimId_MphDeactivateReq: return L1P_T_REQ; + case GsmL1_PrimId_MphConfigReq: return L1P_T_REQ; + case GsmL1_PrimId_MphMeasureReq: return L1P_T_REQ; + case GsmL1_PrimId_MphInitCnf: return L1P_T_CONF; + case GsmL1_PrimId_MphCloseCnf: return L1P_T_CONF; + case GsmL1_PrimId_MphConnectCnf: return L1P_T_CONF; + case GsmL1_PrimId_MphDisconnectCnf: return L1P_T_CONF; + case GsmL1_PrimId_MphActivateCnf: return L1P_T_CONF; + case GsmL1_PrimId_MphDeactivateCnf: return L1P_T_CONF; + case GsmL1_PrimId_MphConfigCnf: return L1P_T_CONF; + case GsmL1_PrimId_MphMeasureCnf: return L1P_T_CONF; + case GsmL1_PrimId_PhEmptyFrameReq: return L1P_T_REQ; + case GsmL1_PrimId_PhDataReq: return L1P_T_REQ; + case GsmL1_PrimId_MphTimeInd: return L1P_T_IND; + case GsmL1_PrimId_MphSyncInd: return L1P_T_IND; + case GsmL1_PrimId_PhConnectInd: return L1P_T_IND; + case GsmL1_PrimId_PhReadyToSendInd: return L1P_T_IND; + case GsmL1_PrimId_PhDataInd: return L1P_T_IND; + case GsmL1_PrimId_PhRaInd: return L1P_T_IND; + default: return L1P_T_INVALID; + } +} + +const struct value_string lc15bts_l1prim_names[GsmL1_PrimId_NUM+1] = { + { GsmL1_PrimId_MphInitReq, "MPH-INIT.req" }, + { GsmL1_PrimId_MphCloseReq, "MPH-CLOSE.req" }, + { GsmL1_PrimId_MphConnectReq, "MPH-CONNECT.req" }, + { GsmL1_PrimId_MphDisconnectReq,"MPH-DISCONNECT.req" }, + { GsmL1_PrimId_MphActivateReq, "MPH-ACTIVATE.req" }, + { GsmL1_PrimId_MphDeactivateReq,"MPH-DEACTIVATE.req" }, + { GsmL1_PrimId_MphConfigReq, "MPH-CONFIG.req" }, + { GsmL1_PrimId_MphMeasureReq, "MPH-MEASURE.req" }, + { GsmL1_PrimId_MphInitCnf, "MPH-INIT.conf" }, + { GsmL1_PrimId_MphCloseCnf, "MPH-CLOSE.conf" }, + { GsmL1_PrimId_MphConnectCnf, "MPH-CONNECT.conf" }, + { GsmL1_PrimId_MphDisconnectCnf,"MPH-DISCONNECT.conf" }, + { GsmL1_PrimId_MphActivateCnf, "MPH-ACTIVATE.conf" }, + { GsmL1_PrimId_MphDeactivateCnf,"MPH-DEACTIVATE.conf" }, + { GsmL1_PrimId_MphConfigCnf, "MPH-CONFIG.conf" }, + { GsmL1_PrimId_MphMeasureCnf, "MPH-MEASURE.conf" }, + { GsmL1_PrimId_MphTimeInd, "MPH-TIME.ind" }, + { GsmL1_PrimId_MphSyncInd, "MPH-SYNC.ind" }, + { GsmL1_PrimId_PhEmptyFrameReq, "PH-EMPTY_FRAME.req" }, + { GsmL1_PrimId_PhDataReq, "PH-DATA.req" }, + { GsmL1_PrimId_PhConnectInd, "PH-CONNECT.ind" }, + { GsmL1_PrimId_PhReadyToSendInd,"PH-READY_TO_SEND.ind" }, + { GsmL1_PrimId_PhDataInd, "PH-DATA.ind" }, + { GsmL1_PrimId_PhRaInd, "PH-RA.ind" }, + { 0, NULL } +}; + +GsmL1_PrimId_t lc15bts_get_l1prim_conf(GsmL1_PrimId_t id) +{ + switch (id) { + case GsmL1_PrimId_MphInitReq: return GsmL1_PrimId_MphInitCnf; + case GsmL1_PrimId_MphCloseReq: return GsmL1_PrimId_MphCloseCnf; + case GsmL1_PrimId_MphConnectReq: return GsmL1_PrimId_MphConnectCnf; + case GsmL1_PrimId_MphDisconnectReq: return GsmL1_PrimId_MphDisconnectCnf; + case GsmL1_PrimId_MphActivateReq: return GsmL1_PrimId_MphActivateCnf; + case GsmL1_PrimId_MphDeactivateReq: return GsmL1_PrimId_MphDeactivateCnf; + case GsmL1_PrimId_MphConfigReq: return GsmL1_PrimId_MphConfigCnf; + case GsmL1_PrimId_MphMeasureReq: return GsmL1_PrimId_MphMeasureCnf; + default: return -1; // Weak + } +} + +enum l1prim_type lc15bts_get_sysprim_type(Litecell15_PrimId_t id) +{ + switch (id) { + case Litecell15_PrimId_SystemInfoReq: return L1P_T_REQ; + case Litecell15_PrimId_SystemInfoCnf: return L1P_T_CONF; + case Litecell15_PrimId_SystemFailureInd: return L1P_T_IND; + case Litecell15_PrimId_ActivateRfReq: return L1P_T_REQ; + case Litecell15_PrimId_ActivateRfCnf: return L1P_T_CONF; + case Litecell15_PrimId_DeactivateRfReq: return L1P_T_REQ; + case Litecell15_PrimId_DeactivateRfCnf: return L1P_T_CONF; + case Litecell15_PrimId_SetTraceFlagsReq: return L1P_T_REQ; + case Litecell15_PrimId_Layer1ResetReq: return L1P_T_REQ; + case Litecell15_PrimId_Layer1ResetCnf: return L1P_T_CONF; + case Litecell15_PrimId_SetCalibTblReq: return L1P_T_REQ; + case Litecell15_PrimId_SetCalibTblCnf: return L1P_T_CONF; + case Litecell15_PrimId_MuteRfReq: return L1P_T_REQ; + case Litecell15_PrimId_MuteRfCnf: return L1P_T_CONF; + case Litecell15_PrimId_SetRxAttenReq: return L1P_T_REQ; + case Litecell15_PrimId_SetRxAttenCnf: return L1P_T_CONF; + default: return L1P_T_INVALID; + } +} + +const struct value_string lc15bts_sysprim_names[Litecell15_PrimId_NUM+1] = { + { Litecell15_PrimId_SystemInfoReq, "SYSTEM-INFO.req" }, + { Litecell15_PrimId_SystemInfoCnf, "SYSTEM-INFO.conf" }, + { Litecell15_PrimId_SystemFailureInd, "SYSTEM-FAILURE.ind" }, + { Litecell15_PrimId_ActivateRfReq, "ACTIVATE-RF.req" }, + { Litecell15_PrimId_ActivateRfCnf, "ACTIVATE-RF.conf" }, + { Litecell15_PrimId_DeactivateRfReq, "DEACTIVATE-RF.req" }, + { Litecell15_PrimId_DeactivateRfCnf, "DEACTIVATE-RF.conf" }, + { Litecell15_PrimId_SetTraceFlagsReq, "SET-TRACE-FLAGS.req" }, + { Litecell15_PrimId_Layer1ResetReq, "LAYER1-RESET.req" }, + { Litecell15_PrimId_Layer1ResetCnf, "LAYER1-RESET.conf" }, + { Litecell15_PrimId_SetCalibTblReq, "SET-CALIB.req" }, + { Litecell15_PrimId_SetCalibTblCnf, "SET-CALIB.cnf" }, + { Litecell15_PrimId_MuteRfReq, "MUTE-RF.req" }, + { Litecell15_PrimId_MuteRfCnf, "MUTE-RF.cnf" }, + { Litecell15_PrimId_SetRxAttenReq, "SET-RX-ATTEN.req" }, + { Litecell15_PrimId_SetRxAttenCnf, "SET-RX-ATTEN-CNF.cnf" }, + { 0, NULL } +}; + +Litecell15_PrimId_t lc15bts_get_sysprim_conf(Litecell15_PrimId_t id) +{ + switch (id) { + case Litecell15_PrimId_SystemInfoReq: return Litecell15_PrimId_SystemInfoCnf; + case Litecell15_PrimId_ActivateRfReq: return Litecell15_PrimId_ActivateRfCnf; + case Litecell15_PrimId_DeactivateRfReq: return Litecell15_PrimId_DeactivateRfCnf; + case Litecell15_PrimId_Layer1ResetReq: return Litecell15_PrimId_Layer1ResetCnf; + case Litecell15_PrimId_SetCalibTblReq: return Litecell15_PrimId_SetCalibTblCnf; + case Litecell15_PrimId_MuteRfReq: return Litecell15_PrimId_MuteRfCnf; + case Litecell15_PrimId_SetRxAttenReq: return Litecell15_PrimId_SetRxAttenCnf; + default: return -1; // Weak + } +} + +const struct value_string lc15bts_l1sapi_names[GsmL1_Sapi_NUM+1] = { + { GsmL1_Sapi_Idle, "IDLE" }, + { GsmL1_Sapi_Fcch, "FCCH" }, + { GsmL1_Sapi_Sch, "SCH" }, + { GsmL1_Sapi_Sacch, "SACCH" }, + { GsmL1_Sapi_Sdcch, "SDCCH" }, + { GsmL1_Sapi_Bcch, "BCCH" }, + { GsmL1_Sapi_Pch, "PCH" }, + { GsmL1_Sapi_Agch, "AGCH" }, + { GsmL1_Sapi_Cbch, "CBCH" }, + { GsmL1_Sapi_Rach, "RACH" }, + { GsmL1_Sapi_TchF, "TCH/F" }, + { GsmL1_Sapi_FacchF, "FACCH/F" }, + { GsmL1_Sapi_TchH, "TCH/H" }, + { GsmL1_Sapi_FacchH, "FACCH/H" }, + { GsmL1_Sapi_Nch, "NCH" }, + { GsmL1_Sapi_Pdtch, "PDTCH" }, + { GsmL1_Sapi_Pacch, "PACCH" }, + { GsmL1_Sapi_Pbcch, "PBCCH" }, + { GsmL1_Sapi_Pagch, "PAGCH" }, + { GsmL1_Sapi_Ppch, "PPCH" }, + { GsmL1_Sapi_Pnch, "PNCH" }, + { GsmL1_Sapi_Ptcch, "PTCCH" }, + { GsmL1_Sapi_Prach, "PRACH" }, + { 0, NULL } +}; + +const struct value_string lc15bts_l1status_names[GSML1_STATUS_NUM+1] = { + { GsmL1_Status_Success, "Success" }, + { GsmL1_Status_Generic, "Generic error" }, + { GsmL1_Status_NoMemory, "Not enough memory" }, + { GsmL1_Status_Timeout, "Timeout" }, + { GsmL1_Status_InvalidParam, "Invalid parameter" }, + { GsmL1_Status_Busy, "Resource busy" }, + { GsmL1_Status_NoRessource, "No more resources" }, + { GsmL1_Status_Uninitialized, "Trying to use uninitialized resource" }, + { GsmL1_Status_NullInterface, "Trying to call a NULL interface" }, + { GsmL1_Status_NullFctnPtr, "Trying to call a NULL function ptr" }, + { GsmL1_Status_BadCrc, "Bad CRC" }, + { GsmL1_Status_BadUsf, "Bad USF" }, + { GsmL1_Status_InvalidCPS, "Invalid CPS field" }, + { GsmL1_Status_UnexpectedBurst, "Unexpected burst" }, + { GsmL1_Status_UnavailCodec, "AMR codec is unavailable" }, + { GsmL1_Status_CriticalError, "Critical error" }, + { GsmL1_Status_OverheatError, "Overheat error" }, + { GsmL1_Status_DeviceError, "Device error" }, + { GsmL1_Status_FacchError, "FACCH / TCH order error" }, + { GsmL1_Status_AlreadyDeactivated, "Lchan already deactivated" }, + { GsmL1_Status_TxBurstFifoOvrn, "FIFO overrun" }, + { GsmL1_Status_TxBurstFifoUndr, "FIFO underrun" }, + { GsmL1_Status_NotSynchronized, "Not synchronized" }, + { GsmL1_Status_Unsupported, "Unsupported feature" }, + { GsmL1_Status_ClockError, "System clock error" }, + { 0, NULL } +}; + +const struct value_string lc15bts_tracef_names[29] = { + { DBG_DEBUG, "DEBUG" }, + { DBG_L1WARNING, "L1_WARNING" }, + { DBG_ERROR, "ERROR" }, + { DBG_L1RXMSG, "L1_RX_MSG" }, + { DBG_L1RXMSGBYTE, "L1_RX_MSG_BYTE" }, + { DBG_L1TXMSG, "L1_TX_MSG" }, + { DBG_L1TXMSGBYTE, "L1_TX_MSG_BYTE" }, + { DBG_MPHCNF, "MPH_CNF" }, + { DBG_MPHIND, "MPH_IND" }, + { DBG_MPHREQ, "MPH_REQ" }, + { DBG_PHIND, "PH_IND" }, + { DBG_PHREQ, "PH_REQ" }, + { DBG_PHYRF, "PHY_RF" }, + { DBG_PHYRFMSGBYTE, "PHY_MSG_BYTE" }, + { DBG_MODE, "MODE" }, + { DBG_TDMAINFO, "TDMA_INFO" }, + { DBG_BADCRC, "BAD_CRC" }, + { DBG_PHINDBYTE, "PH_IND_BYTE" }, + { DBG_PHREQBYTE, "PH_REQ_BYTE" }, + { DBG_DEVICEMSG, "DEVICE_MSG" }, + { DBG_RACHINFO, "RACH_INFO" }, + { DBG_LOGCHINFO, "LOG_CH_INFO" }, + { DBG_MEMORY, "MEMORY" }, + { DBG_PROFILING, "PROFILING" }, + { DBG_TESTCOMMENT, "TEST_COMMENT" }, + { DBG_TEST, "TEST" }, + { DBG_STATUS, "STATUS" }, + { 0, NULL } +}; + +const struct value_string lc15bts_tracef_docs[29] = { + { DBG_DEBUG, "Debug Region" }, + { DBG_L1WARNING, "L1 Warning Region" }, + { DBG_ERROR, "Error Region" }, + { DBG_L1RXMSG, "L1_RX_MSG Region" }, + { DBG_L1RXMSGBYTE, "L1_RX_MSG_BYTE Region" }, + { DBG_L1TXMSG, "L1_TX_MSG Region" }, + { DBG_L1TXMSGBYTE, "L1_TX_MSG_BYTE Region" }, + { DBG_MPHCNF, "MphConfirmation Region" }, + { DBG_MPHIND, "MphIndication Region" }, + { DBG_MPHREQ, "MphRequest Region" }, + { DBG_PHIND, "PhIndication Region" }, + { DBG_PHREQ, "PhRequest Region" }, + { DBG_PHYRF, "PhyRF Region" }, + { DBG_PHYRFMSGBYTE, "PhyRF Message Region" }, + { DBG_MODE, "Mode Region" }, + { DBG_TDMAINFO, "TDMA Info Region" }, + { DBG_BADCRC, "Bad CRC Region" }, + { DBG_PHINDBYTE, "PH_IND_BYTE" }, + { DBG_PHREQBYTE, "PH_REQ_BYTE" }, + { DBG_DEVICEMSG, "Device Message Region" }, + { DBG_RACHINFO, "RACH Info" }, + { DBG_LOGCHINFO, "LOG_CH_INFO" }, + { DBG_MEMORY, "Memory Region" }, + { DBG_PROFILING, "Profiling Region" }, + { DBG_TESTCOMMENT, "Test Comments" }, + { DBG_TEST, "Test Region" }, + { DBG_STATUS, "Status Region" }, + { 0, NULL } +}; + +const struct value_string lc15bts_tch_pl_names[] = { + { GsmL1_TchPlType_NA, "N/A" }, + { GsmL1_TchPlType_Fr, "FR" }, + { GsmL1_TchPlType_Hr, "HR" }, + { GsmL1_TchPlType_Efr, "EFR" }, + { GsmL1_TchPlType_Amr, "AMR(IF2)" }, + { GsmL1_TchPlType_Amr_SidBad, "AMR(SID BAD)" }, + { GsmL1_TchPlType_Amr_Onset, "AMR(ONSET)" }, + { GsmL1_TchPlType_Amr_Ratscch, "AMR(RATSCCH)" }, + { GsmL1_TchPlType_Amr_SidUpdateInH, "AMR(SID_UPDATE INH)" }, + { GsmL1_TchPlType_Amr_SidFirstP1, "AMR(SID_FIRST P1)" }, + { GsmL1_TchPlType_Amr_SidFirstP2, "AMR(SID_FIRST P2)" }, + { GsmL1_TchPlType_Amr_SidFirstInH, "AMR(SID_FIRST INH)" }, + { GsmL1_TchPlType_Amr_RatscchMarker, "AMR(RATSCCH MARK)" }, + { GsmL1_TchPlType_Amr_RatscchData, "AMR(RATSCCH DATA)" }, + { 0, NULL } +}; + +const struct value_string lc15bts_dir_names[] = { + { GsmL1_Dir_TxDownlink, "TxDL" }, + { GsmL1_Dir_TxUplink, "TxUL" }, + { GsmL1_Dir_RxUplink, "RxUL" }, + { GsmL1_Dir_RxDownlink, "RxDL" }, + { GsmL1_Dir_TxDownlink|GsmL1_Dir_RxUplink, "BOTH" }, + { 0, NULL } +}; + +const struct value_string lc15bts_chcomb_names[] = { + { GsmL1_LogChComb_0, "dummy" }, + { GsmL1_LogChComb_I, "tch_f" }, + { GsmL1_LogChComb_II, "tch_h" }, + { GsmL1_LogChComb_IV, "ccch" }, + { GsmL1_LogChComb_V, "ccch_sdcch4" }, + { GsmL1_LogChComb_VII, "sdcch8" }, + { GsmL1_LogChComb_XIII, "pdtch" }, + { 0, NULL } +}; + +const uint8_t pdch_msu_size[_NUM_PDCH_CS] = { + [PDCH_CS_1] = 23, + [PDCH_CS_2] = 34, + [PDCH_CS_3] = 40, + [PDCH_CS_4] = 54, + [PDCH_MCS_1] = 27, + [PDCH_MCS_2] = 33, + [PDCH_MCS_3] = 42, + [PDCH_MCS_4] = 49, + [PDCH_MCS_5] = 60, + [PDCH_MCS_6] = 78, + [PDCH_MCS_7] = 118, + [PDCH_MCS_8] = 142, + [PDCH_MCS_9] = 154 +}; diff --git a/src/osmo-bts-litecell15/lc15bts.h b/src/osmo-bts-litecell15/lc15bts.h new file mode 100644 index 0000000..4c40db0 --- /dev/null +++ b/src/osmo-bts-litecell15/lc15bts.h @@ -0,0 +1,64 @@ +#ifndef LC15BTS_H +#define LC15BTS_H + +#include +#include + +#include +#include + +/* + * Depending on the firmware version either GsmL1_Prim_t or Litecell15_Prim_t + * is the bigger struct. For earlier firmware versions the GsmL1_Prim_t was the + * bigger struct. + */ +#define LC15BTS_PRIM_SIZE \ + (OSMO_MAX(sizeof(Litecell15_Prim_t), sizeof(GsmL1_Prim_t)) + 128) + +enum l1prim_type { + L1P_T_INVALID, /* this must be 0 to detect uninitialized elements */ + L1P_T_REQ, + L1P_T_CONF, + L1P_T_IND, +}; + +enum l1prim_type lc15bts_get_l1prim_type(GsmL1_PrimId_t id); +const struct value_string lc15bts_l1prim_names[GsmL1_PrimId_NUM+1]; +GsmL1_PrimId_t lc15bts_get_l1prim_conf(GsmL1_PrimId_t id); + +enum l1prim_type lc15bts_get_sysprim_type(Litecell15_PrimId_t id); +const struct value_string lc15bts_sysprim_names[Litecell15_PrimId_NUM+1]; +Litecell15_PrimId_t lc15bts_get_sysprim_conf(Litecell15_PrimId_t id); + +const struct value_string lc15bts_l1sapi_names[GsmL1_Sapi_NUM+1]; +const struct value_string lc15bts_l1status_names[GSML1_STATUS_NUM+1]; + +const struct value_string lc15bts_tracef_names[29]; +const struct value_string lc15bts_tracef_docs[29]; + +const struct value_string lc15bts_tch_pl_names[15]; + +const struct value_string lc15bts_clksrc_names[10]; + +const struct value_string lc15bts_dir_names[6]; + +enum pdch_cs { + PDCH_CS_1, + PDCH_CS_2, + PDCH_CS_3, + PDCH_CS_4, + PDCH_MCS_1, + PDCH_MCS_2, + PDCH_MCS_3, + PDCH_MCS_4, + PDCH_MCS_5, + PDCH_MCS_6, + PDCH_MCS_7, + PDCH_MCS_8, + PDCH_MCS_9, + _NUM_PDCH_CS +}; + +const uint8_t pdch_msu_size[_NUM_PDCH_CS]; + +#endif /* LC15BTS_H */ -- To view, visit https://gerrit.osmocom.org/61 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib1287375cb10a889625bbac8528fa60deed23a2b Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Thu May 19 09:54:40 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 19 May 2016 09:54:40 +0000 Subject: openbsc[master]: bsc: Create minimal SI6 rest octets In-Reply-To: References: Message-ID: Patch Set 1: (3 comments) https://gerrit.osmocom.org/#/c/71/1/openbsc/include/openbsc/rest_octets.h File openbsc/include/openbsc/rest_octets.h: Line 15: int rest_octets_si6(uint8_t *data, int is1800_net); I would prefer bool unless is1800_net can potentially take something else besides 0 and 1 but that's matter of taste of course. https://gerrit.osmocom.org/#/c/71/1/openbsc/src/libbsc/rest_octets.c File openbsc/src/libbsc/rest_octets.c: Line 453: I would prefer 3GPP TS 44.018 for new code - it's newer and already referred to in this file. Line 487: bitvec_spare_padding() accept up_to_bit as a 2nd argument so it's better to put last bit in there: bitvec_spare_padding(&bv, (bv.data_len * 8) - 1); This way we don't have to change it while extending rest octets in future. -- To view, visit https://gerrit.osmocom.org/71 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I417a40eb91f42a3416b4e07bb9fb4d7a01aaa36b Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: Yes From nhofmeyr at sysmocom.de Thu May 19 12:27:05 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Thu, 19 May 2016 14:27:05 +0200 Subject: Gerrit mails, from address, verbosity, etc In-Reply-To: <20160517094225.GC5414@nataraja> References: <44F3A00E-2E73-40E9-80F2-09D0B7CBC4A8@freyther.de> <573ACFE2.80104@sysmocom.de> <20160517094225.GC5414@nataraja> Message-ID: <20160519122705.GA2134@dub6> On Tue, May 17, 2016 at 11:42:25AM +0200, Harald Welte wrote: > I would thus be in favor of having the following on the main mailing > list: > > > > new_changes Somebody created a new change > > > new_patchsets Somebody updated/added a patch(set) to a change > > and not have those: > > > > all_comments Somebody but jenkins commented > > > submitted_changes Somebody has pushed the submit button and it is in > > > abandoned_changes Somebody gave up on the change Maybe we can have a verbose mailing list with all notifications, and only the sparse new_* notifications copied to the main mailing list? :/ I see a conflict though: when we go on to use the gerrit inline commenting infrastructure, and others comment on patches on the main ML, we have comments in several "places" with possible parallel conversations and mixups. So IMHO unless we copy the gerrit commenting to the ML, we should actually completely drop gerrit commenting and only use email for that. I would like to read comments without having to navigate the gerrit system -- whatever that means in terms of what we use. gerrit has features that patchwork doesn't, but I don't exactly burst out in cheers about it ;) What actually is the workflow for Jane Doe sending a [PATCH] email to e.g. openbsc@? Do we ask Ms. Doe to create a gerrit account and re-submit? Does a core dev have to proxy it to gerrit for her? Re Holger, about the +0 -0 feature in the subjects: completely not important, a constant string indicating a comment and/or vote nature would be plenty. ~Neels -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From gerrit-no-reply at lists.osmocom.org Thu May 19 14:29:11 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Thu, 19 May 2016 14:29:11 +0000 Subject: [PATCH] osmo-pcu[master]: move statistics counter rlc_sent() to gprs_rlcmac_sched Message-ID: Review at https://gerrit.osmocom.org/84 move statistics counter rlc_sent() to gprs_rlcmac_sched The counter rlc_sent has nothing to do with the TBF. The RLC packet got sent in the gprs_rlcmac_sched(). Change-Id: I5d2b910ea7cc250f17530406eda3be9b29b051fd --- M src/gprs_rlcmac_sched.cpp M src/tbf_dl.cpp 2 files changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/84/84/1 diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index 313e23f..8e05623 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -341,8 +341,11 @@ dl_ass_tbf, ul_ack_tbf); /* Prio 2: select data message for downlink */ - if (!msg) + if (!msg) { msg = sched_select_downlink(bts, trx, ts, fn, block_nr, pdch); + if (msg) + bts->bts->rlc_sent(); + } /* Prio 3: send dummy contol message */ if (!msg) diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 9e4d078..62d378f 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -762,8 +762,6 @@ /* Increment TX-counter */ m_tx_counter++; - bts->rlc_sent(); - return dl_msg; } -- To view, visit https://gerrit.osmocom.org/84 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5d2b910ea7cc250f17530406eda3be9b29b051fd Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Thu May 19 14:29:11 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Thu, 19 May 2016 14:29:11 +0000 Subject: [PATCH] osmo-pcu[master]: introduce new counter rlc_sent_dummy Message-ID: Review at https://gerrit.osmocom.org/85 introduce new counter rlc_sent_dummy rlc_sent_dummy count the amount of dummy package which are sent in case no data packet is in the queue. Change-Id: Ia60eab853d9145980f30d63e4ce4b520b8c51381 --- M src/bts.cpp M src/bts.h M src/gprs_rlcmac_sched.cpp 3 files changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/85/85/1 diff --git a/src/bts.cpp b/src/bts.cpp index ccc433b..a8b27bd 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -71,6 +71,7 @@ { "rlc.ack.failed", "RLC Ack Failed" }, { "rlc.rel.timedout", "RLC Release Timeout" }, { "rlc.late-block", "RLC Late Block" }, + { "rlc.sent_dummy", "RLC Send Dummy" }, { "decode.errors", "Decode Errors" }, { "sba.allocated", "SBA Allocated" }, { "sba.freed", "SBA Freed" }, diff --git a/src/bts.h b/src/bts.h index c975304..829e3c2 100644 --- a/src/bts.h +++ b/src/bts.h @@ -233,6 +233,7 @@ CTR_RLC_ACK_FAILED, CTR_RLC_REL_TIMEDOUT, CTR_RLC_LATE_BLOCK, + CTR_RLC_SENT_DUMMY, CTR_DECODE_ERRORS, CTR_SBA_ALLOCATED, CTR_SBA_FREED, @@ -309,6 +310,7 @@ void rlc_ack_failed(); void rlc_rel_timedout(); void rlc_late_block(); + void rlc_sent_dummy(); void decode_error(); void sba_allocated(); void sba_freed(); @@ -449,6 +451,7 @@ CREATE_COUNT_INLINE(rlc_ack_failed, CTR_RLC_ACK_FAILED); CREATE_COUNT_INLINE(rlc_rel_timedout, CTR_RLC_REL_TIMEDOUT); CREATE_COUNT_INLINE(rlc_late_block, CTR_RLC_LATE_BLOCK); +CREATE_COUNT_INLINE(rlc_sent_dummy, CTR_RLC_SENT_DUMMY); CREATE_COUNT_INLINE(decode_error, CTR_DECODE_ERRORS) CREATE_COUNT_INLINE(sba_allocated, CTR_SBA_ALLOCATED) CREATE_COUNT_INLINE(sba_freed, CTR_SBA_FREED) diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index 8e05623..087c03c 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -348,8 +348,12 @@ } /* Prio 3: send dummy contol message */ - if (!msg) + if (!msg) { + /* increase counter */ msg = sched_dummy(); + if (msg) + bts->bts->rlc_sent_dummy(); + } if (!msg) return -ENOMEM; -- To view, visit https://gerrit.osmocom.org/85 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia60eab853d9145980f30d63e4ce4b520b8c51381 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Fri May 20 08:42:30 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Fri, 20 May 2016 08:42:30 +0000 Subject: openbsc[master]: Use proper measurement for handover In-Reply-To: References: Message-ID: Patch Set 1: Note: this is about downlink measurements so until downlink DTX is implemented HO works as before (I've tested that). -- To view, visit https://gerrit.osmocom.org/66 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I95e8e544047a83a256e057a47458678f40a19a15 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri May 20 15:11:10 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Fri, 20 May 2016 15:11:10 +0000 Subject: [PATCH] libosmocore[master]: gsm48: move to hex TMSI representation In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/57 to look at the new patch set (#2). gsm48: move to hex TMSI representation Previously, we traditionally displayed a TMSI in its integer representation, which is quite unusual in the telecom world. A TMSI is normally printed as a series of 8 hex digits. Review at https://gerrit.osmocom.org/57/ Change-Id: Ifd25365bfa3b4ee95b16979740c3229948ce17f2 --- M src/gsm/gsm48.c 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/57/57/2 diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index 8a46f76..d0e050b 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -458,11 +458,10 @@ case GSM_MI_TYPE_NONE: break; case GSM_MI_TYPE_TMSI: - /* Table 10.5.4.3, reverse generate_mid_from_tmsi */ if (mi_len == GSM48_TMSI_LEN && mi[0] == (0xf0 | GSM_MI_TYPE_TMSI)) { memcpy(&tmsi, &mi[1], 4); tmsi = ntohl(tmsi); - return snprintf(string, str_len, "%u", tmsi); + return snprintf(string, str_len, "0x%08X", tmsi); } break; case GSM_MI_TYPE_IMSI: -- To view, visit https://gerrit.osmocom.org/57 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ifd25365bfa3b4ee95b16979740c3229948ce17f2 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Fri May 20 15:44:38 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 20 May 2016 15:44:38 +0000 Subject: libosmocore[master]: gsm48: move to hex TMSI representation In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/57 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifd25365bfa3b4ee95b16979740c3229948ce17f2 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri May 20 15:45:17 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 20 May 2016 15:45:17 +0000 Subject: openbsc[master]: Use proper measurement for handover In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/66 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I95e8e544047a83a256e057a47458678f40a19a15 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri May 20 15:47:07 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 20 May 2016 15:47:07 +0000 Subject: osmo-pcu[master]: bts/counter: remove trailing white spaces from descriptions In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 ok, then let's postpone this until a change has been made to the code that actually prints those counters. That change, together with this change will then clean up the code and cancel their effects in terms of formatting -- To view, visit https://gerrit.osmocom.org/67 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id852f3671d76a32df903f7a936b348b0d856d9c2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri May 20 15:47:26 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Fri, 20 May 2016 15:47:26 +0000 Subject: osmo-pcu[master]: Add support for NuRAN Wireless Litecell 1.5 BTS In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/61 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib1287375cb10a889625bbac8528fa60deed23a2b Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri May 20 16:24:00 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 20 May 2016 16:24:00 +0000 Subject: osmo-pcu[master]: bts/counter: remove trailing white spaces from descriptions In-Reply-To: References: Message-ID: Patch Set 2: I have verified that the missing spaces makes the layout look "worse". Osmo-PCU> show stats Ungrouped counters: BTS Statistics: TBF DL Allocated: 0 (0/s 0/m 0/h 0/d) TBF DL Freed: 0 (0/s 0/m 0/h 0/d) TBF DL Aborted: 0 (0/s 0/m 0/h 0/d) TBF UL Allocated: 0 (0/s 0/m 0/h 0/d) TBF UL Freed: 0 (0/s 0/m 0/h 0/d) TBF UL Aborted: 0 (0/s 0/m 0/h 0/d) TBF Reused: 0 (0/s 0/m 0/h 0/d) TBF Alloc Algo A: 0 (0/s 0/m 0/h 0/d) TBF Alloc Algo B: 0 (0/s 0/m 0/h 0/d) TBF Failed EGPRS-only: 0 (0/s 0/m 0/h 0/d) RLC Sent: 0 (0/s 0/m 0/h 0/d) RLC Resent: 0 (0/s 0/m 0/h 0/d) RLC Restarted: 0 (0/s 0/m 0/h 0/d) RLC Stalled: 0 (0/s 0/m 0/h 0/d) RLC Nacked: 0 (0/s 0/m 0/h 0/d) RLC Assign Timeout: 0 (0/s 0/m 0/h 0/d) RLC Assign Failed: 0 (0/s 0/m 0/h 0/d) RLC Ack Timeout: 0 (0/s 0/m 0/h 0/d) RLC Ack Failed: 0 (0/s 0/m 0/h 0/d) RLC Release Timeout: 0 (0/s 0/m 0/h 0/d) RLC Late Block: 0 (0/s 0/m 0/h 0/d) Decode Errors: 0 (0/s 0/m 0/h 0/d) SBA Allocated: 0 (0/s 0/m 0/h 0/d) SBA Freed: 0 (0/s 0/m 0/h 0/d) SBA Timeout: 0 (0/s 0/m 0/h 0/d) Timedout Frames: 0 (0/s 0/m 0/h 0/d) Dropped Frames: 0 (0/s 0/m 0/h 0/d) Scheduled Frames: 0 (0/s 0/m 0/h 0/d) RACH requests: 0 (0/s 0/m 0/h 0/d) BTS Statistics: MS Present: 0 -- To view, visit https://gerrit.osmocom.org/67 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id852f3671d76a32df903f7a936b348b0d856d9c2 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri May 20 16:26:18 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 20 May 2016 16:26:18 +0000 Subject: osmo-pcu[master]: Add support for NuRAN Wireless Litecell 1.5 BTS In-Reply-To: References: Message-ID: Patch Set 3: Max, can you look at extending the /contrib/jenkins.sh to build for this platform too? -- To view, visit https://gerrit.osmocom.org/61 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib1287375cb10a889625bbac8528fa60deed23a2b Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri May 20 16:26:20 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 20 May 2016 16:26:20 +0000 Subject: [MERGED] osmo-pcu[master]: Add support for NuRAN Wireless Litecell 1.5 BTS In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: Add support for NuRAN Wireless Litecell 1.5 BTS ...................................................................... Add support for NuRAN Wireless Litecell 1.5 BTS Layer 1 compatibility with previous generation or NuRan GSM product, therefore the support for the Litecell 1.5 uses its own sources instead of using tons of ifdef/endif. Max's amendments: * make headers path configurable * use configured TRX instead of hardcoded value * split subdir-objects into separate commit * cosmetic changes Change-Id: Ib1287375cb10a889625bbac8528fa60deed23a2b Fixes: SYS#2443 Reviewed-on: https://gerrit.osmocom.org/61 Tested-by: Jenkins Builder Reviewed-by: Harald Welte --- M configure.ac M src/Makefile.am A src/osmo-bts-litecell15/lc15_l1_hw.c A src/osmo-bts-litecell15/lc15_l1_if.c A src/osmo-bts-litecell15/lc15_l1_if.h A src/osmo-bts-litecell15/lc15bts.c A src/osmo-bts-litecell15/lc15bts.h 7 files changed, 1,166 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/configure.ac b/configure.ac index 5274022..d8fe719 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,25 @@ AC_MSG_RESULT([$enable_sysmocom_dsp]) AM_CONDITIONAL(ENABLE_SYSMODSP, test "x$enable_sysmocom_dsp" = "xyes") +AC_MSG_CHECKING([whether to enable direct PHY access for PDCH of NuRAN Wireless Litecell 1.5 BTS]) +AC_ARG_ENABLE(lc15bts-phy, + AC_HELP_STRING([--enable-lc15bts-phy], + [enable code for Litecell 1.5 PHY [default=no]]), + [enable_lc15bts_phy="$enableval"],[enable_lc15bts_phy="no"]) +AC_ARG_WITH([litecell15], [AS_HELP_STRING([--with-litecell15=INCLUDE_DIR], [Location of the litecell 1.5 API header files])], + [litecell15_incdir="$withval"],[litecell15_incdir="$incdir"]) +AC_SUBST([LITECELL15_INCDIR], $litecell15_incdir) +AC_MSG_RESULT([$enable_lc15bts_phy]) +AM_CONDITIONAL(ENABLE_LC15BTS_PHY, test "x$enable_lc15bts_phy" = "xyes") +if test "$enable_litecell15" = "yes"; then + oldCPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -I$LITECELL15_INCDIR -I$srcdir/include $LIBOSMOCORE_CFLAGS" + AC_CHECK_HEADER([nrw/litecell15/litecell15.h],[], + [AC_MSG_ERROR([nrw/litecell15/litecell15.h can not be found in $litecell15_incdir])], + [#include ]) + CPPFLAGS=$oldCPPFLAGS +fi + AC_ARG_ENABLE([vty_tests], AC_HELP_STRING([--enable-vty-tests], [Include the VTY tests in make check [default=no]]), diff --git a/src/Makefile.am b/src/Makefile.am index e08ba07..9bdec2f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -25,6 +25,10 @@ AM_CPPFLAGS += -DENABLE_DIRECT_PHY endif +if ENABLE_LC15BTS_PHY +AM_CPPFLAGS += -DENABLE_DIRECT_PHY +endif + AM_CXXFLAGS = -Wall -ldl -pthread AM_LDFLAGS = -lrt @@ -130,6 +134,26 @@ $(COMMON_LA) endif +if ENABLE_LC15BTS_PHY +AM_CPPFLAGS += -I$(LITECELL15_INCDIR) -I$(srcdir)/osmo-bts-litecell15 + +EXTRA_DIST = \ + osmo-bts-litecell15/lc15_l1_if.c \ + osmo-bts-litecell15/lc15_l1_if.h \ + osmo-bts-litecell15/lc15_l1_hw.c \ + osmo-bts-litecell15/lc15bts.c \ + osmo-bts-litecell15/lc15bts.h + +noinst_HEADERS += \ + osmo-bts-litecell15/lc15_l1_if.h \ + osmo-bts-litecell15/lc15bts.h + +osmo_pcu_SOURCES += \ + osmo-bts-litecell15/lc15_l1_if.c \ + osmo-bts-litecell15/lc15_l1_hw.c \ + osmo-bts-litecell15/lc15bts.c +endif + osmo_pcu_LDADD = \ libgprs.la \ $(LIBOSMOGB_LIBS) \ diff --git a/src/osmo-bts-litecell15/lc15_l1_hw.c b/src/osmo-bts-litecell15/lc15_l1_hw.c new file mode 100644 index 0000000..051dc5c --- /dev/null +++ b/src/osmo-bts-litecell15/lc15_l1_hw.c @@ -0,0 +1,213 @@ +/* Interface handler for Nuran Wireless Litecell 1.5 L1 (real hardware) */ + +/* Copyright (C) 2015 by Yves Godin + * based on: + * femto_l1_hw.c + * (C) 2011 by Harald Welte + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "gprs_debug.h" +#include "lc15bts.h" +#include "lc15_l1_if.h" + +#define DEV_SYS_DSP2ARM_NAME "/dev/msgq/litecell15_dsp2arm_trx" +#define DEV_SYS_ARM2DSP_NAME "/dev/msgq/litecell15_arm2dsp_trx" +#define DEV_L1_DSP2ARM_NAME "/dev/msgq/gsml1_sig_dsp2arm_trx" +#define DEV_L1_ARM2DSP_NAME "/dev/msgq/gsml1_sig_arm2dsp_trx" + +#define DEV_TCH_DSP2ARM_NAME "/dev/msgq/gsml1_tch_dsp2arm_trx" +#define DEV_TCH_ARM2DSP_NAME "/dev/msgq/gsml1_tch_arm2dsp_trx" +#define DEV_PDTCH_DSP2ARM_NAME "/dev/msgq/gsml1_pdtch_dsp2arm_trx" +#define DEV_PDTCH_ARM2DSP_NAME "/dev/msgq/gsml1_pdtch_arm2dsp_trx" + +static const char *rd_devnames[] = { + [MQ_SYS_READ] = DEV_SYS_DSP2ARM_NAME, + [MQ_L1_READ] = DEV_L1_DSP2ARM_NAME, + [MQ_TCH_READ] = DEV_TCH_DSP2ARM_NAME, + [MQ_PDTCH_READ] = DEV_PDTCH_DSP2ARM_NAME, +}; + +static const char *wr_devnames[] = { + [MQ_SYS_WRITE] = DEV_SYS_ARM2DSP_NAME, + [MQ_L1_WRITE] = DEV_L1_ARM2DSP_NAME, + [MQ_TCH_WRITE] = DEV_TCH_ARM2DSP_NAME, + [MQ_PDTCH_WRITE]= DEV_PDTCH_ARM2DSP_NAME, +}; + +/* callback when there's something to read from the l1 msg_queue */ +static int l1if_fd_cb(struct osmo_fd *ofd, unsigned int what) +{ + //struct msgb *msg = l1p_msgb_alloc(); + struct msgb *msg = msgb_alloc_headroom(sizeof(Litecell15_Prim_t) + 128, + 128, "1l_fd"); + struct lc15l1_hdl *fl1h = ofd->data; + int rc; + + msg->l1h = msg->data; + rc = read(ofd->fd, msg->l1h, msgb_tailroom(msg)); + if (rc < 0) { + if (rc != -1) + LOGP(DL1IF, LOGL_ERROR, "error reading from L1 msg_queue: %s\n", + strerror(errno)); + msgb_free(msg); + return rc; + } + msgb_put(msg, rc); + + switch (ofd->priv_nr) { + case MQ_SYS_WRITE: + if (rc != sizeof(Litecell15_Prim_t)) + LOGP(DL1IF, LOGL_NOTICE, "%u != " + "sizeof(Litecell15_Prim_t)\n", rc); + return l1if_handle_sysprim(fl1h, msg); + case MQ_L1_WRITE: + case MQ_TCH_WRITE: + case MQ_PDTCH_WRITE: + if (rc != sizeof(GsmL1_Prim_t)) + LOGP(DL1IF, LOGL_NOTICE, "%u != " + "sizeof(GsmL1_Prim_t)\n", rc); + return l1if_handle_l1prim(ofd->priv_nr, fl1h, msg); + default: + /* The compiler can't know that priv_nr is an enum. Assist. */ + LOGP(DL1IF, LOGL_FATAL, "writing on a wrong queue: %d\n", + ofd->priv_nr); + exit(0); + break; + } +}; + +/* callback when we can write to one of the l1 msg_queue devices */ +static int l1fd_write_cb(struct osmo_fd *ofd, struct msgb *msg) +{ + int rc; + + rc = write(ofd->fd, msg->l1h, msgb_l1len(msg)); + if (rc < 0) { + LOGP(DL1IF, LOGL_ERROR, "error writing to L1 msg_queue: %s\n", + strerror(errno)); + return rc; + } else if (rc < msg->len) { + LOGP(DL1IF, LOGL_ERROR, "short write to L1 msg_queue: " + "%u < %u\n", rc, msg->len); + return -EIO; + } + + return 0; +} + +int l1if_transport_open(int q, struct lc15l1_hdl *hdl) +{ + int rc; + char buf[PATH_MAX]; + + /* Step 1: Open all msg_queue file descriptors */ + struct osmo_fd *read_ofd = &hdl->read_ofd[q]; + struct osmo_wqueue *wq = &hdl->write_q[q]; + struct osmo_fd *write_ofd = &hdl->write_q[q].bfd; + + snprintf(buf, sizeof(buf)-1, "%s%d", rd_devnames[q], hdl->hw_info.trx_nr); + buf[sizeof(buf)-1] = '\0'; + + rc = open(buf, O_RDONLY); + if (rc < 0) { + LOGP(DL1IF, LOGL_FATAL, "unable to open msg_queue %s: %s\n", + buf, strerror(errno)); + return rc; + } + read_ofd->fd = rc; + read_ofd->priv_nr = q; + read_ofd->data = hdl; + read_ofd->cb = l1if_fd_cb; + read_ofd->when = BSC_FD_READ; + rc = osmo_fd_register(read_ofd); + if (rc < 0) { + close(read_ofd->fd); + read_ofd->fd = -1; + return rc; + } + + snprintf(buf, sizeof(buf)-1, "%s%d", wr_devnames[q], hdl->hw_info.trx_nr); + buf[sizeof(buf)-1] = '\0'; + + rc = open(buf, O_WRONLY); + if (rc < 0) { + LOGP(DL1IF, LOGL_FATAL, "unable to open msg_queue %s: %s\n", + buf, strerror(errno)); + goto out_read; + } + osmo_wqueue_init(wq, 10); + wq->write_cb = l1fd_write_cb; + write_ofd->fd = rc; + write_ofd->priv_nr = q; + write_ofd->data = hdl; + write_ofd->when = BSC_FD_WRITE; + rc = osmo_fd_register(write_ofd); + if (rc < 0) { + close(write_ofd->fd); + write_ofd->fd = -1; + goto out_read; + } + + return 0; + +out_read: + close(hdl->read_ofd[q].fd); + osmo_fd_unregister(&hdl->read_ofd[q]); + + return rc; +} + +int l1if_transport_close(int q, struct lc15l1_hdl *hdl) +{ + struct osmo_fd *read_ofd = &hdl->read_ofd[q]; + struct osmo_fd *write_ofd = &hdl->write_q[q].bfd; + + osmo_fd_unregister(read_ofd); + close(read_ofd->fd); + read_ofd->fd = -1; + + osmo_fd_unregister(write_ofd); + close(write_ofd->fd); + write_ofd->fd = -1; + + return 0; +} diff --git a/src/osmo-bts-litecell15/lc15_l1_if.c b/src/osmo-bts-litecell15/lc15_l1_if.c new file mode 100644 index 0000000..2cda5b8 --- /dev/null +++ b/src/osmo-bts-litecell15/lc15_l1_if.c @@ -0,0 +1,410 @@ +/* Copyright (C) 2015 by Yves Godin + * based on: + * femto_l1_if.c + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +extern void *tall_pcu_ctx; + +uint32_t l1if_ts_to_hLayer2(uint8_t trx, uint8_t ts) +{ + return (ts << 16) | (trx << 24); +} + +/* allocate a msgb containing a GsmL1_Prim_t */ +struct msgb *l1p_msgb_alloc(void) +{ + struct msgb *msg = msgb_alloc(sizeof(GsmL1_Prim_t), "l1_prim"); + + if (msg) + msg->l1h = msgb_put(msg, sizeof(GsmL1_Prim_t)); + + return msg; +} + +static int l1if_req_pdch(struct lc15l1_hdl *fl1h, struct msgb *msg) +{ + struct osmo_wqueue *wqueue = &fl1h->write_q[MQ_PDTCH_WRITE]; + + if (osmo_wqueue_enqueue(wqueue, msg) != 0) { + LOGP(DL1IF, LOGL_ERROR, "PDTCH queue full. dropping message.\n"); + msgb_free(msg); + } + + return 0; +} + +static void *prim_init(GsmL1_Prim_t *prim, GsmL1_PrimId_t id, struct lc15l1_hdl *gl1) +{ + prim->id = id; + + switch (id) { + case GsmL1_PrimId_MphInitReq: + //prim->u.mphInitReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphCloseReq: + prim->u.mphCloseReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphConnectReq: + prim->u.mphConnectReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphDisconnectReq: + prim->u.mphDisconnectReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphActivateReq: + prim->u.mphActivateReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphDeactivateReq: + prim->u.mphDeactivateReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphConfigReq: + prim->u.mphConfigReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphMeasureReq: + prim->u.mphMeasureReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_MphInitCnf: + case GsmL1_PrimId_MphCloseCnf: + case GsmL1_PrimId_MphConnectCnf: + case GsmL1_PrimId_MphDisconnectCnf: + case GsmL1_PrimId_MphActivateCnf: + case GsmL1_PrimId_MphDeactivateCnf: + case GsmL1_PrimId_MphConfigCnf: + case GsmL1_PrimId_MphMeasureCnf: + break; + case GsmL1_PrimId_MphTimeInd: + break; + case GsmL1_PrimId_MphSyncInd: + break; + case GsmL1_PrimId_PhEmptyFrameReq: + prim->u.phEmptyFrameReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_PhDataReq: + prim->u.phDataReq.hLayer1 = (HANDLE)gl1->hLayer1; + break; + case GsmL1_PrimId_PhConnectInd: + break; + case GsmL1_PrimId_PhReadyToSendInd: + break; + case GsmL1_PrimId_PhDataInd: + break; + case GsmL1_PrimId_PhRaInd: + break; + default: + LOGP(DL1IF, LOGL_ERROR, "unknown L1 primitive %u\n", id); + break; + } + return &prim->u; +} + +struct sapi_dir { + GsmL1_Sapi_t sapi; + GsmL1_Dir_t dir; +}; + +static const struct sapi_dir pdtch_sapis[] = { + { GsmL1_Sapi_Pdtch, GsmL1_Dir_TxDownlink }, + { GsmL1_Sapi_Pdtch, GsmL1_Dir_RxUplink }, + { GsmL1_Sapi_Ptcch, GsmL1_Dir_TxDownlink }, + { GsmL1_Sapi_Prach, GsmL1_Dir_RxUplink }, +#if 0 + { GsmL1_Sapi_Ptcch, GsmL1_Dir_RxUplink }, + { GsmL1_Sapi_Pacch, GsmL1_Dir_TxDownlink }, +#endif +}; + + +/* connect PDTCH */ +int l1if_connect_pdch(void *obj, uint8_t ts) +{ + struct lc15l1_hdl *fl1h = obj; + struct msgb *msg = l1p_msgb_alloc(); + GsmL1_MphConnectReq_t *cr; + + cr = prim_init(msgb_l1prim(msg), GsmL1_PrimId_MphConnectReq, fl1h); + cr->u8Tn = ts; + cr->logChComb = GsmL1_LogChComb_XIII; + + return l1if_req_pdch(fl1h, msg); +} + +static int handle_ph_readytosend_ind(struct lc15l1_hdl *fl1h, + GsmL1_PhReadyToSendInd_t *rts_ind) +{ + struct gsm_time g_time; + int rc = 0; + + gsm_fn2gsmtime(&g_time, rts_ind->u32Fn); + + DEBUGP(DL1IF, "Rx PH-RTS.ind %02u/%02u/%02u SAPI=%s\n", + g_time.t1, g_time.t2, g_time.t3, + get_value_string(lc15bts_l1sapi_names, rts_ind->sapi)); + + switch (rts_ind->sapi) { + case GsmL1_Sapi_Pdtch: + case GsmL1_Sapi_Pacch: + rc = pcu_rx_rts_req_pdtch(fl1h->trx_no, rts_ind->u8Tn, + rts_ind->u16Arfcn, rts_ind->u32Fn, rts_ind->u8BlockNbr); + case GsmL1_Sapi_Ptcch: + // FIXME + default: + break; + } + + return rc; +} + +static void get_meas(struct pcu_l1_meas *meas, const GsmL1_MeasParam_t *l1_meas) +{ + meas->rssi = (int8_t) (l1_meas->fRssi); + meas->have_rssi = 1; + meas->ber = (uint8_t) (l1_meas->fBer * 100); + meas->have_ber = 1; + meas->bto = (int16_t) (l1_meas->i16BurstTiming); + meas->have_bto = 1; + meas->link_qual = (int16_t) (l1_meas->fLinkQuality); + meas->have_link_qual = 1; +} + +static int handle_ph_data_ind(struct lc15l1_hdl *fl1h, + GsmL1_PhDataInd_t *data_ind, struct msgb *l1p_msg) +{ + int rc = 0; + struct pcu_l1_meas meas = {0}; + + DEBUGP(DL1IF, "Rx PH-DATA.ind %s (hL2 %08x): %s\n", + get_value_string(lc15bts_l1sapi_names, data_ind->sapi), + data_ind->hLayer2, + osmo_hexdump(data_ind->msgUnitParam.u8Buffer, + data_ind->msgUnitParam.u8Size)); + + /* + * TODO: Add proper bad frame handling here. This could be used + * to switch the used CS. Avoid a crash with the PCU right now + * feed "0 - 1" amount of data. + */ + if (data_ind->msgUnitParam.u8Size == 0) + return -1; + + gsmtap_send(fl1h->gsmtap, data_ind->u16Arfcn | GSMTAP_ARFCN_F_UPLINK, + data_ind->u8Tn, GSMTAP_CHANNEL_PACCH, 0, + data_ind->u32Fn, 0, 0, data_ind->msgUnitParam.u8Buffer+1, + data_ind->msgUnitParam.u8Size-1); + + get_meas(&meas, &data_ind->measParam); + + switch (data_ind->sapi) { + case GsmL1_Sapi_Pdtch: + case GsmL1_Sapi_Pacch: + /* drop incomplete UL block */ + if (data_ind->msgUnitParam.u8Buffer[0] + != GsmL1_PdtchPlType_Full) + break; + /* PDTCH / PACCH frame handling */ + pcu_rx_data_ind_pdtch(fl1h->trx_no, data_ind->u8Tn, + data_ind->msgUnitParam.u8Buffer + 1, + data_ind->msgUnitParam.u8Size - 1, + data_ind->u32Fn, + &meas); + break; + case GsmL1_Sapi_Ptcch: + // FIXME + break; + default: + LOGP(DL1IF, LOGL_NOTICE, "Rx PH-DATA.ind for unknown L1 SAPI %s\n", + get_value_string(lc15bts_l1sapi_names, data_ind->sapi)); + break; + } + + return rc; +} + +#define MIN_QUAL_RACH 5.0f + +static int handle_ph_ra_ind(struct lc15l1_hdl *fl1h, GsmL1_PhRaInd_t *ra_ind) +{ + uint8_t acc_delay; + + if (ra_ind->measParam.fLinkQuality < MIN_QUAL_RACH) + return 0; + + DEBUGP(DL1IF, "Rx PH-RA.ind"); + + /* check for under/overflow / sign */ + if (ra_ind->measParam.i16BurstTiming < 0) + acc_delay = 0; + else + acc_delay = ra_ind->measParam.i16BurstTiming >> 2; + + LOGP(DL1IF, LOGL_NOTICE, "got (P)RACH request, TA = %u (ignored)\n", + acc_delay); + +#warning "The (P)RACH request is just dropped here" + +#if 0 + if (acc_delay > bts->max_ta) { + LOGP(DL1C, LOGL_INFO, "ignoring RACH request %u > max_ta(%u)\n", + acc_delay, btsb->max_ta); + return 0; + } +#endif + + return 0; +} + + +/* handle any random indication from the L1 */ +int l1if_handle_l1prim(int wq, struct lc15l1_hdl *fl1h, struct msgb *msg) +{ + GsmL1_Prim_t *l1p = msgb_l1prim(msg); + int rc = 0; + + LOGP(DL1IF, LOGL_DEBUG, "Rx L1 prim %s on queue %d\n", + get_value_string(lc15bts_l1prim_names, l1p->id), wq); + + switch (l1p->id) { +#if 0 + case GsmL1_PrimId_MphTimeInd: + rc = handle_mph_time_ind(fl1h, &l1p->u.mphTimeInd); + break; + case GsmL1_PrimId_MphSyncInd: + break; + case GsmL1_PrimId_PhConnectInd: + break; +#endif + case GsmL1_PrimId_PhReadyToSendInd: + rc = handle_ph_readytosend_ind(fl1h, &l1p->u.phReadyToSendInd); + break; + case GsmL1_PrimId_PhDataInd: + rc = handle_ph_data_ind(fl1h, &l1p->u.phDataInd, msg); + break; + case GsmL1_PrimId_PhRaInd: + rc = handle_ph_ra_ind(fl1h, &l1p->u.phRaInd); + break; + default: + break; + } + + msgb_free(msg); + + return rc; +} + +int l1if_handle_sysprim(struct lc15l1_hdl *fl1h, struct msgb *msg) +{ + return -ENOTSUP; +} + +/* send packet data request to L1 */ +int l1if_pdch_req(void *obj, uint8_t ts, int is_ptcch, uint32_t fn, + uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len) +{ + struct lc15l1_hdl *fl1h = obj; + struct msgb *msg; + GsmL1_Prim_t *l1p; + GsmL1_PhDataReq_t *data_req; + GsmL1_MsgUnitParam_t *msu_param; + struct gsm_time g_time; + + gsm_fn2gsmtime(&g_time, fn); + + DEBUGP(DL1IF, "TX packet data %02u/%02u/%02u is_ptcch=%d ts=%d " + "block_nr=%d, arfcn=%d, len=%d\n", g_time.t1, g_time.t2, + g_time.t3, is_ptcch, ts, block_nr, arfcn, len); + + msg = l1p_msgb_alloc(); + l1p = msgb_l1prim(msg); + l1p->id = GsmL1_PrimId_PhDataReq; + data_req = &l1p->u.phDataReq; + data_req->hLayer1 = (HANDLE)fl1h->hLayer1; + data_req->sapi = (is_ptcch) ? GsmL1_Sapi_Ptcch : GsmL1_Sapi_Pdtch; + data_req->subCh = GsmL1_SubCh_NA; + data_req->u8BlockNbr = block_nr; + data_req->u8Tn = ts; + data_req->u32Fn = fn; + msu_param = &data_req->msgUnitParam; + msu_param->u8Size = len; + memcpy(msu_param->u8Buffer, data, len); + + gsmtap_send(fl1h->gsmtap, arfcn, data_req->u8Tn, GSMTAP_CHANNEL_PACCH, + 0, data_req->u32Fn, 0, 0, + data_req->msgUnitParam.u8Buffer, + data_req->msgUnitParam.u8Size); + + + /* transmit */ + if (osmo_wqueue_enqueue(&fl1h->write_q[MQ_PDTCH_WRITE], msg) != 0) { + LOGP(DL1IF, LOGL_ERROR, "PDTCH queue full. dropping message.\n"); + msgb_free(msg); + } + + return 0; +} + +void *l1if_open_pdch(uint8_t trx_no, uint32_t hlayer1) +{ + struct lc15l1_hdl *fl1h; + int rc; + + fl1h = talloc_zero(tall_pcu_ctx, struct lc15l1_hdl); + if (!fl1h) + return NULL; + + fl1h->hLayer1 = hlayer1; + fl1h->trx_no = trx_no; + /* hardware queues are numbered starting from 1 */ + fl1h->hw_info.trx_nr = trx_no + 1; + + DEBUGP(DL1IF, "PCU: Using TRX HW#%u\n", fl1h->hw_info.trx_nr); + + rc = l1if_transport_open(MQ_PDTCH_WRITE, fl1h); + if (rc < 0) { + talloc_free(fl1h); + return NULL; + } + + fl1h->gsmtap = gsmtap_source_init("localhost", GSMTAP_UDP_PORT, 1); + if (fl1h->gsmtap) + gsmtap_source_add_sink(fl1h->gsmtap); + + return fl1h; +} + +int l1if_close_pdch(void *obj) +{ + struct lc15l1_hdl *fl1h = obj; + if (fl1h) + l1if_transport_close(MQ_PDTCH_WRITE, fl1h); + talloc_free(fl1h); + return 0; +} + diff --git a/src/osmo-bts-litecell15/lc15_l1_if.h b/src/osmo-bts-litecell15/lc15_l1_if.h new file mode 100644 index 0000000..0589919 --- /dev/null +++ b/src/osmo-bts-litecell15/lc15_l1_if.h @@ -0,0 +1,104 @@ +/* Copyright (C) 2015 by Yves Godin + * based on: + * femto_l1_if.h + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#ifndef _LC15_L1_IF_H +#define _LC15_L1_IF_H + +#include +#include +#include +#include +#include "lc15bts.h" + +enum { + MQ_SYS_READ, + MQ_L1_READ, + MQ_TCH_READ, + MQ_PDTCH_READ, + _NUM_MQ_READ +}; + +enum { + MQ_SYS_WRITE, + MQ_L1_WRITE, + MQ_TCH_WRITE, + MQ_PDTCH_WRITE, + _NUM_MQ_WRITE +}; + +struct lc15l1_hdl { + struct gsm_time gsm_time; + uint32_t hLayer1; /* handle to the L1 instance in the DSP */ + uint32_t dsp_trace_f; + struct llist_head wlc_list; + + struct gsmtap_inst *gsmtap; + uint32_t gsmtap_sapi_mask; + + uint8_t trx_no; + + struct osmo_timer_list alive_timer; + unsigned int alive_prim_cnt; + + struct osmo_fd read_ofd[_NUM_MQ_READ]; /* osmo file descriptors */ + struct osmo_wqueue write_q[_NUM_MQ_WRITE]; + + struct { + int trx_nr; /* <1-2> */ + } hw_info; +}; + +#define msgb_l1prim(msg) ((GsmL1_Prim_t *)(msg)->l1h) +#define msgb_sysprim(msg) ((Litecell15_Prim_t *)(msg)->l1h) + +typedef int l1if_compl_cb(struct msgb *l1_msg, void *data); + +/* send a request primitive to the L1 and schedule completion call-back */ +int l1if_req_compl(struct lc15l1_hdl *fl1h, struct msgb *msg, + int is_system_prim, l1if_compl_cb *cb, void *data); + +int l1if_reset(struct lc15l1_hdl *hdl); +int l1if_activate_rf(struct lc15l1_hdl *hdl, int on); +int l1if_set_trace_flags(struct lc15l1_hdl *hdl, uint32_t flags); +int l1if_set_txpower(struct lc15l1_hdl *fl1h, float tx_power); + +struct msgb *l1p_msgb_alloc(void); +struct msgb *sysp_msgb_alloc(void); + +uint32_t l1if_lchan_to_hLayer2(struct gsm_lchan *lchan); +struct gsm_lchan *l1if_hLayer2_to_lchan(struct gsm_bts_trx *trx, uint32_t hLayer2); + +int l1if_handle_sysprim(struct lc15l1_hdl *fl1h, struct msgb *msg); +int l1if_handle_l1prim(int wq, struct lc15l1_hdl *fl1h, struct msgb *msg); + +/* tch.c */ +int l1if_tch_rx(struct gsm_lchan *lchan, struct msgb *l1p_msg); +int l1if_tch_fill(struct gsm_lchan *lchan, uint8_t *l1_buffer); +struct msgb *gen_empty_tch_msg(struct gsm_lchan *lchan); + +/* + * The implementation of these functions is selected by either compiling and + * linking sysmo_l1_hw.c or sysmo_l1_fwd.c + */ +int l1if_transport_open(int q, struct lc15l1_hdl *hdl); +int l1if_transport_close(int q, struct lc15l1_hdl *hdl); + +#endif /* _SYSMO_L1_IF_H */ diff --git a/src/osmo-bts-litecell15/lc15bts.c b/src/osmo-bts-litecell15/lc15bts.c new file mode 100644 index 0000000..172a7e4 --- /dev/null +++ b/src/osmo-bts-litecell15/lc15bts.c @@ -0,0 +1,332 @@ +/* NuRAN Wireless Litecell 1.5 L1 API related definitions */ + +/* Copyright (C) 2015 by Yves Godin + * based on: + * sysmobts.c + * (C) 2011 by Harald Welte + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include + +#include "lc15bts.h" + +enum l1prim_type lc15bts_get_l1prim_type(GsmL1_PrimId_t id) +{ + switch (id) { + case GsmL1_PrimId_MphInitReq: return L1P_T_REQ; + case GsmL1_PrimId_MphCloseReq: return L1P_T_REQ; + case GsmL1_PrimId_MphConnectReq: return L1P_T_REQ; + case GsmL1_PrimId_MphDisconnectReq: return L1P_T_REQ; + case GsmL1_PrimId_MphActivateReq: return L1P_T_REQ; + case GsmL1_PrimId_MphDeactivateReq: return L1P_T_REQ; + case GsmL1_PrimId_MphConfigReq: return L1P_T_REQ; + case GsmL1_PrimId_MphMeasureReq: return L1P_T_REQ; + case GsmL1_PrimId_MphInitCnf: return L1P_T_CONF; + case GsmL1_PrimId_MphCloseCnf: return L1P_T_CONF; + case GsmL1_PrimId_MphConnectCnf: return L1P_T_CONF; + case GsmL1_PrimId_MphDisconnectCnf: return L1P_T_CONF; + case GsmL1_PrimId_MphActivateCnf: return L1P_T_CONF; + case GsmL1_PrimId_MphDeactivateCnf: return L1P_T_CONF; + case GsmL1_PrimId_MphConfigCnf: return L1P_T_CONF; + case GsmL1_PrimId_MphMeasureCnf: return L1P_T_CONF; + case GsmL1_PrimId_PhEmptyFrameReq: return L1P_T_REQ; + case GsmL1_PrimId_PhDataReq: return L1P_T_REQ; + case GsmL1_PrimId_MphTimeInd: return L1P_T_IND; + case GsmL1_PrimId_MphSyncInd: return L1P_T_IND; + case GsmL1_PrimId_PhConnectInd: return L1P_T_IND; + case GsmL1_PrimId_PhReadyToSendInd: return L1P_T_IND; + case GsmL1_PrimId_PhDataInd: return L1P_T_IND; + case GsmL1_PrimId_PhRaInd: return L1P_T_IND; + default: return L1P_T_INVALID; + } +} + +const struct value_string lc15bts_l1prim_names[GsmL1_PrimId_NUM+1] = { + { GsmL1_PrimId_MphInitReq, "MPH-INIT.req" }, + { GsmL1_PrimId_MphCloseReq, "MPH-CLOSE.req" }, + { GsmL1_PrimId_MphConnectReq, "MPH-CONNECT.req" }, + { GsmL1_PrimId_MphDisconnectReq,"MPH-DISCONNECT.req" }, + { GsmL1_PrimId_MphActivateReq, "MPH-ACTIVATE.req" }, + { GsmL1_PrimId_MphDeactivateReq,"MPH-DEACTIVATE.req" }, + { GsmL1_PrimId_MphConfigReq, "MPH-CONFIG.req" }, + { GsmL1_PrimId_MphMeasureReq, "MPH-MEASURE.req" }, + { GsmL1_PrimId_MphInitCnf, "MPH-INIT.conf" }, + { GsmL1_PrimId_MphCloseCnf, "MPH-CLOSE.conf" }, + { GsmL1_PrimId_MphConnectCnf, "MPH-CONNECT.conf" }, + { GsmL1_PrimId_MphDisconnectCnf,"MPH-DISCONNECT.conf" }, + { GsmL1_PrimId_MphActivateCnf, "MPH-ACTIVATE.conf" }, + { GsmL1_PrimId_MphDeactivateCnf,"MPH-DEACTIVATE.conf" }, + { GsmL1_PrimId_MphConfigCnf, "MPH-CONFIG.conf" }, + { GsmL1_PrimId_MphMeasureCnf, "MPH-MEASURE.conf" }, + { GsmL1_PrimId_MphTimeInd, "MPH-TIME.ind" }, + { GsmL1_PrimId_MphSyncInd, "MPH-SYNC.ind" }, + { GsmL1_PrimId_PhEmptyFrameReq, "PH-EMPTY_FRAME.req" }, + { GsmL1_PrimId_PhDataReq, "PH-DATA.req" }, + { GsmL1_PrimId_PhConnectInd, "PH-CONNECT.ind" }, + { GsmL1_PrimId_PhReadyToSendInd,"PH-READY_TO_SEND.ind" }, + { GsmL1_PrimId_PhDataInd, "PH-DATA.ind" }, + { GsmL1_PrimId_PhRaInd, "PH-RA.ind" }, + { 0, NULL } +}; + +GsmL1_PrimId_t lc15bts_get_l1prim_conf(GsmL1_PrimId_t id) +{ + switch (id) { + case GsmL1_PrimId_MphInitReq: return GsmL1_PrimId_MphInitCnf; + case GsmL1_PrimId_MphCloseReq: return GsmL1_PrimId_MphCloseCnf; + case GsmL1_PrimId_MphConnectReq: return GsmL1_PrimId_MphConnectCnf; + case GsmL1_PrimId_MphDisconnectReq: return GsmL1_PrimId_MphDisconnectCnf; + case GsmL1_PrimId_MphActivateReq: return GsmL1_PrimId_MphActivateCnf; + case GsmL1_PrimId_MphDeactivateReq: return GsmL1_PrimId_MphDeactivateCnf; + case GsmL1_PrimId_MphConfigReq: return GsmL1_PrimId_MphConfigCnf; + case GsmL1_PrimId_MphMeasureReq: return GsmL1_PrimId_MphMeasureCnf; + default: return -1; // Weak + } +} + +enum l1prim_type lc15bts_get_sysprim_type(Litecell15_PrimId_t id) +{ + switch (id) { + case Litecell15_PrimId_SystemInfoReq: return L1P_T_REQ; + case Litecell15_PrimId_SystemInfoCnf: return L1P_T_CONF; + case Litecell15_PrimId_SystemFailureInd: return L1P_T_IND; + case Litecell15_PrimId_ActivateRfReq: return L1P_T_REQ; + case Litecell15_PrimId_ActivateRfCnf: return L1P_T_CONF; + case Litecell15_PrimId_DeactivateRfReq: return L1P_T_REQ; + case Litecell15_PrimId_DeactivateRfCnf: return L1P_T_CONF; + case Litecell15_PrimId_SetTraceFlagsReq: return L1P_T_REQ; + case Litecell15_PrimId_Layer1ResetReq: return L1P_T_REQ; + case Litecell15_PrimId_Layer1ResetCnf: return L1P_T_CONF; + case Litecell15_PrimId_SetCalibTblReq: return L1P_T_REQ; + case Litecell15_PrimId_SetCalibTblCnf: return L1P_T_CONF; + case Litecell15_PrimId_MuteRfReq: return L1P_T_REQ; + case Litecell15_PrimId_MuteRfCnf: return L1P_T_CONF; + case Litecell15_PrimId_SetRxAttenReq: return L1P_T_REQ; + case Litecell15_PrimId_SetRxAttenCnf: return L1P_T_CONF; + default: return L1P_T_INVALID; + } +} + +const struct value_string lc15bts_sysprim_names[Litecell15_PrimId_NUM+1] = { + { Litecell15_PrimId_SystemInfoReq, "SYSTEM-INFO.req" }, + { Litecell15_PrimId_SystemInfoCnf, "SYSTEM-INFO.conf" }, + { Litecell15_PrimId_SystemFailureInd, "SYSTEM-FAILURE.ind" }, + { Litecell15_PrimId_ActivateRfReq, "ACTIVATE-RF.req" }, + { Litecell15_PrimId_ActivateRfCnf, "ACTIVATE-RF.conf" }, + { Litecell15_PrimId_DeactivateRfReq, "DEACTIVATE-RF.req" }, + { Litecell15_PrimId_DeactivateRfCnf, "DEACTIVATE-RF.conf" }, + { Litecell15_PrimId_SetTraceFlagsReq, "SET-TRACE-FLAGS.req" }, + { Litecell15_PrimId_Layer1ResetReq, "LAYER1-RESET.req" }, + { Litecell15_PrimId_Layer1ResetCnf, "LAYER1-RESET.conf" }, + { Litecell15_PrimId_SetCalibTblReq, "SET-CALIB.req" }, + { Litecell15_PrimId_SetCalibTblCnf, "SET-CALIB.cnf" }, + { Litecell15_PrimId_MuteRfReq, "MUTE-RF.req" }, + { Litecell15_PrimId_MuteRfCnf, "MUTE-RF.cnf" }, + { Litecell15_PrimId_SetRxAttenReq, "SET-RX-ATTEN.req" }, + { Litecell15_PrimId_SetRxAttenCnf, "SET-RX-ATTEN-CNF.cnf" }, + { 0, NULL } +}; + +Litecell15_PrimId_t lc15bts_get_sysprim_conf(Litecell15_PrimId_t id) +{ + switch (id) { + case Litecell15_PrimId_SystemInfoReq: return Litecell15_PrimId_SystemInfoCnf; + case Litecell15_PrimId_ActivateRfReq: return Litecell15_PrimId_ActivateRfCnf; + case Litecell15_PrimId_DeactivateRfReq: return Litecell15_PrimId_DeactivateRfCnf; + case Litecell15_PrimId_Layer1ResetReq: return Litecell15_PrimId_Layer1ResetCnf; + case Litecell15_PrimId_SetCalibTblReq: return Litecell15_PrimId_SetCalibTblCnf; + case Litecell15_PrimId_MuteRfReq: return Litecell15_PrimId_MuteRfCnf; + case Litecell15_PrimId_SetRxAttenReq: return Litecell15_PrimId_SetRxAttenCnf; + default: return -1; // Weak + } +} + +const struct value_string lc15bts_l1sapi_names[GsmL1_Sapi_NUM+1] = { + { GsmL1_Sapi_Idle, "IDLE" }, + { GsmL1_Sapi_Fcch, "FCCH" }, + { GsmL1_Sapi_Sch, "SCH" }, + { GsmL1_Sapi_Sacch, "SACCH" }, + { GsmL1_Sapi_Sdcch, "SDCCH" }, + { GsmL1_Sapi_Bcch, "BCCH" }, + { GsmL1_Sapi_Pch, "PCH" }, + { GsmL1_Sapi_Agch, "AGCH" }, + { GsmL1_Sapi_Cbch, "CBCH" }, + { GsmL1_Sapi_Rach, "RACH" }, + { GsmL1_Sapi_TchF, "TCH/F" }, + { GsmL1_Sapi_FacchF, "FACCH/F" }, + { GsmL1_Sapi_TchH, "TCH/H" }, + { GsmL1_Sapi_FacchH, "FACCH/H" }, + { GsmL1_Sapi_Nch, "NCH" }, + { GsmL1_Sapi_Pdtch, "PDTCH" }, + { GsmL1_Sapi_Pacch, "PACCH" }, + { GsmL1_Sapi_Pbcch, "PBCCH" }, + { GsmL1_Sapi_Pagch, "PAGCH" }, + { GsmL1_Sapi_Ppch, "PPCH" }, + { GsmL1_Sapi_Pnch, "PNCH" }, + { GsmL1_Sapi_Ptcch, "PTCCH" }, + { GsmL1_Sapi_Prach, "PRACH" }, + { 0, NULL } +}; + +const struct value_string lc15bts_l1status_names[GSML1_STATUS_NUM+1] = { + { GsmL1_Status_Success, "Success" }, + { GsmL1_Status_Generic, "Generic error" }, + { GsmL1_Status_NoMemory, "Not enough memory" }, + { GsmL1_Status_Timeout, "Timeout" }, + { GsmL1_Status_InvalidParam, "Invalid parameter" }, + { GsmL1_Status_Busy, "Resource busy" }, + { GsmL1_Status_NoRessource, "No more resources" }, + { GsmL1_Status_Uninitialized, "Trying to use uninitialized resource" }, + { GsmL1_Status_NullInterface, "Trying to call a NULL interface" }, + { GsmL1_Status_NullFctnPtr, "Trying to call a NULL function ptr" }, + { GsmL1_Status_BadCrc, "Bad CRC" }, + { GsmL1_Status_BadUsf, "Bad USF" }, + { GsmL1_Status_InvalidCPS, "Invalid CPS field" }, + { GsmL1_Status_UnexpectedBurst, "Unexpected burst" }, + { GsmL1_Status_UnavailCodec, "AMR codec is unavailable" }, + { GsmL1_Status_CriticalError, "Critical error" }, + { GsmL1_Status_OverheatError, "Overheat error" }, + { GsmL1_Status_DeviceError, "Device error" }, + { GsmL1_Status_FacchError, "FACCH / TCH order error" }, + { GsmL1_Status_AlreadyDeactivated, "Lchan already deactivated" }, + { GsmL1_Status_TxBurstFifoOvrn, "FIFO overrun" }, + { GsmL1_Status_TxBurstFifoUndr, "FIFO underrun" }, + { GsmL1_Status_NotSynchronized, "Not synchronized" }, + { GsmL1_Status_Unsupported, "Unsupported feature" }, + { GsmL1_Status_ClockError, "System clock error" }, + { 0, NULL } +}; + +const struct value_string lc15bts_tracef_names[29] = { + { DBG_DEBUG, "DEBUG" }, + { DBG_L1WARNING, "L1_WARNING" }, + { DBG_ERROR, "ERROR" }, + { DBG_L1RXMSG, "L1_RX_MSG" }, + { DBG_L1RXMSGBYTE, "L1_RX_MSG_BYTE" }, + { DBG_L1TXMSG, "L1_TX_MSG" }, + { DBG_L1TXMSGBYTE, "L1_TX_MSG_BYTE" }, + { DBG_MPHCNF, "MPH_CNF" }, + { DBG_MPHIND, "MPH_IND" }, + { DBG_MPHREQ, "MPH_REQ" }, + { DBG_PHIND, "PH_IND" }, + { DBG_PHREQ, "PH_REQ" }, + { DBG_PHYRF, "PHY_RF" }, + { DBG_PHYRFMSGBYTE, "PHY_MSG_BYTE" }, + { DBG_MODE, "MODE" }, + { DBG_TDMAINFO, "TDMA_INFO" }, + { DBG_BADCRC, "BAD_CRC" }, + { DBG_PHINDBYTE, "PH_IND_BYTE" }, + { DBG_PHREQBYTE, "PH_REQ_BYTE" }, + { DBG_DEVICEMSG, "DEVICE_MSG" }, + { DBG_RACHINFO, "RACH_INFO" }, + { DBG_LOGCHINFO, "LOG_CH_INFO" }, + { DBG_MEMORY, "MEMORY" }, + { DBG_PROFILING, "PROFILING" }, + { DBG_TESTCOMMENT, "TEST_COMMENT" }, + { DBG_TEST, "TEST" }, + { DBG_STATUS, "STATUS" }, + { 0, NULL } +}; + +const struct value_string lc15bts_tracef_docs[29] = { + { DBG_DEBUG, "Debug Region" }, + { DBG_L1WARNING, "L1 Warning Region" }, + { DBG_ERROR, "Error Region" }, + { DBG_L1RXMSG, "L1_RX_MSG Region" }, + { DBG_L1RXMSGBYTE, "L1_RX_MSG_BYTE Region" }, + { DBG_L1TXMSG, "L1_TX_MSG Region" }, + { DBG_L1TXMSGBYTE, "L1_TX_MSG_BYTE Region" }, + { DBG_MPHCNF, "MphConfirmation Region" }, + { DBG_MPHIND, "MphIndication Region" }, + { DBG_MPHREQ, "MphRequest Region" }, + { DBG_PHIND, "PhIndication Region" }, + { DBG_PHREQ, "PhRequest Region" }, + { DBG_PHYRF, "PhyRF Region" }, + { DBG_PHYRFMSGBYTE, "PhyRF Message Region" }, + { DBG_MODE, "Mode Region" }, + { DBG_TDMAINFO, "TDMA Info Region" }, + { DBG_BADCRC, "Bad CRC Region" }, + { DBG_PHINDBYTE, "PH_IND_BYTE" }, + { DBG_PHREQBYTE, "PH_REQ_BYTE" }, + { DBG_DEVICEMSG, "Device Message Region" }, + { DBG_RACHINFO, "RACH Info" }, + { DBG_LOGCHINFO, "LOG_CH_INFO" }, + { DBG_MEMORY, "Memory Region" }, + { DBG_PROFILING, "Profiling Region" }, + { DBG_TESTCOMMENT, "Test Comments" }, + { DBG_TEST, "Test Region" }, + { DBG_STATUS, "Status Region" }, + { 0, NULL } +}; + +const struct value_string lc15bts_tch_pl_names[] = { + { GsmL1_TchPlType_NA, "N/A" }, + { GsmL1_TchPlType_Fr, "FR" }, + { GsmL1_TchPlType_Hr, "HR" }, + { GsmL1_TchPlType_Efr, "EFR" }, + { GsmL1_TchPlType_Amr, "AMR(IF2)" }, + { GsmL1_TchPlType_Amr_SidBad, "AMR(SID BAD)" }, + { GsmL1_TchPlType_Amr_Onset, "AMR(ONSET)" }, + { GsmL1_TchPlType_Amr_Ratscch, "AMR(RATSCCH)" }, + { GsmL1_TchPlType_Amr_SidUpdateInH, "AMR(SID_UPDATE INH)" }, + { GsmL1_TchPlType_Amr_SidFirstP1, "AMR(SID_FIRST P1)" }, + { GsmL1_TchPlType_Amr_SidFirstP2, "AMR(SID_FIRST P2)" }, + { GsmL1_TchPlType_Amr_SidFirstInH, "AMR(SID_FIRST INH)" }, + { GsmL1_TchPlType_Amr_RatscchMarker, "AMR(RATSCCH MARK)" }, + { GsmL1_TchPlType_Amr_RatscchData, "AMR(RATSCCH DATA)" }, + { 0, NULL } +}; + +const struct value_string lc15bts_dir_names[] = { + { GsmL1_Dir_TxDownlink, "TxDL" }, + { GsmL1_Dir_TxUplink, "TxUL" }, + { GsmL1_Dir_RxUplink, "RxUL" }, + { GsmL1_Dir_RxDownlink, "RxDL" }, + { GsmL1_Dir_TxDownlink|GsmL1_Dir_RxUplink, "BOTH" }, + { 0, NULL } +}; + +const struct value_string lc15bts_chcomb_names[] = { + { GsmL1_LogChComb_0, "dummy" }, + { GsmL1_LogChComb_I, "tch_f" }, + { GsmL1_LogChComb_II, "tch_h" }, + { GsmL1_LogChComb_IV, "ccch" }, + { GsmL1_LogChComb_V, "ccch_sdcch4" }, + { GsmL1_LogChComb_VII, "sdcch8" }, + { GsmL1_LogChComb_XIII, "pdtch" }, + { 0, NULL } +}; + +const uint8_t pdch_msu_size[_NUM_PDCH_CS] = { + [PDCH_CS_1] = 23, + [PDCH_CS_2] = 34, + [PDCH_CS_3] = 40, + [PDCH_CS_4] = 54, + [PDCH_MCS_1] = 27, + [PDCH_MCS_2] = 33, + [PDCH_MCS_3] = 42, + [PDCH_MCS_4] = 49, + [PDCH_MCS_5] = 60, + [PDCH_MCS_6] = 78, + [PDCH_MCS_7] = 118, + [PDCH_MCS_8] = 142, + [PDCH_MCS_9] = 154 +}; diff --git a/src/osmo-bts-litecell15/lc15bts.h b/src/osmo-bts-litecell15/lc15bts.h new file mode 100644 index 0000000..4c40db0 --- /dev/null +++ b/src/osmo-bts-litecell15/lc15bts.h @@ -0,0 +1,64 @@ +#ifndef LC15BTS_H +#define LC15BTS_H + +#include +#include + +#include +#include + +/* + * Depending on the firmware version either GsmL1_Prim_t or Litecell15_Prim_t + * is the bigger struct. For earlier firmware versions the GsmL1_Prim_t was the + * bigger struct. + */ +#define LC15BTS_PRIM_SIZE \ + (OSMO_MAX(sizeof(Litecell15_Prim_t), sizeof(GsmL1_Prim_t)) + 128) + +enum l1prim_type { + L1P_T_INVALID, /* this must be 0 to detect uninitialized elements */ + L1P_T_REQ, + L1P_T_CONF, + L1P_T_IND, +}; + +enum l1prim_type lc15bts_get_l1prim_type(GsmL1_PrimId_t id); +const struct value_string lc15bts_l1prim_names[GsmL1_PrimId_NUM+1]; +GsmL1_PrimId_t lc15bts_get_l1prim_conf(GsmL1_PrimId_t id); + +enum l1prim_type lc15bts_get_sysprim_type(Litecell15_PrimId_t id); +const struct value_string lc15bts_sysprim_names[Litecell15_PrimId_NUM+1]; +Litecell15_PrimId_t lc15bts_get_sysprim_conf(Litecell15_PrimId_t id); + +const struct value_string lc15bts_l1sapi_names[GsmL1_Sapi_NUM+1]; +const struct value_string lc15bts_l1status_names[GSML1_STATUS_NUM+1]; + +const struct value_string lc15bts_tracef_names[29]; +const struct value_string lc15bts_tracef_docs[29]; + +const struct value_string lc15bts_tch_pl_names[15]; + +const struct value_string lc15bts_clksrc_names[10]; + +const struct value_string lc15bts_dir_names[6]; + +enum pdch_cs { + PDCH_CS_1, + PDCH_CS_2, + PDCH_CS_3, + PDCH_CS_4, + PDCH_MCS_1, + PDCH_MCS_2, + PDCH_MCS_3, + PDCH_MCS_4, + PDCH_MCS_5, + PDCH_MCS_6, + PDCH_MCS_7, + PDCH_MCS_8, + PDCH_MCS_9, + _NUM_PDCH_CS +}; + +const uint8_t pdch_msu_size[_NUM_PDCH_CS]; + +#endif /* LC15BTS_H */ -- To view, visit https://gerrit.osmocom.org/61 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib1287375cb10a889625bbac8528fa60deed23a2b Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri May 20 16:26:33 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 20 May 2016 16:26:33 +0000 Subject: [MERGED] openbsc[master]: Use proper measurement for handover In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: Use proper measurement for handover ...................................................................... Use proper measurement for handover Previously *FULL measurements were always used for handover decisions. Those are incorrect in case of DTX - check if it was enabled and use *SUB instead. Note: *SUB values have higher variance so there might be more "bad" values compared to *FULL although real quality remains the same. Change-Id: I95e8e544047a83a256e057a47458678f40a19a15 Related: OS#1701 Reviewed-on: https://gerrit.osmocom.org/66 Tested-by: Jenkins Builder Reviewed-by: Harald Welte --- M openbsc/src/libbsc/handover_decision.c 1 file changed, 12 insertions(+), 5 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/libbsc/handover_decision.c b/openbsc/src/libbsc/handover_decision.c index 24c0f79..0f07bca 100644 --- a/openbsc/src/libbsc/handover_decision.c +++ b/openbsc/src/libbsc/handover_decision.c @@ -228,6 +228,7 @@ static int process_meas_rep(struct gsm_meas_rep *mr) { struct gsm_network *net = mr->lchan->ts->trx->bts->network; + enum meas_rep_field dlev, dqual; int av_rxlev; /* we currently only do handover for TCH channels */ @@ -239,22 +240,28 @@ return 0; } + if (mr->flags & MEAS_REP_F_DL_DTX) { + dlev = MEAS_REP_DL_RXLEV_SUB; + dqual = MEAS_REP_DL_RXQUAL_SUB; + } else { + dlev = MEAS_REP_DL_RXLEV_FULL; + dqual = MEAS_REP_DL_RXQUAL_FULL; + } + /* parse actual neighbor cell info */ if (mr->num_cell > 0 && mr->num_cell < 7) process_meas_neigh(mr); - av_rxlev = get_meas_rep_avg(mr->lchan, MEAS_REP_DL_RXLEV_FULL, + av_rxlev = get_meas_rep_avg(mr->lchan, dlev, net->handover.win_rxlev_avg); /* Interference HO */ if (rxlev2dbm(av_rxlev) > -85 && - meas_rep_n_out_of_m_be(mr->lchan, MEAS_REP_DL_RXQUAL_FULL, - 3, 4, 5)) + meas_rep_n_out_of_m_be(mr->lchan, dqual, 3, 4, 5)) return attempt_handover(mr); /* Bad Quality */ - if (meas_rep_n_out_of_m_be(mr->lchan, MEAS_REP_DL_RXQUAL_FULL, - 3, 4, 5)) + if (meas_rep_n_out_of_m_be(mr->lchan, dqual, 3, 4, 5)) return attempt_handover(mr); /* Low Level */ -- To view, visit https://gerrit.osmocom.org/66 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I95e8e544047a83a256e057a47458678f40a19a15 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Fri May 20 16:26:48 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 20 May 2016 16:26:48 +0000 Subject: libosmocore[master]: gsm48: move to hex TMSI representation In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/57 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifd25365bfa3b4ee95b16979740c3229948ce17f2 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri May 20 16:26:51 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 20 May 2016 16:26:51 +0000 Subject: [MERGED] libosmocore[master]: gsm48: move to hex TMSI representation In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: gsm48: move to hex TMSI representation ...................................................................... gsm48: move to hex TMSI representation Previously, we traditionally displayed a TMSI in its integer representation, which is quite unusual in the telecom world. A TMSI is normally printed as a series of 8 hex digits. Review at https://gerrit.osmocom.org/57/ Change-Id: Ifd25365bfa3b4ee95b16979740c3229948ce17f2 Reviewed-on: https://gerrit.osmocom.org/57 Tested-by: Jenkins Builder Reviewed-by: Harald Welte Reviewed-by: Holger Freyther --- M src/gsm/gsm48.c 1 file changed, 1 insertion(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index 8a46f76..d0e050b 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -458,11 +458,10 @@ case GSM_MI_TYPE_NONE: break; case GSM_MI_TYPE_TMSI: - /* Table 10.5.4.3, reverse generate_mid_from_tmsi */ if (mi_len == GSM48_TMSI_LEN && mi[0] == (0xf0 | GSM_MI_TYPE_TMSI)) { memcpy(&tmsi, &mi[1], 4); tmsi = ntohl(tmsi); - return snprintf(string, str_len, "%u", tmsi); + return snprintf(string, str_len, "0x%08X", tmsi); } break; case GSM_MI_TYPE_IMSI: -- To view, visit https://gerrit.osmocom.org/57 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifd25365bfa3b4ee95b16979740c3229948ce17f2 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy From gerrit-no-reply at lists.osmocom.org Fri May 20 16:27:28 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 20 May 2016 16:27:28 +0000 Subject: osmo-pcu[master]: introduce new counter rlc_sent_dummy In-Reply-To: References: Message-ID: Patch Set 1: Please rebase and have the dummy spaces to match the layout. -- To view, visit https://gerrit.osmocom.org/85 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia60eab853d9145980f30d63e4ce4b520b8c51381 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri May 20 16:32:02 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 20 May 2016 16:32:02 +0000 Subject: osmo-pcu[master]: move statistics counter rlc_sent() to gprs_rlcmac_sched In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/84 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5d2b910ea7cc250f17530406eda3be9b29b051fd Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri May 20 16:32:06 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 20 May 2016 16:32:06 +0000 Subject: [MERGED] osmo-pcu[master]: move statistics counter rlc_sent() to gprs_rlcmac_sched In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: move statistics counter rlc_sent() to gprs_rlcmac_sched ...................................................................... move statistics counter rlc_sent() to gprs_rlcmac_sched The counter rlc_sent has nothing to do with the TBF. The RLC packet got sent in the gprs_rlcmac_sched(). Change-Id: I5d2b910ea7cc250f17530406eda3be9b29b051fd Reviewed-on: https://gerrit.osmocom.org/84 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M src/gprs_rlcmac_sched.cpp M src/tbf_dl.cpp 2 files changed, 4 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index 313e23f..8e05623 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -341,8 +341,11 @@ dl_ass_tbf, ul_ack_tbf); /* Prio 2: select data message for downlink */ - if (!msg) + if (!msg) { msg = sched_select_downlink(bts, trx, ts, fn, block_nr, pdch); + if (msg) + bts->bts->rlc_sent(); + } /* Prio 3: send dummy contol message */ if (!msg) diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 9e4d078..62d378f 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -762,8 +762,6 @@ /* Increment TX-counter */ m_tx_counter++; - bts->rlc_sent(); - return dl_msg; } -- To view, visit https://gerrit.osmocom.org/84 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5d2b910ea7cc250f17530406eda3be9b29b051fd Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri May 20 16:32:35 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 20 May 2016 16:32:35 +0000 Subject: openbsc[master]: Make extending subscriber creation easier In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/42 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3b10a9a764fd3a7bb96717a990e52caae16266da Gerrit-PatchSet: 6 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri May 20 16:32:37 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 20 May 2016 16:32:37 +0000 Subject: [MERGED] openbsc[master]: Make extending subscriber creation easier In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: Make extending subscriber creation easier ...................................................................... Make extending subscriber creation easier * rename variable controlling subscriber creation * use enum for subscriber creation policy * move check for subscriber creation policy into separate static function Related: OS#1658, OS#1647 Change-Id: I3b10a9a764fd3a7bb96717a990e52caae16266da Reviewed-on: https://gerrit.osmocom.org/42 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M openbsc/include/openbsc/gsm_data.h M openbsc/src/libbsc/net_init.c M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/libmsc/vty_interface_layer3.c 4 files changed, 23 insertions(+), 12 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index 91d84db..a08938c 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -19,6 +19,11 @@ #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] +enum gsm_subscr_creation_mode { + GSM_SUBSCR_DONT_CREATE = 0, + GSM_SUBSCR_CREAT_W_RAND_EXT = 1, +}; + enum gsm_security_event { GSM_SECURITY_NOAVAIL, GSM_SECURITY_AUTH_FAILED, @@ -278,7 +283,7 @@ struct osmo_bsc_data *bsc_data; /* subscriber related features */ - int create_subscriber; + int subscr_creation_mode; struct gsm_subscriber_group *subscr_group; struct gsm_sms_queue *sms_queue; diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c index 568a0b8..afcaaf3 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -48,7 +48,7 @@ INIT_LLIST_HEAD(&net->bsc_data->mscs); net->subscr_group->net = net; - net->create_subscriber = 1; + net->subscr_creation_mode = GSM_SUBSCR_CREAT_W_RAND_EXT; net->country_code = country_code; net->network_code = network_code; diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index f02f784..0f00db1 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -507,6 +507,14 @@ return gsm48_conn_sendmsg(msg, conn, NULL); } +static struct gsm_subscriber *subscr_create(const struct gsm_network *net, + const char *imsi) +{ + if (net->subscr_creation_mode != GSM_SUBSCR_DONT_CREATE) + return subscr_create_subscriber(net->subscr_group, imsi); + + return NULL; +} /* Parse Chapter 9.2.11 Identity Response */ static int mm_rx_id_resp(struct gsm_subscriber_connection *conn, struct msgb *msg) @@ -530,9 +538,8 @@ if (!conn->subscr) { conn->subscr = subscr_get_by_imsi(net->subscr_group, mi_string); - if (!conn->subscr && net->create_subscriber) - conn->subscr = subscr_create_subscriber( - net->subscr_group, mi_string); + if (!conn->subscr) + conn->subscr = subscr_create(net, mi_string); } if (!conn->subscr && conn->loc_operation) { gsm0408_loc_upd_rej(conn, bts->network->reject_cause); @@ -641,10 +648,9 @@ /* look up subscriber based on IMSI, create if not found */ subscr = subscr_get_by_imsi(bts->network->subscr_group, mi_string); - if (!subscr && bts->network->create_subscriber) { - subscr = subscr_create_subscriber( - bts->network->subscr_group, mi_string); - } + if (!subscr) + subscr = subscr_create(bts->network, mi_string); + if (!subscr) { gsm0408_loc_upd_rej(conn, bts->network->reject_cause); release_loc_updating_req(conn, 0); diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 4c2088a..5d74e04 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -1036,7 +1036,7 @@ "Make a new record when a subscriber is first seen.\n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->create_subscriber = 1; + gsmnet->subscr_creation_mode = GSM_SUBSCR_CREAT_W_RAND_EXT; return CMD_SUCCESS; } @@ -1045,7 +1045,7 @@ NO_STR "Make a new record when a subscriber is first seen.\n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); - gsmnet->create_subscriber = 0; + gsmnet->subscr_creation_mode = GSM_SUBSCR_DONT_CREATE; return CMD_SUCCESS; } @@ -1072,7 +1072,7 @@ struct gsm_network *gsmnet = gsmnet_from_vty(vty); vty_out(vty, "nitb%s", VTY_NEWLINE); vty_out(vty, " %ssubscriber-create-on-demand%s", - gsmnet->create_subscriber ? "" : "no ", VTY_NEWLINE); + gsmnet->subscr_creation_mode ? "" : "no ", VTY_NEWLINE); vty_out(vty, " %sassign-tmsi%s", gsmnet->avoid_tmsi ? "no " : "", VTY_NEWLINE); return CMD_SUCCESS; -- To view, visit https://gerrit.osmocom.org/42 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3b10a9a764fd3a7bb96717a990e52caae16266da Gerrit-PatchSet: 7 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Fri May 20 16:32:58 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 20 May 2016 16:32:58 +0000 Subject: [MERGED] libosmocore[master]: Fix build for OSX In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: Fix build for OSX ...................................................................... Fix build for OSX Change-Id: I580a500edcf4812e570be586890abef746083a8c Reviewed-on: https://gerrit.osmocom.org/74 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M include/osmocom/core/endian.h M src/stats.c 2 files changed, 24 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/include/osmocom/core/endian.h b/include/osmocom/core/endian.h index c890fd7..02c6406 100644 --- a/include/osmocom/core/endian.h +++ b/include/osmocom/core/endian.h @@ -23,6 +23,17 @@ #else #error "Unknown endian" #endif +#elif defined(__APPLE__) +#include + #if defined(__DARWIN_LITTLE_ENDIAN) + #define OSMO_IS_LITTLE_ENDIAN 1 + #define OSMO_IS_BIG_ENDIAN 0 + #elif define(__DARWIN_BIG_ENDIAN) + #define OSMO_IS_LITTLE_ENDIAN 0 + #define OSMO_IS_BIG_ENDIAN 1 + #else + #error "Unknown endian" + #endif #else #include #if __BYTE_ORDER == __LITTLE_ENDIAN diff --git a/src/stats.c b/src/stats.c index 73b2703..5f1d028 100644 --- a/src/stats.c +++ b/src/stats.c @@ -301,6 +301,14 @@ if (sock == -1) return -errno; +#if defined(__APPLE__) && !defined(MSG_NOSIGNAL) + { + static int val = 1; + + rc = setsockopt(sock, SOL_SOCKET, SO_NOSIGPIPE, (void*)&val, sizeof(val)); + goto failed; + } +#endif if (srep->bind_addr_len > 0) { rc = bind(sock, &srep->bind_addr, srep->bind_addr_len); if (rc == -1) @@ -345,7 +353,11 @@ { int rc; - rc = sendto(srep->fd, data, data_len, MSG_NOSIGNAL | MSG_DONTWAIT, + rc = sendto(srep->fd, data, data_len, +#ifdef MSG_NOSIGNAL + MSG_NOSIGNAL | +#endif + MSG_DONTWAIT, &srep->dest_addr, srep->dest_addr_len); if (rc == -1) -- To view, visit https://gerrit.osmocom.org/74 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I580a500edcf4812e570be586890abef746083a8c Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri May 20 16:37:09 2016 From: gerrit-no-reply at lists.osmocom.org (Arran Cudbard-bell) Date: Fri, 20 May 2016 16:37:09 +0000 Subject: libosmocore[master]: Fix build for OSX In-Reply-To: References: Message-ID: Patch Set 5: (1 comment) SIP needs to be disabled anyway for SCTP NKE. So could use LD_PRELOAD... OR something else if you wanted me to investigate abstracting SCTP out and using usrsctp. https://gerrit.osmocom.org/#/c/74/4/src/stats.c File src/stats.c: Line 357: #ifdef MSG_NOSIGNAL > I don't like #ifdefs in code too much. I will let this one in but in genera The issue I have with defining macros to be no ops is that it makes things harder to track down. If you put MSG_NOSIGNAL in a bitmask you expect that behaviour, not for it to be ignored. Usually I try and define abstract macros that deal with the variances between systems, but that's not possible here. -- To view, visit https://gerrit.osmocom.org/74 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I580a500edcf4812e570be586890abef746083a8c Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Arran Cudbard-bell Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri May 20 19:16:24 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 20 May 2016 19:16:24 +0000 Subject: openbsc[master]: move to hex TMSI representation In-Reply-To: References: Message-ID: Patch Set 2: (5 comments) Argh. I just noticed an issue with the libosmocore change. I will need to revert it. We want to be able to use old OpenBSC code against newer libosmocore and this can only be done... if int->string->int code is in libosmocore. :( https://gerrit.osmocom.org/#/c/63/2/openbsc/include/openbsc/gsm_subscriber.h File openbsc/include/openbsc/gsm_subscriber.h: PS2, Line 16: define We need to move this to libosmocore. I just noticed that by accepting the change in libosmocore but not this one. We actually broke the parsing of TMSIs and LUs and CM Service Request.. We need to have both in libosmocore. https://gerrit.osmocom.org/#/c/63/2/openbsc/src/libmsc/db.c File openbsc/src/libmsc/db.c: Line 216: LOGP(DDB, LOGL_NOTICE, "Migration complete.\n"); Why this hunk? Line 237: sms->id = dbi_result_get_ulonglong(result, "id"); Why that? I mean v3 is old. We should not see this right now? Line 376: return -EINVAL; Please put that in a separate commit Line 417: "INSERT INTO Subscriber " You rely on sqlite doing type conversion from string to number here? -- To view, visit https://gerrit.osmocom.org/63 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I518c441f11f234b8f34ede5b76671049f06b6599 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Fri May 20 19:16:30 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 20 May 2016 19:16:30 +0000 Subject: openbsc[master]: move to hex TMSI representation In-Reply-To: References: Message-ID: Patch Set 2: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/63 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I518c441f11f234b8f34ede5b76671049f06b6599 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri May 20 19:21:27 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 20 May 2016 19:21:27 +0000 Subject: [PATCH] libosmocore[master]: Revert "gsm48: move to hex TMSI representation" Message-ID: Review at https://gerrit.osmocom.org/86 Revert "gsm48: move to hex TMSI representation" This is a "flag" day change. Old OpenBSC break with new libosmocore because suddenly there is the 0x in front. I am afraid we need to find a better solution here. I think we will need to create a gsm48_mi_to_string variant that takes a mode parameter to enable the TMSI mode and deprecate the old method. Right now we should not break old versions of OpenBSC. This reverts commit 78ad042f94afd5bf7de477ae634e9d2fdd9c9dc4. Change-Id: I2f61e626f2f9088b492e1b643c3dcc9bce77d52b --- M src/gsm/gsm48.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/86/86/1 diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index d0e050b..8a46f76 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -458,10 +458,11 @@ case GSM_MI_TYPE_NONE: break; case GSM_MI_TYPE_TMSI: + /* Table 10.5.4.3, reverse generate_mid_from_tmsi */ if (mi_len == GSM48_TMSI_LEN && mi[0] == (0xf0 | GSM_MI_TYPE_TMSI)) { memcpy(&tmsi, &mi[1], 4); tmsi = ntohl(tmsi); - return snprintf(string, str_len, "0x%08X", tmsi); + return snprintf(string, str_len, "%u", tmsi); } break; case GSM_MI_TYPE_IMSI: -- To view, visit https://gerrit.osmocom.org/86 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2f61e626f2f9088b492e1b643c3dcc9bce77d52b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Fri May 20 19:21:27 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 20 May 2016 19:21:27 +0000 Subject: libosmocore[master]: Revert "gsm48: move to hex TMSI representation" In-Reply-To: References: Message-ID: Holger Freyther has reverted this change. Change subject: Revert "gsm48: move to hex TMSI representation" ...................................................................... Uploaded patch set 1. -- To view, visit https://gerrit.osmocom.org/86 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: revert Gerrit-Change-Id: I2f61e626f2f9088b492e1b643c3dcc9bce77d52b Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Fri May 20 19:22:09 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 20 May 2016 19:22:09 +0000 Subject: [PATCH] libosmocore[master]: Revert "gsm48: move to hex TMSI representation" In-Reply-To: References: Message-ID: Revert "gsm48: move to hex TMSI representation" This is a "flag" day change. Old OpenBSC break with new libosmocore because suddenly there is the 0x in front. I am afraid we need to find a better solution here. I think we will need to create a gsm48_mi_to_string variant that takes a mode parameter to enable the TMSI mode and deprecate the old method. Right now we should not break old versions of OpenBSC. This reverts commit 78ad042f94afd5bf7de477ae634e9d2fdd9c9dc4. Change-Id: I2f61e626f2f9088b492e1b643c3dcc9bce77d52b --- M src/gsm/gsm48.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/86/86/2 diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index d0e050b..8a46f76 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -458,10 +458,11 @@ case GSM_MI_TYPE_NONE: break; case GSM_MI_TYPE_TMSI: + /* Table 10.5.4.3, reverse generate_mid_from_tmsi */ if (mi_len == GSM48_TMSI_LEN && mi[0] == (0xf0 | GSM_MI_TYPE_TMSI)) { memcpy(&tmsi, &mi[1], 4); tmsi = ntohl(tmsi); - return snprintf(string, str_len, "0x%08X", tmsi); + return snprintf(string, str_len, "%u", tmsi); } break; case GSM_MI_TYPE_IMSI: -- To view, visit https://gerrit.osmocom.org/86 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I2f61e626f2f9088b492e1b643c3dcc9bce77d52b Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Fri May 20 19:42:47 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 20 May 2016 19:42:47 +0000 Subject: libosmocore[master]: Revert "gsm48: move to hex TMSI representation" In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/86 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2f61e626f2f9088b492e1b643c3dcc9bce77d52b Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Fri May 20 19:42:50 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Fri, 20 May 2016 19:42:50 +0000 Subject: [MERGED] libosmocore[master]: Revert "gsm48: move to hex TMSI representation" In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: Revert "gsm48: move to hex TMSI representation" ...................................................................... Revert "gsm48: move to hex TMSI representation" This is a "flag" day change. Old OpenBSC break with new libosmocore because suddenly there is the 0x in front. I am afraid we need to find a better solution here. I think we will need to create a gsm48_mi_to_string variant that takes a mode parameter to enable the TMSI mode and deprecate the old method. Right now we should not break old versions of OpenBSC. This reverts commit 78ad042f94afd5bf7de477ae634e9d2fdd9c9dc4. Change-Id: I2f61e626f2f9088b492e1b643c3dcc9bce77d52b Reviewed-on: https://gerrit.osmocom.org/86 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M src/gsm/gsm48.c 1 file changed, 2 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c index d0e050b..8a46f76 100644 --- a/src/gsm/gsm48.c +++ b/src/gsm/gsm48.c @@ -458,10 +458,11 @@ case GSM_MI_TYPE_NONE: break; case GSM_MI_TYPE_TMSI: + /* Table 10.5.4.3, reverse generate_mid_from_tmsi */ if (mi_len == GSM48_TMSI_LEN && mi[0] == (0xf0 | GSM_MI_TYPE_TMSI)) { memcpy(&tmsi, &mi[1], 4); tmsi = ntohl(tmsi); - return snprintf(string, str_len, "0x%08X", tmsi); + return snprintf(string, str_len, "%u", tmsi); } break; case GSM_MI_TYPE_IMSI: -- To view, visit https://gerrit.osmocom.org/86 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2f61e626f2f9088b492e1b643c3dcc9bce77d52b Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat May 21 14:34:29 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 21 May 2016 14:34:29 +0000 Subject: [PATCH] openbsc[master]: drop unneccessary duplicate linking: osmo-bsc Message-ID: Review at https://gerrit.osmocom.org/87 drop unneccessary duplicate linking: osmo-bsc Change-Id: Ia227abcaa7b1f808646aadb9f53ee2a669699c51 --- M openbsc/src/osmo-bsc/Makefile.am 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/87/87/1 diff --git a/openbsc/src/osmo-bsc/Makefile.am b/openbsc/src/osmo-bsc/Makefile.am index 69b363b..4aa1803 100644 --- a/openbsc/src/osmo-bsc/Makefile.am +++ b/openbsc/src/osmo-bsc/Makefile.am @@ -16,7 +16,6 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ - $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOSCCP_LIBS) $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOCTRL_LIBS) \ $(COVERAGE_LDFLAGS) $(LIBOSMOABIS_LIBS) -- To view, visit https://gerrit.osmocom.org/87 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia227abcaa7b1f808646aadb9f53ee2a669699c51 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat May 21 14:34:29 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 21 May 2016 14:34:29 +0000 Subject: [PATCH] openbsc[master]: drop unneccessary duplicate/unused linking: ipaccess Message-ID: Review at https://gerrit.osmocom.org/88 drop unneccessary duplicate/unused linking: ipaccess Drop unused linking of libmsc, and drop duplicate linking of libbsc. Change-Id: If2d63adb832c72ff1a22c25a78e06b0c244628d2 --- M openbsc/src/ipaccess/Makefile.am 1 file changed, 0 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/88/88/1 diff --git a/openbsc/src/ipaccess/Makefile.am b/openbsc/src/ipaccess/Makefile.am index 9a71529..9acc0f7 100644 --- a/openbsc/src/ipaccess/Makefile.am +++ b/openbsc/src/ipaccess/Makefile.am @@ -6,8 +6,6 @@ bin_PROGRAMS = abisip-find ipaccess-config ipaccess-proxy abisip_find_LDADD = $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libmsc/libmsc.a \ - $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(OSMO_LIBS) @@ -17,15 +15,12 @@ # FIXME: resolve the bogus dependencies patched around here: ipaccess_config_LDADD = $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBCRYPT) $(OSMO_LIBS) ipaccess_proxy_SOURCES = ipaccess-proxy.c ipaccess_proxy_LDADD = $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libmsc/libmsc.a \ - $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(OSMO_LIBS) -- To view, visit https://gerrit.osmocom.org/88 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If2d63adb832c72ff1a22c25a78e06b0c244628d2 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat May 21 14:34:29 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 21 May 2016 14:34:29 +0000 Subject: [PATCH] openbsc[master]: drop unneccessary duplicate linking: osmo-nitb Message-ID: Review at https://gerrit.osmocom.org/89 drop unneccessary duplicate linking: osmo-nitb Change-Id: I430adbb1e0c6382317da282bcf5ef73cf9496f80 --- M openbsc/src/osmo-nitb/Makefile.am 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/89/89/1 diff --git a/openbsc/src/osmo-nitb/Makefile.am b/openbsc/src/osmo-nitb/Makefile.am index d3b97f8..3b7cc8d 100644 --- a/openbsc/src/osmo-nitb/Makefile.am +++ b/openbsc/src/osmo-nitb/Makefile.am @@ -11,7 +11,6 @@ osmo_nitb_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ - $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ -ldbi $(LIBCRYPT) \ -- To view, visit https://gerrit.osmocom.org/89 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I430adbb1e0c6382317da282bcf5ef73cf9496f80 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat May 21 14:34:29 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 21 May 2016 14:34:29 +0000 Subject: [PATCH] openbsc[master]: drop unneccessary duplicate linking: tests/gsm0408 Message-ID: Review at https://gerrit.osmocom.org/90 drop unneccessary duplicate linking: tests/gsm0408 Change-Id: I8b6fb27d1db0157cb7d61f18b03f33c4f3168946 --- M openbsc/tests/gsm0408/Makefile.am 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/90/90/1 diff --git a/openbsc/tests/gsm0408/Makefile.am b/openbsc/tests/gsm0408/Makefile.am index ee04102..79fb9f1 100644 --- a/openbsc/tests/gsm0408/Makefile.am +++ b/openbsc/tests/gsm0408/Makefile.am @@ -8,6 +8,5 @@ gsm0408_test_LDADD = $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ - $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOABIS_LIBS) -ldbi -- To view, visit https://gerrit.osmocom.org/90 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8b6fb27d1db0157cb7d61f18b03f33c4f3168946 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat May 21 14:43:19 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 21 May 2016 14:43:19 +0000 Subject: [PATCH] openbsc[master]: rtp_proxy.c: Ensure msgb_alloc is large enough for largest A... Message-ID: Review at https://gerrit.osmocom.org/91 rtp_proxy.c: Ensure msgb_alloc is large enough for largest AMR frame In AMR 12.2 (mode 7), the actual RTP payload is 33 bytes. Howeerver, as we store the length of the (dynamically-sized) AMR payload in the first byte, our buffer needs at least 33+1 byte in size. Change-Id: If1ad5d2d68c85733306c75ea62f67fe8fbc143b3 --- M openbsc/src/libtrau/rtp_proxy.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/91/91/1 diff --git a/openbsc/src/libtrau/rtp_proxy.c b/openbsc/src/libtrau/rtp_proxy.c index 8c982c9..6c04610 100644 --- a/openbsc/src/libtrau/rtp_proxy.c +++ b/openbsc/src/libtrau/rtp_proxy.c @@ -172,7 +172,7 @@ /* always allocate for the maximum possible size to avoid * fragmentation */ new_msg = msgb_alloc(sizeof(struct gsm_data_frame) + - MAX_RTP_PAYLOAD_LEN, "GSM-DATA (TCH)"); + MAX_RTP_PAYLOAD_LEN+1, "GSM-DATA (TCH)"); if (!new_msg) return -ENOMEM; -- To view, visit https://gerrit.osmocom.org/91 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If1ad5d2d68c85733306c75ea62f67fe8fbc143b3 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat May 21 14:43:50 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 21 May 2016 14:43:50 +0000 Subject: [PATCH] openbsc[master]: subscr_name(): Handle case for subscr == NULL Message-ID: Review at https://gerrit.osmocom.org/92 subscr_name(): Handle case for subscr == NULL subscr_name() was called from several places: * either without a check for subscr being NULL, which for example was causing a segfault if we hand-over a channel before identifying the subscriber * or with an explicit NULL check and the ternary operator (?). We now simplify the code by checking for the NULL Subscriber in subscr_name() itself. Change-Id: Ide09f4a515222eb2ec6c25e7a6a8c5f6cc2ffd4b --- M openbsc/src/libbsc/abis_rsl.c M openbsc/src/libcommon/gsm_subscriber_base.c M openbsc/src/libmsc/gsm_04_08.c 3 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/92/92/1 diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c index df76788..868a069 100644 --- a/openbsc/src/libbsc/abis_rsl.c +++ b/openbsc/src/libbsc/abis_rsl.c @@ -1048,7 +1048,7 @@ int i; char *name = ""; - if (lchan && lchan->conn && lchan->conn->subscr) + if (lchan && lchan->conn) name = subscr_name(lchan->conn->subscr); DEBUGP(DMEAS, "[%s] MEASUREMENT RESULT NR=%d ", name, mr->nr); diff --git a/openbsc/src/libcommon/gsm_subscriber_base.c b/openbsc/src/libcommon/gsm_subscriber_base.c index 50f4118..1f98cc6 100644 --- a/openbsc/src/libcommon/gsm_subscriber_base.c +++ b/openbsc/src/libcommon/gsm_subscriber_base.c @@ -43,6 +43,9 @@ char *subscr_name(struct gsm_subscriber *subscr) { + if (!subscr) + return "unknown"; + if (strlen(subscr->name)) return subscr->name; diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index f02f784..8b4ca67 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -447,8 +447,7 @@ msg->lchan = conn->lchan; LOGP(DMM, LOGL_INFO, "Subscriber %s: LOCATION UPDATING REJECT " - "LAC=%u BTS=%u\n", conn->subscr ? - subscr_name(conn->subscr) : "unknown", + "LAC=%u BTS=%u\n", subscr_name(conn->subscr), bts->location_area_code, bts->nr); return gsm48_conn_sendmsg(msg, conn, NULL); @@ -1147,9 +1146,7 @@ break; case GSM48_MT_MM_TMSI_REALL_COMPL: DEBUGP(DMM, "TMSI Reallocation Completed. Subscriber: %s\n", - conn->subscr ? - subscr_name(conn->subscr) : - "unknown subscriber"); + subscr_name(conn->subscr)); release_loc_updating_req(conn, 1); break; case GSM48_MT_MM_IMSI_DETACH_IND: -- To view, visit https://gerrit.osmocom.org/92 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ide09f4a515222eb2ec6c25e7a6a8c5f6cc2ffd4b Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Sat May 21 14:44:15 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 21 May 2016 14:44:15 +0000 Subject: [PATCH] openbsc[master]: gsm04_08_clear_request(): release loc with arg release=0 Message-ID: Review at https://gerrit.osmocom.org/93 gsm04_08_clear_request(): release loc with arg release=0 In gsm04_08_clear_request(), in_release == 1 anyway and msc_release_connection() would exit immediately without any effect. Don't confuse the reader by passing release=1 arg. Change-Id: I5bf9eb4889d32ad5e42ac7d096bf62fa3a493e20 --- M openbsc/src/libmsc/gsm_04_08.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/93/93/1 diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index f02f784..f1b95c1 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -384,7 +384,7 @@ * Cancel any outstanding location updating request * operation taking place on the subscriber connection. */ - release_loc_updating_req(conn, 1); + release_loc_updating_req(conn, 0); /* We might need to cancel the paging response or such. */ if (conn->sec_operation && conn->sec_operation->cb) { -- To view, visit https://gerrit.osmocom.org/93 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5bf9eb4889d32ad5e42ac7d096bf62fa3a493e20 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sat May 21 14:44:15 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sat, 21 May 2016 14:44:15 +0000 Subject: [PATCH] openbsc[master]: tweak db debug log: log TMSI as hex Message-ID: Review at https://gerrit.osmocom.org/94 tweak db debug log: log TMSI as hex Change-Id: I4564c99c145a35fb592c228c1fa84c61ec425fd3 --- M openbsc/src/libmsc/db.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/94/94/1 diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c index e5017ae..b555905 100644 --- a/openbsc/src/libmsc/db.c +++ b/openbsc/src/libmsc/db.c @@ -891,7 +891,7 @@ subscr->id = dbi_result_get_ulonglong(result, "id"); db_set_from_query(subscr, result); - DEBUGP(DDB, "Found Subscriber: ID %llu, IMSI %s, NAME '%s', TMSI %u, EXTEN '%s', LAC %hu, AUTH %u\n", + DEBUGP(DDB, "Found Subscriber: ID %llu, IMSI %s, NAME '%s', TMSI %x, EXTEN '%s', LAC %hu, AUTH %u\n", subscr->id, subscr->imsi, subscr->name, subscr->tmsi, subscr->extension, subscr->lac, subscr->authorized); dbi_result_free(result); -- To view, visit https://gerrit.osmocom.org/94 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4564c99c145a35fb592c228c1fa84c61ec425fd3 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From nhofmeyr at sysmocom.de Sat May 21 14:50:29 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Sat, 21 May 2016 16:50:29 +0200 Subject: untested patch: gprs_cipher_run() invocation Message-ID: <20160521145029.GC2134@dub6> I have this patch, but am not sure how to test its validity. Looks sane though. We were passing a uint64_t kc as uint8_t* to: int gprs_cipher_run(uint8_t *out, uint16_t len, enum gprs_ciph_algo algo, uint8_t *kc, uint32_t iv, enum gprs_cipher_direction dir); so instead of passing kc's address, we would pass the kc *as* address. See attached patch. Any opinions and/or testers? Why would no-one have noticed this before? Thanks! ~Neels -- - Neels Hofmeyr http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Gesch?ftsf?hrer / Managing Directors: Holger Freyther, Harald Welte -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-sgsn-fix-use-of-libosmocore-GPRS-encryption-plugins-.patch Type: text/x-diff Size: 1461 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From gerrit-no-reply at lists.osmocom.org Sat May 21 15:02:54 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 21 May 2016 15:02:54 +0000 Subject: openbsc[master]: drop unneccessary duplicate linking: osmo-bsc In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/87 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia227abcaa7b1f808646aadb9f53ee2a669699c51 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat May 21 15:02:55 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 21 May 2016 15:02:55 +0000 Subject: [MERGED] openbsc[master]: drop unneccessary duplicate linking: osmo-bsc In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: drop unneccessary duplicate linking: osmo-bsc ...................................................................... drop unneccessary duplicate linking: osmo-bsc Change-Id: Ia227abcaa7b1f808646aadb9f53ee2a669699c51 Reviewed-on: https://gerrit.osmocom.org/87 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M openbsc/src/osmo-bsc/Makefile.am 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/openbsc/src/osmo-bsc/Makefile.am b/openbsc/src/osmo-bsc/Makefile.am index 69b363b..4aa1803 100644 --- a/openbsc/src/osmo-bsc/Makefile.am +++ b/openbsc/src/osmo-bsc/Makefile.am @@ -16,7 +16,6 @@ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ - $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOSCCP_LIBS) $(LIBOSMOCORE_LIBS) \ $(LIBOSMOGSM_LIBS) $(LIBOSMOVTY_LIBS) $(LIBOSMOCTRL_LIBS) \ $(COVERAGE_LDFLAGS) $(LIBOSMOABIS_LIBS) -- To view, visit https://gerrit.osmocom.org/87 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia227abcaa7b1f808646aadb9f53ee2a669699c51 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat May 21 15:20:46 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 21 May 2016 15:20:46 +0000 Subject: openbsc[master]: drop unneccessary duplicate/unused linking: ipaccess In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/88 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If2d63adb832c72ff1a22c25a78e06b0c244628d2 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat May 21 15:20:47 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 21 May 2016 15:20:47 +0000 Subject: [MERGED] openbsc[master]: drop unneccessary duplicate/unused linking: ipaccess In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: drop unneccessary duplicate/unused linking: ipaccess ...................................................................... drop unneccessary duplicate/unused linking: ipaccess Drop unused linking of libmsc, and drop duplicate linking of libbsc. Change-Id: If2d63adb832c72ff1a22c25a78e06b0c244628d2 Reviewed-on: https://gerrit.osmocom.org/88 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M openbsc/src/ipaccess/Makefile.am 1 file changed, 0 insertions(+), 5 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/openbsc/src/ipaccess/Makefile.am b/openbsc/src/ipaccess/Makefile.am index 9a71529..9acc0f7 100644 --- a/openbsc/src/ipaccess/Makefile.am +++ b/openbsc/src/ipaccess/Makefile.am @@ -6,8 +6,6 @@ bin_PROGRAMS = abisip-find ipaccess-config ipaccess-proxy abisip_find_LDADD = $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libmsc/libmsc.a \ - $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(OSMO_LIBS) @@ -17,15 +15,12 @@ # FIXME: resolve the bogus dependencies patched around here: ipaccess_config_LDADD = $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBCRYPT) $(OSMO_LIBS) ipaccess_proxy_SOURCES = ipaccess-proxy.c ipaccess_proxy_LDADD = $(top_builddir)/src/libbsc/libbsc.a \ - $(top_builddir)/src/libmsc/libmsc.a \ - $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(OSMO_LIBS) -- To view, visit https://gerrit.osmocom.org/88 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If2d63adb832c72ff1a22c25a78e06b0c244628d2 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat May 21 15:54:34 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 21 May 2016 15:54:34 +0000 Subject: openbsc[master]: drop unneccessary duplicate linking: osmo-nitb In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/89 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I430adbb1e0c6382317da282bcf5ef73cf9496f80 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat May 21 15:54:36 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 21 May 2016 15:54:36 +0000 Subject: [MERGED] openbsc[master]: drop unneccessary duplicate linking: osmo-nitb In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: drop unneccessary duplicate linking: osmo-nitb ...................................................................... drop unneccessary duplicate linking: osmo-nitb Change-Id: I430adbb1e0c6382317da282bcf5ef73cf9496f80 Reviewed-on: https://gerrit.osmocom.org/89 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M openbsc/src/osmo-nitb/Makefile.am 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/openbsc/src/osmo-nitb/Makefile.am b/openbsc/src/osmo-nitb/Makefile.am index d3b97f8..3b7cc8d 100644 --- a/openbsc/src/osmo-nitb/Makefile.am +++ b/openbsc/src/osmo-nitb/Makefile.am @@ -11,7 +11,6 @@ osmo_nitb_LDADD = \ $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ - $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ $(top_builddir)/src/libcommon/libcommon.a \ -ldbi $(LIBCRYPT) \ -- To view, visit https://gerrit.osmocom.org/89 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I430adbb1e0c6382317da282bcf5ef73cf9496f80 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat May 21 17:09:45 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 21 May 2016 17:09:45 +0000 Subject: [PATCH] osmo-pcu[master]: introduce new counter rlc_sent_dummy In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/85 to look at the new patch set (#2). introduce new counter rlc_sent_dummy rlc_sent_dummy count the amount of dummy package which are sent in case no data packet is in the queue. Change-Id: Ia60eab853d9145980f30d63e4ce4b520b8c51381 --- M src/bts.cpp M src/bts.h M src/gprs_rlcmac_sched.cpp 3 files changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/85/85/2 diff --git a/src/bts.cpp b/src/bts.cpp index 715fb51..dcedcd0 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -71,6 +71,7 @@ { "rlc.ack.failed", "RLC Ack Failed "}, { "rlc.rel.timedout", "RLC Release Timeout "}, { "rlc.late-block", "RLC Late Block "}, + { "rlc.sent_dummy", "RLC Send Dummy "}, { "decode.errors", "Decode Errors "}, { "sba.allocated", "SBA Allocated "}, { "sba.freed", "SBA Freed "}, diff --git a/src/bts.h b/src/bts.h index c975304..829e3c2 100644 --- a/src/bts.h +++ b/src/bts.h @@ -233,6 +233,7 @@ CTR_RLC_ACK_FAILED, CTR_RLC_REL_TIMEDOUT, CTR_RLC_LATE_BLOCK, + CTR_RLC_SENT_DUMMY, CTR_DECODE_ERRORS, CTR_SBA_ALLOCATED, CTR_SBA_FREED, @@ -309,6 +310,7 @@ void rlc_ack_failed(); void rlc_rel_timedout(); void rlc_late_block(); + void rlc_sent_dummy(); void decode_error(); void sba_allocated(); void sba_freed(); @@ -449,6 +451,7 @@ CREATE_COUNT_INLINE(rlc_ack_failed, CTR_RLC_ACK_FAILED); CREATE_COUNT_INLINE(rlc_rel_timedout, CTR_RLC_REL_TIMEDOUT); CREATE_COUNT_INLINE(rlc_late_block, CTR_RLC_LATE_BLOCK); +CREATE_COUNT_INLINE(rlc_sent_dummy, CTR_RLC_SENT_DUMMY); CREATE_COUNT_INLINE(decode_error, CTR_DECODE_ERRORS) CREATE_COUNT_INLINE(sba_allocated, CTR_SBA_ALLOCATED) CREATE_COUNT_INLINE(sba_freed, CTR_SBA_FREED) diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index 8e05623..087c03c 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -348,8 +348,12 @@ } /* Prio 3: send dummy contol message */ - if (!msg) + if (!msg) { + /* increase counter */ msg = sched_dummy(); + if (msg) + bts->bts->rlc_sent_dummy(); + } if (!msg) return -ENOMEM; -- To view, visit https://gerrit.osmocom.org/85 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia60eab853d9145980f30d63e4ce4b520b8c51381 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat May 21 17:34:22 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 21 May 2016 17:34:22 +0000 Subject: osmo-pcu[master]: introduce new counter rlc_sent_dummy In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/85/2/src/bts.cpp File src/bts.cpp: PS2, Line 74: Send past vs. present tense here. As this is user facing we might want to be picky here? -- To view, visit https://gerrit.osmocom.org/85 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia60eab853d9145980f30d63e4ce4b520b8c51381 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sat May 21 17:48:49 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 21 May 2016 17:48:49 +0000 Subject: [PATCH] osmo-pcu[master]: introduce new counter rlc_sent_dummy In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/85 to look at the new patch set (#3). introduce new counter rlc_sent_dummy rlc_sent_dummy count the amount of dummy package which are sent in case no data packet is in the queue. Change-Id: Ia60eab853d9145980f30d63e4ce4b520b8c51381 --- M src/bts.cpp M src/bts.h M src/gprs_rlcmac_sched.cpp 3 files changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/85/85/3 diff --git a/src/bts.cpp b/src/bts.cpp index 715fb51..a182317 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -71,6 +71,7 @@ { "rlc.ack.failed", "RLC Ack Failed "}, { "rlc.rel.timedout", "RLC Release Timeout "}, { "rlc.late-block", "RLC Late Block "}, + { "rlc.sent_dummy", "RLC Sent Dummy "}, { "decode.errors", "Decode Errors "}, { "sba.allocated", "SBA Allocated "}, { "sba.freed", "SBA Freed "}, diff --git a/src/bts.h b/src/bts.h index c975304..829e3c2 100644 --- a/src/bts.h +++ b/src/bts.h @@ -233,6 +233,7 @@ CTR_RLC_ACK_FAILED, CTR_RLC_REL_TIMEDOUT, CTR_RLC_LATE_BLOCK, + CTR_RLC_SENT_DUMMY, CTR_DECODE_ERRORS, CTR_SBA_ALLOCATED, CTR_SBA_FREED, @@ -309,6 +310,7 @@ void rlc_ack_failed(); void rlc_rel_timedout(); void rlc_late_block(); + void rlc_sent_dummy(); void decode_error(); void sba_allocated(); void sba_freed(); @@ -449,6 +451,7 @@ CREATE_COUNT_INLINE(rlc_ack_failed, CTR_RLC_ACK_FAILED); CREATE_COUNT_INLINE(rlc_rel_timedout, CTR_RLC_REL_TIMEDOUT); CREATE_COUNT_INLINE(rlc_late_block, CTR_RLC_LATE_BLOCK); +CREATE_COUNT_INLINE(rlc_sent_dummy, CTR_RLC_SENT_DUMMY); CREATE_COUNT_INLINE(decode_error, CTR_DECODE_ERRORS) CREATE_COUNT_INLINE(sba_allocated, CTR_SBA_ALLOCATED) CREATE_COUNT_INLINE(sba_freed, CTR_SBA_FREED) diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index 8e05623..087c03c 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -348,8 +348,12 @@ } /* Prio 3: send dummy contol message */ - if (!msg) + if (!msg) { + /* increase counter */ msg = sched_dummy(); + if (msg) + bts->bts->rlc_sent_dummy(); + } if (!msg) return -ENOMEM; -- To view, visit https://gerrit.osmocom.org/85 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia60eab853d9145980f30d63e4ce4b520b8c51381 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat May 21 17:59:35 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 21 May 2016 17:59:35 +0000 Subject: osmo-pcu[master]: introduce new counter rlc_sent_dummy In-Reply-To: References: Message-ID: Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/85 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia60eab853d9145980f30d63e4ce4b520b8c51381 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat May 21 17:59:37 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 21 May 2016 17:59:37 +0000 Subject: [MERGED] osmo-pcu[master]: introduce new counter rlc_sent_dummy In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: introduce new counter rlc_sent_dummy ...................................................................... introduce new counter rlc_sent_dummy rlc_sent_dummy count the amount of dummy package which are sent in case no data packet is in the queue. Change-Id: Ia60eab853d9145980f30d63e4ce4b520b8c51381 Reviewed-on: https://gerrit.osmocom.org/85 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M src/bts.cpp M src/bts.h M src/gprs_rlcmac_sched.cpp 3 files changed, 9 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/bts.cpp b/src/bts.cpp index 715fb51..a182317 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -71,6 +71,7 @@ { "rlc.ack.failed", "RLC Ack Failed "}, { "rlc.rel.timedout", "RLC Release Timeout "}, { "rlc.late-block", "RLC Late Block "}, + { "rlc.sent_dummy", "RLC Sent Dummy "}, { "decode.errors", "Decode Errors "}, { "sba.allocated", "SBA Allocated "}, { "sba.freed", "SBA Freed "}, diff --git a/src/bts.h b/src/bts.h index c975304..829e3c2 100644 --- a/src/bts.h +++ b/src/bts.h @@ -233,6 +233,7 @@ CTR_RLC_ACK_FAILED, CTR_RLC_REL_TIMEDOUT, CTR_RLC_LATE_BLOCK, + CTR_RLC_SENT_DUMMY, CTR_DECODE_ERRORS, CTR_SBA_ALLOCATED, CTR_SBA_FREED, @@ -309,6 +310,7 @@ void rlc_ack_failed(); void rlc_rel_timedout(); void rlc_late_block(); + void rlc_sent_dummy(); void decode_error(); void sba_allocated(); void sba_freed(); @@ -449,6 +451,7 @@ CREATE_COUNT_INLINE(rlc_ack_failed, CTR_RLC_ACK_FAILED); CREATE_COUNT_INLINE(rlc_rel_timedout, CTR_RLC_REL_TIMEDOUT); CREATE_COUNT_INLINE(rlc_late_block, CTR_RLC_LATE_BLOCK); +CREATE_COUNT_INLINE(rlc_sent_dummy, CTR_RLC_SENT_DUMMY); CREATE_COUNT_INLINE(decode_error, CTR_DECODE_ERRORS) CREATE_COUNT_INLINE(sba_allocated, CTR_SBA_ALLOCATED) CREATE_COUNT_INLINE(sba_freed, CTR_SBA_FREED) diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index 8e05623..087c03c 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -348,8 +348,12 @@ } /* Prio 3: send dummy contol message */ - if (!msg) + if (!msg) { + /* increase counter */ msg = sched_dummy(); + if (msg) + bts->bts->rlc_sent_dummy(); + } if (!msg) return -ENOMEM; -- To view, visit https://gerrit.osmocom.org/85 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia60eab853d9145980f30d63e4ce4b520b8c51381 Gerrit-PatchSet: 4 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sat May 21 20:36:16 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 21 May 2016 20:36:16 +0000 Subject: [PATCH] osmo-pcu[master]: tbf_dl: replace cross-file deklaration with correct header Message-ID: Review at https://gerrit.osmocom.org/95 tbf_dl: replace cross-file deklaration with correct header Change-Id: I9b4eb664d444258c9bcf53f9b44552d8dd3155e9 --- M src/tbf_dl.cpp 1 file changed, 1 insertion(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/95/95/1 diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 62d378f..da6628a 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -34,6 +34,7 @@ extern "C" { #include #include +#include } #include @@ -42,11 +43,6 @@ /* After sending these frames, we poll for ack/nack. */ #define POLL_ACK_AFTER_FRAMES 20 - -extern "C" { -int bssgp_tx_llc_discarded(struct bssgp_bvc_ctx *bctx, uint32_t tlli, - uint8_t num_frames, uint32_t num_octets); -} static inline void tbf_update_ms_class(struct gprs_rlcmac_tbf *tbf, const uint8_t ms_class) -- To view, visit https://gerrit.osmocom.org/95 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9b4eb664d444258c9bcf53f9b44552d8dd3155e9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Sat May 21 21:54:43 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 21 May 2016 21:54:43 +0000 Subject: [PATCH] osmo-pcu[master]: bts/rate_ctr: replace spaces by tabs Message-ID: Review at https://gerrit.osmocom.org/96 bts/rate_ctr: replace spaces by tabs Use tabs like other counters for seperation. Introduced by 2cb1547 Change-Id: I32eebfe5934c919eccc1e28938ca00c49368297e --- M src/bts.cpp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/96/96/1 diff --git a/src/bts.cpp b/src/bts.cpp index a182317..d1636b6 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -71,7 +71,7 @@ { "rlc.ack.failed", "RLC Ack Failed "}, { "rlc.rel.timedout", "RLC Release Timeout "}, { "rlc.late-block", "RLC Late Block "}, - { "rlc.sent_dummy", "RLC Sent Dummy "}, + { "rlc.sent_dummy", "RLC Sent Dummy "}, { "decode.errors", "Decode Errors "}, { "sba.allocated", "SBA Allocated "}, { "sba.freed", "SBA Freed "}, -- To view, visit https://gerrit.osmocom.org/96 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I32eebfe5934c919eccc1e28938ca00c49368297e Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Sat May 21 21:55:41 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 21 May 2016 21:55:41 +0000 Subject: osmo-pcu[master]: bts/rate_ctr: replace spaces by tabs In-Reply-To: References: Message-ID: Patch Set 1: @Holger: this was introduced by the last patch set. Sorry, didn't saw that ther. Fixes #85 -- To view, visit https://gerrit.osmocom.org/96 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I32eebfe5934c919eccc1e28938ca00c49368297e Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat May 21 23:42:55 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 21 May 2016 23:42:55 +0000 Subject: [PATCH] osmo-pcu[master]: introduce new counter rlc_sent_control Message-ID: Review at https://gerrit.osmocom.org/99 introduce new counter rlc_sent_control Counts control messages (UL/DL assignment, UL ACKs or page requests) Change-Id: Ib41031d430beddfb48d54470e632436f2c99c360 --- M src/bts.cpp M src/bts.h M src/gprs_rlcmac_sched.cpp 3 files changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/99/99/1 diff --git a/src/bts.cpp b/src/bts.cpp index d1636b6..fdae1f0 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -72,6 +72,7 @@ { "rlc.rel.timedout", "RLC Release Timeout "}, { "rlc.late-block", "RLC Late Block "}, { "rlc.sent_dummy", "RLC Sent Dummy "}, + { "rlc.sent_control", "RLC Sent Control "}, { "decode.errors", "Decode Errors "}, { "sba.allocated", "SBA Allocated "}, { "sba.freed", "SBA Freed "}, diff --git a/src/bts.h b/src/bts.h index 829e3c2..35f24d1 100644 --- a/src/bts.h +++ b/src/bts.h @@ -234,6 +234,7 @@ CTR_RLC_REL_TIMEDOUT, CTR_RLC_LATE_BLOCK, CTR_RLC_SENT_DUMMY, + CTR_RLC_SENT_CONTROL, CTR_DECODE_ERRORS, CTR_SBA_ALLOCATED, CTR_SBA_FREED, @@ -311,6 +312,7 @@ void rlc_rel_timedout(); void rlc_late_block(); void rlc_sent_dummy(); + void rlc_sent_control(); void decode_error(); void sba_allocated(); void sba_freed(); @@ -452,6 +454,7 @@ CREATE_COUNT_INLINE(rlc_rel_timedout, CTR_RLC_REL_TIMEDOUT); CREATE_COUNT_INLINE(rlc_late_block, CTR_RLC_LATE_BLOCK); CREATE_COUNT_INLINE(rlc_sent_dummy, CTR_RLC_SENT_DUMMY); +CREATE_COUNT_INLINE(rlc_sent_control, CTR_RLC_SENT_CONTROL); CREATE_COUNT_INLINE(decode_error, CTR_DECODE_ERRORS) CREATE_COUNT_INLINE(sba_allocated, CTR_SBA_ALLOCATED) CREATE_COUNT_INLINE(sba_freed, CTR_SBA_FREED) diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index 087c03c..b513b5b 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -339,6 +339,8 @@ /* Prio 1: select control message */ msg = sched_select_ctrl_msg(trx, ts, fn, block_nr, pdch, ul_ass_tbf, dl_ass_tbf, ul_ack_tbf); + if (msg) + bts->bts->rlc_sent_control(); /* Prio 2: select data message for downlink */ if (!msg) { -- To view, visit https://gerrit.osmocom.org/99 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib41031d430beddfb48d54470e632436f2c99c360 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Sat May 21 23:42:55 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Sat, 21 May 2016 23:42:55 +0000 Subject: [PATCH] osmo-pcu[master]: gprs_rlcmac_sched: fix mistype of CONTROL ACK Message-ID: Review at https://gerrit.osmocom.org/100 gprs_rlcmac_sched: fix mistype of CONTROL ACK Change-Id: If37b33f69cd659d913ed81eb6060a42734ba524f --- M src/gprs_rlcmac_sched.cpp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/00/100/1 diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index b513b5b..fce3aaf 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -132,7 +132,7 @@ /* * Assignments for the same direction have lower precedence, - * because they may kill the TBF when the CONTOL ACK is + * because they may kill the TBF when the CONTROL ACK is * received, thus preventing the others from being processed. */ -- To view, visit https://gerrit.osmocom.org/100 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If37b33f69cd659d913ed81eb6060a42734ba524f Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Sun May 22 10:44:02 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 22 May 2016 10:44:02 +0000 Subject: osmo-pcu[master]: bts/rate_ctr: replace spaces by tabs In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/96 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I32eebfe5934c919eccc1e28938ca00c49368297e Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun May 22 10:44:04 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 22 May 2016 10:44:04 +0000 Subject: [MERGED] osmo-pcu[master]: bts/rate_ctr: replace spaces by tabs In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: bts/rate_ctr: replace spaces by tabs ...................................................................... bts/rate_ctr: replace spaces by tabs Use tabs like other counters for seperation. Introduced by 2cb1547 Change-Id: I32eebfe5934c919eccc1e28938ca00c49368297e Reviewed-on: https://gerrit.osmocom.org/96 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M src/bts.cpp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/bts.cpp b/src/bts.cpp index a182317..d1636b6 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -71,7 +71,7 @@ { "rlc.ack.failed", "RLC Ack Failed "}, { "rlc.rel.timedout", "RLC Release Timeout "}, { "rlc.late-block", "RLC Late Block "}, - { "rlc.sent_dummy", "RLC Sent Dummy "}, + { "rlc.sent_dummy", "RLC Sent Dummy "}, { "decode.errors", "Decode Errors "}, { "sba.allocated", "SBA Allocated "}, { "sba.freed", "SBA Freed "}, -- To view, visit https://gerrit.osmocom.org/96 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I32eebfe5934c919eccc1e28938ca00c49368297e Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Sun May 22 10:44:55 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 22 May 2016 10:44:55 +0000 Subject: osmo-pcu[master]: tbf_dl: replace cross-file deklaration with correct header In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/95/1//COMMIT_MSG Commit Message: PS1, Line 7: deklaration declaration :) -- To view, visit https://gerrit.osmocom.org/95 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b4eb664d444258c9bcf53f9b44552d8dd3155e9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Sun May 22 10:45:06 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 22 May 2016 10:45:06 +0000 Subject: [PATCH] osmo-pcu[master]: tbf_dl: replace cross-file declaration with correct header In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/95 to look at the new patch set (#2). tbf_dl: replace cross-file declaration with correct header Change-Id: I9b4eb664d444258c9bcf53f9b44552d8dd3155e9 --- M src/tbf_dl.cpp 1 file changed, 1 insertion(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/95/95/2 diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 62d378f..da6628a 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -34,6 +34,7 @@ extern "C" { #include #include +#include } #include @@ -42,11 +43,6 @@ /* After sending these frames, we poll for ack/nack. */ #define POLL_ACK_AFTER_FRAMES 20 - -extern "C" { -int bssgp_tx_llc_discarded(struct bssgp_bvc_ctx *bctx, uint32_t tlli, - uint8_t num_frames, uint32_t num_octets); -} static inline void tbf_update_ms_class(struct gprs_rlcmac_tbf *tbf, const uint8_t ms_class) -- To view, visit https://gerrit.osmocom.org/95 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9b4eb664d444258c9bcf53f9b44552d8dd3155e9 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun May 22 10:45:35 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 22 May 2016 10:45:35 +0000 Subject: openbsc[master]: subscr_name(): Handle case for subscr == NULL In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/92 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ide09f4a515222eb2ec6c25e7a6a8c5f6cc2ffd4b Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun May 22 10:46:39 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 22 May 2016 10:46:39 +0000 Subject: openbsc[master]: drop unneccessary duplicate linking: tests/gsm0408 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/90 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8b6fb27d1db0157cb7d61f18b03f33c4f3168946 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun May 22 10:46:42 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 22 May 2016 10:46:42 +0000 Subject: [MERGED] openbsc[master]: drop unneccessary duplicate linking: tests/gsm0408 In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: drop unneccessary duplicate linking: tests/gsm0408 ...................................................................... drop unneccessary duplicate linking: tests/gsm0408 Change-Id: I8b6fb27d1db0157cb7d61f18b03f33c4f3168946 Reviewed-on: https://gerrit.osmocom.org/90 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M openbsc/tests/gsm0408/Makefile.am 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/openbsc/tests/gsm0408/Makefile.am b/openbsc/tests/gsm0408/Makefile.am index ee04102..79fb9f1 100644 --- a/openbsc/tests/gsm0408/Makefile.am +++ b/openbsc/tests/gsm0408/Makefile.am @@ -8,6 +8,5 @@ gsm0408_test_LDADD = $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libmsc/libmsc.a \ $(top_builddir)/src/libtrau/libtrau.a \ - $(top_builddir)/src/libbsc/libbsc.a \ $(top_builddir)/src/libcommon/libcommon.a \ $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) $(LIBOSMOABIS_LIBS) -ldbi -- To view, visit https://gerrit.osmocom.org/90 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8b6fb27d1db0157cb7d61f18b03f33c4f3168946 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun May 22 10:59:03 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 22 May 2016 10:59:03 +0000 Subject: osmo-pcu[master]: tbf_dl: replace cross-file declaration with correct header In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/95 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b4eb664d444258c9bcf53f9b44552d8dd3155e9 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun May 22 10:59:05 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 22 May 2016 10:59:05 +0000 Subject: [MERGED] osmo-pcu[master]: tbf_dl: replace cross-file declaration with correct header In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: tbf_dl: replace cross-file declaration with correct header ...................................................................... tbf_dl: replace cross-file declaration with correct header Change-Id: I9b4eb664d444258c9bcf53f9b44552d8dd3155e9 Reviewed-on: https://gerrit.osmocom.org/95 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M src/tbf_dl.cpp 1 file changed, 1 insertion(+), 5 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 62d378f..da6628a 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -34,6 +34,7 @@ extern "C" { #include #include +#include } #include @@ -42,11 +43,6 @@ /* After sending these frames, we poll for ack/nack. */ #define POLL_ACK_AFTER_FRAMES 20 - -extern "C" { -int bssgp_tx_llc_discarded(struct bssgp_bvc_ctx *bctx, uint32_t tlli, - uint8_t num_frames, uint32_t num_octets); -} static inline void tbf_update_ms_class(struct gprs_rlcmac_tbf *tbf, const uint8_t ms_class) -- To view, visit https://gerrit.osmocom.org/95 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9b4eb664d444258c9bcf53f9b44552d8dd3155e9 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun May 22 11:00:27 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 22 May 2016 11:00:27 +0000 Subject: osmo-pcu[master]: gprs_rlcmac_sched: fix mistype of CONTROL ACK In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/100 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If37b33f69cd659d913ed81eb6060a42734ba524f Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun May 22 11:00:29 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 22 May 2016 11:00:29 +0000 Subject: [MERGED] osmo-pcu[master]: gprs_rlcmac_sched: fix mistype of CONTROL ACK In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: gprs_rlcmac_sched: fix mistype of CONTROL ACK ...................................................................... gprs_rlcmac_sched: fix mistype of CONTROL ACK Change-Id: If37b33f69cd659d913ed81eb6060a42734ba524f Reviewed-on: https://gerrit.osmocom.org/100 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M src/gprs_rlcmac_sched.cpp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index 087c03c..cd5f683 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -132,7 +132,7 @@ /* * Assignments for the same direction have lower precedence, - * because they may kill the TBF when the CONTOL ACK is + * because they may kill the TBF when the CONTROL ACK is * received, thus preventing the others from being processed. */ -- To view, visit https://gerrit.osmocom.org/100 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If37b33f69cd659d913ed81eb6060a42734ba524f Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun May 22 11:01:21 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 22 May 2016 11:01:21 +0000 Subject: osmo-pcu[master]: introduce new counter rlc_sent_control In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/99 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib41031d430beddfb48d54470e632436f2c99c360 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun May 22 11:11:53 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 22 May 2016 11:11:53 +0000 Subject: [MERGED] osmo-pcu[master]: introduce new counter rlc_sent_control In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: introduce new counter rlc_sent_control ...................................................................... introduce new counter rlc_sent_control Counts control messages (UL/DL assignment, UL ACKs or page requests) Change-Id: Ib41031d430beddfb48d54470e632436f2c99c360 Reviewed-on: https://gerrit.osmocom.org/99 Reviewed-by: Holger Freyther Tested-by: Jenkins Builder --- M src/bts.cpp M src/bts.h M src/gprs_rlcmac_sched.cpp 3 files changed, 6 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/bts.cpp b/src/bts.cpp index d1636b6..fdae1f0 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -72,6 +72,7 @@ { "rlc.rel.timedout", "RLC Release Timeout "}, { "rlc.late-block", "RLC Late Block "}, { "rlc.sent_dummy", "RLC Sent Dummy "}, + { "rlc.sent_control", "RLC Sent Control "}, { "decode.errors", "Decode Errors "}, { "sba.allocated", "SBA Allocated "}, { "sba.freed", "SBA Freed "}, diff --git a/src/bts.h b/src/bts.h index 829e3c2..35f24d1 100644 --- a/src/bts.h +++ b/src/bts.h @@ -234,6 +234,7 @@ CTR_RLC_REL_TIMEDOUT, CTR_RLC_LATE_BLOCK, CTR_RLC_SENT_DUMMY, + CTR_RLC_SENT_CONTROL, CTR_DECODE_ERRORS, CTR_SBA_ALLOCATED, CTR_SBA_FREED, @@ -311,6 +312,7 @@ void rlc_rel_timedout(); void rlc_late_block(); void rlc_sent_dummy(); + void rlc_sent_control(); void decode_error(); void sba_allocated(); void sba_freed(); @@ -452,6 +454,7 @@ CREATE_COUNT_INLINE(rlc_rel_timedout, CTR_RLC_REL_TIMEDOUT); CREATE_COUNT_INLINE(rlc_late_block, CTR_RLC_LATE_BLOCK); CREATE_COUNT_INLINE(rlc_sent_dummy, CTR_RLC_SENT_DUMMY); +CREATE_COUNT_INLINE(rlc_sent_control, CTR_RLC_SENT_CONTROL); CREATE_COUNT_INLINE(decode_error, CTR_DECODE_ERRORS) CREATE_COUNT_INLINE(sba_allocated, CTR_SBA_ALLOCATED) CREATE_COUNT_INLINE(sba_freed, CTR_SBA_FREED) diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index cd5f683..fce3aaf 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -339,6 +339,8 @@ /* Prio 1: select control message */ msg = sched_select_ctrl_msg(trx, ts, fn, block_nr, pdch, ul_ass_tbf, dl_ass_tbf, ul_ack_tbf); + if (msg) + bts->bts->rlc_sent_control(); /* Prio 2: select data message for downlink */ if (!msg) { -- To view, visit https://gerrit.osmocom.org/99 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib41031d430beddfb48d54470e632436f2c99c360 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Sun May 22 11:16:25 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sun, 22 May 2016 11:16:25 +0000 Subject: openbsc[master]: gsm04_08_clear_request(): release loc with arg release=0 In-Reply-To: References: Message-ID: Patch Set 2: I think what we can argue about is. Either way you need to wonder how the calls deal in case of the release. * Either you know that release_loc_updating_req can be asked not to msc_release_connection * Or you know that because you set in_relase = 1, msc_release_connection will be called but that it is a no-op. So do you really think that doing it this way is more readable/more obvious? -- To view, visit https://gerrit.osmocom.org/93 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5bf9eb4889d32ad5e42ac7d096bf62fa3a493e20 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sun May 22 11:51:18 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 22 May 2016 11:51:18 +0000 Subject: [MERGED] openbsc[master]: subscr_name(): Handle case for subscr == NULL In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: subscr_name(): Handle case for subscr == NULL ...................................................................... subscr_name(): Handle case for subscr == NULL subscr_name() was called from several places: * either without a check for subscr being NULL, which for example was causing a segfault if we hand-over a channel before identifying the subscriber * or with an explicit NULL check and the ternary operator (?). We now simplify the code by checking for the NULL Subscriber in subscr_name() itself. Change-Id: Ide09f4a515222eb2ec6c25e7a6a8c5f6cc2ffd4b Reviewed-on: https://gerrit.osmocom.org/92 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M openbsc/src/libbsc/abis_rsl.c M openbsc/src/libcommon/gsm_subscriber_base.c M openbsc/src/libmsc/gsm_04_08.c 3 files changed, 6 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c index 6cf4e0b..c3a0c5c 100644 --- a/openbsc/src/libbsc/abis_rsl.c +++ b/openbsc/src/libbsc/abis_rsl.c @@ -1051,7 +1051,7 @@ int i; char *name = ""; - if (lchan && lchan->conn && lchan->conn->subscr) + if (lchan && lchan->conn) name = subscr_name(lchan->conn->subscr); DEBUGP(DMEAS, "[%s] MEASUREMENT RESULT NR=%d ", name, mr->nr); diff --git a/openbsc/src/libcommon/gsm_subscriber_base.c b/openbsc/src/libcommon/gsm_subscriber_base.c index 50f4118..1f98cc6 100644 --- a/openbsc/src/libcommon/gsm_subscriber_base.c +++ b/openbsc/src/libcommon/gsm_subscriber_base.c @@ -43,6 +43,9 @@ char *subscr_name(struct gsm_subscriber *subscr) { + if (!subscr) + return "unknown"; + if (strlen(subscr->name)) return subscr->name; diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 0f00db1..68cc906 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -447,8 +447,7 @@ msg->lchan = conn->lchan; LOGP(DMM, LOGL_INFO, "Subscriber %s: LOCATION UPDATING REJECT " - "LAC=%u BTS=%u\n", conn->subscr ? - subscr_name(conn->subscr) : "unknown", + "LAC=%u BTS=%u\n", subscr_name(conn->subscr), bts->location_area_code, bts->nr); return gsm48_conn_sendmsg(msg, conn, NULL); @@ -1153,9 +1152,7 @@ break; case GSM48_MT_MM_TMSI_REALL_COMPL: DEBUGP(DMM, "TMSI Reallocation Completed. Subscriber: %s\n", - conn->subscr ? - subscr_name(conn->subscr) : - "unknown subscriber"); + subscr_name(conn->subscr)); release_loc_updating_req(conn, 1); break; case GSM48_MT_MM_IMSI_DETACH_IND: -- To view, visit https://gerrit.osmocom.org/92 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ide09f4a515222eb2ec6c25e7a6a8c5f6cc2ffd4b Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Sun May 22 11:54:55 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Sun, 22 May 2016 11:54:55 +0000 Subject: openbsc[master]: gsm04_08_clear_request(): release loc with arg release=0 In-Reply-To: References: Message-ID: Patch Set 2: I know that in_release==1 so msc_release_connection() is a nop. It is really weird to set a flag that disables a function completely and then call that function anyway. I find that confusing, but if you don't agree we can drop this change. -- To view, visit https://gerrit.osmocom.org/93 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5bf9eb4889d32ad5e42ac7d096bf62fa3a493e20 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From ilqan678 at gmail.com Sun May 22 13:56:05 2016 From: ilqan678 at gmail.com (=?UTF-8?B?15DXmdec158g15XXmdeZ16E=?=) Date: Sun, 22 May 2016 16:56:05 +0300 Subject: Dynamic parameter changing in OpenBsc/OpenBTS Message-ID: Hello Hello I am using the OpenBTS/OpenBsc software and would like to ask if it is possible to change the following parameters dynamically in the L2/L3 open SW: MCC MNC The name of the network provider Band ARFCN TA filter BA List CA list LAC CRO Parameter: in a rage of -126 to 126 RAC NMO BSIC Cell ID T3212 Power of transmission Neighbor list for UTRA and E-UTRA (System Info 2) I saw that changing these parameters via Vty (telnet) affected only the openbsc.cfg and openbts.cfg files by saving the changes but actually the BSC was not affected from the changes - only after turning the BSC off and on. Can we avoid BSC "restart"? Thanks in advanced, Ilan -------------- next part -------------- An HTML attachment was scrubbed... URL: From holger at freyther.de Sun May 22 14:46:40 2016 From: holger at freyther.de (Holger Freyther) Date: Sun, 22 May 2016 16:46:40 +0200 Subject: Dynamic parameter changing in OpenBsc/OpenBTS In-Reply-To: References: Message-ID: > On 22 May 2016, at 15:56, ???? ???? wrote: > > Hello > Hello Hi! > I saw that changing these parameters via Vty (telnet) affected only the openbsc.cfg and openbts.cfg files by saving the changes but actually the BSC was not affected from the changes - only after turning the BSC off and on. Can we avoid BSC "restart"? some parameters take effect immediately, some the next time the BTS is connected, some (e.g. changing from CCCH to SDCCH+CCH) only on re-start. It would be super nice if you could start writing a section in the BSC/NITB manual about the parameters, what they do, where they are located (e.g. the SIs) and when updating them on VTY when they take effect. Do you think you can start that? holger From nhofmeyr at sysmocom.de Sun May 22 16:28:53 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Sun, 22 May 2016 18:28:53 +0200 Subject: gerrit: merge conflict? Message-ID: <20160522162853.GA15883@dub6> My patches https://gerrit.osmocom.org/93 and 94 show as merge conflict in the overview. Yet when I rebase them onto origin/master, neither has a merge conflict. Before 92 was submitted, gerrit said that 93 conflicted with https://gerrit.osmocom.org/92 which has no overlaps, the changes are more than 60 lines apart. In the log I also see a jenkins build success. I have no idea what to make of this. How can I see merge conflicts that gerrit saw and be less confused? ~Neels -- - Neels Hofmeyr http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Gesch?ftsf?hrer / Managing Directors: Holger Freyther, Harald Welte -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From holger at freyther.de Sun May 22 16:39:22 2016 From: holger at freyther.de (Holger Freyther) Date: Sun, 22 May 2016 18:39:22 +0200 Subject: gerrit: merge conflict? In-Reply-To: <20160522162853.GA15883@dub6> References: <20160522162853.GA15883@dub6> Message-ID: <988E60B4-1ECF-4F36-AD41-C0DBB10AECD1@freyther.de> > On 22 May 2016, at 18:28, Neels Hofmeyr wrote: > > My patches https://gerrit.osmocom.org/93 and 94 show as merge conflict in the > overview. Yet when I rebase them onto origin/master, neither has a merge > conflict. > > Before 92 was submitted, gerrit said that 93 conflicted with > https://gerrit.osmocom.org/92 which has no overlaps, the changes are more than > 60 lines apart. In the log I also see a jenkins build success. > > I have no idea what to make of this. How can I see merge conflicts that gerrit > saw and be less confused? no idea. But in general: * the patch has a parent hat is not in master * I have configured to use "cherry-pick" (as we don't want to have tons of merges just because we merge some older patchset). Maybe it interacts badly with your case? The modes are described here: https://gerrit-review.googlesource.com/Documentation/project-configuration.html#submit_type -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 163 bytes Desc: Message signed with OpenPGP using GPGMail URL: From nhofmeyr at sysmocom.de Sun May 22 18:39:19 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Sun, 22 May 2016 20:39:19 +0200 Subject: IuPS branch / merge to master Message-ID: <20160522183919.GB15883@dub6> Hi Daniel, it seems I'm through with the IuPS branch refactoring. I'm not entirely sure why I'm allowed to do so, but I managed to push the branch to gerrit as refs/heads/sysmocom/iups, so you should see this in origin: sysmocom/iups The branch is fully mergeable to openbsc master as far as I'm concerned, I'm fairly sure that it shouldn't break 2G GPRS -- but untested!! Another limitation: the libosmo-netif and libosmo-sccp branches should possibly be merged to master first. About sysmocom/iups: Most commits have been regrouped and relabeled, yet some remain as they were in the "old" sysmocom/iu branch. I was originally aiming for a 1:1 similarity, but I "had" to change various things: * Some of the commit log messages from sysmocom/iu have been placed in the code as comments instead. * iu_rab_act_ps() was moved (too gprs specific) * some changes were dropped because they were bogus * comments were added, minor cosmetic changes were made * at least the DRANAP, DSUA have been re-ordered cosmetically (to match) * A test failure was fixed * ... * Some "unrelated" patches waiting for review on gerrit are not included in the branch (https://gerrit.osmocom.org/91, 93, 94) Please take a look at the new branch and test it with 3G IuPS. (Since IuCS does not exist on the branch, maybe you need to trick around to have an osmo-cscn? It's an interesting discussion how useful IuPS is without IuCS.) If you have any local further developments on your box, please try to rebase them onto the new branch. If any problems show up, let's clear them in the coming days. Thanks! ~Neels -- - Neels Hofmeyr http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Gesch?ftsf?hrer / Managing Directors: Holger Freyther, Harald Welte -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From nhofmeyr at sysmocom.de Mon May 23 10:47:31 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Mon, 23 May 2016 12:47:31 +0200 Subject: Change in osmo-iuh[master]: attempt to fix parallel build, improve AM logic In-Reply-To: References: Message-ID: <20160523104731.GA1722@ass40.sysmocom.de> This patch has been merged last week, but... On Sun, May 15, 2016 at 11:44:10AM +0000, gerrit-no-reply at lists.osmocom.org wrote: > --- a/include/osmocom/ranap/ranap_ies_defs.h > +++ /dev/null > @@ -1,2967 +0,0 @@ > -/******************************************************************************* > - * This file had been created by asn1tostruct.py script v0.5osmo1 > - * Please do not modify this file but regenerate it via script. > - * Created on: 2016-02-19 16:51:41.625903 by daniel > - * from ['../asn1//ranap/RANAP-PDU-Contents.asn'] > - ******************************************************************************/ > -#include > - I assumed we wanted the ranap_ies_defs.h file to be committed. It is generated automatically, yes, but IMHO it is a good idea to track the changes in the generated code. By having a gen_ranap.stamp, every clean checkout would first regenerate the ranap_ies_defs.h. That would generally be fine to verify that we still have the same ranap_ies_defs.h, except for the comment on top: * Created on: 2016-02-19 16:51:41.625903 by daniel If re-adding the ranap_ies_defs.h to git, we'd also want to drop generation of that line from the py script and leave the change tracking up to git. Am I making sense or should I just drop this? ~Neels -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From msuraev at sysmocom.de Mon May 23 11:08:25 2016 From: msuraev at sysmocom.de (Max) Date: Mon, 23 May 2016 13:08:25 +0200 Subject: Change in osmo-iuh[master]: attempt to fix parallel build, improve AM logic In-Reply-To: <20160523104731.GA1722@ass40.sysmocom.de> References: <20160523104731.GA1722@ass40.sysmocom.de> Message-ID: <5742E4A9.40400@sysmocom.de> I think autogenerated files should be removed from git and created during build time. See for example 84da22f96429f77276783d28622d0c6acb5c484d in libosmocore. This helps to ensure "single source of truth" - everybody using the same place to make changes instead of accidentally changing the file which will be overwritten by .py script next time. On 05/23/2016 12:47 PM, Neels Hofmeyr wrote: > This patch has been merged last week, but... > > On Sun, May 15, 2016 at 11:44:10AM +0000, gerrit-no-reply at lists.osmocom.org wrote: >> --- a/include/osmocom/ranap/ranap_ies_defs.h >> +++ /dev/null >> @@ -1,2967 +0,0 @@ >> -/******************************************************************************* >> - * This file had been created by asn1tostruct.py script v0.5osmo1 >> - * Please do not modify this file but regenerate it via script. >> - * Created on: 2016-02-19 16:51:41.625903 by daniel >> - * from ['../asn1//ranap/RANAP-PDU-Contents.asn'] >> - ******************************************************************************/ >> -#include >> - > I assumed we wanted the ranap_ies_defs.h file to be committed. It is > generated automatically, yes, but IMHO it is a good idea to track the > changes in the generated code. > > By having a gen_ranap.stamp, every clean checkout would first regenerate > the ranap_ies_defs.h. That would generally be fine to verify that we still > have the same ranap_ies_defs.h, except for the comment on top: > > * Created on: 2016-02-19 16:51:41.625903 by daniel > > If re-adding the ranap_ies_defs.h to git, we'd also want to drop > generation of that line from the py script and leave the change tracking > up to git. > > Am I making sense or should I just drop this? > > ~Neels > -- Max Suraev http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Geschaeftsfuehrer / Managing Directors: Holger Freyther, Harald Welte From nhofmeyr at sysmocom.de Mon May 23 12:25:12 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Mon, 23 May 2016 14:25:12 +0200 Subject: Change in osmo-iuh[master]: attempt to fix parallel build, improve AM logic In-Reply-To: <5742E4A9.40400@sysmocom.de> References: <20160523104731.GA1722@ass40.sysmocom.de> <5742E4A9.40400@sysmocom.de> Message-ID: <20160523122512.GA26353@ass40.sysmocom.de> On Mon, May 23, 2016 at 01:08:25PM +0200, Max wrote: > I think autogenerated files should be removed from git and created > during build time. I generally agree for docs, PDFs, images, Makefiles... but in my perception ranap_ies_defs.h is special in that it is actual source code :P I appreciated the fact that we would be alerted to any changes by git. One more vote against tracking and I'll let it go. > See for example > 84da22f96429f77276783d28622d0c6acb5c484d in libosmocore. This helps to > ensure "single source of truth" - everybody using the same place to make > changes instead of accidentally changing the file which will be > overwritten by .py script next time. not sure how this commit relates to the discussion, it doesn't look like an accidental commit? ~Neels -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From msuraev at sysmocom.de Mon May 23 12:53:08 2016 From: msuraev at sysmocom.de (Max) Date: Mon, 23 May 2016 14:53:08 +0200 Subject: Change in osmo-iuh[master]: attempt to fix parallel build, improve AM logic In-Reply-To: <20160523122512.GA26353@ass40.sysmocom.de> References: <20160523104731.GA1722@ass40.sysmocom.de> <5742E4A9.40400@sysmocom.de> <20160523122512.GA26353@ass40.sysmocom.de> Message-ID: <5742FD34.5050103@sysmocom.de> Part of this commit is a build-time script which produces output that "is special in that it is actual source code" :) See also crcXXgen.c.tpl and related code in libosmocore. On 05/23/2016 02:25 PM, Neels Hofmeyr wrote: > not sure how this commit relates to the discussion, it doesn't look > like an accidental commit? ~Neels -- Max Suraev http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Geschaeftsfuehrer / Managing Directors: Holger Freyther, Harald Welte From gerrit-no-reply at lists.osmocom.org Mon May 23 15:30:43 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 23 May 2016 15:30:43 +0000 Subject: [PATCH] openbsc[master]: Fix copy-paste error in SI6 Message-ID: Review at https://gerrit.osmocom.org/101 Fix copy-paste error in SI6 Fix error which prevented enabling DTX for half-rate channels. Change-Id: I7d41df0068783c8fb33ddeeab1d1dcf63c2c259f --- M openbsc/src/libbsc/system_information.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/01/101/1 diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index 1f1d81e..bf20394 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -932,7 +932,7 @@ si6->cell_options = bts->si_common.cell_options; si6->ncc_permitted = bts->si_common.ncc_permitted; /* allow/disallow DTXu */ - gsm48_set_dtx(&si6->cell_options, bts->dtxu, bts->dtxu, true); + gsm48_set_dtx(&si6->cell_options, bts->dtxu, bts->dtxu, false); /* SI6 Rest Octets: 10.5.2.35a: PCH / NCH info, VBS/VGCS options */ -- To view, visit https://gerrit.osmocom.org/101 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d41df0068783c8fb33ddeeab1d1dcf63c2c259f Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Mon May 23 16:14:07 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 May 2016 16:14:07 +0000 Subject: [PATCH] openbsc[master]: filter/nat: Fix the context for the imsi assignment Message-ID: Review at https://gerrit.osmocom.org/102 filter/nat: Fix the context for the imsi assignment In c09f8a3b7fb94ccef41e33c32bfe2bff1ffe0e44 as part of a cleanup I accidently changed the talloc context from "con" to "bsc". The issue occurred at an earlier commit when assigning req.ctx to the "wrong" context. The allocation needs to be scoped by the struct nat_sccp_connection and not the connection from BSC to NAT. Before we have a nat_sccp_connection we scope the copied imsi to the bsc_connection and then steal it, but for the identity resp we will always have a nat_sccp_connection and can already use the right context. Change-Id: I53789aad2809e19338ad3b2deb72c4757e7bd524 Related: OS#1733 --- M openbsc/src/osmo-bsc_nat/bsc_nat_filter.c M openbsc/tests/bsc-nat/bsc_nat_test.c 2 files changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/02/102/1 diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_filter.c b/openbsc/src/osmo-bsc_nat/bsc_nat_filter.c index 393aea3..e735290 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_filter.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_filter.c @@ -109,7 +109,7 @@ if (!hdr48) return -1; - req.ctx = bsc; + req.ctx = con; req.black_list = &bsc->nat->imsi_black_list; req.access_lists = &bsc->nat->access_lists; req.local_lst_name = bsc->cfg->acc_lst_name; diff --git a/openbsc/tests/bsc-nat/bsc_nat_test.c b/openbsc/tests/bsc-nat/bsc_nat_test.c index a405763..b531c6b 100644 --- a/openbsc/tests/bsc-nat/bsc_nat_test.c +++ b/openbsc/tests/bsc-nat/bsc_nat_test.c @@ -978,10 +978,13 @@ } memset(&cause, 0, sizeof(cause)); + OSMO_ASSERT(!con->filter_state.imsi); if (bsc_nat_filter_dt(bsc, msg, con, parsed, &cause) != 1) { printf("FAIL: Should have passed..\n"); abort(); } + OSMO_ASSERT(con->filter_state.imsi); + OSMO_ASSERT(talloc_parent(con->filter_state.imsi) == con); /* just some basic length checking... */ for (i = ARRAY_SIZE(id_resp); i >= 0; --i) { -- To view, visit https://gerrit.osmocom.org/102 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I53789aad2809e19338ad3b2deb72c4757e7bd524 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Mon May 23 16:24:38 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 May 2016 16:24:38 +0000 Subject: openbsc[master]: Fix copy-paste error in SI6 In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/101/1/openbsc/src/libbsc/system_information.c File openbsc/src/libbsc/system_information.c: Line 935: gsm48_set_dtx(&si6->cell_options, bts->dtxu, bts->dtxu, false); Okay. so we are not on BCCH so it needs to be false here. But what do you think of using an enum value in the long run here? -- To view, visit https://gerrit.osmocom.org/101 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7d41df0068783c8fb33ddeeab1d1dcf63c2c259f Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon May 23 16:24:40 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 May 2016 16:24:40 +0000 Subject: [MERGED] openbsc[master]: Fix copy-paste error in SI6 In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: Fix copy-paste error in SI6 ...................................................................... Fix copy-paste error in SI6 Fix error which prevented enabling DTX for half-rate channels. Change-Id: I7d41df0068783c8fb33ddeeab1d1dcf63c2c259f Reviewed-on: https://gerrit.osmocom.org/101 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M openbsc/src/libbsc/system_information.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index 1f1d81e..bf20394 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -932,7 +932,7 @@ si6->cell_options = bts->si_common.cell_options; si6->ncc_permitted = bts->si_common.ncc_permitted; /* allow/disallow DTXu */ - gsm48_set_dtx(&si6->cell_options, bts->dtxu, bts->dtxu, true); + gsm48_set_dtx(&si6->cell_options, bts->dtxu, bts->dtxu, false); /* SI6 Rest Octets: 10.5.2.35a: PCH / NCH info, VBS/VGCS options */ -- To view, visit https://gerrit.osmocom.org/101 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7d41df0068783c8fb33ddeeab1d1dcf63c2c259f Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon May 23 16:25:32 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 May 2016 16:25:32 +0000 Subject: openbsc[master]: gsm04_08_clear_request(): release loc with arg release=0 In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 I have no preference here. I just think we exchange one requirement of knowledge about the code with another one. -- To view, visit https://gerrit.osmocom.org/93 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5bf9eb4889d32ad5e42ac7d096bf62fa3a493e20 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From nhofmeyr at sysmocom.de Mon May 23 16:46:31 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Mon, 23 May 2016 18:46:31 +0200 Subject: do_lchan_free() timer Message-ID: <20160523164631.GA19624@ass40.sysmocom.de> On openbsc master, in do_lchan_free(), a T3111 timer is started in case the lchan is in an error state. Why? 3GPP TS 04.08: The sole purpose of timer T3111 is to let some time [pass] to acknowledge the disconnection and to protect the channel in case of loss of the acknowledge frame. I'm asking because for dyn PDCH, I'm looking at jolly's branch, which adds channel defragmentation: when a channel is released, do_pdch_defrag() closes gaps in the assignments by swapping active channels into empty slots. It appears that the defragmentation code doesn't want to wait for T3111 ... and prefers to run through channel reallocations more quickly, if that makes any sense? Also, I'm not sure whether we want the defragmentation feature at this time. It seems to be orthogonal, not related to dynamic reassignment of TCH <-> PDCH per se. Thanks for any opinions or hints! For details, take a look at a6c1c652e5f9cd7f2e456af39a54b8fafdc5b344 openbsc/src/libbsc/abis_rsl.c:69:do_lchan_free() (branch users/neels/dyn_pdch) ~Neels -- - Neels Hofmeyr http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Gesch?ftsf?hrer / Managing Directors: Holger Freyther, Harald Welte -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From nhofmeyr at sysmocom.de Mon May 23 16:50:00 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Mon, 23 May 2016 18:50:00 +0200 Subject: Change in osmo-iuh[master]: attempt to fix parallel build, improve AM logic In-Reply-To: <5742FD34.5050103@sysmocom.de> References: <20160523104731.GA1722@ass40.sysmocom.de> <5742E4A9.40400@sysmocom.de> <20160523122512.GA26353@ass40.sysmocom.de> <5742FD34.5050103@sysmocom.de> Message-ID: <20160523165000.GB19624@ass40.sysmocom.de> On Mon, May 23, 2016 at 02:53:08PM +0200, Max wrote: > Part of this commit is a build-time script which produces output that > "is special in that it is actual source code" :) right. Hmm. I think my main point after all is that I don't trust the script that generates ranap_ies_defs.h and I feel more warm+fuzzy when the generated result is available in the repo :P It *is* nice to track changes in the generated codes, isn't it? But I guess you're right. ~Neels -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From gerrit-no-reply at lists.osmocom.org Mon May 23 17:06:13 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 May 2016 17:06:13 +0000 Subject: [PATCH] openbsc[master]: bsc: Create minimal SI6 rest octets In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/71 to look at the new patch set (#2). bsc: Create minimal SI6 rest octets In GSM R99 SI6 has mandatory SI6 rest octets and so far we did not include them. Add minimal support to generate the right band indicator. Target a slightly older version of the SI6 rest octets as we neither support MBMS nor Random bit stream but should include the band indicator. Change-Id: I417a40eb91f42a3416b4e07bb9fb4d7a01aaa36b Fixes: OS#1698 Related: OS#1725 --- M openbsc/include/openbsc/rest_octets.h M openbsc/src/libbsc/rest_octets.c M openbsc/src/libbsc/system_information.c 3 files changed, 43 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/71/71/2 diff --git a/openbsc/include/openbsc/rest_octets.h b/openbsc/include/openbsc/rest_octets.h index 32b9963..91413b5 100644 --- a/openbsc/include/openbsc/rest_octets.h +++ b/openbsc/include/openbsc/rest_octets.h @@ -12,6 +12,7 @@ int rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net); int rest_octets_si2quater(uint8_t *data, const struct osmo_earfcn_si2q *e, const uint16_t *u, const uint16_t *sc, size_t u_len); +int rest_octets_si6(uint8_t *data, bool is1800_net); struct gsm48_si_selection_params { uint16_t penalty_time:5, diff --git a/openbsc/src/libbsc/rest_octets.c b/openbsc/src/libbsc/rest_octets.c index aa286e5..065fb7b 100644 --- a/openbsc/src/libbsc/rest_octets.c +++ b/openbsc/src/libbsc/rest_octets.c @@ -450,6 +450,45 @@ return bv.data_len; } + +/* GSM 04.18 ETSI TS 101 503 V8.27.0 (2006-05) + + ::= +{L | H } +{L | H } +{ < DTM_support : bit == L > I < DTM_support : bit == H > +< RAC : bit (8) > +< MAX_LAPDm : bit (3) > } +< Band indicator > +{ L | H < GPRS_MS_TXPWR_MAX_CCH : bit (5) > } +; +*/ +int rest_octets_si6(uint8_t *data, bool is1800_net) +{ + struct bitvec bv; + + memset(&bv, 0, sizeof(bv)); + bv.data = data; + bv.data_len = 1; + + /* no PCH/NCH info */ + bitvec_set_bit(&bv, L); + /* no VBS/VGCS options */ + bitvec_set_bit(&bv, L); + /* no DTM_support */ + bitvec_set_bit(&bv, L); + /* band indicator */ + if (is1800_net) + bitvec_set_bit(&bv, L); + else + bitvec_set_bit(&bv, H); + /* no GPRS_MS_TXPWR_MAX_CCH */ + bitvec_set_bit(&bv, L); + + bitvec_spare_padding(&bv, (bv.data_len * 8) - 1); + return bv.data_len; +} + /* GPRS Mobile Allocation as per TS 04.60 Chapter 12.10a: < GPRS Mobile Allocation IE > ::= < HSN : bit (6) > diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index bf20394..d40bbaf 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -905,6 +905,7 @@ { struct gsm48_system_information_type_6 *si6; int l2_plen = 11; + int rc; memset(output, GSM_MACBLOCK_PADDING, GSM_MACBLOCK_LEN); @@ -935,8 +936,9 @@ gsm48_set_dtx(&si6->cell_options, bts->dtxu, bts->dtxu, false); /* SI6 Rest Octets: 10.5.2.35a: PCH / NCH info, VBS/VGCS options */ + rc = rest_octets_si6(si6->rest_octets, is_dcs_net(bts)); - return l2_plen; + return l2_plen + rc; } static struct gsm48_si13_info si13_default = { -- To view, visit https://gerrit.osmocom.org/71 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I417a40eb91f42a3416b4e07bb9fb4d7a01aaa36b Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From holger at freyther.de Mon May 23 17:07:28 2016 From: holger at freyther.de (Holger Freyther) Date: Mon, 23 May 2016 19:07:28 +0200 Subject: Change in osmo-iuh[master]: attempt to fix parallel build, improve AM logic In-Reply-To: <20160523165000.GB19624@ass40.sysmocom.de> References: <20160523104731.GA1722@ass40.sysmocom.de> <5742E4A9.40400@sysmocom.de> <20160523122512.GA26353@ass40.sysmocom.de> <5742FD34.5050103@sysmocom.de> <20160523165000.GB19624@ass40.sysmocom.de> Message-ID: > On 23 May 2016, at 18:50, Neels Hofmeyr wrote: > > On Mon, May 23, 2016 at 02:53:08PM +0200, Max wrote: >> Part of this commit is a build-time script which produces output that >> "is special in that it is actual source code" :) > > right. Hmm. I think my main point after all is that I don't trust the > script that generates ranap_ies_defs.h and I feel more warm+fuzzy when the > generated result is available in the repo :P > > It *is* nice to track changes in the generated codes, isn't it? > But I guess you're right. your call. I didn't know the history of ranap_ies_defs.h but I had a parallel make issue as well. Feel free to revert that hunk and add a comment in the Makefile so we don't remove it again? holger From holger at freyther.de Mon May 23 17:15:59 2016 From: holger at freyther.de (Holger Freyther) Date: Mon, 23 May 2016 19:15:59 +0200 Subject: do_lchan_free() timer In-Reply-To: <20160523164631.GA19624@ass40.sysmocom.de> References: <20160523164631.GA19624@ass40.sysmocom.de> Message-ID: <57E43FF7-FBD8-4138-B5DD-946F86EF3D60@freyther.de> > On 23 May 2016, at 18:46, Neels Hofmeyr wrote: > > On openbsc master, in do_lchan_free(), a T3111 timer is started in case > the lchan is in an error state. Why? we received a connection failure indication (e.g. LAPDm retransmissions missed N200+1(?) times with T200 for the timeout). Now just because the BTS gave up does not mean the MS stopped broadcasting. It might continue to send it SACCH and cause interference. So we wait a bit before re-using the channel. > Also, I'm not sure whether we want the defragmentation feature at this > time. It seems to be orthogonal, not related to dynamic reassignment of > TCH <-> PDCH per se. I just guess. For GPRS some channel combinations are better for multi-slot assignments than others. So the defrag can be beneficial for some MS classes and some configurations. I don't remember out of my head which classes and which patterns are wanted. holger From holger at freyther.de Mon May 23 18:06:41 2016 From: holger at freyther.de (Holger Freyther) Date: Mon, 23 May 2016 20:06:41 +0200 Subject: openbsc.git branch sysmocom/iu updated. 0.15.0-442-gf3bcdd2 In-Reply-To: <20160509094935.GA1744@dub6> References: <201605041201.u44C1bxf098418@git.osmocom.org> <40A79C41-1B47-471B-93CA-06D0876838ED@freyther.de> <20160506181218.GA5421@dub6> <20160508150251.GA5851@dub6> <20160509094935.GA1744@dub6> Message-ID: > On 09 May 2016, at 11:49, Neels Hofmeyr wrote: > > On Sun, May 08, 2016 at 05:13:51PM +0200, Holger Freyther wrote: >> Have you considered removing the "timeout" from the lower GSM paging code? The interface would be start, cancel and only success would be signaled? Both the MSC paging and BSC paging timeout could be fed from the same timeout value? > > So the MSC tells the BSC to start and stop paging, such that the T3113 is in > the MSC? I'd expect the network design to be intended otherwise, to reduce the > amount of work towards the CN (handle as many details as possible in BSC). No the MSC just commands to page. But it has an internal timer when it gives up and even if there is a paging response will not handle it anymore. > And we want a way that works both with 2G and 3G. Can we tell an RNC to start > and cancel paging? Not that I know of ...? Neither. So it makes sense to have the timeout in the lower layers and one in the MSC/subscriber layer. Only the subscriber layers' timeout should trigger the callback. That is my opinion for the long run architecture. > Another thing: I guess that osmo-bsc should not change behavior with respect to > 3rd party MSCs, right? right. > >> top-up? refill? resume paging? > > /me favors 'resume_paging' > but whether we should spend time changing that is on another page. true. From gerrit-no-reply at lists.osmocom.org Mon May 23 20:20:37 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 May 2016 20:20:37 +0000 Subject: [MERGED] openbsc[master]: gsm04_08_clear_request(): release loc with arg release=0 In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: gsm04_08_clear_request(): release loc with arg release=0 ...................................................................... gsm04_08_clear_request(): release loc with arg release=0 In gsm04_08_clear_request(), in_release == 1 anyway and msc_release_connection() would exit immediately without any effect. Don't confuse the reader by passing release=1 arg. Change-Id: I5bf9eb4889d32ad5e42ac7d096bf62fa3a493e20 Reviewed-on: https://gerrit.osmocom.org/93 Reviewed-by: Holger Freyther Tested-by: Jenkins Builder --- M openbsc/src/libmsc/gsm_04_08.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 68cc906..74da34b 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -384,7 +384,7 @@ * Cancel any outstanding location updating request * operation taking place on the subscriber connection. */ - release_loc_updating_req(conn, 1); + release_loc_updating_req(conn, 0); /* We might need to cancel the paging response or such. */ if (conn->sec_operation && conn->sec_operation->cb) { -- To view, visit https://gerrit.osmocom.org/93 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5bf9eb4889d32ad5e42ac7d096bf62fa3a493e20 Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon May 23 20:23:57 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 May 2016 20:23:57 +0000 Subject: [PATCH] libosmo-sccp[master]: Ignore more build/libtool products In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/72 to look at the new patch set (#2). Ignore more build/libtool products Change-Id: I7b0825112afcb630f40b2d2670952e0beea0a436 --- M .gitignore 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/72/72/2 diff --git a/.gitignore b/.gitignore index 48b2e76..168690a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ *.o *.a +*.lo +*.la .deps Makefile Makefile.in @@ -24,6 +26,11 @@ install-sh missing stamp-h1 + +# libtool +ltmain.sh +libtool +.libs # git-version-gen magic .tarball-version @@ -52,6 +59,8 @@ tests/sccp/sccp_test tests/sms/sms_test tests/timer/timer_test +tests/sigtran/sua_server_test +tests/sigtran/sua_client_test tests/atconfig tests/package.m4 -- To view, visit https://gerrit.osmocom.org/72 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I7b0825112afcb630f40b2d2670952e0beea0a436 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon May 23 20:26:02 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 May 2016 20:26:02 +0000 Subject: openbsc[master]: Make si2q scheduling optional In-Reply-To: References: Message-ID: Patch Set 2: Is there any way we can get a testcase for that? With broken/odd/unusual SIs phones might never attempt to attach to a network. It would be good to have some form of regression test to make sure that with a standard config these SIs don't change. -- To view, visit https://gerrit.osmocom.org/81 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibe997803ffb894133fd4d838410fe735791d414f Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon May 23 20:26:52 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 May 2016 20:26:52 +0000 Subject: libosmocore[master]: add vty call show asciidoc: generate a documentation for cou... In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/70/1/src/vty/stats_vty.c File src/vty/stats_vty.c: Line 397: description, > we can escape those by backslashes. Do we need this to do it right now? htt What do you think? I think we should escape what needs to be escaped? I mean we do it for XML and it should be easy to copy that code? -- To view, visit https://gerrit.osmocom.org/70 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia8af883167e5ee631059299b107ea83c8bbffdfb Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon May 23 20:59:10 2016 From: gerrit-no-reply at lists.osmocom.org (Arran Cudbard-bell) Date: Mon, 23 May 2016 20:59:10 +0000 Subject: libosmo-sccp[master]: Ignore more build/libtool products In-Reply-To: References: Message-ID: Patch Set 2: Looks fine -- To view, visit https://gerrit.osmocom.org/72 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7b0825112afcb630f40b2d2670952e0beea0a436 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Arran Cudbard-bell Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon May 23 21:51:37 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 May 2016 21:51:37 +0000 Subject: libosmo-sccp[master]: Ignore more build/libtool products In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/72 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7b0825112afcb630f40b2d2670952e0beea0a436 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Arran Cudbard-bell Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon May 23 21:51:42 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 23 May 2016 21:51:42 +0000 Subject: [MERGED] libosmo-sccp[master]: Ignore more build/libtool products In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: Ignore more build/libtool products ...................................................................... Ignore more build/libtool products Change-Id: I7b0825112afcb630f40b2d2670952e0beea0a436 Reviewed-on: https://gerrit.osmocom.org/72 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M .gitignore 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/.gitignore b/.gitignore index 48b2e76..168690a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ *.o *.a +*.lo +*.la .deps Makefile Makefile.in @@ -24,6 +26,11 @@ install-sh missing stamp-h1 + +# libtool +ltmain.sh +libtool +.libs # git-version-gen magic .tarball-version @@ -52,6 +59,8 @@ tests/sccp/sccp_test tests/sms/sms_test tests/timer/timer_test +tests/sigtran/sua_server_test +tests/sigtran/sua_client_test tests/atconfig tests/package.m4 -- To view, visit https://gerrit.osmocom.org/72 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7b0825112afcb630f40b2d2670952e0beea0a436 Gerrit-PatchSet: 3 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Arran Cudbard-bell Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon May 23 22:01:07 2016 From: gerrit-no-reply at lists.osmocom.org (Arran Cudbard-bell) Date: Mon, 23 May 2016 22:01:07 +0000 Subject: [PATCH] libosmo-sccp[master]: Add selector for ANSI or ITU variant In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/73 to look at the new patch set (#4). Add selector for ANSI or ITU variant Change-Id: Ia17eef8c9b7d8e1092c587f469b4a68aa9702651 --- M include/sccp/sccp.h M include/sccp/sccp_types.h M src/sccp.c M tests/sccp/sccp_test.c 4 files changed, 135 insertions(+), 59 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/73/73/4 diff --git a/include/sccp/sccp.h b/include/sccp/sccp.h index 36b424f..4b0bbd3 100644 --- a/include/sccp/sccp.h +++ b/include/sccp/sccp.h @@ -46,21 +46,32 @@ SCCP_CONNECTION_STATE_SETUP_ERROR, }; -struct sockaddr_sccp { - sa_family_t sccp_family; /* AF_SCCP in the future??? */ - uint8_t sccp_ssn; /* subssystem number for routing */ +struct sccp_variant { + uint8_t ai_national; /* National or reserved bit */ + uint8_t ai_gti_ind; /* GTI mask */ + uint8_t ai_pc_ind; /* Point code indicator mask */ + uint8_t ai_ssn_ind; /* SSN indicator mask */ + uint8_t ai_route_ind; /* Route type mask */ + uint8_t pc_len; /* Point code length */ + uint8_t pc_first; /* whether the pointcode comes before the SSN */ +}; - /* TODO fill in address indicator... if that is ever needed */ +struct sockaddr_sccp { + sa_family_t sccp_family; /* AF_SCCP in the future??? */ + + uint8_t use_poi : 1, /* Include Point Code */ + use_ssn : 1, /* Include SSN */ + gti_ind : 4, /* Any of SCCP_TITLE_IND_* */ + route_ind : 1, /* Route on SSN instead of GTI */ + national : 1; /* National address format in ANSI, national usage/reserved in ITU */ + + uint8_t poi[3]; /* Allows ITU 14bit and ANSI 24bit */ + + uint8_t ssn; /* SubsSystem number for routing */ /* optional gti information */ - uint8_t *gti; + uint8_t *gti_data; int gti_len; - - /* any of SCCP_TITLE_IND_* */ - uint8_t gti_ind; - - int use_poi; - uint8_t poi[2]; /* not sure about these */ /* uint8_t sccp_class; */ @@ -70,9 +81,8 @@ * parsed structure of an address */ struct sccp_address { - struct sccp_called_party_address address; uint8_t ssn; - uint8_t poi[2]; + uint8_t poi[3]; /* Allows ITU 14bit and ANSI 24bit */ uint8_t *gti_data; int gti_len; @@ -103,6 +113,8 @@ int incoming; }; +extern struct sccp_variant sccp_variant[]; + /** * system functionality to implement on top of any other transport layer: * call sccp_system_incoming for incoming data (from the network) @@ -122,7 +134,7 @@ int sccp_connection_free(struct sccp_connection *connection); /** - * internal.. + * internal.. */ int sccp_connection_force_free(struct sccp_connection *conn); @@ -157,6 +169,7 @@ int sccp_set_read(const struct sockaddr_sccp *sock, int (*read_cb)(struct msgb *msgb, unsigned int, void *user_data), void *user_data); +void sccp_set_variant(int variant); /* generic sock addresses */ extern const struct sockaddr_sccp sccp_ssn_bssap; diff --git a/include/sccp/sccp_types.h b/include/sccp/sccp_types.h index 986de0d..cd60c25 100644 --- a/include/sccp/sccp_types.h +++ b/include/sccp/sccp_types.h @@ -26,6 +26,12 @@ #include +/* Which variant of SCCP we're using */ +enum { + SCCP_VARIANT_ITU, + SCCP_VARIANT_ANSI +}; + /* Table 1/Q.713 - SCCP message types */ enum sccp_message_types { SCCP_MSG_TYPE_CR = 1, diff --git a/src/sccp.c b/src/sccp.c index e6c538d..2c52839 100644 --- a/src/sccp.c +++ b/src/sccp.c @@ -46,16 +46,40 @@ .sccp_ssn = SCCP_SSN_BSSAP, }; +struct sccp_variant sccp_variant[] = { + [SCCP_VARIANT_ITU] = { + .ai_national = 0x80, + .ai_gti_ind = 0x3c, + .ai_pc_ind = 0x01, + .ai_ssn_ind = 0x02, + .ai_route_ind = 0x40, + .pc_len = 2, + .pc_first = 1 + }, + [SCCP_VARIANT_ANSI] = { + .ai_national = 0x80, + .ai_gti_ind = 0x3c, + .ai_pc_ind = 0x02, + .ai_ssn_ind = 0x01, + .ai_route_ind = 0x40, + .pc_len = 3, + .pc_first = 0, + } +}; + struct sccp_system { /* layer3 -> layer2 */ void (*write_data)(struct sccp_connection *conn, struct msgb *data, void *gctx, void *ctx); void *write_context; + + int variant; }; static struct sccp_system sccp_system = { .write_data = NULL, + .variant = SCCP_VARIANT_ITU }; struct sccp_data_callback { @@ -105,11 +129,13 @@ */ static int copy_address(struct sccp_address *addr, uint8_t offset, struct msgb *msgb) { - struct sccp_called_party_address *party; - int room = msgb_l2len(msgb) - offset; + + uint8_t *data; uint8_t read = 0; uint8_t length; + uint8_t ai; + uint8_t pc_len = sccp_variant[sccp_system.variant].pc_len; if (room <= 0) { LOGP(DSCCP, LOGL_ERROR, "Not enough room for an address: %u\n", room); @@ -122,36 +148,48 @@ return -1; } + data = msgb->l2h + offset + 1; + ai = data[0]; + read++; - party = (struct sccp_called_party_address *)(msgb->l2h + offset + 1); - if (party->point_code_indicator) { - if (length <= read + 2) { - LOGP(DSCCP, LOGL_ERROR, "POI does not fit %u\n", length); - return -1; - } +#define PARSE_POI \ + do { \ + if (ai & sccp_variant[sccp_system.variant].ai_pc_ind) { \ + if (length < (read + pc_len)) { \ + LOGP(DSCCP, LOGL_ERROR, "POI does not fit %u\n", length); \ + return -1; \ + } \ + memcpy(&addr->poi, &data[read], pc_len); \ + read += pc_len; \ + } \ + } while (0) +#define PARSE_SSN \ + do { \ + if (ai & sccp_variant[sccp_system.variant].ai_ssn_ind) { \ + if (length < (read + 1)) { \ + LOGP(DSCCP, LOGL_ERROR, "SSN does not fit %u\n", length); \ + return -1; \ + } \ + addr->ssn = data[read]; \ + read += 1; \ + } \ + } while (0) - memcpy(&addr->poi, &party->data[read], 2); - read += 2; - } - - if (party->ssn_indicator) { - if (length <= read + 1) { - LOGP(DSCCP, LOGL_ERROR, "SSN does not fit %u\n", length); - return -1; - } - - addr->ssn = party->data[read]; - read += 1; + if (sccp_variant[sccp_system.variant].pc_first) { + PARSE_POI; + PARSE_SSN; + } else { + PARSE_SSN; + PARSE_POI; } /* copy the GTI over */ - if (party->global_title_indicator) { - addr->gti_len = length - read - 1; - addr->gti_data = &party->data[read]; + if (ai & sccp_variant[sccp_system.variant].ai_gti) { + addr->gti_len = length - read; + addr->gti_data = &data[read]; } - addr->address = *party; return 0; } @@ -173,7 +211,6 @@ uint8_t length = msgb->l2h[offset + read + 1]; read += 2 + length; - if (room <= read) { LOGP(DSCCP, LOGL_ERROR, @@ -486,32 +523,47 @@ int sccp_create_sccp_addr(struct msgb *msg, const struct sockaddr_sccp *sock) { uint8_t *len, *ai, *gti; + uint8_t *poi; + uint8_t pc_len = sccp_variant[sccp_system.variant].pc_len; len = msgb_put(msg, 1); ai = msgb_put(msg, 1); + if (sock->gti_data) ai[0] = (sock->gti_ind & 0x0f) << 2; + if (sock->route_ind || !sock->gti_data) ai[0] |= sccp_variant[sccp_system.variant].ai_route_ind; - if (sock->gti) - ai[0] = 0 << 6 | (sock->gti_ind & 0x0f) << 2 | 1 << 1; - else - ai[0] = 1 << 6 | 1 << 1; + /* National/reserved bit */ + if (sock->national) ai[0] |= sccp_variant[sccp_system.variant].ai_national; - /* store a point code */ - if (sock->use_poi) { - uint8_t *poi; + /* Pointcode ind */ + if (sock->use_poi) ai[0] |= sccp_variant[sccp_system.variant].ai_pc_ind; - ai[0] |= 0x01; - poi = msgb_put(msg, 2); - poi[0] = sock->poi[0]; - poi[1] = sock->poi[1]; + /* SSN ind */ + ai[0] |= sccp_variant[sccp_system.variant].ai_ssn_ind; + +#define ADD_POI \ + do { \ + if (sock->use_poi) { \ + poi = msgb_put(msg, pc_len); \ + if (!poi) return -1; \ + memcpy(poi, &sock->poi[0], pc_len); \ + } \ + } while (0) + +#define ADD_SSN \ + msgb_v_put(msg, sock->ssn) + + if (sccp_variant[sccp_system.variant].pc_first) { + ADD_POI; + ADD_SSN; + } else { + ADD_SSN; + ADD_POI; } - - /* copy the SSN */ - msgb_v_put(msg, sock->sccp_ssn); /* copy the gti if it is present */ gti = msgb_put(msg, sock->gti_len); - memcpy(gti, sock->gti, sock->gti_len); + memcpy(gti, sock->gti_data, sock->gti_len); /* update the length now */ len[0] = msg->tail - len - 1; @@ -1225,6 +1277,11 @@ return 0; } +void sccp_set_variant(int variant) +{ + sccp_system.variant = variant; +} + /* oh my god a real SCCP packet. need to dispatch it now */ int sccp_system_incoming(struct msgb *msgb) { @@ -1355,7 +1412,7 @@ if (!sock) return -2; - cb = _find_ssn(sock->sccp_ssn); + cb = _find_ssn(sock->ssn); if (!cb) return -1; @@ -1378,7 +1435,7 @@ if (!sock) return -2; - cb = _find_ssn(sock->sccp_ssn); + cb = _find_ssn(sock->ssn); if (!cb) return -1; diff --git a/tests/sccp/sccp_test.c b/tests/sccp/sccp_test.c index 6043cff..f3155d3 100644 --- a/tests/sccp/sccp_test.c +++ b/tests/sccp/sccp_test.c @@ -873,15 +873,15 @@ if (parse_result[current_test].dst_ssn != -1 && parse_result[current_test].dst_ssn != result.called.ssn) { - FAIL("Called SSN is wrong..\n"); + FAIL("Called SSN is wrong...\n"); } if (parse_result[current_test].src_gti_len != result.calling.gti_len) { - FAIL("GTI length is wrong: %d\n", result.calling.gti_len); + FAIL("GTI length is wrong: Expected %d, got %d\n", parse_result[current_test].src_gti_len, result.calling.gti_len); } if (parse_result[current_test].dst_gti_len != result.called.gti_len) { - FAIL("GTI length is wrong: %d\n", result.called.gti_len); + FAIL("GTI length is wrong: Expected %d, got %d\n", parse_result[current_test].dst_gti_len, result.called.gti_len); } if (memcmp(&parse_result[current_test].dst_gti_data[0], -- To view, visit https://gerrit.osmocom.org/73 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia17eef8c9b7d8e1092c587f469b4a68aa9702651 Gerrit-PatchSet: 4 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Arran Cudbard-bell Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon May 23 22:02:28 2016 From: gerrit-no-reply at lists.osmocom.org (Arran Cudbard-bell) Date: Mon, 23 May 2016 22:02:28 +0000 Subject: [PATCH] libosmo-sccp[master]: Add selector for ANSI or ITU variant In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/73 to look at the new patch set (#5). Add selector for ANSI or ITU variant Change-Id: Ia17eef8c9b7d8e1092c587f469b4a68aa9702651 --- M include/sccp/sccp.h M include/sccp/sccp_types.h M src/sccp.c M tests/sccp/sccp_test.c 4 files changed, 147 insertions(+), 76 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/73/73/5 diff --git a/include/sccp/sccp.h b/include/sccp/sccp.h index 36b424f..37a3b61 100644 --- a/include/sccp/sccp.h +++ b/include/sccp/sccp.h @@ -46,36 +46,35 @@ SCCP_CONNECTION_STATE_SETUP_ERROR, }; -struct sockaddr_sccp { - sa_family_t sccp_family; /* AF_SCCP in the future??? */ - uint8_t sccp_ssn; /* subssystem number for routing */ +struct sccp_variant { + uint8_t ai_national; /* National or reserved bit */ + uint8_t ai_gti_ind; /* GTI mask */ + uint8_t ai_pc_ind; /* Point code indicator mask */ + uint8_t ai_ssn_ind; /* SSN indicator mask */ + uint8_t ai_route_ind; /* Route type mask */ + uint8_t pc_len; /* Point code length */ + uint8_t pc_first; /* whether the pointcode comes before the SSN */ +}; - /* TODO fill in address indicator... if that is ever needed */ +struct sockaddr_sccp { + sa_family_t sccp_family; /* AF_SCCP in the future??? */ + + uint8_t use_poi : 1, /* Include Point Code */ + use_ssn : 1, /* Include SSN */ + gti_ind : 4, /* Any of SCCP_TITLE_IND_* */ + route_ind : 1, /* Route on SSN instead of GTI */ + national : 1; /* National address format in ANSI, national usage/reserved in ITU */ + + uint8_t poi[3]; /* Allows ITU 14bit and ANSI 24bit */ + + uint8_t ssn; /* SubsSystem number for routing */ /* optional gti information */ - uint8_t *gti; + uint8_t *gti_data; int gti_len; - - /* any of SCCP_TITLE_IND_* */ - uint8_t gti_ind; - - int use_poi; - uint8_t poi[2]; /* not sure about these */ /* uint8_t sccp_class; */ -}; - -/* - * parsed structure of an address - */ -struct sccp_address { - struct sccp_called_party_address address; - uint8_t ssn; - uint8_t poi[2]; - - uint8_t *gti_data; - int gti_len; }; struct sccp_optional_data { @@ -103,6 +102,8 @@ int incoming; }; +extern struct sccp_variant sccp_variant[]; + /** * system functionality to implement on top of any other transport layer: * call sccp_system_incoming for incoming data (from the network) @@ -122,7 +123,7 @@ int sccp_connection_free(struct sccp_connection *connection); /** - * internal.. + * internal.. */ int sccp_connection_force_free(struct sccp_connection *conn); @@ -157,6 +158,7 @@ int sccp_set_read(const struct sockaddr_sccp *sock, int (*read_cb)(struct msgb *msgb, unsigned int, void *user_data), void *user_data); +void sccp_set_variant(int variant); /* generic sock addresses */ extern const struct sockaddr_sccp sccp_ssn_bssap; @@ -177,8 +179,8 @@ * Below this are helper functions and structs for parsing SCCP messages */ struct sccp_parse_result { - struct sccp_address called; - struct sccp_address calling; + struct sockaddr_sccp called; + struct sockaddr_sccp calling; /* point to the msg packet */ struct sccp_source_reference *source_local_reference; diff --git a/include/sccp/sccp_types.h b/include/sccp/sccp_types.h index 986de0d..cd60c25 100644 --- a/include/sccp/sccp_types.h +++ b/include/sccp/sccp_types.h @@ -26,6 +26,12 @@ #include +/* Which variant of SCCP we're using */ +enum { + SCCP_VARIANT_ITU, + SCCP_VARIANT_ANSI +}; + /* Table 1/Q.713 - SCCP message types */ enum sccp_message_types { SCCP_MSG_TYPE_CR = 1, diff --git a/src/sccp.c b/src/sccp.c index e6c538d..d756b8d 100644 --- a/src/sccp.c +++ b/src/sccp.c @@ -43,7 +43,28 @@ /* global data */ const struct sockaddr_sccp sccp_ssn_bssap = { .sccp_family = 0, - .sccp_ssn = SCCP_SSN_BSSAP, + .ssn = SCCP_SSN_BSSAP, +}; + +struct sccp_variant sccp_variant[] = { + [SCCP_VARIANT_ITU] = { + .ai_national = 0x80, + .ai_gti_ind = 0x3c, + .ai_pc_ind = 0x01, + .ai_ssn_ind = 0x02, + .ai_route_ind = 0x40, + .pc_len = 2, + .pc_first = 1 + }, + [SCCP_VARIANT_ANSI] = { + .ai_national = 0x80, + .ai_gti_ind = 0x3c, + .ai_pc_ind = 0x02, + .ai_ssn_ind = 0x01, + .ai_route_ind = 0x40, + .pc_len = 3, + .pc_first = 0, + } }; struct sccp_system { @@ -51,11 +72,14 @@ void (*write_data)(struct sccp_connection *conn, struct msgb *data, void *gctx, void *ctx); void *write_context; + + int variant; }; static struct sccp_system sccp_system = { .write_data = NULL, + .variant = SCCP_VARIANT_ITU }; struct sccp_data_callback { @@ -103,13 +127,15 @@ /* * parsing routines */ -static int copy_address(struct sccp_address *addr, uint8_t offset, struct msgb *msgb) +static int copy_address(struct sockaddr_sccp *addr, uint8_t offset, struct msgb *msgb) { - struct sccp_called_party_address *party; - int room = msgb_l2len(msgb) - offset; + + uint8_t *data; uint8_t read = 0; uint8_t length; + uint8_t ai; + uint8_t pc_len = sccp_variant[sccp_system.variant].pc_len; if (room <= 0) { LOGP(DSCCP, LOGL_ERROR, "Not enough room for an address: %u\n", room); @@ -122,36 +148,54 @@ return -1; } + data = msgb->l2h + offset + 1; + ai = data[0]; + read++; - party = (struct sccp_called_party_address *)(msgb->l2h + offset + 1); - if (party->point_code_indicator) { - if (length <= read + 2) { - LOGP(DSCCP, LOGL_ERROR, "POI does not fit %u\n", length); - return -1; - } +#define PARSE_POI \ + do { \ + if (ai & sccp_variant[sccp_system.variant].ai_pc_ind) { \ + addr->use_poi = 1; \ + if (length < (read + pc_len)) { \ + LOGP(DSCCP, LOGL_ERROR, "POI does not fit %u\n", length); \ + return -1; \ + } \ + memcpy(&addr->poi, &data[read], pc_len); \ + read += pc_len; \ + } \ + } while (0) +#define PARSE_SSN \ + do { \ + if (ai & sccp_variant[sccp_system.variant].ai_ssn_ind) { \ + addr->use_ssn = 1; \ + if (length < (read + 1)) { \ + LOGP(DSCCP, LOGL_ERROR, "SSN does not fit %u\n", length); \ + return -1; \ + } \ + addr->ssn = data[read]; \ + read += 1; \ + } \ + } while (0) - memcpy(&addr->poi, &party->data[read], 2); - read += 2; + if (sccp_variant[sccp_system.variant].pc_first) { + PARSE_POI; + PARSE_SSN; + } else { + PARSE_SSN; + PARSE_POI; } - if (party->ssn_indicator) { - if (length <= read + 1) { - LOGP(DSCCP, LOGL_ERROR, "SSN does not fit %u\n", length); - return -1; - } - - addr->ssn = party->data[read]; - read += 1; - } + addr->gti_ind = ((ai & sccp_variant[sccp_system.variant].ai_gti_ind) >> 2); + addr->route_ind = ai & sccp_variant[sccp_system.variant].ai_route_ind; + addr->national = ai & sccp_variant[sccp_system.variant].ai_national; /* copy the GTI over */ - if (party->global_title_indicator) { - addr->gti_len = length - read - 1; - addr->gti_data = &party->data[read]; + if (addr->gti_ind) { + addr->gti_len = length - read; + addr->gti_data = &data[read]; } - addr->address = *party; return 0; } @@ -173,7 +217,6 @@ uint8_t length = msgb->l2h[offset + read + 1]; read += 2 + length; - if (room <= read) { LOGP(DSCCP, LOGL_ERROR, @@ -486,32 +529,47 @@ int sccp_create_sccp_addr(struct msgb *msg, const struct sockaddr_sccp *sock) { uint8_t *len, *ai, *gti; + uint8_t *poi; + uint8_t pc_len = sccp_variant[sccp_system.variant].pc_len; len = msgb_put(msg, 1); ai = msgb_put(msg, 1); + if (sock->gti_data) ai[0] = (sock->gti_ind & 0x0f) << 2; + if (sock->route_ind || !sock->gti_data) ai[0] |= sccp_variant[sccp_system.variant].ai_route_ind; - if (sock->gti) - ai[0] = 0 << 6 | (sock->gti_ind & 0x0f) << 2 | 1 << 1; - else - ai[0] = 1 << 6 | 1 << 1; + /* National/reserved bit */ + if (sock->national) ai[0] |= sccp_variant[sccp_system.variant].ai_national; - /* store a point code */ - if (sock->use_poi) { - uint8_t *poi; + /* Pointcode ind */ + if (sock->use_poi) ai[0] |= sccp_variant[sccp_system.variant].ai_pc_ind; - ai[0] |= 0x01; - poi = msgb_put(msg, 2); - poi[0] = sock->poi[0]; - poi[1] = sock->poi[1]; + /* SSN ind */ + ai[0] |= sccp_variant[sccp_system.variant].ai_ssn_ind; + +#define ADD_POI \ + do { \ + if (sock->use_poi) { \ + poi = msgb_put(msg, pc_len); \ + if (!poi) return -1; \ + memcpy(poi, &sock->poi[0], pc_len); \ + } \ + } while (0) + +#define ADD_SSN \ + msgb_v_put(msg, sock->ssn) + + if (sccp_variant[sccp_system.variant].pc_first) { + ADD_POI; + ADD_SSN; + } else { + ADD_SSN; + ADD_POI; } - - /* copy the SSN */ - msgb_v_put(msg, sock->sccp_ssn); /* copy the gti if it is present */ gti = msgb_put(msg, sock->gti_len); - memcpy(gti, sock->gti, sock->gti_len); + memcpy(gti, sock->gti_data, sock->gti_len); /* update the length now */ len[0] = msg->tail - len - 1; @@ -1225,6 +1283,11 @@ return 0; } +void sccp_set_variant(int variant) +{ + sccp_system.variant = variant; +} + /* oh my god a real SCCP packet. need to dispatch it now */ int sccp_system_incoming(struct msgb *msgb) { @@ -1355,7 +1418,7 @@ if (!sock) return -2; - cb = _find_ssn(sock->sccp_ssn); + cb = _find_ssn(sock->ssn); if (!cb) return -1; @@ -1378,7 +1441,7 @@ if (!sock) return -2; - cb = _find_ssn(sock->sccp_ssn); + cb = _find_ssn(sock->ssn); if (!cb) return -1; diff --git a/tests/sccp/sccp_test.c b/tests/sccp/sccp_test.c index 6043cff..8d430d9 100644 --- a/tests/sccp/sccp_test.c +++ b/tests/sccp/sccp_test.c @@ -305,7 +305,7 @@ }; static const uint8_t it_test[] = { -0x10, 0x01, 0x07, +0x10, 0x01, 0x07, 0x94, 0x01, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00 }; static const uint8_t proto_err[] = { @@ -873,15 +873,15 @@ if (parse_result[current_test].dst_ssn != -1 && parse_result[current_test].dst_ssn != result.called.ssn) { - FAIL("Called SSN is wrong..\n"); + FAIL("Called SSN is wrong...\n"); } if (parse_result[current_test].src_gti_len != result.calling.gti_len) { - FAIL("GTI length is wrong: %d\n", result.calling.gti_len); + FAIL("GTI length is wrong: Expected %d, got %d\n", parse_result[current_test].src_gti_len, result.calling.gti_len); } if (parse_result[current_test].dst_gti_len != result.called.gti_len) { - FAIL("GTI length is wrong: %d\n", result.called.gti_len); + FAIL("GTI length is wrong: Expected %d, got %d\n", parse_result[current_test].dst_gti_len, result.called.gti_len); } if (memcmp(&parse_result[current_test].dst_gti_data[0], @@ -919,7 +919,7 @@ const struct sockaddr_sccp sccp_poi_bssap = { .sccp_family = 0, - .sccp_ssn = SCCP_SSN_BSSAP, + .ssn = SCCP_SSN_BSSAP, .poi = {0x01, 0x00}, .use_poi = 1, }; @@ -934,10 +934,10 @@ const struct sockaddr_sccp sccp_gti_bssap = { .sccp_family = 0, - .sccp_ssn = 7, + .ssn = 7, .gti_ind = 4, .gti_len = ARRAY_SIZE(gti_dat), - .gti = gti_dat, + .gti_data = gti_dat, }; static uint8_t gti_out[] = { -- To view, visit https://gerrit.osmocom.org/73 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia17eef8c9b7d8e1092c587f469b4a68aa9702651 Gerrit-PatchSet: 5 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Arran Cudbard-bell Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon May 23 22:03:56 2016 From: gerrit-no-reply at lists.osmocom.org (Arran Cudbard-bell) Date: Mon, 23 May 2016 22:03:56 +0000 Subject: [PATCH] libosmo-sccp[master]: Add selector for ANSI or ITU variant In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/73 to look at the new patch set (#6). Add selector for ANSI or ITU variant Change-Id: Ia17eef8c9b7d8e1092c587f469b4a68aa9702651 --- M include/sccp/sccp.h M include/sccp/sccp_types.h M src/sccp.c M tests/sccp/sccp_test.c 4 files changed, 146 insertions(+), 75 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/73/73/6 diff --git a/include/sccp/sccp.h b/include/sccp/sccp.h index 36b424f..37a3b61 100644 --- a/include/sccp/sccp.h +++ b/include/sccp/sccp.h @@ -46,36 +46,35 @@ SCCP_CONNECTION_STATE_SETUP_ERROR, }; -struct sockaddr_sccp { - sa_family_t sccp_family; /* AF_SCCP in the future??? */ - uint8_t sccp_ssn; /* subssystem number for routing */ +struct sccp_variant { + uint8_t ai_national; /* National or reserved bit */ + uint8_t ai_gti_ind; /* GTI mask */ + uint8_t ai_pc_ind; /* Point code indicator mask */ + uint8_t ai_ssn_ind; /* SSN indicator mask */ + uint8_t ai_route_ind; /* Route type mask */ + uint8_t pc_len; /* Point code length */ + uint8_t pc_first; /* whether the pointcode comes before the SSN */ +}; - /* TODO fill in address indicator... if that is ever needed */ +struct sockaddr_sccp { + sa_family_t sccp_family; /* AF_SCCP in the future??? */ + + uint8_t use_poi : 1, /* Include Point Code */ + use_ssn : 1, /* Include SSN */ + gti_ind : 4, /* Any of SCCP_TITLE_IND_* */ + route_ind : 1, /* Route on SSN instead of GTI */ + national : 1; /* National address format in ANSI, national usage/reserved in ITU */ + + uint8_t poi[3]; /* Allows ITU 14bit and ANSI 24bit */ + + uint8_t ssn; /* SubsSystem number for routing */ /* optional gti information */ - uint8_t *gti; + uint8_t *gti_data; int gti_len; - - /* any of SCCP_TITLE_IND_* */ - uint8_t gti_ind; - - int use_poi; - uint8_t poi[2]; /* not sure about these */ /* uint8_t sccp_class; */ -}; - -/* - * parsed structure of an address - */ -struct sccp_address { - struct sccp_called_party_address address; - uint8_t ssn; - uint8_t poi[2]; - - uint8_t *gti_data; - int gti_len; }; struct sccp_optional_data { @@ -103,6 +102,8 @@ int incoming; }; +extern struct sccp_variant sccp_variant[]; + /** * system functionality to implement on top of any other transport layer: * call sccp_system_incoming for incoming data (from the network) @@ -122,7 +123,7 @@ int sccp_connection_free(struct sccp_connection *connection); /** - * internal.. + * internal.. */ int sccp_connection_force_free(struct sccp_connection *conn); @@ -157,6 +158,7 @@ int sccp_set_read(const struct sockaddr_sccp *sock, int (*read_cb)(struct msgb *msgb, unsigned int, void *user_data), void *user_data); +void sccp_set_variant(int variant); /* generic sock addresses */ extern const struct sockaddr_sccp sccp_ssn_bssap; @@ -177,8 +179,8 @@ * Below this are helper functions and structs for parsing SCCP messages */ struct sccp_parse_result { - struct sccp_address called; - struct sccp_address calling; + struct sockaddr_sccp called; + struct sockaddr_sccp calling; /* point to the msg packet */ struct sccp_source_reference *source_local_reference; diff --git a/include/sccp/sccp_types.h b/include/sccp/sccp_types.h index 986de0d..cd60c25 100644 --- a/include/sccp/sccp_types.h +++ b/include/sccp/sccp_types.h @@ -26,6 +26,12 @@ #include +/* Which variant of SCCP we're using */ +enum { + SCCP_VARIANT_ITU, + SCCP_VARIANT_ANSI +}; + /* Table 1/Q.713 - SCCP message types */ enum sccp_message_types { SCCP_MSG_TYPE_CR = 1, diff --git a/src/sccp.c b/src/sccp.c index e6c538d..d756b8d 100644 --- a/src/sccp.c +++ b/src/sccp.c @@ -43,7 +43,28 @@ /* global data */ const struct sockaddr_sccp sccp_ssn_bssap = { .sccp_family = 0, - .sccp_ssn = SCCP_SSN_BSSAP, + .ssn = SCCP_SSN_BSSAP, +}; + +struct sccp_variant sccp_variant[] = { + [SCCP_VARIANT_ITU] = { + .ai_national = 0x80, + .ai_gti_ind = 0x3c, + .ai_pc_ind = 0x01, + .ai_ssn_ind = 0x02, + .ai_route_ind = 0x40, + .pc_len = 2, + .pc_first = 1 + }, + [SCCP_VARIANT_ANSI] = { + .ai_national = 0x80, + .ai_gti_ind = 0x3c, + .ai_pc_ind = 0x02, + .ai_ssn_ind = 0x01, + .ai_route_ind = 0x40, + .pc_len = 3, + .pc_first = 0, + } }; struct sccp_system { @@ -51,11 +72,14 @@ void (*write_data)(struct sccp_connection *conn, struct msgb *data, void *gctx, void *ctx); void *write_context; + + int variant; }; static struct sccp_system sccp_system = { .write_data = NULL, + .variant = SCCP_VARIANT_ITU }; struct sccp_data_callback { @@ -103,13 +127,15 @@ /* * parsing routines */ -static int copy_address(struct sccp_address *addr, uint8_t offset, struct msgb *msgb) +static int copy_address(struct sockaddr_sccp *addr, uint8_t offset, struct msgb *msgb) { - struct sccp_called_party_address *party; - int room = msgb_l2len(msgb) - offset; + + uint8_t *data; uint8_t read = 0; uint8_t length; + uint8_t ai; + uint8_t pc_len = sccp_variant[sccp_system.variant].pc_len; if (room <= 0) { LOGP(DSCCP, LOGL_ERROR, "Not enough room for an address: %u\n", room); @@ -122,36 +148,54 @@ return -1; } + data = msgb->l2h + offset + 1; + ai = data[0]; + read++; - party = (struct sccp_called_party_address *)(msgb->l2h + offset + 1); - if (party->point_code_indicator) { - if (length <= read + 2) { - LOGP(DSCCP, LOGL_ERROR, "POI does not fit %u\n", length); - return -1; - } +#define PARSE_POI \ + do { \ + if (ai & sccp_variant[sccp_system.variant].ai_pc_ind) { \ + addr->use_poi = 1; \ + if (length < (read + pc_len)) { \ + LOGP(DSCCP, LOGL_ERROR, "POI does not fit %u\n", length); \ + return -1; \ + } \ + memcpy(&addr->poi, &data[read], pc_len); \ + read += pc_len; \ + } \ + } while (0) +#define PARSE_SSN \ + do { \ + if (ai & sccp_variant[sccp_system.variant].ai_ssn_ind) { \ + addr->use_ssn = 1; \ + if (length < (read + 1)) { \ + LOGP(DSCCP, LOGL_ERROR, "SSN does not fit %u\n", length); \ + return -1; \ + } \ + addr->ssn = data[read]; \ + read += 1; \ + } \ + } while (0) - memcpy(&addr->poi, &party->data[read], 2); - read += 2; + if (sccp_variant[sccp_system.variant].pc_first) { + PARSE_POI; + PARSE_SSN; + } else { + PARSE_SSN; + PARSE_POI; } - if (party->ssn_indicator) { - if (length <= read + 1) { - LOGP(DSCCP, LOGL_ERROR, "SSN does not fit %u\n", length); - return -1; - } - - addr->ssn = party->data[read]; - read += 1; - } + addr->gti_ind = ((ai & sccp_variant[sccp_system.variant].ai_gti_ind) >> 2); + addr->route_ind = ai & sccp_variant[sccp_system.variant].ai_route_ind; + addr->national = ai & sccp_variant[sccp_system.variant].ai_national; /* copy the GTI over */ - if (party->global_title_indicator) { - addr->gti_len = length - read - 1; - addr->gti_data = &party->data[read]; + if (addr->gti_ind) { + addr->gti_len = length - read; + addr->gti_data = &data[read]; } - addr->address = *party; return 0; } @@ -173,7 +217,6 @@ uint8_t length = msgb->l2h[offset + read + 1]; read += 2 + length; - if (room <= read) { LOGP(DSCCP, LOGL_ERROR, @@ -486,32 +529,47 @@ int sccp_create_sccp_addr(struct msgb *msg, const struct sockaddr_sccp *sock) { uint8_t *len, *ai, *gti; + uint8_t *poi; + uint8_t pc_len = sccp_variant[sccp_system.variant].pc_len; len = msgb_put(msg, 1); ai = msgb_put(msg, 1); + if (sock->gti_data) ai[0] = (sock->gti_ind & 0x0f) << 2; + if (sock->route_ind || !sock->gti_data) ai[0] |= sccp_variant[sccp_system.variant].ai_route_ind; - if (sock->gti) - ai[0] = 0 << 6 | (sock->gti_ind & 0x0f) << 2 | 1 << 1; - else - ai[0] = 1 << 6 | 1 << 1; + /* National/reserved bit */ + if (sock->national) ai[0] |= sccp_variant[sccp_system.variant].ai_national; - /* store a point code */ - if (sock->use_poi) { - uint8_t *poi; + /* Pointcode ind */ + if (sock->use_poi) ai[0] |= sccp_variant[sccp_system.variant].ai_pc_ind; - ai[0] |= 0x01; - poi = msgb_put(msg, 2); - poi[0] = sock->poi[0]; - poi[1] = sock->poi[1]; + /* SSN ind */ + ai[0] |= sccp_variant[sccp_system.variant].ai_ssn_ind; + +#define ADD_POI \ + do { \ + if (sock->use_poi) { \ + poi = msgb_put(msg, pc_len); \ + if (!poi) return -1; \ + memcpy(poi, &sock->poi[0], pc_len); \ + } \ + } while (0) + +#define ADD_SSN \ + msgb_v_put(msg, sock->ssn) + + if (sccp_variant[sccp_system.variant].pc_first) { + ADD_POI; + ADD_SSN; + } else { + ADD_SSN; + ADD_POI; } - - /* copy the SSN */ - msgb_v_put(msg, sock->sccp_ssn); /* copy the gti if it is present */ gti = msgb_put(msg, sock->gti_len); - memcpy(gti, sock->gti, sock->gti_len); + memcpy(gti, sock->gti_data, sock->gti_len); /* update the length now */ len[0] = msg->tail - len - 1; @@ -1225,6 +1283,11 @@ return 0; } +void sccp_set_variant(int variant) +{ + sccp_system.variant = variant; +} + /* oh my god a real SCCP packet. need to dispatch it now */ int sccp_system_incoming(struct msgb *msgb) { @@ -1355,7 +1418,7 @@ if (!sock) return -2; - cb = _find_ssn(sock->sccp_ssn); + cb = _find_ssn(sock->ssn); if (!cb) return -1; @@ -1378,7 +1441,7 @@ if (!sock) return -2; - cb = _find_ssn(sock->sccp_ssn); + cb = _find_ssn(sock->ssn); if (!cb) return -1; diff --git a/tests/sccp/sccp_test.c b/tests/sccp/sccp_test.c index 6043cff..6ea31dd 100644 --- a/tests/sccp/sccp_test.c +++ b/tests/sccp/sccp_test.c @@ -305,7 +305,7 @@ }; static const uint8_t it_test[] = { -0x10, 0x01, 0x07, +0x10, 0x01, 0x07, 0x94, 0x01, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00 }; static const uint8_t proto_err[] = { @@ -877,11 +877,11 @@ } if (parse_result[current_test].src_gti_len != result.calling.gti_len) { - FAIL("GTI length is wrong: %d\n", result.calling.gti_len); + FAIL("GTI length is wrong: Expected %d, got %d\n", parse_result[current_test].src_gti_len, result.calling.gti_len); } if (parse_result[current_test].dst_gti_len != result.called.gti_len) { - FAIL("GTI length is wrong: %d\n", result.called.gti_len); + FAIL("GTI length is wrong: Expected %d, got %d\n", parse_result[current_test].dst_gti_len, result.called.gti_len); } if (memcmp(&parse_result[current_test].dst_gti_data[0], @@ -919,7 +919,7 @@ const struct sockaddr_sccp sccp_poi_bssap = { .sccp_family = 0, - .sccp_ssn = SCCP_SSN_BSSAP, + .ssn = SCCP_SSN_BSSAP, .poi = {0x01, 0x00}, .use_poi = 1, }; @@ -934,10 +934,10 @@ const struct sockaddr_sccp sccp_gti_bssap = { .sccp_family = 0, - .sccp_ssn = 7, + .ssn = 7, .gti_ind = 4, .gti_len = ARRAY_SIZE(gti_dat), - .gti = gti_dat, + .gti_data = gti_dat, }; static uint8_t gti_out[] = { -- To view, visit https://gerrit.osmocom.org/73 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia17eef8c9b7d8e1092c587f469b4a68aa9702651 Gerrit-PatchSet: 6 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Arran Cudbard-bell Gerrit-Reviewer: Arran Cudbard-bell Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From a.cudbardb at freeradius.org Mon May 23 22:23:02 2016 From: a.cudbardb at freeradius.org (Arran Cudbard-Bell) Date: Mon, 23 May 2016 18:23:02 -0400 Subject: Splitting out M3UA and MTP3 out of Open BSC into a separate library Message-ID: <06E62BB0-16D7-4272-B70F-94A132B83D3A@freeradius.org> Hi, Developing a module for FreeRADIUS to support EAP-SIM and EAP-AKA authentication against a HLR. The HLR we were targeting only supported a SCTP/M3UA/SCCP/TCAP/MAP stack, so we couldn't use SUA. Ripping the M3UA/MTP3 code out of OpenBSC worked surprisingly well. We ended up running the event loop in a separate thread to work around the threading issues. Unfortunately the HLR implements the ANSI variant of everything, whereas OpenBSC and supporting libraries seem to have been written to be compatible with the ITU standards. ...but the differences are fairly minor at MTP3 and SCCP layers, and i've started work on a patchset for libosmo-sccp. https://gerrit.osmocom.org/#/c/73/ Anyway, trying to gauge interest in splitting those layers out of Open BSC into a separate library, would be happy to take on M2UA as well for consistency. It would almost certainly get more projects using the code. There's very little out there even in Perl land for working with SS7. Thanks, -Arran Arran Cudbard-Bell FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 842 bytes Desc: Message signed with OpenPGP using GPGMail URL: From jonathan.brielmaier at web.de Mon May 23 22:28:00 2016 From: jonathan.brielmaier at web.de (Jonathan Brielmaier) Date: Tue, 24 May 2016 00:28:00 +0200 Subject: [PATCH 1/1] fix typos in all manuals Message-ID: <1464042480-16934-1-git-send-email-jonathan.brielmaier@web.de> Hello, I fixed typos in the osmo-gsm-manuals repository. This is my first contribution to the Osmocom project so I'm not quite sure if I did all the things (patch, email) in the right way. Best Regards Jonathan Brielmaier --- OsmoBSC/chapters/alink.adoc | 4 ++-- OsmoBSC/chapters/overview.adoc | 4 ++-- OsmoBTS/abis/rsl.adoc | 4 ++-- OsmoBTS/chapters/architecture.adoc | 2 +- OsmoBTS/chapters/bts-models.adoc | 10 +++++----- OsmoBTS/chapters/interfaces.adoc | 2 +- OsmoBTS/osmobts-abis.adoc | 2 +- OsmoNITB/chapters/mncc.adoc | 2 +- OsmoNITB/chapters/net.adoc | 2 +- OsmoNITB/chapters/running.adoc | 4 ++-- OsmoNITB/chapters/smpp.adoc | 2 +- OsmoPCU/chapters/configuration.adoc | 6 +++--- OsmoPCU/chapters/overview.adoc | 2 +- OsmoPCU/osmopcu-gb.adoc | 2 +- OsmoSGSN/chapters/configuration.adoc | 2 +- OsmoSGSN/chapters/gsup.adoc | 4 ++-- common/chapters/gb.adoc | 2 +- common/chapters/glossary.adoc | 10 +++++----- common/chapters/preface.adoc | 10 +++++----- common/chapters/vty.adoc | 8 ++++---- 20 files changed, 42 insertions(+), 42 deletions(-) diff --git a/OsmoBSC/chapters/alink.adoc b/OsmoBSC/chapters/alink.adoc index 37e64c0..081e03f 100644 --- a/OsmoBSC/chapters/alink.adoc +++ b/OsmoBSC/chapters/alink.adoc @@ -3,12 +3,12 @@ OsmoBSC implements a minimal sub-set of the GSM A interface as specified in TS 08.08. -Unlike classic A interface implementations for E1 interfacs, OsmoBSC +Unlike classic A interface implementations for E1 interface, OsmoBSC implements a variant of encapsulating the A interface over IP. To do so, the SCCP messages are wrapped in an IPA multiplex and then communicated over TCP. The audio channels are mapped to RTP streams. -This protcol stacking is sometimes called "SCCPlite". +This protocol stacking is sometimes called "SCCPlite". === diff --git a/OsmoBSC/chapters/overview.adoc b/OsmoBSC/chapters/overview.adoc index 6577df8..580a42e 100644 --- a/OsmoBSC/chapters/overview.adoc +++ b/OsmoBSC/chapters/overview.adoc @@ -9,7 +9,7 @@ aspects of configuring and running the OsmoBSC. OsmoBSC is one particular version of the OpenBSC software suite. -Unlike the highly integrated OmsoNITB, OsmoBSC impleents a more classic +Unlike the highly integrated OmsoNITB, OsmoBSC implements a more classic GSM Base Station Controller with A-bis interface towards BTSs and A interface towards a MSC. @@ -39,7 +39,7 @@ implements a variant of encapsulating the A interface over IP. To do so, the SCCP messages are wrapped in an IPA multiplex and then communicated over TCP. The audio channels are mapped to RTP streams. -This protcol stacking is sometimes called "SCCPlite". +This protocol stacking is sometimes called "SCCPlite". For more information, see <>. diff --git a/OsmoBTS/abis/rsl.adoc b/OsmoBTS/abis/rsl.adoc index f32fb94..331ccb3 100644 --- a/OsmoBTS/abis/rsl.adoc +++ b/OsmoBTS/abis/rsl.adoc @@ -91,7 +91,7 @@ Specific limitations apply, see the linked sections. | 8.4.24 | ROUND TRIP DELAY REPORT | 8.4.25 | PRE-HANDOVER NOTIFICATION | 8.4.26 | MULTIRATE CODEC MODIFICATION REQUEST -| 8.4.27 | MULTIRATE CODEC MODIFICATION ACKNOLEWDGE +| 8.4.27 | MULTIRATE CODEC MODIFICATION ACKNOWLEDGE | 8.4.28 | MULTIRATE CODEC MODIFICATION NEGATIVE ACKNOWLEDGE | 8.4.29 | MULTIRATE CODEC MODIFICATION PERFORMED | 8.4.30 | TFO REPORT @@ -115,7 +115,7 @@ Specific limitations apply, see the linked sections. Conforms to 3GPP TS 08.58 ? 8.4.8 with this limitation: -._Measuremet Result_ IE limitations +._Measurement Result_ IE limitations [options="header",cols="10%,30%,60%"] |=== | TS 08.58 ? | IE Name | Handling diff --git a/OsmoBTS/chapters/architecture.adoc b/OsmoBTS/chapters/architecture.adoc index aca5bb9..a0e66cd 100644 --- a/OsmoBTS/chapters/architecture.adoc +++ b/OsmoBTS/chapters/architecture.adoc @@ -83,7 +83,7 @@ order to specify which PHY instance is allocated to this specific TRX. | common | bts_controlif_setup() | Initialization of Control Interface | bts-specific | bts_model_ctrl_cmds_install() | Install model-specific control interface commands | common | telnet_init() | Initialization of telnet interface -| common | pcu_sock_init() | Initializaiton of PCU socket +| common | pcu_sock_init() | Initialization of PCU socket | common | main() | Installation of signal handlers | common | abis_open() | Start of the A-bis connection to BSC | common | phy_links_open() | Iterate over list of configured PHY links diff --git a/OsmoBTS/chapters/bts-models.adoc b/OsmoBTS/chapters/bts-models.adoc index 5a967f6..a4c65d2 100644 --- a/OsmoBTS/chapters/bts-models.adoc +++ b/OsmoBTS/chapters/bts-models.adoc @@ -33,10 +33,10 @@ Each bts_model may offer == `osmo-bts-sysmo` for sysmocom sysmoBTS -The sysmocom sysmoBTS is a range of GSM BTSs basd around an embedded +The sysmocom sysmoBTS is a range of GSM BTSs based around an embedded system implementing the PHY in a combination of DSP+FPGA. The PHY is configured by a set of primitives described by header files. Those -primitives are exchanged ove a set of message queues exposed on the +primitives are exchanged over a set of message queues exposed on the Linux-running ARM core via device nodes in `/dev/msgq/`. Internally, the message queues map to shared memory between the Linux-running ARM core and the DSP running the PHY implementation. @@ -62,7 +62,7 @@ vice-versa. <> for further information. *--pcu-direct*:: Indicate that an external PCU (e.g. OsmoPCU) will directly - open the DSP messge queues to the PHY / PH-SAP, and only MPH + open the DSP message queues to the PHY / PH-SAP, and only MPH primitives are passed via OsmoBTS. @@ -225,7 +225,7 @@ human-readable format to current VTY session. ===== `osmotrx ip HOST` -Set the IP addess of the OsmoTRX transceiver to which we should connect +Set the IP address of the OsmoTRX transceiver to which we should connect to. ===== `osmotrx base-port (local|remote) <0-65535>` @@ -293,7 +293,7 @@ OCTPKT session, which is mapped to an OsmoBTS PHY link. Depending on the OCTSDR-2G software version, you may create multiple software TRX by creating multiple OsmoBTS PHY instances inside that PHY link. -Multiple DSPs may exsist in one circuit board, then each of the DSPs is +Multiple DSPs may exist in one circuit board, then each of the DSPs is interfaced by one OsmoBTS PHY link, and each of them may have one or more OsmoBTS PHY instances creating a Multi-TRX configuration. diff --git a/OsmoBTS/chapters/interfaces.adoc b/OsmoBTS/chapters/interfaces.adoc index f5bf1b2..a95f524 100644 --- a/OsmoBTS/chapters/interfaces.adoc +++ b/OsmoBTS/chapters/interfaces.adoc @@ -51,7 +51,7 @@ limited and largely depends on the bts_model used. ==== trx.N.thermal-attenuation -The idea of this paramter is to attenuate the system output power as part of +The idea of this parameter is to attenuate the system output power as part of thermal management. In some cases the PA might be passing a critical level, so an external control process can use this attribute to reduce the system output power. diff --git a/OsmoBTS/osmobts-abis.adoc b/OsmoBTS/osmobts-abis.adoc index 6b4f0da..930cbfb 100644 --- a/OsmoBTS/osmobts-abis.adoc +++ b/OsmoBTS/osmobts-abis.adoc @@ -11,7 +11,7 @@ these are not or not fully implemented, as well as OsmoBTS-specific extensions to the A-bis interface not specified by 3GPP. Extensions to the A-bis interface specific to OsmoBTS are detailed in this -document. For details on the messages and IEs that comply with abovementioned +document. For details on the messages and IEs that comply with above mentioned 3GPP specifications, please refer to those documents. .3GPP document versions referred to by this document diff --git a/OsmoNITB/chapters/mncc.adoc b/OsmoNITB/chapters/mncc.adoc index 2b75923..504ce09 100644 --- a/OsmoNITB/chapters/mncc.adoc +++ b/OsmoNITB/chapters/mncc.adoc @@ -181,7 +181,7 @@ NITB and an external MNCC handler. Direction: both -Transfer the payload of a GSM Enanced Full-Rate (EFR) voice frame +Transfer the payload of a GSM Enhanced Full-Rate (EFR) voice frame between the NITB and an external MNCC handler. ==== GSM_TCHH_FRAME diff --git a/OsmoNITB/chapters/net.adoc b/OsmoNITB/chapters/net.adoc index ecd0889..455e1a6 100644 --- a/OsmoNITB/chapters/net.adoc +++ b/OsmoNITB/chapters/net.adoc @@ -62,7 +62,7 @@ OpenBSC(config-net)# mobile network code 89 The __MM INFO__ procedure can be used after a successful __LOCATION UPDATE__ in order to transmit the human-readable network name as well as -local time zone information to the MS. gq +local time zone information to the MS. By default, MM INFO is not active. You can activate it, and set its configuration using the VTY. An example is provided below. diff --git a/OsmoNITB/chapters/running.adoc b/OsmoNITB/chapters/running.adoc index 47b5eb7..423ecf7 100644 --- a/OsmoNITB/chapters/running.adoc +++ b/OsmoNITB/chapters/running.adoc @@ -29,7 +29,7 @@ arguments: for more information. *-T, --timestamp*:: Enable time-stamping of log messages to stderr. This has mostly - been deprecated by VTY based logging configu- ration, see + been deprecated by VTY based logging configuration, see <> for more information. *-e, --log-level 'LOGLEVEL'*:: Set the global log level for logging to stderr. This has mostly @@ -42,7 +42,7 @@ arguments: Authorize every subscriber to the network. This corresponds to the `auth-policy open` VTY configuration option. + - WARNING:: This is dangerous as you may disrupt sevices to + WARNING:: This is dangerous as you may disrupt services to subscribers that are not part of your network! Don't use unless you absolutely know what you're doing! *-P, --rtp-proxy*:: diff --git a/OsmoNITB/chapters/smpp.adoc b/OsmoNITB/chapters/smpp.adoc index 1550abd..2557580 100644 --- a/OsmoNITB/chapters/smpp.adoc +++ b/OsmoNITB/chapters/smpp.adoc @@ -37,7 +37,7 @@ ESMEs are permitted to access the SMSC (`closed`), or whether any ESME should be accepted (`accept-all`). Use the `smpp-first` command to define if SMPP routes have higher -precendence than MSISDNs contained in the HLR (`smpp-first`), or if +precedence than MSISDNs contained in the HLR (`smpp-first`), or if only MSISDNs found not in the HLR should be considered for routing to SMPP (`no smpp-first`). diff --git a/OsmoPCU/chapters/configuration.adoc b/OsmoPCU/chapters/configuration.adoc index 1a86f32..bcf3ad7 100644 --- a/OsmoPCU/chapters/configuration.adoc +++ b/OsmoPCU/chapters/configuration.adoc @@ -59,7 +59,7 @@ reached, a higher coding scheme is chosen. You can use the `cs link-quality-ranges cs1 <0-35> cs2 <0-35> <0-35> cs3 <0-35> <0-35> cs4 <0-35>` command at the `pcu` VTY config node to tune -the link quality ranges for the respecive coding schemes. +the link quality ranges for the respective coding schemes. ==== Data Size based CS downgrade Threshold @@ -114,7 +114,7 @@ filter). ==== Normal BSSGP Flow Control Tuning parameters You can use the following commands at the `pcu` VTY config node to tune -the the BSSGP flow control parameters: +the BSSGP flow control parameters: `flow-control-interval <1-10>`:: configure the interval (in seconds) between subsequent flow @@ -185,7 +185,7 @@ parameters. You can set those parameters at the `pcu` VTY config node as follows: `alpha <0-10>`:: - Alpha parameter for MS power contrl in units of 0.1. + Alpha parameter for MS power control in units of 0.1. Make sure to set the alpha value at System Information 13 (in the BSC), too! `gamma <0-62>`:: diff --git a/OsmoPCU/chapters/overview.adoc b/OsmoPCU/chapters/overview.adoc index e13a7b8..0031474 100644 --- a/OsmoPCU/chapters/overview.adoc +++ b/OsmoPCU/chapters/overview.adoc @@ -6,7 +6,7 @@ OsmoPCU is the Osmocom implementation of the GPRS PCU (Packet Control Unit) element inside the GPRS network. The OsmoPCU is co-located within the BTS and connects to OsmoBTS via its -PCU socket inteface. +PCU socket interface. On the other side, OsmoPCU is connected via the Gb interface to the SGSN. diff --git a/OsmoPCU/osmopcu-gb.adoc b/OsmoPCU/osmopcu-gb.adoc index 7598900..fc2ca8f 100644 --- a/OsmoPCU/osmopcu-gb.adoc +++ b/OsmoPCU/osmopcu-gb.adoc @@ -72,7 +72,7 @@ NSVCI:: NS Virtual Connection Identifier BVCI:: BSSGP Virtual Connection Identifier For an explanation of those identifiers and their use in the NS and -BSSGP protocols, please see the reelvant 3GPP specifications for NS (TS 08.16) +BSSGP protocols, please see the relevant 3GPP specifications for NS (TS 08.16) and BSSGP (TS 08.18). In most cases, all above identities belong to different namespaces and diff --git a/OsmoSGSN/chapters/configuration.adoc b/OsmoSGSN/chapters/configuration.adoc index 0d010c3..8b259ed 100644 --- a/OsmoSGSN/chapters/configuration.adoc +++ b/OsmoSGSN/chapters/configuration.adoc @@ -125,7 +125,7 @@ The CDR file is a simple CSV file including a header line naming the individual fields of each CSV line. [[sgsn-cdr]] -.Descripton of CSV fields in OsmoSGSN CDR file +.Description of CSV fields in OsmoSGSN CDR file [options="header",cols="15%,85%"] |=== |Field Name|Description diff --git a/OsmoSGSN/chapters/gsup.adoc b/OsmoSGSN/chapters/gsup.adoc index 9efc8c0..838af7d 100644 --- a/OsmoSGSN/chapters/gsup.adoc +++ b/OsmoSGSN/chapters/gsup.adoc @@ -29,14 +29,14 @@ By default, the following identifiers should be used: * IPA OSMO protocol extension: 0x05 For more information about the IPA multiplex, please see the 'OsmoBTS -Abis/IP Specifiation'. +Abis/IP Specification'. === Procedures ==== Authentication management The SGSN sends a SEND_AUTHENTICATION_INFO_REQ message containing the MS's IMSI -to the peer. On errors, especially if authentication info is not availabe for +to the peer. On errors, especially if authentication info is not available for that IMSI, the peer returns a SEND_AUTHENTICATION_INFO_ERR message. Otherwise the peer returns a SEND_AUTHENTICATION_INFO_RES message. If this message contains at least one authentication tuple, the SGSN replaces all tuples that diff --git a/common/chapters/gb.adoc b/common/chapters/gb.adoc index 793e23f..d01fa9b 100644 --- a/common/chapters/gb.adoc +++ b/common/chapters/gb.adoc @@ -58,7 +58,7 @@ The NS protocol features a number of configurable timers. === Examining Gb interface status -There are several commans that can help to inspect and analyze the +There are several commands that can help to inspect and analyze the currently running system status with respect to the Gb interfaces. .Example: Inspecting NS state diff --git a/common/chapters/glossary.adoc b/common/chapters/glossary.adoc index 4d68666..c39d439 100644 --- a/common/chapters/glossary.adoc +++ b/common/chapters/glossary.adoc @@ -8,7 +8,7 @@ 3GPP:: 3rd Generation Partnership Project 4FF:: - 4th Generaion Form Factor; the so-called nanoSIM form factor + 4th Generation Form Factor; the so-called nanoSIM form factor A Interface:: Interface between BTS and BSC, traditionally over E1 (_3GPP TS 48.008_ <<3gpp-ts-48-008>>) @@ -103,7 +103,7 @@ GGSN:: GMSK:: Gaussian Minimum Shift Keying; modulation used for GSM and GPRS GPL:: - GNU General Public License, a copyleft-style Freee Software License + GNU General Public License, a copyleft-style Free Software License Gp:: Gp interface between SGSN and GGSN; uses GTP protocol GPS:: @@ -159,7 +159,7 @@ MNO:: MS:: Mobile Station; a mobile phone / GSM Modem MSC:: - Mobile Switching Center; network element in the circuit-switcehd + Mobile Switching Center; network element in the circuit-switched core network MSISDN:: Mobile Subscriber ISDN Number; telephone number of the subscriber @@ -168,7 +168,7 @@ MVNO:: NCC:: Network Color Code; assigned by national regulator NITB:: - Network In The Box; combines functionality traditionally proivided + Network In The Box; combines functionality traditionally provided by BSC, MSC, VLR, HLR, SMSC functions; see OsmoNITB NSEI:: NS Entity Identifier @@ -236,7 +236,7 @@ RFM:: Roaming:: Procedure in which a subscriber of one network is using the radio network of another network, often in different countries; in some - countris national roaming exists + countries national roaming exists Routing Area:: Routing Area; GPRS specific sub-division of Location Area RR:: diff --git a/common/chapters/preface.adoc b/common/chapters/preface.adoc index d986cbe..13afec1 100644 --- a/common/chapters/preface.adoc +++ b/common/chapters/preface.adoc @@ -71,7 +71,7 @@ following key individuals and organizations, in no particular order: annual Osmocom Developer Conference and releasing this manual. * Jan Luebbe, Stefan Schmidt, Daniel Willmann, Pablo Neira, Nico Golde, Kevin Redon, Ingo Albrecht, Alexander Huemer, Alexander Chemeris, Max - Suraev, Tobias Engel, Jacob Erlbeck, Ivan Kluchnikov, Alexander Huemer + Suraev, Tobias Engel, Jacob Erlbeck, Ivan Kluchnikov May the source be with you! @@ -125,7 +125,7 @@ contributions can be many-fold, for example by donating developer resources or by (partially) funding those people in the community who do. -We're looking forward to receicing your contributions. +We're looking forward to receiving your contributions. === Osmocom and sysmocom @@ -194,17 +194,17 @@ use case is compliant with the software licenses. ==== Trademarks All trademarks, service marks, trade names, trade dress, product names -and logos appearing in this manual are the property of their respecitve +and logos appearing in this manual are the property of their respective owners. All rights not expressly granted herein are reserved. -For your convenience we have listed below some of the registrered +For your convenience we have listed below some of the registered trademarks referenced herein. This is not a definitive or complete list of the trademarks used. 'Osmocom(R)' and 'OpenBSC(R)' are registered trademarks of Holger Freyther and Harald Welte. -'sysmocom(R)' and 'sysmoBTS(R)' is registered trasdemarks of +'sysmocom(R)' and 'sysmoBTS(R)' are registered trademarks of 'sysmocom - systems for mobile communications GmbH'. 'ip.access(R)' and 'nanoBTS(R)' are registered trademarks of diff --git a/common/chapters/vty.adoc b/common/chapters/vty.adoc index 9103319..931cd1f 100644 --- a/common/chapters/vty.adoc +++ b/common/chapters/vty.adoc @@ -134,12 +134,12 @@ OpenBSC> <1> terminal Set terminal line parameters who Display who is on vty logging Configure log message to this terminal - sms SMS related comamnds + sms SMS related commands subscriber Operations on a Subscriber ---- <1> press `?` here at the prompt, the character will not be printed -If you have already entered a partial comamnd, `?` will help you to +If you have already entered a partial command, `?` will help you to review possible options of how to continue your command. Let's say you remember that `show` is used to investigate the system status. But you don't know exactly what the object was called that you'd like to show: @@ -157,7 +157,7 @@ OpenBSC> show <1> trx Display information about a TRX timeslot Display information about a TS lchan Display information about a logical channel - paging Display information about paging reuqests of a BTS + paging Display information about paging requests of a BTS paging-group Display the paging group logging Show current logging configuration alarms Show current logging configuration @@ -172,7 +172,7 @@ OpenBSC> show <1> ---- <1> press `?` after the `show` command, the character will not be printed -Now you decide you want to have a look at the the `network` object, so +Now you decide you want to have a look at the `network` object, so you type network and press `?` again: .Example: Typing `?` after `show network` -- 1.9.1 From gerrit-no-reply at lists.osmocom.org Tue May 24 08:02:47 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 May 2016 08:02:47 +0000 Subject: openbsc[master]: bsc: Create minimal SI6 rest octets In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 Would be nice to expand gsm0408_test.c (or add new) to include this and other SI (right now only SI2quater is tested). -- To view, visit https://gerrit.osmocom.org/71 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I417a40eb91f42a3416b4e07bb9fb4d7a01aaa36b Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 24 08:57:36 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 May 2016 08:57:36 +0000 Subject: openbsc[master]: rtp_proxy.c: Ensure msgb_alloc is large enough for largest A... In-Reply-To: References: Message-ID: Patch Set 1: Why not change the define itself? -- To view, visit https://gerrit.osmocom.org/91 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If1ad5d2d68c85733306c75ea62f67fe8fbc143b3 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From nhofmeyr at sysmocom.de Tue May 24 08:58:41 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Tue, 24 May 2016 10:58:41 +0200 Subject: do_lchan_free() timer In-Reply-To: <57E43FF7-FBD8-4138-B5DD-946F86EF3D60@freyther.de> References: <20160523164631.GA19624@ass40.sysmocom.de> <57E43FF7-FBD8-4138-B5DD-946F86EF3D60@freyther.de> Message-ID: <20160524085841.GA1840@ass40.sysmocom.de> On Mon, May 23, 2016 at 07:15:59PM +0200, Holger Freyther wrote: > I just guess. For GPRS some channel combinations are better for multi-slot assignments than others. So the defrag can be beneficial for some MS classes and some configurations. I don't remember out of my head which classes and which patterns are wanted. Sounds quite limited, and also the patch has two potential problems, so I will postpone the defrag part. ~Neels -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From gerrit-no-reply at lists.osmocom.org Tue May 24 09:10:41 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 24 May 2016 09:10:41 +0000 Subject: [PATCH] osmo-pcu[master]: bts/counter: replace '_' with '-' in counter names Message-ID: Review at https://gerrit.osmocom.org/103 bts/counter: replace '_' with '-' in counter names Conform to the convention. Change-Id: I6162694aae8d354aba318cc1acfdac108239fef0 --- M src/bts.cpp 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/03/103/1 diff --git a/src/bts.cpp b/src/bts.cpp index fdae1f0..03b0401 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -71,8 +71,8 @@ { "rlc.ack.failed", "RLC Ack Failed "}, { "rlc.rel.timedout", "RLC Release Timeout "}, { "rlc.late-block", "RLC Late Block "}, - { "rlc.sent_dummy", "RLC Sent Dummy "}, - { "rlc.sent_control", "RLC Sent Control "}, + { "rlc.sent-dummy", "RLC Sent Dummy "}, + { "rlc.sent-control", "RLC Sent Control "}, { "decode.errors", "Decode Errors "}, { "sba.allocated", "SBA Allocated "}, { "sba.freed", "SBA Freed "}, -- To view, visit https://gerrit.osmocom.org/103 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6162694aae8d354aba318cc1acfdac108239fef0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue May 24 10:18:05 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 May 2016 10:18:05 +0000 Subject: osmo-pcu[master]: bts/counter: replace '_' with '-' in counter names In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/103 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6162694aae8d354aba318cc1acfdac108239fef0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 24 10:18:07 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 May 2016 10:18:07 +0000 Subject: [MERGED] osmo-pcu[master]: bts/counter: replace '_' with '-' in counter names In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: bts/counter: replace '_' with '-' in counter names ...................................................................... bts/counter: replace '_' with '-' in counter names Conform to the convention. Change-Id: I6162694aae8d354aba318cc1acfdac108239fef0 Reviewed-on: https://gerrit.osmocom.org/103 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M src/bts.cpp 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/bts.cpp b/src/bts.cpp index fdae1f0..03b0401 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -71,8 +71,8 @@ { "rlc.ack.failed", "RLC Ack Failed "}, { "rlc.rel.timedout", "RLC Release Timeout "}, { "rlc.late-block", "RLC Late Block "}, - { "rlc.sent_dummy", "RLC Sent Dummy "}, - { "rlc.sent_control", "RLC Sent Control "}, + { "rlc.sent-dummy", "RLC Sent Dummy "}, + { "rlc.sent-control", "RLC Sent Control "}, { "decode.errors", "Decode Errors "}, { "sba.allocated", "SBA Allocated "}, { "sba.freed", "SBA Freed "}, -- To view, visit https://gerrit.osmocom.org/103 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6162694aae8d354aba318cc1acfdac108239fef0 Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue May 24 12:42:28 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 May 2016 12:42:28 +0000 Subject: [PATCH] openbsc[master]: Add regexp authorization policy for IMSI Message-ID: Review at https://gerrit.osmocom.org/104 Add regexp authorization policy for IMSI * extend "auth policy" vty command with new option "regexp" * add vty command "authorized-regexp" for setting arbitrary POSIX regular expression * add basic vty test * add optional "regexp" argument to subscriber-create-on-demand vty command With those in place we can now set the regexp against which MS's IMSI will be matched. If IMSI match the regexp than MS is allowed to access the network. If subscriber is already marked as authorized in HLR than it'll be allowed regardless of IMSI matching. The same way we can decide whether to create subscribers on-demand basesd on IMSI regexp match. Similar to authorization this restriction can be overridden by manually creating subscriber via vty, ctrl interface or directly in HLR. Change-Id: I525f4b80676de47d1d422686da2ca012301b0129 Fixes: OS#1647 --- M openbsc/include/openbsc/gsm_data.h M openbsc/src/libbsc/bsc_vty.c M openbsc/src/libbsc/net_init.c M openbsc/src/libcommon/gsm_data.c M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/libmsc/vty_interface_layer3.c M openbsc/tests/vty_test_runner.py 7 files changed, 87 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/04/104/1 diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index a08938c..31a4ed5 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -2,6 +2,8 @@ #define _GSM_DATA_H #include +#include +#include #include #include @@ -22,6 +24,7 @@ enum gsm_subscr_creation_mode { GSM_SUBSCR_DONT_CREATE = 0, GSM_SUBSCR_CREAT_W_RAND_EXT = 1, + GSM_SUBSCR_CREAT_W_REGEXP = 2, }; enum gsm_security_event { @@ -205,6 +208,7 @@ GSM_AUTH_POLICY_CLOSED, /* only subscribers authorized in DB */ GSM_AUTH_POLICY_ACCEPT_ALL, /* accept everyone, even if not authorized in DB */ GSM_AUTH_POLICY_TOKEN, /* accept first, send token per sms, then revoke authorization */ + GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */ }; #define GSM_T3101_DEFAULT 10 @@ -219,6 +223,8 @@ char *name_long; char *name_short; enum gsm_auth_policy auth_policy; + regex_t authorized_regexp; + char *authorized_reg_str; enum gsm48_reject_value reject_cause; int a5_encryption; int neci; diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index 46ad457..66c9107 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -190,8 +190,11 @@ net->name_long, VTY_NEWLINE); vty_out(vty, " Short network name: '%s'%s", net->name_short, VTY_NEWLINE); - vty_out(vty, " Authentication policy: %s%s", - gsm_auth_policy_name(net->auth_policy), VTY_NEWLINE); + vty_out(vty, " Authentication policy: %s", + gsm_auth_policy_name(net->auth_policy)); + if (net->authorized_reg_str) + vty_out(vty, ", authorized regexp: %s", net->authorized_reg_str); + vty_out(vty, "%s", VTY_NEWLINE); vty_out(vty, " Location updating reject cause: %u%s", net->reject_cause, VTY_NEWLINE); vty_out(vty, " Encryption: A5/%u%s", net->a5_encryption, @@ -791,6 +794,8 @@ vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE); vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE); vty_out(vty, " auth policy %s%s", gsm_auth_policy_name(gsmnet->auth_policy), VTY_NEWLINE); + if (gsmnet->authorized_reg_str) + vty_out(vty, " authorized-regexp %s%s", gsmnet->authorized_reg_str, VTY_NEWLINE); vty_out(vty, " location updating reject cause %u%s", gsmnet->reject_cause, VTY_NEWLINE); vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); @@ -1398,17 +1403,34 @@ DEFUN(cfg_net_auth_policy, cfg_net_auth_policy_cmd, - "auth policy (closed|accept-all|token)", + "auth policy (closed|accept-all|regexp|token)", "Authentication (not cryptographic)\n" "Set the GSM network authentication policy\n" "Require the MS to be activated in HLR\n" "Accept all MS, whether in HLR or not\n" + "Use regular expression for IMSI authorization decision\n" "Use SMS-token based authentication\n") { enum gsm_auth_policy policy = gsm_auth_policy_parse(argv[0]); struct gsm_network *gsmnet = gsmnet_from_vty(vty); gsmnet->auth_policy = policy; + + return CMD_SUCCESS; +} + +DEFUN(cfg_net_authorize_regexp, cfg_net_authorize_regexp_cmd, + "authorized-regexp REGEXP", + "Set regexp for IMSI which will be used for authorization decision\n" + "Regular expression, IMSIs matching it are allowed to use the network\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + if (gsm_parse_reg(gsmnet, &gsmnet->authorized_regexp, + &gsmnet->authorized_reg_str, argc, argv) != 0) { + vty_out(vty, "%%Failed to parse the authorized-regexp: '%s'%s", + argv[0], VTY_NEWLINE); + return CMD_WARNING; + } return CMD_SUCCESS; } @@ -3973,6 +3995,7 @@ install_element(GSMNET_NODE, &cfg_net_name_short_cmd); install_element(GSMNET_NODE, &cfg_net_name_long_cmd); install_element(GSMNET_NODE, &cfg_net_auth_policy_cmd); + install_element(GSMNET_NODE, &cfg_net_authorize_regexp_cmd); install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); install_element(GSMNET_NODE, &cfg_net_neci_cmd); diff --git a/openbsc/src/libbsc/net_init.c b/openbsc/src/libbsc/net_init.c index afcaaf3..caf134a 100644 --- a/openbsc/src/libbsc/net_init.c +++ b/openbsc/src/libbsc/net_init.c @@ -49,7 +49,7 @@ net->subscr_group->net = net; net->subscr_creation_mode = GSM_SUBSCR_CREAT_W_RAND_EXT; - + net->authorized_reg_str = NULL; net->country_code = country_code; net->network_code = network_code; net->num_bts = 0; diff --git a/openbsc/src/libcommon/gsm_data.c b/openbsc/src/libcommon/gsm_data.c index 4e235fd..9d794ee 100644 --- a/openbsc/src/libcommon/gsm_data.c +++ b/openbsc/src/libcommon/gsm_data.c @@ -162,6 +162,7 @@ { GSM_AUTH_POLICY_CLOSED, "closed" }, { GSM_AUTH_POLICY_ACCEPT_ALL, "accept-all" }, { GSM_AUTH_POLICY_TOKEN, "token" }, + { GSM_AUTH_POLICY_REGEXP, "regexp" }, { 0, NULL } }; diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 74da34b..1f948b2 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -25,9 +25,12 @@ #include #include #include +#include #include #include #include +#include +#include #include "bscconfig.h" @@ -244,6 +247,17 @@ return -EINVAL; /* not reached */ } +static bool subscr_regexp_check(const struct gsm_network *net, const char *imsi) +{ + if (!net->authorized_reg_str) + return false; + + if (regexec(&net->authorized_regexp, imsi, 0, NULL, 0) != REG_NOMATCH) + return true; + + return false; +} + static int authorize_subscriber(struct gsm_loc_updating_operation *loc, struct gsm_subscriber *subscriber) { @@ -261,6 +275,11 @@ switch (subscriber->group->net->auth_policy) { case GSM_AUTH_POLICY_CLOSED: return subscriber->authorized; + case GSM_AUTH_POLICY_REGEXP: + if (subscriber->authorized) + return 1; + return subscr_regexp_check(subscriber->group->net, + subscriber->imsi); case GSM_AUTH_POLICY_TOKEN: if (subscriber->authorized) return subscriber->authorized; @@ -509,10 +528,14 @@ static struct gsm_subscriber *subscr_create(const struct gsm_network *net, const char *imsi) { - if (net->subscr_creation_mode != GSM_SUBSCR_DONT_CREATE) - return subscr_create_subscriber(net->subscr_group, imsi); + if (net->subscr_creation_mode == GSM_SUBSCR_DONT_CREATE) + return NULL; - return NULL; + if (net->subscr_creation_mode & GSM_SUBSCR_CREAT_W_REGEXP) + if (!subscr_regexp_check(net, imsi)) + return NULL; + + return subscr_create_subscriber(net->subscr_group, imsi); } /* Parse Chapter 9.2.11 Identity Response */ diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 5d74e04..3f67b9a 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -1032,11 +1032,15 @@ } DEFUN(cfg_nitb_subscr_create, cfg_nitb_subscr_create_cmd, - "subscriber-create-on-demand", - "Make a new record when a subscriber is first seen.\n") + "subscriber-create-on-demand [regexp]", + "Make a new record when a subscriber is first seen.\n" + "Create subscribers only if IMSI matches the regexp specified in " + "authorized-regexp command\n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); gsmnet->subscr_creation_mode = GSM_SUBSCR_CREAT_W_RAND_EXT; + if (argc) + gsmnet->subscr_creation_mode |= GSM_SUBSCR_CREAT_W_REGEXP; return CMD_SUCCESS; } @@ -1070,9 +1074,12 @@ static int config_write_nitb(struct vty *vty) { struct gsm_network *gsmnet = gsmnet_from_vty(vty); + enum gsm_subscr_creation_mode scm = gsmnet->subscr_creation_mode; + const char *reg = (scm & GSM_SUBSCR_CREAT_W_REGEXP) ? " regexp" : "", + *pref = scm ? "" : "no "; vty_out(vty, "nitb%s", VTY_NEWLINE); - vty_out(vty, " %ssubscriber-create-on-demand%s", - gsmnet->subscr_creation_mode ? "" : "no ", VTY_NEWLINE); + vty_out(vty, " %ssubscriber-create-on-demand%s%s", + pref, reg, VTY_NEWLINE); vty_out(vty, " %sassign-tmsi%s", gsmnet->avoid_tmsi ? "no " : "", VTY_NEWLINE); return CMD_SUCCESS; diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index c088855..c264328 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -231,6 +231,22 @@ self.assertEquals(self.vty.node(), 'config-mncc-int') + def testVtyAuthorization(self): + self.vty.enable() + self.vty.command("configure terminal") + self.vty.command("network") + self.assertTrue(self.vty.verify("auth policy closed", [''])) + self.assertTrue(self.vty.verify("auth policy regexp", [''])) + self.assertTrue(self.vty.verify("authorized-regexp ^001", [''])) + self.assertTrue(self.vty.verify("authorized-regexp 02$", [''])) + self.assertTrue(self.vty.verify("authorized-regexp *123.*", [''])) + self.vty.command("end") + self.vty.command("configure terminal") + self.vty.command("nitb") + self.assertTrue(self.vty.verify("subscriber-create-on-demand", [''])) + self.assertTrue(self.vty.verify("subscriber-create-on-demand regexp", [''])) + self.vty.command("end") + def testSi2Q(self): self.vty.enable() self.vty.command("configure terminal") -- To view, visit https://gerrit.osmocom.org/104 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I525f4b80676de47d1d422686da2ca012301b0129 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue May 24 12:48:02 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 24 May 2016 12:48:02 +0000 Subject: [PATCH] osmo-pcu[master]: tbf_ul: use correct size for chunk_size Message-ID: Review at https://gerrit.osmocom.org/105 tbf_ul: use correct size for chunk_size The size of the hole array in bytes was used instead of the size of elements. Change-Id: If6bf3e5f1ad773ddaa9fb2ce7c069e6b26659cbf --- M src/tbf_ul.cpp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/05/105/1 diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 9e763f4..5178875 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -60,7 +60,7 @@ LOGP(DRLCMACUL, LOGL_DEBUG, "- Assembling frames: (len=%d)\n", len); num_frames = Decoding::rlc_data_from_ul_data( - rdbi, cs, data, &(frames[0]), sizeof(frames), + rdbi, cs, data, &(frames[0]), ARRAY_SIZE(frame), &dummy_tlli); /* create LLC frames */ -- To view, visit https://gerrit.osmocom.org/105 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If6bf3e5f1ad773ddaa9fb2ce7c069e6b26659cbf Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue May 24 12:48:02 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 24 May 2016 12:48:02 +0000 Subject: [PATCH] osmo-pcu[master]: add comments to describe functions Message-ID: Review at https://gerrit.osmocom.org/106 add comments to describe functions Change-Id: Ie351632001abbeb82008a5eecae0d0323a8ef7d7 --- M src/bts.cpp M src/tbf_ul.cpp 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/06/106/1 diff --git a/src/bts.cpp b/src/bts.cpp index fdae1f0..c3d17ff 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1317,6 +1317,7 @@ return -EINVAL; } +/*! \brief process egprs and gprs data blocks */ int gprs_rlcmac_pdch::rcv_data_block(uint8_t *data, uint32_t fn, struct pcu_l1_meas *meas, GprsCodingScheme cs) { diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 5178875..23b21e3 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -138,6 +138,7 @@ return msg; } +/*! \brief receive data from PDCH/L1 */ int gprs_rlcmac_ul_tbf::rcv_data_block_acknowledged( const struct gprs_rlc_data_info *rlc, uint8_t *data, struct pcu_l1_meas *meas) -- To view, visit https://gerrit.osmocom.org/106 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie351632001abbeb82008a5eecae0d0323a8ef7d7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue May 24 12:48:02 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 24 May 2016 12:48:02 +0000 Subject: [PATCH] osmo-pcu[master]: rlc.h: remove duplicated define RLC_EGPRS_SNS Message-ID: Review at https://gerrit.osmocom.org/107 rlc.h: remove duplicated define RLC_EGPRS_SNS Change-Id: Ibb718ba9be21831c56c5949e730fab5acd691d7c --- M src/rlc.h 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/07/107/1 diff --git a/src/rlc.h b/src/rlc.h index 8f75588..03659da 100644 --- a/src/rlc.h +++ b/src/rlc.h @@ -27,7 +27,6 @@ #define RLC_GPRS_SNS 128 /* GPRS, must be power of 2 */ #define RLC_GPRS_WS 64 /* max window size */ -#define RLC_EGPRS_SNS 2048 /* EGPRS, must be power of 2 */ #define RLC_EGPRS_MIN_WS 64 /* min window size */ #define RLC_EGPRS_MAX_WS 1024 /* min window size */ #define RLC_EGPRS_SNS 2048 /* EGPRS, must be power of 2 */ -- To view, visit https://gerrit.osmocom.org/107 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibb718ba9be21831c56c5949e730fab5acd691d7c Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue May 24 13:20:08 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 24 May 2016 13:20:08 +0000 Subject: osmo-pcu[master]: tbf_ul: use correct size for chunk_size In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/105 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If6bf3e5f1ad773ddaa9fb2ce7c069e6b26659cbf Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 24 13:22:09 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 24 May 2016 13:22:09 +0000 Subject: [PATCH] osmo-pcu[master]: tbf_ul: use correct size for chunk_size In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/105 to look at the new patch set (#2). tbf_ul: use correct size for chunk_size The size of the hole array in bytes was used instead of the size of elements. Change-Id: If6bf3e5f1ad773ddaa9fb2ce7c069e6b26659cbf --- M src/tbf_ul.cpp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/05/105/2 diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 9e763f4..1316204 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -60,7 +60,7 @@ LOGP(DRLCMACUL, LOGL_DEBUG, "- Assembling frames: (len=%d)\n", len); num_frames = Decoding::rlc_data_from_ul_data( - rdbi, cs, data, &(frames[0]), sizeof(frames), + rdbi, cs, data, &(frames[0]), ARRAY_SIZE(frames), &dummy_tlli); /* create LLC frames */ -- To view, visit https://gerrit.osmocom.org/105 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If6bf3e5f1ad773ddaa9fb2ce7c069e6b26659cbf Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue May 24 13:54:07 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 24 May 2016 13:54:07 +0000 Subject: openbsc[master]: Add regexp authorization policy for IMSI In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/104 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I525f4b80676de47d1d422686da2ca012301b0129 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 24 13:54:31 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 24 May 2016 13:54:31 +0000 Subject: osmo-pcu[master]: rlc.h: remove duplicated define RLC_EGPRS_SNS In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/107 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibb718ba9be21831c56c5949e730fab5acd691d7c Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 24 13:54:52 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 24 May 2016 13:54:52 +0000 Subject: osmo-pcu[master]: add comments to describe functions In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/106 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie351632001abbeb82008a5eecae0d0323a8ef7d7 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 24 13:56:07 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 24 May 2016 13:56:07 +0000 Subject: openbsc[master]: rtp_proxy.c: Ensure msgb_alloc is large enough for largest A... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 > Why not change the define itself? because then the name would be wrong. The actual AMR codec payload cannot be larger than 33 bytes. So if you change the #define value, you also need to come up with a new, more suitable name. -- To view, visit https://gerrit.osmocom.org/91 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If1ad5d2d68c85733306c75ea62f67fe8fbc143b3 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 24 13:57:54 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 24 May 2016 13:57:54 +0000 Subject: libosmocore[master]: add vty call show asciidoc: generate a documentation for cou... In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/70/1/src/vty/stats_vty.c File src/vty/stats_vty.c: Line 397: description, > What do you think? I think we should escape what needs to be escaped? I mea I agree with holger, we should escape it, to prevent any strange future failures. -- To view, visit https://gerrit.osmocom.org/70 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia8af883167e5ee631059299b107ea83c8bbffdfb Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue May 24 13:58:37 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 24 May 2016 13:58:37 +0000 Subject: openbsc[master]: filter/nat: Fix the context for the imsi assignment In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/102 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I53789aad2809e19338ad3b2deb72c4757e7bd524 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 24 13:59:05 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 24 May 2016 13:59:05 +0000 Subject: openbsc[master]: tweak db debug log: log TMSI as hex In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/94 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4564c99c145a35fb592c228c1fa84c61ec425fd3 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 24 14:17:50 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 May 2016 14:17:50 +0000 Subject: osmo-pcu[master]: rlc.h: remove duplicated define RLC_EGPRS_SNS In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/107/1//COMMIT_MSG Commit Message: Line 7: rlc.h: remove duplicated define RLC_EGPRS_SNS Can you explain where it is duplicated? What is the compiler warning you get? -- To view, visit https://gerrit.osmocom.org/107 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibb718ba9be21831c56c5949e730fab5acd691d7c Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue May 24 14:30:09 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 May 2016 14:30:09 +0000 Subject: osmo-pcu[master]: tbf_ul: use correct size for chunk_size In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 Great find! Looks like parse_extensions_gprs uses chunk_sizes as number of array elements. -- To view, visit https://gerrit.osmocom.org/105 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If6bf3e5f1ad773ddaa9fb2ce7c069e6b26659cbf Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 24 15:46:06 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 24 May 2016 15:46:06 +0000 Subject: [PATCH] osmo-bts[master]: Use libosmocore function for uplink measurements Message-ID: Review at https://gerrit.osmocom.org/108 Use libosmocore function for uplink measurements Related: OS#1563 Change-Id: Ide47e8e69e0d2d5859c5249b22f4bad22c18aa57 --- M include/osmo-bts/measurement.h M src/common/measurement.c M src/common/rsl.c 3 files changed, 9 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/08/108/1 diff --git a/include/osmo-bts/measurement.h b/include/osmo-bts/measurement.h index 493b6ff..2037ff6 100644 --- a/include/osmo-bts/measurement.h +++ b/include/osmo-bts/measurement.h @@ -5,7 +5,4 @@ int trx_meas_check_compute(struct gsm_bts_trx *trx, uint32_t fn); -/* build the 3 byte RSL uplinke measurement IE content */ -int lchan_build_rsl_ul_meas(struct gsm_lchan *, uint8_t *buf); - #endif diff --git a/src/common/measurement.c b/src/common/measurement.c index 41a0170..b0906d4 100644 --- a/src/common/measurement.c +++ b/src/common/measurement.c @@ -200,17 +200,6 @@ return 1; } -/* build the 3 byte RSL uplinke measurement IE content */ -int lchan_build_rsl_ul_meas(struct gsm_lchan *lchan, uint8_t *buf) -{ - struct gsm_meas_rep_unidir *mru = &lchan->meas.ul_res; - buf[0] = (mru->full.rx_lev & 0x3f); /* FIXME: DTXu support */ - buf[1] = (mru->sub.rx_lev & 0x3f); - buf[2] = ((mru->full.rx_qual & 7) << 3) | (mru->sub.rx_qual & 7); - - return 3; -} - /* Copied from OpenBSC and enlarged to _GSM_PCHAN_MAX */ static const uint8_t subslots_per_pchan[_GSM_PCHAN_MAX] = { [GSM_PCHAN_NONE] = 0, diff --git a/src/common/rsl.c b/src/common/rsl.c index ecf570c..e13d48c 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -31,6 +32,7 @@ #include #include #include +#include #include #include @@ -1692,7 +1694,8 @@ } /* 8.4.8 MEASUREMENT RESult */ -static int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len) +static int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len, + bool dtxd_used) { struct msgb *msg; uint8_t meas_res[16]; @@ -1710,7 +1713,8 @@ return -ENOMEM; msgb_tv_put(msg, RSL_IE_MEAS_RES_NR, lchan->meas.res_nr++); - int ie_len = lchan_build_rsl_ul_meas(lchan, meas_res); + size_t ie_len = gsm0858_rsl_ul_meas_enc(&lchan->meas.ul_res, dtxd_used, + meas_res); if (ie_len >= 3) { msgb_tlv_put(msg, RSL_IE_UPLINK_MEAS, ie_len, meas_res); lchan->meas.flags &= ~LC_UL_M_F_RES_VALID; @@ -1751,8 +1755,9 @@ LOGP(DRSL, LOGL_INFO, "%s Handing RLL msg %s from LAPDm to MEAS REP\n", gsm_lchan_name(lchan), rsl_msg_name(rh->msg_type)); - - rc = rsl_tx_meas_res(lchan, msgb_l3(msg), msgb_l3len(msg)); + /* FIXME: add dtx downlink support */ + rc = rsl_tx_meas_res(lchan, msgb_l3(msg), msgb_l3len(msg), + false); msgb_free(msg); return rc; } else { -- To view, visit https://gerrit.osmocom.org/108 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ide47e8e69e0d2d5859c5249b22f4bad22c18aa57 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue May 24 15:49:43 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 24 May 2016 15:49:43 +0000 Subject: [PATCH] osmo-pcu[master]: rlc.h: remove duplicated define RLC_EGPRS_SNS In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/107 to look at the new patch set (#2). rlc.h: remove duplicated define RLC_EGPRS_SNS The second #define RLC_EGPRS_SNS is 3 lines below of the first one. Change-Id: Ibb718ba9be21831c56c5949e730fab5acd691d7c --- M src/rlc.h 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/07/107/2 diff --git a/src/rlc.h b/src/rlc.h index 8f75588..03659da 100644 --- a/src/rlc.h +++ b/src/rlc.h @@ -27,7 +27,6 @@ #define RLC_GPRS_SNS 128 /* GPRS, must be power of 2 */ #define RLC_GPRS_WS 64 /* max window size */ -#define RLC_EGPRS_SNS 2048 /* EGPRS, must be power of 2 */ #define RLC_EGPRS_MIN_WS 64 /* min window size */ #define RLC_EGPRS_MAX_WS 1024 /* min window size */ #define RLC_EGPRS_SNS 2048 /* EGPRS, must be power of 2 */ -- To view, visit https://gerrit.osmocom.org/107 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibb718ba9be21831c56c5949e730fab5acd691d7c Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue May 24 15:50:31 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 24 May 2016 15:50:31 +0000 Subject: osmo-pcu[master]: rlc.h: remove duplicated define RLC_EGPRS_SNS In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) @Holger: I'vn't looked at compiler warnings. Just found it by accident ;) https://gerrit.osmocom.org/#/c/107/1/src/rlc.h File src/rlc.h: Line 33 here -- To view, visit https://gerrit.osmocom.org/107 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibb718ba9be21831c56c5949e730fab5acd691d7c Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue May 24 21:02:01 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 May 2016 21:02:01 +0000 Subject: [PATCH] libosmo-sccp[master]: debian: Make upgrading from debian SID easier Message-ID: Review at https://gerrit.osmocom.org/109 debian: Make upgrading from debian SID easier Make sure the version number of this sourcepackage is higher than the one found in Debian SID. Change-Id: I87534954c1f4b499e27452382df412454ea16b64 --- M debian/changelog 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/09/109/1 diff --git a/debian/changelog b/debian/changelog index 9e5884e..b7a0c97 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libosmo-sccp (0.7.1) UNRELEASED; urgency=medium + + * Move forward towards a new release. + + -- Holger Hans Peter Freyther Tue, 24 May 2016 22:57:59 +0200 + libosmo-sccp (0.7.0) unstable; urgency=medium * New release. -- To view, visit https://gerrit.osmocom.org/109 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I87534954c1f4b499e27452382df412454ea16b64 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Tue May 24 21:05:48 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 May 2016 21:05:48 +0000 Subject: [PATCH] libosmo-abis[master]: debian: Make upgrading from debian SID easier Message-ID: Review at https://gerrit.osmocom.org/110 debian: Make upgrading from debian SID easier Make sure the version number of this sourcepackage is higher than the one found in Debian SID. Change-Id: I393ef6624f112794e15b81a0cc9dbd8b0a871b07 --- M debian/changelog 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/10/110/1 diff --git a/debian/changelog b/debian/changelog index f1842fa..b2cf0e9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,10 @@ -libosmo-abis (0.3.2) UNRELEASED; urgency=medium +libosmo-abis (0.3.3) UNRELEASED; urgency=medium + + * Move forward towards a new release. + + -- Holger Hans Peter Freyther Tue, 24 May 2016 23:02:47 +0200 + +libosmo-abis (0.3.2) unstable; urgency=medium * Bump so version to re-link libosmovty -- To view, visit https://gerrit.osmocom.org/110 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I393ef6624f112794e15b81a0cc9dbd8b0a871b07 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Tue May 24 21:07:10 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 May 2016 21:07:10 +0000 Subject: [PATCH] libosmo-netif[master]: debian: Make upgrading from debian SID easier Message-ID: Review at https://gerrit.osmocom.org/111 debian: Make upgrading from debian SID easier Make sure the version number of this sourcepackage is higher than the one found in Debian SID. Change-Id: I6486f91bc11e0828b4ccd0e22f8e2135af0d271a --- M debian/changelog 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/11/111/1 diff --git a/debian/changelog b/debian/changelog index 2180e56..6cd3378 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libosmo-netif (0.0.7) UNRELEASED; urgency=medium + + * Move forward toward a new release. + + -- Holger Hans Peter Freyther Tue, 24 May 2016 23:06:33 +0200 + libosmo-netif (0.0.6) unstable; urgency=medium * Drop libosmovty dependency. -- To view, visit https://gerrit.osmocom.org/111 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6486f91bc11e0828b4ccd0e22f8e2135af0d271a Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Tue May 24 21:09:33 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 May 2016 21:09:33 +0000 Subject: [PATCH] libsmpp34[master]: debian: Make upgrading from debian SID easier Message-ID: Review at https://gerrit.osmocom.org/112 debian: Make upgrading from debian SID easier Make sure the version number of this sourcepackage is higher than the one found in Debian SID. Change-Id: I77126b0b9a8dbc4dcdc02a5a3b4718129b308930 --- M debian/changelog 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libsmpp34 refs/changes/12/112/1 diff --git a/debian/changelog b/debian/changelog index 20ae3d3..aae6e0d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,10 @@ -libsmpp34 (1.10z1) UNRELEASED; urgency=low +libsmpp34 (1.11) UNRELEASED; urgency=medium + + * Move forward towards a new release. + + -- Holger Hans Peter Freyther Tue, 24 May 2016 23:07:49 +0200 + +libsmpp34 (1.10z1) stable; urgency=low * Add depedency from libsmpp34-dev to the main library -- To view, visit https://gerrit.osmocom.org/112 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I77126b0b9a8dbc4dcdc02a5a3b4718129b308930 Gerrit-PatchSet: 1 Gerrit-Project: libsmpp34 Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Tue May 24 21:15:55 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 24 May 2016 21:15:55 +0000 Subject: [PATCH] openbsc[master]: debian: Make upgrading from debian SID easier Message-ID: Review at https://gerrit.osmocom.org/113 debian: Make upgrading from debian SID easier Make sure the version number of this sourcepackage is higher than the one found in Debian SID. Change-Id: I838632e9e90378a03235c2aebd5bc9ed06627ec8 --- M debian/changelog 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/13/113/1 diff --git a/debian/changelog b/debian/changelog index 5f00a30..6a0362a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,10 @@ -openbsc (0.14.0) UNRELEASED; urgency=low +openbsc (0.15.1) UNRELEASED; urgency=medium + + * Move forward toward a new release. + + -- Holger Hans Peter Freyther Tue, 24 May 2016 23:14:31 +0200 + +openbsc (0.14.0) unstable; urgency=low * New upstream tag and additional patches. -- To view, visit https://gerrit.osmocom.org/113 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I838632e9e90378a03235c2aebd5bc9ed06627ec8 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther From holger at freyther.de Tue May 24 21:41:36 2016 From: holger at freyther.de (Holger Freyther) Date: Tue, 24 May 2016 23:41:36 +0200 Subject: Closing the gap between official debian and our nightly builds Message-ID: Dear Ruben, I wonder if you could give us/me a hand in closing the gap between the official packages. In general we are willing to drop backwards compatibility with our install base to reach Debian standards. Ideally a user can easily upgrade from a Debian version to our nightly builds and you and other debian developers can hopefully easily take our source packages and move them forward as well. Do you have experience with upstream making their own debian packages and a proper package being included in debian as well? Shall I create tickets in our osmocom.org redmine to coordinate synchronization? Are you aware of different sysv init script names, paths for config/hlr files, package names? From a very brief look: + We never handled the .copyright files correctly you do + debian/control you have nice short and long terms descriptions we should have + You have patches for typos and other parts (i have pushed the ggsn one and will go through the patches later) + Your have manpages and we never bothered with it. I think it is a really good debian rule (and good Unix legacy to force a manpage for binaries in /usr!) - At least for OpenBSC you do not seem to package the -dbg symbols. As a developer I am always annoyed (e.g. with sofia sip) when I can't install the debug symbols. - You seem to not include sysvinit (and systemd) service files? Do you have a proposal on how we could move forward? How do you manage/maintain the extra debian/ directory? kind regards holger From gerrit-no-reply at lists.osmocom.org Wed May 25 07:01:07 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 07:01:07 +0000 Subject: [PATCH] libosmocore[master]: misc: Some spelling errors corrected Message-ID: Review at https://gerrit.osmocom.org/114 misc: Some spelling errors corrected Change-Id: Ibfc239b84879556624ca6020ae6a63d102640c94 --- M src/logging.c M src/sim/card_fs_tetra.c 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/14/114/1 diff --git a/src/logging.c b/src/logging.c index b2f8d43..8a10133 100644 --- a/src/logging.c +++ b/src/logging.c @@ -130,7 +130,7 @@ "Don't use. It doesn't log anything", "Log debug messages and higher levels", "Log informational messages and higher levels", - "Log noticable messages and higher levels", + "Log noticeable messages and higher levels", "Log error messages and higher levels", "Log only fatal messages", NULL, diff --git a/src/sim/card_fs_tetra.c b/src/sim/card_fs_tetra.c index 625adbd..657e55f 100644 --- a/src/sim/card_fs_tetra.c +++ b/src/sim/card_fs_tetra.c @@ -204,7 +204,7 @@ EF_LIN_FIX_N(0x6F2B, SFI_NONE, "EF.MSGEXT", F_OPTIONAL, 16, 16, "Message Extension"), EF_LIN_FIX_N(0x6F2C, SFI_NONE, "EF.EADDR", 0, 17, 17, - "Emergency adresses"), + "Emergency addresses"), EF_TRANSP_N(0x6F2D, SFI_NONE, "EF.EINFO", 0, 2, 2, "Emergency call information"), EF_LIN_FIX_N(0x6F2E, SFI_NONE, "EF.DMOCh", F_OPTIONAL, 4, 4, -- To view, visit https://gerrit.osmocom.org/114 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibfc239b84879556624ca6020ae6a63d102640c94 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed May 25 07:03:53 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 07:03:53 +0000 Subject: [PATCH] libsmpp34[master]: Fix various typos in log messages Message-ID: Review at https://gerrit.osmocom.org/115 Fix various typos in log messages Change-Id: If52a8546b09ac14c00e6323984eda6d88a558830 --- M src/smpp34_dumpPdu.c M src/smpp34_pack.c M src/smpp34_unpack.c M test_apps/recv_and_unpack.inc 4 files changed, 19 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libsmpp34 refs/changes/15/115/1 diff --git a/src/smpp34_dumpPdu.c b/src/smpp34_dumpPdu.c index 76cd70b..89d6e53 100644 --- a/src/smpp34_dumpPdu.c +++ b/src/smpp34_dumpPdu.c @@ -68,7 +68,7 @@ #par,inst par,dummy_b);\ if( lenval >= left ){\ PUTLOG("[%s:%08X(%s)]", par, inst par,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ snprintf((char*)dest, left, "%s", l_dest);\ @@ -86,7 +86,7 @@ "%-30s[%04X] [%s]\n",#par,inst par,dummy_b);\ if( lenval >= left ){\ PUTLOG("[%s:%04X(%s)]", par, inst par,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ snprintf((char*)dest, left, "%s", l_dest);\ @@ -104,7 +104,7 @@ #par,inst par, dummy_b);\ if( lenval >= left ){\ PUTLOG("[%s:%02X(%s)]", par, inst par,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ snprintf((char*)dest, left, "%s", l_dest);\ @@ -116,7 +116,7 @@ #par, inst par);\ if( lenval >= left ){\ PUTLOG("[%s:%s(%s)]", par, inst par, \ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ PUTLOG("[%s:%s(%s)]", par, inst par, "OK");\ @@ -143,7 +143,7 @@ lenval = *((inst par) - 1);\ if( (lenval + 33) >= left ){\ PUTLOG("[%s:%s(%s)]", par, inst par, \ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ PUTLOG("[%s:%s(%s)]", par, "", "OK");\ @@ -170,7 +170,7 @@ memcpy(&l_lenval, ((inst par) - sizeof(uint16_t)), sizeof(uint16_t));\ if( (l_lenval + 33) >= left ){\ PUTLOG("[%s:%s(%s)]", par, inst par, \ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ PUTLOG("[%s:%s(%s)]", par, "", "OK");\ diff --git a/src/smpp34_pack.c b/src/smpp34_pack.c index 1916172..b36e7a4 100644 --- a/src/smpp34_pack.c +++ b/src/smpp34_pack.c @@ -63,7 +63,7 @@ lenval = sizeof(uint32_t);\ if( lenval >= left ){\ PUTLOG("[%s:%08X(%s)]", par, inst par,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ _str(inst par,dummy_b);\ @@ -81,7 +81,7 @@ lenval = sizeof(uint16_t);\ if( lenval >= left ){\ PUTLOG("[%s:%04X(%s)]", par, inst par,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ _str(inst par,dummy_b);\ @@ -98,7 +98,7 @@ lenval = sizeof(uint8_t);\ if( lenval >= left ){\ PUTLOG("[%s:%02X(%s)]", par, inst par,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ _str(inst par,dummy_b);\ @@ -123,7 +123,7 @@ lenval = strlen((char*)inst par) + 1;\ if( lenval > left ){\ PUTLOG("[len(%s):%d(%s)]", par, lenval, \ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ if( lenval > sizeval ){\ @@ -143,7 +143,7 @@ lenval = *((inst par) - 1);\ if( lenval >= left ){\ PUTLOG("[leng %s:%d(%s)]", par, lenval,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ if( lenval >= sizeval ){\ @@ -162,7 +162,7 @@ memcpy(&l_lenval, ((inst par) - sizeof(uint16_t)), sizeof(uint16_t));\ if( l_lenval >= left ){\ PUTLOG("[leng %s:%d(%s)]", par, l_lenval,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ if( l_lenval > sizeval ){\ diff --git a/src/smpp34_unpack.c b/src/smpp34_unpack.c index e378b0b..f498d01 100644 --- a/src/smpp34_unpack.c +++ b/src/smpp34_unpack.c @@ -60,7 +60,7 @@ lenval = sizeof( uint32_t );\ if( lenval > left ){\ PUTLOG("[%s:%08X(%s)]", par, inst par,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ memcpy(&inst par, aux, lenval);\ @@ -78,7 +78,7 @@ lenval = sizeof( uint16_t );\ if( lenval > left ){\ PUTLOG("[%s:%04X(%s)]", par, inst par,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ }\ memcpy(&inst par, aux, lenval);\ @@ -96,7 +96,7 @@ lenval = sizeof( uint8_t );\ if( lenval > left ){\ PUTLOG("[%s:%02X(%s)]", par, inst par,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ memcpy(&inst par, aux, lenval);\ @@ -129,7 +129,7 @@ lenval = strlen( (char*) aux ) + 1;\ if( lenval > left ){\ PUTLOG("[len(%s):%d(%s)]", par, lenval, \ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ if( lenval > size ){\ @@ -147,7 +147,7 @@ lenval = *((inst par) - 1);\ if( lenval > left ){\ PUTLOG("[leng %s:%d(%s)]", par, lenval,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ if( lenval > size ){\ @@ -165,7 +165,7 @@ memcpy(&l_lenval, (inst par - sizeof(uint16_t)), sizeof(uint16_t));\ if( l_lenval > left ){\ PUTLOG("[leng %s:%d(%s)]", par, l_lenval,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ if( l_lenval > size ){\ diff --git a/test_apps/recv_and_unpack.inc b/test_apps/recv_and_unpack.inc index 090ea11..1b85a19 100644 --- a/test_apps/recv_and_unpack.inc +++ b/test_apps/recv_and_unpack.inc @@ -3,7 +3,7 @@ /* Read from socket (This is a sample, must be more complex) **********/ ret = recv(sock_tcp, local_buffer, 4, MSG_PEEK); if( ret != 4 ){ printf("Error in recv(PEEK)\n");return( -1 );}; - memcpy(&tempo, local_buffer, sizeof(uint32_t)); /* get lenght PDU */ + memcpy(&tempo, local_buffer, sizeof(uint32_t)); /* get length PDU */ local_buffer_len = ntohl( tempo ); ret = recv(sock_tcp, local_buffer, local_buffer_len, 0); if( ret != local_buffer_len ){ -- To view, visit https://gerrit.osmocom.org/115 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If52a8546b09ac14c00e6323984eda6d88a558830 Gerrit-PatchSet: 1 Gerrit-Project: libsmpp34 Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Wed May 25 09:30:32 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 25 May 2016 09:30:32 +0000 Subject: [PATCH] openbsc[master]: Make si2q scheduling optional In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/81 to look at the new patch set (#4). Make si2q scheduling optional Previously si2quater SI messages were always scheduled. Check for neighbor configuration and only schedule si2q when necessary. Add corresponding unit test. Change-Id: Ibe997803ffb894133fd4d838410fe735791d414f Fixes: OS#1727 --- M openbsc/src/libbsc/system_information.c M openbsc/tests/gsm0408/gsm0408_test.c M openbsc/tests/gsm0408/gsm0408_test.ok 3 files changed, 34 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/81/81/4 diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index bf20394..28d5319 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -648,7 +648,7 @@ static int generate_si2quater(uint8_t *output, struct gsm_bts *bts) { - int rc; + int rc, i = MAX_EARFCN_LIST; struct gsm48_system_information_type_2quater *si2q = (struct gsm48_system_information_type_2quater *) output; @@ -667,6 +667,14 @@ if (rc < 0) return rc; + if (bts->si_common.si2quater_neigh_list.arfcn) + for (i = 0; i < MAX_EARFCN_LIST; i++) + if (bts->si_common.si2quater_neigh_list.arfcn[i] != + OSMO_EARFCN_INVALID) + break; + if (!bts->si_common.uarfcn_length && i == MAX_EARFCN_LIST) + bts->si_valid &= ~(1 << SYSINFO_TYPE_2quater); + return sizeof(*si2q) + rc; } diff --git a/openbsc/tests/gsm0408/gsm0408_test.c b/openbsc/tests/gsm0408/gsm0408_test.c index 9262667..e7c1d7d 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.c +++ b/openbsc/tests/gsm0408/gsm0408_test.c @@ -21,7 +21,7 @@ #include #include #include - +#include #include #include @@ -95,9 +95,13 @@ static inline void gen(struct gsm_bts *bts) { + bts->si_valid = 0; + bts->si_valid |= (1 << SYSINFO_TYPE_2quater); int r = gsm_generate_si(bts, SYSINFO_TYPE_2quater); + bool v = bts->si_valid & (1 << SYSINFO_TYPE_2quater); if (r > 0) - printf("generated SI2quater: [%d] %s\n", r, + printf("generated %s SI2quater: [%d] %s\n", + v ? "valid" : "invalid", r, osmo_hexdump(bts->si_buf[SYSINFO_TYPE_2quater], r)); else printf("failed to generate SI2quater: %s\n", strerror(-r)); @@ -123,6 +127,7 @@ exit(1); bts = gsm_bts_alloc(network); + gen(bts); _bts_uarfcn_add(bts, 1982, 13, 1); _bts_uarfcn_add(bts, 1982, 44, 0); _bts_uarfcn_add(bts, 1982, 61, 1); @@ -155,7 +160,7 @@ bts->si_common.si2quater_neigh_list.thresh_hi = 5; osmo_earfcn_init(&bts->si_common.si2quater_neigh_list); - + gen(bts); add_arfcn_b(&bts->si_common.si2quater_neigh_list, 1917, 1); gen(bts); diff --git a/openbsc/tests/gsm0408/gsm0408_test.ok b/openbsc/tests/gsm0408/gsm0408_test.ok index 7b7a2cc..ebe9476 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.ok +++ b/openbsc/tests/gsm0408/gsm0408_test.ok @@ -63,24 +63,26 @@ Allocated reference: 0 Allocated reference: 1 Testing SYSINFO_TYPE_2quater EARFCN generation: -added EARFCN 1917 - generated SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be c8 50 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b -added EARFCN 1932 - generated SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 30 14 03 2b 2b 2b 2b 2b 2b 2b 2b -added EARFCN 1937 - generated SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 31 07 91 a0 a0 2b 2b 2b 2b 2b 2b -added EARFCN 1945 - generated SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 31 07 91 a8 3c c8 28 0b 2b 2b 2b -added EARFCN 1965 - generated SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 31 07 91 a8 3c ca 0f 5a 0a 03 2b +generated invalid SI2quater: [23] 59 06 07 c0 00 04 86 59 0a 03 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +added EARFCN 1917 - generated valid SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be c8 50 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +added EARFCN 1932 - generated valid SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 30 14 03 2b 2b 2b 2b 2b 2b 2b 2b +added EARFCN 1937 - generated valid SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 31 07 91 a0 a0 2b 2b 2b 2b 2b 2b +added EARFCN 1945 - generated valid SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 31 07 91 a8 3c c8 28 0b 2b 2b 2b +added EARFCN 1965 - generated valid SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 31 07 91 a8 3c ca 0f 5a 0a 03 2b added EARFCN 1967 - failed to generate SI2quater: Cannot allocate memory added EARFCN 1982 - failed to generate SI2quater: Cannot allocate memory Testing SYSINFO_TYPE_2quater UARFCN generation: -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 0c 1a 10 99 64 00 0b 2b 2b 2b 2b 2b 2b 2b 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 14 1a 1f 00 44 b2 00 03 2b 2b 2b 2b 2b 2b 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 18 58 12 f0 84 86 59 00 03 2b 2b 2b 2b 2b 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 20 58 2e f0 f2 04 86 59 00 03 2b 2b 2b 2b 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 28 58 2e 22 f2 4e 84 86 59 00 03 2b 2b 2b 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 34 1a 64 26 5d f2 05 04 86 59 00 03 2b 2b 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 38 58 12 22 fd ce 8e 05 04 86 59 00 03 2b 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 40 58 1d 22 fa ce 88 85 7b 00 44 b2 00 03 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 4c 7a 34 0e 64 77 85 43 55 c8 10 99 64 00 0b +generated invalid SI2quater: [23] 59 06 07 c0 00 04 86 59 00 03 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 0c 1a 10 99 64 00 0b 2b 2b 2b 2b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 14 1a 1f 00 44 b2 00 03 2b 2b 2b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 18 58 12 f0 84 86 59 00 03 2b 2b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 20 58 2e f0 f2 04 86 59 00 03 2b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 28 58 2e 22 f2 4e 84 86 59 00 03 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 34 1a 64 26 5d f2 05 04 86 59 00 03 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 38 58 12 22 fd ce 8e 05 04 86 59 00 03 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 40 58 1d 22 fa ce 88 85 7b 00 44 b2 00 03 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 4c 7a 34 0e 64 77 85 43 55 c8 10 99 64 00 0b failed to add UARFCN to SI2quater: No space left on device failed to add UARFCN to SI2quater: No space left on device -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 4c 7a 34 0e 64 77 85 43 55 c8 10 99 64 00 0b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 4c 7a 34 0e 64 77 85 43 55 c8 10 99 64 00 0b Done. -- To view, visit https://gerrit.osmocom.org/81 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibe997803ffb894133fd4d838410fe735791d414f Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From nhofmeyr at sysmocom.de Wed May 25 11:05:52 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Wed, 25 May 2016 13:05:52 +0200 Subject: gerrit: refs/users vs. refs/heads/users Message-ID: <20160525110552.GA6661@dub6> Hi all, I have just changed the access configuration of gerrit.osmocom.org: * added a group of "known users" * allow create+push to refs/heads/users/* to this group * disallow access to refs/users/* (except to admins for cleanup) * added a sysmocom group * allow create+push to refs/heads/sysmocom/* to this group Questions: * allow global namespace access to "known users"? * or move old user branches to users/? Causality: Previously, gerrit granted create+push access to refs/users/* (note: no "heads") to anybody. However, branches pushed there were not being replicated to git.osmocom.org. IMHO we should not have this fragmentation of repositories. Instead, we could allow create+push to refs/heads/users/* (note: "heads") to any registered user. The refs/heads/users/* namespace will replicate to git.osmocom.org repositories automatically. But: Before gerrit, anyone would be able to push to any branch. We relied on trust that we wouldn't mess with other devs' branches or push to master without review. That worked out pretty well. But, before gerrit, we would actively enable users we trust. With gerrit, ANYONE can register without any project member even noticing, and start pushing right away. Thus we should rather limit the push access, e.g. to refs/heads/users/* When granting push access to the users/* namespace to ANYONE, one problem remains: any troll could commit any amount of completely unrelated data, and we would readily replicate it to our "upstream" git.osmocom.org repositories. So, actually, instead of allowing push access to users/* to anyone, I have added a group "known users" to gerrit, which should typically contain anyone we trust not to be a troll. I have added all gerrit users I know to this group. Anyone who wishes to push to a users/* branch must request to be added to the "known users" group. The threshold to join this group should be low. (The ability to push patches for review is not affected.) Since certain subgroups like to collaborate on given branches (e.g. fairwaves, sysmocom, ...), we can add specific namespaces for these groups. I have so far added a refs/heads/sysmocom/* namespace and a "sysmocom group access" gerrit group. I can add more groups on request. The only advantage here is that you can drop the "users/" path element. Any "known users" member can collaborate on users/* branches already, e.g. refs/heads/users/sysmocom/topic. To make this less config prone, we could go one step further and allow global push access to the group of known users, going back to the model of trust that users take care not to push nonsense. That would include access to master. We also still have various branches in git.osmocom.org that don't have the 'users' path element. If we grant global namespace access to known users, these would continue to be useful. If not, we could rename these to users/ to allow further access. Opinions welcome! ~Neels -- - Neels Hofmeyr http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Gesch?ftsf?hrer / Managing Directors: Holger Freyther, Harald Welte -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From gerrit-no-reply at lists.osmocom.org Wed May 25 12:33:47 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 25 May 2016 12:33:47 +0000 Subject: [MERGED] openbsc[master]: rtp_proxy.c: Ensure msgb_alloc is large enough for largest A... In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: rtp_proxy.c: Ensure msgb_alloc is large enough for largest AMR frame ...................................................................... rtp_proxy.c: Ensure msgb_alloc is large enough for largest AMR frame In AMR 12.2 (mode 7), the actual RTP payload is 33 bytes. Howeerver, as we store the length of the (dynamically-sized) AMR payload in the first byte, our buffer needs at least 33+1 byte in size. Change-Id: If1ad5d2d68c85733306c75ea62f67fe8fbc143b3 Reviewed-on: https://gerrit.osmocom.org/91 Tested-by: Jenkins Builder Reviewed-by: Harald Welte --- M openbsc/src/libtrau/rtp_proxy.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/libtrau/rtp_proxy.c b/openbsc/src/libtrau/rtp_proxy.c index 8c982c9..6c04610 100644 --- a/openbsc/src/libtrau/rtp_proxy.c +++ b/openbsc/src/libtrau/rtp_proxy.c @@ -172,7 +172,7 @@ /* always allocate for the maximum possible size to avoid * fragmentation */ new_msg = msgb_alloc(sizeof(struct gsm_data_frame) + - MAX_RTP_PAYLOAD_LEN, "GSM-DATA (TCH)"); + MAX_RTP_PAYLOAD_LEN+1, "GSM-DATA (TCH)"); if (!new_msg) return -ENOMEM; -- To view, visit https://gerrit.osmocom.org/91 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If1ad5d2d68c85733306c75ea62f67fe8fbc143b3 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr From nhofmeyr at sysmocom.de Wed May 25 13:16:09 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Wed, 25 May 2016 15:16:09 +0200 Subject: [PATCH 1/1] fix typos in all manuals In-Reply-To: <1464042480-16934-1-git-send-email-jonathan.brielmaier@web.de> References: <1464042480-16934-1-git-send-email-jonathan.brielmaier@web.de> Message-ID: <20160525131609.GA7245@dub6> Hi Jonathan, many thanks! Welcome as an Osmocom contributor! :) We normally accept patch submissions via `git send-email', such that your author information and commit log message are available. Please try that next time. For now, I've applied all of your changes with name and mail address taken from your email, and a brief commit log message. (note, while patches for the manuals are still received via git send-email, we've recently switched to gerrit for the osmocom code repositories; see http://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit ) ~Neels On Tue, May 24, 2016 at 12:28:00AM +0200, Jonathan Brielmaier wrote: > Hello, > > I fixed typos in the osmo-gsm-manuals repository. > > This is my first contribution to the Osmocom project so I'm not quite sure if I did all the things (patch, email) in the right way. > > Best Regards > Jonathan Brielmaier > --- > OsmoBSC/chapters/alink.adoc | 4 ++-- > OsmoBSC/chapters/overview.adoc | 4 ++-- > OsmoBTS/abis/rsl.adoc | 4 ++-- > OsmoBTS/chapters/architecture.adoc | 2 +- > OsmoBTS/chapters/bts-models.adoc | 10 +++++----- > OsmoBTS/chapters/interfaces.adoc | 2 +- > OsmoBTS/osmobts-abis.adoc | 2 +- > OsmoNITB/chapters/mncc.adoc | 2 +- > OsmoNITB/chapters/net.adoc | 2 +- > OsmoNITB/chapters/running.adoc | 4 ++-- > OsmoNITB/chapters/smpp.adoc | 2 +- > OsmoPCU/chapters/configuration.adoc | 6 +++--- > OsmoPCU/chapters/overview.adoc | 2 +- > OsmoPCU/osmopcu-gb.adoc | 2 +- > OsmoSGSN/chapters/configuration.adoc | 2 +- > OsmoSGSN/chapters/gsup.adoc | 4 ++-- > common/chapters/gb.adoc | 2 +- > common/chapters/glossary.adoc | 10 +++++----- > common/chapters/preface.adoc | 10 +++++----- > common/chapters/vty.adoc | 8 ++++---- > 20 files changed, 42 insertions(+), 42 deletions(-) > > diff --git a/OsmoBSC/chapters/alink.adoc b/OsmoBSC/chapters/alink.adoc > index 37e64c0..081e03f 100644 > --- a/OsmoBSC/chapters/alink.adoc > +++ b/OsmoBSC/chapters/alink.adoc > @@ -3,12 +3,12 @@ > OsmoBSC implements a minimal sub-set of the GSM A interface as specified > in TS 08.08. > > -Unlike classic A interface implementations for E1 interfacs, OsmoBSC > +Unlike classic A interface implementations for E1 interface, OsmoBSC > implements a variant of encapsulating the A interface over IP. To do > so, the SCCP messages are wrapped in an IPA multiplex and then > communicated over TCP. The audio channels are mapped to RTP streams. > > -This protcol stacking is sometimes called "SCCPlite". > +This protocol stacking is sometimes called "SCCPlite". > > === > > diff --git a/OsmoBSC/chapters/overview.adoc b/OsmoBSC/chapters/overview.adoc > index 6577df8..580a42e 100644 > --- a/OsmoBSC/chapters/overview.adoc > +++ b/OsmoBSC/chapters/overview.adoc > @@ -9,7 +9,7 @@ aspects of configuring and running the OsmoBSC. > > OsmoBSC is one particular version of the OpenBSC software suite. > > -Unlike the highly integrated OmsoNITB, OsmoBSC impleents a more classic > +Unlike the highly integrated OmsoNITB, OsmoBSC implements a more classic > GSM Base Station Controller with A-bis interface towards BTSs and A > interface towards a MSC. > > @@ -39,7 +39,7 @@ implements a variant of encapsulating the A interface over IP. To do > so, the SCCP messages are wrapped in an IPA multiplex and then > communicated over TCP. The audio channels are mapped to RTP streams. > > -This protcol stacking is sometimes called "SCCPlite". > +This protocol stacking is sometimes called "SCCPlite". > > For more information, see <>. > > diff --git a/OsmoBTS/abis/rsl.adoc b/OsmoBTS/abis/rsl.adoc > index f32fb94..331ccb3 100644 > --- a/OsmoBTS/abis/rsl.adoc > +++ b/OsmoBTS/abis/rsl.adoc > @@ -91,7 +91,7 @@ Specific limitations apply, see the linked sections. > | 8.4.24 | ROUND TRIP DELAY REPORT > | 8.4.25 | PRE-HANDOVER NOTIFICATION > | 8.4.26 | MULTIRATE CODEC MODIFICATION REQUEST > -| 8.4.27 | MULTIRATE CODEC MODIFICATION ACKNOLEWDGE > +| 8.4.27 | MULTIRATE CODEC MODIFICATION ACKNOWLEDGE > | 8.4.28 | MULTIRATE CODEC MODIFICATION NEGATIVE ACKNOWLEDGE > | 8.4.29 | MULTIRATE CODEC MODIFICATION PERFORMED > | 8.4.30 | TFO REPORT > @@ -115,7 +115,7 @@ Specific limitations apply, see the linked sections. > > Conforms to 3GPP TS 08.58 ? 8.4.8 with this limitation: > > -._Measuremet Result_ IE limitations > +._Measurement Result_ IE limitations > [options="header",cols="10%,30%,60%"] > |=== > | TS 08.58 ? | IE Name | Handling > diff --git a/OsmoBTS/chapters/architecture.adoc b/OsmoBTS/chapters/architecture.adoc > index aca5bb9..a0e66cd 100644 > --- a/OsmoBTS/chapters/architecture.adoc > +++ b/OsmoBTS/chapters/architecture.adoc > @@ -83,7 +83,7 @@ order to specify which PHY instance is allocated to this specific TRX. > | common | bts_controlif_setup() | Initialization of Control Interface > | bts-specific | bts_model_ctrl_cmds_install() | Install model-specific control interface commands > | common | telnet_init() | Initialization of telnet interface > -| common | pcu_sock_init() | Initializaiton of PCU socket > +| common | pcu_sock_init() | Initialization of PCU socket > | common | main() | Installation of signal handlers > | common | abis_open() | Start of the A-bis connection to BSC > | common | phy_links_open() | Iterate over list of configured PHY links > diff --git a/OsmoBTS/chapters/bts-models.adoc b/OsmoBTS/chapters/bts-models.adoc > index 5a967f6..a4c65d2 100644 > --- a/OsmoBTS/chapters/bts-models.adoc > +++ b/OsmoBTS/chapters/bts-models.adoc > @@ -33,10 +33,10 @@ Each bts_model may offer > > == `osmo-bts-sysmo` for sysmocom sysmoBTS > > -The sysmocom sysmoBTS is a range of GSM BTSs basd around an embedded > +The sysmocom sysmoBTS is a range of GSM BTSs based around an embedded > system implementing the PHY in a combination of DSP+FPGA. The PHY is > configured by a set of primitives described by header files. Those > -primitives are exchanged ove a set of message queues exposed on the > +primitives are exchanged over a set of message queues exposed on the > Linux-running ARM core via device nodes in `/dev/msgq/`. Internally, > the message queues map to shared memory between the Linux-running ARM > core and the DSP running the PHY implementation. > @@ -62,7 +62,7 @@ vice-versa. > <> for further information. > *--pcu-direct*:: > Indicate that an external PCU (e.g. OsmoPCU) will directly > - open the DSP messge queues to the PHY / PH-SAP, and only MPH > + open the DSP message queues to the PHY / PH-SAP, and only MPH > primitives are passed via OsmoBTS. > > > @@ -225,7 +225,7 @@ human-readable format to current VTY session. > > ===== `osmotrx ip HOST` > > -Set the IP addess of the OsmoTRX transceiver to which we should connect > +Set the IP address of the OsmoTRX transceiver to which we should connect > to. > > ===== `osmotrx base-port (local|remote) <0-65535>` > @@ -293,7 +293,7 @@ OCTPKT session, which is mapped to an OsmoBTS PHY link. Depending on > the OCTSDR-2G software version, you may create multiple software TRX by > creating multiple OsmoBTS PHY instances inside that PHY link. > > -Multiple DSPs may exsist in one circuit board, then each of the DSPs is > +Multiple DSPs may exist in one circuit board, then each of the DSPs is > interfaced by one OsmoBTS PHY link, and each of them may have one or > more OsmoBTS PHY instances creating a Multi-TRX configuration. > > diff --git a/OsmoBTS/chapters/interfaces.adoc b/OsmoBTS/chapters/interfaces.adoc > index f5bf1b2..a95f524 100644 > --- a/OsmoBTS/chapters/interfaces.adoc > +++ b/OsmoBTS/chapters/interfaces.adoc > @@ -51,7 +51,7 @@ limited and largely depends on the bts_model used. > > ==== trx.N.thermal-attenuation > > -The idea of this paramter is to attenuate the system output power as part of > +The idea of this parameter is to attenuate the system output power as part of > thermal management. In some cases the PA might be passing a critical level, > so an external control process can use this attribute to reduce the system > output power. > diff --git a/OsmoBTS/osmobts-abis.adoc b/OsmoBTS/osmobts-abis.adoc > index 6b4f0da..930cbfb 100644 > --- a/OsmoBTS/osmobts-abis.adoc > +++ b/OsmoBTS/osmobts-abis.adoc > @@ -11,7 +11,7 @@ these are not or not fully implemented, as well as OsmoBTS-specific extensions > to the A-bis interface not specified by 3GPP. > > Extensions to the A-bis interface specific to OsmoBTS are detailed in this > -document. For details on the messages and IEs that comply with abovementioned > +document. For details on the messages and IEs that comply with above mentioned > 3GPP specifications, please refer to those documents. > > .3GPP document versions referred to by this document > diff --git a/OsmoNITB/chapters/mncc.adoc b/OsmoNITB/chapters/mncc.adoc > index 2b75923..504ce09 100644 > --- a/OsmoNITB/chapters/mncc.adoc > +++ b/OsmoNITB/chapters/mncc.adoc > @@ -181,7 +181,7 @@ NITB and an external MNCC handler. > > Direction: both > > -Transfer the payload of a GSM Enanced Full-Rate (EFR) voice frame > +Transfer the payload of a GSM Enhanced Full-Rate (EFR) voice frame > between the NITB and an external MNCC handler. > > ==== GSM_TCHH_FRAME > diff --git a/OsmoNITB/chapters/net.adoc b/OsmoNITB/chapters/net.adoc > index ecd0889..455e1a6 100644 > --- a/OsmoNITB/chapters/net.adoc > +++ b/OsmoNITB/chapters/net.adoc > @@ -62,7 +62,7 @@ OpenBSC(config-net)# mobile network code 89 > > The __MM INFO__ procedure can be used after a successful __LOCATION > UPDATE__ in order to transmit the human-readable network name as well as > -local time zone information to the MS. gq > +local time zone information to the MS. > > By default, MM INFO is not active. You can activate it, and set its > configuration using the VTY. An example is provided below. > diff --git a/OsmoNITB/chapters/running.adoc b/OsmoNITB/chapters/running.adoc > index 47b5eb7..423ecf7 100644 > --- a/OsmoNITB/chapters/running.adoc > +++ b/OsmoNITB/chapters/running.adoc > @@ -29,7 +29,7 @@ arguments: > for more information. > *-T, --timestamp*:: > Enable time-stamping of log messages to stderr. This has mostly > - been deprecated by VTY based logging configu- ration, see > + been deprecated by VTY based logging configuration, see > <> for more information. > *-e, --log-level 'LOGLEVEL'*:: > Set the global log level for logging to stderr. This has mostly > @@ -42,7 +42,7 @@ arguments: > Authorize every subscriber to the network. This corresponds to > the `auth-policy open` VTY configuration option. > + > - WARNING:: This is dangerous as you may disrupt sevices to > + WARNING:: This is dangerous as you may disrupt services to > subscribers that are not part of your network! Don't use unless > you absolutely know what you're doing! > *-P, --rtp-proxy*:: > diff --git a/OsmoNITB/chapters/smpp.adoc b/OsmoNITB/chapters/smpp.adoc > index 1550abd..2557580 100644 > --- a/OsmoNITB/chapters/smpp.adoc > +++ b/OsmoNITB/chapters/smpp.adoc > @@ -37,7 +37,7 @@ ESMEs are permitted to access the SMSC (`closed`), or whether any > ESME should be accepted (`accept-all`). > > Use the `smpp-first` command to define if SMPP routes have higher > -precendence than MSISDNs contained in the HLR (`smpp-first`), or if > +precedence than MSISDNs contained in the HLR (`smpp-first`), or if > only MSISDNs found not in the HLR should be considered for routing to > SMPP (`no smpp-first`). > > diff --git a/OsmoPCU/chapters/configuration.adoc b/OsmoPCU/chapters/configuration.adoc > index 1a86f32..bcf3ad7 100644 > --- a/OsmoPCU/chapters/configuration.adoc > +++ b/OsmoPCU/chapters/configuration.adoc > @@ -59,7 +59,7 @@ reached, a higher coding scheme is chosen. > > You can use the `cs link-quality-ranges cs1 <0-35> cs2 <0-35> <0-35> cs3 > <0-35> <0-35> cs4 <0-35>` command at the `pcu` VTY config node to tune > -the link quality ranges for the respecive coding schemes. > +the link quality ranges for the respective coding schemes. > > ==== Data Size based CS downgrade Threshold > > @@ -114,7 +114,7 @@ filter). > ==== Normal BSSGP Flow Control Tuning parameters > > You can use the following commands at the `pcu` VTY config node to tune > -the the BSSGP flow control parameters: > +the BSSGP flow control parameters: > > `flow-control-interval <1-10>`:: > configure the interval (in seconds) between subsequent flow > @@ -185,7 +185,7 @@ parameters. > You can set those parameters at the `pcu` VTY config node as follows: > > `alpha <0-10>`:: > - Alpha parameter for MS power contrl in units of 0.1. > + Alpha parameter for MS power control in units of 0.1. > Make sure to set the alpha value at System Information 13 (in > the BSC), too! > `gamma <0-62>`:: > diff --git a/OsmoPCU/chapters/overview.adoc b/OsmoPCU/chapters/overview.adoc > index e13a7b8..0031474 100644 > --- a/OsmoPCU/chapters/overview.adoc > +++ b/OsmoPCU/chapters/overview.adoc > @@ -6,7 +6,7 @@ OsmoPCU is the Osmocom implementation of the GPRS PCU (Packet Control > Unit) element inside the GPRS network. > > The OsmoPCU is co-located within the BTS and connects to OsmoBTS via its > -PCU socket inteface. > +PCU socket interface. > > On the other side, OsmoPCU is connected via the Gb interface to the > SGSN. > diff --git a/OsmoPCU/osmopcu-gb.adoc b/OsmoPCU/osmopcu-gb.adoc > index 7598900..fc2ca8f 100644 > --- a/OsmoPCU/osmopcu-gb.adoc > +++ b/OsmoPCU/osmopcu-gb.adoc > @@ -72,7 +72,7 @@ NSVCI:: NS Virtual Connection Identifier > BVCI:: BSSGP Virtual Connection Identifier > > For an explanation of those identifiers and their use in the NS and > -BSSGP protocols, please see the reelvant 3GPP specifications for NS (TS 08.16) > +BSSGP protocols, please see the relevant 3GPP specifications for NS (TS 08.16) > and BSSGP (TS 08.18). > > In most cases, all above identities belong to different namespaces and > diff --git a/OsmoSGSN/chapters/configuration.adoc b/OsmoSGSN/chapters/configuration.adoc > index 0d010c3..8b259ed 100644 > --- a/OsmoSGSN/chapters/configuration.adoc > +++ b/OsmoSGSN/chapters/configuration.adoc > @@ -125,7 +125,7 @@ The CDR file is a simple CSV file including a header line naming the > individual fields of each CSV line. > > [[sgsn-cdr]] > -.Descripton of CSV fields in OsmoSGSN CDR file > +.Description of CSV fields in OsmoSGSN CDR file > [options="header",cols="15%,85%"] > |=== > |Field Name|Description > diff --git a/OsmoSGSN/chapters/gsup.adoc b/OsmoSGSN/chapters/gsup.adoc > index 9efc8c0..838af7d 100644 > --- a/OsmoSGSN/chapters/gsup.adoc > +++ b/OsmoSGSN/chapters/gsup.adoc > @@ -29,14 +29,14 @@ By default, the following identifiers should be used: > * IPA OSMO protocol extension: 0x05 > > For more information about the IPA multiplex, please see the 'OsmoBTS > -Abis/IP Specifiation'. > +Abis/IP Specification'. > > === Procedures > > ==== Authentication management > > The SGSN sends a SEND_AUTHENTICATION_INFO_REQ message containing the MS's IMSI > -to the peer. On errors, especially if authentication info is not availabe for > +to the peer. On errors, especially if authentication info is not available for > that IMSI, the peer returns a SEND_AUTHENTICATION_INFO_ERR message. Otherwise > the peer returns a SEND_AUTHENTICATION_INFO_RES message. If this message > contains at least one authentication tuple, the SGSN replaces all tuples that > diff --git a/common/chapters/gb.adoc b/common/chapters/gb.adoc > index 793e23f..d01fa9b 100644 > --- a/common/chapters/gb.adoc > +++ b/common/chapters/gb.adoc > @@ -58,7 +58,7 @@ The NS protocol features a number of configurable timers. > > === Examining Gb interface status > > -There are several commans that can help to inspect and analyze the > +There are several commands that can help to inspect and analyze the > currently running system status with respect to the Gb interfaces. > > .Example: Inspecting NS state > diff --git a/common/chapters/glossary.adoc b/common/chapters/glossary.adoc > index 4d68666..c39d439 100644 > --- a/common/chapters/glossary.adoc > +++ b/common/chapters/glossary.adoc > @@ -8,7 +8,7 @@ > 3GPP:: > 3rd Generation Partnership Project > 4FF:: > - 4th Generaion Form Factor; the so-called nanoSIM form factor > + 4th Generation Form Factor; the so-called nanoSIM form factor > A Interface:: > Interface between BTS and BSC, traditionally over E1 (_3GPP TS 48.008_ > <<3gpp-ts-48-008>>) > @@ -103,7 +103,7 @@ GGSN:: > GMSK:: > Gaussian Minimum Shift Keying; modulation used for GSM and GPRS > GPL:: > - GNU General Public License, a copyleft-style Freee Software License > + GNU General Public License, a copyleft-style Free Software License > Gp:: > Gp interface between SGSN and GGSN; uses GTP protocol > GPS:: > @@ -159,7 +159,7 @@ MNO:: > MS:: > Mobile Station; a mobile phone / GSM Modem > MSC:: > - Mobile Switching Center; network element in the circuit-switcehd > + Mobile Switching Center; network element in the circuit-switched > core network > MSISDN:: > Mobile Subscriber ISDN Number; telephone number of the subscriber > @@ -168,7 +168,7 @@ MVNO:: > NCC:: > Network Color Code; assigned by national regulator > NITB:: > - Network In The Box; combines functionality traditionally proivided > + Network In The Box; combines functionality traditionally provided > by BSC, MSC, VLR, HLR, SMSC functions; see OsmoNITB > NSEI:: > NS Entity Identifier > @@ -236,7 +236,7 @@ RFM:: > Roaming:: > Procedure in which a subscriber of one network is using the radio > network of another network, often in different countries; in some > - countris national roaming exists > + countries national roaming exists > Routing Area:: > Routing Area; GPRS specific sub-division of Location Area > RR:: > diff --git a/common/chapters/preface.adoc b/common/chapters/preface.adoc > index d986cbe..13afec1 100644 > --- a/common/chapters/preface.adoc > +++ b/common/chapters/preface.adoc > @@ -71,7 +71,7 @@ following key individuals and organizations, in no particular order: > annual Osmocom Developer Conference and releasing this manual. > * Jan Luebbe, Stefan Schmidt, Daniel Willmann, Pablo Neira, Nico Golde, > Kevin Redon, Ingo Albrecht, Alexander Huemer, Alexander Chemeris, Max > - Suraev, Tobias Engel, Jacob Erlbeck, Ivan Kluchnikov, Alexander Huemer > + Suraev, Tobias Engel, Jacob Erlbeck, Ivan Kluchnikov > > May the source be with you! > > @@ -125,7 +125,7 @@ contributions can be many-fold, for example > by donating developer resources or by (partially) funding those people > in the community who do. > > -We're looking forward to receicing your contributions. > +We're looking forward to receiving your contributions. > > === Osmocom and sysmocom > > @@ -194,17 +194,17 @@ use case is compliant with the software licenses. > ==== Trademarks > > All trademarks, service marks, trade names, trade dress, product names > -and logos appearing in this manual are the property of their respecitve > +and logos appearing in this manual are the property of their respective > owners. All rights not expressly granted herein are reserved. > > -For your convenience we have listed below some of the registrered > +For your convenience we have listed below some of the registered > trademarks referenced herein. This is not a definitive or complete list > of the trademarks used. > > 'Osmocom(R)' and 'OpenBSC(R)' are registered trademarks of Holger > Freyther and Harald Welte. > > -'sysmocom(R)' and 'sysmoBTS(R)' is registered trasdemarks of > +'sysmocom(R)' and 'sysmoBTS(R)' are registered trademarks of > 'sysmocom - systems for mobile communications GmbH'. > > 'ip.access(R)' and 'nanoBTS(R)' are registered trademarks of > diff --git a/common/chapters/vty.adoc b/common/chapters/vty.adoc > index 9103319..931cd1f 100644 > --- a/common/chapters/vty.adoc > +++ b/common/chapters/vty.adoc > @@ -134,12 +134,12 @@ OpenBSC> <1> > terminal Set terminal line parameters > who Display who is on vty > logging Configure log message to this terminal > - sms SMS related comamnds > + sms SMS related commands > subscriber Operations on a Subscriber > ---- > <1> press `?` here at the prompt, the character will not be printed > > -If you have already entered a partial comamnd, `?` will help you to > +If you have already entered a partial command, `?` will help you to > review possible options of how to continue your command. Let's say you > remember that `show` is used to investigate the system status. But you > don't know exactly what the object was called that you'd like to show: > @@ -157,7 +157,7 @@ OpenBSC> show <1> > trx Display information about a TRX > timeslot Display information about a TS > lchan Display information about a logical channel > - paging Display information about paging reuqests of a BTS > + paging Display information about paging requests of a BTS > paging-group Display the paging group > logging Show current logging configuration > alarms Show current logging configuration > @@ -172,7 +172,7 @@ OpenBSC> show <1> > ---- > <1> press `?` after the `show` command, the character will not be printed > > -Now you decide you want to have a look at the the `network` object, so > +Now you decide you want to have a look at the `network` object, so > you type network and press `?` again: > > .Example: Typing `?` after `show network` > -- > 1.9.1 > -- - Neels Hofmeyr http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Gesch?ftsf?hrer / Managing Directors: Holger Freyther, Harald Welte -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From gerrit-no-reply at lists.osmocom.org Wed May 25 13:24:22 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 25 May 2016 13:24:22 +0000 Subject: libosmocore[master]: misc: Some spelling errors corrected In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/114 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibfc239b84879556624ca6020ae6a63d102640c94 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 25 13:25:12 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Wed, 25 May 2016 13:25:12 +0000 Subject: libsmpp34[master]: Fix various typos in log messages In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 It's N times the same fix, not 'various', but whatever ;) -- To view, visit https://gerrit.osmocom.org/115 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If52a8546b09ac14c00e6323984eda6d88a558830 Gerrit-PatchSet: 1 Gerrit-Project: libsmpp34 Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 25 15:52:17 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 25 May 2016 15:52:17 +0000 Subject: [PATCH] libosmocore[master]: Add strings with PH primitive names Message-ID: Review at https://gerrit.osmocom.org/117 Add strings with PH primitive names It's useful debugging helper while troubleshooting L1-related issues. Change-Id: Id7a6d478fd725c51f54ad746bdf9b9095579ff77 --- M include/osmocom/gsm/l1sap.h M src/gsm/lapdm.c M src/gsm/libosmogsm.map 3 files changed, 15 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/17/117/1 diff --git a/include/osmocom/gsm/l1sap.h b/include/osmocom/gsm/l1sap.h index 1af8ba8..ad942ea 100644 --- a/include/osmocom/gsm/l1sap.h +++ b/include/osmocom/gsm/l1sap.h @@ -14,6 +14,8 @@ PRIM_TCH_RTS, /*!< \brief TCH */ }; +extern const struct value_string osmo_ph_prim_names[]; + /*! \brief PH-SAP related primitives (L1<->L2 SAP) */ enum osmo_mph_info_type { PRIM_INFO_TIME, /*!< \brief Current GSM time */ diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c index d44335f..36a97f4 100644 --- a/src/gsm/lapdm.c +++ b/src/gsm/lapdm.c @@ -111,6 +111,17 @@ LAPDm_FMT_B4, }; +const struct value_string osmo_ph_prim_names[] = { + { PRIM_PH_DATA, "PH-DATA" }, + { PRIM_PH_RACH, "PH-RANDOM_ACCESS" }, + { PRIM_PH_CONN, "PH-CONNECT" }, + { PRIM_PH_EMPTY_FRAME, "PH-EMPTY_FRAME" }, + { PRIM_PH_RTS, "PH-RTS" }, + { PRIM_MPH_INFO, "MPH-INFO" }, + { PRIM_TCH, "TCH" }, + { PRIM_TCH_RTS, "TCH-RTS" }, +}; + static int lapdm_send_ph_data_req(struct lapd_msg_ctx *lctx, struct msgb *msg); static int send_rslms_dlsap(struct osmo_dlsap_prim *dp, struct lapd_msg_ctx *lctx); diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 1e2d323..301f5aa 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -223,6 +223,8 @@ lapdm_phsap_up; lapdm_rslms_recvmsg; +osmo_ph_prim_names; + milenage_auts; milenage_check; milenage_f1; -- To view, visit https://gerrit.osmocom.org/117 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id7a6d478fd725c51f54ad746bdf9b9095579ff77 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed May 25 16:18:23 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 25 May 2016 16:18:23 +0000 Subject: [PATCH] libosmocore[master]: Add helper functions for AMR codec Message-ID: Review at https://gerrit.osmocom.org/118 Add helper functions for AMR codec * add functions to encode/decode various codec paramters from RTP payload with AMR frame according to RFC 4867 * those functions are extended version based on code from osmo-bts' amr.c by Andreas Eversberg * add corresponding enum types and strings for logging * add regression tests It's useful both to replace manual parsing in osmo-bts with fuctions covered by test suite and as a debugging helpers for issues related to AMR. Change-Id: Ia217679a07d3fbc970f435e20f6eac33d34bd597 Related: OS#1562 --- M .gitignore M include/osmocom/codec/codec.h M src/codec/gsm690.c M tests/Makefile.am A tests/codec/codec_test.c A tests/codec/codec_test.ok M tests/testsuite.at 7 files changed, 204 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/18/118/1 diff --git a/.gitignore b/.gitignore index 03ce379..70e2016 100644 --- a/.gitignore +++ b/.gitignore @@ -80,6 +80,7 @@ tests/ringbuf/ringbuf_test tests/strrb/strrb_test tests/vty/vty_test +tests/codec/codec_test tests/gb/gprs_bssgp_test tests/smscb/gsm0341_test tests/bitvec/bitvec_test diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h index d126e0f..b7bcc78 100644 --- a/include/osmocom/codec/codec.h +++ b/include/osmocom/codec/codec.h @@ -2,6 +2,8 @@ #include +#include + extern const uint16_t gsm610_bitorder[]; /* FR */ extern const uint16_t gsm620_unvoiced_bitorder[]; /* HR unvoiced */ extern const uint16_t gsm620_voiced_bitorder[]; /* HR voiced */ @@ -15,3 +17,32 @@ extern const uint16_t gsm690_5_9_bitorder[]; /* AMR 5.9 kbits */ extern const uint16_t gsm690_5_15_bitorder[]; /* AMR 5.15 kbits */ extern const uint16_t gsm690_4_75_bitorder[]; /* AMR 4.75 kbits */ + +extern const struct value_string osmo_amr_type_names[]; + +enum osmo_amr_type { + AMR_4_75 = 0, + AMR_5_15 = 1, + AMR_5_90 = 2, + AMR_6_70 = 3, + AMR_7_40 = 4, + AMR_7_95 = 5, + AMR_10_2 = 6, + AMR_12_2 = 7, + AMR_SID = 8, + AMR_GSM_EFR_SID = 9, + AMR_TDMA_EFR_SID = 10, + AMR_PDC_EFR_SID = 11, + AMR_NO_DATA = 15, +}; + +enum osmo_amr_quality { + AMR_BAD = 0, + AMR_GOOD = 1 +}; + +int osmo_amr_rtp_enc(uint8_t *payload, uint8_t cmr, enum osmo_amr_type ft, + enum osmo_amr_quality bfi); +int osmo_amr_rtp_dec(const uint8_t *payload, int payload_len, uint8_t *cmr, + int8_t *cmi, enum osmo_amr_type *ft, + enum osmo_amr_quality *bfi, int8_t *sti); diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c index fdf3302..3a509bd 100644 --- a/src/codec/gsm690.c +++ b/src/codec/gsm690.c @@ -22,7 +22,10 @@ */ #include +#include +#include +#include /* * These table map between the raw encoder parameter output and * the format used before channel coding. Both in GSM and in various @@ -208,3 +211,104 @@ 88, 90, 91, 34, 55, 68, 89, 37, 58, 71, 92, 31, 52, 65, 86, }; + +static const uint8_t amr_len_by_ft[16] = { + 12, 13, 15, 17, 19, 20, 26, 31, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +const struct value_string osmo_amr_type_names[] = { + { AMR_4_75, "AMR 4,75 kbits/s" }, + { AMR_5_15, "AMR 5,15 kbit/s" }, + { AMR_5_90, "AMR 5,90 kbit/s" }, + { AMR_6_70, "AMR 6,70 kbit/s (PDC-EFR)" }, + { AMR_7_40, "AMR 7,40 kbit/s (TDMA-EFR)" }, + { AMR_7_95, "AMR 7,95 kbit/s" }, + { AMR_10_2, "AMR 10,2 kbit/s" }, + { AMR_12_2, "AMR 12,2 kbit/s (GSM-EFR)" }, + { AMR_SID, "AMR SID" }, + { AMR_GSM_EFR_SID, "GSM-EFR SID" }, + { AMR_TDMA_EFR_SID, "TDMA-EFR SID" }, + { AMR_PDC_EFR_SID, "PDC-EFR SID" }, + { AMR_NO_DATA, "No Data/NA" }, + { 0, NULL }, +}; + +/*! \brief Decode various AMR parameters from RTP payload (RFC 4867) acording to + * 3GPP TS 26.101 + * \param[in] rtppayload Payload from RTP packet + * \param[in] payload_len length of rtppayload + * \param[out] cmr AMR Codec Mode Request, not filled if NULL + * \param[out] cmi AMR Codec Mode Indicator, -1 if not applicable for this type, + * not filled if NULL + * \param[out] ft AMR Frame Type, not filled if NULL + * \param[out] bfi AMR Bad Frame Indicator, not filled if NULL + * \param[out] sti AMR SID Type Indicator, -1 if not applicable for this type, + * not filled if NULL + * \returns length of AMR data or negative value on error + */ +int osmo_amr_rtp_dec(const uint8_t *rtppayload, int payload_len, uint8_t *cmr, + int8_t *cmi, enum osmo_amr_type *ft, + enum osmo_amr_quality *bfi, int8_t *sti) +{ + /* RFC 4867 ? 4.4.2 ToC - compound payloads are not supported: F = 0 */ + uint8_t type = (rtppayload[1] >> 3) & 0xf; + + /* compound payloads are not supported */ + if (rtppayload[1] >> 7) + return -ENOTSUP; + + if (payload_len - 2 < amr_len_by_ft[type]) + return -ENOTSUP; + + if (payload_len < 2) + return -EINVAL; + + if (ft) + *ft = type; + + if (cmr) + *cmr = rtppayload[0] >> 4; + + if (bfi) + *bfi = (rtppayload[1] >> 2) & 1; + + /* Table 6 in 3GPP TS 26.101 */ + if (cmi) + *cmi = (type == AMR_SID) ? ((rtppayload[6] >> 1) & 7) : -1; + + if (sti) + *sti = (type == AMR_SID) ? (rtppayload[6] & 0x10) : -1; + + return 2 + amr_len_by_ft[type]; +} + +/*! \brief Encode various AMR parameters from RTP payload (RFC 4867) + * \param[out] payload Payload for RTP packet, contains speech data (if any) + * except for have 2 first bytes where header will be built + * \param[in] cmr AMR codec Mode Request + * \param[in] ft AMR Frame Type + * \param[in] bfi AMR Bad Frame Indicator + * \returns length of AMR data (header + ToC + speech data) or negative value + * on error + * + * Note: only octet-aligned mode is supported so the header occupies 2 full + * bytes. Optional interleaving header is not supported. + */ +int osmo_amr_rtp_enc(uint8_t *payload, uint8_t cmr, enum osmo_amr_type ft, + enum osmo_amr_quality bfi) +{ + if (cmr > 15) + return -EINVAL; + + if (ft > 15) + return -EMEDIUMTYPE; + + /* RFC 4867 ? 4.3.1 payload header */ + payload[0] = cmr << 4; + + /* RFC 4867 ? 4.4.2 ToC - compound payloads are not supported: F = 0 */ + payload[1] = (((uint8_t)ft) << 3) | (((uint8_t)bfi) << 2); + + /* speech data */ + return 2 + amr_len_by_ft[ft]; +} diff --git a/tests/Makefile.am b/tests/Makefile.am index 6c9929b..55aaa07 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -8,7 +8,7 @@ gsm0808/gsm0808_test gsm0408/gsm0408_test \ gb/bssgp_fc_test gb/gprs_bssgp_test gb/gprs_ns_test \ gprs/gprs_test kasumi/kasumi_test \ - logging/logging_test fr/fr_test \ + logging/logging_test fr/fr_test codec/codec_test \ loggingrb/loggingrb_test strrb/strrb_test \ vty/vty_test comp128/comp128_test utils/utils_test \ smscb/gsm0341_test stats/stats_test \ @@ -97,6 +97,9 @@ fr_fr_test_SOURCES = fr/fr_test.c fr_fr_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gb/libosmogb.la $(LIBRARY_DL) +codec_codec_test_SOURCES = codec/codec_test.c +codec_codec_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/codec/libosmocodec.la + loggingrb_loggingrb_test_SOURCES = loggingrb/loggingrb_test.c loggingrb_loggingrb_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/vty/libosmovty.la @@ -141,7 +144,7 @@ gsm0808/gsm0808_test.ok gb/bssgp_fc_tests.err \ gb/bssgp_fc_tests.ok gb/bssgp_fc_tests.sh \ gb/gprs_bssgp_test.ok gb/gprs_ns_test.ok \ - gprs/gprs_test.ok kasumi/kasumi_test.ok \ + gprs/gprs_test.ok kasumi/kasumi_test.ok codec/codec_test.ok \ msgfile/msgfile_test.ok msgfile/msgconfig.cfg \ logging/logging_test.ok logging/logging_test.err \ fr/fr_test.ok loggingrb/logging_test.ok \ diff --git a/tests/codec/codec_test.c b/tests/codec/codec_test.c new file mode 100644 index 0000000..854717b --- /dev/null +++ b/tests/codec/codec_test.c @@ -0,0 +1,54 @@ +/* + * (C) 2016 by Sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include + +#include +#include + +const uint8_t sid_update[] = {0x20, 0x44, 0x29, 0xc2, 0x92, 0x91, 0xf4}; +const uint8_t sid_first[] = {0x20, 0x44, 0x00, 0x00, 0x00, 0x00, 0x04}; + +static void test_sid_dec(const uint8_t *t, size_t len) +{ + uint8_t cmr; + enum osmo_amr_type ft; + enum osmo_amr_quality bfi; + int8_t sti, cmi; + int rc = osmo_amr_rtp_dec(t, len, &cmr, &cmi, &ft, &bfi, &sti); + printf("[%d] decode RTP %s%s: FT %s, CMR %s, CMI is %d, SID type %s\n", + rc, osmo_hexdump(t, len), bfi == AMR_GOOD ? "OK" : "BAD", + get_value_string(osmo_amr_type_names, ft), + get_value_string(osmo_amr_type_names, cmr), + cmi, sti ? "UPDATE" : "FIRST"); + if (sti == -1) + printf("FAIL: incompatible STI for SID\n"); +} + +int main(int argc, char **argv) +{ + printf("AMR RTP payload decoder test:\n"); + test_sid_dec(sid_first, 7); + test_sid_dec(sid_update, 7); + + return 0; +} + + diff --git a/tests/codec/codec_test.ok b/tests/codec/codec_test.ok new file mode 100644 index 0000000..f3da636 --- /dev/null +++ b/tests/codec/codec_test.ok @@ -0,0 +1,3 @@ +AMR RTP payload decoder test: +[2] decode RTP 20 44 00 00 00 00 04 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type FIRST +[2] decode RTP 20 44 29 c2 92 91 f4 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type UPDATE diff --git a/tests/testsuite.at b/tests/testsuite.at index aa269af..d49f7ff 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -115,12 +115,17 @@ AT_CHECK([$abs_top_builddir/tests/logging/logging_test], [0], [expout], [experr]) AT_CLEANUP +AT_SETUP([codec]) +AT_KEYWORDS([codec]) +cat $abs_srcdir/codec/codec_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/codec/codec_test], [0], [expout], [ignore]) +AT_CLEANUP + AT_SETUP([fr]) AT_KEYWORDS([fr]) cat $abs_srcdir/fr/fr_test.ok > expout cat $abs_srcdir/fr/fr_test.err > experr AT_CHECK([$abs_top_builddir/tests/fr/fr_test], [0], [expout], [experr]) - AT_CLEANUP AT_SETUP([loggingrb]) -- To view, visit https://gerrit.osmocom.org/118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia217679a07d3fbc970f435e20f6eac33d34bd597 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Wed May 25 16:26:44 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 25 May 2016 16:26:44 +0000 Subject: [PATCH] libosmocore[master]: Add helper functions for AMR codec In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/118 to look at the new patch set (#2). Add helper functions for AMR codec * add functions to encode/decode various codec paramters from RTP payload with AMR frame according to RFC 4867 * those functions are extended version based on code from osmo-bts' amr.c by Andreas Eversberg * add corresponding enum types and strings for logging * add regression tests It's useful both to replace manual parsing in osmo-bts with fuctions covered by test suite and as a debugging helpers for issues related to AMR. Change-Id: Ia217679a07d3fbc970f435e20f6eac33d34bd597 Related: OS#1562 --- M .gitignore M include/osmocom/codec/codec.h M src/codec/gsm690.c M tests/Makefile.am A tests/codec/codec_test.c A tests/codec/codec_test.ok M tests/testsuite.at 7 files changed, 206 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/18/118/2 diff --git a/.gitignore b/.gitignore index 03ce379..70e2016 100644 --- a/.gitignore +++ b/.gitignore @@ -80,6 +80,7 @@ tests/ringbuf/ringbuf_test tests/strrb/strrb_test tests/vty/vty_test +tests/codec/codec_test tests/gb/gprs_bssgp_test tests/smscb/gsm0341_test tests/bitvec/bitvec_test diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h index d126e0f..b7bcc78 100644 --- a/include/osmocom/codec/codec.h +++ b/include/osmocom/codec/codec.h @@ -2,6 +2,8 @@ #include +#include + extern const uint16_t gsm610_bitorder[]; /* FR */ extern const uint16_t gsm620_unvoiced_bitorder[]; /* HR unvoiced */ extern const uint16_t gsm620_voiced_bitorder[]; /* HR voiced */ @@ -15,3 +17,32 @@ extern const uint16_t gsm690_5_9_bitorder[]; /* AMR 5.9 kbits */ extern const uint16_t gsm690_5_15_bitorder[]; /* AMR 5.15 kbits */ extern const uint16_t gsm690_4_75_bitorder[]; /* AMR 4.75 kbits */ + +extern const struct value_string osmo_amr_type_names[]; + +enum osmo_amr_type { + AMR_4_75 = 0, + AMR_5_15 = 1, + AMR_5_90 = 2, + AMR_6_70 = 3, + AMR_7_40 = 4, + AMR_7_95 = 5, + AMR_10_2 = 6, + AMR_12_2 = 7, + AMR_SID = 8, + AMR_GSM_EFR_SID = 9, + AMR_TDMA_EFR_SID = 10, + AMR_PDC_EFR_SID = 11, + AMR_NO_DATA = 15, +}; + +enum osmo_amr_quality { + AMR_BAD = 0, + AMR_GOOD = 1 +}; + +int osmo_amr_rtp_enc(uint8_t *payload, uint8_t cmr, enum osmo_amr_type ft, + enum osmo_amr_quality bfi); +int osmo_amr_rtp_dec(const uint8_t *payload, int payload_len, uint8_t *cmr, + int8_t *cmi, enum osmo_amr_type *ft, + enum osmo_amr_quality *bfi, int8_t *sti); diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c index fdf3302..b5db518 100644 --- a/src/codec/gsm690.c +++ b/src/codec/gsm690.c @@ -22,7 +22,12 @@ */ #include +#include +#include +#include +#include +#include /* * These table map between the raw encoder parameter output and * the format used before channel coding. Both in GSM and in various @@ -208,3 +213,104 @@ 88, 90, 91, 34, 55, 68, 89, 37, 58, 71, 92, 31, 52, 65, 86, }; + +static const uint8_t amr_len_by_ft[16] = { + 12, 13, 15, 17, 19, 20, 26, 31, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +const struct value_string osmo_amr_type_names[] = { + { AMR_4_75, "AMR 4,75 kbits/s" }, + { AMR_5_15, "AMR 5,15 kbit/s" }, + { AMR_5_90, "AMR 5,90 kbit/s" }, + { AMR_6_70, "AMR 6,70 kbit/s (PDC-EFR)" }, + { AMR_7_40, "AMR 7,40 kbit/s (TDMA-EFR)" }, + { AMR_7_95, "AMR 7,95 kbit/s" }, + { AMR_10_2, "AMR 10,2 kbit/s" }, + { AMR_12_2, "AMR 12,2 kbit/s (GSM-EFR)" }, + { AMR_SID, "AMR SID" }, + { AMR_GSM_EFR_SID, "GSM-EFR SID" }, + { AMR_TDMA_EFR_SID, "TDMA-EFR SID" }, + { AMR_PDC_EFR_SID, "PDC-EFR SID" }, + { AMR_NO_DATA, "No Data/NA" }, + { 0, NULL }, +}; + +/*! \brief Decode various AMR parameters from RTP payload (RFC 4867) acording to + * 3GPP TS 26.101 + * \param[in] rtppayload Payload from RTP packet + * \param[in] payload_len length of rtppayload + * \param[out] cmr AMR Codec Mode Request, not filled if NULL + * \param[out] cmi AMR Codec Mode Indicator, -1 if not applicable for this type, + * not filled if NULL + * \param[out] ft AMR Frame Type, not filled if NULL + * \param[out] bfi AMR Bad Frame Indicator, not filled if NULL + * \param[out] sti AMR SID Type Indicator, -1 if not applicable for this type, + * not filled if NULL + * \returns length of AMR data or negative value on error + */ +int osmo_amr_rtp_dec(const uint8_t *rtppayload, int payload_len, uint8_t *cmr, + int8_t *cmi, enum osmo_amr_type *ft, + enum osmo_amr_quality *bfi, int8_t *sti) +{ + /* RFC 4867 ? 4.4.2 ToC - compound payloads are not supported: F = 0 */ + uint8_t type = (rtppayload[1] >> 3) & 0xf; + + /* compound payloads are not supported */ + if (rtppayload[1] >> 7) + return -ENOTSUP; + + if (payload_len - 2 < amr_len_by_ft[type]) + return -ENOTSUP; + + if (payload_len < 2) + return -EINVAL; + + if (ft) + *ft = type; + + if (cmr) + *cmr = rtppayload[0] >> 4; + + if (bfi) + *bfi = (rtppayload[1] >> 2) & 1; + + /* Table 6 in 3GPP TS 26.101 */ + if (cmi) + *cmi = (type == AMR_SID) ? ((rtppayload[6] >> 1) & 7) : -1; + + if (sti) + *sti = (type == AMR_SID) ? (rtppayload[6] & 0x10) : -1; + + return 2 + amr_len_by_ft[type]; +} + +/*! \brief Encode various AMR parameters from RTP payload (RFC 4867) + * \param[out] payload Payload for RTP packet, contains speech data (if any) + * except for have 2 first bytes where header will be built + * \param[in] cmr AMR codec Mode Request + * \param[in] ft AMR Frame Type + * \param[in] bfi AMR Bad Frame Indicator + * \returns length of AMR data (header + ToC + speech data) or negative value + * on error + * + * Note: only octet-aligned mode is supported so the header occupies 2 full + * bytes. Optional interleaving header is not supported. + */ +int osmo_amr_rtp_enc(uint8_t *payload, uint8_t cmr, enum osmo_amr_type ft, + enum osmo_amr_quality bfi) +{ + if (cmr > 15) + return -EINVAL; + + if (ft > 15) + return -EMEDIUMTYPE; + + /* RFC 4867 ? 4.3.1 payload header */ + payload[0] = cmr << 4; + + /* RFC 4867 ? 4.4.2 ToC - compound payloads are not supported: F = 0 */ + payload[1] = (((uint8_t)ft) << 3) | (((uint8_t)bfi) << 2); + + /* speech data */ + return 2 + amr_len_by_ft[ft]; +} diff --git a/tests/Makefile.am b/tests/Makefile.am index 6c9929b..55aaa07 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -8,7 +8,7 @@ gsm0808/gsm0808_test gsm0408/gsm0408_test \ gb/bssgp_fc_test gb/gprs_bssgp_test gb/gprs_ns_test \ gprs/gprs_test kasumi/kasumi_test \ - logging/logging_test fr/fr_test \ + logging/logging_test fr/fr_test codec/codec_test \ loggingrb/loggingrb_test strrb/strrb_test \ vty/vty_test comp128/comp128_test utils/utils_test \ smscb/gsm0341_test stats/stats_test \ @@ -97,6 +97,9 @@ fr_fr_test_SOURCES = fr/fr_test.c fr_fr_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gb/libosmogb.la $(LIBRARY_DL) +codec_codec_test_SOURCES = codec/codec_test.c +codec_codec_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/codec/libosmocodec.la + loggingrb_loggingrb_test_SOURCES = loggingrb/loggingrb_test.c loggingrb_loggingrb_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/vty/libosmovty.la @@ -141,7 +144,7 @@ gsm0808/gsm0808_test.ok gb/bssgp_fc_tests.err \ gb/bssgp_fc_tests.ok gb/bssgp_fc_tests.sh \ gb/gprs_bssgp_test.ok gb/gprs_ns_test.ok \ - gprs/gprs_test.ok kasumi/kasumi_test.ok \ + gprs/gprs_test.ok kasumi/kasumi_test.ok codec/codec_test.ok \ msgfile/msgfile_test.ok msgfile/msgconfig.cfg \ logging/logging_test.ok logging/logging_test.err \ fr/fr_test.ok loggingrb/logging_test.ok \ diff --git a/tests/codec/codec_test.c b/tests/codec/codec_test.c new file mode 100644 index 0000000..854717b --- /dev/null +++ b/tests/codec/codec_test.c @@ -0,0 +1,54 @@ +/* + * (C) 2016 by Sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include + +#include +#include + +const uint8_t sid_update[] = {0x20, 0x44, 0x29, 0xc2, 0x92, 0x91, 0xf4}; +const uint8_t sid_first[] = {0x20, 0x44, 0x00, 0x00, 0x00, 0x00, 0x04}; + +static void test_sid_dec(const uint8_t *t, size_t len) +{ + uint8_t cmr; + enum osmo_amr_type ft; + enum osmo_amr_quality bfi; + int8_t sti, cmi; + int rc = osmo_amr_rtp_dec(t, len, &cmr, &cmi, &ft, &bfi, &sti); + printf("[%d] decode RTP %s%s: FT %s, CMR %s, CMI is %d, SID type %s\n", + rc, osmo_hexdump(t, len), bfi == AMR_GOOD ? "OK" : "BAD", + get_value_string(osmo_amr_type_names, ft), + get_value_string(osmo_amr_type_names, cmr), + cmi, sti ? "UPDATE" : "FIRST"); + if (sti == -1) + printf("FAIL: incompatible STI for SID\n"); +} + +int main(int argc, char **argv) +{ + printf("AMR RTP payload decoder test:\n"); + test_sid_dec(sid_first, 7); + test_sid_dec(sid_update, 7); + + return 0; +} + + diff --git a/tests/codec/codec_test.ok b/tests/codec/codec_test.ok new file mode 100644 index 0000000..f3da636 --- /dev/null +++ b/tests/codec/codec_test.ok @@ -0,0 +1,3 @@ +AMR RTP payload decoder test: +[2] decode RTP 20 44 00 00 00 00 04 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type FIRST +[2] decode RTP 20 44 29 c2 92 91 f4 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type UPDATE diff --git a/tests/testsuite.at b/tests/testsuite.at index aa269af..d49f7ff 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -115,12 +115,17 @@ AT_CHECK([$abs_top_builddir/tests/logging/logging_test], [0], [expout], [experr]) AT_CLEANUP +AT_SETUP([codec]) +AT_KEYWORDS([codec]) +cat $abs_srcdir/codec/codec_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/codec/codec_test], [0], [expout], [ignore]) +AT_CLEANUP + AT_SETUP([fr]) AT_KEYWORDS([fr]) cat $abs_srcdir/fr/fr_test.ok > expout cat $abs_srcdir/fr/fr_test.err > experr AT_CHECK([$abs_top_builddir/tests/fr/fr_test], [0], [expout], [experr]) - AT_CLEANUP AT_SETUP([loggingrb]) -- To view, visit https://gerrit.osmocom.org/118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia217679a07d3fbc970f435e20f6eac33d34bd597 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed May 25 16:41:48 2016 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Wed, 25 May 2016 16:41:48 +0000 Subject: openbsc[master]: filter/nat: Fix the context for the imsi assignment In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/102 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I53789aad2809e19338ad3b2deb72c4757e7bd524 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 25 16:52:00 2016 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Wed, 25 May 2016 16:52:00 +0000 Subject: [PATCH] libosmo-netif[master]: osmux: Pass circuit to _batch_del_circuit() and use it from ... Message-ID: Review at https://gerrit.osmocom.org/119 osmux: Pass circuit to _batch_del_circuit() and use it from _xfrm_input_fini() Change-Id: If224980123d4a369133499ab7b577d02511f4055 Ticket: OS#1733 --- M src/osmux.c 1 file changed, 8 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/19/119/1 diff --git a/src/osmux.c b/src/osmux.c index 8025d5d..44b4b96 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -533,14 +533,8 @@ return circuit; } -static void osmux_batch_del_circuit(struct osmux_batch *batch, int ccid) +static void osmux_batch_del_circuit(struct osmux_batch *batch, struct osmux_circuit *circuit) { - struct osmux_circuit *circuit; - - circuit = osmux_batch_find_circuit(batch, ccid); - if (circuit == NULL) - return; - if (circuit->dummy) batch->ndummy--; llist_del(&circuit->head); @@ -713,8 +707,13 @@ void osmux_xfrm_input_close_circuit(struct osmux_in_handle *h, int ccid) { struct osmux_batch *batch = (struct osmux_batch *)h->internal_data; + struct osmux_circuit *circuit; - osmux_batch_del_circuit(batch, ccid); + circuit = osmux_batch_find_circuit(batch, ccid); + if (circuit == NULL) + return; + + osmux_batch_del_circuit(batch, circuit); } void osmux_xfrm_input_fini(struct osmux_in_handle *h) @@ -723,8 +722,7 @@ struct osmux_circuit *circuit, *next; llist_for_each_entry_safe(circuit, next, &batch->circuit_list, head) { - llist_del(&circuit->head); - talloc_free(circuit); + osmux_batch_del_circuit(batch, circuit); } osmo_timer_del(&batch->timer); talloc_free(batch); -- To view, visit https://gerrit.osmocom.org/119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If224980123d4a369133499ab7b577d02511f4055 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: daniel From gerrit-no-reply at lists.osmocom.org Wed May 25 16:52:00 2016 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Wed, 25 May 2016 16:52:00 +0000 Subject: [PATCH] libosmo-netif[master]: osmux: Add function to delete all msgs pending for a circuit Message-ID: Review at https://gerrit.osmocom.org/120 osmux: Add function to delete all msgs pending for a circuit Use this function in osmux_batch_del_circuit() since msgs are stored in a list per circuit. After the circuit is free()d the msgs are lost. Before this patch any messages enqueued inside a batch when the circiut is deleted were leaking. Change-Id: Ib0311652183332d0475bf7347023d518d38487ef Ticket: OS#1733 --- M src/osmux.c 1 file changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/20/120/1 diff --git a/src/osmux.c b/src/osmux.c index 44b4b96..01d0bdc 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -225,6 +225,17 @@ circuit->nmsgs--; } +static void osmux_circuit_del_msgs(struct osmux_batch *batch, struct osmux_circuit *circuit) +{ + struct msgb *cur, *tmp; + llist_for_each_entry_safe(cur, tmp, &circuit->msg_list, list) { + + osmux_batch_dequeue(cur, circuit); + msgb_free(cur); + batch->nmsgs--; + } +} + struct osmux_input_state { struct msgb *out_msg; struct msgb *msg; @@ -538,6 +549,7 @@ if (circuit->dummy) batch->ndummy--; llist_del(&circuit->head); + osmux_circuit_del_msgs(batch, circuit); talloc_free(circuit); } -- To view, visit https://gerrit.osmocom.org/120 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib0311652183332d0475bf7347023d518d38487ef Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: daniel From gerrit-no-reply at lists.osmocom.org Wed May 25 16:54:47 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Wed, 25 May 2016 16:54:47 +0000 Subject: [PATCH] libosmocore[master]: Add helper functions for AMR codec In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/118 to look at the new patch set (#3). Add helper functions for AMR codec * add functions to encode/decode various codec paramters from RTP payload with AMR frame according to RFC 4867 * those functions are extended version based on code from osmo-bts' amr.c by Andreas Eversberg * add corresponding enum types and strings for logging * add regression tests It's useful both to replace manual parsing in osmo-bts with fuctions covered by test suite and as a debugging helpers for issues related to AMR. Change-Id: Ia217679a07d3fbc970f435e20f6eac33d34bd597 Related: OS#1562 --- M .gitignore M include/osmocom/codec/codec.h M src/codec/gsm690.c M tests/Makefile.am A tests/codec/codec_test.c A tests/codec/codec_test.ok M tests/testsuite.at 7 files changed, 206 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/18/118/3 diff --git a/.gitignore b/.gitignore index 03ce379..70e2016 100644 --- a/.gitignore +++ b/.gitignore @@ -80,6 +80,7 @@ tests/ringbuf/ringbuf_test tests/strrb/strrb_test tests/vty/vty_test +tests/codec/codec_test tests/gb/gprs_bssgp_test tests/smscb/gsm0341_test tests/bitvec/bitvec_test diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h index d126e0f..b7bcc78 100644 --- a/include/osmocom/codec/codec.h +++ b/include/osmocom/codec/codec.h @@ -2,6 +2,8 @@ #include +#include + extern const uint16_t gsm610_bitorder[]; /* FR */ extern const uint16_t gsm620_unvoiced_bitorder[]; /* HR unvoiced */ extern const uint16_t gsm620_voiced_bitorder[]; /* HR voiced */ @@ -15,3 +17,32 @@ extern const uint16_t gsm690_5_9_bitorder[]; /* AMR 5.9 kbits */ extern const uint16_t gsm690_5_15_bitorder[]; /* AMR 5.15 kbits */ extern const uint16_t gsm690_4_75_bitorder[]; /* AMR 4.75 kbits */ + +extern const struct value_string osmo_amr_type_names[]; + +enum osmo_amr_type { + AMR_4_75 = 0, + AMR_5_15 = 1, + AMR_5_90 = 2, + AMR_6_70 = 3, + AMR_7_40 = 4, + AMR_7_95 = 5, + AMR_10_2 = 6, + AMR_12_2 = 7, + AMR_SID = 8, + AMR_GSM_EFR_SID = 9, + AMR_TDMA_EFR_SID = 10, + AMR_PDC_EFR_SID = 11, + AMR_NO_DATA = 15, +}; + +enum osmo_amr_quality { + AMR_BAD = 0, + AMR_GOOD = 1 +}; + +int osmo_amr_rtp_enc(uint8_t *payload, uint8_t cmr, enum osmo_amr_type ft, + enum osmo_amr_quality bfi); +int osmo_amr_rtp_dec(const uint8_t *payload, int payload_len, uint8_t *cmr, + int8_t *cmi, enum osmo_amr_type *ft, + enum osmo_amr_quality *bfi, int8_t *sti); diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c index fdf3302..0f4bf8f 100644 --- a/src/codec/gsm690.c +++ b/src/codec/gsm690.c @@ -22,7 +22,12 @@ */ #include +#include +#include +#include +#include +#include /* * These table map between the raw encoder parameter output and * the format used before channel coding. Both in GSM and in various @@ -208,3 +213,104 @@ 88, 90, 91, 34, 55, 68, 89, 37, 58, 71, 92, 31, 52, 65, 86, }; + +static const uint8_t amr_len_by_ft[16] = { + 12, 13, 15, 17, 19, 20, 26, 31, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +const struct value_string osmo_amr_type_names[] = { + { AMR_4_75, "AMR 4,75 kbits/s" }, + { AMR_5_15, "AMR 5,15 kbit/s" }, + { AMR_5_90, "AMR 5,90 kbit/s" }, + { AMR_6_70, "AMR 6,70 kbit/s (PDC-EFR)" }, + { AMR_7_40, "AMR 7,40 kbit/s (TDMA-EFR)" }, + { AMR_7_95, "AMR 7,95 kbit/s" }, + { AMR_10_2, "AMR 10,2 kbit/s" }, + { AMR_12_2, "AMR 12,2 kbit/s (GSM-EFR)" }, + { AMR_SID, "AMR SID" }, + { AMR_GSM_EFR_SID, "GSM-EFR SID" }, + { AMR_TDMA_EFR_SID, "TDMA-EFR SID" }, + { AMR_PDC_EFR_SID, "PDC-EFR SID" }, + { AMR_NO_DATA, "No Data/NA" }, + { 0, NULL }, +}; + +/*! \brief Decode various AMR parameters from RTP payload (RFC 4867) acording to + * 3GPP TS 26.101 + * \param[in] rtppayload Payload from RTP packet + * \param[in] payload_len length of rtppayload + * \param[out] cmr AMR Codec Mode Request, not filled if NULL + * \param[out] cmi AMR Codec Mode Indicator, -1 if not applicable for this type, + * not filled if NULL + * \param[out] ft AMR Frame Type, not filled if NULL + * \param[out] bfi AMR Bad Frame Indicator, not filled if NULL + * \param[out] sti AMR SID Type Indicator, -1 if not applicable for this type, + * not filled if NULL + * \returns length of AMR data or negative value on error + */ +int osmo_amr_rtp_dec(const uint8_t *rtppayload, int payload_len, uint8_t *cmr, + int8_t *cmi, enum osmo_amr_type *ft, + enum osmo_amr_quality *bfi, int8_t *sti) +{ + /* RFC 4867 ? 4.4.2 ToC - compound payloads are not supported: F = 0 */ + uint8_t type = (rtppayload[1] >> 3) & 0xf; + + /* compound payloads are not supported */ + if (rtppayload[1] >> 7) + return -ENOTSUP; + + if (payload_len - 2 < amr_len_by_ft[type]) + return -ENOTSUP; + + if (payload_len < 2) + return -EINVAL; + + if (ft) + *ft = type; + + if (cmr) + *cmr = rtppayload[0] >> 4; + + if (bfi) + *bfi = (rtppayload[1] >> 2) & 1; + + /* Table 6 in 3GPP TS 26.101 */ + if (cmi) + *cmi = (type == AMR_SID) ? ((rtppayload[6] >> 1) & 7) : -1; + + if (sti) + *sti = (type == AMR_SID) ? (rtppayload[6] & 0x10) : -1; + + return 2 + amr_len_by_ft[type]; +} + +/*! \brief Encode various AMR parameters from RTP payload (RFC 4867) + * \param[out] payload Payload for RTP packet, contains speech data (if any) + * except for have 2 first bytes where header will be built + * \param[in] cmr AMR codec Mode Request + * \param[in] ft AMR Frame Type + * \param[in] bfi AMR Bad Frame Indicator + * \returns length of AMR data (header + ToC + speech data) or negative value + * on error + * + * Note: only octet-aligned mode is supported so the header occupies 2 full + * bytes. Optional interleaving header is not supported. + */ +int osmo_amr_rtp_enc(uint8_t *payload, uint8_t cmr, enum osmo_amr_type ft, + enum osmo_amr_quality bfi) +{ + if (cmr > 15) + return -EINVAL; + + if (ft > 15) + return -ENOTSUP; + + /* RFC 4867 ? 4.3.1 payload header */ + payload[0] = cmr << 4; + + /* RFC 4867 ? 4.4.2 ToC - compound payloads are not supported: F = 0 */ + payload[1] = (((uint8_t)ft) << 3) | (((uint8_t)bfi) << 2); + + /* speech data */ + return 2 + amr_len_by_ft[ft]; +} diff --git a/tests/Makefile.am b/tests/Makefile.am index 6c9929b..55aaa07 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -8,7 +8,7 @@ gsm0808/gsm0808_test gsm0408/gsm0408_test \ gb/bssgp_fc_test gb/gprs_bssgp_test gb/gprs_ns_test \ gprs/gprs_test kasumi/kasumi_test \ - logging/logging_test fr/fr_test \ + logging/logging_test fr/fr_test codec/codec_test \ loggingrb/loggingrb_test strrb/strrb_test \ vty/vty_test comp128/comp128_test utils/utils_test \ smscb/gsm0341_test stats/stats_test \ @@ -97,6 +97,9 @@ fr_fr_test_SOURCES = fr/fr_test.c fr_fr_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gb/libosmogb.la $(LIBRARY_DL) +codec_codec_test_SOURCES = codec/codec_test.c +codec_codec_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/codec/libosmocodec.la + loggingrb_loggingrb_test_SOURCES = loggingrb/loggingrb_test.c loggingrb_loggingrb_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/vty/libosmovty.la @@ -141,7 +144,7 @@ gsm0808/gsm0808_test.ok gb/bssgp_fc_tests.err \ gb/bssgp_fc_tests.ok gb/bssgp_fc_tests.sh \ gb/gprs_bssgp_test.ok gb/gprs_ns_test.ok \ - gprs/gprs_test.ok kasumi/kasumi_test.ok \ + gprs/gprs_test.ok kasumi/kasumi_test.ok codec/codec_test.ok \ msgfile/msgfile_test.ok msgfile/msgconfig.cfg \ logging/logging_test.ok logging/logging_test.err \ fr/fr_test.ok loggingrb/logging_test.ok \ diff --git a/tests/codec/codec_test.c b/tests/codec/codec_test.c new file mode 100644 index 0000000..854717b --- /dev/null +++ b/tests/codec/codec_test.c @@ -0,0 +1,54 @@ +/* + * (C) 2016 by Sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include + +#include +#include + +const uint8_t sid_update[] = {0x20, 0x44, 0x29, 0xc2, 0x92, 0x91, 0xf4}; +const uint8_t sid_first[] = {0x20, 0x44, 0x00, 0x00, 0x00, 0x00, 0x04}; + +static void test_sid_dec(const uint8_t *t, size_t len) +{ + uint8_t cmr; + enum osmo_amr_type ft; + enum osmo_amr_quality bfi; + int8_t sti, cmi; + int rc = osmo_amr_rtp_dec(t, len, &cmr, &cmi, &ft, &bfi, &sti); + printf("[%d] decode RTP %s%s: FT %s, CMR %s, CMI is %d, SID type %s\n", + rc, osmo_hexdump(t, len), bfi == AMR_GOOD ? "OK" : "BAD", + get_value_string(osmo_amr_type_names, ft), + get_value_string(osmo_amr_type_names, cmr), + cmi, sti ? "UPDATE" : "FIRST"); + if (sti == -1) + printf("FAIL: incompatible STI for SID\n"); +} + +int main(int argc, char **argv) +{ + printf("AMR RTP payload decoder test:\n"); + test_sid_dec(sid_first, 7); + test_sid_dec(sid_update, 7); + + return 0; +} + + diff --git a/tests/codec/codec_test.ok b/tests/codec/codec_test.ok new file mode 100644 index 0000000..f3da636 --- /dev/null +++ b/tests/codec/codec_test.ok @@ -0,0 +1,3 @@ +AMR RTP payload decoder test: +[2] decode RTP 20 44 00 00 00 00 04 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type FIRST +[2] decode RTP 20 44 29 c2 92 91 f4 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type UPDATE diff --git a/tests/testsuite.at b/tests/testsuite.at index aa269af..d49f7ff 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -115,12 +115,17 @@ AT_CHECK([$abs_top_builddir/tests/logging/logging_test], [0], [expout], [experr]) AT_CLEANUP +AT_SETUP([codec]) +AT_KEYWORDS([codec]) +cat $abs_srcdir/codec/codec_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/codec/codec_test], [0], [expout], [ignore]) +AT_CLEANUP + AT_SETUP([fr]) AT_KEYWORDS([fr]) cat $abs_srcdir/fr/fr_test.ok > expout cat $abs_srcdir/fr/fr_test.err > experr AT_CHECK([$abs_top_builddir/tests/fr/fr_test], [0], [expout], [experr]) - AT_CLEANUP AT_SETUP([loggingrb]) -- To view, visit https://gerrit.osmocom.org/118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia217679a07d3fbc970f435e20f6eac33d34bd597 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed May 25 17:02:07 2016 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Wed, 25 May 2016 17:02:07 +0000 Subject: libosmo-netif[master]: osmux: Pass circuit to _batch_del_circuit() and use it from ... In-Reply-To: References: Message-ID: Patch Set 1: The Jenkins Builder error seems bogus: http://jenkins.osmocom.org/jenkins/job/libosmo-netif-gerrit/8/label=linux_amd64_ubuntu_1504/console Not sure what that issue is -- To view, visit https://gerrit.osmocom.org/119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If224980123d4a369133499ab7b577d02511f4055 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: daniel Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-HasComments: No From jonathan.brielmaier at web.de Wed May 25 18:11:37 2016 From: jonathan.brielmaier at web.de (Jonathan Brielmaier) Date: Wed, 25 May 2016 20:11:37 +0200 Subject: [PATCH 1/1] fix typos in all manuals In-Reply-To: <20160525131609.GA7245@dub6> References: <1464042480-16934-1-git-send-email-jonathan.brielmaier@web.de> <20160525131609.GA7245@dub6> Message-ID: <5745EAD9.1070606@web.de> Hello, I did it via `git send-email` but it seems that I have not the right parameters. I'll get that and next time it should work correct :) Jonathan Am 25.05.2016 um 15:16 schrieb Neels Hofmeyr: > Hi Jonathan, > > many thanks! Welcome as an Osmocom contributor! :) > > We normally accept patch submissions via `git send-email', such that your > author information and commit log message are available. Please try that next > time. > > For now, I've applied all of your changes with name and mail address taken from > your email, and a brief commit log message. > > (note, while patches for the manuals are still received via git send-email, > we've recently switched to gerrit for the osmocom code repositories; see > http://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit ) > > ~Neels > > From gerrit-no-reply at lists.osmocom.org Wed May 25 19:28:44 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 19:28:44 +0000 Subject: libosmo-netif[master]: osmux: Add function to delete all msgs pending for a circuit In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/120/1/src/osmux.c File src/osmux.c: Line 236: } good. but indention is wrong. :) -- To view, visit https://gerrit.osmocom.org/120 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib0311652183332d0475bf7347023d518d38487ef Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: daniel Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed May 25 19:34:57 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 19:34:57 +0000 Subject: libosmocore[master]: Add helper functions for AMR codec In-Reply-To: References: Message-ID: Patch Set 3: diff --git a/src/codec/Makefile.am b/src/codec/Makefile.am index b4834e5..619897f 100644 --- a/src/codec/Makefile.am +++ b/src/codec/Makefile.am @@ -2,7 +2,7 @@ # Please read Chapter 6 "Library interface versions" of the libtool documentation before making any modification LIBVERSION=0:0:0 -AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include $(TALLOC_CFLAGS) AM_CFLAGS = -Wall lib_LTLIBRARIES = libosmocodec.la and your FreeBSD (or talloc not being in /usr/include) build will work.. -- To view, visit https://gerrit.osmocom.org/118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia217679a07d3fbc970f435e20f6eac33d34bd597 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 25 19:40:32 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 19:40:32 +0000 Subject: libosmo-sccp[master]: debian: Make upgrading from debian SID easier In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/109 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I87534954c1f4b499e27452382df412454ea16b64 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 25 19:40:35 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 19:40:35 +0000 Subject: [MERGED] libosmo-sccp[master]: debian: Make upgrading from debian SID easier In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: debian: Make upgrading from debian SID easier ...................................................................... debian: Make upgrading from debian SID easier Make sure the version number of this sourcepackage is higher than the one found in Debian SID. Change-Id: I87534954c1f4b499e27452382df412454ea16b64 Reviewed-on: https://gerrit.osmocom.org/109 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M debian/changelog 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/debian/changelog b/debian/changelog index 9e5884e..b7a0c97 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libosmo-sccp (0.7.1) UNRELEASED; urgency=medium + + * Move forward towards a new release. + + -- Holger Hans Peter Freyther Tue, 24 May 2016 22:57:59 +0200 + libosmo-sccp (0.7.0) unstable; urgency=medium * New release. -- To view, visit https://gerrit.osmocom.org/109 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I87534954c1f4b499e27452382df412454ea16b64 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed May 25 19:40:37 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 19:40:37 +0000 Subject: libosmo-abis[master]: debian: Make upgrading from debian SID easier In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/110 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I393ef6624f112794e15b81a0cc9dbd8b0a871b07 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 25 19:40:39 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 19:40:39 +0000 Subject: [MERGED] libosmo-abis[master]: debian: Make upgrading from debian SID easier In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: debian: Make upgrading from debian SID easier ...................................................................... debian: Make upgrading from debian SID easier Make sure the version number of this sourcepackage is higher than the one found in Debian SID. Change-Id: I393ef6624f112794e15b81a0cc9dbd8b0a871b07 Reviewed-on: https://gerrit.osmocom.org/110 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M debian/changelog 1 file changed, 7 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/debian/changelog b/debian/changelog index f1842fa..b2cf0e9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,10 @@ -libosmo-abis (0.3.2) UNRELEASED; urgency=medium +libosmo-abis (0.3.3) UNRELEASED; urgency=medium + + * Move forward towards a new release. + + -- Holger Hans Peter Freyther Tue, 24 May 2016 23:02:47 +0200 + +libosmo-abis (0.3.2) unstable; urgency=medium * Bump so version to re-link libosmovty -- To view, visit https://gerrit.osmocom.org/110 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I393ef6624f112794e15b81a0cc9dbd8b0a871b07 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed May 25 19:41:16 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 19:41:16 +0000 Subject: openbsc[master]: debian: Make upgrading from debian SID easier In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/113 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I838632e9e90378a03235c2aebd5bc9ed06627ec8 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 25 19:41:20 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 19:41:20 +0000 Subject: [MERGED] openbsc[master]: debian: Make upgrading from debian SID easier In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: debian: Make upgrading from debian SID easier ...................................................................... debian: Make upgrading from debian SID easier Make sure the version number of this sourcepackage is higher than the one found in Debian SID. Change-Id: I838632e9e90378a03235c2aebd5bc9ed06627ec8 Reviewed-on: https://gerrit.osmocom.org/113 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M debian/changelog 1 file changed, 7 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/debian/changelog b/debian/changelog index 5f00a30..6a0362a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,10 @@ -openbsc (0.14.0) UNRELEASED; urgency=low +openbsc (0.15.1) UNRELEASED; urgency=medium + + * Move forward toward a new release. + + -- Holger Hans Peter Freyther Tue, 24 May 2016 23:14:31 +0200 + +openbsc (0.14.0) unstable; urgency=low * New upstream tag and additional patches. -- To view, visit https://gerrit.osmocom.org/113 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I838632e9e90378a03235c2aebd5bc9ed06627ec8 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed May 25 19:42:15 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 19:42:15 +0000 Subject: libosmo-netif[master]: osmux: Pass circuit to _batch_del_circuit() and use it from ... In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/119/1/src/osmux.c File src/osmux.c: Line 724: llist_for_each_entry_safe(circuit, next, &batch->circuit_list, head) { coding style, remove the curly braces please. -- To view, visit https://gerrit.osmocom.org/119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If224980123d4a369133499ab7b577d02511f4055 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: daniel Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed May 25 19:43:18 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 19:43:18 +0000 Subject: libosmocore[master]: Add strings with PH primitive names In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/117/1/src/gsm/lapdm.c File src/gsm/lapdm.c: Line 122: { PRIM_TCH_RTS, "TCH-RTS" }, Please add the NULL termination here. -- To view, visit https://gerrit.osmocom.org/117 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id7a6d478fd725c51f54ad746bdf9b9095579ff77 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed May 25 19:43:36 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 19:43:36 +0000 Subject: openbsc[master]: filter/nat: Fix the context for the imsi assignment In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/102 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I53789aad2809e19338ad3b2deb72c4757e7bd524 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 25 19:43:38 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 19:43:38 +0000 Subject: [MERGED] openbsc[master]: filter/nat: Fix the context for the imsi assignment In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: filter/nat: Fix the context for the imsi assignment ...................................................................... filter/nat: Fix the context for the imsi assignment In c09f8a3b7fb94ccef41e33c32bfe2bff1ffe0e44 as part of a cleanup I accidently changed the talloc context from "con" to "bsc". The issue occurred at an earlier commit when assigning req.ctx to the "wrong" context. The allocation needs to be scoped by the struct nat_sccp_connection and not the connection from BSC to NAT. Before we have a nat_sccp_connection we scope the copied imsi to the bsc_connection and then steal it, but for the identity resp we will always have a nat_sccp_connection and can already use the right context. Change-Id: I53789aad2809e19338ad3b2deb72c4757e7bd524 Related: OS#1733 Reviewed-on: https://gerrit.osmocom.org/102 Tested-by: Jenkins Builder Reviewed-by: Harald Welte Reviewed-by: daniel Reviewed-by: Holger Freyther --- M openbsc/src/osmo-bsc_nat/bsc_nat_filter.c M openbsc/tests/bsc-nat/bsc_nat_test.c 2 files changed, 4 insertions(+), 1 deletion(-) Approvals: daniel: Looks good to me, but someone else must approve Harald Welte: Looks good to me, but someone else must approve Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_filter.c b/openbsc/src/osmo-bsc_nat/bsc_nat_filter.c index 393aea3..e735290 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_filter.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_filter.c @@ -109,7 +109,7 @@ if (!hdr48) return -1; - req.ctx = bsc; + req.ctx = con; req.black_list = &bsc->nat->imsi_black_list; req.access_lists = &bsc->nat->access_lists; req.local_lst_name = bsc->cfg->acc_lst_name; diff --git a/openbsc/tests/bsc-nat/bsc_nat_test.c b/openbsc/tests/bsc-nat/bsc_nat_test.c index a405763..b531c6b 100644 --- a/openbsc/tests/bsc-nat/bsc_nat_test.c +++ b/openbsc/tests/bsc-nat/bsc_nat_test.c @@ -978,10 +978,13 @@ } memset(&cause, 0, sizeof(cause)); + OSMO_ASSERT(!con->filter_state.imsi); if (bsc_nat_filter_dt(bsc, msg, con, parsed, &cause) != 1) { printf("FAIL: Should have passed..\n"); abort(); } + OSMO_ASSERT(con->filter_state.imsi); + OSMO_ASSERT(talloc_parent(con->filter_state.imsi) == con); /* just some basic length checking... */ for (i = ARRAY_SIZE(id_resp); i >= 0; --i) { -- To view, visit https://gerrit.osmocom.org/102 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I53789aad2809e19338ad3b2deb72c4757e7bd524 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Wed May 25 19:43:56 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 19:43:56 +0000 Subject: [MERGED] libosmocore[master]: misc: Some spelling errors corrected In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: misc: Some spelling errors corrected ...................................................................... misc: Some spelling errors corrected Change-Id: Ibfc239b84879556624ca6020ae6a63d102640c94 Reviewed-on: https://gerrit.osmocom.org/114 Tested-by: Jenkins Builder Reviewed-by: Neels Hofmeyr --- M src/logging.c M src/sim/card_fs_tetra.c 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/logging.c b/src/logging.c index b2f8d43..8a10133 100644 --- a/src/logging.c +++ b/src/logging.c @@ -130,7 +130,7 @@ "Don't use. It doesn't log anything", "Log debug messages and higher levels", "Log informational messages and higher levels", - "Log noticable messages and higher levels", + "Log noticeable messages and higher levels", "Log error messages and higher levels", "Log only fatal messages", NULL, diff --git a/src/sim/card_fs_tetra.c b/src/sim/card_fs_tetra.c index 625adbd..657e55f 100644 --- a/src/sim/card_fs_tetra.c +++ b/src/sim/card_fs_tetra.c @@ -204,7 +204,7 @@ EF_LIN_FIX_N(0x6F2B, SFI_NONE, "EF.MSGEXT", F_OPTIONAL, 16, 16, "Message Extension"), EF_LIN_FIX_N(0x6F2C, SFI_NONE, "EF.EADDR", 0, 17, 17, - "Emergency adresses"), + "Emergency addresses"), EF_TRANSP_N(0x6F2D, SFI_NONE, "EF.EINFO", 0, 2, 2, "Emergency call information"), EF_LIN_FIX_N(0x6F2E, SFI_NONE, "EF.DMOCh", F_OPTIONAL, 4, 4, -- To view, visit https://gerrit.osmocom.org/114 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibfc239b84879556624ca6020ae6a63d102640c94 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed May 25 19:44:25 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 19:44:25 +0000 Subject: osmo-pcu[master]: rlc.h: remove duplicated define RLC_EGPRS_SNS In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/107 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibb718ba9be21831c56c5949e730fab5acd691d7c Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 25 19:44:29 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 19:44:29 +0000 Subject: [MERGED] osmo-pcu[master]: rlc.h: remove duplicated define RLC_EGPRS_SNS In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: rlc.h: remove duplicated define RLC_EGPRS_SNS ...................................................................... rlc.h: remove duplicated define RLC_EGPRS_SNS The second #define RLC_EGPRS_SNS is 3 lines below of the first one. Change-Id: Ibb718ba9be21831c56c5949e730fab5acd691d7c Reviewed-on: https://gerrit.osmocom.org/107 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M src/rlc.h 1 file changed, 0 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/rlc.h b/src/rlc.h index 8f75588..03659da 100644 --- a/src/rlc.h +++ b/src/rlc.h @@ -27,7 +27,6 @@ #define RLC_GPRS_SNS 128 /* GPRS, must be power of 2 */ #define RLC_GPRS_WS 64 /* max window size */ -#define RLC_EGPRS_SNS 2048 /* EGPRS, must be power of 2 */ #define RLC_EGPRS_MIN_WS 64 /* min window size */ #define RLC_EGPRS_MAX_WS 1024 /* min window size */ #define RLC_EGPRS_SNS 2048 /* EGPRS, must be power of 2 */ -- To view, visit https://gerrit.osmocom.org/107 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibb718ba9be21831c56c5949e730fab5acd691d7c Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Wed May 25 19:45:50 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 19:45:50 +0000 Subject: [MERGED] osmo-pcu[master]: tbf_ul: use correct size for chunk_size In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: tbf_ul: use correct size for chunk_size ...................................................................... tbf_ul: use correct size for chunk_size The size of the hole array in bytes was used instead of the size of elements. Change-Id: If6bf3e5f1ad773ddaa9fb2ce7c069e6b26659cbf Reviewed-on: https://gerrit.osmocom.org/105 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M src/tbf_ul.cpp 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 9e763f4..1316204 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -60,7 +60,7 @@ LOGP(DRLCMACUL, LOGL_DEBUG, "- Assembling frames: (len=%d)\n", len); num_frames = Decoding::rlc_data_from_ul_data( - rdbi, cs, data, &(frames[0]), sizeof(frames), + rdbi, cs, data, &(frames[0]), ARRAY_SIZE(frames), &dummy_tlli); /* create LLC frames */ -- To view, visit https://gerrit.osmocom.org/105 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If6bf3e5f1ad773ddaa9fb2ce7c069e6b26659cbf Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus From gerrit-no-reply at lists.osmocom.org Wed May 25 19:46:00 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 19:46:00 +0000 Subject: libosmocore[master]: add vty call show asciidoc: generate a documentation for cou... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/70 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia8af883167e5ee631059299b107ea83c8bbffdfb Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: lynxis lazus Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 25 19:46:28 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 19:46:28 +0000 Subject: libosmo-netif[master]: osmux: Pass circuit to _batch_del_circuit() and use it from ... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 -- To view, visit https://gerrit.osmocom.org/119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If224980123d4a369133499ab7b577d02511f4055 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: daniel Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 25 19:52:21 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 19:52:21 +0000 Subject: openbsc[master]: Add regexp authorization policy for IMSI In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (4 comments) https://gerrit.osmocom.org/#/c/104/1/openbsc/src/libbsc/bsc_vty.c File openbsc/src/libbsc/bsc_vty.c: Line 1411: "Use regular expression for IMSI authorization decision\n" tabs vs. spaces. Yes the rest is inconsistent but please use tabs here. https://gerrit.osmocom.org/#/c/104/1/openbsc/src/libbsc/net_init.c File openbsc/src/libbsc/net_init.c: Line 52: net->authorized_reg_str = NULL; you can omit it. We rely on talloc_zero for many of these things. You don't need to omit it though. https://gerrit.osmocom.org/#/c/104/1/openbsc/src/libmsc/gsm_04_08.c File openbsc/src/libmsc/gsm_04_08.c: Line 255: if (regexec(&net->authorized_regexp, imsi, 0, NULL, 0) != REG_NOMATCH) just return it? Line 538: return subscr_create_subscriber(net->subscr_group, imsi); Do you want to have authorized = 1; here as well or rely on the regexp being called every time? -- To view, visit https://gerrit.osmocom.org/104 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I525f4b80676de47d1d422686da2ca012301b0129 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Wed May 25 20:07:03 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 20:07:03 +0000 Subject: [MERGED] osmo-pcu[master]: add comments to describe functions In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: add comments to describe functions ...................................................................... add comments to describe functions Change-Id: Ie351632001abbeb82008a5eecae0d0323a8ef7d7 Reviewed-on: https://gerrit.osmocom.org/106 Reviewed-by: Harald Welte Tested-by: Jenkins Builder --- M src/bts.cpp M src/tbf_ul.cpp 2 files changed, 2 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/bts.cpp b/src/bts.cpp index 03b0401..953ac4d 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1317,6 +1317,7 @@ return -EINVAL; } +/*! \brief process egprs and gprs data blocks */ int gprs_rlcmac_pdch::rcv_data_block(uint8_t *data, uint32_t fn, struct pcu_l1_meas *meas, GprsCodingScheme cs) { diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 1316204..e7c64ad 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -138,6 +138,7 @@ return msg; } +/*! \brief receive data from PDCH/L1 */ int gprs_rlcmac_ul_tbf::rcv_data_block_acknowledged( const struct gprs_rlc_data_info *rlc, uint8_t *data, struct pcu_l1_meas *meas) -- To view, visit https://gerrit.osmocom.org/106 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie351632001abbeb82008a5eecae0d0323a8ef7d7 Gerrit-PatchSet: 3 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed May 25 20:07:42 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 20:07:42 +0000 Subject: libsmpp34[master]: debian: Make upgrading from debian SID easier In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/112 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I77126b0b9a8dbc4dcdc02a5a3b4718129b308930 Gerrit-PatchSet: 1 Gerrit-Project: libsmpp34 Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 25 20:07:45 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 20:07:45 +0000 Subject: [MERGED] libsmpp34[master]: debian: Make upgrading from debian SID easier In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: debian: Make upgrading from debian SID easier ...................................................................... debian: Make upgrading from debian SID easier Make sure the version number of this sourcepackage is higher than the one found in Debian SID. Change-Id: I77126b0b9a8dbc4dcdc02a5a3b4718129b308930 Reviewed-on: https://gerrit.osmocom.org/112 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M debian/changelog 1 file changed, 7 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/debian/changelog b/debian/changelog index 20ae3d3..aae6e0d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,10 @@ -libsmpp34 (1.10z1) UNRELEASED; urgency=low +libsmpp34 (1.11) UNRELEASED; urgency=medium + + * Move forward towards a new release. + + -- Holger Hans Peter Freyther Tue, 24 May 2016 23:07:49 +0200 + +libsmpp34 (1.10z1) stable; urgency=low * Add depedency from libsmpp34-dev to the main library -- To view, visit https://gerrit.osmocom.org/112 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I77126b0b9a8dbc4dcdc02a5a3b4718129b308930 Gerrit-PatchSet: 2 Gerrit-Project: libsmpp34 Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed May 25 20:07:55 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 20:07:55 +0000 Subject: [MERGED] libsmpp34[master]: Fix various typos in log messages In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: Fix various typos in log messages ...................................................................... Fix various typos in log messages Change-Id: If52a8546b09ac14c00e6323984eda6d88a558830 Reviewed-on: https://gerrit.osmocom.org/115 Reviewed-by: Neels Hofmeyr Tested-by: Jenkins Builder --- M src/smpp34_dumpPdu.c M src/smpp34_pack.c M src/smpp34_unpack.c M test_apps/recv_and_unpack.inc 4 files changed, 19 insertions(+), 19 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/smpp34_dumpPdu.c b/src/smpp34_dumpPdu.c index 76cd70b..89d6e53 100644 --- a/src/smpp34_dumpPdu.c +++ b/src/smpp34_dumpPdu.c @@ -68,7 +68,7 @@ #par,inst par,dummy_b);\ if( lenval >= left ){\ PUTLOG("[%s:%08X(%s)]", par, inst par,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ snprintf((char*)dest, left, "%s", l_dest);\ @@ -86,7 +86,7 @@ "%-30s[%04X] [%s]\n",#par,inst par,dummy_b);\ if( lenval >= left ){\ PUTLOG("[%s:%04X(%s)]", par, inst par,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ snprintf((char*)dest, left, "%s", l_dest);\ @@ -104,7 +104,7 @@ #par,inst par, dummy_b);\ if( lenval >= left ){\ PUTLOG("[%s:%02X(%s)]", par, inst par,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ snprintf((char*)dest, left, "%s", l_dest);\ @@ -116,7 +116,7 @@ #par, inst par);\ if( lenval >= left ){\ PUTLOG("[%s:%s(%s)]", par, inst par, \ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ PUTLOG("[%s:%s(%s)]", par, inst par, "OK");\ @@ -143,7 +143,7 @@ lenval = *((inst par) - 1);\ if( (lenval + 33) >= left ){\ PUTLOG("[%s:%s(%s)]", par, inst par, \ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ PUTLOG("[%s:%s(%s)]", par, "", "OK");\ @@ -170,7 +170,7 @@ memcpy(&l_lenval, ((inst par) - sizeof(uint16_t)), sizeof(uint16_t));\ if( (l_lenval + 33) >= left ){\ PUTLOG("[%s:%s(%s)]", par, inst par, \ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ PUTLOG("[%s:%s(%s)]", par, "", "OK");\ diff --git a/src/smpp34_pack.c b/src/smpp34_pack.c index 1916172..b36e7a4 100644 --- a/src/smpp34_pack.c +++ b/src/smpp34_pack.c @@ -63,7 +63,7 @@ lenval = sizeof(uint32_t);\ if( lenval >= left ){\ PUTLOG("[%s:%08X(%s)]", par, inst par,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ _str(inst par,dummy_b);\ @@ -81,7 +81,7 @@ lenval = sizeof(uint16_t);\ if( lenval >= left ){\ PUTLOG("[%s:%04X(%s)]", par, inst par,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ _str(inst par,dummy_b);\ @@ -98,7 +98,7 @@ lenval = sizeof(uint8_t);\ if( lenval >= left ){\ PUTLOG("[%s:%02X(%s)]", par, inst par,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ _str(inst par,dummy_b);\ @@ -123,7 +123,7 @@ lenval = strlen((char*)inst par) + 1;\ if( lenval > left ){\ PUTLOG("[len(%s):%d(%s)]", par, lenval, \ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ if( lenval > sizeval ){\ @@ -143,7 +143,7 @@ lenval = *((inst par) - 1);\ if( lenval >= left ){\ PUTLOG("[leng %s:%d(%s)]", par, lenval,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ if( lenval >= sizeval ){\ @@ -162,7 +162,7 @@ memcpy(&l_lenval, ((inst par) - sizeof(uint16_t)), sizeof(uint16_t));\ if( l_lenval >= left ){\ PUTLOG("[leng %s:%d(%s)]", par, l_lenval,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ if( l_lenval > sizeval ){\ diff --git a/src/smpp34_unpack.c b/src/smpp34_unpack.c index e378b0b..f498d01 100644 --- a/src/smpp34_unpack.c +++ b/src/smpp34_unpack.c @@ -60,7 +60,7 @@ lenval = sizeof( uint32_t );\ if( lenval > left ){\ PUTLOG("[%s:%08X(%s)]", par, inst par,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ memcpy(&inst par, aux, lenval);\ @@ -78,7 +78,7 @@ lenval = sizeof( uint16_t );\ if( lenval > left ){\ PUTLOG("[%s:%04X(%s)]", par, inst par,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ }\ memcpy(&inst par, aux, lenval);\ @@ -96,7 +96,7 @@ lenval = sizeof( uint8_t );\ if( lenval > left ){\ PUTLOG("[%s:%02X(%s)]", par, inst par,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ memcpy(&inst par, aux, lenval);\ @@ -129,7 +129,7 @@ lenval = strlen( (char*) aux ) + 1;\ if( lenval > left ){\ PUTLOG("[len(%s):%d(%s)]", par, lenval, \ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ if( lenval > size ){\ @@ -147,7 +147,7 @@ lenval = *((inst par) - 1);\ if( lenval > left ){\ PUTLOG("[leng %s:%d(%s)]", par, lenval,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ if( lenval > size ){\ @@ -165,7 +165,7 @@ memcpy(&l_lenval, (inst par - sizeof(uint16_t)), sizeof(uint16_t));\ if( l_lenval > left ){\ PUTLOG("[leng %s:%d(%s)]", par, l_lenval,\ - "Value lenght exceed buffer lenght");\ + "Value length exceed buffer length");\ return( -1 );\ };\ if( l_lenval > size ){\ diff --git a/test_apps/recv_and_unpack.inc b/test_apps/recv_and_unpack.inc index 090ea11..1b85a19 100644 --- a/test_apps/recv_and_unpack.inc +++ b/test_apps/recv_and_unpack.inc @@ -3,7 +3,7 @@ /* Read from socket (This is a sample, must be more complex) **********/ ret = recv(sock_tcp, local_buffer, 4, MSG_PEEK); if( ret != 4 ){ printf("Error in recv(PEEK)\n");return( -1 );}; - memcpy(&tempo, local_buffer, sizeof(uint32_t)); /* get lenght PDU */ + memcpy(&tempo, local_buffer, sizeof(uint32_t)); /* get length PDU */ local_buffer_len = ntohl( tempo ); ret = recv(sock_tcp, local_buffer, local_buffer_len, 0); if( ret != local_buffer_len ){ -- To view, visit https://gerrit.osmocom.org/115 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If52a8546b09ac14c00e6323984eda6d88a558830 Gerrit-PatchSet: 2 Gerrit-Project: libsmpp34 Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Wed May 25 20:09:17 2016 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Wed, 25 May 2016 20:09:17 +0000 Subject: [PATCH] libosmo-netif[master]: osmux: Pass circuit to _batch_del_circuit() and use it from ... In-Reply-To: References: Message-ID: Hello Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/119 to look at the new patch set (#2). osmux: Pass circuit to _batch_del_circuit() and use it from _xfrm_input_fini() Change-Id: If224980123d4a369133499ab7b577d02511f4055 Ticket: OS#1733 --- M src/osmux.c 1 file changed, 10 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/19/119/2 diff --git a/src/osmux.c b/src/osmux.c index 8025d5d..1f5bbe2 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -533,14 +533,8 @@ return circuit; } -static void osmux_batch_del_circuit(struct osmux_batch *batch, int ccid) +static void osmux_batch_del_circuit(struct osmux_batch *batch, struct osmux_circuit *circuit) { - struct osmux_circuit *circuit; - - circuit = osmux_batch_find_circuit(batch, ccid); - if (circuit == NULL) - return; - if (circuit->dummy) batch->ndummy--; llist_del(&circuit->head); @@ -713,8 +707,13 @@ void osmux_xfrm_input_close_circuit(struct osmux_in_handle *h, int ccid) { struct osmux_batch *batch = (struct osmux_batch *)h->internal_data; + struct osmux_circuit *circuit; - osmux_batch_del_circuit(batch, ccid); + circuit = osmux_batch_find_circuit(batch, ccid); + if (circuit == NULL) + return; + + osmux_batch_del_circuit(batch, circuit); } void osmux_xfrm_input_fini(struct osmux_in_handle *h) @@ -722,10 +721,9 @@ struct osmux_batch *batch = (struct osmux_batch *)h->internal_data; struct osmux_circuit *circuit, *next; - llist_for_each_entry_safe(circuit, next, &batch->circuit_list, head) { - llist_del(&circuit->head); - talloc_free(circuit); - } + llist_for_each_entry_safe(circuit, next, &batch->circuit_list, head) + osmux_batch_del_circuit(batch, circuit); + osmo_timer_del(&batch->timer); talloc_free(batch); } -- To view, visit https://gerrit.osmocom.org/119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: If224980123d4a369133499ab7b577d02511f4055 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: daniel Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Wed May 25 20:09:17 2016 From: gerrit-no-reply at lists.osmocom.org (daniel) Date: Wed, 25 May 2016 20:09:17 +0000 Subject: [PATCH] libosmo-netif[master]: osmux: Add function to delete all msgs pending for a circuit In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/120 to look at the new patch set (#2). osmux: Add function to delete all msgs pending for a circuit Use this function in osmux_batch_del_circuit() since msgs are stored in a list per circuit. After the circuit is free()d the msgs are lost. Before this patch any messages enqueued inside a batch when the circiut is deleted were leaking. Change-Id: Ib0311652183332d0475bf7347023d518d38487ef Ticket: OS#1733 --- M src/osmux.c 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/20/120/2 diff --git a/src/osmux.c b/src/osmux.c index 1f5bbe2..0bee9cc 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -225,6 +225,16 @@ circuit->nmsgs--; } +static void osmux_circuit_del_msgs(struct osmux_batch *batch, struct osmux_circuit *circuit) +{ + struct msgb *cur, *tmp; + llist_for_each_entry_safe(cur, tmp, &circuit->msg_list, list) { + osmux_batch_dequeue(cur, circuit); + msgb_free(cur); + batch->nmsgs--; + } +} + struct osmux_input_state { struct msgb *out_msg; struct msgb *msg; @@ -538,6 +548,7 @@ if (circuit->dummy) batch->ndummy--; llist_del(&circuit->head); + osmux_circuit_del_msgs(batch, circuit); talloc_free(circuit); } -- To view, visit https://gerrit.osmocom.org/120 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ib0311652183332d0475bf7347023d518d38487ef Gerrit-PatchSet: 2 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: daniel Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Wed May 25 20:42:39 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 20:42:39 +0000 Subject: libosmo-netif[master]: osmux: Pass circuit to _batch_del_circuit() and use it from ... In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If224980123d4a369133499ab7b577d02511f4055 Gerrit-PatchSet: 2 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: daniel Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Wed May 25 20:42:41 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 20:42:41 +0000 Subject: [MERGED] libosmo-netif[master]: osmux: Pass circuit to _batch_del_circuit() and use it from ... In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: osmux: Pass circuit to _batch_del_circuit() and use it from _xfrm_input_fini() ...................................................................... osmux: Pass circuit to _batch_del_circuit() and use it from _xfrm_input_fini() Change-Id: If224980123d4a369133499ab7b577d02511f4055 Ticket: OS#1733 Reviewed-on: https://gerrit.osmocom.org/119 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M src/osmux.c 1 file changed, 10 insertions(+), 12 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/osmux.c b/src/osmux.c index 8025d5d..1f5bbe2 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -533,14 +533,8 @@ return circuit; } -static void osmux_batch_del_circuit(struct osmux_batch *batch, int ccid) +static void osmux_batch_del_circuit(struct osmux_batch *batch, struct osmux_circuit *circuit) { - struct osmux_circuit *circuit; - - circuit = osmux_batch_find_circuit(batch, ccid); - if (circuit == NULL) - return; - if (circuit->dummy) batch->ndummy--; llist_del(&circuit->head); @@ -713,8 +707,13 @@ void osmux_xfrm_input_close_circuit(struct osmux_in_handle *h, int ccid) { struct osmux_batch *batch = (struct osmux_batch *)h->internal_data; + struct osmux_circuit *circuit; - osmux_batch_del_circuit(batch, ccid); + circuit = osmux_batch_find_circuit(batch, ccid); + if (circuit == NULL) + return; + + osmux_batch_del_circuit(batch, circuit); } void osmux_xfrm_input_fini(struct osmux_in_handle *h) @@ -722,10 +721,9 @@ struct osmux_batch *batch = (struct osmux_batch *)h->internal_data; struct osmux_circuit *circuit, *next; - llist_for_each_entry_safe(circuit, next, &batch->circuit_list, head) { - llist_del(&circuit->head); - talloc_free(circuit); - } + llist_for_each_entry_safe(circuit, next, &batch->circuit_list, head) + osmux_batch_del_circuit(batch, circuit); + osmo_timer_del(&batch->timer); talloc_free(batch); } -- To view, visit https://gerrit.osmocom.org/119 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If224980123d4a369133499ab7b577d02511f4055 Gerrit-PatchSet: 3 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: daniel Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Wed May 25 20:57:09 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Wed, 25 May 2016 20:57:09 +0000 Subject: libosmo-netif[master]: osmux: Add function to delete all msgs pending for a circuit In-Reply-To: References: Message-ID: Patch Set 2: (5 comments) Okay, we can go through that code in terms of reliability. But you seem to fix it. The timer question is not that important. https://gerrit.osmocom.org/#/c/120/2/src/osmux.c File src/osmux.c: PS2, Line 234: batch so what if nmsgs == 0? Will we need to stop the batch timer? What if the batch timer fires and there is no single msgb? Did you review the code in that regard? Line 325: uint32_t batch_size, uint32_t batch_factor) How does it use the batch_factor? We seem to consume everything? Besides for the dummy handling? Does it mean we put dummy + data into the same message? Line 337: return NULL; the caller will crash if that happens PS2, Line 369: Leaks the batch_msg. And discards other frames.. already formatted into the patch.. The caller will crash. Line 399: h->stats.output_osmux_bytes += batch_msg->len; Unconditional access of batch_msg that might be NULL -- To view, visit https://gerrit.osmocom.org/120 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib0311652183332d0475bf7347023d518d38487ef Gerrit-PatchSet: 2 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: daniel Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From ruben.undheim at gmail.com Thu May 26 05:30:15 2016 From: ruben.undheim at gmail.com (Ruben Undheim) Date: Thu, 26 May 2016 07:30:15 +0200 Subject: Closing the gap between official debian and our nightly builds In-Reply-To: References: Message-ID: <20160526053015.GA20541@macbookair> Hi Holger! Just a short answer from me this morning. > I wonder if you could give us/me a hand in closing the gap between the official packages. Good idea! > In general we are willing to drop backwards compatibility with our install base to reach Debian standards. I don't have a total overview of the backwards incompatible discrepancies. I probably should have, but hopefully there aren't too many. > Ideally a user can easily upgrade from a Debian version to our nightly builds and you and other debian developers can hopefully easily take our source packages and move them forward as well. Sounds convenient for the users. > Do you have experience with upstream making their own debian packages and a proper package being included in debian as well? No, I don't have any experience. But technically, it shouldn't be too hard. The debian dir in the upstream tarball will always be overwritten when building the package, so whatever you do there, will be invisible in the official package unless we manually merge it in. > Shall I create tickets in our osmocom.org redmine to coordinate synchronization? Are you aware of different sysv init script names, paths for config/hlr files, package names? Sounds like a plan! > From a very brief look: > > + We never handled the .copyright files correctly you do > + debian/control you have nice short and long terms descriptions we should have > + You have patches for typos and other parts (i have pushed the ggsn one and will go through the patches later) > + Your have manpages and we never bothered with it. I think it is a really good debian rule (and good Unix legacy to force a manpage for binaries in /usr!) All the packaging is done with the same license as the upstream software, so you're free (and encouraged!) to pull in all the things you find useful into your source tree or debian dir. > - At least for OpenBSC you do not seem to package the -dbg symbols. As a developer I am always annoyed (e.g. with sofia sip) when I can't install the debug symbols. -dbg packages are now handled automatically by Debian. Any package with binaries, will automatically get "-dbgsym" packages. Just google it. This is also the case for Ubuntu AFAIK. This will however not be of any help for older Ubuntu and Debian releases (if you desire to support them also with -dbg symbols) > - You seem to not include sysvinit (and systemd) service files? I'm willing to add this when we're absolutely 100% sure that the default is sane for every user. It was simply excluded from the first versions of the official packages because I'm not familiar enough with the configuration. > Do you have a proposal on how we could move forward? How do you manage/maintain the extra debian/ directory? The extra debian dir is no problem. As said above, it will be overwritten automatically by the build tools when building the package. To move forward: we just pull interesting stuff from each other's debian dir. However, it may make sense to pull some things out of the debian dir and into the main source tree - for instance the man pages. Best regards Ruben From gerrit-no-reply at lists.osmocom.org Thu May 26 08:28:25 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 26 May 2016 08:28:25 +0000 Subject: [PATCH] libosmocore[master]: Add strings with PH primitive names In-Reply-To: References: Message-ID: Hello Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/117 to look at the new patch set (#2). Add strings with PH primitive names It's useful debugging helper while troubleshooting L1-related issues. Change-Id: Id7a6d478fd725c51f54ad746bdf9b9095579ff77 --- M include/osmocom/gsm/l1sap.h M src/gsm/lapdm.c M src/gsm/libosmogsm.map 3 files changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/17/117/2 diff --git a/include/osmocom/gsm/l1sap.h b/include/osmocom/gsm/l1sap.h index 1af8ba8..ad942ea 100644 --- a/include/osmocom/gsm/l1sap.h +++ b/include/osmocom/gsm/l1sap.h @@ -14,6 +14,8 @@ PRIM_TCH_RTS, /*!< \brief TCH */ }; +extern const struct value_string osmo_ph_prim_names[]; + /*! \brief PH-SAP related primitives (L1<->L2 SAP) */ enum osmo_mph_info_type { PRIM_INFO_TIME, /*!< \brief Current GSM time */ diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c index d44335f..fa7769b 100644 --- a/src/gsm/lapdm.c +++ b/src/gsm/lapdm.c @@ -111,6 +111,18 @@ LAPDm_FMT_B4, }; +const struct value_string osmo_ph_prim_names[] = { + { PRIM_PH_DATA, "PH-DATA" }, + { PRIM_PH_RACH, "PH-RANDOM_ACCESS" }, + { PRIM_PH_CONN, "PH-CONNECT" }, + { PRIM_PH_EMPTY_FRAME, "PH-EMPTY_FRAME" }, + { PRIM_PH_RTS, "PH-RTS" }, + { PRIM_MPH_INFO, "MPH-INFO" }, + { PRIM_TCH, "TCH" }, + { PRIM_TCH_RTS, "TCH-RTS" }, + { 0, NULL } +}; + static int lapdm_send_ph_data_req(struct lapd_msg_ctx *lctx, struct msgb *msg); static int send_rslms_dlsap(struct osmo_dlsap_prim *dp, struct lapd_msg_ctx *lctx); diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 1e2d323..301f5aa 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -223,6 +223,8 @@ lapdm_phsap_up; lapdm_rslms_recvmsg; +osmo_ph_prim_names; + milenage_auts; milenage_check; milenage_f1; -- To view, visit https://gerrit.osmocom.org/117 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Id7a6d478fd725c51f54ad746bdf9b9095579ff77 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu May 26 08:38:52 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 26 May 2016 08:38:52 +0000 Subject: [PATCH] openbsc[master]: Add regexp authorization policy for IMSI In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/104 to look at the new patch set (#2). Add regexp authorization policy for IMSI * extend "auth policy" vty command with new option "regexp" * add vty command "authorized-regexp" for setting arbitrary POSIX regular expression * add basic vty test * add optional "regexp" argument to subscriber-create-on-demand vty command With those in place we can now set the regexp against which MS's IMSI will be matched. If IMSI match the regexp than MS is allowed to access the network. If subscriber is already marked as authorized in HLR than it'll be allowed regardless of IMSI matching. The same way we can decide whether to create subscribers on-demand basesd on IMSI regexp match. Similar to authorization this restriction can be overridden by manually creating subscriber via vty, ctrl interface or directly in HLR. Change-Id: I525f4b80676de47d1d422686da2ca012301b0129 Fixes: OS#1647 --- M openbsc/include/openbsc/gsm_data.h M openbsc/src/libbsc/bsc_vty.c M openbsc/src/libcommon/gsm_data.c M openbsc/src/libmsc/gsm_04_08.c M openbsc/src/libmsc/vty_interface_layer3.c M openbsc/tests/vty_test_runner.py 6 files changed, 88 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/04/104/2 diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index a08938c..31a4ed5 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -2,6 +2,8 @@ #define _GSM_DATA_H #include +#include +#include #include #include @@ -22,6 +24,7 @@ enum gsm_subscr_creation_mode { GSM_SUBSCR_DONT_CREATE = 0, GSM_SUBSCR_CREAT_W_RAND_EXT = 1, + GSM_SUBSCR_CREAT_W_REGEXP = 2, }; enum gsm_security_event { @@ -205,6 +208,7 @@ GSM_AUTH_POLICY_CLOSED, /* only subscribers authorized in DB */ GSM_AUTH_POLICY_ACCEPT_ALL, /* accept everyone, even if not authorized in DB */ GSM_AUTH_POLICY_TOKEN, /* accept first, send token per sms, then revoke authorization */ + GSM_AUTH_POLICY_REGEXP, /* accept IMSIs matching given regexp */ }; #define GSM_T3101_DEFAULT 10 @@ -219,6 +223,8 @@ char *name_long; char *name_short; enum gsm_auth_policy auth_policy; + regex_t authorized_regexp; + char *authorized_reg_str; enum gsm48_reject_value reject_cause; int a5_encryption; int neci; diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index 46ad457..f4d47b4 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -190,8 +190,11 @@ net->name_long, VTY_NEWLINE); vty_out(vty, " Short network name: '%s'%s", net->name_short, VTY_NEWLINE); - vty_out(vty, " Authentication policy: %s%s", - gsm_auth_policy_name(net->auth_policy), VTY_NEWLINE); + vty_out(vty, " Authentication policy: %s", + gsm_auth_policy_name(net->auth_policy)); + if (net->authorized_reg_str) + vty_out(vty, ", authorized regexp: %s", net->authorized_reg_str); + vty_out(vty, "%s", VTY_NEWLINE); vty_out(vty, " Location updating reject cause: %u%s", net->reject_cause, VTY_NEWLINE); vty_out(vty, " Encryption: A5/%u%s", net->a5_encryption, @@ -791,6 +794,8 @@ vty_out(vty, " short name %s%s", gsmnet->name_short, VTY_NEWLINE); vty_out(vty, " long name %s%s", gsmnet->name_long, VTY_NEWLINE); vty_out(vty, " auth policy %s%s", gsm_auth_policy_name(gsmnet->auth_policy), VTY_NEWLINE); + if (gsmnet->authorized_reg_str) + vty_out(vty, " authorized-regexp %s%s", gsmnet->authorized_reg_str, VTY_NEWLINE); vty_out(vty, " location updating reject cause %u%s", gsmnet->reject_cause, VTY_NEWLINE); vty_out(vty, " encryption a5 %u%s", gsmnet->a5_encryption, VTY_NEWLINE); @@ -1398,17 +1403,34 @@ DEFUN(cfg_net_auth_policy, cfg_net_auth_policy_cmd, - "auth policy (closed|accept-all|token)", + "auth policy (closed|accept-all|regexp|token)", "Authentication (not cryptographic)\n" "Set the GSM network authentication policy\n" "Require the MS to be activated in HLR\n" "Accept all MS, whether in HLR or not\n" + "Use regular expression for IMSI authorization decision\n" "Use SMS-token based authentication\n") { enum gsm_auth_policy policy = gsm_auth_policy_parse(argv[0]); struct gsm_network *gsmnet = gsmnet_from_vty(vty); gsmnet->auth_policy = policy; + + return CMD_SUCCESS; +} + +DEFUN(cfg_net_authorize_regexp, cfg_net_authorize_regexp_cmd, + "authorized-regexp REGEXP", + "Set regexp for IMSI which will be used for authorization decision\n" + "Regular expression, IMSIs matching it are allowed to use the network\n") +{ + struct gsm_network *gsmnet = gsmnet_from_vty(vty); + if (gsm_parse_reg(gsmnet, &gsmnet->authorized_regexp, + &gsmnet->authorized_reg_str, argc, argv) != 0) { + vty_out(vty, "%%Failed to parse the authorized-regexp: '%s'%s", + argv[0], VTY_NEWLINE); + return CMD_WARNING; + } return CMD_SUCCESS; } @@ -3973,6 +3995,7 @@ install_element(GSMNET_NODE, &cfg_net_name_short_cmd); install_element(GSMNET_NODE, &cfg_net_name_long_cmd); install_element(GSMNET_NODE, &cfg_net_auth_policy_cmd); + install_element(GSMNET_NODE, &cfg_net_authorize_regexp_cmd); install_element(GSMNET_NODE, &cfg_net_reject_cause_cmd); install_element(GSMNET_NODE, &cfg_net_encryption_cmd); install_element(GSMNET_NODE, &cfg_net_neci_cmd); diff --git a/openbsc/src/libcommon/gsm_data.c b/openbsc/src/libcommon/gsm_data.c index 4e235fd..9d794ee 100644 --- a/openbsc/src/libcommon/gsm_data.c +++ b/openbsc/src/libcommon/gsm_data.c @@ -162,6 +162,7 @@ { GSM_AUTH_POLICY_CLOSED, "closed" }, { GSM_AUTH_POLICY_ACCEPT_ALL, "accept-all" }, { GSM_AUTH_POLICY_TOKEN, "token" }, + { GSM_AUTH_POLICY_REGEXP, "regexp" }, { 0, NULL } }; diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 74da34b..92c4cfe 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -25,9 +25,12 @@ #include #include #include +#include #include #include #include +#include +#include #include "bscconfig.h" @@ -244,6 +247,17 @@ return -EINVAL; /* not reached */ } +static bool subscr_regexp_check(const struct gsm_network *net, const char *imsi) +{ + if (!net->authorized_reg_str) + return false; + + if (regexec(&net->authorized_regexp, imsi, 0, NULL, 0) != REG_NOMATCH) + return true; + + return false; +} + static int authorize_subscriber(struct gsm_loc_updating_operation *loc, struct gsm_subscriber *subscriber) { @@ -260,6 +274,13 @@ switch (subscriber->group->net->auth_policy) { case GSM_AUTH_POLICY_CLOSED: + return subscriber->authorized; + case GSM_AUTH_POLICY_REGEXP: + if (subscriber->authorized) + return 1; + if (subscr_regexp_check(subscriber->group->net, + subscriber->imsi)) + subscriber->authorized = 1; return subscriber->authorized; case GSM_AUTH_POLICY_TOKEN: if (subscriber->authorized) @@ -509,10 +530,14 @@ static struct gsm_subscriber *subscr_create(const struct gsm_network *net, const char *imsi) { - if (net->subscr_creation_mode != GSM_SUBSCR_DONT_CREATE) - return subscr_create_subscriber(net->subscr_group, imsi); + if (net->subscr_creation_mode == GSM_SUBSCR_DONT_CREATE) + return NULL; - return NULL; + if (net->subscr_creation_mode & GSM_SUBSCR_CREAT_W_REGEXP) + if (!subscr_regexp_check(net, imsi)) + return NULL; + + return subscr_create_subscriber(net->subscr_group, imsi); } /* Parse Chapter 9.2.11 Identity Response */ diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c index 5d74e04..3f67b9a 100644 --- a/openbsc/src/libmsc/vty_interface_layer3.c +++ b/openbsc/src/libmsc/vty_interface_layer3.c @@ -1032,11 +1032,15 @@ } DEFUN(cfg_nitb_subscr_create, cfg_nitb_subscr_create_cmd, - "subscriber-create-on-demand", - "Make a new record when a subscriber is first seen.\n") + "subscriber-create-on-demand [regexp]", + "Make a new record when a subscriber is first seen.\n" + "Create subscribers only if IMSI matches the regexp specified in " + "authorized-regexp command\n") { struct gsm_network *gsmnet = gsmnet_from_vty(vty); gsmnet->subscr_creation_mode = GSM_SUBSCR_CREAT_W_RAND_EXT; + if (argc) + gsmnet->subscr_creation_mode |= GSM_SUBSCR_CREAT_W_REGEXP; return CMD_SUCCESS; } @@ -1070,9 +1074,12 @@ static int config_write_nitb(struct vty *vty) { struct gsm_network *gsmnet = gsmnet_from_vty(vty); + enum gsm_subscr_creation_mode scm = gsmnet->subscr_creation_mode; + const char *reg = (scm & GSM_SUBSCR_CREAT_W_REGEXP) ? " regexp" : "", + *pref = scm ? "" : "no "; vty_out(vty, "nitb%s", VTY_NEWLINE); - vty_out(vty, " %ssubscriber-create-on-demand%s", - gsmnet->subscr_creation_mode ? "" : "no ", VTY_NEWLINE); + vty_out(vty, " %ssubscriber-create-on-demand%s%s", + pref, reg, VTY_NEWLINE); vty_out(vty, " %sassign-tmsi%s", gsmnet->avoid_tmsi ? "no " : "", VTY_NEWLINE); return CMD_SUCCESS; diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index c088855..c264328 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -231,6 +231,22 @@ self.assertEquals(self.vty.node(), 'config-mncc-int') + def testVtyAuthorization(self): + self.vty.enable() + self.vty.command("configure terminal") + self.vty.command("network") + self.assertTrue(self.vty.verify("auth policy closed", [''])) + self.assertTrue(self.vty.verify("auth policy regexp", [''])) + self.assertTrue(self.vty.verify("authorized-regexp ^001", [''])) + self.assertTrue(self.vty.verify("authorized-regexp 02$", [''])) + self.assertTrue(self.vty.verify("authorized-regexp *123.*", [''])) + self.vty.command("end") + self.vty.command("configure terminal") + self.vty.command("nitb") + self.assertTrue(self.vty.verify("subscriber-create-on-demand", [''])) + self.assertTrue(self.vty.verify("subscriber-create-on-demand regexp", [''])) + self.vty.command("end") + def testSi2Q(self): self.vty.enable() self.vty.command("configure terminal") -- To view, visit https://gerrit.osmocom.org/104 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I525f4b80676de47d1d422686da2ca012301b0129 Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu May 26 08:42:49 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Thu, 26 May 2016 08:42:49 +0000 Subject: [PATCH] libosmocore[master]: Add helper functions for AMR codec In-Reply-To: References: Message-ID: Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/118 to look at the new patch set (#4). Add helper functions for AMR codec * add functions to encode/decode various codec paramters from RTP payload with AMR frame according to RFC 4867 * those functions are extended version based on code from osmo-bts' amr.c by Andreas Eversberg * add corresponding enum types and strings for logging * add regression tests It's useful both to replace manual parsing in osmo-bts with fuctions covered by test suite and as a debugging helpers for issues related to AMR. Change-Id: Ia217679a07d3fbc970f435e20f6eac33d34bd597 Related: OS#1562 --- M .gitignore M include/osmocom/codec/codec.h M src/codec/Makefile.am M src/codec/gsm690.c M tests/Makefile.am A tests/codec/codec_test.c A tests/codec/codec_test.ok M tests/testsuite.at 8 files changed, 207 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/18/118/4 diff --git a/.gitignore b/.gitignore index 03ce379..70e2016 100644 --- a/.gitignore +++ b/.gitignore @@ -80,6 +80,7 @@ tests/ringbuf/ringbuf_test tests/strrb/strrb_test tests/vty/vty_test +tests/codec/codec_test tests/gb/gprs_bssgp_test tests/smscb/gsm0341_test tests/bitvec/bitvec_test diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h index d126e0f..b7bcc78 100644 --- a/include/osmocom/codec/codec.h +++ b/include/osmocom/codec/codec.h @@ -2,6 +2,8 @@ #include +#include + extern const uint16_t gsm610_bitorder[]; /* FR */ extern const uint16_t gsm620_unvoiced_bitorder[]; /* HR unvoiced */ extern const uint16_t gsm620_voiced_bitorder[]; /* HR voiced */ @@ -15,3 +17,32 @@ extern const uint16_t gsm690_5_9_bitorder[]; /* AMR 5.9 kbits */ extern const uint16_t gsm690_5_15_bitorder[]; /* AMR 5.15 kbits */ extern const uint16_t gsm690_4_75_bitorder[]; /* AMR 4.75 kbits */ + +extern const struct value_string osmo_amr_type_names[]; + +enum osmo_amr_type { + AMR_4_75 = 0, + AMR_5_15 = 1, + AMR_5_90 = 2, + AMR_6_70 = 3, + AMR_7_40 = 4, + AMR_7_95 = 5, + AMR_10_2 = 6, + AMR_12_2 = 7, + AMR_SID = 8, + AMR_GSM_EFR_SID = 9, + AMR_TDMA_EFR_SID = 10, + AMR_PDC_EFR_SID = 11, + AMR_NO_DATA = 15, +}; + +enum osmo_amr_quality { + AMR_BAD = 0, + AMR_GOOD = 1 +}; + +int osmo_amr_rtp_enc(uint8_t *payload, uint8_t cmr, enum osmo_amr_type ft, + enum osmo_amr_quality bfi); +int osmo_amr_rtp_dec(const uint8_t *payload, int payload_len, uint8_t *cmr, + int8_t *cmi, enum osmo_amr_type *ft, + enum osmo_amr_quality *bfi, int8_t *sti); diff --git a/src/codec/Makefile.am b/src/codec/Makefile.am index b4834e5..619897f 100644 --- a/src/codec/Makefile.am +++ b/src/codec/Makefile.am @@ -2,7 +2,7 @@ # Please read Chapter 6 "Library interface versions" of the libtool documentation before making any modification LIBVERSION=0:0:0 -AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include $(TALLOC_CFLAGS) AM_CFLAGS = -Wall lib_LTLIBRARIES = libosmocodec.la diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c index fdf3302..0f4bf8f 100644 --- a/src/codec/gsm690.c +++ b/src/codec/gsm690.c @@ -22,7 +22,12 @@ */ #include +#include +#include +#include +#include +#include /* * These table map between the raw encoder parameter output and * the format used before channel coding. Both in GSM and in various @@ -208,3 +213,104 @@ 88, 90, 91, 34, 55, 68, 89, 37, 58, 71, 92, 31, 52, 65, 86, }; + +static const uint8_t amr_len_by_ft[16] = { + 12, 13, 15, 17, 19, 20, 26, 31, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +const struct value_string osmo_amr_type_names[] = { + { AMR_4_75, "AMR 4,75 kbits/s" }, + { AMR_5_15, "AMR 5,15 kbit/s" }, + { AMR_5_90, "AMR 5,90 kbit/s" }, + { AMR_6_70, "AMR 6,70 kbit/s (PDC-EFR)" }, + { AMR_7_40, "AMR 7,40 kbit/s (TDMA-EFR)" }, + { AMR_7_95, "AMR 7,95 kbit/s" }, + { AMR_10_2, "AMR 10,2 kbit/s" }, + { AMR_12_2, "AMR 12,2 kbit/s (GSM-EFR)" }, + { AMR_SID, "AMR SID" }, + { AMR_GSM_EFR_SID, "GSM-EFR SID" }, + { AMR_TDMA_EFR_SID, "TDMA-EFR SID" }, + { AMR_PDC_EFR_SID, "PDC-EFR SID" }, + { AMR_NO_DATA, "No Data/NA" }, + { 0, NULL }, +}; + +/*! \brief Decode various AMR parameters from RTP payload (RFC 4867) acording to + * 3GPP TS 26.101 + * \param[in] rtppayload Payload from RTP packet + * \param[in] payload_len length of rtppayload + * \param[out] cmr AMR Codec Mode Request, not filled if NULL + * \param[out] cmi AMR Codec Mode Indicator, -1 if not applicable for this type, + * not filled if NULL + * \param[out] ft AMR Frame Type, not filled if NULL + * \param[out] bfi AMR Bad Frame Indicator, not filled if NULL + * \param[out] sti AMR SID Type Indicator, -1 if not applicable for this type, + * not filled if NULL + * \returns length of AMR data or negative value on error + */ +int osmo_amr_rtp_dec(const uint8_t *rtppayload, int payload_len, uint8_t *cmr, + int8_t *cmi, enum osmo_amr_type *ft, + enum osmo_amr_quality *bfi, int8_t *sti) +{ + /* RFC 4867 ? 4.4.2 ToC - compound payloads are not supported: F = 0 */ + uint8_t type = (rtppayload[1] >> 3) & 0xf; + + /* compound payloads are not supported */ + if (rtppayload[1] >> 7) + return -ENOTSUP; + + if (payload_len - 2 < amr_len_by_ft[type]) + return -ENOTSUP; + + if (payload_len < 2) + return -EINVAL; + + if (ft) + *ft = type; + + if (cmr) + *cmr = rtppayload[0] >> 4; + + if (bfi) + *bfi = (rtppayload[1] >> 2) & 1; + + /* Table 6 in 3GPP TS 26.101 */ + if (cmi) + *cmi = (type == AMR_SID) ? ((rtppayload[6] >> 1) & 7) : -1; + + if (sti) + *sti = (type == AMR_SID) ? (rtppayload[6] & 0x10) : -1; + + return 2 + amr_len_by_ft[type]; +} + +/*! \brief Encode various AMR parameters from RTP payload (RFC 4867) + * \param[out] payload Payload for RTP packet, contains speech data (if any) + * except for have 2 first bytes where header will be built + * \param[in] cmr AMR codec Mode Request + * \param[in] ft AMR Frame Type + * \param[in] bfi AMR Bad Frame Indicator + * \returns length of AMR data (header + ToC + speech data) or negative value + * on error + * + * Note: only octet-aligned mode is supported so the header occupies 2 full + * bytes. Optional interleaving header is not supported. + */ +int osmo_amr_rtp_enc(uint8_t *payload, uint8_t cmr, enum osmo_amr_type ft, + enum osmo_amr_quality bfi) +{ + if (cmr > 15) + return -EINVAL; + + if (ft > 15) + return -ENOTSUP; + + /* RFC 4867 ? 4.3.1 payload header */ + payload[0] = cmr << 4; + + /* RFC 4867 ? 4.4.2 ToC - compound payloads are not supported: F = 0 */ + payload[1] = (((uint8_t)ft) << 3) | (((uint8_t)bfi) << 2); + + /* speech data */ + return 2 + amr_len_by_ft[ft]; +} diff --git a/tests/Makefile.am b/tests/Makefile.am index 6c9929b..55aaa07 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -8,7 +8,7 @@ gsm0808/gsm0808_test gsm0408/gsm0408_test \ gb/bssgp_fc_test gb/gprs_bssgp_test gb/gprs_ns_test \ gprs/gprs_test kasumi/kasumi_test \ - logging/logging_test fr/fr_test \ + logging/logging_test fr/fr_test codec/codec_test \ loggingrb/loggingrb_test strrb/strrb_test \ vty/vty_test comp128/comp128_test utils/utils_test \ smscb/gsm0341_test stats/stats_test \ @@ -97,6 +97,9 @@ fr_fr_test_SOURCES = fr/fr_test.c fr_fr_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gb/libosmogb.la $(LIBRARY_DL) +codec_codec_test_SOURCES = codec/codec_test.c +codec_codec_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/codec/libosmocodec.la + loggingrb_loggingrb_test_SOURCES = loggingrb/loggingrb_test.c loggingrb_loggingrb_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/vty/libosmovty.la @@ -141,7 +144,7 @@ gsm0808/gsm0808_test.ok gb/bssgp_fc_tests.err \ gb/bssgp_fc_tests.ok gb/bssgp_fc_tests.sh \ gb/gprs_bssgp_test.ok gb/gprs_ns_test.ok \ - gprs/gprs_test.ok kasumi/kasumi_test.ok \ + gprs/gprs_test.ok kasumi/kasumi_test.ok codec/codec_test.ok \ msgfile/msgfile_test.ok msgfile/msgconfig.cfg \ logging/logging_test.ok logging/logging_test.err \ fr/fr_test.ok loggingrb/logging_test.ok \ diff --git a/tests/codec/codec_test.c b/tests/codec/codec_test.c new file mode 100644 index 0000000..854717b --- /dev/null +++ b/tests/codec/codec_test.c @@ -0,0 +1,54 @@ +/* + * (C) 2016 by Sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include + +#include +#include + +const uint8_t sid_update[] = {0x20, 0x44, 0x29, 0xc2, 0x92, 0x91, 0xf4}; +const uint8_t sid_first[] = {0x20, 0x44, 0x00, 0x00, 0x00, 0x00, 0x04}; + +static void test_sid_dec(const uint8_t *t, size_t len) +{ + uint8_t cmr; + enum osmo_amr_type ft; + enum osmo_amr_quality bfi; + int8_t sti, cmi; + int rc = osmo_amr_rtp_dec(t, len, &cmr, &cmi, &ft, &bfi, &sti); + printf("[%d] decode RTP %s%s: FT %s, CMR %s, CMI is %d, SID type %s\n", + rc, osmo_hexdump(t, len), bfi == AMR_GOOD ? "OK" : "BAD", + get_value_string(osmo_amr_type_names, ft), + get_value_string(osmo_amr_type_names, cmr), + cmi, sti ? "UPDATE" : "FIRST"); + if (sti == -1) + printf("FAIL: incompatible STI for SID\n"); +} + +int main(int argc, char **argv) +{ + printf("AMR RTP payload decoder test:\n"); + test_sid_dec(sid_first, 7); + test_sid_dec(sid_update, 7); + + return 0; +} + + diff --git a/tests/codec/codec_test.ok b/tests/codec/codec_test.ok new file mode 100644 index 0000000..f3da636 --- /dev/null +++ b/tests/codec/codec_test.ok @@ -0,0 +1,3 @@ +AMR RTP payload decoder test: +[2] decode RTP 20 44 00 00 00 00 04 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type FIRST +[2] decode RTP 20 44 29 c2 92 91 f4 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type UPDATE diff --git a/tests/testsuite.at b/tests/testsuite.at index aa269af..d49f7ff 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -115,12 +115,17 @@ AT_CHECK([$abs_top_builddir/tests/logging/logging_test], [0], [expout], [experr]) AT_CLEANUP +AT_SETUP([codec]) +AT_KEYWORDS([codec]) +cat $abs_srcdir/codec/codec_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/codec/codec_test], [0], [expout], [ignore]) +AT_CLEANUP + AT_SETUP([fr]) AT_KEYWORDS([fr]) cat $abs_srcdir/fr/fr_test.ok > expout cat $abs_srcdir/fr/fr_test.err > experr AT_CHECK([$abs_top_builddir/tests/fr/fr_test], [0], [expout], [experr]) - AT_CLEANUP AT_SETUP([loggingrb]) -- To view, visit https://gerrit.osmocom.org/118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia217679a07d3fbc970f435e20f6eac33d34bd597 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu May 26 12:05:08 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 26 May 2016 12:05:08 +0000 Subject: libosmocore[master]: Add strings with PH primitive names In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/117 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id7a6d478fd725c51f54ad746bdf9b9095579ff77 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu May 26 12:05:39 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 26 May 2016 12:05:39 +0000 Subject: libosmo-netif[master]: osmux: Add function to delete all msgs pending for a circuit In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 Please update the tickets with the other things I found during review. -- To view, visit https://gerrit.osmocom.org/120 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib0311652183332d0475bf7347023d518d38487ef Gerrit-PatchSet: 2 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: daniel Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu May 26 12:05:42 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 26 May 2016 12:05:42 +0000 Subject: [MERGED] libosmo-netif[master]: osmux: Add function to delete all msgs pending for a circuit In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: osmux: Add function to delete all msgs pending for a circuit ...................................................................... osmux: Add function to delete all msgs pending for a circuit Use this function in osmux_batch_del_circuit() since msgs are stored in a list per circuit. After the circuit is free()d the msgs are lost. Before this patch any messages enqueued inside a batch when the circiut is deleted were leaking. Change-Id: Ib0311652183332d0475bf7347023d518d38487ef Ticket: OS#1733 Reviewed-on: https://gerrit.osmocom.org/120 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M src/osmux.c 1 file changed, 11 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/osmux.c b/src/osmux.c index 1f5bbe2..0bee9cc 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -225,6 +225,16 @@ circuit->nmsgs--; } +static void osmux_circuit_del_msgs(struct osmux_batch *batch, struct osmux_circuit *circuit) +{ + struct msgb *cur, *tmp; + llist_for_each_entry_safe(cur, tmp, &circuit->msg_list, list) { + osmux_batch_dequeue(cur, circuit); + msgb_free(cur); + batch->nmsgs--; + } +} + struct osmux_input_state { struct msgb *out_msg; struct msgb *msg; @@ -538,6 +548,7 @@ if (circuit->dummy) batch->ndummy--; llist_del(&circuit->head); + osmux_circuit_del_msgs(batch, circuit); talloc_free(circuit); } -- To view, visit https://gerrit.osmocom.org/120 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib0311652183332d0475bf7347023d518d38487ef Gerrit-PatchSet: 3 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: daniel Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Thu May 26 12:19:11 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 26 May 2016 12:19:11 +0000 Subject: [PATCH] libosmo-netif[releases/0.0.6-stable]: osmux: Pass circuit to _batch_del_circuit() and use it from ... Message-ID: Hello Jenkins Builder, I'd like you to do a code review. Please visit https://gerrit.osmocom.org/121 to review the following change. osmux: Pass circuit to _batch_del_circuit() and use it from _xfrm_input_fini() Change-Id: If224980123d4a369133499ab7b577d02511f4055 Ticket: OS#1733 Reviewed-on: https://gerrit.osmocom.org/119 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M src/osmux.c 1 file changed, 10 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/21/121/1 diff --git a/src/osmux.c b/src/osmux.c index 8025d5d..1f5bbe2 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -533,14 +533,8 @@ return circuit; } -static void osmux_batch_del_circuit(struct osmux_batch *batch, int ccid) +static void osmux_batch_del_circuit(struct osmux_batch *batch, struct osmux_circuit *circuit) { - struct osmux_circuit *circuit; - - circuit = osmux_batch_find_circuit(batch, ccid); - if (circuit == NULL) - return; - if (circuit->dummy) batch->ndummy--; llist_del(&circuit->head); @@ -713,8 +707,13 @@ void osmux_xfrm_input_close_circuit(struct osmux_in_handle *h, int ccid) { struct osmux_batch *batch = (struct osmux_batch *)h->internal_data; + struct osmux_circuit *circuit; - osmux_batch_del_circuit(batch, ccid); + circuit = osmux_batch_find_circuit(batch, ccid); + if (circuit == NULL) + return; + + osmux_batch_del_circuit(batch, circuit); } void osmux_xfrm_input_fini(struct osmux_in_handle *h) @@ -722,10 +721,9 @@ struct osmux_batch *batch = (struct osmux_batch *)h->internal_data; struct osmux_circuit *circuit, *next; - llist_for_each_entry_safe(circuit, next, &batch->circuit_list, head) { - llist_del(&circuit->head); - talloc_free(circuit); - } + llist_for_each_entry_safe(circuit, next, &batch->circuit_list, head) + osmux_batch_del_circuit(batch, circuit); + osmo_timer_del(&batch->timer); talloc_free(batch); } -- To view, visit https://gerrit.osmocom.org/121 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If224980123d4a369133499ab7b577d02511f4055 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: releases/0.0.6-stable Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Thu May 26 12:19:11 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 26 May 2016 12:19:11 +0000 Subject: [PATCH] libosmo-netif[releases/0.0.6-stable]: osmux: Add function to delete all msgs pending for a circuit Message-ID: Hello Jenkins Builder, I'd like you to do a code review. Please visit https://gerrit.osmocom.org/122 to review the following change. osmux: Add function to delete all msgs pending for a circuit Use this function in osmux_batch_del_circuit() since msgs are stored in a list per circuit. After the circuit is free()d the msgs are lost. Before this patch any messages enqueued inside a batch when the circiut is deleted were leaking. Change-Id: Ib0311652183332d0475bf7347023d518d38487ef Ticket: OS#1733 Reviewed-on: https://gerrit.osmocom.org/120 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M src/osmux.c 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/22/122/1 diff --git a/src/osmux.c b/src/osmux.c index 1f5bbe2..0bee9cc 100644 --- a/src/osmux.c +++ b/src/osmux.c @@ -225,6 +225,16 @@ circuit->nmsgs--; } +static void osmux_circuit_del_msgs(struct osmux_batch *batch, struct osmux_circuit *circuit) +{ + struct msgb *cur, *tmp; + llist_for_each_entry_safe(cur, tmp, &circuit->msg_list, list) { + osmux_batch_dequeue(cur, circuit); + msgb_free(cur); + batch->nmsgs--; + } +} + struct osmux_input_state { struct msgb *out_msg; struct msgb *msg; @@ -538,6 +548,7 @@ if (circuit->dummy) batch->ndummy--; llist_del(&circuit->head); + osmux_circuit_del_msgs(batch, circuit); talloc_free(circuit); } -- To view, visit https://gerrit.osmocom.org/122 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib0311652183332d0475bf7347023d518d38487ef Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: releases/0.0.6-stable Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Thu May 26 12:19:11 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 26 May 2016 12:19:11 +0000 Subject: [PATCH] libosmo-netif[releases/0.0.6-stable]: debian: Bump version to 0.0.6.1 with osmux leak fixes Message-ID: Review at https://gerrit.osmocom.org/123 debian: Bump version to 0.0.6.1 with osmux leak fixes Attempt to fix leaks in osmux and cherry-pick two changes from master back to this release. Change-Id: I8793bc823cd72a7c883df17cf2f8d3b74df675a9 --- M debian/changelog 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/23/123/1 diff --git a/debian/changelog b/debian/changelog index 2180e56..d129d37 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libosmo-netif (0.0.6.1) UNRELEASED; urgency=medium + + * Bugfix release for OS#1733 + + -- Holger Hans Peter Freyther Thu, 26 May 2016 14:14:24 +0200 + libosmo-netif (0.0.6) unstable; urgency=medium * Drop libosmovty dependency. -- To view, visit https://gerrit.osmocom.org/123 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8793bc823cd72a7c883df17cf2f8d3b74df675a9 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: releases/0.0.6-stable Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Thu May 26 12:19:49 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 26 May 2016 12:19:49 +0000 Subject: [ABANDON] libosmo-netif[releases/0.0.6-stable]: osmux: Pass circuit to _batch_del_circuit() and use it from ... In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: osmux: Pass circuit to _batch_del_circuit() and use it from _xfrm_input_fini() ...................................................................... Abandoned Wanted to push directly -- To view, visit https://gerrit.osmocom.org/121 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: If224980123d4a369133499ab7b577d02511f4055 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: releases/0.0.6-stable Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Thu May 26 12:19:53 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 26 May 2016 12:19:53 +0000 Subject: [ABANDON] libosmo-netif[releases/0.0.6-stable]: osmux: Add function to delete all msgs pending for a circuit In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: osmux: Add function to delete all msgs pending for a circuit ...................................................................... Abandoned Wanted to push directly -- To view, visit https://gerrit.osmocom.org/122 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ib0311652183332d0475bf7347023d518d38487ef Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: releases/0.0.6-stable Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Thu May 26 12:19:56 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 26 May 2016 12:19:56 +0000 Subject: [ABANDON] libosmo-netif[releases/0.0.6-stable]: debian: Bump version to 0.0.6.1 with osmux leak fixes In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: debian: Bump version to 0.0.6.1 with osmux leak fixes ...................................................................... Abandoned Wanted to push directly -- To view, visit https://gerrit.osmocom.org/123 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I8793bc823cd72a7c883df17cf2f8d3b74df675a9 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: releases/0.0.6-stable Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Thu May 26 12:22:37 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 26 May 2016 12:22:37 +0000 Subject: libosmo-netif[master]: debian: Make upgrading from debian SID easier In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/111 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6486f91bc11e0828b4ccd0e22f8e2135af0d271a Gerrit-PatchSet: 1 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Thu May 26 12:22:39 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Thu, 26 May 2016 12:22:39 +0000 Subject: [MERGED] libosmo-netif[master]: debian: Make upgrading from debian SID easier In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: debian: Make upgrading from debian SID easier ...................................................................... debian: Make upgrading from debian SID easier Make sure the version number of this sourcepackage is higher than the one found in Debian SID. Change-Id: I6486f91bc11e0828b4ccd0e22f8e2135af0d271a Reviewed-on: https://gerrit.osmocom.org/111 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M debian/changelog 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/debian/changelog b/debian/changelog index 2180e56..6cd3378 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libosmo-netif (0.0.7) UNRELEASED; urgency=medium + + * Move forward toward a new release. + + -- Holger Hans Peter Freyther Tue, 24 May 2016 23:06:33 +0200 + libosmo-netif (0.0.6) unstable; urgency=medium * Drop libosmovty dependency. -- To view, visit https://gerrit.osmocom.org/111 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6486f91bc11e0828b4ccd0e22f8e2135af0d271a Gerrit-PatchSet: 2 Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From keith at rhizomatica.org Thu May 26 12:29:17 2016 From: keith at rhizomatica.org (Keith) Date: Thu, 26 May 2016 13:29:17 +0100 Subject: GSM MAP invoke? (was Re: Persistent Uplink activity from Moto KRZR K3) In-Reply-To: References: Message-ID: On 10/05/2016 09:01, Alexander Chemeris wrote: > MEAS RES means that there is an open logical channel between the phone and > the BTS. Have you looked at the list of open channels at the NITB VTY? That's right, of course! Yes, there's an open channel. > > A useful log would be a pcap trace of communication between OpenBSC and > OsmoBTS (make sure osmo-trx communication is filtered out). Ok, I took a look at that and compared to it other MS. - This phone sends a GSM MAP invoke Service Request right after the Location Update. I don't know if it's more helpful for me to describe it or just send the dump, but I'm also not sure about sending the capture to the list. So.. let me go for the description route initially: At least according to Wireshark, the MS is sending a DTAP Register, "Non Call related SS message" GSM MAP invoke interrogateSS - invoke: cfu - call forwarding unconditional, basicService: teleservice, teleservice: allSpeechTransmissionServices. (Is that something to do with call diverts setup?) I have two of these phones, one does this, the other does not. - regardless of the inserted SIM) The SS Version Indicator at the end of the message is 7f 01 00 This is happening as the NITB log gives: ./openbsc/openbsc/src/libmsc/gsm_04_08.c:958 <- CM SERVICE REQUEST serv_type=0x08 MI(TMSI)=1448232929 ./openbsc/openbsc/src/libbsc/gsm_04_08_utils.c:692 -> CM SERVICE ACK And from there that channel stays open until I power off the phone. I had a look there to see if I could trace from what happens in gsm48_rx_mm_serv_req() up to the ACK being sent, but I'm afraid I get a little bit lost in the code flow as my c skills are not really up to the task, thinking I might intervene and identify some part of this "invoke" and reject it, but there I'm really not sure how to go about it at all. Now, I see the ack being sent from _gsm48_rx_mm_serv_req_sec_cb() but I don't really understand how this is called. I see that function name as a parameter to gsm48_secure_channel() but there I'm lost. Any clues are most welcome! Many thanks, Keith. From holger at freyther.de Thu May 26 13:01:15 2016 From: holger at freyther.de (Holger Freyther) Date: Thu, 26 May 2016 15:01:15 +0200 Subject: Splitting out M3UA and MTP3 out of Open BSC into a separate library In-Reply-To: <06E62BB0-16D7-4272-B70F-94A132B83D3A@freeradius.org> References: <06E62BB0-16D7-4272-B70F-94A132B83D3A@freeradius.org> Message-ID: > On 24 May 2016, at 00:23, Arran Cudbard-Bell wrote: > > Hi, Hi! > Developing a module for FreeRADIUS to support EAP-SIM and EAP-AKA authentication against a HLR. cool! I hope it is going to be Free Software? > The HLR we were targeting only supported a SCTP/M3UA/SCCP/TCAP/MAP stack, so we couldn't use SUA. > > Ripping the M3UA/MTP3 code out of OpenBSC worked surprisingly well. We ended up running the event loop in a separate thread to work around the threading issues. > > Unfortunately the HLR implements the ANSI variant of everything, whereas OpenBSC and supporting libraries seem to have been written to be compatible with the ITU standards. If you need another HLR (either IPA + SCCP or through osmo-stp as M3UA ASP) to test against I can help you to set-up the Smalltalk HLR/AuC I wrote. holger From a.cudbardb at freeradius.org Thu May 26 13:42:55 2016 From: a.cudbardb at freeradius.org (Arran Cudbard-Bell) Date: Thu, 26 May 2016 09:42:55 -0400 Subject: Splitting out M3UA and MTP3 out of Open BSC into a separate library In-Reply-To: References: <06E62BB0-16D7-4272-B70F-94A132B83D3A@freeradius.org> Message-ID: <5EE467EF-4F6B-4852-A6B2-AD278DB41987@freeradius.org> > On May 26, 2016, at 9:01 AM, Holger Freyther wrote: > > >> On 24 May 2016, at 00:23, Arran Cudbard-Bell wrote: >> >> Hi, > > Hi! > > >> Developing a module for FreeRADIUS to support EAP-SIM and EAP-AKA authentication against a HLR. > > cool! I hope it is going to be Free Software? I am encouraging it to be Free Software. If it'd generate more enthusiasm for maintaining the M3UA/M2UA/MTP3 code outside of OpenBSC that might help my argument some :) > If you need another HLR (either IPA + SCCP or through osmo-stp as M3UA ASP) to test against I can help you to set-up the Smalltalk HLR/AuC I wrote. Cool! Yes that might be useful. I also added support for Route Registration at the M3UA level, but have nothing to test against as their SG doesn't support it. Is there anything I can test against in *osmo*? Thanks, -Arran -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 842 bytes Desc: Message signed with OpenPGP using GPGMail URL: From ruben.undheim at gmail.com Thu May 26 16:04:08 2016 From: ruben.undheim at gmail.com (Ruben Undheim) Date: Thu, 26 May 2016 18:04:08 +0200 Subject: Closing the gap between official debian and our nightly builds In-Reply-To: <20160526053015.GA20541@macbookair> References: <20160526053015.GA20541@macbookair> Message-ID: <20160526160408.GA22159@macbookair> Hi again, Btw. I just noticed that you have actually started the debian packaging on the master branch of osmo-bts - not yet released. Then you're probably not aware of the ongoing effort since Februrary where I've been packaging it: See this branch: https://anonscm.debian.org/cgit/debian-science/packages/osmo-bts.git/log/ The only thing missing is writing the man pages, the short/long description in d/control and d/copyright, and then it can be uploaded. Note that I prepared a openbsc-dev package (already in the archive) which provides the gsm_data_shared.h related files, and osmo-bts build-depends on this. I don't know how you solved this. Cheers, Ruben From holger at freyther.de Thu May 26 17:58:04 2016 From: holger at freyther.de (Holger Freyther) Date: Thu, 26 May 2016 19:58:04 +0200 Subject: Closing the gap between official debian and our nightly builds In-Reply-To: <20160526160408.GA22159@macbookair> References: <20160526053015.GA20541@macbookair> <20160526160408.GA22159@macbookair> Message-ID: <74841733-AC29-4306-80FB-63EBB986215C@freyther.de> > On 26 May 2016, at 18:04, Ruben Undheim wrote: > > Hi again, > > Btw. I just noticed that you have actually started the debian > packaging on the master branch of osmo-bts - not yet > released. Then you're probably not aware of the ongoing > effort since Februrary where I've been packaging it: > > See this branch: > https://anonscm.debian.org/cgit/debian-science/packages/osmo-bts.git/log/ oh, I was not aware of it. I mostly created it ad-hoc. I will try to copy as much as possible. > The only thing missing is writing the man pages, the > short/long description in d/control and d/copyright, and then > it can be uploaded. > > Note that I prepared a openbsc-dev package (already in the > archive) which provides the gsm_data_shared.h related files, > and osmo-bts build-depends on this. I don't know how you > solved this. ah nice! I cheat and copy the file over when building the source package. From holger at freyther.de Thu May 26 18:06:35 2016 From: holger at freyther.de (Holger Freyther) Date: Thu, 26 May 2016 20:06:35 +0200 Subject: Closing the gap between official debian and our nightly builds In-Reply-To: <20160526053015.GA20541@macbookair> References: <20160526053015.GA20541@macbookair> Message-ID: > On 26 May 2016, at 07:30, Ruben Undheim wrote: > > Hi Holger! > > Just a short answer from me this morning. thank you. Let me merge your better/great description, manpages and symbols. In regard to symbols files when and how to update it? Can you point me to the docs for that? > I don't have a total overview of the backwards incompatible discrepancies. I probably should have, but hopefully there aren't too many. It's okay, we can have a flag day once if we keep compat after. > No, I don't have any experience. But technically, it shouldn't be too hard. The debian dir in the upstream tarball will always be overwritten when building the package, so whatever you do there, will be invisible in the official package unless we manually merge it in. Okay, but it would be somehow nice if our descriptions will not drift too much and we re-use the same parts? Can you agree to that? >> - At least for OpenBSC you do not seem to package the -dbg symbols. As a developer I am always annoyed (e.g. with sofia sip) when I can't install the debug symbols. > > -dbg packages are now handled automatically by Debian. Any package with binaries, will automatically get "-dbgsym" packages. Just google it. This is also the case for Ubuntu AFAIK. This will however not be of any help for older Ubuntu and Debian releases (if you desire to support them also with -dbg symbols) finally! I never understood (okay compats) why so many packages don't have a -dbg(sym). Should -dbgsym packages be listed on https://packages.debian.org/source/sid/openbsc? So even when going to a mirror I don't see a -dbgsym package next to the other packages? Does one need to raise the compat version for it? > The extra debian dir is no problem. As said above, it will be overwritten automatically by the build tools when building the package. To move forward: we just pull interesting stuff from each other's debian dir. However, it may make sense to pull some things out of the debian dir and into the main source tree - for instance the man pages. Where would you put them? Makefile.am and install them? Shall we use asciidoc to generate manpages? holger From ruben.undheim at gmail.com Thu May 26 19:07:41 2016 From: ruben.undheim at gmail.com (Ruben Undheim) Date: Thu, 26 May 2016 21:07:41 +0200 Subject: Closing the gap between official debian and our nightly builds In-Reply-To: References: <20160526053015.GA20541@macbookair> Message-ID: <20160526190741.GA23070@macbookair> > In regard to symbols files when and how to update it? Can you point me to the docs for that? I use: dpkg-gensymbols -plibname0 -Odebian/libname0.symbols -q after building the package. Then I open up the generated file debain/libname0.symbols and remove the debian suffix from the version number ("-1"). See "man dpkg-gensymbols". There might be easier ways also that I'm not aware of. > > I don't have a total overview of the backwards incompatible discrepancies. I probably should have, but hopefully there aren't too many. > > It's okay, we can have a flag day once if we keep compat after. Since I've based the Debian packages on your work (for those you had done back then), there should not really be that much difference, so upgrades should probably go smoothly. We should also be able to make the transition completely smooth using "dependencies" and "conflicts" correctly, if there are any issues. > Okay, but it would be somehow nice if our descriptions will not drift too much and we re-use the same parts? Can you agree to that? Whenever integrating a new upstream release, I do a diff with the previous version. This is mainly to see if any copyright information has changed, but I will also spot changes to the packaging, and therefore the descriptions. I do of course agree to keep it in sync. > finally! I never understood (okay compats) why so many packages don't have a -dbg(sym). Should -dbgsym packages be listed on https://packages.debian.org/source/sid/openbsc? So even when going to a mirror I don't see a -dbgsym package next to the other packages? Does one need to raise the compat version for it? One of the reasons mentioned for implementing automatic -dbgsym packages was to prevent waste of disk space on mirrors, so the -dbgsym can be found on some separate servers only and not on every mirror. You'll have to add it explicitly to /etc/apt/sources.list > > The extra debian dir is no problem. As said above, it will be overwritten automatically by the build tools when building the package. To move forward: we just pull interesting stuff from each other's debian dir. However, it may make sense to pull some things out of the debian dir and into the main source tree - for instance the man pages. > > Where would you put them? Makefile.am and install them? Shall we use asciidoc to generate manpages? Hmm. I don't really have a strong opinion. Both man/ and doc/man should do fine. If you add it to the Makefile or not, doesn't really matter. I've used txt2man to generate them, since it takes as input an easy human readable text file format. txt2man is a one-file GPL-2 licensed shell script. As long as it dumps out proper man pages, it should be fine. I hope to get the osmo-bts formal stuff done soon, so it can get uploaded, and then everything for a base station will be available in the official archive! Cheers, Ruben From holger at freyther.de Thu May 26 19:10:38 2016 From: holger at freyther.de (Holger Freyther) Date: Thu, 26 May 2016 21:10:38 +0200 Subject: Closing the gap between official debian and our nightly builds In-Reply-To: <20160526190741.GA23070@macbookair> References: <20160526053015.GA20541@macbookair> <20160526190741.GA23070@macbookair> Message-ID: <7ADEB389-EB83-4ABA-978D-DB703EA6B7DE@freyther.de> > On 26 May 2016, at 21:07, Ruben Undheim wrote: > > I hope to get the osmo-bts formal stuff done soon, so it can get uploaded, and > then everything for a base station will be available in the official archive! great. Please ping us before so we can tag a release that is closer to master than the last tagged version. holger From ruben.undheim at gmail.com Thu May 26 19:16:24 2016 From: ruben.undheim at gmail.com (Ruben Undheim) Date: Thu, 26 May 2016 21:16:24 +0200 Subject: libosmocore: patch for big-endian architectures Message-ID: <20160526191624.GA23739@macbookair> Hi, One test case fails for openbsc on big-endian architectures. This was traced back to struct erros in libosmocore. Please see patch below: commit fb3d353ab238a2d14cb8e9704995f14a2acd6c1b Author: Ruben Undheim Date: Mon Dec 7 19:34:28 2015 +0100 Patched structs for big-endian architectures diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index 4800b48..0c2fcf2 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -4,6 +4,8 @@ #include #include +#include + /* GSM TS 04.08 definitions */ struct gsm_lchan; @@ -42,6 +44,7 @@ struct gsm48_classmark2 { } __attribute__ ((packed)); /* Chapter 10.5.2.1b.3 */ +#if OSMO_IS_LITTLE_ENDIAN == 1 struct gsm48_range_1024 { uint8_t w1_hi:2, f0:1, @@ -75,8 +78,44 @@ struct gsm48_range_1024 { uint8_t w16:6, w15_lo:2; } __attribute__ ((packed)); +#else +struct gsm48_range_1024 { + uint8_t form_id:5, + f0:1, + w1_hi:2; + uint8_t w1_lo; + uint8_t w2_hi; + uint8_t w2_lo:1, + w3_hi:7; + uint8_t w3_lo:2, + w4_hi:6; + uint8_t w4_lo:2, + w5_hi:6; + uint8_t w5_lo:2, + w6_hi:6; + uint8_t w6_lo:2, + w7_hi:6; + uint8_t w7_lo:2, + w8_hi:6; + uint8_t w8_lo:1, + w9:7; + uint8_t w10:7, + w11_hi:1; + uint8_t w11_lo:6, + w12_hi:2; + uint8_t w12_lo:5, + w13_hi:3; + uint8_t w13_lo:4, + w14_hi:4; + uint8_t w14_lo:3, + w15_hi:5; + uint8_t w15_lo:2, + w16:6; +} __attribute__ ((packed)); +#endif /* Chapter 10.5.2.1b.4 */ +#if OSMO_IS_LITTLE_ENDIAN == 1 struct gsm48_range_512 { uint8_t orig_arfcn_hi:1, form_id:7; @@ -110,8 +149,44 @@ struct gsm48_range_512 { uint8_t w17:5, w16_lo:3; } __attribute__ ((packed)); +#else +struct gsm48_range_512 { + uint8_t form_id:7, + orig_arfcn_hi:1; + uint8_t orig_arfcn_mid; + uint8_t orig_arfcn_lo:1, + w1_hi:7; + uint8_t w1_lo:2, + w2_hi:6; + uint8_t w2_lo:2, + w3_hi:6; + uint8_t w3_lo:2, + w4_hi:6; + uint8_t w4_lo:1, + w5:7; + uint8_t w6:7, + w7_hi:1; + uint8_t w7_lo:6, + w8_hi:2; + uint8_t w8_lo:4, + w9_hi:4; + uint8_t w9_lo:2, + w10:6; + uint8_t w11:6, + w12_hi:2; + uint8_t w12_lo:4, + w13_hi:4; + uint8_t w13_lo:2, + w14:6; + uint8_t w15:6, + w16_hi:2; + uint8_t w16_lo:3, + w17:5; +} __attribute__ ((packed)); +#endif /* Chapter 10.5.2.1b.5 */ +#if OSMO_IS_LITTLE_ENDIAN == 1 struct gsm48_range_256 { uint8_t orig_arfcn_hi:1, form_id:7; @@ -151,8 +226,50 @@ struct gsm48_range_256 { w21:4, w20_lo:3; } __attribute__ ((packed)); +#else +struct gsm48_range_256 { + uint8_t form_id:7, + orig_arfcn_hi:1; + uint8_t orig_arfcn_mid; + uint8_t orig_arfcn_lo:1, + w1_hi:7; + uint8_t w1_lo:1, + w2:7; + uint8_t w3:7, + w4_hi:1; + uint8_t w4_lo:5, + w5_hi:3; + uint8_t w5_lo:3, + w6_hi:5; + uint8_t w6_lo:1, + w7:6, + w8_hi:1; + uint8_t w8_lo:4, + w9_hi:4; + uint8_t w9_lo:1, + w10:5, + w11_hi:2; + uint8_t w11_lo:3, + w12:5; + uint8_t w13:5, + w14_hi:3; + uint8_t w14_lo:2, + w15:5, + w16_hi:1; + uint8_t w16_lo:3, + w17:4, + w18_hi:1; + uint8_t w18_lo:3, + w19:4, + w20_hi:1; + uint8_t w20_lo:3, + w21:4, + spare:1; +} __attribute__ ((packed)); +#endif /* Chapter 10.5.2.1b.6 */ +#if OSMO_IS_LITTLE_ENDIAN == 1 struct gsm48_range_128 { uint8_t orig_arfcn_hi:1, form_id:7; @@ -194,6 +311,49 @@ struct gsm48_range_128 { w27:3, w26_lo:1; } __attribute__ ((packed)); +#else +struct gsm48_range_128 { + uint8_t form_id:7, + orig_arfcn_hi:1; + uint8_t orig_arfcn_mid; + uint8_t orig_arfcn_lo:1, + w1:7; + uint8_t w2:6, + w3_hi:2; + uint8_t w3_lo:4, + w4_hi:4; + uint8_t w4_lo:1, + w5:5, + w6_hi:2; + uint8_t w6_lo:3, + w7:5; + uint8_t w8:4, + w9:4; + uint8_t w10:4, + w11:4; + uint8_t w12:4, + w13:4; + uint8_t w14:4, + w15:4; + uint8_t w16:3, + w17:3, + w18_hi:2; + uint8_t w18_lo:1, + w19:3, + w20:3, + w21_hi:1; + uint8_t w21_lo:2, + w22:3, + w23:3; + uint8_t w24:3, + w25:3, + w26_hi:2; + uint8_t w26_lo:1, + w27:3, + w28:3, + spare:1; +} __attribute__ ((packed)); +#endif /* Chapter 10.5.2.1b.7 */ struct gsm48_var_bit { I tried 30 seconds to figure out how to use Gerrit, but I couldn't figure out how to login, so I rather just post here. Best regards, Ruben From ruben.undheim at gmail.com Thu May 26 19:18:26 2016 From: ruben.undheim at gmail.com (Ruben Undheim) Date: Thu, 26 May 2016 21:18:26 +0200 Subject: Closing the gap between official debian and our nightly builds In-Reply-To: <7ADEB389-EB83-4ABA-978D-DB703EA6B7DE@freyther.de> References: <20160526053015.GA20541@macbookair> <20160526190741.GA23070@macbookair> <7ADEB389-EB83-4ABA-978D-DB703EA6B7DE@freyther.de> Message-ID: <20160526191826.GB23739@macbookair> > > I hope to get the osmo-bts formal stuff done soon, so it can get uploaded, and > > then everything for a base station will be available in the official archive! > > great. Please ping us before so we can tag a release that is closer to master than the last tagged version. It doesn't matter that much. It's very quick to upload a new version after it has been accepted. The hardest part is to get it in there in the first place. But I'll surely let you know when. Regards, Ruben From ruben.undheim at gmail.com Thu May 26 19:24:17 2016 From: ruben.undheim at gmail.com (Ruben Undheim) Date: Thu, 26 May 2016 21:24:17 +0200 Subject: OpenBSC now in Debian! In-Reply-To: References: <20160317175337.GA15384@macbookair> <20160319064607.GA13873@macbookair> <7F2C52C8-5596-45A4-937E-028E692B3326@freyther.de> <20160320110003.GA15008@macbookair> <59873589-C9A0-4BFA-AC7A-93BB5D959E70@freyther.de> <20160511210158.GA16325@macbookair> Message-ID: <20160526192417.GA23869@macbookair> > > It also seems like the issue has been fixed upstream in libdbi already in the > > Spring of 2014, but no new releases has been made since then. > > > > Could this be all, or are you aware of other memory issues or problems with libdbd? > > > > ah cool. I didn't know that it was fixed by Jan. Can you get this into debian8.0 as a bugfix? Good idea, I'll ask if they want to backport it. It was fixed in sid at least. > > Additionally, I've found another problem for big-endian architectures (https://bugs.debian.org/818566) > > You'll see my patch here: > > https://anonscm.debian.org/cgit/debian-science/packages/libosmocore.git/tree/debian/patches/0004-Patched-structs-for-big-endian-architectures.patch?id=cfd8ad8cd4e69a10f5057539eb26e2624df17a85 > > > > Half of the patch has already been applied to libosmocore some time ago. I just sent you the patch (only the relevant part) > Do you want to try to use gerrit to push the missing hunks? But GCC6 Didn't figure out how. :( Still using GCC5 here unfortunately. ;) Ruben From gerrit-no-reply at lists.osmocom.org Fri May 27 10:48:04 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Fri, 27 May 2016 10:48:04 +0000 Subject: [MERGED] openbsc[master]: tweak db debug log: log TMSI as hex In-Reply-To: References: Message-ID: Neels Hofmeyr has submitted this change and it was merged. Change subject: tweak db debug log: log TMSI as hex ...................................................................... tweak db debug log: log TMSI as hex Change-Id: I4564c99c145a35fb592c228c1fa84c61ec425fd3 Reviewed-on: https://gerrit.osmocom.org/94 Reviewed-by: Harald Welte Tested-by: Jenkins Builder --- M openbsc/src/libmsc/db.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c index b3235bb..9e3fb36 100644 --- a/openbsc/src/libmsc/db.c +++ b/openbsc/src/libmsc/db.c @@ -908,7 +908,7 @@ subscr->id = dbi_result_get_ulonglong(result, "id"); db_set_from_query(subscr, result); - DEBUGP(DDB, "Found Subscriber: ID %llu, IMSI %s, NAME '%s', TMSI %u, EXTEN '%s', LAC %hu, AUTH %u\n", + DEBUGP(DDB, "Found Subscriber: ID %llu, IMSI %s, NAME '%s', TMSI %x, EXTEN '%s', LAC %hu, AUTH %u\n", subscr->id, subscr->imsi, subscr->name, subscr->tmsi, subscr->extension, subscr->lac, subscr->authorized); dbi_result_free(result); -- To view, visit https://gerrit.osmocom.org/94 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4564c99c145a35fb592c228c1fa84c61ec425fd3 Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From nhofmeyr at sysmocom.de Fri May 27 11:47:59 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Fri, 27 May 2016 13:47:59 +0200 Subject: libosmocore: patch for big-endian architectures In-Reply-To: <20160526191624.GA23739@macbookair> References: <20160526191624.GA23739@macbookair> Message-ID: <20160527114759.GA7867@dub6> On Thu, May 26, 2016 at 09:16:24PM +0200, Ruben Undheim wrote: > I tried 30 seconds to figure out how to use Gerrit, but I couldn't figure out > how to login, so I rather just post here. Instructions: http://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit In short, first be logged in on osmocom.org, then go to gerrit sign-in and enter this openid url: https://osmocom.org/openid I agree that it's somewhat harder than pasting the patch into a mail, but it is achievable ;) Call again if you truly can't be bothered and I'll submit your patch for review -- this once ;) Thanks! ~Neels -- - Neels Hofmeyr http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Gesch?ftsf?hrer / Managing Directors: Holger Freyther, Harald Welte -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From nhofmeyr at sysmocom.de Fri May 27 12:32:39 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Fri, 27 May 2016 14:32:39 +0200 Subject: [PATCH 1/1] fix typos in all manuals In-Reply-To: <5745EAD9.1070606@web.de> References: <1464042480-16934-1-git-send-email-jonathan.brielmaier@web.de> <20160525131609.GA7245@dub6> <5745EAD9.1070606@web.de> Message-ID: <20160527123239.GC7867@dub6> On Wed, May 25, 2016 at 08:11:37PM +0200, Jonathan Brielmaier wrote: > Hello, > > I did it via `git send-email` but it seems that I have not the right > parameters. I'll get that and next time it should work correct :) The patch contained conversational email text: "Hello, ..." -- also it said [PATCH 1/1], where I think git would usually just write [PATCH] for a single patch? so I assumed you had pasted manually. I've received a patch mail from you where you apparently copied my tweak patch back to me, actually to my private mail address. Apart from the content and context, that patch mail looked sane format wise. So I think you're good for next time :) ~Neels -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From nhofmeyr at sysmocom.de Fri May 27 14:06:48 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Fri, 27 May 2016 16:06:48 +0200 Subject: branch review in gerrit? Message-ID: <20160527140648.GA32481@dub6> Hi all, I would like to post the sysmocom/iups branch for review in gerrit, but I'm not sure that we want those 40 commits to be posted to all mail inboxes and sit there, ungrouped in the list of commits in gerrit. gerrit shows 'related' patches, but it doesn't have the concept of a patch-set per se. The list of pending patches will be very long, IIUC sorted with the last branch commit on top and earlier ones further down. I'd like to push it to for/master now, but first giving you guys a chance to suggest another way for this special batch. ~Neels -- - Neels Hofmeyr http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Gesch?ftsf?hrer / Managing Directors: Holger Freyther, Harald Welte -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From msuraev at sysmocom.de Fri May 27 14:09:23 2016 From: msuraev at sysmocom.de (Max) Date: Fri, 27 May 2016 16:09:23 +0200 Subject: branch review in gerrit? In-Reply-To: <20160527140648.GA32481@dub6> References: <20160527140648.GA32481@dub6> Message-ID: <57485513.8060204@sysmocom.de> According to https://code.google.com/p/gerrit/issues/detail?id=377 gerrit does have idea of dependencies but I don't know how to automatically utilize it for patch series. On 05/27/2016 04:06 PM, Neels Hofmeyr wrote: > Hi all, > > I would like to post the sysmocom/iups branch for review in gerrit, but I'm not > sure that we want those 40 commits to be posted to all mail inboxes and sit > there, ungrouped in the list of commits in gerrit. > > gerrit shows 'related' patches, but it doesn't have the concept of a patch-set > per se. The list of pending patches will be very long, IIUC sorted with the > last branch commit on top and earlier ones further down. > > I'd like to push it to for/master now, but first giving you guys a chance to > suggest another way for this special batch. > > ~Neels > -- Max Suraev http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Geschaeftsfuehrer / Managing Directors: Holger Freyther, Harald Welte From pierre.baudry at diateam.net Fri May 27 16:02:28 2016 From: pierre.baudry at diateam.net (Pierre Baudry) Date: Fri, 27 May 2016 18:02:28 +0200 Subject: Regression in osmo-pcu with UHD trx ? Message-ID: <57486F94.2010202@diateam.net> Hi all, I have a Osmocom setup running with a Ettus B200 I noticed that since several weeks that osmo-pcu did not work as good as previously. The latest "good" revision I am aware of is commit d87e1d6ab747423d3668c74d16201a5d967accf0 (2015/12/14) I tried again today with commit 2fcfc29020c81891d7888ddc7ddbcd866bcd406d (2016/05/24) and not a single handset could establish data communication Reading osmo-pcu logs show that T6169 timeouts during TBF assignment : > Fri May 27 15:51:38 2016 DRLCMAC <0002> bts.cpp:479 MS requests UL TBF on RACH, so we provide one: > Fri May 27 15:51:38 2016 DRLCMAC <0002> tbf.cpp:672 ********** TBF starts here ********** > Fri May 27 15:51:38 2016 DRLCMAC <0002> tbf.cpp:674 Allocating UL TBF: MS_CLASS=0/0 > Fri May 27 15:51:38 2016 DRLCMAC <0002> gprs_ms.cpp:114 Creating MS object, TLLI = 0x00000000 > Fri May 27 15:51:38 2016 DRLCMAC <0002> bts.cpp:407 Searching for first unallocated TFI: TRX=0 > Fri May 27 15:51:38 2016 DRLCMAC <0002> bts.cpp:417 Found TFI=0. > Fri May 27 15:51:38 2016 DRLCMAC <0002> gprs_rlcmac_ts_alloc.cpp:525 Slot Allocation (Algorithm B) for unknown class (assuming 12) > Fri May 27 15:51:38 2016 DRLCMAC <0002> gprs_rlcmac_ts_alloc.cpp:560 - Rx=4 Tx=4 Sum Rx+Tx=5 Tta=2 Ttb=1 Tra=2 Trb=1 Type=1 > Fri May 27 15:51:38 2016 DRLCMAC <0002> gprs_rlcmac_ts_alloc.cpp:157 - Skipping TS 0, because not enabled > Fri May 27 15:51:38 2016 DRLCMAC <0002> gprs_rlcmac_ts_alloc.cpp:579 - Possible DL/UL slots: (TS=0)".CCCCCCC"(TS=7) > Fri May 27 15:51:38 2016 DRLCMAC <0002> gprs_rlcmac_ts_alloc.cpp:940 - Selected UL slots: (TS=0)"...U...."(TS=7), single > Fri May 27 15:51:38 2016 DRLCMAC <0002> gprs_rlcmac_ts_alloc.cpp:966 Using single slot at TS 3 for UL > Fri May 27 15:51:38 2016 DRLCMAC <0002> gprs_rlcmac_ts_alloc.cpp:990 - Reserved DL/UL slots: (TS=0)"...C...."(TS=7) > Fri May 27 15:51:38 2016 DRLCMAC <0002> gprs_rlcmac_ts_alloc.cpp:1017 - Assigning UL TS 3 > Fri May 27 15:51:38 2016 DRLCMAC <0002> bts.cpp:1481 PDCH(TS 3, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL), 1 TBFs, USFs = 01, TFIs = 00000001. > Fri May 27 15:51:38 2016 DRLCMAC <0002> tbf.cpp:385 - Setting Control TS 3 > Fri May 27 15:51:38 2016 DRLCMAC <0002> gprs_ms.cpp:267 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) > Fri May 27 15:51:38 2016 DRLCMAC <0002> tbf.cpp:625 Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 08, dl_slots = 00 > Fri May 27 15:51:38 2016 DRLCMAC <0002> ./tbf.h:291 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW > Fri May 27 15:51:38 2016 DRLCMAC <0002> tbf.cpp:409 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. > Fri May 27 15:51:38 2016 DRLCMAC <0002> bts.cpp:523 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START > Fri May 27 15:51:38 2016 DRLCMAC <0002> bts.cpp:527 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=0 ra=0x7b, Fn=1607859 (28,33,19) > Fri May 27 15:51:38 2016 DRLCMAC <0002> bts.cpp:529 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) > Fri May 27 15:51:38 2016 DRLCMAC <0002> bts.cpp:542 - TRX=0 (128) TS=3 TA=0 TSC=3 TFI=0 USF=0 > Fri May 27 15:51:38 2016 DRLCMAC <0002> ./tbf.h:291 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) changes state from FLOW to WAIT ASSIGN > Fri May 27 15:51:43 2016 DRLCMAC <0002> tbf.cpp:819 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN) timer 3169 expired. > Fri May 27 15:51:43 2016 DRLCMAC <0002> tbf.cpp:874 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN) T3169 timeout during transsmission > Fri May 27 15:51:43 2016 DRLCMAC <0002> tbf.cpp:893 - Assignment was on CCCH > Fri May 27 15:51:43 2016 DRLCMAC <0002> tbf.cpp:899 - No uplink data received yet > Fri May 27 15:51:43 2016 DRLCMAC <0002> tbf.cpp:879 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN) will be freed due to timeout > Fri May 27 15:51:43 2016 DRLCMAC <0002> tbf.cpp:334 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN) free Every element of the stack is running with today's revision on master (cheers for making it happen without specific branches by the way). With the same setup with osmo-pcu at d87e1d6ab747423d3668c74d16201a5d967accf0, I get solid data rates around 40 Kbits/s. I haven't seen anybody on the mailing list experiencing the same behavior, making me believe that it could be specific to osmo-bts-trx / osmo-trx users. Can somebody confirm or reproduce this attitude ? I will try to provide more logs and a pcap capture as soon as I get hands back on the hardware. From holger at freyther.de Fri May 27 18:17:59 2016 From: holger at freyther.de (Holger Freyther) Date: Fri, 27 May 2016 20:17:59 +0200 Subject: Regression in osmo-pcu with UHD trx ? In-Reply-To: <57486F94.2010202@diateam.net> References: <57486F94.2010202@diateam.net> Message-ID: <1E1383C7-81F2-4C58-A154-B0FF09C51305@freyther.de> > On 27 May 2016, at 18:02, Pierre Baudry wrote: > > Hi! > The latest "good" revision I am aware of is commit > d87e1d6ab747423d3668c74d16201a5d967accf0 (2015/12/14) > > I tried again today with commit 2fcfc29020c81891d7888ddc7ddbcd866bcd406d > (2016/05/24) and not a single handset could establish data communication > > Can somebody confirm or reproduce this attitude ? > > I will try to provide more logs and a pcap capture as soon as I get > hands back on the hardware. Can you bisect it? git bisect start git bisect bad 2fcfc29020c81891d7888ddc7ddbcd866bcd406d git bisect good d87e1d6ab747423d3668c74d16201a5d967accf0 Bisecting: 77 revisions left to test after this (roughly 6 steps) (separate commits should compile, so the above should be feasible). The commit range you have includes the move to EDGE that has changed GPRS code as well. holger From ruben.undheim at gmail.com Fri May 27 19:32:41 2016 From: ruben.undheim at gmail.com (Ruben Undheim) Date: Fri, 27 May 2016 21:32:41 +0200 Subject: libosmocore: patch for big-endian architectures In-Reply-To: <20160527114759.GA7867@dub6> References: <20160526191624.GA23739@macbookair> <20160527114759.GA7867@dub6> Message-ID: <20160527193241.GA5348@macbookair> > In short, first be logged in on osmocom.org, then go to gerrit sign-in and > enter this openid url: > https://osmocom.org/openid After struggling for some time I was finally able to logon and add the SSH key. I kept getting a blank window every time I tried to log in, but it worked in the end. But now I get: "Unable to negotiate with 144.76.43.76 port 29418: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1" Seems to be some compatibility issues with the SSH versions. > I agree that it's somewhat harder than pasting the patch into a mail, but it is > achievable ;) Hmm, it's probably achievable if you are planning on working on the project for some time, but for me who just want to provide a patch, it appeared to be a bit of a pain. :) I'm sure it's great when it works though! > Call again if you truly can't be bothered and I'll submit your patch for review > -- this once ;) Best regards, Ruben From holger at freyther.de Fri May 27 19:36:39 2016 From: holger at freyther.de (Holger Freyther) Date: Fri, 27 May 2016 21:36:39 +0200 Subject: libosmocore: patch for big-endian architectures In-Reply-To: <20160527193241.GA5348@macbookair> References: <20160526191624.GA23739@macbookair> <20160527114759.GA7867@dub6> <20160527193241.GA5348@macbookair> Message-ID: <2631D751-5655-4ECE-813C-6BF3D1D098F9@freyther.de> > On 27 May 2016, at 21:32, Ruben Undheim wrote: > >> In short, first be logged in on osmocom.org, then go to gerrit sign-in and >> enter this openid url: >> https://osmocom.org/openid > > After struggling for some time I was finally able to logon and add the SSH key. I kept > getting a blank window every time I tried to log in, but it worked in the end. > > But now I get: > > "Unable to negotiate with 144.76.43.76 port 29418: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1" > > > Seems to be some compatibility issues with the SSH versions. not yet on the main page, but if you are willing to create a .ssh/config entry Host gerrit.osmocom.org HostName gerrit.osmocom.org Port 29418 User yourusername KexAlgorithms +diffie-hellman-group1-sha1 IdentityFile ~/.ssh/id_rsa_gerrit.osmocom.org I will explore if gerrit supports more key exchange algorithms. holger From holger at freyther.de Fri May 27 19:39:10 2016 From: holger at freyther.de (Holger Freyther) Date: Fri, 27 May 2016 21:39:10 +0200 Subject: libosmocore: patch for big-endian architectures In-Reply-To: <2631D751-5655-4ECE-813C-6BF3D1D098F9@freyther.de> References: <20160526191624.GA23739@macbookair> <20160527114759.GA7867@dub6> <20160527193241.GA5348@macbookair> <2631D751-5655-4ECE-813C-6BF3D1D098F9@freyther.de> Message-ID: <2B47C35C-0CAC-4542-B4CB-CD8C93990FFF@freyther.de> > On 27 May 2016, at 21:36, Holger Freyther wrote: > > > > > I will explore if gerrit supports more key exchange algorithms. That was quick. Gerrit offers to download bouncy castle when installing, just that this one version can not be downloaded anymore and I didn't find a copy of that file. *yeah* to stable urls. It seemed to work just but now I have a reason spend more time on it. holger From holger at freyther.de Fri May 27 19:46:44 2016 From: holger at freyther.de (Holger Freyther) Date: Fri, 27 May 2016 21:46:44 +0200 Subject: libosmocore: patch for big-endian architectures In-Reply-To: <2B47C35C-0CAC-4542-B4CB-CD8C93990FFF@freyther.de> References: <20160526191624.GA23739@macbookair> <20160527114759.GA7867@dub6> <20160527193241.GA5348@macbookair> <2631D751-5655-4ECE-813C-6BF3D1D098F9@freyther.de> <2B47C35C-0CAC-4542-B4CB-CD8C93990FFF@freyther.de> Message-ID: <28E33D9A-6379-4C58-9C50-BE69FB30D789@freyther.de> > On 27 May 2016, at 21:39, Holger Freyther wrote: > > > That was quick. Gerrit offers to download bouncy castle when installing, just that this one version can not be downloaded anymore and I didn't find a copy of that file. *yeah* to stable urls. It seemed to work just but now I have a reason spend more time on it. Can you please try again? thank you holger From gerrit-no-reply at lists.osmocom.org Fri May 27 20:05:50 2016 From: gerrit-no-reply at lists.osmocom.org (Ruben Undheim) Date: Fri, 27 May 2016 20:05:50 +0000 Subject: [PATCH] libosmocore[master]: Patched structs for big-endian architectures Message-ID: Review at https://gerrit.osmocom.org/124 Patched structs for big-endian architectures Change-Id: I29eafe481e112d18c624b1c83add0d53c354dbe4 --- M include/osmocom/gsm/protocol/gsm_04_08.h 1 file changed, 160 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/24/124/1 diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index 4800b48..0c2fcf2 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -4,6 +4,8 @@ #include #include +#include + /* GSM TS 04.08 definitions */ struct gsm_lchan; @@ -42,6 +44,7 @@ } __attribute__ ((packed)); /* Chapter 10.5.2.1b.3 */ +#if OSMO_IS_LITTLE_ENDIAN == 1 struct gsm48_range_1024 { uint8_t w1_hi:2, f0:1, @@ -75,8 +78,44 @@ uint8_t w16:6, w15_lo:2; } __attribute__ ((packed)); +#else +struct gsm48_range_1024 { + uint8_t form_id:5, + f0:1, + w1_hi:2; + uint8_t w1_lo; + uint8_t w2_hi; + uint8_t w2_lo:1, + w3_hi:7; + uint8_t w3_lo:2, + w4_hi:6; + uint8_t w4_lo:2, + w5_hi:6; + uint8_t w5_lo:2, + w6_hi:6; + uint8_t w6_lo:2, + w7_hi:6; + uint8_t w7_lo:2, + w8_hi:6; + uint8_t w8_lo:1, + w9:7; + uint8_t w10:7, + w11_hi:1; + uint8_t w11_lo:6, + w12_hi:2; + uint8_t w12_lo:5, + w13_hi:3; + uint8_t w13_lo:4, + w14_hi:4; + uint8_t w14_lo:3, + w15_hi:5; + uint8_t w15_lo:2, + w16:6; +} __attribute__ ((packed)); +#endif /* Chapter 10.5.2.1b.4 */ +#if OSMO_IS_LITTLE_ENDIAN == 1 struct gsm48_range_512 { uint8_t orig_arfcn_hi:1, form_id:7; @@ -110,8 +149,44 @@ uint8_t w17:5, w16_lo:3; } __attribute__ ((packed)); +#else +struct gsm48_range_512 { + uint8_t form_id:7, + orig_arfcn_hi:1; + uint8_t orig_arfcn_mid; + uint8_t orig_arfcn_lo:1, + w1_hi:7; + uint8_t w1_lo:2, + w2_hi:6; + uint8_t w2_lo:2, + w3_hi:6; + uint8_t w3_lo:2, + w4_hi:6; + uint8_t w4_lo:1, + w5:7; + uint8_t w6:7, + w7_hi:1; + uint8_t w7_lo:6, + w8_hi:2; + uint8_t w8_lo:4, + w9_hi:4; + uint8_t w9_lo:2, + w10:6; + uint8_t w11:6, + w12_hi:2; + uint8_t w12_lo:4, + w13_hi:4; + uint8_t w13_lo:2, + w14:6; + uint8_t w15:6, + w16_hi:2; + uint8_t w16_lo:3, + w17:5; +} __attribute__ ((packed)); +#endif /* Chapter 10.5.2.1b.5 */ +#if OSMO_IS_LITTLE_ENDIAN == 1 struct gsm48_range_256 { uint8_t orig_arfcn_hi:1, form_id:7; @@ -151,8 +226,50 @@ w21:4, w20_lo:3; } __attribute__ ((packed)); +#else +struct gsm48_range_256 { + uint8_t form_id:7, + orig_arfcn_hi:1; + uint8_t orig_arfcn_mid; + uint8_t orig_arfcn_lo:1, + w1_hi:7; + uint8_t w1_lo:1, + w2:7; + uint8_t w3:7, + w4_hi:1; + uint8_t w4_lo:5, + w5_hi:3; + uint8_t w5_lo:3, + w6_hi:5; + uint8_t w6_lo:1, + w7:6, + w8_hi:1; + uint8_t w8_lo:4, + w9_hi:4; + uint8_t w9_lo:1, + w10:5, + w11_hi:2; + uint8_t w11_lo:3, + w12:5; + uint8_t w13:5, + w14_hi:3; + uint8_t w14_lo:2, + w15:5, + w16_hi:1; + uint8_t w16_lo:3, + w17:4, + w18_hi:1; + uint8_t w18_lo:3, + w19:4, + w20_hi:1; + uint8_t w20_lo:3, + w21:4, + spare:1; +} __attribute__ ((packed)); +#endif /* Chapter 10.5.2.1b.6 */ +#if OSMO_IS_LITTLE_ENDIAN == 1 struct gsm48_range_128 { uint8_t orig_arfcn_hi:1, form_id:7; @@ -194,6 +311,49 @@ w27:3, w26_lo:1; } __attribute__ ((packed)); +#else +struct gsm48_range_128 { + uint8_t form_id:7, + orig_arfcn_hi:1; + uint8_t orig_arfcn_mid; + uint8_t orig_arfcn_lo:1, + w1:7; + uint8_t w2:6, + w3_hi:2; + uint8_t w3_lo:4, + w4_hi:4; + uint8_t w4_lo:1, + w5:5, + w6_hi:2; + uint8_t w6_lo:3, + w7:5; + uint8_t w8:4, + w9:4; + uint8_t w10:4, + w11:4; + uint8_t w12:4, + w13:4; + uint8_t w14:4, + w15:4; + uint8_t w16:3, + w17:3, + w18_hi:2; + uint8_t w18_lo:1, + w19:3, + w20:3, + w21_hi:1; + uint8_t w21_lo:2, + w22:3, + w23:3; + uint8_t w24:3, + w25:3, + w26_hi:2; + uint8_t w26_lo:1, + w27:3, + w28:3, + spare:1; +} __attribute__ ((packed)); +#endif /* Chapter 10.5.2.1b.7 */ struct gsm48_var_bit { -- To view, visit https://gerrit.osmocom.org/124 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I29eafe481e112d18c624b1c83add0d53c354dbe4 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Ruben Undheim From ruben.undheim at gmail.com Fri May 27 20:11:22 2016 From: ruben.undheim at gmail.com (Ruben Undheim) Date: Fri, 27 May 2016 22:11:22 +0200 Subject: libosmocore: patch for big-endian architectures In-Reply-To: <28E33D9A-6379-4C58-9C50-BE69FB30D789@freyther.de> References: <20160526191624.GA23739@macbookair> <20160527114759.GA7867@dub6> <20160527193241.GA5348@macbookair> <2631D751-5655-4ECE-813C-6BF3D1D098F9@freyther.de> <2B47C35C-0CAC-4542-B4CB-CD8C93990FFF@freyther.de> <28E33D9A-6379-4C58-9C50-BE69FB30D789@freyther.de> Message-ID: <20160527201122.GA6010@macbookair> > Can you please try again? Thanks! I was able to push. As I said, it's great when it works! Since my key is now in there, next time will be a lot easier. Cheers Ruben From holger at freyther.de Fri May 27 20:13:35 2016 From: holger at freyther.de (Holger Freyther) Date: Fri, 27 May 2016 22:13:35 +0200 Subject: libosmocore: patch for big-endian architectures In-Reply-To: <20160527201122.GA6010@macbookair> References: <20160526191624.GA23739@macbookair> <20160527114759.GA7867@dub6> <20160527193241.GA5348@macbookair> <2631D751-5655-4ECE-813C-6BF3D1D098F9@freyther.de> <2B47C35C-0CAC-4542-B4CB-CD8C93990FFF@freyther.de> <28E33D9A-6379-4C58-9C50-BE69FB30D789@freyther.de> <20160527201122.GA6010@macbookair> Message-ID: > On 27 May 2016, at 22:11, Ruben Undheim wrote: > > >> Can you please try again? > > Thanks! I was able to push. As I said, it's great when it works! Since my key is > now in there, next time will be a lot easier. yes, sorry it was not as smooth as it could have been. I will CC you on the debian package changes when merging your work into our repository. have a nice weekend holger From sipos.csaba at kvk.uni-obuda.hu Sat May 28 13:57:17 2016 From: sipos.csaba at kvk.uni-obuda.hu (Sipos Csaba) Date: Sat, 28 May 2016 15:57:17 +0200 (CEST) Subject: Regression in osmo-pcu with UHD trx ? In-Reply-To: <57486F94.2010202@diateam.net> References: <57486F94.2010202@diateam.net> Message-ID: <609104510.1105721.1464443837788.JavaMail.zimbra@kvk.uni-obuda.hu> Dear Pierre, I am interested in this topic, I am abroad at the moment, but in a weeks time I will be able to test it. To point out a similar case, I had almost the same issue with OpenBTS and its "own" transceiver, which was also created by Tom Tsou but it was not the Osmo-TRX. The behavior was pretty much the same: after the IMM_ASS the UE is sending the Packet Resource Request, but the BTS never receives it and the T3168 timeout happens. It was kinda hard to reproduce it, and we never found the root cause.There was some suspition that the USRP SDR is somehow misses to detect the PRR, as nothing was sent to the upper layers. Here you can find detailed protocol traces (wireshark and QXDM) and description of what we found: https://github.com/RangeNetworks/openbts/issues/8 Regards, Csaba ----- Eredeti ?zenet ----- Felad?: "Pierre Baudry" C?mzett: openbsc at lists.osmocom.org Elk?ld?tt ?zenetek: P?ntek, 2016. M?jus 27. 18:02:28 T?rgy: Regression in osmo-pcu with UHD trx ? Hi all, I have a Osmocom setup running with a Ettus B200 I noticed that since several weeks that osmo-pcu did not work as good as previously. The latest "good" revision I am aware of is commit d87e1d6ab747423d3668c74d16201a5d967accf0 (2015/12/14) I tried again today with commit 2fcfc29020c81891d7888ddc7ddbcd866bcd406d (2016/05/24) and not a single handset could establish data communication Reading osmo-pcu logs show that T6169 timeouts during TBF assignment : > Fri May 27 15:51:38 2016 DRLCMAC <0002> bts.cpp:479 MS requests UL TBF on RACH, so we provide one: > Fri May 27 15:51:38 2016 DRLCMAC <0002> tbf.cpp:672 ********** TBF starts here ********** > Fri May 27 15:51:38 2016 DRLCMAC <0002> tbf.cpp:674 Allocating UL TBF: MS_CLASS=0/0 > Fri May 27 15:51:38 2016 DRLCMAC <0002> gprs_ms.cpp:114 Creating MS object, TLLI = 0x00000000 > Fri May 27 15:51:38 2016 DRLCMAC <0002> bts.cpp:407 Searching for first unallocated TFI: TRX=0 > Fri May 27 15:51:38 2016 DRLCMAC <0002> bts.cpp:417 Found TFI=0. > Fri May 27 15:51:38 2016 DRLCMAC <0002> gprs_rlcmac_ts_alloc.cpp:525 Slot Allocation (Algorithm B) for unknown class (assuming 12) > Fri May 27 15:51:38 2016 DRLCMAC <0002> gprs_rlcmac_ts_alloc.cpp:560 - Rx=4 Tx=4 Sum Rx+Tx=5 Tta=2 Ttb=1 Tra=2 Trb=1 Type=1 > Fri May 27 15:51:38 2016 DRLCMAC <0002> gprs_rlcmac_ts_alloc.cpp:157 - Skipping TS 0, because not enabled > Fri May 27 15:51:38 2016 DRLCMAC <0002> gprs_rlcmac_ts_alloc.cpp:579 - Possible DL/UL slots: (TS=0)".CCCCCCC"(TS=7) > Fri May 27 15:51:38 2016 DRLCMAC <0002> gprs_rlcmac_ts_alloc.cpp:940 - Selected UL slots: (TS=0)"...U...."(TS=7), single > Fri May 27 15:51:38 2016 DRLCMAC <0002> gprs_rlcmac_ts_alloc.cpp:966 Using single slot at TS 3 for UL > Fri May 27 15:51:38 2016 DRLCMAC <0002> gprs_rlcmac_ts_alloc.cpp:990 - Reserved DL/UL slots: (TS=0)"...C...."(TS=7) > Fri May 27 15:51:38 2016 DRLCMAC <0002> gprs_rlcmac_ts_alloc.cpp:1017 - Assigning UL TS 3 > Fri May 27 15:51:38 2016 DRLCMAC <0002> bts.cpp:1481 PDCH(TS 3, TRX 0): Attaching TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL), 1 TBFs, USFs = 01, TFIs = 00000001. > Fri May 27 15:51:38 2016 DRLCMAC <0002> tbf.cpp:385 - Setting Control TS 3 > Fri May 27 15:51:38 2016 DRLCMAC <0002> gprs_ms.cpp:267 Attaching TBF to MS object, TLLI = 0x00000000, TBF = TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) > Fri May 27 15:51:38 2016 DRLCMAC <0002> tbf.cpp:625 Allocated TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL): trx = 0, ul_slots = 08, dl_slots = 00 > Fri May 27 15:51:38 2016 DRLCMAC <0002> ./tbf.h:291 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to FLOW > Fri May 27 15:51:38 2016 DRLCMAC <0002> tbf.cpp:409 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) starting timer 3169. > Fri May 27 15:51:38 2016 DRLCMAC <0002> bts.cpp:523 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) [UPLINK] START > Fri May 27 15:51:38 2016 DRLCMAC <0002> bts.cpp:527 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) RX: [PCU <- BTS] RACH qbit-ta=0 ra=0x7b, Fn=1607859 (28,33,19) > Fri May 27 15:51:38 2016 DRLCMAC <0002> bts.cpp:529 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) TX: START Immediate Assignment Uplink (AGCH) > Fri May 27 15:51:38 2016 DRLCMAC <0002> bts.cpp:542 - TRX=0 (128) TS=3 TA=0 TSC=3 TFI=0 USF=0 > Fri May 27 15:51:38 2016 DRLCMAC <0002> ./tbf.h:291 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=FLOW) changes state from FLOW to WAIT ASSIGN > Fri May 27 15:51:43 2016 DRLCMAC <0002> tbf.cpp:819 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN) timer 3169 expired. > Fri May 27 15:51:43 2016 DRLCMAC <0002> tbf.cpp:874 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN) T3169 timeout during transsmission > Fri May 27 15:51:43 2016 DRLCMAC <0002> tbf.cpp:893 - Assignment was on CCCH > Fri May 27 15:51:43 2016 DRLCMAC <0002> tbf.cpp:899 - No uplink data received yet > Fri May 27 15:51:43 2016 DRLCMAC <0002> tbf.cpp:879 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN) will be freed due to timeout > Fri May 27 15:51:43 2016 DRLCMAC <0002> tbf.cpp:334 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN) free Every element of the stack is running with today's revision on master (cheers for making it happen without specific branches by the way). With the same setup with osmo-pcu at d87e1d6ab747423d3668c74d16201a5d967accf0, I get solid data rates around 40 Kbits/s. I haven't seen anybody on the mailing list experiencing the same behavior, making me believe that it could be specific to osmo-bts-trx / osmo-trx users. Can somebody confirm or reproduce this attitude ? I will try to provide more logs and a pcap capture as soon as I get hands back on the hardware. From gerrit-no-reply at lists.osmocom.org Sat May 28 16:55:33 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 28 May 2016 16:55:33 +0000 Subject: [PATCH] libosmocore[master]: Fixing build on Mac OSX Message-ID: Review at https://gerrit.osmocom.org/125 Fixing build on Mac OSX Fix minor syntax error Change-Id: I67f9a1e41fa5b1da3a4b10fc76138e153b767241 --- M include/osmocom/core/endian.h 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/25/125/1 diff --git a/include/osmocom/core/endian.h b/include/osmocom/core/endian.h index 02c6406..ae133c3 100644 --- a/include/osmocom/core/endian.h +++ b/include/osmocom/core/endian.h @@ -28,7 +28,7 @@ #if defined(__DARWIN_LITTLE_ENDIAN) #define OSMO_IS_LITTLE_ENDIAN 1 #define OSMO_IS_BIG_ENDIAN 0 - #elif define(__DARWIN_BIG_ENDIAN) + #elif defined(__DARWIN_BIG_ENDIAN) #define OSMO_IS_LITTLE_ENDIAN 0 #define OSMO_IS_BIG_ENDIAN 1 #else -- To view, visit https://gerrit.osmocom.org/125 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I67f9a1e41fa5b1da3a4b10fc76138e153b767241 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Sat May 28 16:59:47 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 28 May 2016 16:59:47 +0000 Subject: libosmocore[master]: Fixing build on Mac OSX In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/125 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I67f9a1e41fa5b1da3a4b10fc76138e153b767241 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Sat May 28 16:59:57 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Sat, 28 May 2016 16:59:57 +0000 Subject: [MERGED] libosmocore[master]: Fixing build on Mac OSX In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: Fixing build on Mac OSX ...................................................................... Fixing build on Mac OSX Fix minor syntax error Change-Id: I67f9a1e41fa5b1da3a4b10fc76138e153b767241 Reviewed-on: https://gerrit.osmocom.org/125 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M include/osmocom/core/endian.h 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/include/osmocom/core/endian.h b/include/osmocom/core/endian.h index 02c6406..ae133c3 100644 --- a/include/osmocom/core/endian.h +++ b/include/osmocom/core/endian.h @@ -28,7 +28,7 @@ #if defined(__DARWIN_LITTLE_ENDIAN) #define OSMO_IS_LITTLE_ENDIAN 1 #define OSMO_IS_BIG_ENDIAN 0 - #elif define(__DARWIN_BIG_ENDIAN) + #elif defined(__DARWIN_BIG_ENDIAN) #define OSMO_IS_LITTLE_ENDIAN 0 #define OSMO_IS_BIG_ENDIAN 1 #else -- To view, visit https://gerrit.osmocom.org/125 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I67f9a1e41fa5b1da3a4b10fc76138e153b767241 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Mon May 30 07:56:07 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Mon, 30 May 2016 07:56:07 +0000 Subject: libosmocore[master]: Add strings with PH primitive names In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+1 Test, please ignore. -- To view, visit https://gerrit.osmocom.org/117 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id7a6d478fd725c51f54ad746bdf9b9095579ff77 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From pierre.baudry at diateam.net Mon May 30 08:49:50 2016 From: pierre.baudry at diateam.net (Pierre Baudry) Date: Mon, 30 May 2016 10:49:50 +0200 Subject: Regression in osmo-pcu with UHD trx ? In-Reply-To: <1E1383C7-81F2-4C58-A154-B0FF09C51305@freyther.de> References: <57486F94.2010202@diateam.net> <1E1383C7-81F2-4C58-A154-B0FF09C51305@freyther.de> Message-ID: <574BFEAE.90805@diateam.net> On 27/05/2016 20:17, Holger Freyther wrote: > Can you bisect it? > > git bisect start > git bisect bad 2fcfc29020c81891d7888ddc7ddbcd866bcd406d > git bisect good d87e1d6ab747423d3668c74d16201a5d967accf0 > Bisecting: 77 revisions left to test after this (roughly 6 steps) > > (separate commits should compile, so the above should be feasible). The commit range you have includes the move to EDGE that has changed GPRS code as well. > > holger > Sure, here is the bisect log : > git bisect start > # bad: [2fcfc29020c81891d7888ddc7ddbcd866bcd406d] add comments to describe functions > git bisect bad 2fcfc29020c81891d7888ddc7ddbcd866bcd406d > # good: [d87e1d6ab747423d3668c74d16201a5d967accf0] rlc: Do not raise_v_q in receive_bsn > git bisect good d87e1d6ab747423d3668c74d16201a5d967accf0 > # good: [0df80be95e3604656ff36024f793ef3c36455051] rlc: Add decode_gsm_ra_cap to decode Radio Access Caps > git bisect good 0df80be95e3604656ff36024f793ef3c36455051 > # bad: [7f28c97fcc87d2ce773a2ae91579a84b40d12539] edge: Support all coding schemes for BSSGP flow control > git bisect bad 7f28c97fcc87d2ce773a2ae91579a84b40d12539 > # good: [18831c3ca94b8cfcdb64a883d88d22404d7c28bd] encoding: Refactor write_immediate_assignment > git bisect good 18831c3ca94b8cfcdb64a883d88d22404d7c28bd > # bad: [215e18c9d45cdaa43705ae7c8f8cb43c0db28225] cs: Add GprsCodingScheme::optionalPaddingBits > git bisect bad 215e18c9d45cdaa43705ae7c8f8cb43c0db28225 > # good: [7c72acaa941fd7f3663b0f9b36fe30f4974f1979] ms: Add current_pacch_slots method > git bisect good 7c72acaa941fd7f3663b0f9b36fe30f4974f1979 > # bad: [9e8593917f3e301c3487f73430ce416a08360ce8] rlc: Support encoding of EGPRS header type 1 + 2 > git bisect bad 9e8593917f3e301c3487f73430ce416a08360ce8 > # bad: [f1a7b8fc6651f92a8b7f3f27b7ca05d07f4e44e0] tbf: Add state WAIT_ASSIGN > git bisect bad f1a7b8fc6651f92a8b7f3f27b7ca05d07f4e44e0 > # first bad commit: [f1a7b8fc6651f92a8b7f3f27b7ca05d07f4e44e0] tbf: Add state WAIT_ASSIGN I experienced other service disruptions while bisecting this, but let's address this specific bug first :) From msuraev at sysmocom.de Mon May 30 09:34:44 2016 From: msuraev at sysmocom.de (Max) Date: Mon, 30 May 2016 11:34:44 +0200 Subject: osmo-sip-connector Message-ID: <574C0934.20901@sysmocom.de> Hi. Anyone used $subj? If so, with which SIP servers? Could you share respective sip server configuration samples? -- Max Suraev http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Geschaeftsfuehrer / Managing Directors: Holger Freyther, Harald Welte From gerrit-no-reply at lists.osmocom.org Mon May 30 10:08:33 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 30 May 2016 10:08:33 +0000 Subject: libosmocore[master]: Patched structs for big-endian architectures In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 (1 comment) It's all correct (compared visually). Not sure if the whitespace is a reason to re-edit, so just +1 for now. https://gerrit.osmocom.org/#/c/124/1/include/osmocom/gsm/protocol/gsm_04_08.h File include/osmocom/gsm/protocol/gsm_04_08.h: Line 83: uint8_t form_id:5, the whitespace pattern used above is "uint8_tw1_hi" and then "f0". I completely dislike the whitespace scheme used here anyway, but this introduces yet another weird ws pattern ;) (I do see that it follows from just swapping the lines) -- To view, visit https://gerrit.osmocom.org/124 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I29eafe481e112d18c624b1c83add0d53c354dbe4 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Ruben Undheim Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From nhofmeyr at sysmocom.de Mon May 30 10:20:20 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Mon, 30 May 2016 12:20:20 +0200 Subject: [osmocom/libosmocore] Fixing build on Mac OSX (#3) In-Reply-To: References: Message-ID: <20160530102020.GA1902@dub6> On Sun, May 29, 2016 at 09:23:21PM -0700, tsaitgaist wrote: > GitHub is only used to mirror [osmocom projects](http://git.osmocom.org/). Please use the [mailing lists](https://lists.osmocom.org/mailman/listinfo) to [submit patches](http://projects.osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards#Submitting-Patches). We could reword this to avoid mentioning the ML by being generic in the wording (in case we want to switch to other systems in the future), and to be more encouraging: "Thank you for your patch submission! Unfortunately GitHub is only used to mirror [osmocom projects](http://git.osmocom.org/). Please follow [these instructions](http://projects.osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards#Submitting-Patches) to submit patches instead. Thanks!" ~Neels -- - Neels Hofmeyr http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Gesch?ftsf?hrer / Managing Directors: Holger Freyther, Harald Welte -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From nhofmeyr at sysmocom.de Mon May 30 10:39:28 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Mon, 30 May 2016 12:39:28 +0200 Subject: libosmocore: patch for big-endian architectures In-Reply-To: <20160527193241.GA5348@macbookair> References: <20160526191624.GA23739@macbookair> <20160527114759.GA7867@dub6> <20160527193241.GA5348@macbookair> Message-ID: <20160530103928.GB1902@dub6> On Fri, May 27, 2016 at 09:32:41PM +0200, Ruben Undheim wrote: > > I agree that it's somewhat harder than pasting the patch into a mail, but it is > > achievable ;) > > Hmm, it's probably achievable if you are planning on working on the project for > some time, but for me who just want to provide a patch, it appeared to be a bit > of a pain. :) I'm sure it's great when it works though! My humble opinion for the last time: gerrit has overly complicated nearly every aspect of working on the code. The web ui is bloated and cumbersome to navigate, and every commit and push needs goofy hacks just for gerrit :( It does add handy features of tracking patches and managing reviews, yet it kind of removes the concept of patch-set grouping. Of course, the integrated jenkins build is excellent to have (though would be sufficient after pushing). I submit to the community's decision to use gerrit, and I don't think it would be worth the trouble to switch yet again (if I'm the only one moaning), but I wouldn't introduce gerrit a second time. End-Of-Rant for all eternity ;) ~Neels -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From holger at freyther.de Mon May 30 10:44:43 2016 From: holger at freyther.de (Holger Freyther) Date: Mon, 30 May 2016 12:44:43 +0200 Subject: osmo-sip-connector In-Reply-To: <574C0934.20901@sysmocom.de> References: <574C0934.20901@sysmocom.de> Message-ID: <503F6909-0622-4CFB-A35A-5A1653F9E48C@freyther.de> > On 30 May 2016, at 11:34, Max wrote: > > Hi. Hi, > Anyone used $subj? If so, with which SIP servers? Could you share > respective sip server configuration samples? I have done development against the Zoiper SIP Phone, one user is using it with Yate. There is an example configuration in the repository (doc/examples/osmo-sip-connector.cfg). You mostly need to add the source IP/source port and dest IP/dest port. Sadly Sofia SIP forces us to enter an IP instead of using 0.0.0.0 for the bind (as otherwise the INVITE includes no valid ip as contact..). Optionally you can set if the IMSI or MSISDN should be used as identifier. holger From Saurabh.Sharan at radisys.com Mon May 30 09:58:27 2016 From: Saurabh.Sharan at radisys.com (Saurabh Sharan) Date: Mon, 30 May 2016 09:58:27 +0000 Subject: Regression in osmo-pcu with UHD trx ? Message-ID: > Date: Fri, 27 May 2016 18:02:28 +0200 > From: Pierre Baudry > I noticed that since several weeks that osmo-pcu did not work as good as > previously. Yes we have also seen similar failures for GPRS calls in the osmo-pcu. Our setup uses NuRAN hardware with osmo-bts-sysmo > The latest "good" revision I am aware of is commit > d87e1d6ab747423d3668c74d16201a5d967accf0 (2015/12/14) This is a useful information for us that the above mentioned commit works for GPRS. > Can somebody confirm or reproduce this attitude ? The PCU log that we have during failure matches with the one you have reported. We have tried a workaround for this GPRS call failure by forcing two-phase-access in osmo-pcu.cfg. Based on our analysis done till now it seems One phase access of GPRS is broken. > I will try to provide more logs and a pcap capture as soon as I get > hands back on the hardware. It will be quite useful to narrow down the issue, so please share the relevant logs collected Regards Saurabh From gerrit-no-reply at lists.osmocom.org Mon May 30 11:40:12 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 30 May 2016 11:40:12 +0000 Subject: [PATCH] osmo-sip-connector[master]: ifirst reandom change Message-ID: Review at https://gerrit.osmocom.org/126 ifirst reandom change Change-Id: I2b2beffdefd46876ad612ae0ad1f7c6057157392 --- M README.asciidoc 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/26/126/1 diff --git a/README.asciidoc b/README.asciidoc index acd491b..5b6b6df 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -32,3 +32,7 @@ * AMR SDP file doesn't include the mode-set params and allowed codec modes. This needs to be configured in some way. + + + +RANDOM change.. -- To view, visit https://gerrit.osmocom.org/126 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2b2beffdefd46876ad612ae0ad1f7c6057157392 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Mon May 30 11:40:13 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 30 May 2016 11:40:13 +0000 Subject: [PATCH] osmo-sip-connector[master]: Second random change Message-ID: Review at https://gerrit.osmocom.org/127 Second random change Change-Id: I01e9ce184d0b98f89e3ccdfabe2d3c95a0a8d939 --- M doc/examples/osmo-sip-connector.cfg 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/27/127/1 diff --git a/doc/examples/osmo-sip-connector.cfg b/doc/examples/osmo-sip-connector.cfg index ad42969..df71332 100644 --- a/doc/examples/osmo-sip-connector.cfg +++ b/doc/examples/osmo-sip-connector.cfg @@ -2,5 +2,6 @@ mncc socket-path /tmp/bsc_mncc sip +! color of .. local 0.0.0.0 5060 remote pbx 5060 -- To view, visit https://gerrit.osmocom.org/127 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I01e9ce184d0b98f89e3ccdfabe2d3c95a0a8d939 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Owner: Holger Freyther From gerrit-no-reply at lists.osmocom.org Mon May 30 11:41:07 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 30 May 2016 11:41:07 +0000 Subject: osmo-sip-connector[master]: ifirst reandom change In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 ignore -- To view, visit https://gerrit.osmocom.org/126 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2b2beffdefd46876ad612ae0ad1f7c6057157392 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon May 30 11:41:24 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 30 May 2016 11:41:24 +0000 Subject: osmo-sip-connector[master]: Second random change In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 Verified+1 ignore -- To view, visit https://gerrit.osmocom.org/127 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I01e9ce184d0b98f89e3ccdfabe2d3c95a0a8d939 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-HasComments: No From holger at freyther.de Mon May 30 11:56:08 2016 From: holger at freyther.de (Holger Freyther) Date: Mon, 30 May 2016 13:56:08 +0200 Subject: Gerrit and branches (Was: Re: libosmocore: patch for big-endian architectures) In-Reply-To: <20160530103928.GB1902@dub6> References: <20160526191624.GA23739@macbookair> <20160527114759.GA7867@dub6> <20160527193241.GA5348@macbookair> <20160530103928.GB1902@dub6> Message-ID: <84A6B17B-B124-4A98-9A23-FA9653B14294@freyther.de> > On 30 May 2016, at 12:39, Neels Hofmeyr wrote: > > > My humble opinion for the last time: gerrit has overly complicated nearly every > aspect of working on the code. The web ui is bloated and cumbersome to > navigate, and every commit and push needs goofy hacks just for gerrit :( Can you elaborate? What are the goofy hacks? There is the sign-up (but compared to two days of SSL issues to submit emails) OpenID + username + setting ssh key is more quick? And then to download the hook to generate a Change-Id on commits? > It does add handy features of tracking patches and managing reviews, yet it > kind of removes the concept of patch-set grouping. Of course, the integrated > jenkins build is excellent to have (though would be sufficient after pushing). The main advantages for a reviewer: * I don't have to look at stuff that doesn't compile * I don't have to see if I need to download the mbox or the patch * I can easily submit the resulting change In fact reviewing has been more pleasant for me than before (besides the pain of having to wrangle with Java and doing a FreeBSD port of buck to build and debug it) > > I submit to the community's decision to use gerrit, and I don't think it would > be worth the trouble to switch yet again (if I'm the only one moaning), but I > wouldn't introduce gerrit a second time. For patch-series: Either way, sending a 40 patches en-block is not well received. This wouldn't be any better with git dump-email. ;) > End-Of-Rant for all eternity ;) Besides the smiley I think you could have been more constructive, e.g you have admin rights and shell access to the system and I have already pointed you to the "Submit Type" in the project settings. Did you have a look at it to see if for your workflow we are using the wrong "type"? In osmo-sip-connector.git I changed from cherry-oick to always merge (probably fast-forward is closer to what we want in our change history) and pushed two changes. The last patch can be seen here https://gerrit.osmocom.org/#/c/127/1. It shows "Related changes" for both of them and for the second (and probably third) it has "Submitted Together" that shows my entire "series". After +2/+1 on them I have a button called "Submit including parents". Is this closer to what you want? I have picked "Cherry Pick" as many times there is a patch series but only a few commits are actually ready to be merged. To reduce work it seemed good to accept the raisins more quickly. cheers holger From gerrit-no-reply at lists.osmocom.org Mon May 30 14:04:53 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 30 May 2016 14:04:53 +0000 Subject: [PATCH] openbsc[master]: sgsn: fix use of libosmocore GPRS encryption plugins from LL... Message-ID: Review at https://gerrit.osmocom.org/128 sgsn: fix use of libosmocore GPRS encryption plugins from LLC layer Instead of passing the uint64_t kc bytes wrongly interpreted as memory address, pass its actual kc bytes by casting via (uint8_t*)&kc. Change-Id: I1f1b7454a0de5b7f4734aca4d03dbe67db5de189 --- M openbsc/src/gprs/gprs_llc.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/28/128/1 diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c index 4cf5163..e3c0726 100644 --- a/openbsc/src/gprs/gprs_llc.c +++ b/openbsc/src/gprs/gprs_llc.c @@ -417,7 +417,7 @@ /* Compute the keystream that we need to XOR with the data */ rc = gprs_cipher_run(cipher_out, crypt_len, lle->llme->algo, - kc, iv, GPRS_CIPH_SGSN2MS); + (uint8_t*)&kc, iv, GPRS_CIPH_SGSN2MS); if (rc < 0) { LOGP(DLLC, LOGL_ERROR, "Error crypting UI frame: %d\n", rc); msgb_free(msg); @@ -623,7 +623,7 @@ iv = gprs_cipher_gen_input_ui(iov_ui, lle->sapi, llhp.seq_tx, lle->oc_ui_recv); rc = gprs_cipher_run(cipher_out, crypt_len, lle->llme->algo, - kc, iv, GPRS_CIPH_MS2SGSN); + (uint8_t*)&kc, iv, GPRS_CIPH_MS2SGSN); if (rc < 0) { LOGP(DLLC, LOGL_ERROR, "Error decrypting frame: %d\n", rc); -- To view, visit https://gerrit.osmocom.org/128 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1f1b7454a0de5b7f4734aca4d03dbe67db5de189 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Mon May 30 14:05:49 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Mon, 30 May 2016 14:05:49 +0000 Subject: openbsc[master]: sgsn: fix use of libosmocore GPRS encryption plugins from LL... In-Reply-To: References: Message-ID: Patch Set 1: I am not sure how to test this patch. It is entirely untested. -- To view, visit https://gerrit.osmocom.org/128 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1f1b7454a0de5b7f4734aca4d03dbe67db5de189 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From nhofmeyr at sysmocom.de Mon May 30 16:56:53 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Mon, 30 May 2016 18:56:53 +0200 Subject: Gerrit and branches (Was: Re: libosmocore: patch for big-endian architectures) In-Reply-To: <84A6B17B-B124-4A98-9A23-FA9653B14294@freyther.de> References: <20160526191624.GA23739@macbookair> <20160527114759.GA7867@dub6> <20160527193241.GA5348@macbookair> <20160530103928.GB1902@dub6> <84A6B17B-B124-4A98-9A23-FA9653B14294@freyther.de> Message-ID: <20160530165653.GA4555@dub6> On Mon, May 30, 2016 at 01:56:08PM +0200, Holger Freyther wrote: > Can you elaborate? What are the goofy hacks? Before it was just git, now gerrit has its tag on near everything I do with the code. I wish gerrit were less visible: - add gerrit remote - two upstream repos to sync to (origin and gerrit) - gitk shows every branch twice, once for each remote - checking out a new branch is more complex; because of two remotes, one needs to use the full 'git co -b --track /' instead of just 'git co -b ' (I could probably work with just the gerrit remote, but then I wouldn't see what our public master repositories are up to) - commit id. I can't just clone, I have to do extra cycles for each clone. - access rules = obstructed access to branches = add 'users/' to all private branches = we have scores of old branches now in a namespace we can't use anymore - elaborate command line args instead of simple pushes Things just got so much more noisy on the git end. > In fact reviewing has been more pleasant for me than before (besides the pain of having to wrangle with Java and doing a FreeBSD port of buck to build and debug it) ok, that's a good thing. My position + smiley means: I found it a hard process but it works the way it is now; I'd have liked gerrit to be less visible in the daily workflows, but whatever. If it's better for your reviewing, it's an improvement. > For patch-series: Either way, sending a 40 patches en-block is not well received. This wouldn't be any better with git dump-email. ;) It doesn't make much sense to split the IuPS dev into separate bits... The branch makes sense as a whole. This is not a typical patch submission, right? Subdividing would be artificial, but ok, can do, if that helps reviewing. > Besides the smiley I think you could have been more constructive, e.g you have admin rights and shell access to the system and I have already pointed you to the "Submit Type" in the project settings. Did you have a look at it to see if for your workflow we are using the wrong "type"? I've spent enough time on gerrit overhead. Do I have to understand this? At least I would prefer not to, to use my resources for the tasks "piling up on my desk" instead. > In osmo-sip-connector.git I changed from cherry-oick to always merge (probably fast-forward is closer to what we want in our change history) and pushed two changes. The last patch can be seen here https://gerrit.osmocom.org/#/c/127/1. yes, that kind of makes sense, but how does this work. I go to the website, reconfigure the project, submit my branch so it comes in as and then configure the project back to what it was? :P What was your , "always merge"? Well, as I said, I hope I don't need to explore that right now... Please confirm that I should/can just push the first handful of IuPS changes to for/master. ~Neels -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From holger at freyther.de Mon May 30 19:00:05 2016 From: holger at freyther.de (Holger Freyther) Date: Mon, 30 May 2016 21:00:05 +0200 Subject: Gerrit and branches (Was: Re: libosmocore: patch for big-endian architectures) In-Reply-To: <20160530165653.GA4555@dub6> References: <20160526191624.GA23739@macbookair> <20160527114759.GA7867@dub6> <20160527193241.GA5348@macbookair> <20160530103928.GB1902@dub6> <84A6B17B-B124-4A98-9A23-FA9653B14294@freyther.de> <20160530165653.GA4555@dub6> Message-ID: <7B348B51-2B98-42D4-A1FA-2D3BD89DD13D@freyther.de> > On 30 May 2016, at 18:56, Neels Hofmeyr wrote: > > > On Mon, May 30, 2016 at 01:56:08PM +0200, Holger Freyther wrote: >> Can you elaborate? What are the goofy hacks? > > Before it was just git, now gerrit has its tag on near everything I do with the > code. I wish gerrit were less visible: > > - add gerrit remote > - two upstream repos to sync to (origin and gerrit) Do you know you can directly clone from ssh (one command)? You can also define one _remote_ and have different pull/push urls (okay would require post-clone work but maybe a script)? > - gitk shows every branch twice, once for each remote > - checking out a new branch is more complex; because of two remotes, one > needs to use the full 'git co -b --track /' > instead of just 'git co -b ' > (I could probably work with just the gerrit remote, but then I wouldn't > see what our public master repositories are up to) > - commit id. I can't just clone, I have to do extra cycles for each clone. Okay, maybe a clone script? I assume you have one already? Yes, a small change in workflow but should be manageable? git config remote.origin.pushurl ssh://:29418/.git git config remote.origin.push refs/heads/*:refs/for/* git push origin imaginary script (typos..): $ cat git gerrit-clone git://git.osmocom.org/libosmocore #!/bin/sh set -e git clone $1 cd `basename $1 git` git config remote.origin.pushurl ... git config remote.origin.push.. scp .. .git/hooks echo "tada" yes, a change in muscle memory. When cloning you have to remember your gerrit username and that the repository was using gerrit. But from daily workflow it doesn't look that bad? Either way you have to make the mental decision if you push a wip branch or if you want to have review. > - access rules = obstructed access to branches = add 'users/' to all private branches > = we have scores of old branches now in a namespace we can't use anymore Then let's create one group like you did and allow everything for that group again? So one manual intervention and one can push to everything again. No issue with that. > - elaborate command line args instead of simple pushes > > Things just got so much more noisy on the git end. Can you try with the above options? Does it make more natural again? >> For patch-series: Either way, sending a 40 patches en-block is not well received. This wouldn't be any better with git dump-email. ;) > > It doesn't make much sense to split the IuPS dev into separate bits... > The branch makes sense as a whole. This is not a typical patch submission, > right? > > Subdividing would be artificial, but ok, can do, if that helps reviewing. Nobody will review 40 patches with full mental power. I didn't peek at the branch yet but I assume there are some general changes to the structure first, or adding Iu support first before using it? So start with something one can review within 30 minutes? > I've spent enough time on gerrit overhead. Do I have to understand this? At > least I would prefer not to, to use my resources for the tasks "piling up on my > desk" instead. We are stronger together. I certainly don't know everything about gerrit, I have not looked at which submit type makes the most sense for us, I picked one that looked reasonable (from allowing to pick patches of a series because we are picky). So try fast-forward only or merge or rebase if necessary. :) >> In osmo-sip-connector.git I changed from cherry-oick to always merge (probably fast-forward is closer to what we want in our change history) and pushed two changes. The last patch can be seen here https://gerrit.osmocom.org/#/c/127/1. > > yes, that kind of makes sense, but how does this work. I go to the website, > reconfigure the project, submit my branch so it comes in as and then > configure the project back to what it was? :P > > What was your , "always merge"? > Well, as I said, I hope I don't need to explore that right now... > > Please confirm that I should/can just push the first handful of IuPS changes to > for/master. Under Projects -> "openbsc.git" change it to "Rebase if necessary" and give it a small try (push a slightly outdated commit so we can see From ruben.undheim at gmail.com Mon May 30 19:27:11 2016 From: ruben.undheim at gmail.com (Ruben Undheim) Date: Mon, 30 May 2016 21:27:11 +0200 Subject: Closing the gap between official debian and our nightly builds In-Reply-To: <7ADEB389-EB83-4ABA-978D-DB703EA6B7DE@freyther.de> References: <20160526053015.GA20541@macbookair> <20160526190741.GA23070@macbookair> <7ADEB389-EB83-4ABA-978D-DB703EA6B7DE@freyther.de> Message-ID: <20160530192711.GA2745@macbookair> Hi Holger, It went very quickly this time. osmo-bts was accepted into Debian before I got the time to tell you that it had been uploaded!: https://tracker.debian.org/pkg/osmo-bts Now is the time to make a new tag if you want something more fresh in there. Then both openbsc, osmo-bts and osmo-trx are in Debian making it possible to have a complete base station with an "apt get". One test case fails ("bursts") for the architecture ppc64el. Unfortunately I forgot to add the code snippet to d/rules which dumps out the test case log. https://buildd.debian.org/status/fetch.php?pkg=osmo-bts&arch=ppc64el&ver=0.4.0-1&stamp=1464609337 Best regards, Ruben On Thu, May 26, 2016 at 09:10:38PM +0200, Holger Freyther wrote: > > > On 26 May 2016, at 21:07, Ruben Undheim wrote: > > > > > I hope to get the osmo-bts formal stuff done soon, so it can get uploaded, and > > then everything for a base station will be available in the official archive! > > great. Please ping us before so we can tag a release that is closer to master than the last tagged version. > > holger > From holger at freyther.de Mon May 30 19:34:44 2016 From: holger at freyther.de (Holger Freyther) Date: Mon, 30 May 2016 21:34:44 +0200 Subject: Regression in osmo-pcu with UHD trx ? In-Reply-To: <574BFEAE.90805@diateam.net> References: <57486F94.2010202@diateam.net> <1E1383C7-81F2-4C58-A154-B0FF09C51305@freyther.de> <574BFEAE.90805@diateam.net> Message-ID: <4FE60FD8-9BA3-444E-BB20-056857F6BA48@freyther.de> > On 30 May 2016, at 10:49, Pierre Baudry wrote: > >> >> # first bad commit: [f1a7b8fc6651f92a8b7f3f27b7ca05d07f4e44e0] tbf: Add state WAIT_ASSIGN > > I experienced other service disruptions while bisecting this, but let's > address this specific bug first :) argh. Could you go to f1a7b8fc6651f92a8b7f3f27b7ca05d07f4e44e0 and revert it and then try again? Does it work better? holger From gerrit-no-reply at lists.osmocom.org Mon May 30 21:20:01 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 30 May 2016 21:20:01 +0000 Subject: [ABANDON] osmo-sip-connector[master]: Second random change In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: Second random change ...................................................................... Abandoned Was a test commit -- To view, visit https://gerrit.osmocom.org/127 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I01e9ce184d0b98f89e3ccdfabe2d3c95a0a8d939 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther From gerrit-no-reply at lists.osmocom.org Mon May 30 21:20:13 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 30 May 2016 21:20:13 +0000 Subject: [ABANDON] osmo-sip-connector[master]: ifirst reandom change In-Reply-To: References: Message-ID: Holger Freyther has abandoned this change. Change subject: ifirst reandom change ...................................................................... Abandoned Was a test commit -- To view, visit https://gerrit.osmocom.org/126 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I2b2beffdefd46876ad612ae0ad1f7c6057157392 Gerrit-PatchSet: 1 Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther From gerrit-no-reply at lists.osmocom.org Mon May 30 21:21:19 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 30 May 2016 21:21:19 +0000 Subject: libosmocore[master]: Add strings with PH primitive names In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/117 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id7a6d478fd725c51f54ad746bdf9b9095579ff77 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon May 30 21:21:21 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 30 May 2016 21:21:21 +0000 Subject: [MERGED] libosmocore[master]: Add strings with PH primitive names In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: Add strings with PH primitive names ...................................................................... Add strings with PH primitive names It's useful debugging helper while troubleshooting L1-related issues. Change-Id: Id7a6d478fd725c51f54ad746bdf9b9095579ff77 Reviewed-on: https://gerrit.osmocom.org/117 Tested-by: Jenkins Builder Reviewed-by: Max Reviewed-by: Holger Freyther --- M include/osmocom/gsm/l1sap.h M src/gsm/lapdm.c M src/gsm/libosmogsm.map 3 files changed, 16 insertions(+), 0 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/include/osmocom/gsm/l1sap.h b/include/osmocom/gsm/l1sap.h index 1af8ba8..ad942ea 100644 --- a/include/osmocom/gsm/l1sap.h +++ b/include/osmocom/gsm/l1sap.h @@ -14,6 +14,8 @@ PRIM_TCH_RTS, /*!< \brief TCH */ }; +extern const struct value_string osmo_ph_prim_names[]; + /*! \brief PH-SAP related primitives (L1<->L2 SAP) */ enum osmo_mph_info_type { PRIM_INFO_TIME, /*!< \brief Current GSM time */ diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c index d44335f..fa7769b 100644 --- a/src/gsm/lapdm.c +++ b/src/gsm/lapdm.c @@ -111,6 +111,18 @@ LAPDm_FMT_B4, }; +const struct value_string osmo_ph_prim_names[] = { + { PRIM_PH_DATA, "PH-DATA" }, + { PRIM_PH_RACH, "PH-RANDOM_ACCESS" }, + { PRIM_PH_CONN, "PH-CONNECT" }, + { PRIM_PH_EMPTY_FRAME, "PH-EMPTY_FRAME" }, + { PRIM_PH_RTS, "PH-RTS" }, + { PRIM_MPH_INFO, "MPH-INFO" }, + { PRIM_TCH, "TCH" }, + { PRIM_TCH_RTS, "TCH-RTS" }, + { 0, NULL } +}; + static int lapdm_send_ph_data_req(struct lapd_msg_ctx *lctx, struct msgb *msg); static int send_rslms_dlsap(struct osmo_dlsap_prim *dp, struct lapd_msg_ctx *lctx); diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index 1e2d323..301f5aa 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -223,6 +223,8 @@ lapdm_phsap_up; lapdm_rslms_recvmsg; +osmo_ph_prim_names; + milenage_auts; milenage_check; milenage_f1; -- To view, visit https://gerrit.osmocom.org/117 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id7a6d478fd725c51f54ad746bdf9b9095579ff77 Gerrit-PatchSet: 3 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Mon May 30 21:26:21 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 30 May 2016 21:26:21 +0000 Subject: libosmocore[master]: Add helper functions for AMR codec In-Reply-To: References: Message-ID: Patch Set 4: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/118/4/tests/codec/codec_test.c File tests/codec/codec_test.c: Line 35: int rc = osmo_amr_rtp_dec(t, len, &cmr, &cmi, &ft, &bfi, &sti); What I really like are roud-trip tests. Decode, encode and check if they are the same. Could you add one here? -- To view, visit https://gerrit.osmocom.org/118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia217679a07d3fbc970f435e20f6eac33d34bd597 Gerrit-PatchSet: 4 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon May 30 21:28:04 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 30 May 2016 21:28:04 +0000 Subject: openbsc[master]: Make si2q scheduling optional In-Reply-To: References: Message-ID: Patch Set 4: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/81/4/openbsc/tests/gsm0408/gsm0408_test.ok File openbsc/tests/gsm0408/gsm0408_test.ok: Line 66: generated invalid SI2quater: [23] 59 06 07 c0 00 04 86 59 0a 03 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b Can you say why it is invalid and why something is printed? Could you initialize with 0xAE before to see which bits were written? -- To view, visit https://gerrit.osmocom.org/81 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibe997803ffb894133fd4d838410fe735791d414f Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Mon May 30 21:28:18 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 30 May 2016 21:28:18 +0000 Subject: openbsc[master]: bsc: Create minimal SI6 rest octets In-Reply-To: References: Message-ID: Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/71 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I417a40eb91f42a3416b4e07bb9fb4d7a01aaa36b Gerrit-PatchSet: 2 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Mon May 30 21:28:40 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Mon, 30 May 2016 21:28:40 +0000 Subject: [MERGED] openbsc[master]: bsc: Create minimal SI6 rest octets In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: bsc: Create minimal SI6 rest octets ...................................................................... bsc: Create minimal SI6 rest octets In GSM R99 SI6 has mandatory SI6 rest octets and so far we did not include them. Add minimal support to generate the right band indicator. Target a slightly older version of the SI6 rest octets as we neither support MBMS nor Random bit stream but should include the band indicator. Change-Id: I417a40eb91f42a3416b4e07bb9fb4d7a01aaa36b Fixes: OS#1698 Related: OS#1725 Reviewed-on: https://gerrit.osmocom.org/71 Tested-by: Jenkins Builder Reviewed-by: Max Reviewed-by: Holger Freyther --- M openbsc/include/openbsc/rest_octets.h M openbsc/src/libbsc/rest_octets.c M openbsc/src/libbsc/system_information.c 3 files changed, 43 insertions(+), 1 deletion(-) Approvals: Max: Looks good to me, but someone else must approve Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/openbsc/include/openbsc/rest_octets.h b/openbsc/include/openbsc/rest_octets.h index 32b9963..91413b5 100644 --- a/openbsc/include/openbsc/rest_octets.h +++ b/openbsc/include/openbsc/rest_octets.h @@ -12,6 +12,7 @@ int rest_octets_si1(uint8_t *data, uint8_t *nch_pos, int is1800_net); int rest_octets_si2quater(uint8_t *data, const struct osmo_earfcn_si2q *e, const uint16_t *u, const uint16_t *sc, size_t u_len); +int rest_octets_si6(uint8_t *data, bool is1800_net); struct gsm48_si_selection_params { uint16_t penalty_time:5, diff --git a/openbsc/src/libbsc/rest_octets.c b/openbsc/src/libbsc/rest_octets.c index aa286e5..065fb7b 100644 --- a/openbsc/src/libbsc/rest_octets.c +++ b/openbsc/src/libbsc/rest_octets.c @@ -450,6 +450,45 @@ return bv.data_len; } + +/* GSM 04.18 ETSI TS 101 503 V8.27.0 (2006-05) + + ::= +{L | H } +{L | H } +{ < DTM_support : bit == L > I < DTM_support : bit == H > +< RAC : bit (8) > +< MAX_LAPDm : bit (3) > } +< Band indicator > +{ L | H < GPRS_MS_TXPWR_MAX_CCH : bit (5) > } +; +*/ +int rest_octets_si6(uint8_t *data, bool is1800_net) +{ + struct bitvec bv; + + memset(&bv, 0, sizeof(bv)); + bv.data = data; + bv.data_len = 1; + + /* no PCH/NCH info */ + bitvec_set_bit(&bv, L); + /* no VBS/VGCS options */ + bitvec_set_bit(&bv, L); + /* no DTM_support */ + bitvec_set_bit(&bv, L); + /* band indicator */ + if (is1800_net) + bitvec_set_bit(&bv, L); + else + bitvec_set_bit(&bv, H); + /* no GPRS_MS_TXPWR_MAX_CCH */ + bitvec_set_bit(&bv, L); + + bitvec_spare_padding(&bv, (bv.data_len * 8) - 1); + return bv.data_len; +} + /* GPRS Mobile Allocation as per TS 04.60 Chapter 12.10a: < GPRS Mobile Allocation IE > ::= < HSN : bit (6) > diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index bf20394..d40bbaf 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -905,6 +905,7 @@ { struct gsm48_system_information_type_6 *si6; int l2_plen = 11; + int rc; memset(output, GSM_MACBLOCK_PADDING, GSM_MACBLOCK_LEN); @@ -935,8 +936,9 @@ gsm48_set_dtx(&si6->cell_options, bts->dtxu, bts->dtxu, false); /* SI6 Rest Octets: 10.5.2.35a: PCH / NCH info, VBS/VGCS options */ + rc = rest_octets_si6(si6->rest_octets, is_dcs_net(bts)); - return l2_plen; + return l2_plen + rc; } static struct gsm48_si13_info si13_default = { -- To view, visit https://gerrit.osmocom.org/71 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I417a40eb91f42a3416b4e07bb9fb4d7a01aaa36b Gerrit-PatchSet: 3 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Holger Freyther Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue May 31 07:57:33 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 31 May 2016 07:57:33 +0000 Subject: [PATCH] openbsc[master]: Make si2q scheduling optional In-Reply-To: References: Message-ID: Hello Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/81 to look at the new patch set (#5). Make si2q scheduling optional Previously si2quater SI messages were always scheduled. Check for neighbor configuration and only schedule si2q when necessary. Add corresponding unit test. Change-Id: Ibe997803ffb894133fd4d838410fe735791d414f Fixes: OS#1727 --- M openbsc/src/libbsc/system_information.c M openbsc/tests/gsm0408/gsm0408_test.c M openbsc/tests/gsm0408/gsm0408_test.ok 3 files changed, 40 insertions(+), 19 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/81/81/5 diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index d40bbaf..fd228e3 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -648,7 +648,7 @@ static int generate_si2quater(uint8_t *output, struct gsm_bts *bts) { - int rc; + int rc, i = MAX_EARFCN_LIST; struct gsm48_system_information_type_2quater *si2q = (struct gsm48_system_information_type_2quater *) output; @@ -667,6 +667,14 @@ if (rc < 0) return rc; + if (bts->si_common.si2quater_neigh_list.arfcn) + for (i = 0; i < MAX_EARFCN_LIST; i++) + if (bts->si_common.si2quater_neigh_list.arfcn[i] != + OSMO_EARFCN_INVALID) + break; + if (!bts->si_common.uarfcn_length && i == MAX_EARFCN_LIST) + bts->si_valid &= ~(1 << SYSINFO_TYPE_2quater); + return sizeof(*si2q) + rc; } diff --git a/openbsc/tests/gsm0408/gsm0408_test.c b/openbsc/tests/gsm0408/gsm0408_test.c index 9262667..7acc93f 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.c +++ b/openbsc/tests/gsm0408/gsm0408_test.c @@ -21,7 +21,7 @@ #include #include #include - +#include #include #include @@ -95,9 +95,15 @@ static inline void gen(struct gsm_bts *bts) { + bts->si_valid = 0; + bts->si_valid |= (1 << SYSINFO_TYPE_2quater); + /* should be no-op as entire buffer is filled with padding: */ + memset(bts->si_buf[SYSINFO_TYPE_2quater], 0xAE, GSM_MACBLOCK_LEN); int r = gsm_generate_si(bts, SYSINFO_TYPE_2quater); + bool v = bts->si_valid & (1 << SYSINFO_TYPE_2quater); if (r > 0) - printf("generated SI2quater: [%d] %s\n", r, + printf("generated %s SI2quater: [%d] %s\n", + v ? "valid" : "invalid", r, osmo_hexdump(bts->si_buf[SYSINFO_TYPE_2quater], r)); else printf("failed to generate SI2quater: %s\n", strerror(-r)); @@ -123,6 +129,9 @@ exit(1); bts = gsm_bts_alloc(network); + /* first generate invalid SI as no UARFCN added */ + gen(bts); + /* subsequent calls should produce valid SI if there's enough memory */ _bts_uarfcn_add(bts, 1982, 13, 1); _bts_uarfcn_add(bts, 1982, 44, 0); _bts_uarfcn_add(bts, 1982, 61, 1); @@ -155,7 +164,9 @@ bts->si_common.si2quater_neigh_list.thresh_hi = 5; osmo_earfcn_init(&bts->si_common.si2quater_neigh_list); - + /* first generate invalid SI as no EARFCN added */ + gen(bts); + /* subsequent calls should produce valid SI if there's enough memory */ add_arfcn_b(&bts->si_common.si2quater_neigh_list, 1917, 1); gen(bts); diff --git a/openbsc/tests/gsm0408/gsm0408_test.ok b/openbsc/tests/gsm0408/gsm0408_test.ok index 7b7a2cc..ebe9476 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.ok +++ b/openbsc/tests/gsm0408/gsm0408_test.ok @@ -63,24 +63,26 @@ Allocated reference: 0 Allocated reference: 1 Testing SYSINFO_TYPE_2quater EARFCN generation: -added EARFCN 1917 - generated SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be c8 50 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b -added EARFCN 1932 - generated SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 30 14 03 2b 2b 2b 2b 2b 2b 2b 2b -added EARFCN 1937 - generated SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 31 07 91 a0 a0 2b 2b 2b 2b 2b 2b -added EARFCN 1945 - generated SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 31 07 91 a8 3c c8 28 0b 2b 2b 2b -added EARFCN 1965 - generated SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 31 07 91 a8 3c ca 0f 5a 0a 03 2b +generated invalid SI2quater: [23] 59 06 07 c0 00 04 86 59 0a 03 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +added EARFCN 1917 - generated valid SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be c8 50 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +added EARFCN 1932 - generated valid SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 30 14 03 2b 2b 2b 2b 2b 2b 2b 2b +added EARFCN 1937 - generated valid SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 31 07 91 a0 a0 2b 2b 2b 2b 2b 2b +added EARFCN 1945 - generated valid SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 31 07 91 a8 3c c8 28 0b 2b 2b 2b +added EARFCN 1965 - generated valid SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 31 07 91 a8 3c ca 0f 5a 0a 03 2b added EARFCN 1967 - failed to generate SI2quater: Cannot allocate memory added EARFCN 1982 - failed to generate SI2quater: Cannot allocate memory Testing SYSINFO_TYPE_2quater UARFCN generation: -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 0c 1a 10 99 64 00 0b 2b 2b 2b 2b 2b 2b 2b 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 14 1a 1f 00 44 b2 00 03 2b 2b 2b 2b 2b 2b 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 18 58 12 f0 84 86 59 00 03 2b 2b 2b 2b 2b 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 20 58 2e f0 f2 04 86 59 00 03 2b 2b 2b 2b 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 28 58 2e 22 f2 4e 84 86 59 00 03 2b 2b 2b 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 34 1a 64 26 5d f2 05 04 86 59 00 03 2b 2b 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 38 58 12 22 fd ce 8e 05 04 86 59 00 03 2b 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 40 58 1d 22 fa ce 88 85 7b 00 44 b2 00 03 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 4c 7a 34 0e 64 77 85 43 55 c8 10 99 64 00 0b +generated invalid SI2quater: [23] 59 06 07 c0 00 04 86 59 00 03 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 0c 1a 10 99 64 00 0b 2b 2b 2b 2b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 14 1a 1f 00 44 b2 00 03 2b 2b 2b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 18 58 12 f0 84 86 59 00 03 2b 2b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 20 58 2e f0 f2 04 86 59 00 03 2b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 28 58 2e 22 f2 4e 84 86 59 00 03 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 34 1a 64 26 5d f2 05 04 86 59 00 03 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 38 58 12 22 fd ce 8e 05 04 86 59 00 03 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 40 58 1d 22 fa ce 88 85 7b 00 44 b2 00 03 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 4c 7a 34 0e 64 77 85 43 55 c8 10 99 64 00 0b failed to add UARFCN to SI2quater: No space left on device failed to add UARFCN to SI2quater: No space left on device -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 4c 7a 34 0e 64 77 85 43 55 c8 10 99 64 00 0b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 4c 7a 34 0e 64 77 85 43 55 c8 10 99 64 00 0b Done. -- To view, visit https://gerrit.osmocom.org/81 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ibe997803ffb894133fd4d838410fe735791d414f Gerrit-PatchSet: 5 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue May 31 08:00:27 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 31 May 2016 08:00:27 +0000 Subject: openbsc[master]: Make si2q scheduling optional In-Reply-To: References: Message-ID: Patch Set 4: That's how generation works for other SI - function for rest_octets is called and fills the buffer. If there's an error than buffer is not cleared, but the SI marked as invalid. I've added clarification comments into test code. -- To view, visit https://gerrit.osmocom.org/81 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibe997803ffb894133fd4d838410fe735791d414f Gerrit-PatchSet: 4 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 31 09:10:39 2016 From: gerrit-no-reply at lists.osmocom.org (lazlo) Date: Tue, 31 May 2016 09:10:39 +0000 Subject: [PATCH] osmo-bts[master]: octphy: Update outdated config param name in error message. Message-ID: Review at https://gerrit.osmocom.org/129 octphy: Update outdated config param name in error message. Change-Id: I45b8bc09c9aabacc5b908450fe574b5802b88be8 --- M src/osmo-bts-octphy/l1_if.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/29/129/1 diff --git a/src/osmo-bts-octphy/l1_if.c b/src/osmo-bts-octphy/l1_if.c index ec61d6b..c8ed216 100644 --- a/src/osmo-bts-octphy/l1_if.c +++ b/src/osmo-bts-octphy/l1_if.c @@ -1618,7 +1618,7 @@ fl1h->phy_link = plink; if (!phy_dev) { - LOGP(DL1C, LOGL_ERROR, "You have to specify a phy-netdev\n"); + LOGP(DL1C, LOGL_ERROR, "You have to specify a octphy net-device\n"); talloc_free(fl1h); return NULL; } -- To view, visit https://gerrit.osmocom.org/129 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I45b8bc09c9aabacc5b908450fe574b5802b88be8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: lazlo From gerrit-no-reply at lists.osmocom.org Tue May 31 09:26:52 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 31 May 2016 09:26:52 +0000 Subject: [PATCH] libosmocore[master]: Add helper functions for AMR codec In-Reply-To: References: Message-ID: Hello Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/118 to look at the new patch set (#5). Add helper functions for AMR codec * add functions to encode/decode various codec paramters from RTP payload with AMR frame according to RFC 4867 * those functions are extended version based on code from osmo-bts' amr.c by Andreas Eversberg * add corresponding enum types and strings for logging * add regression tests It's useful both to replace manual parsing in osmo-bts with fuctions covered by test suite and as a debugging helpers for issues related to AMR. Change-Id: Ia217679a07d3fbc970f435e20f6eac33d34bd597 Related: OS#1562 --- M .gitignore M include/osmocom/codec/codec.h M src/codec/Makefile.am M src/codec/gsm690.c M tests/Makefile.am A tests/codec/codec_test.c A tests/codec/codec_test.ok M tests/testsuite.at 8 files changed, 240 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/18/118/5 diff --git a/.gitignore b/.gitignore index 03ce379..70e2016 100644 --- a/.gitignore +++ b/.gitignore @@ -80,6 +80,7 @@ tests/ringbuf/ringbuf_test tests/strrb/strrb_test tests/vty/vty_test +tests/codec/codec_test tests/gb/gprs_bssgp_test tests/smscb/gsm0341_test tests/bitvec/bitvec_test diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h index d126e0f..b7bcc78 100644 --- a/include/osmocom/codec/codec.h +++ b/include/osmocom/codec/codec.h @@ -2,6 +2,8 @@ #include +#include + extern const uint16_t gsm610_bitorder[]; /* FR */ extern const uint16_t gsm620_unvoiced_bitorder[]; /* HR unvoiced */ extern const uint16_t gsm620_voiced_bitorder[]; /* HR voiced */ @@ -15,3 +17,32 @@ extern const uint16_t gsm690_5_9_bitorder[]; /* AMR 5.9 kbits */ extern const uint16_t gsm690_5_15_bitorder[]; /* AMR 5.15 kbits */ extern const uint16_t gsm690_4_75_bitorder[]; /* AMR 4.75 kbits */ + +extern const struct value_string osmo_amr_type_names[]; + +enum osmo_amr_type { + AMR_4_75 = 0, + AMR_5_15 = 1, + AMR_5_90 = 2, + AMR_6_70 = 3, + AMR_7_40 = 4, + AMR_7_95 = 5, + AMR_10_2 = 6, + AMR_12_2 = 7, + AMR_SID = 8, + AMR_GSM_EFR_SID = 9, + AMR_TDMA_EFR_SID = 10, + AMR_PDC_EFR_SID = 11, + AMR_NO_DATA = 15, +}; + +enum osmo_amr_quality { + AMR_BAD = 0, + AMR_GOOD = 1 +}; + +int osmo_amr_rtp_enc(uint8_t *payload, uint8_t cmr, enum osmo_amr_type ft, + enum osmo_amr_quality bfi); +int osmo_amr_rtp_dec(const uint8_t *payload, int payload_len, uint8_t *cmr, + int8_t *cmi, enum osmo_amr_type *ft, + enum osmo_amr_quality *bfi, int8_t *sti); diff --git a/src/codec/Makefile.am b/src/codec/Makefile.am index b4834e5..619897f 100644 --- a/src/codec/Makefile.am +++ b/src/codec/Makefile.am @@ -2,7 +2,7 @@ # Please read Chapter 6 "Library interface versions" of the libtool documentation before making any modification LIBVERSION=0:0:0 -AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include $(TALLOC_CFLAGS) AM_CFLAGS = -Wall lib_LTLIBRARIES = libosmocodec.la diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c index fdf3302..0f4bf8f 100644 --- a/src/codec/gsm690.c +++ b/src/codec/gsm690.c @@ -22,7 +22,12 @@ */ #include +#include +#include +#include +#include +#include /* * These table map between the raw encoder parameter output and * the format used before channel coding. Both in GSM and in various @@ -208,3 +213,104 @@ 88, 90, 91, 34, 55, 68, 89, 37, 58, 71, 92, 31, 52, 65, 86, }; + +static const uint8_t amr_len_by_ft[16] = { + 12, 13, 15, 17, 19, 20, 26, 31, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +const struct value_string osmo_amr_type_names[] = { + { AMR_4_75, "AMR 4,75 kbits/s" }, + { AMR_5_15, "AMR 5,15 kbit/s" }, + { AMR_5_90, "AMR 5,90 kbit/s" }, + { AMR_6_70, "AMR 6,70 kbit/s (PDC-EFR)" }, + { AMR_7_40, "AMR 7,40 kbit/s (TDMA-EFR)" }, + { AMR_7_95, "AMR 7,95 kbit/s" }, + { AMR_10_2, "AMR 10,2 kbit/s" }, + { AMR_12_2, "AMR 12,2 kbit/s (GSM-EFR)" }, + { AMR_SID, "AMR SID" }, + { AMR_GSM_EFR_SID, "GSM-EFR SID" }, + { AMR_TDMA_EFR_SID, "TDMA-EFR SID" }, + { AMR_PDC_EFR_SID, "PDC-EFR SID" }, + { AMR_NO_DATA, "No Data/NA" }, + { 0, NULL }, +}; + +/*! \brief Decode various AMR parameters from RTP payload (RFC 4867) acording to + * 3GPP TS 26.101 + * \param[in] rtppayload Payload from RTP packet + * \param[in] payload_len length of rtppayload + * \param[out] cmr AMR Codec Mode Request, not filled if NULL + * \param[out] cmi AMR Codec Mode Indicator, -1 if not applicable for this type, + * not filled if NULL + * \param[out] ft AMR Frame Type, not filled if NULL + * \param[out] bfi AMR Bad Frame Indicator, not filled if NULL + * \param[out] sti AMR SID Type Indicator, -1 if not applicable for this type, + * not filled if NULL + * \returns length of AMR data or negative value on error + */ +int osmo_amr_rtp_dec(const uint8_t *rtppayload, int payload_len, uint8_t *cmr, + int8_t *cmi, enum osmo_amr_type *ft, + enum osmo_amr_quality *bfi, int8_t *sti) +{ + /* RFC 4867 ? 4.4.2 ToC - compound payloads are not supported: F = 0 */ + uint8_t type = (rtppayload[1] >> 3) & 0xf; + + /* compound payloads are not supported */ + if (rtppayload[1] >> 7) + return -ENOTSUP; + + if (payload_len - 2 < amr_len_by_ft[type]) + return -ENOTSUP; + + if (payload_len < 2) + return -EINVAL; + + if (ft) + *ft = type; + + if (cmr) + *cmr = rtppayload[0] >> 4; + + if (bfi) + *bfi = (rtppayload[1] >> 2) & 1; + + /* Table 6 in 3GPP TS 26.101 */ + if (cmi) + *cmi = (type == AMR_SID) ? ((rtppayload[6] >> 1) & 7) : -1; + + if (sti) + *sti = (type == AMR_SID) ? (rtppayload[6] & 0x10) : -1; + + return 2 + amr_len_by_ft[type]; +} + +/*! \brief Encode various AMR parameters from RTP payload (RFC 4867) + * \param[out] payload Payload for RTP packet, contains speech data (if any) + * except for have 2 first bytes where header will be built + * \param[in] cmr AMR codec Mode Request + * \param[in] ft AMR Frame Type + * \param[in] bfi AMR Bad Frame Indicator + * \returns length of AMR data (header + ToC + speech data) or negative value + * on error + * + * Note: only octet-aligned mode is supported so the header occupies 2 full + * bytes. Optional interleaving header is not supported. + */ +int osmo_amr_rtp_enc(uint8_t *payload, uint8_t cmr, enum osmo_amr_type ft, + enum osmo_amr_quality bfi) +{ + if (cmr > 15) + return -EINVAL; + + if (ft > 15) + return -ENOTSUP; + + /* RFC 4867 ? 4.3.1 payload header */ + payload[0] = cmr << 4; + + /* RFC 4867 ? 4.4.2 ToC - compound payloads are not supported: F = 0 */ + payload[1] = (((uint8_t)ft) << 3) | (((uint8_t)bfi) << 2); + + /* speech data */ + return 2 + amr_len_by_ft[ft]; +} diff --git a/tests/Makefile.am b/tests/Makefile.am index 6c9929b..55aaa07 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -8,7 +8,7 @@ gsm0808/gsm0808_test gsm0408/gsm0408_test \ gb/bssgp_fc_test gb/gprs_bssgp_test gb/gprs_ns_test \ gprs/gprs_test kasumi/kasumi_test \ - logging/logging_test fr/fr_test \ + logging/logging_test fr/fr_test codec/codec_test \ loggingrb/loggingrb_test strrb/strrb_test \ vty/vty_test comp128/comp128_test utils/utils_test \ smscb/gsm0341_test stats/stats_test \ @@ -97,6 +97,9 @@ fr_fr_test_SOURCES = fr/fr_test.c fr_fr_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gb/libosmogb.la $(LIBRARY_DL) +codec_codec_test_SOURCES = codec/codec_test.c +codec_codec_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/codec/libosmocodec.la + loggingrb_loggingrb_test_SOURCES = loggingrb/loggingrb_test.c loggingrb_loggingrb_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/vty/libosmovty.la @@ -141,7 +144,7 @@ gsm0808/gsm0808_test.ok gb/bssgp_fc_tests.err \ gb/bssgp_fc_tests.ok gb/bssgp_fc_tests.sh \ gb/gprs_bssgp_test.ok gb/gprs_ns_test.ok \ - gprs/gprs_test.ok kasumi/kasumi_test.ok \ + gprs/gprs_test.ok kasumi/kasumi_test.ok codec/codec_test.ok \ msgfile/msgfile_test.ok msgfile/msgconfig.cfg \ logging/logging_test.ok logging/logging_test.err \ fr/fr_test.ok loggingrb/logging_test.ok \ diff --git a/tests/codec/codec_test.c b/tests/codec/codec_test.c new file mode 100644 index 0000000..7ca7c86 --- /dev/null +++ b/tests/codec/codec_test.c @@ -0,0 +1,81 @@ +/* + * (C) 2016 by Sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include + +#include +#include + +const uint8_t sid_update[] = {0x20, 0x44, 0x29, 0xc2, 0x92, 0x91, 0xf4}; +const uint8_t sid_first[] = {0x20, 0x44, 0x00, 0x00, 0x00, 0x00, 0x04}; + +#define PAYLOAD_LEN 34 + +static const char * cmpr(int a, int b) +{ + return (a == b) ? "OK" : "BAD"; +} + +static void test_sid_dec(const uint8_t *t, size_t len) +{ + uint8_t cmr; + enum osmo_amr_type ft; + enum osmo_amr_quality bfi; + int8_t sti, cmi; + int rc = osmo_amr_rtp_dec(t, len, &cmr, &cmi, &ft, &bfi, &sti); + printf("[%d] decode RTP %s%s: FT %s, CMR %s, CMI is %d, SID type %s\n", + rc, osmo_hexdump(t, len), cmpr(bfi, AMR_GOOD), + get_value_string(osmo_amr_type_names, ft), + get_value_string(osmo_amr_type_names, cmr), + cmi, sti ? "UPDATE" : "FIRST"); + if (sti == -1) + printf("FAIL: incompatible STI for SID\n"); +} + +static void test_amr_rt(uint8_t _cmr, enum osmo_amr_type _ft, + enum osmo_amr_quality _bfi) +{ + uint8_t cmr, payload[PAYLOAD_LEN]; + enum osmo_amr_type ft; + enum osmo_amr_quality bfi; + int8_t sti, cmi; + int rc, re = osmo_amr_rtp_enc(payload, _cmr, _ft, _bfi); + rc = osmo_amr_rtp_dec(payload, PAYLOAD_LEN, &cmr, &cmi, &ft, &bfi, &sti); + printf("[%d/%d] %s, CMR: %s, FT: %s, BFI: %s, CMI: %d, STI: %d\n", re, + rc, get_value_string(osmo_amr_type_names, ft), + cmpr(_cmr, cmr), cmpr(_ft, ft), cmpr(_bfi, bfi), cmi, sti); +} + +int main(int argc, char **argv) +{ + printf("AMR RTP payload decoder test:\n"); + test_sid_dec(sid_first, 7); + test_sid_dec(sid_update, 7); + test_amr_rt(0, AMR_NO_DATA, AMR_BAD); + test_amr_rt(0, AMR_NO_DATA, AMR_GOOD); + test_amr_rt(AMR_12_2, AMR_12_2, AMR_BAD); + test_amr_rt(AMR_12_2, AMR_12_2, AMR_GOOD); + test_amr_rt(AMR_7_40, AMR_7_40, AMR_BAD); + test_amr_rt(AMR_7_40, AMR_7_40, AMR_GOOD); + + return 0; +} + + diff --git a/tests/codec/codec_test.ok b/tests/codec/codec_test.ok new file mode 100644 index 0000000..6f91b74 --- /dev/null +++ b/tests/codec/codec_test.ok @@ -0,0 +1,9 @@ +AMR RTP payload decoder test: +[2] decode RTP 20 44 00 00 00 00 04 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type FIRST +[2] decode RTP 20 44 29 c2 92 91 f4 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type UPDATE +[2/2] No Data/NA, CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 +[2/2] No Data/NA, CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 +[33/33] AMR 12,2 kbit/s (GSM-EFR), CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 +[33/33] AMR 12,2 kbit/s (GSM-EFR), CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 +[21/21] AMR 7,40 kbit/s (TDMA-EFR), CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 +[21/21] AMR 7,40 kbit/s (TDMA-EFR), CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 diff --git a/tests/testsuite.at b/tests/testsuite.at index aa269af..d49f7ff 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -115,12 +115,17 @@ AT_CHECK([$abs_top_builddir/tests/logging/logging_test], [0], [expout], [experr]) AT_CLEANUP +AT_SETUP([codec]) +AT_KEYWORDS([codec]) +cat $abs_srcdir/codec/codec_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/codec/codec_test], [0], [expout], [ignore]) +AT_CLEANUP + AT_SETUP([fr]) AT_KEYWORDS([fr]) cat $abs_srcdir/fr/fr_test.ok > expout cat $abs_srcdir/fr/fr_test.err > experr AT_CHECK([$abs_top_builddir/tests/fr/fr_test], [0], [expout], [experr]) - AT_CLEANUP AT_SETUP([loggingrb]) -- To view, visit https://gerrit.osmocom.org/118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia217679a07d3fbc970f435e20f6eac33d34bd597 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue May 31 09:29:59 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 May 2016 09:29:59 +0000 Subject: libosmocore[master]: Add helper functions for AMR codec In-Reply-To: References: Message-ID: Patch Set 5: (1 comment) https://gerrit.osmocom.org/#/c/118/5/tests/codec/codec_test.c File tests/codec/codec_test.c: Line 53: enum osmo_amr_quality _bfi) Okay, that is one valid approach for a round-trip test. Have you considered doing decode, encode and then memcmp with the sid_update/sid_first? -- To view, visit https://gerrit.osmocom.org/118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia217679a07d3fbc970f435e20f6eac33d34bd597 Gerrit-PatchSet: 5 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue May 31 09:30:53 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 May 2016 09:30:53 +0000 Subject: osmo-bts[master]: octphy: Update outdated config param name in error message. In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/129 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I45b8bc09c9aabacc5b908450fe574b5802b88be8 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: lazlo Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 31 09:30:55 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 May 2016 09:30:55 +0000 Subject: [MERGED] osmo-bts[master]: octphy: Update outdated config param name in error message. In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: octphy: Update outdated config param name in error message. ...................................................................... octphy: Update outdated config param name in error message. Change-Id: I45b8bc09c9aabacc5b908450fe574b5802b88be8 Reviewed-on: https://gerrit.osmocom.org/129 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M src/osmo-bts-octphy/l1_if.c 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/src/osmo-bts-octphy/l1_if.c b/src/osmo-bts-octphy/l1_if.c index ec61d6b..c8ed216 100644 --- a/src/osmo-bts-octphy/l1_if.c +++ b/src/osmo-bts-octphy/l1_if.c @@ -1618,7 +1618,7 @@ fl1h->phy_link = plink; if (!phy_dev) { - LOGP(DL1C, LOGL_ERROR, "You have to specify a phy-netdev\n"); + LOGP(DL1C, LOGL_ERROR, "You have to specify a octphy net-device\n"); talloc_free(fl1h); return NULL; } -- To view, visit https://gerrit.osmocom.org/129 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I45b8bc09c9aabacc5b908450fe574b5802b88be8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: lazlo Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue May 31 09:32:10 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 May 2016 09:32:10 +0000 Subject: openbsc[master]: Make si2q scheduling optional In-Reply-To: References: Message-ID: Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/81 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibe997803ffb894133fd4d838410fe735791d414f Gerrit-PatchSet: 5 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 31 09:32:12 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 May 2016 09:32:12 +0000 Subject: [MERGED] openbsc[master]: Make si2q scheduling optional In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: Make si2q scheduling optional ...................................................................... Make si2q scheduling optional Previously si2quater SI messages were always scheduled. Check for neighbor configuration and only schedule si2q when necessary. Add corresponding unit test. Change-Id: Ibe997803ffb894133fd4d838410fe735791d414f Fixes: OS#1727 Reviewed-on: https://gerrit.osmocom.org/81 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M openbsc/src/libbsc/system_information.c M openbsc/tests/gsm0408/gsm0408_test.c M openbsc/tests/gsm0408/gsm0408_test.ok 3 files changed, 40 insertions(+), 19 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c index d40bbaf..fd228e3 100644 --- a/openbsc/src/libbsc/system_information.c +++ b/openbsc/src/libbsc/system_information.c @@ -648,7 +648,7 @@ static int generate_si2quater(uint8_t *output, struct gsm_bts *bts) { - int rc; + int rc, i = MAX_EARFCN_LIST; struct gsm48_system_information_type_2quater *si2q = (struct gsm48_system_information_type_2quater *) output; @@ -667,6 +667,14 @@ if (rc < 0) return rc; + if (bts->si_common.si2quater_neigh_list.arfcn) + for (i = 0; i < MAX_EARFCN_LIST; i++) + if (bts->si_common.si2quater_neigh_list.arfcn[i] != + OSMO_EARFCN_INVALID) + break; + if (!bts->si_common.uarfcn_length && i == MAX_EARFCN_LIST) + bts->si_valid &= ~(1 << SYSINFO_TYPE_2quater); + return sizeof(*si2q) + rc; } diff --git a/openbsc/tests/gsm0408/gsm0408_test.c b/openbsc/tests/gsm0408/gsm0408_test.c index 9262667..7acc93f 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.c +++ b/openbsc/tests/gsm0408/gsm0408_test.c @@ -21,7 +21,7 @@ #include #include #include - +#include #include #include @@ -95,9 +95,15 @@ static inline void gen(struct gsm_bts *bts) { + bts->si_valid = 0; + bts->si_valid |= (1 << SYSINFO_TYPE_2quater); + /* should be no-op as entire buffer is filled with padding: */ + memset(bts->si_buf[SYSINFO_TYPE_2quater], 0xAE, GSM_MACBLOCK_LEN); int r = gsm_generate_si(bts, SYSINFO_TYPE_2quater); + bool v = bts->si_valid & (1 << SYSINFO_TYPE_2quater); if (r > 0) - printf("generated SI2quater: [%d] %s\n", r, + printf("generated %s SI2quater: [%d] %s\n", + v ? "valid" : "invalid", r, osmo_hexdump(bts->si_buf[SYSINFO_TYPE_2quater], r)); else printf("failed to generate SI2quater: %s\n", strerror(-r)); @@ -123,6 +129,9 @@ exit(1); bts = gsm_bts_alloc(network); + /* first generate invalid SI as no UARFCN added */ + gen(bts); + /* subsequent calls should produce valid SI if there's enough memory */ _bts_uarfcn_add(bts, 1982, 13, 1); _bts_uarfcn_add(bts, 1982, 44, 0); _bts_uarfcn_add(bts, 1982, 61, 1); @@ -155,7 +164,9 @@ bts->si_common.si2quater_neigh_list.thresh_hi = 5; osmo_earfcn_init(&bts->si_common.si2quater_neigh_list); - + /* first generate invalid SI as no EARFCN added */ + gen(bts); + /* subsequent calls should produce valid SI if there's enough memory */ add_arfcn_b(&bts->si_common.si2quater_neigh_list, 1917, 1); gen(bts); diff --git a/openbsc/tests/gsm0408/gsm0408_test.ok b/openbsc/tests/gsm0408/gsm0408_test.ok index 7b7a2cc..ebe9476 100644 --- a/openbsc/tests/gsm0408/gsm0408_test.ok +++ b/openbsc/tests/gsm0408/gsm0408_test.ok @@ -63,24 +63,26 @@ Allocated reference: 0 Allocated reference: 1 Testing SYSINFO_TYPE_2quater EARFCN generation: -added EARFCN 1917 - generated SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be c8 50 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b -added EARFCN 1932 - generated SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 30 14 03 2b 2b 2b 2b 2b 2b 2b 2b -added EARFCN 1937 - generated SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 31 07 91 a0 a0 2b 2b 2b 2b 2b 2b -added EARFCN 1945 - generated SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 31 07 91 a8 3c c8 28 0b 2b 2b 2b -added EARFCN 1965 - generated SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 31 07 91 a8 3c ca 0f 5a 0a 03 2b +generated invalid SI2quater: [23] 59 06 07 c0 00 04 86 59 0a 03 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +added EARFCN 1917 - generated valid SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be c8 50 0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +added EARFCN 1932 - generated valid SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 30 14 03 2b 2b 2b 2b 2b 2b 2b 2b +added EARFCN 1937 - generated valid SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 31 07 91 a0 a0 2b 2b 2b 2b 2b 2b +added EARFCN 1945 - generated valid SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 31 07 91 a8 3c c8 28 0b 2b 2b 2b +added EARFCN 1965 - generated valid SI2quater: [23] 59 06 07 c0 00 04 86 59 83 be cc 1e 31 07 91 a8 3c ca 0f 5a 0a 03 2b added EARFCN 1967 - failed to generate SI2quater: Cannot allocate memory added EARFCN 1982 - failed to generate SI2quater: Cannot allocate memory Testing SYSINFO_TYPE_2quater UARFCN generation: -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 0c 1a 10 99 64 00 0b 2b 2b 2b 2b 2b 2b 2b 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 14 1a 1f 00 44 b2 00 03 2b 2b 2b 2b 2b 2b 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 18 58 12 f0 84 86 59 00 03 2b 2b 2b 2b 2b 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 20 58 2e f0 f2 04 86 59 00 03 2b 2b 2b 2b 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 28 58 2e 22 f2 4e 84 86 59 00 03 2b 2b 2b 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 34 1a 64 26 5d f2 05 04 86 59 00 03 2b 2b 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 38 58 12 22 fd ce 8e 05 04 86 59 00 03 2b 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 40 58 1d 22 fa ce 88 85 7b 00 44 b2 00 03 2b -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 4c 7a 34 0e 64 77 85 43 55 c8 10 99 64 00 0b +generated invalid SI2quater: [23] 59 06 07 c0 00 04 86 59 00 03 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 0c 1a 10 99 64 00 0b 2b 2b 2b 2b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 14 1a 1f 00 44 b2 00 03 2b 2b 2b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 18 58 12 f0 84 86 59 00 03 2b 2b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 20 58 2e f0 f2 04 86 59 00 03 2b 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 28 58 2e 22 f2 4e 84 86 59 00 03 2b 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 34 1a 64 26 5d f2 05 04 86 59 00 03 2b 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 38 58 12 22 fd ce 8e 05 04 86 59 00 03 2b 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 40 58 1d 22 fa ce 88 85 7b 00 44 b2 00 03 2b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 4c 7a 34 0e 64 77 85 43 55 c8 10 99 64 00 0b failed to add UARFCN to SI2quater: No space left on device failed to add UARFCN to SI2quater: No space left on device -generated SI2quater: [23] 59 06 07 c0 00 25 0f 7c 4c 7a 34 0e 64 77 85 43 55 c8 10 99 64 00 0b +generated valid SI2quater: [23] 59 06 07 c0 00 25 0f 7c 4c 7a 34 0e 64 77 85 43 55 c8 10 99 64 00 0b Done. -- To view, visit https://gerrit.osmocom.org/81 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibe997803ffb894133fd4d838410fe735791d414f Gerrit-PatchSet: 6 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max From gerrit-no-reply at lists.osmocom.org Tue May 31 09:38:29 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 May 2016 09:38:29 +0000 Subject: openbsc[master]: sgsn: fix use of libosmocore GPRS encryption plugins from LL... In-Reply-To: References: Message-ID: Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/128/1/openbsc/src/gprs/gprs_llc.c File openbsc/src/gprs/gprs_llc.c: Line 413: uint64_t kc = *(uint64_t *)&lle->llme->kc; If I look at: unsigned gprs_cipher_key_length(enum gprs_ciph_algo algo) of libosmocore Does key_length relate to sizeof(kc) here? If yes then uint64_t is even too small besides that you are right and we should pass the address.. but maybe just use &lle->llme->kc directly? -- To view, visit https://gerrit.osmocom.org/128 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1f1b7454a0de5b7f4734aca4d03dbe67db5de189 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue May 31 09:54:39 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 09:54:39 +0000 Subject: [PATCH] openbsc[master]: TEST commit, outdated without conflict Message-ID: Review at https://gerrit.osmocom.org/130 TEST commit, outdated without conflict Change-Id: Ia38995cf84ba155e9d02a93620313cff634510ce --- M openbsc/include/openbsc/gprs_sgsn.h 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/30/130/1 diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h index 898b7a5..80eedf5 100644 --- a/openbsc/include/openbsc/gprs_sgsn.h +++ b/openbsc/include/openbsc/gprs_sgsn.h @@ -23,7 +23,7 @@ enum gsm48_gsm_cause; /* TS 04.08 4.1.3.3 GMM mobility management states on the network side */ -enum gprs_mm_state { +enum gprs_foo_state { GMM_DEREGISTERED, /* 4.1.3.3.1.1 */ GMM_COMMON_PROC_INIT, /* 4.1.3.3.1.2 */ GMM_REGISTERED_NORMAL, /* 4.1.3.3.2.1 */ @@ -98,7 +98,7 @@ struct llist_head list; char imsi[GSM23003_IMSI_MAX_DIGITS+1]; - enum gprs_mm_state mm_state; + enum gprs_foo_state mm_state; uint32_t p_tmsi; uint32_t p_tmsi_old; /* old P-TMSI before new is confirmed */ uint32_t p_tmsi_sig; -- To view, visit https://gerrit.osmocom.org/130 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia38995cf84ba155e9d02a93620313cff634510ce Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 31 09:54:39 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 09:54:39 +0000 Subject: [PATCH] openbsc[master]: TEST commit, outdated without conflict, newest in branch Message-ID: Review at https://gerrit.osmocom.org/131 TEST commit, outdated without conflict, newest in branch Change-Id: I855612cc2e61c18f72e6559d18e39dcbfbc826d8 --- M openbsc/src/libmsc/db.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/31/131/1 diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c index b3235bb..f93462e 100644 --- a/openbsc/src/libmsc/db.c +++ b/openbsc/src/libmsc/db.c @@ -19,6 +19,8 @@ * */ +/* FOO MOO GOO test 123 */ + #include #include #include -- To view, visit https://gerrit.osmocom.org/131 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I855612cc2e61c18f72e6559d18e39dcbfbc826d8 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 31 09:55:09 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 09:55:09 +0000 Subject: [PATCH] openbsc[master]: TEST: conflict with: tweak db debug log: log TMSI as hex Message-ID: Review at https://gerrit.osmocom.org/132 TEST: conflict with: tweak db debug log: log TMSI as hex Change-Id: I140fcb95793a863e9d233a5c88156b6727261129 --- M openbsc/src/libmsc/db.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/32/132/1 diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c index b3235bb..1033d36 100644 --- a/openbsc/src/libmsc/db.c +++ b/openbsc/src/libmsc/db.c @@ -908,7 +908,7 @@ subscr->id = dbi_result_get_ulonglong(result, "id"); db_set_from_query(subscr, result); - DEBUGP(DDB, "Found Subscriber: ID %llu, IMSI %s, NAME '%s', TMSI %u, EXTEN '%s', LAC %hu, AUTH %u\n", + DEBUGP(DDB, "Found Subscriber: ID %llu, IMSI %s, NAME '%s', TMSI %d, EXTEN '%s', LAC %hu, AUTH %u\n", subscr->id, subscr->imsi, subscr->name, subscr->tmsi, subscr->extension, subscr->lac, subscr->authorized); dbi_result_free(result); -- To view, visit https://gerrit.osmocom.org/132 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I140fcb95793a863e9d233a5c88156b6727261129 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 31 09:55:09 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 09:55:09 +0000 Subject: [PATCH] openbsc[master]: TEST: branch with conflict, newest commit on branch (doesn't... Message-ID: Review at https://gerrit.osmocom.org/133 TEST: branch with conflict, newest commit on branch (doesn't conflict) Change-Id: I8d8d1aab5006f36a0e553e782b854b6954972fa5 --- M openbsc/src/libmsc/mncc.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/33/133/1 diff --git a/openbsc/src/libmsc/mncc.c b/openbsc/src/libmsc/mncc.c index 8110ead..b8468e5 100644 --- a/openbsc/src/libmsc/mncc.c +++ b/openbsc/src/libmsc/mncc.c @@ -20,6 +20,7 @@ * */ +/* BAR CAR PAR test 123 */ #include #include -- To view, visit https://gerrit.osmocom.org/133 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8d8d1aab5006f36a0e553e782b854b6954972fa5 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 31 10:00:17 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 31 May 2016 10:00:17 +0000 Subject: [PATCH] libosmocore[master]: Add helper functions for AMR codec In-Reply-To: References: Message-ID: Hello Jenkins Builder, Holger Freyther, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/118 to look at the new patch set (#6). Add helper functions for AMR codec * add functions to encode/decode various codec paramters from RTP payload with AMR frame according to RFC 4867 * those functions are extended version based on code from osmo-bts' amr.c by Andreas Eversberg * add corresponding enum types and strings for logging * add regression tests It's useful both to replace manual parsing in osmo-bts with fuctions covered by test suite and as a debugging helpers for issues related to AMR. Change-Id: Ia217679a07d3fbc970f435e20f6eac33d34bd597 Related: OS#1562 --- M .gitignore M include/osmocom/codec/codec.h M src/codec/Makefile.am M src/codec/gsm690.c M tests/Makefile.am A tests/codec/codec_test.c A tests/codec/codec_test.ok M tests/testsuite.at 8 files changed, 245 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/18/118/6 diff --git a/.gitignore b/.gitignore index 03ce379..70e2016 100644 --- a/.gitignore +++ b/.gitignore @@ -80,6 +80,7 @@ tests/ringbuf/ringbuf_test tests/strrb/strrb_test tests/vty/vty_test +tests/codec/codec_test tests/gb/gprs_bssgp_test tests/smscb/gsm0341_test tests/bitvec/bitvec_test diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h index d126e0f..b7bcc78 100644 --- a/include/osmocom/codec/codec.h +++ b/include/osmocom/codec/codec.h @@ -2,6 +2,8 @@ #include +#include + extern const uint16_t gsm610_bitorder[]; /* FR */ extern const uint16_t gsm620_unvoiced_bitorder[]; /* HR unvoiced */ extern const uint16_t gsm620_voiced_bitorder[]; /* HR voiced */ @@ -15,3 +17,32 @@ extern const uint16_t gsm690_5_9_bitorder[]; /* AMR 5.9 kbits */ extern const uint16_t gsm690_5_15_bitorder[]; /* AMR 5.15 kbits */ extern const uint16_t gsm690_4_75_bitorder[]; /* AMR 4.75 kbits */ + +extern const struct value_string osmo_amr_type_names[]; + +enum osmo_amr_type { + AMR_4_75 = 0, + AMR_5_15 = 1, + AMR_5_90 = 2, + AMR_6_70 = 3, + AMR_7_40 = 4, + AMR_7_95 = 5, + AMR_10_2 = 6, + AMR_12_2 = 7, + AMR_SID = 8, + AMR_GSM_EFR_SID = 9, + AMR_TDMA_EFR_SID = 10, + AMR_PDC_EFR_SID = 11, + AMR_NO_DATA = 15, +}; + +enum osmo_amr_quality { + AMR_BAD = 0, + AMR_GOOD = 1 +}; + +int osmo_amr_rtp_enc(uint8_t *payload, uint8_t cmr, enum osmo_amr_type ft, + enum osmo_amr_quality bfi); +int osmo_amr_rtp_dec(const uint8_t *payload, int payload_len, uint8_t *cmr, + int8_t *cmi, enum osmo_amr_type *ft, + enum osmo_amr_quality *bfi, int8_t *sti); diff --git a/src/codec/Makefile.am b/src/codec/Makefile.am index b4834e5..619897f 100644 --- a/src/codec/Makefile.am +++ b/src/codec/Makefile.am @@ -2,7 +2,7 @@ # Please read Chapter 6 "Library interface versions" of the libtool documentation before making any modification LIBVERSION=0:0:0 -AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include $(TALLOC_CFLAGS) AM_CFLAGS = -Wall lib_LTLIBRARIES = libosmocodec.la diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c index fdf3302..0f4bf8f 100644 --- a/src/codec/gsm690.c +++ b/src/codec/gsm690.c @@ -22,7 +22,12 @@ */ #include +#include +#include +#include +#include +#include /* * These table map between the raw encoder parameter output and * the format used before channel coding. Both in GSM and in various @@ -208,3 +213,104 @@ 88, 90, 91, 34, 55, 68, 89, 37, 58, 71, 92, 31, 52, 65, 86, }; + +static const uint8_t amr_len_by_ft[16] = { + 12, 13, 15, 17, 19, 20, 26, 31, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +const struct value_string osmo_amr_type_names[] = { + { AMR_4_75, "AMR 4,75 kbits/s" }, + { AMR_5_15, "AMR 5,15 kbit/s" }, + { AMR_5_90, "AMR 5,90 kbit/s" }, + { AMR_6_70, "AMR 6,70 kbit/s (PDC-EFR)" }, + { AMR_7_40, "AMR 7,40 kbit/s (TDMA-EFR)" }, + { AMR_7_95, "AMR 7,95 kbit/s" }, + { AMR_10_2, "AMR 10,2 kbit/s" }, + { AMR_12_2, "AMR 12,2 kbit/s (GSM-EFR)" }, + { AMR_SID, "AMR SID" }, + { AMR_GSM_EFR_SID, "GSM-EFR SID" }, + { AMR_TDMA_EFR_SID, "TDMA-EFR SID" }, + { AMR_PDC_EFR_SID, "PDC-EFR SID" }, + { AMR_NO_DATA, "No Data/NA" }, + { 0, NULL }, +}; + +/*! \brief Decode various AMR parameters from RTP payload (RFC 4867) acording to + * 3GPP TS 26.101 + * \param[in] rtppayload Payload from RTP packet + * \param[in] payload_len length of rtppayload + * \param[out] cmr AMR Codec Mode Request, not filled if NULL + * \param[out] cmi AMR Codec Mode Indicator, -1 if not applicable for this type, + * not filled if NULL + * \param[out] ft AMR Frame Type, not filled if NULL + * \param[out] bfi AMR Bad Frame Indicator, not filled if NULL + * \param[out] sti AMR SID Type Indicator, -1 if not applicable for this type, + * not filled if NULL + * \returns length of AMR data or negative value on error + */ +int osmo_amr_rtp_dec(const uint8_t *rtppayload, int payload_len, uint8_t *cmr, + int8_t *cmi, enum osmo_amr_type *ft, + enum osmo_amr_quality *bfi, int8_t *sti) +{ + /* RFC 4867 ? 4.4.2 ToC - compound payloads are not supported: F = 0 */ + uint8_t type = (rtppayload[1] >> 3) & 0xf; + + /* compound payloads are not supported */ + if (rtppayload[1] >> 7) + return -ENOTSUP; + + if (payload_len - 2 < amr_len_by_ft[type]) + return -ENOTSUP; + + if (payload_len < 2) + return -EINVAL; + + if (ft) + *ft = type; + + if (cmr) + *cmr = rtppayload[0] >> 4; + + if (bfi) + *bfi = (rtppayload[1] >> 2) & 1; + + /* Table 6 in 3GPP TS 26.101 */ + if (cmi) + *cmi = (type == AMR_SID) ? ((rtppayload[6] >> 1) & 7) : -1; + + if (sti) + *sti = (type == AMR_SID) ? (rtppayload[6] & 0x10) : -1; + + return 2 + amr_len_by_ft[type]; +} + +/*! \brief Encode various AMR parameters from RTP payload (RFC 4867) + * \param[out] payload Payload for RTP packet, contains speech data (if any) + * except for have 2 first bytes where header will be built + * \param[in] cmr AMR codec Mode Request + * \param[in] ft AMR Frame Type + * \param[in] bfi AMR Bad Frame Indicator + * \returns length of AMR data (header + ToC + speech data) or negative value + * on error + * + * Note: only octet-aligned mode is supported so the header occupies 2 full + * bytes. Optional interleaving header is not supported. + */ +int osmo_amr_rtp_enc(uint8_t *payload, uint8_t cmr, enum osmo_amr_type ft, + enum osmo_amr_quality bfi) +{ + if (cmr > 15) + return -EINVAL; + + if (ft > 15) + return -ENOTSUP; + + /* RFC 4867 ? 4.3.1 payload header */ + payload[0] = cmr << 4; + + /* RFC 4867 ? 4.4.2 ToC - compound payloads are not supported: F = 0 */ + payload[1] = (((uint8_t)ft) << 3) | (((uint8_t)bfi) << 2); + + /* speech data */ + return 2 + amr_len_by_ft[ft]; +} diff --git a/tests/Makefile.am b/tests/Makefile.am index 6c9929b..55aaa07 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -8,7 +8,7 @@ gsm0808/gsm0808_test gsm0408/gsm0408_test \ gb/bssgp_fc_test gb/gprs_bssgp_test gb/gprs_ns_test \ gprs/gprs_test kasumi/kasumi_test \ - logging/logging_test fr/fr_test \ + logging/logging_test fr/fr_test codec/codec_test \ loggingrb/loggingrb_test strrb/strrb_test \ vty/vty_test comp128/comp128_test utils/utils_test \ smscb/gsm0341_test stats/stats_test \ @@ -97,6 +97,9 @@ fr_fr_test_SOURCES = fr/fr_test.c fr_fr_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gb/libosmogb.la $(LIBRARY_DL) +codec_codec_test_SOURCES = codec/codec_test.c +codec_codec_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/codec/libosmocodec.la + loggingrb_loggingrb_test_SOURCES = loggingrb/loggingrb_test.c loggingrb_loggingrb_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/vty/libosmovty.la @@ -141,7 +144,7 @@ gsm0808/gsm0808_test.ok gb/bssgp_fc_tests.err \ gb/bssgp_fc_tests.ok gb/bssgp_fc_tests.sh \ gb/gprs_bssgp_test.ok gb/gprs_ns_test.ok \ - gprs/gprs_test.ok kasumi/kasumi_test.ok \ + gprs/gprs_test.ok kasumi/kasumi_test.ok codec/codec_test.ok \ msgfile/msgfile_test.ok msgfile/msgconfig.cfg \ logging/logging_test.ok logging/logging_test.err \ fr/fr_test.ok loggingrb/logging_test.ok \ diff --git a/tests/codec/codec_test.c b/tests/codec/codec_test.c new file mode 100644 index 0000000..4905dd3 --- /dev/null +++ b/tests/codec/codec_test.c @@ -0,0 +1,86 @@ +/* + * (C) 2016 by Sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include + +#include +#include + +const uint8_t sid_update[] = {0x20, 0x44, 0x29, 0xc2, 0x92, 0x91, 0xf4}; +const uint8_t sid_first[] = {0x20, 0x44, 0x00, 0x00, 0x00, 0x00, 0x04}; + +#define PAYLOAD_LEN 34 +#define SID_LEN 7 + +static const char * cmpr(int a, int b) +{ + return (a == b) ? "OK" : "BAD"; +} + +static void test_sid_dec(const uint8_t *t, size_t len) +{ + uint8_t cmr, tmp[SID_LEN]; + enum osmo_amr_type ft; + enum osmo_amr_quality bfi; + int8_t sti, cmi; + memcpy(tmp, t, SID_LEN); + int rc = osmo_amr_rtp_dec(tmp, len, &cmr, &cmi, &ft, &bfi, &sti); + printf("[%d] decode RTP %s%s: FT %s, CMR %s, CMI is %d, SID type %s\t", + rc, osmo_hexdump(tmp, len), cmpr(bfi, AMR_GOOD), + get_value_string(osmo_amr_type_names, ft), + get_value_string(osmo_amr_type_names, cmr), + cmi, sti ? "UPDATE" : "FIRST"); + if (sti == -1) + printf("FAIL: incompatible STI for SID\n"); + rc = osmo_amr_rtp_enc(tmp, cmr, ft, bfi); + printf("[%d] encode [%d]\n", rc, memcmp(tmp, t, SID_LEN)); +} + +static void test_amr_rt(uint8_t _cmr, enum osmo_amr_type _ft, + enum osmo_amr_quality _bfi) +{ + uint8_t cmr, payload[PAYLOAD_LEN]; + enum osmo_amr_type ft; + enum osmo_amr_quality bfi; + int8_t sti, cmi; + int rc, re = osmo_amr_rtp_enc(payload, _cmr, _ft, _bfi); + rc = osmo_amr_rtp_dec(payload, PAYLOAD_LEN, &cmr, &cmi, &ft, &bfi, &sti); + printf("[%d/%d] %s, CMR: %s, FT: %s, BFI: %s, CMI: %d, STI: %d\n", re, + rc, get_value_string(osmo_amr_type_names, ft), + cmpr(_cmr, cmr), cmpr(_ft, ft), cmpr(_bfi, bfi), cmi, sti); +} + +int main(int argc, char **argv) +{ + printf("AMR RTP payload decoder test:\n"); + test_sid_dec(sid_first, 7); + test_sid_dec(sid_update, 7); + test_amr_rt(0, AMR_NO_DATA, AMR_BAD); + test_amr_rt(0, AMR_NO_DATA, AMR_GOOD); + test_amr_rt(AMR_12_2, AMR_12_2, AMR_BAD); + test_amr_rt(AMR_12_2, AMR_12_2, AMR_GOOD); + test_amr_rt(AMR_7_40, AMR_7_40, AMR_BAD); + test_amr_rt(AMR_7_40, AMR_7_40, AMR_GOOD); + + return 0; +} + + diff --git a/tests/codec/codec_test.ok b/tests/codec/codec_test.ok new file mode 100644 index 0000000..0f76fef --- /dev/null +++ b/tests/codec/codec_test.ok @@ -0,0 +1,9 @@ +AMR RTP payload decoder test: +[2] decode RTP 20 44 00 00 00 00 04 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type FIRST [2] encode [0] +[2] decode RTP 20 44 29 c2 92 91 f4 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type UPDATE [2] encode [0] +[2/2] No Data/NA, CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 +[2/2] No Data/NA, CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 +[33/33] AMR 12,2 kbit/s (GSM-EFR), CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 +[33/33] AMR 12,2 kbit/s (GSM-EFR), CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 +[21/21] AMR 7,40 kbit/s (TDMA-EFR), CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 +[21/21] AMR 7,40 kbit/s (TDMA-EFR), CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 diff --git a/tests/testsuite.at b/tests/testsuite.at index aa269af..d49f7ff 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -115,12 +115,17 @@ AT_CHECK([$abs_top_builddir/tests/logging/logging_test], [0], [expout], [experr]) AT_CLEANUP +AT_SETUP([codec]) +AT_KEYWORDS([codec]) +cat $abs_srcdir/codec/codec_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/codec/codec_test], [0], [expout], [ignore]) +AT_CLEANUP + AT_SETUP([fr]) AT_KEYWORDS([fr]) cat $abs_srcdir/fr/fr_test.ok > expout cat $abs_srcdir/fr/fr_test.err > experr AT_CHECK([$abs_top_builddir/tests/fr/fr_test], [0], [expout], [experr]) - AT_CLEANUP AT_SETUP([loggingrb]) -- To view, visit https://gerrit.osmocom.org/118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia217679a07d3fbc970f435e20f6eac33d34bd597 Gerrit-PatchSet: 6 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From nhofmeyr at sysmocom.de Tue May 31 10:00:26 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Tue, 31 May 2016 12:00:26 +0200 Subject: Gerrit and branches In-Reply-To: <7B348B51-2B98-42D4-A1FA-2D3BD89DD13D@freyther.de> References: <20160526191624.GA23739@macbookair> <20160527114759.GA7867@dub6> <20160527193241.GA5348@macbookair> <20160530103928.GB1902@dub6> <84A6B17B-B124-4A98-9A23-FA9653B14294@freyther.de> <20160530165653.GA4555@dub6> <7B348B51-2B98-42D4-A1FA-2D3BD89DD13D@freyther.de> Message-ID: <20160531100026.GA9270@ass40.sysmocom.de> On Mon, May 30, 2016 at 09:00:05PM +0200, Holger Freyther wrote: > Do you know you can directly clone from ssh (one command)? like, use the ssh shell access and then I get the hook cloned along?? > You can also define one _remote_ and have different pull/push urls (okay would require post-clone work but maybe a script)? > > git config remote.origin.pushurl ssh://:29418/.git > git config remote.origin.push refs/heads/*:refs/for/* > git push origin Ah ok, that would be better. Can I also push -f to users/* branches in a similar fashion? > Okay, maybe a clone script? I assume you have one already? not yet, I have only put openbsc and libosmocore on gerrit so far. > $ cat git gerrit-clone git://git.osmocom.org/libosmocore interesting, you can cat git URLs these days! ;) > #!/bin/sh > set -e > git clone $1 > cd `basename $1 git` > git config remote.origin.pushurl ... > git config remote.origin.push.. > scp .. .git/hooks > echo "tada" heh "tada" If we can have the users branch push enabled I'll complete the script and put it in the Gerrit wiki page. > yes, a change in muscle memory. When cloning you have to remember your gerrit username and that the repository was using gerrit. But from daily workflow it doesn't look that bad? I have to type "users/" a lot more :P (ok see below) But it would help to get rid of the duplicate remotes = duplicate branches. For me personally, the gerrit username matches my shell username, so no problem there. > Either way you have to make the mental decision if you push a wip branch or if you want to have review. that's not a problem. But one more thing here: pushing a branch to gerrit is slightly easier than format-patch, but what is really cumbersome now is to push just one commit from a private branch (cherry pick to for/master). With git format-patch I could just supply a range 123abc..ef0987, with gerrit I first need to create a fresh branch with just that commit. Especially if I have a couple of unrelated commits sitting in line on a private branch and I want to submit them separately, I have to create a new branch for each single commit to push for/master. Do I? > > - access rules = obstructed access to branches = add 'users/' to all private branches > > = we have scores of old branches now in a namespace we can't use anymore > > Then let's create one group like you did and allow everything for that group again? So one manual intervention and one can push to everything again. No issue with that. agreed. I have allowed global push permission for the "known users" group. Since we already have a sysmocom group, sysmocom/* push permission is still exclusive for the sysmocom group. I also made push to master exclusive to admins as a gimmick. I hope it doesn't interfere with the normal merges, we can just drop the rule again if it does. > Under Projects -> "openbsc.git" change it to "Rebase if necessary" and give it a small try (push a slightly outdated commit so we can see I did that and submitted two test branches with two commits each: One should not have any conflicts during a rebase: https://gerrit.osmocom.org/130 https://gerrit.osmocom.org/131 The other should have a conflict on the first commit: https://gerrit.osmocom.org/132 https://gerrit.osmocom.org/133 For some reason both the second commits on the branches also show a conflict. changed back to 'cherry pick' for now. ~Neels -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From gerrit-no-reply at lists.osmocom.org Tue May 31 10:04:08 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 10:04:08 +0000 Subject: [PATCH] openbsc[master]: TEST: outdated branch without conflict, on 'cherry pick' mode Message-ID: Review at https://gerrit.osmocom.org/134 TEST: outdated branch without conflict, on 'cherry pick' mode Change-Id: Ic47afc6ea2da93721a4d7f852ca37d734051147c --- M openbsc/src/libbsc/bsc_init.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/34/134/1 diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c index 5c27862..647de2c 100644 --- a/openbsc/src/libbsc/bsc_init.c +++ b/openbsc/src/libbsc/bsc_init.c @@ -19,6 +19,8 @@ * */ +/* TEST COMMIT */ + #include #include #include -- To view, visit https://gerrit.osmocom.org/134 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic47afc6ea2da93721a4d7f852ca37d734051147c Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 31 10:04:08 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 10:04:08 +0000 Subject: [PATCH] openbsc[master]: TEST: outdated branch without conflict, on 'cherry pick' mod... Message-ID: Review at https://gerrit.osmocom.org/135 TEST: outdated branch without conflict, on 'cherry pick' mode, newest Change-Id: I23fff0b065ee0d967dccdc286f7d806416b5ab15 --- M openbsc/src/libbsc/paging.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/35/135/1 diff --git a/openbsc/src/libbsc/paging.c b/openbsc/src/libbsc/paging.c index 9ae28e0..1df056e 100644 --- a/openbsc/src/libbsc/paging.c +++ b/openbsc/src/libbsc/paging.c @@ -17,6 +17,8 @@ * */ +/* TEST COMMIT */ + /* * Relevant specs: * 12.21: -- To view, visit https://gerrit.osmocom.org/135 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I23fff0b065ee0d967dccdc286f7d806416b5ab15 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 31 10:11:16 2016 From: gerrit-no-reply at lists.osmocom.org (Vadim Yanitskiy) Date: Tue, 31 May 2016 10:11:16 +0000 Subject: osmo-bts[master]: octphy: Update outdated config param name in error message. In-Reply-To: References: Message-ID: Patch Set 2: (1 comment) > Change has been successfully cherry-picked as 0778cd488a6696772e2fda32ee9ab9889f439d62 > by Holger Freyther https://gerrit.osmocom.org/#/c/129/2/src/osmo-bts-octphy/l1_if.c File src/osmo-bts-octphy/l1_if.c: Line 1621: LOGP(DL1C, LOGL_ERROR, "You have to specify a octphy net-device\n"); Maybe it would be better to use the 'an' article instead of 'a'? -- To view, visit https://gerrit.osmocom.org/129 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I45b8bc09c9aabacc5b908450fe574b5802b88be8 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: lazlo Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Vadim Yanitskiy Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue May 31 10:11:38 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 May 2016 10:11:38 +0000 Subject: libosmocore[master]: Add helper functions for AMR codec In-Reply-To: References: Message-ID: Patch Set 6: Code-Review+2 (1 comment) https://gerrit.osmocom.org/#/c/118/6/tests/codec/codec_test.c File tests/codec/codec_test.c: Line 54: printf("[%d] encode [%d]\n", rc, memcmp(tmp, t, SID_LEN)); Okay. I will accept this to not have you spend more time on it. One thing both Jacob and me learned the hardway is: * Capturing textual output is good to catch accidental changes * But it is not replacing OSMO_ASSERT. So e.g. in future tests use OSMO_ASSERT on that memcmp. I am accepting this change now. -- To view, visit https://gerrit.osmocom.org/118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia217679a07d3fbc970f435e20f6eac33d34bd597 Gerrit-PatchSet: 6 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue May 31 10:11:51 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 May 2016 10:11:51 +0000 Subject: [MERGED] libosmocore[master]: Add helper functions for AMR codec In-Reply-To: References: Message-ID: Holger Freyther has submitted this change and it was merged. Change subject: Add helper functions for AMR codec ...................................................................... Add helper functions for AMR codec * add functions to encode/decode various codec paramters from RTP payload with AMR frame according to RFC 4867 * those functions are extended version based on code from osmo-bts' amr.c by Andreas Eversberg * add corresponding enum types and strings for logging * add regression tests It's useful both to replace manual parsing in osmo-bts with fuctions covered by test suite and as a debugging helpers for issues related to AMR. Change-Id: Ia217679a07d3fbc970f435e20f6eac33d34bd597 Related: OS#1562 Reviewed-on: https://gerrit.osmocom.org/118 Tested-by: Jenkins Builder Reviewed-by: Holger Freyther --- M .gitignore M include/osmocom/codec/codec.h M src/codec/Makefile.am M src/codec/gsm690.c M tests/Makefile.am A tests/codec/codec_test.c A tests/codec/codec_test.ok M tests/testsuite.at 8 files changed, 245 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified Holger Freyther: Looks good to me, approved diff --git a/.gitignore b/.gitignore index 03ce379..70e2016 100644 --- a/.gitignore +++ b/.gitignore @@ -80,6 +80,7 @@ tests/ringbuf/ringbuf_test tests/strrb/strrb_test tests/vty/vty_test +tests/codec/codec_test tests/gb/gprs_bssgp_test tests/smscb/gsm0341_test tests/bitvec/bitvec_test diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h index d126e0f..b7bcc78 100644 --- a/include/osmocom/codec/codec.h +++ b/include/osmocom/codec/codec.h @@ -2,6 +2,8 @@ #include +#include + extern const uint16_t gsm610_bitorder[]; /* FR */ extern const uint16_t gsm620_unvoiced_bitorder[]; /* HR unvoiced */ extern const uint16_t gsm620_voiced_bitorder[]; /* HR voiced */ @@ -15,3 +17,32 @@ extern const uint16_t gsm690_5_9_bitorder[]; /* AMR 5.9 kbits */ extern const uint16_t gsm690_5_15_bitorder[]; /* AMR 5.15 kbits */ extern const uint16_t gsm690_4_75_bitorder[]; /* AMR 4.75 kbits */ + +extern const struct value_string osmo_amr_type_names[]; + +enum osmo_amr_type { + AMR_4_75 = 0, + AMR_5_15 = 1, + AMR_5_90 = 2, + AMR_6_70 = 3, + AMR_7_40 = 4, + AMR_7_95 = 5, + AMR_10_2 = 6, + AMR_12_2 = 7, + AMR_SID = 8, + AMR_GSM_EFR_SID = 9, + AMR_TDMA_EFR_SID = 10, + AMR_PDC_EFR_SID = 11, + AMR_NO_DATA = 15, +}; + +enum osmo_amr_quality { + AMR_BAD = 0, + AMR_GOOD = 1 +}; + +int osmo_amr_rtp_enc(uint8_t *payload, uint8_t cmr, enum osmo_amr_type ft, + enum osmo_amr_quality bfi); +int osmo_amr_rtp_dec(const uint8_t *payload, int payload_len, uint8_t *cmr, + int8_t *cmi, enum osmo_amr_type *ft, + enum osmo_amr_quality *bfi, int8_t *sti); diff --git a/src/codec/Makefile.am b/src/codec/Makefile.am index b4834e5..619897f 100644 --- a/src/codec/Makefile.am +++ b/src/codec/Makefile.am @@ -2,7 +2,7 @@ # Please read Chapter 6 "Library interface versions" of the libtool documentation before making any modification LIBVERSION=0:0:0 -AM_CPPFLAGS = -I$(top_srcdir)/include +AM_CPPFLAGS = -I$(top_srcdir)/include $(TALLOC_CFLAGS) AM_CFLAGS = -Wall lib_LTLIBRARIES = libosmocodec.la diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c index fdf3302..0f4bf8f 100644 --- a/src/codec/gsm690.c +++ b/src/codec/gsm690.c @@ -22,7 +22,12 @@ */ #include +#include +#include +#include +#include +#include /* * These table map between the raw encoder parameter output and * the format used before channel coding. Both in GSM and in various @@ -208,3 +213,104 @@ 88, 90, 91, 34, 55, 68, 89, 37, 58, 71, 92, 31, 52, 65, 86, }; + +static const uint8_t amr_len_by_ft[16] = { + 12, 13, 15, 17, 19, 20, 26, 31, 0, 0, 0, 0, 0, 0, 0, 0 +}; + +const struct value_string osmo_amr_type_names[] = { + { AMR_4_75, "AMR 4,75 kbits/s" }, + { AMR_5_15, "AMR 5,15 kbit/s" }, + { AMR_5_90, "AMR 5,90 kbit/s" }, + { AMR_6_70, "AMR 6,70 kbit/s (PDC-EFR)" }, + { AMR_7_40, "AMR 7,40 kbit/s (TDMA-EFR)" }, + { AMR_7_95, "AMR 7,95 kbit/s" }, + { AMR_10_2, "AMR 10,2 kbit/s" }, + { AMR_12_2, "AMR 12,2 kbit/s (GSM-EFR)" }, + { AMR_SID, "AMR SID" }, + { AMR_GSM_EFR_SID, "GSM-EFR SID" }, + { AMR_TDMA_EFR_SID, "TDMA-EFR SID" }, + { AMR_PDC_EFR_SID, "PDC-EFR SID" }, + { AMR_NO_DATA, "No Data/NA" }, + { 0, NULL }, +}; + +/*! \brief Decode various AMR parameters from RTP payload (RFC 4867) acording to + * 3GPP TS 26.101 + * \param[in] rtppayload Payload from RTP packet + * \param[in] payload_len length of rtppayload + * \param[out] cmr AMR Codec Mode Request, not filled if NULL + * \param[out] cmi AMR Codec Mode Indicator, -1 if not applicable for this type, + * not filled if NULL + * \param[out] ft AMR Frame Type, not filled if NULL + * \param[out] bfi AMR Bad Frame Indicator, not filled if NULL + * \param[out] sti AMR SID Type Indicator, -1 if not applicable for this type, + * not filled if NULL + * \returns length of AMR data or negative value on error + */ +int osmo_amr_rtp_dec(const uint8_t *rtppayload, int payload_len, uint8_t *cmr, + int8_t *cmi, enum osmo_amr_type *ft, + enum osmo_amr_quality *bfi, int8_t *sti) +{ + /* RFC 4867 ? 4.4.2 ToC - compound payloads are not supported: F = 0 */ + uint8_t type = (rtppayload[1] >> 3) & 0xf; + + /* compound payloads are not supported */ + if (rtppayload[1] >> 7) + return -ENOTSUP; + + if (payload_len - 2 < amr_len_by_ft[type]) + return -ENOTSUP; + + if (payload_len < 2) + return -EINVAL; + + if (ft) + *ft = type; + + if (cmr) + *cmr = rtppayload[0] >> 4; + + if (bfi) + *bfi = (rtppayload[1] >> 2) & 1; + + /* Table 6 in 3GPP TS 26.101 */ + if (cmi) + *cmi = (type == AMR_SID) ? ((rtppayload[6] >> 1) & 7) : -1; + + if (sti) + *sti = (type == AMR_SID) ? (rtppayload[6] & 0x10) : -1; + + return 2 + amr_len_by_ft[type]; +} + +/*! \brief Encode various AMR parameters from RTP payload (RFC 4867) + * \param[out] payload Payload for RTP packet, contains speech data (if any) + * except for have 2 first bytes where header will be built + * \param[in] cmr AMR codec Mode Request + * \param[in] ft AMR Frame Type + * \param[in] bfi AMR Bad Frame Indicator + * \returns length of AMR data (header + ToC + speech data) or negative value + * on error + * + * Note: only octet-aligned mode is supported so the header occupies 2 full + * bytes. Optional interleaving header is not supported. + */ +int osmo_amr_rtp_enc(uint8_t *payload, uint8_t cmr, enum osmo_amr_type ft, + enum osmo_amr_quality bfi) +{ + if (cmr > 15) + return -EINVAL; + + if (ft > 15) + return -ENOTSUP; + + /* RFC 4867 ? 4.3.1 payload header */ + payload[0] = cmr << 4; + + /* RFC 4867 ? 4.4.2 ToC - compound payloads are not supported: F = 0 */ + payload[1] = (((uint8_t)ft) << 3) | (((uint8_t)bfi) << 2); + + /* speech data */ + return 2 + amr_len_by_ft[ft]; +} diff --git a/tests/Makefile.am b/tests/Makefile.am index 6c9929b..55aaa07 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -8,7 +8,7 @@ gsm0808/gsm0808_test gsm0408/gsm0408_test \ gb/bssgp_fc_test gb/gprs_bssgp_test gb/gprs_ns_test \ gprs/gprs_test kasumi/kasumi_test \ - logging/logging_test fr/fr_test \ + logging/logging_test fr/fr_test codec/codec_test \ loggingrb/loggingrb_test strrb/strrb_test \ vty/vty_test comp128/comp128_test utils/utils_test \ smscb/gsm0341_test stats/stats_test \ @@ -97,6 +97,9 @@ fr_fr_test_SOURCES = fr/fr_test.c fr_fr_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/gb/libosmogb.la $(LIBRARY_DL) +codec_codec_test_SOURCES = codec/codec_test.c +codec_codec_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/codec/libosmocodec.la + loggingrb_loggingrb_test_SOURCES = loggingrb/loggingrb_test.c loggingrb_loggingrb_test_LDADD = $(top_builddir)/src/libosmocore.la $(top_builddir)/src/vty/libosmovty.la @@ -141,7 +144,7 @@ gsm0808/gsm0808_test.ok gb/bssgp_fc_tests.err \ gb/bssgp_fc_tests.ok gb/bssgp_fc_tests.sh \ gb/gprs_bssgp_test.ok gb/gprs_ns_test.ok \ - gprs/gprs_test.ok kasumi/kasumi_test.ok \ + gprs/gprs_test.ok kasumi/kasumi_test.ok codec/codec_test.ok \ msgfile/msgfile_test.ok msgfile/msgconfig.cfg \ logging/logging_test.ok logging/logging_test.err \ fr/fr_test.ok loggingrb/logging_test.ok \ diff --git a/tests/codec/codec_test.c b/tests/codec/codec_test.c new file mode 100644 index 0000000..4905dd3 --- /dev/null +++ b/tests/codec/codec_test.c @@ -0,0 +1,86 @@ +/* + * (C) 2016 by Sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +#include +#include +#include + +#include +#include + +const uint8_t sid_update[] = {0x20, 0x44, 0x29, 0xc2, 0x92, 0x91, 0xf4}; +const uint8_t sid_first[] = {0x20, 0x44, 0x00, 0x00, 0x00, 0x00, 0x04}; + +#define PAYLOAD_LEN 34 +#define SID_LEN 7 + +static const char * cmpr(int a, int b) +{ + return (a == b) ? "OK" : "BAD"; +} + +static void test_sid_dec(const uint8_t *t, size_t len) +{ + uint8_t cmr, tmp[SID_LEN]; + enum osmo_amr_type ft; + enum osmo_amr_quality bfi; + int8_t sti, cmi; + memcpy(tmp, t, SID_LEN); + int rc = osmo_amr_rtp_dec(tmp, len, &cmr, &cmi, &ft, &bfi, &sti); + printf("[%d] decode RTP %s%s: FT %s, CMR %s, CMI is %d, SID type %s\t", + rc, osmo_hexdump(tmp, len), cmpr(bfi, AMR_GOOD), + get_value_string(osmo_amr_type_names, ft), + get_value_string(osmo_amr_type_names, cmr), + cmi, sti ? "UPDATE" : "FIRST"); + if (sti == -1) + printf("FAIL: incompatible STI for SID\n"); + rc = osmo_amr_rtp_enc(tmp, cmr, ft, bfi); + printf("[%d] encode [%d]\n", rc, memcmp(tmp, t, SID_LEN)); +} + +static void test_amr_rt(uint8_t _cmr, enum osmo_amr_type _ft, + enum osmo_amr_quality _bfi) +{ + uint8_t cmr, payload[PAYLOAD_LEN]; + enum osmo_amr_type ft; + enum osmo_amr_quality bfi; + int8_t sti, cmi; + int rc, re = osmo_amr_rtp_enc(payload, _cmr, _ft, _bfi); + rc = osmo_amr_rtp_dec(payload, PAYLOAD_LEN, &cmr, &cmi, &ft, &bfi, &sti); + printf("[%d/%d] %s, CMR: %s, FT: %s, BFI: %s, CMI: %d, STI: %d\n", re, + rc, get_value_string(osmo_amr_type_names, ft), + cmpr(_cmr, cmr), cmpr(_ft, ft), cmpr(_bfi, bfi), cmi, sti); +} + +int main(int argc, char **argv) +{ + printf("AMR RTP payload decoder test:\n"); + test_sid_dec(sid_first, 7); + test_sid_dec(sid_update, 7); + test_amr_rt(0, AMR_NO_DATA, AMR_BAD); + test_amr_rt(0, AMR_NO_DATA, AMR_GOOD); + test_amr_rt(AMR_12_2, AMR_12_2, AMR_BAD); + test_amr_rt(AMR_12_2, AMR_12_2, AMR_GOOD); + test_amr_rt(AMR_7_40, AMR_7_40, AMR_BAD); + test_amr_rt(AMR_7_40, AMR_7_40, AMR_GOOD); + + return 0; +} + + diff --git a/tests/codec/codec_test.ok b/tests/codec/codec_test.ok new file mode 100644 index 0000000..0f76fef --- /dev/null +++ b/tests/codec/codec_test.ok @@ -0,0 +1,9 @@ +AMR RTP payload decoder test: +[2] decode RTP 20 44 00 00 00 00 04 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type FIRST [2] encode [0] +[2] decode RTP 20 44 29 c2 92 91 f4 OK: FT AMR SID, CMR AMR 5,90 kbit/s, CMI is 2, SID type UPDATE [2] encode [0] +[2/2] No Data/NA, CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 +[2/2] No Data/NA, CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 +[33/33] AMR 12,2 kbit/s (GSM-EFR), CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 +[33/33] AMR 12,2 kbit/s (GSM-EFR), CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 +[21/21] AMR 7,40 kbit/s (TDMA-EFR), CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 +[21/21] AMR 7,40 kbit/s (TDMA-EFR), CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 diff --git a/tests/testsuite.at b/tests/testsuite.at index aa269af..d49f7ff 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -115,12 +115,17 @@ AT_CHECK([$abs_top_builddir/tests/logging/logging_test], [0], [expout], [experr]) AT_CLEANUP +AT_SETUP([codec]) +AT_KEYWORDS([codec]) +cat $abs_srcdir/codec/codec_test.ok > expout +AT_CHECK([$abs_top_builddir/tests/codec/codec_test], [0], [expout], [ignore]) +AT_CLEANUP + AT_SETUP([fr]) AT_KEYWORDS([fr]) cat $abs_srcdir/fr/fr_test.ok > expout cat $abs_srcdir/fr/fr_test.err > experr AT_CHECK([$abs_top_builddir/tests/fr/fr_test], [0], [expout], [experr]) - AT_CLEANUP AT_SETUP([loggingrb]) -- To view, visit https://gerrit.osmocom.org/118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia217679a07d3fbc970f435e20f6eac33d34bd597 Gerrit-PatchSet: 7 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder From nhofmeyr at sysmocom.de Tue May 31 10:14:08 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Tue, 31 May 2016 12:14:08 +0200 Subject: Gerrit and branches In-Reply-To: <20160531100026.GA9270@ass40.sysmocom.de> References: <20160526191624.GA23739@macbookair> <20160527114759.GA7867@dub6> <20160527193241.GA5348@macbookair> <20160530103928.GB1902@dub6> <84A6B17B-B124-4A98-9A23-FA9653B14294@freyther.de> <20160530165653.GA4555@dub6> <7B348B51-2B98-42D4-A1FA-2D3BD89DD13D@freyther.de> <20160531100026.GA9270@ass40.sysmocom.de> Message-ID: <20160531101408.GA10526@ass40.sysmocom.de> On Tue, May 31, 2016 at 12:00:26PM +0200, Neels Hofmeyr wrote: > I did that and submitted two test branches with two commits each: > > One should not have any conflicts during a rebase: > https://gerrit.osmocom.org/130 > https://gerrit.osmocom.org/131 > > The other should have a conflict on the first commit: > https://gerrit.osmocom.org/132 > https://gerrit.osmocom.org/133 > > For some reason both the second commits on the branches also show a > conflict. > > changed back to 'cherry pick' for now. Did another branch commit without conflict in cherry pick mode, and the commits show as "Related" but not "Submitted together"... That's not news I guess. ~Neels -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From nhofmeyr at sysmocom.de Tue May 31 10:18:13 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Tue, 31 May 2016 12:18:13 +0200 Subject: Gerrit and branches In-Reply-To: <20160531100026.GA9270@ass40.sysmocom.de> References: <20160526191624.GA23739@macbookair> <20160527114759.GA7867@dub6> <20160527193241.GA5348@macbookair> <20160530103928.GB1902@dub6> <84A6B17B-B124-4A98-9A23-FA9653B14294@freyther.de> <20160530165653.GA4555@dub6> <7B348B51-2B98-42D4-A1FA-2D3BD89DD13D@freyther.de> <20160531100026.GA9270@ass40.sysmocom.de> Message-ID: <20160531101813.GB10526@ass40.sysmocom.de> On Tue, May 31, 2016 at 12:00:26PM +0200, Neels Hofmeyr wrote: > One should not have any conflicts during a rebase: > https://gerrit.osmocom.org/130 > https://gerrit.osmocom.org/131 There's a conflict on 131 that shouldn't happen. Does anyone know how to see gerrit's problem with this commit? ~Neels -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From gerrit-no-reply at lists.osmocom.org Tue May 31 10:19:49 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 31 May 2016 10:19:49 +0000 Subject: libosmocore[master]: Add helper functions for AMR codec In-Reply-To: References: Message-ID: Patch Set 7: Could you clarify when OSMO_ASSERT would catch the failure but textual output wouldn't? -- To view, visit https://gerrit.osmocom.org/118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia217679a07d3fbc970f435e20f6eac33d34bd597 Gerrit-PatchSet: 7 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 31 10:21:52 2016 From: gerrit-no-reply at lists.osmocom.org (Holger Freyther) Date: Tue, 31 May 2016 10:21:52 +0000 Subject: libosmocore[master]: Add helper functions for AMR codec In-Reply-To: References: Message-ID: Patch Set 7: Of course textual output would catch a change in return value of memcmp. The issue we had is that as part of a bigger change so much output was changed that something that should have been catched by an OSMO_ASSERT was not. So my point is: * Use OSMO_ASSERT for a strong post-condition/result check * Have the output as a safety net for side-effects and accidental changes -- To view, visit https://gerrit.osmocom.org/118 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia217679a07d3fbc970f435e20f6eac33d34bd597 Gerrit-PatchSet: 7 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From nhofmeyr at sysmocom.de Tue May 31 10:26:18 2016 From: nhofmeyr at sysmocom.de (Neels Hofmeyr) Date: Tue, 31 May 2016 12:26:18 +0200 Subject: branch namespaces: allowing push outside of users/* Message-ID: <20160531102618.GA10681@ass40.sysmocom.de> Hi all, this is just to let you know that from now on the "known users" of gerrit are allowed to create and push -f to branches outside of the users/ namespace again. ~Neels -- - Neels Hofmeyr http://www.sysmocom.de/ ======================================================================= * sysmocom - systems for mobile communications GmbH * Alt-Moabit 93 * 10559 Berlin, Germany * Sitz / Registered office: Berlin, HRB 134158 B * Gesch?ftsf?hrer / Managing Directors: Holger Freyther, Harald Welte -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From gerrit-no-reply at lists.osmocom.org Tue May 31 11:19:48 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 31 May 2016 11:19:48 +0000 Subject: [PATCH] osmo-pcu[master]: RFC: remove this == NULL checks Message-ID: Review at https://gerrit.osmocom.org/136 RFC: remove this == NULL checks The compile should ensure that this == NULL should never happen Change-Id: Ifddaef70bb0a4402050c817b1000d515c3a7118b --- M src/llc.h M src/tbf.cpp 2 files changed, 2 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/36/136/1 diff --git a/src/llc.h b/src/llc.h index 94de16e..4883624 100644 --- a/src/llc.h +++ b/src/llc.h @@ -127,10 +127,10 @@ inline size_t gprs_llc_queue::size() const { - return this ? m_queue_size : 0; + return m_queue_size; } inline size_t gprs_llc_queue::octets() const { - return this ? m_queue_octets : 0; + return m_queue_octets; } diff --git a/src/tbf.cpp b/src/tbf.cpp index 69b9e3a..51705e2 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -1181,9 +1181,6 @@ const char *gprs_rlcmac_tbf::name() const { - if (this == NULL) - return "(no TBF)"; - snprintf(m_name_buf, sizeof(m_name_buf) - 1, "TBF(TFI=%d TLLI=0x%08x DIR=%s STATE=%s%s)", m_tfi, tlli(), -- To view, visit https://gerrit.osmocom.org/136 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifddaef70bb0a4402050c817b1000d515c3a7118b Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue May 31 11:21:02 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:21:02 +0000 Subject: [ABANDON] openbsc[master]: TEST: outdated branch without conflict, on 'cherry pick' mode In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: TEST: outdated branch without conflict, on 'cherry pick' mode ...................................................................... Abandoned test -- To view, visit https://gerrit.osmocom.org/134 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ic47afc6ea2da93721a4d7f852ca37d734051147c Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 31 11:21:11 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:21:11 +0000 Subject: [ABANDON] openbsc[master]: TEST: outdated branch without conflict, on 'cherry pick' mod... In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: TEST: outdated branch without conflict, on 'cherry pick' mode, newest ...................................................................... Abandoned test -- To view, visit https://gerrit.osmocom.org/135 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I23fff0b065ee0d967dccdc286f7d806416b5ab15 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 31 11:23:58 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:23:58 +0000 Subject: [PATCH] openbsc[master]: TEST: outdated branch without conflict, on 'merge if neccesa... Message-ID: Review at https://gerrit.osmocom.org/137 TEST: outdated branch without conflict, on 'merge if neccesary' mode Change-Id: Ieb3111732458cff43e10878aa8b97dde5af179d8 --- M openbsc/src/libbsc/bsc_init.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/37/137/1 diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c index 5c27862..647de2c 100644 --- a/openbsc/src/libbsc/bsc_init.c +++ b/openbsc/src/libbsc/bsc_init.c @@ -19,6 +19,8 @@ * */ +/* TEST COMMIT */ + #include #include #include -- To view, visit https://gerrit.osmocom.org/137 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ieb3111732458cff43e10878aa8b97dde5af179d8 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 31 11:23:58 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:23:58 +0000 Subject: [PATCH] openbsc[master]: TEST: branch without conflict, on 'merge if neccessary' mode... Message-ID: Review at https://gerrit.osmocom.org/138 TEST: branch without conflict, on 'merge if neccessary' mode, newest Change-Id: Id9ea0ead92a0c4bf023ef058a416b43d329fb622 --- M openbsc/src/libbsc/paging.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/38/138/1 diff --git a/openbsc/src/libbsc/paging.c b/openbsc/src/libbsc/paging.c index 9ae28e0..1df056e 100644 --- a/openbsc/src/libbsc/paging.c +++ b/openbsc/src/libbsc/paging.c @@ -17,6 +17,8 @@ * */ +/* TEST COMMIT */ + /* * Relevant specs: * 12.21: -- To view, visit https://gerrit.osmocom.org/138 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id9ea0ead92a0c4bf023ef058a416b43d329fb622 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 31 11:24:54 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:24:54 +0000 Subject: [ABANDON] openbsc[master]: TEST: outdated branch without conflict, on 'merge if neccesa... In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: TEST: outdated branch without conflict, on 'merge if neccesary' mode ...................................................................... Abandoned test -- To view, visit https://gerrit.osmocom.org/137 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ieb3111732458cff43e10878aa8b97dde5af179d8 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 31 11:24:58 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:24:58 +0000 Subject: [ABANDON] openbsc[master]: TEST: branch without conflict, on 'merge if neccessary' mode... In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: TEST: branch without conflict, on 'merge if neccessary' mode, newest ...................................................................... Abandoned test -- To view, visit https://gerrit.osmocom.org/138 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Id9ea0ead92a0c4bf023ef058a416b43d329fb622 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 31 11:25:37 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 31 May 2016 11:25:37 +0000 Subject: [PATCH] osmo-pcu[master]: decoding: improve and add comments Message-ID: Review at https://gerrit.osmocom.org/139 decoding: improve and add comments Change-Id: I45c9fc55243224909ca2fdece8cbfa686b0f444d --- M src/decoding.cpp M src/decoding.h 2 files changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/39/139/1 diff --git a/src/decoding.cpp b/src/decoding.cpp index 0c81b2a..5f64ac0 100644 --- a/src/decoding.cpp +++ b/src/decoding.cpp @@ -32,7 +32,7 @@ #include #define LENGTH_TO_END 255 -/* +/*! * \returns num extensions fields (num frames == offset) on success, * -errno otherwise. */ @@ -197,6 +197,7 @@ e = rdbi->e; if (e) { if (chunks_size > 0) { + /* Block without LI means it only contains data of one LLC PDU */ chunks[num_chunks].offset = offs; chunks[num_chunks].length = LENGTH_TO_END; chunks[num_chunks].is_complete = is_last_block; diff --git a/src/decoding.h b/src/decoding.h index 1043d67..50c9e7d 100644 --- a/src/decoding.h +++ b/src/decoding.h @@ -28,10 +28,11 @@ class Decoding { public: + /* represents (parts) LLC PDUs within one RLC Data block */ struct RlcData { uint8_t offset; uint8_t length; - bool is_complete; + bool is_complete; /* if this PDU ends in this block */ }; static int rlc_data_from_ul_data( -- To view, visit https://gerrit.osmocom.org/139 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I45c9fc55243224909ca2fdece8cbfa686b0f444d Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue May 31 11:25:37 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 31 May 2016 11:25:37 +0000 Subject: [PATCH] osmo-pcu[master]: decoding: remove superfluous double-semicolon Message-ID: Review at https://gerrit.osmocom.org/140 decoding: remove superfluous double-semicolon Change-Id: I48ec24f2e10620279cbcbf39c70a4be6438f6b0f --- M src/decoding.cpp 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/40/140/1 diff --git a/src/decoding.cpp b/src/decoding.cpp index 5f64ac0..2600879 100644 --- a/src/decoding.cpp +++ b/src/decoding.cpp @@ -267,7 +267,7 @@ * so drop it (this may happen with EGPRS since * there is no M flag. */ num_chunks -= 1; - break;; + break; } chunks[i].length = data_len - offs; } -- To view, visit https://gerrit.osmocom.org/140 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I48ec24f2e10620279cbcbf39c70a4be6438f6b0f Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue May 31 11:25:37 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 31 May 2016 11:25:37 +0000 Subject: [PATCH] osmo-pcu[master]: encoding: add doxygen for rlc_data_to_dl_append* Message-ID: Review at https://gerrit.osmocom.org/141 encoding: add doxygen for rlc_data_to_dl_append* Change-Id: I6ead0f1d14a91c657448227e17438b49a54e6c4a --- M src/encoding.cpp 1 file changed, 31 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/41/141/1 diff --git a/src/encoding.cpp b/src/encoding.cpp index 6c50abe..9dba4f6 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -891,6 +891,16 @@ return rdbi->data_len; } +/*! + * \brief (GPRS) put llc pdu into an rlc/mac block. fragment the llc pdu if needed + * \param rdbi rlc/mac block info + * \param llc llc pdu + * \param offset given offset within the rlc/mac block + * \param num_chunks count the chunks (llc pdu data) within rlc/mac + * \param data_block buffer holds rlc/mac data + * \param is_final if this is the last rlc/mac within a TBF + * \return the state of the rlc/mac like if there is more space for another chunk + */ static Encoding::AppendResult rlc_data_to_dl_append_gprs( struct gprs_rlc_data_block_info *rdbi, gprs_llc *llc, int *offset, int *num_chunks, @@ -1012,6 +1022,16 @@ return Encoding::AR_COMPLETED_BLOCK_FILLED; } +/*! + * \brief (EGPRS) put llc pdu into an rlc/mac block. fragment the llc pdu if needed + * \param rdbi rlc/mac block info + * \param llc llc pdu + * \param offset given offset within the rlc/mac block + * \param num_chunks count the chunks (llc pdu data) within rlc/mac + * \param data_block buffer holds rlc/mac data + * \param is_final if this is the last rlc/mac within a TBF + * \return the state of the rlc/mac like if there is more space for another chunk + */ static Encoding::AppendResult rlc_data_to_dl_append_egprs( struct gprs_rlc_data_block_info *rdbi, gprs_llc *llc, int *offset, int *num_chunks, @@ -1154,6 +1174,17 @@ return Encoding::AR_COMPLETED_BLOCK_FILLED; } +/*! + * \brief Encoding::rlc_data_to_dl_append + * \param rdbi rlc/mac block info + * \param cs the coding scheme to use + * \param llc llc pdu + * \param offset given offset within the rlc/mac block + * \param num_chunks count the chunks (llc pdu data) within rlc/mac + * \param data_block buffer holds rlc/mac data + * \param is_final if this is the last rlc/mac within a TBF + * \return the state of the rlc/mac like if there is more space for another chunk + */ Encoding::AppendResult Encoding::rlc_data_to_dl_append( struct gprs_rlc_data_block_info *rdbi, GprsCodingScheme cs, gprs_llc *llc, int *offset, int *num_chunks, -- To view, visit https://gerrit.osmocom.org/141 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6ead0f1d14a91c657448227e17438b49a54e6c4a Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue May 31 11:25:37 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 31 May 2016 11:25:37 +0000 Subject: [PATCH] osmo-pcu[master]: encoding/rlc_copy_from_aligned_buffer: export written payloa... Message-ID: Review at https://gerrit.osmocom.org/142 encoding/rlc_copy_from_aligned_buffer: export written payload bytes via an argument Require to count statistics for rlc_dl_payload_bytes. Change-Id: I0e622acb1f13f7489946baf049de4ba1cde6a1fc --- M src/encoding.cpp M src/encoding.h M src/tbf_dl.cpp M tests/edge/EdgeTest.cpp 4 files changed, 49 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/42/142/1 diff --git a/src/encoding.cpp b/src/encoding.cpp index 9dba4f6..2102a1e 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -899,13 +899,13 @@ * \param num_chunks count the chunks (llc pdu data) within rlc/mac * \param data_block buffer holds rlc/mac data * \param is_final if this is the last rlc/mac within a TBF + * \param count_payload if not NULL save the written size of payload in bytes into it * \return the state of the rlc/mac like if there is more space for another chunk */ static Encoding::AppendResult rlc_data_to_dl_append_gprs( struct gprs_rlc_data_block_info *rdbi, gprs_llc *llc, int *offset, int *num_chunks, - uint8_t *data_block, - bool is_final) + uint8_t *data_block, bool is_final, int *count_payload) { int chunk; int space; @@ -930,6 +930,8 @@ *e_pointer |= 0x01; /* fill only space */ llc->consume(data, space); + if (count_payload) + *count_payload = space; /* return data block as message */ *offset = rdbi->data_len; (*num_chunks)++; @@ -947,6 +949,8 @@ *e_pointer |= 0x01; /* fill space */ llc->consume(data, space); + if (count_payload) + *count_payload = space; *offset = rdbi->data_len; (*num_chunks)++; rdbi->cv = 0; @@ -974,6 +978,8 @@ // no need to set e_pointer nor increase delimiter /* fill only space, which is 1 octet less than chunk */ llc->consume(data, space); + if (count_payload) + *count_payload = space; /* return data block as message */ *offset = rdbi->data_len; (*num_chunks)++; @@ -999,6 +1005,8 @@ (*num_chunks)++; /* copy (rest of) LLC frame to space and reset later */ llc->consume(data, chunk); + if (count_payload) + *count_payload = chunk; data += chunk; space -= chunk; (*offset) += chunk; @@ -1030,13 +1038,14 @@ * \param num_chunks count the chunks (llc pdu data) within rlc/mac * \param data_block buffer holds rlc/mac data * \param is_final if this is the last rlc/mac within a TBF + * \param count_payload if not NULL save the written size of payload in bytes into it * \return the state of the rlc/mac like if there is more space for another chunk */ static Encoding::AppendResult rlc_data_to_dl_append_egprs( struct gprs_rlc_data_block_info *rdbi, gprs_llc *llc, int *offset, int *num_chunks, uint8_t *data_block, - bool is_final) + bool is_final, int *count_payload) { int chunk; int space; @@ -1060,6 +1069,8 @@ chunk, space); /* fill only space */ llc->consume(data, space); + if (count_payload) + *count_payload = space; /* return data block as message */ *offset = rdbi->data_len; (*num_chunks)++; @@ -1074,6 +1085,8 @@ "header, and we are done\n", chunk, space); /* fill space */ llc->consume(data, space); + if (count_payload) + *count_payload = space; *offset = rdbi->data_len; (*num_chunks)++; rdbi->cv = 0; @@ -1088,6 +1101,8 @@ chunk, space); /* fill space */ llc->consume(data, space); + if (count_payload) + *count_payload = space; *offset = rdbi->data_len; (*num_chunks)++; return Encoding::AR_NEED_MORE_BLOCKS; @@ -1118,6 +1133,8 @@ (*num_chunks)++; /* copy (rest of) LLC frame to space and reset later */ llc->consume(data, chunk); + if (count_payload) + *count_payload = chunk; data += chunk; space -= chunk; (*offset) += chunk; @@ -1183,21 +1200,23 @@ * \param num_chunks count the chunks (llc pdu data) within rlc/mac * \param data_block buffer holds rlc/mac data * \param is_final if this is the last rlc/mac within a TBF + * \param count_payload if not NULL save the written size of payload in bytes into it * \return the state of the rlc/mac like if there is more space for another chunk */ Encoding::AppendResult Encoding::rlc_data_to_dl_append( struct gprs_rlc_data_block_info *rdbi, GprsCodingScheme cs, gprs_llc *llc, int *offset, int *num_chunks, - uint8_t *data_block, - bool is_final) + uint8_t *data_block, bool is_final, int *count_payload) { if (cs.isGprs()) return rlc_data_to_dl_append_gprs(rdbi, - llc, offset, num_chunks, data_block, is_final); + llc, offset, num_chunks, data_block, is_final, + count_payload); if (cs.isEgprs()) return rlc_data_to_dl_append_egprs(rdbi, - llc, offset, num_chunks, data_block, is_final); + llc, offset, num_chunks, data_block, is_final, + count_payload); LOGP(DRLCMACDL, LOGL_ERROR, "%s data block encoding not implemented\n", cs.name()); diff --git a/src/encoding.h b/src/encoding.h index 94e9a02..710de78 100644 --- a/src/encoding.h +++ b/src/encoding.h @@ -91,6 +91,5 @@ static AppendResult rlc_data_to_dl_append( struct gprs_rlc_data_block_info *rdbi, GprsCodingScheme cs, gprs_llc *llc, int *offset, int *num_chunks, - uint8_t *data, - bool is_final); + uint8_t *data, bool is_final, int *count_payload); }; diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index da6628a..00adbc9 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -538,7 +538,7 @@ is_final = llc_queue()->size() == 0 && !keep_open(fn); ar = Encoding::rlc_data_to_dl_append(rdbi, cs, - &m_llc, &write_offset, &num_chunks, data, is_final); + &m_llc, &write_offset, &num_chunks, data, is_final, NULL); if (ar == Encoding::AR_NEED_MORE_BLOCKS) break; diff --git a/tests/edge/EdgeTest.cpp b/tests/edge/EdgeTest.cpp index 96ea0c1..fef4abb 100644 --- a/tests/edge/EdgeTest.cpp +++ b/tests/edge/EdgeTest.cpp @@ -524,7 +524,7 @@ llc.put_frame(llc_data, 11); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); @@ -535,7 +535,7 @@ llc.put_frame(llc_data, 26); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); @@ -546,7 +546,7 @@ llc.put_frame(llc_data, 99); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_NEED_MORE_BLOCKS); OSMO_ASSERT(rdbi.e == 0); @@ -571,7 +571,7 @@ llc.put_frame(llc_data, 20); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_NEED_MORE_BLOCKS); OSMO_ASSERT(rdbi.e == 0); @@ -590,7 +590,7 @@ OSMO_ASSERT(llc.chunk_size() == 1); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); @@ -601,7 +601,7 @@ llc.put_frame(llc_data, 99); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_NEED_MORE_BLOCKS); OSMO_ASSERT(rdbi.e == 0); @@ -624,7 +624,7 @@ llc.put_frame(llc_data, 7); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); @@ -635,7 +635,7 @@ llc.put_frame(llc_data, 11); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_BLOCK_FILLED); OSMO_ASSERT(rdbi.e == 0); @@ -659,7 +659,7 @@ llc.put_frame(llc_data, 99); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_NEED_MORE_BLOCKS); OSMO_ASSERT(rdbi.e == 1); @@ -705,7 +705,7 @@ llc.put_frame(llc_data, 30); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_NEED_MORE_BLOCKS); OSMO_ASSERT(rdbi.e == 1); @@ -723,7 +723,7 @@ OSMO_ASSERT(llc.chunk_size() == 10); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); @@ -734,7 +734,7 @@ llc.put_frame(llc_data, 99); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_NEED_MORE_BLOCKS); OSMO_ASSERT(rdbi.e == 0); @@ -757,7 +757,7 @@ llc.put_frame(llc_data, 11); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); @@ -768,7 +768,7 @@ llc.put_frame(llc_data, 26); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); @@ -779,7 +779,7 @@ llc.put_frame(llc_data, 99); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_NEED_MORE_BLOCKS); OSMO_ASSERT(rdbi.e == 0); @@ -809,7 +809,7 @@ llc.put_frame(llc_data, 15); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); @@ -820,7 +820,7 @@ llc.put_frame(llc_data, 12); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_NEED_MORE_BLOCKS); OSMO_ASSERT(rdbi.e == 0); @@ -840,7 +840,7 @@ OSMO_ASSERT(llc.chunk_size() == 0); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); @@ -851,7 +851,7 @@ llc.put_frame(llc_data, 7); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); @@ -863,7 +863,7 @@ llc.put_frame(llc_data, 18); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_BLOCK_FILLED); OSMO_ASSERT(rdbi.e == 0); @@ -886,7 +886,7 @@ llc.put_frame(llc_data, 6); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); -- To view, visit https://gerrit.osmocom.org/142 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0e622acb1f13f7489946baf049de4ba1cde6a1fc Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue May 31 11:25:38 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 31 May 2016 11:25:38 +0000 Subject: [PATCH] osmo-pcu[master]: tbf_dl: comment why we sent a dummy LLC packets to delay the... Message-ID: Review at https://gerrit.osmocom.org/143 tbf_dl: comment why we sent a dummy LLC packets to delay the release of the TBF Change-Id: I1862674437dffef4de3ffa7b183ecf690020b0ec --- M src/tbf_dl.cpp 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/43/143/1 diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 00adbc9..66f747b 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -515,6 +515,8 @@ bool is_final; if (m_llc.frame_length() == 0) { + /* nothing to sent - delay the release of the TBF */ + int space = block_data_len - write_offset; /* A header will need to by added, so we just need * space-1 octets */ -- To view, visit https://gerrit.osmocom.org/143 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1862674437dffef4de3ffa7b183ecf690020b0ec Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue May 31 11:25:38 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 31 May 2016 11:25:38 +0000 Subject: [PATCH] osmo-pcu[master]: rlc.h: correct gprs_rlc_data comment Message-ID: Review at https://gerrit.osmocom.org/144 rlc.h: correct gprs_rlc_data comment It's the block data, not the history. Also add including LI headers. Change-Id: Id4d99d1d21c7fa372771fd569d87bbcf2c6b6d22 --- M src/rlc.h 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/44/144/1 diff --git a/src/rlc.h b/src/rlc.h index 03659da..ad10b3a 100644 --- a/src/rlc.h +++ b/src/rlc.h @@ -113,9 +113,9 @@ uint8_t *prepare(size_t block_data_length); void put_data(const uint8_t *data, size_t len); - /* block history */ + /* block data including LI headers */ uint8_t block[RLC_MAX_LEN]; - /* block len of history */ + /* block data len including LI headers*/ uint8_t len; struct gprs_rlc_data_block_info block_info; -- To view, visit https://gerrit.osmocom.org/144 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id4d99d1d21c7fa372771fd569d87bbcf2c6b6d22 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue May 31 11:25:38 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 31 May 2016 11:25:38 +0000 Subject: [PATCH] osmo-pcu[master]: add KPI counter to count bytes for RLC and LLC frames Message-ID: Review at https://gerrit.osmocom.org/145 add KPI counter to count bytes for RLC and LLC frames rlc.dl_bytes bytes before sending rlc rlc.dl_payload_bytes count data w/o LI rlc.ul_bytes bytes when received rlc (only valid) rlc.ul_payload_bytes count data fragments w/o LI llc.dl_bytes complete encapsulated LLC PDUs llc.ul_bytes complete received LLC PDUs Change-Id: I9a98a5a375d39b3f4990360056c4d6145e755f4d --- M src/bts.cpp M src/bts.h M src/gprs_rlcmac_sched.cpp M src/tbf_dl.cpp M src/tbf_ul.cpp 5 files changed, 41 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/45/145/1 diff --git a/src/bts.cpp b/src/bts.cpp index 953ac4d..9e91b87 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -73,6 +73,10 @@ { "rlc.late-block", "RLC Late Block "}, { "rlc.sent-dummy", "RLC Sent Dummy "}, { "rlc.sent-control", "RLC Sent Control "}, + { "rlc.dl_bytes", "RLC DL Bytes "}, + { "rlc.dl_payload_bytes", "RLC DL Payload Bytes "}, + { "rlc.ul_bytes", "RLC UL Bytes "}, + { "rlc.ul_payload_bytes", "RLC UL Payload Bytes "}, { "decode.errors", "Decode Errors "}, { "sba.allocated", "SBA Allocated "}, { "sba.freed", "SBA Freed "}, @@ -80,6 +84,8 @@ { "llc.timeout", "Timedout Frames "}, { "llc.dropped", "Dropped Frames "}, { "llc.scheduled", "Scheduled Frames "}, + { "llc.dl_bytes", "RLC encapsulated PDUs"}, + { "llc.ul_bytes", "full PDUs received "}, { "rach.requests", "RACH requests "}, }; @@ -1302,6 +1308,8 @@ return -EINVAL; } + bts()->rlc_ul_bytes(len); + LOGP(DRLCMACUL, LOGL_DEBUG, "Got RLC block, coding scheme: %s, " "length: %d (%d))\n", cs.name(), len, cs.usedSizeUL()); diff --git a/src/bts.h b/src/bts.h index 35f24d1..a713c46 100644 --- a/src/bts.h +++ b/src/bts.h @@ -235,6 +235,10 @@ CTR_RLC_LATE_BLOCK, CTR_RLC_SENT_DUMMY, CTR_RLC_SENT_CONTROL, + CTR_RLC_DL_BYTES, + CTR_RLC_DL_PAYLOAD_BYTES, + CTR_RLC_UL_BYTES, + CTR_RLC_UL_PAYLOAD_BYTES, CTR_DECODE_ERRORS, CTR_SBA_ALLOCATED, CTR_SBA_FREED, @@ -242,6 +246,8 @@ CTR_LLC_FRAME_TIMEDOUT, CTR_LLC_FRAME_DROPPED, CTR_LLC_FRAME_SCHED, + CTR_LLC_DL_BYTES, + CTR_LLC_UL_BYTES, CTR_RACH_REQUESTS, }; @@ -313,6 +319,10 @@ void rlc_late_block(); void rlc_sent_dummy(); void rlc_sent_control(); + void rlc_dl_bytes(int bytes); + void rlc_dl_payload_bytes(int bytes); + void rlc_ul_bytes(int bytes); + void rlc_ul_payload_bytes(int bytes); void decode_error(); void sba_allocated(); void sba_freed(); @@ -320,6 +330,8 @@ void llc_timedout_frame(); void llc_dropped_frame(); void llc_frame_sched(); + void llc_dl_bytes(int bytes); + void llc_ul_bytes(int bytes); void rach_frame(); void ms_present(int32_t n); @@ -427,6 +439,11 @@ return m_statg; } +#define CREATE_COUNT_ADD_INLINE(func_name, ctr_name) \ + inline void BTS::func_name(int inc) {\ + rate_ctr_add(&m_ratectrs->ctr[ctr_name], inc); \ + } + #define CREATE_COUNT_INLINE(func_name, ctr_name) \ inline void BTS::func_name() {\ rate_ctr_inc(&m_ratectrs->ctr[ctr_name]); \ @@ -455,6 +472,10 @@ CREATE_COUNT_INLINE(rlc_late_block, CTR_RLC_LATE_BLOCK); CREATE_COUNT_INLINE(rlc_sent_dummy, CTR_RLC_SENT_DUMMY); CREATE_COUNT_INLINE(rlc_sent_control, CTR_RLC_SENT_CONTROL); +CREATE_COUNT_ADD_INLINE(rlc_dl_bytes, CTR_RLC_DL_BYTES); +CREATE_COUNT_ADD_INLINE(rlc_dl_payload_bytes, CTR_RLC_DL_PAYLOAD_BYTES); +CREATE_COUNT_ADD_INLINE(rlc_ul_bytes, CTR_RLC_UL_BYTES); +CREATE_COUNT_ADD_INLINE(rlc_ul_payload_bytes, CTR_RLC_UL_PAYLOAD_BYTES); CREATE_COUNT_INLINE(decode_error, CTR_DECODE_ERRORS) CREATE_COUNT_INLINE(sba_allocated, CTR_SBA_ALLOCATED) CREATE_COUNT_INLINE(sba_freed, CTR_SBA_FREED) @@ -462,6 +483,8 @@ CREATE_COUNT_INLINE(llc_timedout_frame, CTR_LLC_FRAME_TIMEDOUT); CREATE_COUNT_INLINE(llc_dropped_frame, CTR_LLC_FRAME_DROPPED); CREATE_COUNT_INLINE(llc_frame_sched, CTR_LLC_FRAME_SCHED); +CREATE_COUNT_ADD_INLINE(llc_dl_bytes, CTR_LLC_DL_BYTES); +CREATE_COUNT_ADD_INLINE(llc_ul_bytes, CTR_LLC_UL_BYTES); CREATE_COUNT_INLINE(rach_frame, CTR_RACH_REQUESTS); #undef CREATE_COUNT_INLINE diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index fce3aaf..0367ad0 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -360,6 +360,7 @@ if (!msg) return -ENOMEM; /* msg is now available */ + bts->bts->rlc_dl_bytes(msg->data_len); /* set USF */ OSMO_ASSERT(msgb_length(msg) > 0); diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 66f747b..5931676 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -513,6 +513,7 @@ do { bool is_final; + int payload_written = 0; if (m_llc.frame_length() == 0) { /* nothing to sent - delay the release of the TBF */ @@ -540,7 +541,10 @@ is_final = llc_queue()->size() == 0 && !keep_open(fn); ar = Encoding::rlc_data_to_dl_append(rdbi, cs, - &m_llc, &write_offset, &num_chunks, data, is_final, NULL); + &m_llc, &write_offset, &num_chunks, data, is_final, &payload_written); + + if (payload_written > 0) + bts->rlc_dl_payload_bytes(payload_written); if (ar == Encoding::AR_NEED_MORE_BLOCKS) break; @@ -548,6 +552,7 @@ LOGP(DRLCMACDL, LOGL_INFO, "Complete DL frame for %s" "len=%d\n", tbf_name(this), m_llc.frame_length()); gprs_rlcmac_dl_bw(this, m_llc.frame_length()); + bts->llc_dl_bytes(m_llc.frame_length()); m_llc.reset(); if (is_final) { diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index e7c64ad..98962d1 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -67,6 +67,8 @@ for (i = 0; i < num_frames; i++) { frame = frames + i; + bts->rlc_ul_payload_bytes(frame->length); + LOGP(DRLCMACUL, LOGL_DEBUG, "-- Frame %d starts at offset %d, " "length=%d, is_complete=%d\n", i + 1, frame->offset, frame->length, frame->is_complete); @@ -79,6 +81,7 @@ LOGP(DRLCMACUL, LOGL_INFO, "%s complete UL frame len=%d\n", tbf_name(this) , m_llc.frame_length()); snd_ul_ud(); + bts->llc_ul_bytes(m_llc.frame_length()); m_llc.reset(); } } -- To view, visit https://gerrit.osmocom.org/145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9a98a5a375d39b3f4990360056c4d6145e755f4d Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue May 31 11:41:51 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:41:51 +0000 Subject: [PATCH] openbsc[master]: TEST: 123 Message-ID: Review at https://gerrit.osmocom.org/146 TEST: 123 Change-Id: Ib02c29e60cb4ad44f70d657b2847acfe808cfda9 --- M openbsc/src/libbsc/bsc_init.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/46/146/1 diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c index 5c27862..647de2c 100644 --- a/openbsc/src/libbsc/bsc_init.c +++ b/openbsc/src/libbsc/bsc_init.c @@ -19,6 +19,8 @@ * */ +/* TEST COMMIT */ + #include #include #include -- To view, visit https://gerrit.osmocom.org/146 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib02c29e60cb4ad44f70d657b2847acfe808cfda9 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 31 11:41:51 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:41:51 +0000 Subject: [PATCH] openbsc[master]: TEST: 456 Message-ID: Review at https://gerrit.osmocom.org/147 TEST: 456 Change-Id: Iee3860cadb28abed774e9e7e9c5295c1262222e0 --- M openbsc/src/libbsc/paging.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/47/147/1 diff --git a/openbsc/src/libbsc/paging.c b/openbsc/src/libbsc/paging.c index 9ae28e0..1df056e 100644 --- a/openbsc/src/libbsc/paging.c +++ b/openbsc/src/libbsc/paging.c @@ -17,6 +17,8 @@ * */ +/* TEST COMMIT */ + /* * Relevant specs: * 12.21: -- To view, visit https://gerrit.osmocom.org/147 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iee3860cadb28abed774e9e7e9c5295c1262222e0 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 31 11:42:46 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:42:46 +0000 Subject: [PATCH] openbsc[master]: rename enum gprs_mm_state to gprs_gmm_state Message-ID: Review at https://gerrit.osmocom.org/148 rename enum gprs_mm_state to gprs_gmm_state Change-Id: I4617b009fdaf2485a3d407b4b9f457ee6b59f3ac --- M openbsc/include/openbsc/gprs_sgsn.h 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/48/148/1 diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h index 898b7a5..5fbbf28 100644 --- a/openbsc/include/openbsc/gprs_sgsn.h +++ b/openbsc/include/openbsc/gprs_sgsn.h @@ -23,7 +23,7 @@ enum gsm48_gsm_cause; /* TS 04.08 4.1.3.3 GMM mobility management states on the network side */ -enum gprs_mm_state { +enum gprs_gmm_state { GMM_DEREGISTERED, /* 4.1.3.3.1.1 */ GMM_COMMON_PROC_INIT, /* 4.1.3.3.1.2 */ GMM_REGISTERED_NORMAL, /* 4.1.3.3.2.1 */ @@ -98,7 +98,7 @@ struct llist_head list; char imsi[GSM23003_IMSI_MAX_DIGITS+1]; - enum gprs_mm_state mm_state; + enum gprs_gmm_state mm_state; uint32_t p_tmsi; uint32_t p_tmsi_old; /* old P-TMSI before new is confirmed */ uint32_t p_tmsi_sig; -- To view, visit https://gerrit.osmocom.org/148 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4617b009fdaf2485a3d407b4b9f457ee6b59f3ac Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Tue May 31 11:42:47 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:42:47 +0000 Subject: [PATCH] openbsc[master]: prepare sgsn_mm_ctx for Gb and Iu mode (UMTS) Message-ID: Review at https://gerrit.osmocom.org/149 prepare sgsn_mm_ctx for Gb and Iu mode (UMTS) Explicitly mark those sgsn_mm_ctx members that apply for Gb mode and (upcoming) Iu mode, respectively. Add some comments in sgsn_mm_ctx. Change-Id: I88aa520b0bf18219b7f29a0682dae26bc3a46686 Tweaked-By: Neels Hofmeyr --- M openbsc/include/openbsc/gprs_sgsn.h M openbsc/src/gprs/gprs_gmm.c M openbsc/src/gprs/gprs_llc.c M openbsc/src/gprs/gprs_sgsn.c M openbsc/src/gprs/sgsn_cdr.c M openbsc/src/gprs/sgsn_libgtp.c M openbsc/src/gprs/sgsn_vty.c M openbsc/tests/sgsn/sgsn_test.c 8 files changed, 135 insertions(+), 86 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/49/149/1 diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h index 5fbbf28..0e574d8 100644 --- a/openbsc/include/openbsc/gprs_sgsn.h +++ b/openbsc/include/openbsc/gprs_sgsn.h @@ -92,10 +92,28 @@ uint8_t ti; }; +enum sgsn_ran_type { + /* GPRS/EDGE via Gb */ + MM_CTX_T_GERAN_Gb, + /* UMTS via Iu */ + MM_CTX_T_UTRAN_Iu, + /* GPRS/EDGE via Iu */ + MM_CTX_T_GERAN_Iu, +}; + +struct service_info { + uint8_t type; + uint16_t pdp_status; +}; + +struct ue_conn_ctx; + /* According to TS 03.60, Table 5: SGSN MM and PDP Contexts */ /* Extended by 3GPP TS 23.060, Table 6: SGSN MM and PDP Contexts */ struct sgsn_mm_ctx { struct llist_head list; + + enum sgsn_ran_type ran_type; char imsi[GSM23003_IMSI_MAX_DIGITS+1]; enum gprs_gmm_state mm_state; @@ -106,10 +124,32 @@ /* Opt: Software Version Numbber / TS 23.195 */ char msisdn[GSM_EXTENSION_LENGTH]; struct gprs_ra_id ra; - uint16_t cell_id; - uint32_t cell_id_age; - uint16_t sac; /* Iu: Service Area Code */ - uint32_t sac_age;/* Iu: Service Area Code age */ + struct { + uint16_t cell_id; /* Gb only */ + uint32_t cell_id_age; /* Gb only */ + uint8_t radio_prio_sms; + + /* Additional bits not present in the GSM TS */ + uint16_t nsei; + uint16_t bvci; + struct gprs_llc_llme *llme; + uint32_t tlli; + uint32_t tlli_new; + } gb; + struct { + int new_key; + uint16_t sac; /* Iu: Service Area Code */ + uint32_t sac_age; /* Iu: Service Area Code age */ + /* CSG ID */ + /* CSG Membership */ + /* Access Mode */ + /* Seelected CN Operator ID (TS 23.251) */ + /* CSG Subscription Data */ + /* LIPA Allowed */ + /* Voice Support Match Indicator */ + struct ue_conn_ctx *ue_ctx; + struct service_info service; + } iu; /* VLR number */ uint32_t new_sgsn_addr; /* Authentication Triplet */ @@ -118,30 +158,38 @@ /* Iu: CK, IK, KSI */ /* CKSN */ enum gprs_ciph_algo ciph_algo; + struct { uint8_t len; uint8_t buf[50]; /* GSM 04.08 10.5.5.12a, extended in TS 24.008 */ } ms_radio_access_capa; + /* Supported Codecs (SRVCC) */ struct { uint8_t len; uint8_t buf[8]; /* GSM 04.08 10.5.5.12, extended in TS 24.008 */ } ms_network_capa; + /* UE Netowrk Capability (E-UTRAN) */ uint16_t drx_parms; + /* Active Time value for PSM */ int mnrg; /* MS reported to HLR? */ int ngaf; /* MS reported to MSC/VLR? */ int ppf; /* paging for GPRS + non-GPRS? */ + /* Subscribed Charging Characteristics */ + /* Trace Reference */ + /* Trace Type */ + /* Trigger ID */ + /* OMC Identity */ /* SMS Parameters */ int recovery; - uint8_t radio_prio_sms; + /* Access Restriction */ + /* GPRS CSI (CAMEL) */ + /* MG-CSI (CAMEL) */ + /* Subscribed UE-AMBR */ + /* UE-AMBR */ + /* APN Subscribed */ struct llist_head pdp_list; - /* Additional bits not present in the GSM TS */ - struct gprs_llc_llme *llme; - uint32_t tlli; - uint32_t tlli_new; - uint16_t nsei; - uint16_t bvci; struct rate_ctr_group *ctrg; struct osmo_timer_list timer; unsigned int T; /* Txxxx number */ diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 2bbc5ff..889ac98 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -151,16 +151,16 @@ /* Store BVCI/NSEI in MM context */ static void msgid2mmctx(struct sgsn_mm_ctx *mm, const struct msgb *msg) { - mm->bvci = msgb_bvci(msg); - mm->nsei = msgb_nsei(msg); + mm->gb.bvci = msgb_bvci(msg); + mm->gb.nsei = msgb_nsei(msg); } /* Store BVCI/NSEI in MM context */ static void mmctx2msgid(struct msgb *msg, const struct sgsn_mm_ctx *mm) { - msgb_tlli(msg) = mm->tlli; - msgb_bvci(msg) = mm->bvci; - msgb_nsei(msg) = mm->nsei; + msgb_tlli(msg) = mm->gb.tlli; + msgb_bvci(msg) = mm->gb.bvci; + msgb_nsei(msg) = mm->gb.nsei; } static void mm_ctx_cleanup_free(struct sgsn_mm_ctx *ctx, const char *log_text) @@ -904,8 +904,8 @@ strncpy(ctx->imsi, mi_string, sizeof(ctx->imsi) - 1); #endif } - ctx->tlli = msgb_tlli(msg); - ctx->llme = llme; + ctx->gb.tlli = msgb_tlli(msg); + ctx->gb.llme = llme; msgid2mmctx(ctx, msg); break; case GSM_MI_TYPE_TMSI: @@ -920,8 +920,8 @@ ctx = sgsn_mm_ctx_alloc(msgb_tlli(msg), &ra_id); ctx->p_tmsi = tmsi; } - ctx->tlli = msgb_tlli(msg); - ctx->llme = llme; + ctx->gb.tlli = msgb_tlli(msg); + ctx->gb.llme = llme; msgid2mmctx(ctx, msg); break; default: @@ -932,7 +932,7 @@ } /* Update MM Context with currient RA and Cell ID */ ctx->ra = ra_id; - ctx->cell_id = cid; + ctx->gb.cell_id = cid; /* Update MM Context with other data */ ctx->drx_parms = drx_par; ctx->ms_radio_access_capa.len = ms_ra_acc_cap_len; @@ -952,10 +952,10 @@ #endif /* Even if there is no P-TMSI allocated, the MS will switch from * foreign TLLI to local TLLI */ - ctx->tlli_new = gprs_tmsi2tlli(ctx->p_tmsi, TLLI_LOCAL); + ctx->gb.tlli_new = gprs_tmsi2tlli(ctx->p_tmsi, TLLI_LOCAL); /* Inform LLC layer about new TLLI but keep old active */ - gprs_llgmm_assign(ctx->llme, ctx->tlli, ctx->tlli_new, + gprs_llgmm_assign(ctx->gb.llme, ctx->gb.tlli, ctx->gb.tlli_new, GPRS_ALGO_GEA0, NULL); ctx->pending_req = GSM48_MT_GMM_ATTACH_REQ; @@ -1182,7 +1182,7 @@ "TLLI: %08x (%08x), RA: %d-%d-%d-%d\n", msgb_tlli(msg), mmctx->p_tmsi, mmctx->p_tmsi_old, - mmctx->tlli, mmctx->tlli_new, + mmctx->gb.tlli, mmctx->gb.tlli_new, mmctx->ra.mcc, mmctx->ra.mnc, mmctx->ra.lac, mmctx->ra.rac); @@ -1219,7 +1219,7 @@ /* Update the MM context with the new RA-ID */ bssgp_parse_cell_id(&mmctx->ra, msgb_bcid(msg)); /* Update the MM context with the new (i.e. foreign) TLLI */ - mmctx->tlli = msgb_tlli(msg); + mmctx->gb.tlli = msgb_tlli(msg); /* FIXME: Update the MM context with the MS radio acc capabilities */ /* FIXME: Update the MM context with the MS network capabilities */ @@ -1246,10 +1246,10 @@ #endif /* Even if there is no P-TMSI allocated, the MS will switch from * foreign TLLI to local TLLI */ - mmctx->tlli_new = gprs_tmsi2tlli(mmctx->p_tmsi, TLLI_LOCAL); + mmctx->gb.tlli_new = gprs_tmsi2tlli(mmctx->p_tmsi, TLLI_LOCAL); /* Inform LLC layer about new TLLI but keep old active */ - gprs_llgmm_assign(mmctx->llme, mmctx->tlli, mmctx->tlli_new, + gprs_llgmm_assign(mmctx->gb.llme, mmctx->gb.tlli, mmctx->gb.tlli_new, GPRS_ALGO_GEA0, NULL); /* Look at PDP Context Status IE and see if MS's view of @@ -1369,8 +1369,8 @@ mmctx->p_tmsi_old = 0; mmctx->pending_req = 0; /* Unassign the old TLLI */ - mmctx->tlli = mmctx->tlli_new; - gprs_llgmm_assign(mmctx->llme, 0xffffffff, mmctx->tlli_new, + mmctx->gb.tlli = mmctx->gb.tlli_new; + gprs_llgmm_assign(mmctx->gb.llme, 0xffffffff, mmctx->gb.tlli_new, GPRS_ALGO_GEA0, NULL); mmctx->mm_state = GMM_REGISTERED_NORMAL; rc = 0; @@ -1387,8 +1387,8 @@ mmctx->p_tmsi_old = 0; mmctx->pending_req = 0; /* Unassign the old TLLI */ - mmctx->tlli = mmctx->tlli_new; - gprs_llgmm_assign(mmctx->llme, 0xffffffff, mmctx->tlli_new, + mmctx->gb.tlli = mmctx->gb.tlli_new; + gprs_llgmm_assign(mmctx->gb.llme, 0xffffffff, mmctx->gb.tlli_new, GPRS_ALGO_GEA0, NULL); mmctx->mm_state = GMM_REGISTERED_NORMAL; rc = 0; @@ -1404,8 +1404,8 @@ mmctx->p_tmsi_old = 0; mmctx->pending_req = 0; /* Unassign the old TLLI */ - mmctx->tlli = mmctx->tlli_new; - //gprs_llgmm_assign(mmctx->llme, 0xffffffff, mmctx->tlli_new, GPRS_ALGO_GEA0, NULL); + mmctx->gb.tlli = mmctx->gb.tlli_new; + //gprs_llgmm_assign(mmctx->gb.llme, 0xffffffff, mmctx->gb.tlli_new, GPRS_ALGO_GEA0, NULL); rc = 0; break; case GSM48_MT_GMM_AUTH_CIPH_RESP: @@ -2077,7 +2077,7 @@ int gsm0408_gprs_force_reattach(struct sgsn_mm_ctx *mmctx) { int rc; - gprs_llgmm_reset(mmctx->llme); + gprs_llgmm_reset(mmctx->gb.llme); rc = gsm48_tx_gmm_detach_req( mmctx, GPRS_DET_T_MT_REATT_REQ, GMM_CAUSE_IMPL_DETACHED); @@ -2101,7 +2101,7 @@ if (mmctx) { msgid2mmctx(mmctx, msg); rate_ctr_inc(&mmctx->ctrg->ctr[GMM_CTR_PKTS_SIG_IN]); - mmctx->llme = llme; + mmctx->gb.llme = llme; } /* MMCTX can be NULL */ diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c index 4cf5163..3a45f62 100644 --- a/openbsc/src/gprs/gprs_llc.c +++ b/openbsc/src/gprs/gprs_llc.c @@ -56,8 +56,8 @@ dup.ms_ra_cap.v = mmctx->ms_radio_access_capa.buf; /* make sure we only send it to the right llme */ - OSMO_ASSERT(msgb_tlli(msg) == mmctx->llme->tlli - || msgb_tlli(msg) == mmctx->llme->old_tlli); + OSMO_ASSERT(msgb_tlli(msg) == mmctx->gb.llme->tlli + || msgb_tlli(msg) == mmctx->gb.llme->old_tlli); } memcpy(&dup.qos_profile, qos_profile_default, sizeof(qos_profile_default)); diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c index 65f789d..8bb6850 100644 --- a/openbsc/src/gprs/gprs_sgsn.c +++ b/openbsc/src/gprs/gprs_sgsn.c @@ -97,7 +97,7 @@ struct sgsn_mm_ctx *ctx; llist_for_each_entry(ctx, &sgsn_mm_ctxts, list) { - if ((tlli == ctx->tlli || tlli == ctx->tlli_new) && + if ((tlli == ctx->gb.tlli || tlli == ctx->gb.tlli_new) && gprs_ra_id_equals(raid, &ctx->ra)) return ctx; } @@ -165,7 +165,8 @@ return NULL; memcpy(&ctx->ra, raid, sizeof(ctx->ra)); - ctx->tlli = tlli; + ctx->ran_type = MM_CTX_T_GERAN_Gb; + ctx->gb.tlli = tlli; ctx->mm_state = GMM_DEREGISTERED; ctx->auth_triplet.key_seq = GSM_KEY_SEQ_INVAL; ctx->ctrg = rate_ctr_group_alloc(ctx, &mmctx_ctrg_desc, tlli); @@ -196,8 +197,8 @@ void sgsn_mm_ctx_cleanup_free(struct sgsn_mm_ctx *mm) { - struct gprs_llc_llme *llme = mm->llme; - uint32_t tlli = mm->tlli; + struct gprs_llc_llme *llme = mm->gb.llme; + uint32_t tlli = mm->gb.tlli; struct sgsn_pdp_ctx *pdp, *pdp2; struct sgsn_signal_data sig_data; @@ -308,7 +309,7 @@ LOGPDPCTXP(LOGL_INFO, pdp, "Forcing release of PDP context\n"); /* Force the deactivation of the SNDCP layer */ - sndcp_sm_deactivate_ind(&pdp->mm->llme->lle[pdp->sapi], pdp->nsapi); + sndcp_sm_deactivate_ind(&pdp->mm->gb.llme->lle[pdp->sapi], pdp->nsapi); memset(&sig_data, 0, sizeof(sig_data)); sig_data.pdp = pdp; @@ -751,7 +752,7 @@ struct sgsn_mm_ctx *mmctx = NULL; llist_for_each_entry(mmctx, &sgsn_mm_ctxts, list) { - if (llme == mmctx->llme) { + if (llme == mmctx->gb.llme) { gsm0408_gprs_access_cancelled(mmctx, SGSN_ERROR_CAUSE_NONE); return; } diff --git a/openbsc/src/gprs/sgsn_cdr.c b/openbsc/src/gprs/sgsn_cdr.c index d0cb712..bf0d6f7 100644 --- a/openbsc/src/gprs/sgsn_cdr.c +++ b/openbsc/src/gprs/sgsn_cdr.c @@ -94,7 +94,7 @@ mmctx->imsi, mmctx->imei, mmctx->msisdn, - mmctx->cell_id, + mmctx->gb.cell_id, mmctx->ra.lac, mmctx->hlr, ev); @@ -179,7 +179,7 @@ pdp->mm ? pdp->mm->imsi : "N/A", pdp->mm ? pdp->mm->imei : "N/A", pdp->mm ? pdp->mm->msisdn : "N/A", - pdp->mm ? pdp->mm->cell_id : -1, + pdp->mm ? pdp->mm->gb.cell_id : -1, pdp->mm ? pdp->mm->ra.lac : -1, pdp->mm ? pdp->mm->hlr : "N/A", ev, diff --git a/openbsc/src/gprs/sgsn_libgtp.c b/openbsc/src/gprs/sgsn_libgtp.c index aaf7e7a..f7a4ca0 100644 --- a/openbsc/src/gprs/sgsn_libgtp.c +++ b/openbsc/src/gprs/sgsn_libgtp.c @@ -239,7 +239,7 @@ pdp->userloc_given = 1; pdp->userloc.l = 8; pdp->userloc.v[0] = 0; /* CGI for GERAN */ - bssgp_create_cell_id(&pdp->userloc.v[1], &mmctx->ra, mmctx->cell_id); + bssgp_create_cell_id(&pdp->userloc.v[1], &mmctx->ra, mmctx->gb.cell_id); /* include the IMEI(SV) */ pdp->imeisv_given = 1; @@ -341,7 +341,7 @@ } /* Activate the SNDCP layer */ - sndcp_sm_activate_ind(&pctx->mm->llme->lle[pctx->sapi], pctx->nsapi); + sndcp_sm_activate_ind(&pctx->mm->gb.llme->lle[pctx->sapi], pctx->nsapi); /* Inform others about it */ memset(&sig_data, 0, sizeof(sig_data)); @@ -388,7 +388,7 @@ if (pctx->mm) { /* Deactivate the SNDCP layer */ - sndcp_sm_deactivate_ind(&pctx->mm->llme->lle[pctx->sapi], pctx->nsapi); + sndcp_sm_deactivate_ind(&pctx->mm->gb.llme->lle[pctx->sapi], pctx->nsapi); /* Confirm deactivation of PDP context to MS */ rc = gsm48_tx_gsm_deact_pdp_acc(pctx); @@ -521,9 +521,9 @@ ud = msgb_put(msg, len); memcpy(ud, packet, len); - msgb_tlli(msg) = mm->tlli; - msgb_bvci(msg) = mm->bvci; - msgb_nsei(msg) = mm->nsei; + msgb_tlli(msg) = mm->gb.tlli; + msgb_bvci(msg) = mm->gb.bvci; + msgb_nsei(msg) = mm->gb.nsei; switch (mm->mm_state) { case GMM_REGISTERED_SUSPENDED: @@ -531,12 +531,12 @@ memset(&pinfo, 0, sizeof(pinfo)); pinfo.mode = BSSGP_PAGING_PS; pinfo.scope = BSSGP_PAGING_BVCI; - pinfo.bvci = mm->bvci; + pinfo.bvci = mm->gb.bvci; pinfo.imsi = mm->imsi; pinfo.ptmsi = &mm->p_tmsi; pinfo.drx_params = mm->drx_parms; pinfo.qos[0] = 0; // FIXME - bssgp_tx_paging(mm->nsei, 0, &pinfo); + bssgp_tx_paging(mm->gb.nsei, 0, &pinfo); rate_ctr_inc(&mm->ctrg->ctr[GMM_CTR_PAGING_PS]); /* FIXME: queue the packet we received from GTP */ break; @@ -544,7 +544,7 @@ break; default: LOGP(DGPRS, LOGL_ERROR, "GTP DATA IND for TLLI %08X in state " - "%u\n", mm->tlli, mm->mm_state); + "%u\n", mm->gb.tlli, mm->mm_state); msgb_free(msg); return -1; } @@ -557,7 +557,7 @@ /* It is easier to have a global count */ pdp->cdr_bytes_out += len; - return sndcp_unitdata_req(msg, &mm->llme->lle[pdp->sapi], + return sndcp_unitdata_req(msg, &mm->gb.llme->lle[pdp->sapi], pdp->nsapi, mm); } diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c index f16c95a..02c0f31 100644 --- a/openbsc/src/gprs/sgsn_vty.c +++ b/openbsc/src/gprs/sgsn_vty.c @@ -431,12 +431,12 @@ vty_out(vty, "%sMM Context for IMSI %s, IMEI %s, P-TMSI %08x%s", pfx, mm->imsi, mm->imei, mm->p_tmsi, VTY_NEWLINE); vty_out(vty, "%s MSISDN: %s, TLLI: %08x%s HLR: %s", - pfx, mm->msisdn, mm->tlli, mm->hlr, VTY_NEWLINE); + pfx, mm->msisdn, mm->gb.tlli, mm->hlr, VTY_NEWLINE); vty_out(vty, "%s MM State: %s, Routeing Area: %u-%u-%u-%u, " "Cell ID: %u%s", pfx, get_value_string(gprs_mm_st_strs, mm->mm_state), mm->ra.mcc, mm->ra.mnc, mm->ra.lac, mm->ra.rac, - mm->cell_id, VTY_NEWLINE); + mm->gb.cell_id, VTY_NEWLINE); vty_out_rate_ctr_group(vty, " ", mm->ctrg); diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c index afff30f..3fb359b 100644 --- a/openbsc/tests/sgsn/sgsn_test.c +++ b/openbsc/tests/sgsn/sgsn_test.c @@ -174,7 +174,7 @@ lle = gprs_lle_get_or_create(tlli, 3); ctx = sgsn_mm_ctx_alloc(tlli, raid); ctx->mm_state = GMM_REGISTERED_NORMAL; - ctx->llme = lle->llme; + ctx->gb.llme = lle->llme; ictx = sgsn_mm_ctx_by_tlli(tlli, raid); OSMO_ASSERT(ictx == ctx); @@ -729,7 +729,7 @@ ctx = alloc_mm_ctx(local_tlli, &raid); /* inject the detach */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, detach_req, ARRAY_SIZE(detach_req)); /* verify that a single message (hopefully the Detach Accept) has been @@ -770,7 +770,7 @@ ctx = alloc_mm_ctx(local_tlli, &raid); /* inject the detach */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, detach_req, ARRAY_SIZE(detach_req)); /* verify that no message (and therefore no Detach Accept) has been @@ -967,14 +967,14 @@ OSMO_ASSERT(sgsn_tx_counter == 1); /* inject the identity response (IMEI) */ - send_0408_message(ctx->llme, foreign_tlli, &raid, + send_0408_message(ctx->gb.llme, foreign_tlli, &raid, ident_resp_imei, ARRAY_SIZE(ident_resp_imei)); /* we expect an identity request (IMSI) */ OSMO_ASSERT(sgsn_tx_counter == 1); /* inject the identity response (IMSI) */ - send_0408_message(ctx->llme, foreign_tlli, &raid, + send_0408_message(ctx->gb.llme, foreign_tlli, &raid, ident_resp_imsi, ARRAY_SIZE(ident_resp_imsi)); /* check that the MM context has not been removed due to a failed @@ -996,7 +996,7 @@ /* we got an auth & ciph request */ /* inject the auth & ciph response */ - send_0408_message(ctx->llme, foreign_tlli, &raid, + send_0408_message(ctx->gb.llme, foreign_tlli, &raid, auth_ciph_resp, ARRAY_SIZE(auth_ciph_resp)); /* check that the MM context has not been removed due to a @@ -1018,7 +1018,7 @@ local_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_LOCAL); /* inject the attach complete */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, attach_compl, ARRAY_SIZE(attach_compl)); OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL); @@ -1027,7 +1027,7 @@ OSMO_ASSERT(sgsn_tx_counter == 0); /* inject the detach */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, detach_req, ARRAY_SIZE(detach_req)); /* verify that things are gone */ @@ -1555,14 +1555,14 @@ OSMO_ASSERT(sgsn_tx_counter == 1); /* inject the identity response (IMEI) */ - send_0408_message(ctx->llme, foreign_tlli, &raid, + send_0408_message(ctx->gb.llme, foreign_tlli, &raid, ident_resp_imei, ARRAY_SIZE(ident_resp_imei)); /* we expect an identity request (IMSI) */ OSMO_ASSERT(sgsn_tx_counter == 1); /* inject the identity response (IMSI) */ - send_0408_message(ctx->llme, foreign_tlli, &raid, + send_0408_message(ctx->gb.llme, foreign_tlli, &raid, ident_resp_imsi, ARRAY_SIZE(ident_resp_imsi)); /* check that the MM context has not been removed due to a failed @@ -1580,7 +1580,7 @@ local_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_LOCAL); /* inject the attach complete */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, foreign_tlli, &raid, attach_compl, ARRAY_SIZE(attach_compl)); OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL); @@ -1707,7 +1707,7 @@ OSMO_ASSERT(sgsn_tx_counter == 1); /* inject the identity response (IMEI) */ - send_0408_message(ctx->llme, foreign_tlli, &raid, + send_0408_message(ctx->gb.llme, foreign_tlli, &raid, ident_resp_imei, ARRAY_SIZE(ident_resp_imei)); /* check that the MM context has not been removed due to a failed @@ -1740,7 +1740,7 @@ /* inject the attach complete */ local_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_LOCAL); - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, attach_compl, ARRAY_SIZE(attach_compl)); /* we don't expect a response */ @@ -1753,7 +1753,7 @@ printf(" - Repeated RA Update Request\n"); /* inject the RA update request */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, ra_upd_req, ARRAY_SIZE(ra_upd_req)); /* we expect an RA update accept */ @@ -1766,7 +1766,7 @@ ptmsi2 = ctx->p_tmsi; /* repeat the RA update request */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, ra_upd_req, ARRAY_SIZE(ra_upd_req)); /* we expect an RA update accept */ @@ -1780,7 +1780,7 @@ /* inject the RA update complete */ local_tlli = gprs_tmsi2tlli(ptmsi2, TLLI_LOCAL); - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, ra_upd_complete, ARRAY_SIZE(ra_upd_complete)); /* we don't expect a response */ @@ -1791,7 +1791,7 @@ OSMO_ASSERT(ctx->p_tmsi == ptmsi2); /* inject the detach */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, detach_req, ARRAY_SIZE(detach_req)); /* verify that things are gone */ @@ -1931,7 +1931,7 @@ OSMO_ASSERT(last_dl_parse_ctx.tlli == ms_tlli); /* inject the identity response (IMEI) */ - send_0408_message(ctx->llme, ms_tlli, &raid1, + send_0408_message(ctx->gb.llme, ms_tlli, &raid1, ident_resp_imei, ARRAY_SIZE(ident_resp_imei)); /* check that the MM context has not been removed due to a failed @@ -1951,7 +1951,7 @@ /* inject the attach complete */ ms_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_LOCAL); - send_0408_message(ctx->llme, ms_tlli, &raid1, + send_0408_message(ctx->gb.llme, ms_tlli, &raid1, attach_compl, ARRAY_SIZE(attach_compl)); /* we don't expect a response */ @@ -1964,7 +1964,7 @@ printf(" - RA Update Request (RA 1 -> RA 1)\n"); /* inject the RA update request */ - send_0408_message(ctx->llme, ms_tlli, &raid1, + send_0408_message(ctx->gb.llme, ms_tlli, &raid1, ra_upd_req1, ARRAY_SIZE(ra_upd_req1)); /* we expect an RA update accept */ @@ -1983,7 +1983,7 @@ /* inject the RA update complete */ ms_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_LOCAL); - send_0408_message(ctx->llme, ms_tlli, &raid1, + send_0408_message(ctx->gb.llme, ms_tlli, &raid1, ra_upd_complete, ARRAY_SIZE(ra_upd_complete)); /* we don't expect a response */ @@ -1992,7 +1992,7 @@ OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL); OSMO_ASSERT(ctx->p_tmsi_old == 0); OSMO_ASSERT(ctx->p_tmsi == ptmsi1); - OSMO_ASSERT(ctx->tlli == ms_tlli); + OSMO_ASSERT(ctx->gb.tlli == ms_tlli); printf(" - RA Update Request (RA 1 -> RA 2)\n"); @@ -2000,7 +2000,7 @@ ms_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_FOREIGN); /* It is coming from RA 1 => ra_upd_req1 */ - send_0408_message(ctx->llme, ms_tlli, &raid2, + send_0408_message(ctx->gb.llme, ms_tlli, &raid2, ra_upd_req1, ARRAY_SIZE(ra_upd_req1)); /* we expect an RA update accept */ @@ -2013,7 +2013,7 @@ ms_tlli = gprs_tmsi2tlli(0x12345678, TLLI_FOREIGN); /* It is coming from RA 1 => ra_upd_req1 */ - send_0408_message(ctx->llme, ms_tlli, &raid2, + send_0408_message(ctx->gb.llme, ms_tlli, &raid2, ra_upd_req_other, ARRAY_SIZE(ra_upd_req_other)); /* we expect an RA update reject (and a LLC XID RESET) */ @@ -2051,7 +2051,7 @@ OSMO_ASSERT(ictx != NULL); OSMO_ASSERT(ictx == ctx); - send_0408_message(ctx->llme, ms_tlli, &raid2, + send_0408_message(ctx->gb.llme, ms_tlli, &raid2, attach_compl, ARRAY_SIZE(attach_compl)); /* we don't expect a response */ @@ -2064,7 +2064,7 @@ printf(" - RA Update Request (RA 2 -> RA 2)\n"); /* inject the RA update request */ - send_0408_message(ctx->llme, ms_tlli, &raid2, + send_0408_message(ctx->gb.llme, ms_tlli, &raid2, ra_upd_req2, ARRAY_SIZE(ra_upd_req2)); /* we expect an RA update accept */ @@ -2082,7 +2082,7 @@ /* inject the RA update complete */ ms_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_LOCAL); - send_0408_message(ctx->llme, ms_tlli, &raid2, + send_0408_message(ctx->gb.llme, ms_tlli, &raid2, ra_upd_complete, ARRAY_SIZE(ra_upd_complete)); /* we don't expect a response */ @@ -2091,11 +2091,11 @@ OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL); OSMO_ASSERT(ctx->p_tmsi_old == 0); OSMO_ASSERT(ctx->p_tmsi == ptmsi1); - OSMO_ASSERT(ctx->tlli == ms_tlli); + OSMO_ASSERT(ctx->gb.tlli == ms_tlli); /* inject the detach */ - send_0408_message(ctx->llme, ms_tlli, &raid2, + send_0408_message(ctx->gb.llme, ms_tlli, &raid2, detach_req, ARRAY_SIZE(detach_req)); /* verify that things are gone */ -- To view, visit https://gerrit.osmocom.org/149 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I88aa520b0bf18219b7f29a0682dae26bc3a46686 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue May 31 11:42:47 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:42:47 +0000 Subject: [PATCH] openbsc[master]: create_pdp_conf(): factor out PDP context accept dispatch as... Message-ID: Review at https://gerrit.osmocom.org/150 create_pdp_conf(): factor out PDP context accept dispatch as send_act_pdp_cont_acc() Change-Id: Ie7dff857a76c1464988b2f514643518937b57c5a --- M openbsc/src/gprs/sgsn_libgtp.c 1 file changed, 14 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/50/150/1 diff --git a/openbsc/src/gprs/sgsn_libgtp.c b/openbsc/src/gprs/sgsn_libgtp.c index f7a4ca0..504590b 100644 --- a/openbsc/src/gprs/sgsn_libgtp.c +++ b/openbsc/src/gprs/sgsn_libgtp.c @@ -304,10 +304,22 @@ { 0, 0 } }; +static int send_act_pdp_cont_acc(struct sgsn_pdp_ctx *pctx) +{ + struct sgsn_signal_data sig_data; + + /* Inform others about it */ + memset(&sig_data, 0, sizeof(sig_data)); + sig_data.pdp = pctx; + osmo_signal_dispatch(SS_SGSN, S_SGSN_PDP_ACT, &sig_data); + + /* Send PDP CTX ACT to MS */ + return gsm48_tx_gsm_act_pdp_acc(pctx); +} + /* The GGSN has confirmed the creation of a PDP Context */ static int create_pdp_conf(struct pdp_t *pdp, void *cbp, int cause) { - struct sgsn_signal_data sig_data; struct sgsn_pdp_ctx *pctx = cbp; uint8_t reject_cause; @@ -342,14 +354,7 @@ /* Activate the SNDCP layer */ sndcp_sm_activate_ind(&pctx->mm->gb.llme->lle[pctx->sapi], pctx->nsapi); - - /* Inform others about it */ - memset(&sig_data, 0, sizeof(sig_data)); - sig_data.pdp = pctx; - osmo_signal_dispatch(SS_SGSN, S_SGSN_PDP_ACT, &sig_data); - - /* Send PDP CTX ACT to MS */ - return gsm48_tx_gsm_act_pdp_acc(pctx); + return send_act_pdp_cont_acc(pctx); reject: /* -- To view, visit https://gerrit.osmocom.org/150 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie7dff857a76c1464988b2f514643518937b57c5a Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Tue May 31 11:42:47 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:42:47 +0000 Subject: [PATCH] openbsc[master]: rename gsm0408_gprs_rcvmsg() to gsm0408_gprs_rcvmsg_gb() Message-ID: Review at https://gerrit.osmocom.org/151 rename gsm0408_gprs_rcvmsg() to gsm0408_gprs_rcvmsg_gb() This is the entry point for GMM from Gb. We will create a new one for Iu, so let's be explicit rather than implicit. Change-Id: I4e8c415e53df9e0ef08e45538dc6c50566d6293c --- M openbsc/include/openbsc/gprs_gmm.h M openbsc/src/gprs/gprs_gmm.c M openbsc/src/gprs/gprs_llc.c M openbsc/tests/sgsn/sgsn_test.c 4 files changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/51/151/1 diff --git a/openbsc/include/openbsc/gprs_gmm.h b/openbsc/include/openbsc/gprs_gmm.h index 702b9b9..e0d8f77 100644 --- a/openbsc/include/openbsc/gprs_gmm.h +++ b/openbsc/include/openbsc/gprs_gmm.h @@ -10,7 +10,7 @@ int gsm48_tx_gsm_act_pdp_acc(struct sgsn_pdp_ctx *pdp); int gsm48_tx_gsm_deact_pdp_acc(struct sgsn_pdp_ctx *pdp); -int gsm0408_gprs_rcvmsg(struct msgb *msg, struct gprs_llc_llme *llme); +int gsm0408_gprs_rcvmsg_gb(struct msgb *msg, struct gprs_llc_llme *llme); int gsm0408_gprs_force_reattach(struct sgsn_mm_ctx *mmctx); int gsm0408_gprs_force_reattach_oldmsg(struct msgb *msg); void gsm0408_gprs_access_granted(struct sgsn_mm_ctx *mmctx); diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 889ac98..1e10701 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -2087,8 +2087,8 @@ return rc; } -/* Main entry point for incoming 04.08 GPRS messages */ -int gsm0408_gprs_rcvmsg(struct msgb *msg, struct gprs_llc_llme *llme) +/* Main entry point for incoming 04.08 GPRS messages from Gb */ +int gsm0408_gprs_rcvmsg_gb(struct msgb *msg, struct gprs_llc_llme *llme) { struct gsm48_hdr *gh = (struct gsm48_hdr *) msgb_gmmh(msg); uint8_t pdisc = gsm48_hdr_pdisc(gh); diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c index 3a45f62..8d0968c 100644 --- a/openbsc/src/gprs/gprs_llc.c +++ b/openbsc/src/gprs/gprs_llc.c @@ -663,7 +663,7 @@ switch (llhp.sapi) { case GPRS_SAPI_GMM: /* send LL_UNITDATA_IND to GMM */ - rc = gsm0408_gprs_rcvmsg(msg, lle->llme); + rc = gsm0408_gprs_rcvmsg_gb(msg, lle->llme); break; case GPRS_SAPI_SNDCP3: case GPRS_SAPI_SNDCP5: diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c index 3fb359b..48f013d 100644 --- a/openbsc/tests/sgsn/sgsn_test.c +++ b/openbsc/tests/sgsn/sgsn_test.c @@ -196,7 +196,7 @@ msg = create_msg(data, data_len); msgb_tlli(msg) = tlli; bssgp_create_cell_id(msgb_bcid(msg), bssgp_raid, 0); - gsm0408_gprs_rcvmsg(msg, llme); + gsm0408_gprs_rcvmsg_gb(msg, llme); msgb_free(msg); } -- To view, visit https://gerrit.osmocom.org/151 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4e8c415e53df9e0ef08e45538dc6c50566d6293c Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue May 31 11:42:47 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:42:47 +0000 Subject: [PATCH] openbsc[master]: gprs_gmm.c: Don't try to de-reference NULL mmctx Message-ID: Review at https://gerrit.osmocom.org/152 gprs_gmm.c: Don't try to de-reference NULL mmctx There was a comment in the code that certain GMM messages require a valid mmctx pointer. However, nothing actually checked if that pointer was in fact non-NULL. We plainly crashed if a MS would send us the wrong message in the wrong state. Original patch by Harald Welte, but it broke message validity checking, resulting in sgsn_test failure. This re-implements the NULL check in a different way, as explained by in-code comment. Change-Id: I10e6fee84abf05179f9e70981cdd295c57a58391 --- M openbsc/src/gprs/gprs_gmm.c 1 file changed, 27 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/52/152/1 diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 1e10701..44b4508 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -1339,6 +1339,23 @@ return rc; } + /* For a few messages, mmctx may be NULL. For all others, we want to + * ensure a non-NULL mmctx. At the same time, we want to keep the + * message validity check intact, so that all message types appear in + * the switch statement and the default case thus means "unknown + * message". If we split the switch in two parts to check non-NULL + * halfway, the unknown-message check breaks, or we'd need to duplicate + * the switch cases in both parts. Instead, just have this macro to + * avoid too much code dup: */ +#define CHECK_MMCTX \ + if (!mmctx) { \ + LOGP(DMM, LOGL_ERROR, \ + "Received GSM 04.08 message type 0x%02x," \ + " but no MM context available\n", \ + gh->msg_type); \ + return -EINVAL; \ + } + switch (gh->msg_type) { case GSM48_MT_GMM_RA_UPD_REQ: rc = gsm48_rx_gmm_ra_upd_req(mmctx, msg, llme); @@ -1348,20 +1365,25 @@ break; /* For all the following types mmctx can not be NULL */ case GSM48_MT_GMM_ID_RESP: + CHECK_MMCTX rc = gsm48_rx_gmm_id_resp(mmctx, msg); break; case GSM48_MT_GMM_STATUS: + CHECK_MMCTX rc = gsm48_rx_gmm_status(mmctx, msg); break; case GSM48_MT_GMM_DETACH_REQ: + CHECK_MMCTX rc = gsm48_rx_gmm_det_req(mmctx, msg); break; case GSM48_MT_GMM_DETACH_ACK: + CHECK_MMCTX LOGMMCTXP(LOGL_INFO, mmctx, "-> DETACH ACK\n"); mm_ctx_cleanup_free(mmctx, "GPRS DETACH ACK"); rc = 0; break; case GSM48_MT_GMM_ATTACH_COMPL: + CHECK_MMCTX /* only in case SGSN offered new P-TMSI */ LOGMMCTXP(LOGL_INFO, mmctx, "-> ATTACH COMPLETE\n"); mmctx_timer_stop(mmctx, 3350); @@ -1380,6 +1402,7 @@ osmo_signal_dispatch(SS_SGSN, S_SGSN_ATTACH, &sig_data); break; case GSM48_MT_GMM_RA_UPD_COMPL: + CHECK_MMCTX /* only in case SGSN offered new P-TMSI */ LOGMMCTXP(LOGL_INFO, mmctx, "-> ROUTING AREA UPDATE COMPLETE\n"); mmctx_timer_stop(mmctx, 3350); @@ -1398,6 +1421,7 @@ osmo_signal_dispatch(SS_SGSN, S_SGSN_UPDATE, &sig_data); break; case GSM48_MT_GMM_PTMSI_REALL_COMPL: + CHECK_MMCTX LOGMMCTXP(LOGL_INFO, mmctx, "-> PTMSI REALLLICATION COMPLETE\n"); mmctx_timer_stop(mmctx, 3350); mmctx->t3350_mode = GMM_T3350_MODE_NONE; @@ -1409,6 +1433,7 @@ rc = 0; break; case GSM48_MT_GMM_AUTH_CIPH_RESP: + CHECK_MMCTX rc = gsm48_rx_gmm_auth_ciph_resp(mmctx, msg); break; default: @@ -1418,6 +1443,8 @@ break; } +#undef CHECK_MMCTX + return rc; } -- To view, visit https://gerrit.osmocom.org/152 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I10e6fee84abf05179f9e70981cdd295c57a58391 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 31 11:42:47 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:42:47 +0000 Subject: [PATCH] openbsc[master]: gprs_gmm.c: Make TLLI handling specific to Gb interface Message-ID: Review at https://gerrit.osmocom.org/153 gprs_gmm.c: Make TLLI handling specific to Gb interface Soem of the operations we perform in the GMM layer are specific to the GPRS/EDGE radio access network and its Gb interface. Let's make them conditional to that in preparation of supporting an Iu interface. Change-Id: I7221cfc02fe729f0acc6f0db447270b929a5db6c --- M openbsc/src/gprs/gprs_gmm.c 1 file changed, 59 insertions(+), 35 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/53/153/1 diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 44b4508..fcaf6bd 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -904,8 +904,10 @@ strncpy(ctx->imsi, mi_string, sizeof(ctx->imsi) - 1); #endif } - ctx->gb.tlli = msgb_tlli(msg); - ctx->gb.llme = llme; + if (ctx->ran_type == MM_CTX_T_GERAN_Gb) { + ctx->gb.tlli = msgb_tlli(msg); + ctx->gb.llme = llme; + } msgid2mmctx(ctx, msg); break; case GSM_MI_TYPE_TMSI: @@ -920,8 +922,10 @@ ctx = sgsn_mm_ctx_alloc(msgb_tlli(msg), &ra_id); ctx->p_tmsi = tmsi; } - ctx->gb.tlli = msgb_tlli(msg); - ctx->gb.llme = llme; + if (ctx->ran_type == MM_CTX_T_GERAN_Gb) { + ctx->gb.tlli = msgb_tlli(msg); + ctx->gb.llme = llme; + } msgid2mmctx(ctx, msg); break; default: @@ -932,7 +936,8 @@ } /* Update MM Context with currient RA and Cell ID */ ctx->ra = ra_id; - ctx->gb.cell_id = cid; + if (ctx->ran_type == MM_CTX_T_GERAN_Gb) + ctx->gb.cell_id = cid; /* Update MM Context with other data */ ctx->drx_parms = drx_par; ctx->ms_radio_access_capa.len = ms_ra_acc_cap_len; @@ -950,13 +955,16 @@ } ctx->mm_state = GMM_COMMON_PROC_INIT; #endif - /* Even if there is no P-TMSI allocated, the MS will switch from - * foreign TLLI to local TLLI */ - ctx->gb.tlli_new = gprs_tmsi2tlli(ctx->p_tmsi, TLLI_LOCAL); - /* Inform LLC layer about new TLLI but keep old active */ - gprs_llgmm_assign(ctx->gb.llme, ctx->gb.tlli, ctx->gb.tlli_new, - GPRS_ALGO_GEA0, NULL); + if (ctx->ran_type == MM_CTX_T_GERAN_Gb) { + /* Even if there is no P-TMSI allocated, the MS will + * switch from foreign TLLI to local TLLI */ + ctx->gb.tlli_new = gprs_tmsi2tlli(ctx->p_tmsi, TLLI_LOCAL); + + /* Inform LLC layer about new TLLI but keep old active */ + gprs_llgmm_assign(ctx->gb.llme, ctx->gb.tlli, ctx->gb.tlli_new, + GPRS_ALGO_GEA0, NULL); + } ctx->pending_req = GSM48_MT_GMM_ATTACH_REQ; return gsm48_gmm_authorize(ctx); @@ -1218,8 +1226,10 @@ /* Update the MM context with the new RA-ID */ bssgp_parse_cell_id(&mmctx->ra, msgb_bcid(msg)); - /* Update the MM context with the new (i.e. foreign) TLLI */ - mmctx->gb.tlli = msgb_tlli(msg); + if (mmctx->ran_type == MM_CTX_T_GERAN_Gb) { + /* Update the MM context with the new (i.e. foreign) TLLI */ + mmctx->gb.tlli = msgb_tlli(msg); + } /* FIXME: Update the MM context with the MS radio acc capabilities */ /* FIXME: Update the MM context with the MS network capabilities */ @@ -1244,13 +1254,16 @@ sig_data.mm = mmctx; osmo_signal_dispatch(SS_SGSN, S_SGSN_UPDATE, &sig_data); #endif - /* Even if there is no P-TMSI allocated, the MS will switch from - * foreign TLLI to local TLLI */ - mmctx->gb.tlli_new = gprs_tmsi2tlli(mmctx->p_tmsi, TLLI_LOCAL); + if (mmctx->ran_type == MM_CTX_T_GERAN_Gb) { + /* Even if there is no P-TMSI allocated, the MS will switch from + * foreign TLLI to local TLLI */ + mmctx->gb.tlli_new = gprs_tmsi2tlli(mmctx->p_tmsi, TLLI_LOCAL); - /* Inform LLC layer about new TLLI but keep old active */ - gprs_llgmm_assign(mmctx->gb.llme, mmctx->gb.tlli, mmctx->gb.tlli_new, - GPRS_ALGO_GEA0, NULL); + /* Inform LLC layer about new TLLI but keep old active */ + gprs_llgmm_assign(mmctx->gb.llme, mmctx->gb.tlli, + mmctx->gb.tlli_new, GPRS_ALGO_GEA0, + NULL); + } /* Look at PDP Context Status IE and see if MS's view of * activated/deactivated NSAPIs agrees with our view */ @@ -1270,10 +1283,13 @@ rc = gsm48_tx_gmm_ra_upd_rej(msg, reject_cause); if (mmctx) mm_ctx_cleanup_free(mmctx, "GPRS RA UPDATE REJ"); - else - /* TLLI unassignment */ - gprs_llgmm_assign(llme, llme->tlli, 0xffffffff, GPRS_ALGO_GEA0, - NULL); + else { + if (llme) { + /* TLLI unassignment */ + gprs_llgmm_assign(llme, llme->tlli, 0xffffffff, + GPRS_ALGO_GEA0, NULL); + } + } return rc; } @@ -1390,10 +1406,13 @@ mmctx->t3350_mode = GMM_T3350_MODE_NONE; mmctx->p_tmsi_old = 0; mmctx->pending_req = 0; - /* Unassign the old TLLI */ - mmctx->gb.tlli = mmctx->gb.tlli_new; - gprs_llgmm_assign(mmctx->gb.llme, 0xffffffff, mmctx->gb.tlli_new, - GPRS_ALGO_GEA0, NULL); + if (mmctx->ran_type == MM_CTX_T_GERAN_Gb) { + /* Unassign the old TLLI */ + mmctx->gb.tlli = mmctx->gb.tlli_new; + gprs_llgmm_assign(mmctx->gb.llme, 0xffffffff, + mmctx->gb.tlli_new, + GPRS_ALGO_GEA0, NULL); + } mmctx->mm_state = GMM_REGISTERED_NORMAL; rc = 0; @@ -1409,10 +1428,12 @@ mmctx->t3350_mode = GMM_T3350_MODE_NONE; mmctx->p_tmsi_old = 0; mmctx->pending_req = 0; - /* Unassign the old TLLI */ - mmctx->gb.tlli = mmctx->gb.tlli_new; - gprs_llgmm_assign(mmctx->gb.llme, 0xffffffff, mmctx->gb.tlli_new, - GPRS_ALGO_GEA0, NULL); + if (mmctx->ran_type == MM_CTX_T_GERAN_Gb) { + /* Unassign the old TLLI */ + mmctx->gb.tlli = mmctx->gb.tlli_new; + gprs_llgmm_assign(mmctx->gb.llme, 0xffffffff, mmctx->gb.tlli_new, + GPRS_ALGO_GEA0, NULL); + } mmctx->mm_state = GMM_REGISTERED_NORMAL; rc = 0; @@ -1427,9 +1448,11 @@ mmctx->t3350_mode = GMM_T3350_MODE_NONE; mmctx->p_tmsi_old = 0; mmctx->pending_req = 0; - /* Unassign the old TLLI */ - mmctx->gb.tlli = mmctx->gb.tlli_new; - //gprs_llgmm_assign(mmctx->gb.llme, 0xffffffff, mmctx->gb.tlli_new, GPRS_ALGO_GEA0, NULL); + if (mmctx->ran_type == MM_CTX_T_GERAN_Gb) { + /* Unassign the old TLLI */ + mmctx->gb.tlli = mmctx->gb.tlli_new; + //gprs_llgmm_assign(mmctx->gb.llme, 0xffffffff, mmctx->gb.tlli_new, GPRS_ALGO_GEA0, NULL); + } rc = 0; break; case GSM48_MT_GMM_AUTH_CIPH_RESP: @@ -2104,7 +2127,8 @@ int gsm0408_gprs_force_reattach(struct sgsn_mm_ctx *mmctx) { int rc; - gprs_llgmm_reset(mmctx->gb.llme); + if (mmctx->ran_type == MM_CTX_T_GERAN_Gb) + gprs_llgmm_reset(mmctx->gb.llme); rc = gsm48_tx_gmm_detach_req( mmctx, GPRS_DET_T_MT_REATT_REQ, GMM_CAUSE_IMPL_DETACHED); -- To view, visit https://gerrit.osmocom.org/153 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7221cfc02fe729f0acc6f0db447270b929a5db6c Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue May 31 11:42:47 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:42:47 +0000 Subject: [PATCH] openbsc[master]: gprs_gmm.c: Perform LLME operations only if we have one Message-ID: Review at https://gerrit.osmocom.org/154 gprs_gmm.c: Perform LLME operations only if we have one In case the GMM message did not arrive over a Gb interface, there is no LLME (and thus the associated pointer is NULL). Don't try to perform operations on a NULL LLME. Change-Id: I0299509d778915308e9ce46244d22283170ce18c --- M openbsc/src/gprs/gprs_gmm.c 1 file changed, 7 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/54/154/1 diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index fcaf6bd..e8c9bc6 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -1208,10 +1208,12 @@ } if (!mmctx) { - /* send a XID reset to re-set all LLC sequence numbers - * in the MS */ - LOGMMCTXP(LOGL_NOTICE, mmctx, "LLC XID RESET\n"); - gprs_llgmm_reset(llme); + if (llme) { + /* send a XID reset to re-set all LLC sequence numbers + * in the MS */ + LOGMMCTXP(LOGL_NOTICE, mmctx, "LLC XID RESET\n"); + gprs_llgmm_reset(llme); + } /* The MS has to perform GPRS attach */ /* Device is still IMSI attached for CS but initiate GPRS ATTACH, * see GSM 04.08, 4.7.5.1.4 and G.6 */ @@ -1314,7 +1316,7 @@ /* MMCTX can be NULL when called */ - if (!mmctx && + if (llme && !mmctx && gh->msg_type != GSM48_MT_GMM_ATTACH_REQ && gh->msg_type != GSM48_MT_GMM_RA_UPD_REQ) { LOGP(DMM, LOGL_NOTICE, "Cannot handle GMM for unknown MM CTX\n"); -- To view, visit https://gerrit.osmocom.org/154 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0299509d778915308e9ce46244d22283170ce18c Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue May 31 11:42:47 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:42:47 +0000 Subject: [PATCH] openbsc[master]: sgsn_mm_ctx_cleanup_free(): clean up LLME iff present (Gb, n... Message-ID: Review at https://gerrit.osmocom.org/155 sgsn_mm_ctx_cleanup_free(): clean up LLME iff present (Gb, not Iu) Assert that llme is unused for non-Gb (Iu) connections, and clean up otherwise. Make sure the cleanup is left below the sgsn_mm_ctx_free() call, as the comment states. Change-Id: I24163035f5e96339ad2d1db454734772a66351bc --- M openbsc/src/gprs/gprs_sgsn.c 1 file changed, 10 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/55/155/1 diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c index 8bb6850..722edec 100644 --- a/openbsc/src/gprs/gprs_sgsn.c +++ b/openbsc/src/gprs/gprs_sgsn.c @@ -197,10 +197,15 @@ void sgsn_mm_ctx_cleanup_free(struct sgsn_mm_ctx *mm) { - struct gprs_llc_llme *llme = mm->gb.llme; + struct gprs_llc_llme *llme = NULL; uint32_t tlli = mm->gb.tlli; struct sgsn_pdp_ctx *pdp, *pdp2; struct sgsn_signal_data sig_data; + + if (mm->ran_type == MM_CTX_T_GERAN_Gb) + llme = mm->gb.llme; + else + OSMO_ASSERT(mm->gb.llme == NULL); /* Forget about ongoing look-ups */ if (mm->ggsn_lookup) { @@ -237,8 +242,10 @@ sgsn_mm_ctx_free(mm); mm = NULL; - /* TLLI unassignment, must be called after sgsn_mm_ctx_free */ - gprs_llgmm_assign(llme, tlli, 0xffffffff, GPRS_ALGO_GEA0, NULL); + if (llme) { + /* TLLI unassignment, must be called after sgsn_mm_ctx_free */ + gprs_llgmm_assign(llme, tlli, 0xffffffff, GPRS_ALGO_GEA0, NULL); + } } -- To view, visit https://gerrit.osmocom.org/155 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I24163035f5e96339ad2d1db454734772a66351bc Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Tue May 31 11:42:47 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:42:47 +0000 Subject: [PATCH] openbsc[master]: gprs: more conditionals for Gb specific actions Message-ID: Review at https://gerrit.osmocom.org/156 gprs: more conditionals for Gb specific actions Change-Id: Ic300d3d692c3ae5f22b17bcb29f3481c0d2af84c --- M openbsc/src/gprs/gprs_gmm.c M openbsc/src/gprs/gprs_sgsn.c M openbsc/src/gprs/sgsn_libgtp.c 3 files changed, 14 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/56/156/1 diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index e8c9bc6..7cc8893 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -1227,8 +1227,8 @@ rate_ctr_inc(&mmctx->ctrg->ctr[GMM_CTR_PKTS_SIG_IN]); /* Update the MM context with the new RA-ID */ - bssgp_parse_cell_id(&mmctx->ra, msgb_bcid(msg)); if (mmctx->ran_type == MM_CTX_T_GERAN_Gb) { + bssgp_parse_cell_id(&mmctx->ra, msgb_bcid(msg)); /* Update the MM context with the new (i.e. foreign) TLLI */ mmctx->gb.tlli = msgb_tlli(msg); } diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c index 722edec..8f9f453 100644 --- a/openbsc/src/gprs/gprs_sgsn.c +++ b/openbsc/src/gprs/gprs_sgsn.c @@ -315,8 +315,10 @@ LOGPDPCTXP(LOGL_INFO, pdp, "Forcing release of PDP context\n"); - /* Force the deactivation of the SNDCP layer */ - sndcp_sm_deactivate_ind(&pdp->mm->gb.llme->lle[pdp->sapi], pdp->nsapi); + if (pdp->mm->ran_type == MM_CTX_T_GERAN_Gb) { + /* Force the deactivation of the SNDCP layer */ + sndcp_sm_deactivate_ind(&pdp->mm->gb.llme->lle[pdp->sapi], pdp->nsapi); + } memset(&sig_data, 0, sizeof(sig_data)); sig_data.pdp = pdp; diff --git a/openbsc/src/gprs/sgsn_libgtp.c b/openbsc/src/gprs/sgsn_libgtp.c index 504590b..d138500 100644 --- a/openbsc/src/gprs/sgsn_libgtp.c +++ b/openbsc/src/gprs/sgsn_libgtp.c @@ -352,9 +352,11 @@ goto reject; } - /* Activate the SNDCP layer */ - sndcp_sm_activate_ind(&pctx->mm->gb.llme->lle[pctx->sapi], pctx->nsapi); - return send_act_pdp_cont_acc(pctx); + if (pctx->mm->ran_type == MM_CTX_T_GERAN_Gb) { + /* Activate the SNDCP layer */ + sndcp_sm_activate_ind(&pctx->mm->gb.llme->lle[pctx->sapi], pctx->nsapi); + return send_act_pdp_cont_acc(pctx); + } reject: /* @@ -392,8 +394,10 @@ osmo_signal_dispatch(SS_SGSN, S_SGSN_PDP_DEACT, &sig_data); if (pctx->mm) { - /* Deactivate the SNDCP layer */ - sndcp_sm_deactivate_ind(&pctx->mm->gb.llme->lle[pctx->sapi], pctx->nsapi); + if (pctx->mm->ran_type == MM_CTX_T_GERAN_Gb) { + /* Deactivate the SNDCP layer */ + sndcp_sm_deactivate_ind(&pctx->mm->gb.llme->lle[pctx->sapi], pctx->nsapi); + } /* Confirm deactivation of PDP context to MS */ rc = gsm48_tx_gsm_deact_pdp_acc(pctx); -- To view, visit https://gerrit.osmocom.org/156 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic300d3d692c3ae5f22b17bcb29f3481c0d2af84c Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Tue May 31 11:43:32 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:43:32 +0000 Subject: [ABANDON] openbsc[master]: TEST: 123 In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: TEST: 123 ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/146 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ib02c29e60cb4ad44f70d657b2847acfe808cfda9 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 31 11:45:01 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 May 2016 11:45:01 +0000 Subject: openbsc[master]: rename enum gprs_mm_state to gprs_gmm_state In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/148 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4617b009fdaf2485a3d407b4b9f457ee6b59f3ac Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 31 11:46:15 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 May 2016 11:46:15 +0000 Subject: osmo-pcu[master]: rlc.h: correct gprs_rlc_data comment In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/144 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id4d99d1d21c7fa372771fd569d87bbcf2c6b6d22 Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 31 11:46:50 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 May 2016 11:46:50 +0000 Subject: osmo-pcu[master]: RFC: remove this == NULL checks In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 I would agree that a non-static method cannot ever be caleld with this == NULL, but I'm not a C++ expert... -- To view, visit https://gerrit.osmocom.org/136 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifddaef70bb0a4402050c817b1000d515c3a7118b Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 31 11:47:08 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:47:08 +0000 Subject: [ABANDON] openbsc[master]: TEST: 456 In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: TEST: 456 ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/147 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Iee3860cadb28abed774e9e7e9c5295c1262222e0 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 31 11:47:43 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:47:43 +0000 Subject: [ABANDON] openbsc[master]: TEST: branch with conflict, newest commit on branch (doesn't... In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: TEST: branch with conflict, newest commit on branch (doesn't conflict) ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/133 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I8d8d1aab5006f36a0e553e782b854b6954972fa5 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue May 31 11:48:24 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 May 2016 11:48:24 +0000 Subject: openbsc[master]: prepare sgsn_mm_ctx for Gb and Iu mode (UMTS) In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/149 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I88aa520b0bf18219b7f29a0682dae26bc3a46686 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 31 11:49:41 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 May 2016 11:49:41 +0000 Subject: osmo-pcu[master]: decoding: improve and add comments In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/139 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I45c9fc55243224909ca2fdece8cbfa686b0f444d Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 31 11:49:54 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 May 2016 11:49:54 +0000 Subject: osmo-pcu[master]: decoding: remove superfluous double-semicolon In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/140 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I48ec24f2e10620279cbcbf39c70a4be6438f6b0f Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 31 11:50:16 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:50:16 +0000 Subject: [ABANDON] openbsc[master]: gprs: more conditionals for Gb specific actions In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: gprs: more conditionals for Gb specific actions ...................................................................... Abandoned trying with another submit type because of weird merge conflicts -- To view, visit https://gerrit.osmocom.org/156 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ic300d3d692c3ae5f22b17bcb29f3481c0d2af84c Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Tue May 31 11:50:20 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:50:20 +0000 Subject: [ABANDON] openbsc[master]: sgsn_mm_ctx_cleanup_free(): clean up LLME iff present (Gb, n... In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: sgsn_mm_ctx_cleanup_free(): clean up LLME iff present (Gb, not Iu) ...................................................................... Abandoned trying with another submit type because of weird merge conflicts -- To view, visit https://gerrit.osmocom.org/155 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I24163035f5e96339ad2d1db454734772a66351bc Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Tue May 31 11:50:23 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:50:23 +0000 Subject: [ABANDON] openbsc[master]: gprs_gmm.c: Perform LLME operations only if we have one In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: gprs_gmm.c: Perform LLME operations only if we have one ...................................................................... Abandoned trying with another submit type because of weird merge conflicts -- To view, visit https://gerrit.osmocom.org/154 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I0299509d778915308e9ce46244d22283170ce18c Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue May 31 11:50:26 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:50:26 +0000 Subject: [ABANDON] openbsc[master]: gprs_gmm.c: Make TLLI handling specific to Gb interface In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: gprs_gmm.c: Make TLLI handling specific to Gb interface ...................................................................... Abandoned trying with another submit type because of weird merge conflicts -- To view, visit https://gerrit.osmocom.org/153 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I7221cfc02fe729f0acc6f0db447270b929a5db6c Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue May 31 11:50:28 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:50:28 +0000 Subject: [ABANDON] openbsc[master]: gprs_gmm.c: Don't try to de-reference NULL mmctx In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: gprs_gmm.c: Don't try to de-reference NULL mmctx ...................................................................... Abandoned trying with another submit type because of weird merge conflicts -- To view, visit https://gerrit.osmocom.org/152 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I10e6fee84abf05179f9e70981cdd295c57a58391 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 31 11:50:30 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 May 2016 11:50:30 +0000 Subject: osmo-pcu[master]: encoding: add doxygen for rlc_data_to_dl_append* In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/141 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6ead0f1d14a91c657448227e17438b49a54e6c4a Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 31 11:50:32 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:50:32 +0000 Subject: [ABANDON] openbsc[master]: rename gsm0408_gprs_rcvmsg() to gsm0408_gprs_rcvmsg_gb() In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: rename gsm0408_gprs_rcvmsg() to gsm0408_gprs_rcvmsg_gb() ...................................................................... Abandoned trying with another submit type because of weird merge conflicts -- To view, visit https://gerrit.osmocom.org/151 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I4e8c415e53df9e0ef08e45538dc6c50566d6293c Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue May 31 11:50:35 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:50:35 +0000 Subject: [ABANDON] openbsc[master]: create_pdp_conf(): factor out PDP context accept dispatch as... In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: create_pdp_conf(): factor out PDP context accept dispatch as send_act_pdp_cont_acc() ...................................................................... Abandoned trying with another submit type because of weird merge conflicts -- To view, visit https://gerrit.osmocom.org/150 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ie7dff857a76c1464988b2f514643518937b57c5a Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Tue May 31 11:50:38 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:50:38 +0000 Subject: [ABANDON] openbsc[master]: prepare sgsn_mm_ctx for Gb and Iu mode (UMTS) In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: prepare sgsn_mm_ctx for Gb and Iu mode (UMTS) ...................................................................... Abandoned trying with another submit type because of weird merge conflicts -- To view, visit https://gerrit.osmocom.org/149 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I88aa520b0bf18219b7f29a0682dae26bc3a46686 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue May 31 11:50:53 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:50:53 +0000 Subject: [ABANDON] openbsc[master]: rename enum gprs_mm_state to gprs_gmm_state In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: rename enum gprs_mm_state to gprs_gmm_state ...................................................................... Abandoned trying with another submit type because of weird merge conflicts -- To view, visit https://gerrit.osmocom.org/148 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I4617b009fdaf2485a3d407b4b9f457ee6b59f3ac Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Tue May 31 11:51:09 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:51:09 +0000 Subject: [ABANDON] openbsc[master]: TEST commit, outdated without conflict In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: TEST commit, outdated without conflict ...................................................................... Abandoned test -- To view, visit https://gerrit.osmocom.org/130 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ia38995cf84ba155e9d02a93620313cff634510ce Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue May 31 11:51:15 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:51:15 +0000 Subject: [ABANDON] openbsc[master]: TEST commit, outdated without conflict, newest in branch In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: TEST commit, outdated without conflict, newest in branch ...................................................................... Abandoned test -- To view, visit https://gerrit.osmocom.org/131 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I855612cc2e61c18f72e6559d18e39dcbfbc826d8 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue May 31 11:51:20 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:51:20 +0000 Subject: [ABANDON] openbsc[master]: TEST: conflict with: tweak db debug log: log TMSI as hex In-Reply-To: References: Message-ID: Neels Hofmeyr has abandoned this change. Change subject: TEST: conflict with: tweak db debug log: log TMSI as hex ...................................................................... Abandoned test -- To view, visit https://gerrit.osmocom.org/132 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I140fcb95793a863e9d233a5c88156b6727261129 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue May 31 11:51:25 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 May 2016 11:51:25 +0000 Subject: libosmocore[master]: Patched structs for big-endian architectures In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/124 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I29eafe481e112d18c624b1c83add0d53c354dbe4 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Ruben Undheim Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 31 11:51:59 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 May 2016 11:51:59 +0000 Subject: [MERGED] osmo-pcu[master]: decoding: improve and add comments In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: decoding: improve and add comments ...................................................................... decoding: improve and add comments Change-Id: I45c9fc55243224909ca2fdece8cbfa686b0f444d Reviewed-on: https://gerrit.osmocom.org/139 Tested-by: Jenkins Builder Reviewed-by: Harald Welte --- M src/decoding.cpp M src/decoding.h 2 files changed, 4 insertions(+), 2 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/decoding.cpp b/src/decoding.cpp index 0c81b2a..5f64ac0 100644 --- a/src/decoding.cpp +++ b/src/decoding.cpp @@ -32,7 +32,7 @@ #include #define LENGTH_TO_END 255 -/* +/*! * \returns num extensions fields (num frames == offset) on success, * -errno otherwise. */ @@ -197,6 +197,7 @@ e = rdbi->e; if (e) { if (chunks_size > 0) { + /* Block without LI means it only contains data of one LLC PDU */ chunks[num_chunks].offset = offs; chunks[num_chunks].length = LENGTH_TO_END; chunks[num_chunks].is_complete = is_last_block; diff --git a/src/decoding.h b/src/decoding.h index 1043d67..50c9e7d 100644 --- a/src/decoding.h +++ b/src/decoding.h @@ -28,10 +28,11 @@ class Decoding { public: + /* represents (parts) LLC PDUs within one RLC Data block */ struct RlcData { uint8_t offset; uint8_t length; - bool is_complete; + bool is_complete; /* if this PDU ends in this block */ }; static int rlc_data_from_ul_data( -- To view, visit https://gerrit.osmocom.org/139 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I45c9fc55243224909ca2fdece8cbfa686b0f444d Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue May 31 11:52:12 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 May 2016 11:52:12 +0000 Subject: [MERGED] libosmocore[master]: Patched structs for big-endian architectures In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Patched structs for big-endian architectures ...................................................................... Patched structs for big-endian architectures Change-Id: I29eafe481e112d18c624b1c83add0d53c354dbe4 Reviewed-on: https://gerrit.osmocom.org/124 Tested-by: Jenkins Builder Reviewed-by: Neels Hofmeyr Reviewed-by: Harald Welte --- M include/osmocom/gsm/protocol/gsm_04_08.h 1 file changed, 160 insertions(+), 0 deletions(-) Approvals: Neels Hofmeyr: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h index 4800b48..0c2fcf2 100644 --- a/include/osmocom/gsm/protocol/gsm_04_08.h +++ b/include/osmocom/gsm/protocol/gsm_04_08.h @@ -4,6 +4,8 @@ #include #include +#include + /* GSM TS 04.08 definitions */ struct gsm_lchan; @@ -42,6 +44,7 @@ } __attribute__ ((packed)); /* Chapter 10.5.2.1b.3 */ +#if OSMO_IS_LITTLE_ENDIAN == 1 struct gsm48_range_1024 { uint8_t w1_hi:2, f0:1, @@ -75,8 +78,44 @@ uint8_t w16:6, w15_lo:2; } __attribute__ ((packed)); +#else +struct gsm48_range_1024 { + uint8_t form_id:5, + f0:1, + w1_hi:2; + uint8_t w1_lo; + uint8_t w2_hi; + uint8_t w2_lo:1, + w3_hi:7; + uint8_t w3_lo:2, + w4_hi:6; + uint8_t w4_lo:2, + w5_hi:6; + uint8_t w5_lo:2, + w6_hi:6; + uint8_t w6_lo:2, + w7_hi:6; + uint8_t w7_lo:2, + w8_hi:6; + uint8_t w8_lo:1, + w9:7; + uint8_t w10:7, + w11_hi:1; + uint8_t w11_lo:6, + w12_hi:2; + uint8_t w12_lo:5, + w13_hi:3; + uint8_t w13_lo:4, + w14_hi:4; + uint8_t w14_lo:3, + w15_hi:5; + uint8_t w15_lo:2, + w16:6; +} __attribute__ ((packed)); +#endif /* Chapter 10.5.2.1b.4 */ +#if OSMO_IS_LITTLE_ENDIAN == 1 struct gsm48_range_512 { uint8_t orig_arfcn_hi:1, form_id:7; @@ -110,8 +149,44 @@ uint8_t w17:5, w16_lo:3; } __attribute__ ((packed)); +#else +struct gsm48_range_512 { + uint8_t form_id:7, + orig_arfcn_hi:1; + uint8_t orig_arfcn_mid; + uint8_t orig_arfcn_lo:1, + w1_hi:7; + uint8_t w1_lo:2, + w2_hi:6; + uint8_t w2_lo:2, + w3_hi:6; + uint8_t w3_lo:2, + w4_hi:6; + uint8_t w4_lo:1, + w5:7; + uint8_t w6:7, + w7_hi:1; + uint8_t w7_lo:6, + w8_hi:2; + uint8_t w8_lo:4, + w9_hi:4; + uint8_t w9_lo:2, + w10:6; + uint8_t w11:6, + w12_hi:2; + uint8_t w12_lo:4, + w13_hi:4; + uint8_t w13_lo:2, + w14:6; + uint8_t w15:6, + w16_hi:2; + uint8_t w16_lo:3, + w17:5; +} __attribute__ ((packed)); +#endif /* Chapter 10.5.2.1b.5 */ +#if OSMO_IS_LITTLE_ENDIAN == 1 struct gsm48_range_256 { uint8_t orig_arfcn_hi:1, form_id:7; @@ -151,8 +226,50 @@ w21:4, w20_lo:3; } __attribute__ ((packed)); +#else +struct gsm48_range_256 { + uint8_t form_id:7, + orig_arfcn_hi:1; + uint8_t orig_arfcn_mid; + uint8_t orig_arfcn_lo:1, + w1_hi:7; + uint8_t w1_lo:1, + w2:7; + uint8_t w3:7, + w4_hi:1; + uint8_t w4_lo:5, + w5_hi:3; + uint8_t w5_lo:3, + w6_hi:5; + uint8_t w6_lo:1, + w7:6, + w8_hi:1; + uint8_t w8_lo:4, + w9_hi:4; + uint8_t w9_lo:1, + w10:5, + w11_hi:2; + uint8_t w11_lo:3, + w12:5; + uint8_t w13:5, + w14_hi:3; + uint8_t w14_lo:2, + w15:5, + w16_hi:1; + uint8_t w16_lo:3, + w17:4, + w18_hi:1; + uint8_t w18_lo:3, + w19:4, + w20_hi:1; + uint8_t w20_lo:3, + w21:4, + spare:1; +} __attribute__ ((packed)); +#endif /* Chapter 10.5.2.1b.6 */ +#if OSMO_IS_LITTLE_ENDIAN == 1 struct gsm48_range_128 { uint8_t orig_arfcn_hi:1, form_id:7; @@ -194,6 +311,49 @@ w27:3, w26_lo:1; } __attribute__ ((packed)); +#else +struct gsm48_range_128 { + uint8_t form_id:7, + orig_arfcn_hi:1; + uint8_t orig_arfcn_mid; + uint8_t orig_arfcn_lo:1, + w1:7; + uint8_t w2:6, + w3_hi:2; + uint8_t w3_lo:4, + w4_hi:4; + uint8_t w4_lo:1, + w5:5, + w6_hi:2; + uint8_t w6_lo:3, + w7:5; + uint8_t w8:4, + w9:4; + uint8_t w10:4, + w11:4; + uint8_t w12:4, + w13:4; + uint8_t w14:4, + w15:4; + uint8_t w16:3, + w17:3, + w18_hi:2; + uint8_t w18_lo:1, + w19:3, + w20:3, + w21_hi:1; + uint8_t w21_lo:2, + w22:3, + w23:3; + uint8_t w24:3, + w25:3, + w26_hi:2; + uint8_t w26_lo:1, + w27:3, + w28:3, + spare:1; +} __attribute__ ((packed)); +#endif /* Chapter 10.5.2.1b.7 */ struct gsm48_var_bit { -- To view, visit https://gerrit.osmocom.org/124 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I29eafe481e112d18c624b1c83add0d53c354dbe4 Gerrit-PatchSet: 2 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Ruben Undheim Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr From gerrit-no-reply at lists.osmocom.org Tue May 31 11:52:19 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 May 2016 11:52:19 +0000 Subject: [MERGED] osmo-pcu[master]: encoding: add doxygen for rlc_data_to_dl_append* In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: encoding: add doxygen for rlc_data_to_dl_append* ...................................................................... encoding: add doxygen for rlc_data_to_dl_append* Change-Id: I6ead0f1d14a91c657448227e17438b49a54e6c4a Reviewed-on: https://gerrit.osmocom.org/141 Tested-by: Jenkins Builder Reviewed-by: Harald Welte --- M src/encoding.cpp 1 file changed, 31 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/encoding.cpp b/src/encoding.cpp index 6c50abe..9dba4f6 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -891,6 +891,16 @@ return rdbi->data_len; } +/*! + * \brief (GPRS) put llc pdu into an rlc/mac block. fragment the llc pdu if needed + * \param rdbi rlc/mac block info + * \param llc llc pdu + * \param offset given offset within the rlc/mac block + * \param num_chunks count the chunks (llc pdu data) within rlc/mac + * \param data_block buffer holds rlc/mac data + * \param is_final if this is the last rlc/mac within a TBF + * \return the state of the rlc/mac like if there is more space for another chunk + */ static Encoding::AppendResult rlc_data_to_dl_append_gprs( struct gprs_rlc_data_block_info *rdbi, gprs_llc *llc, int *offset, int *num_chunks, @@ -1012,6 +1022,16 @@ return Encoding::AR_COMPLETED_BLOCK_FILLED; } +/*! + * \brief (EGPRS) put llc pdu into an rlc/mac block. fragment the llc pdu if needed + * \param rdbi rlc/mac block info + * \param llc llc pdu + * \param offset given offset within the rlc/mac block + * \param num_chunks count the chunks (llc pdu data) within rlc/mac + * \param data_block buffer holds rlc/mac data + * \param is_final if this is the last rlc/mac within a TBF + * \return the state of the rlc/mac like if there is more space for another chunk + */ static Encoding::AppendResult rlc_data_to_dl_append_egprs( struct gprs_rlc_data_block_info *rdbi, gprs_llc *llc, int *offset, int *num_chunks, @@ -1154,6 +1174,17 @@ return Encoding::AR_COMPLETED_BLOCK_FILLED; } +/*! + * \brief Encoding::rlc_data_to_dl_append + * \param rdbi rlc/mac block info + * \param cs the coding scheme to use + * \param llc llc pdu + * \param offset given offset within the rlc/mac block + * \param num_chunks count the chunks (llc pdu data) within rlc/mac + * \param data_block buffer holds rlc/mac data + * \param is_final if this is the last rlc/mac within a TBF + * \return the state of the rlc/mac like if there is more space for another chunk + */ Encoding::AppendResult Encoding::rlc_data_to_dl_append( struct gprs_rlc_data_block_info *rdbi, GprsCodingScheme cs, gprs_llc *llc, int *offset, int *num_chunks, -- To view, visit https://gerrit.osmocom.org/141 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6ead0f1d14a91c657448227e17438b49a54e6c4a Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue May 31 11:53:26 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:53:26 +0000 Subject: [PATCH] openbsc[master]: rename enum gprs_mm_state to gprs_gmm_state Message-ID: Review at https://gerrit.osmocom.org/157 rename enum gprs_mm_state to gprs_gmm_state Change-Id: Ibba054d15c55c7ac570e64ff66ea57964be095e3 --- M openbsc/include/openbsc/gprs_sgsn.h 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/57/157/1 diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h index 898b7a5..5fbbf28 100644 --- a/openbsc/include/openbsc/gprs_sgsn.h +++ b/openbsc/include/openbsc/gprs_sgsn.h @@ -23,7 +23,7 @@ enum gsm48_gsm_cause; /* TS 04.08 4.1.3.3 GMM mobility management states on the network side */ -enum gprs_mm_state { +enum gprs_gmm_state { GMM_DEREGISTERED, /* 4.1.3.3.1.1 */ GMM_COMMON_PROC_INIT, /* 4.1.3.3.1.2 */ GMM_REGISTERED_NORMAL, /* 4.1.3.3.2.1 */ @@ -98,7 +98,7 @@ struct llist_head list; char imsi[GSM23003_IMSI_MAX_DIGITS+1]; - enum gprs_mm_state mm_state; + enum gprs_gmm_state mm_state; uint32_t p_tmsi; uint32_t p_tmsi_old; /* old P-TMSI before new is confirmed */ uint32_t p_tmsi_sig; -- To view, visit https://gerrit.osmocom.org/157 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibba054d15c55c7ac570e64ff66ea57964be095e3 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Tue May 31 11:53:26 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:53:26 +0000 Subject: [PATCH] openbsc[master]: prepare sgsn_mm_ctx for Gb and Iu mode (UMTS) Message-ID: Review at https://gerrit.osmocom.org/158 prepare sgsn_mm_ctx for Gb and Iu mode (UMTS) Explicitly mark those sgsn_mm_ctx members that apply for Gb mode and (upcoming) Iu mode, respectively. Add some comments in sgsn_mm_ctx. Change-Id: Ife9b02549f284e2547f16117cf43d7a36948fc4b Tweaked-By: Neels Hofmeyr --- M openbsc/include/openbsc/gprs_sgsn.h M openbsc/src/gprs/gprs_gmm.c M openbsc/src/gprs/gprs_llc.c M openbsc/src/gprs/gprs_sgsn.c M openbsc/src/gprs/sgsn_cdr.c M openbsc/src/gprs/sgsn_libgtp.c M openbsc/src/gprs/sgsn_vty.c M openbsc/tests/sgsn/sgsn_test.c 8 files changed, 135 insertions(+), 86 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/58/158/1 diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h index 5fbbf28..0e574d8 100644 --- a/openbsc/include/openbsc/gprs_sgsn.h +++ b/openbsc/include/openbsc/gprs_sgsn.h @@ -92,10 +92,28 @@ uint8_t ti; }; +enum sgsn_ran_type { + /* GPRS/EDGE via Gb */ + MM_CTX_T_GERAN_Gb, + /* UMTS via Iu */ + MM_CTX_T_UTRAN_Iu, + /* GPRS/EDGE via Iu */ + MM_CTX_T_GERAN_Iu, +}; + +struct service_info { + uint8_t type; + uint16_t pdp_status; +}; + +struct ue_conn_ctx; + /* According to TS 03.60, Table 5: SGSN MM and PDP Contexts */ /* Extended by 3GPP TS 23.060, Table 6: SGSN MM and PDP Contexts */ struct sgsn_mm_ctx { struct llist_head list; + + enum sgsn_ran_type ran_type; char imsi[GSM23003_IMSI_MAX_DIGITS+1]; enum gprs_gmm_state mm_state; @@ -106,10 +124,32 @@ /* Opt: Software Version Numbber / TS 23.195 */ char msisdn[GSM_EXTENSION_LENGTH]; struct gprs_ra_id ra; - uint16_t cell_id; - uint32_t cell_id_age; - uint16_t sac; /* Iu: Service Area Code */ - uint32_t sac_age;/* Iu: Service Area Code age */ + struct { + uint16_t cell_id; /* Gb only */ + uint32_t cell_id_age; /* Gb only */ + uint8_t radio_prio_sms; + + /* Additional bits not present in the GSM TS */ + uint16_t nsei; + uint16_t bvci; + struct gprs_llc_llme *llme; + uint32_t tlli; + uint32_t tlli_new; + } gb; + struct { + int new_key; + uint16_t sac; /* Iu: Service Area Code */ + uint32_t sac_age; /* Iu: Service Area Code age */ + /* CSG ID */ + /* CSG Membership */ + /* Access Mode */ + /* Seelected CN Operator ID (TS 23.251) */ + /* CSG Subscription Data */ + /* LIPA Allowed */ + /* Voice Support Match Indicator */ + struct ue_conn_ctx *ue_ctx; + struct service_info service; + } iu; /* VLR number */ uint32_t new_sgsn_addr; /* Authentication Triplet */ @@ -118,30 +158,38 @@ /* Iu: CK, IK, KSI */ /* CKSN */ enum gprs_ciph_algo ciph_algo; + struct { uint8_t len; uint8_t buf[50]; /* GSM 04.08 10.5.5.12a, extended in TS 24.008 */ } ms_radio_access_capa; + /* Supported Codecs (SRVCC) */ struct { uint8_t len; uint8_t buf[8]; /* GSM 04.08 10.5.5.12, extended in TS 24.008 */ } ms_network_capa; + /* UE Netowrk Capability (E-UTRAN) */ uint16_t drx_parms; + /* Active Time value for PSM */ int mnrg; /* MS reported to HLR? */ int ngaf; /* MS reported to MSC/VLR? */ int ppf; /* paging for GPRS + non-GPRS? */ + /* Subscribed Charging Characteristics */ + /* Trace Reference */ + /* Trace Type */ + /* Trigger ID */ + /* OMC Identity */ /* SMS Parameters */ int recovery; - uint8_t radio_prio_sms; + /* Access Restriction */ + /* GPRS CSI (CAMEL) */ + /* MG-CSI (CAMEL) */ + /* Subscribed UE-AMBR */ + /* UE-AMBR */ + /* APN Subscribed */ struct llist_head pdp_list; - /* Additional bits not present in the GSM TS */ - struct gprs_llc_llme *llme; - uint32_t tlli; - uint32_t tlli_new; - uint16_t nsei; - uint16_t bvci; struct rate_ctr_group *ctrg; struct osmo_timer_list timer; unsigned int T; /* Txxxx number */ diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index 2bbc5ff..889ac98 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -151,16 +151,16 @@ /* Store BVCI/NSEI in MM context */ static void msgid2mmctx(struct sgsn_mm_ctx *mm, const struct msgb *msg) { - mm->bvci = msgb_bvci(msg); - mm->nsei = msgb_nsei(msg); + mm->gb.bvci = msgb_bvci(msg); + mm->gb.nsei = msgb_nsei(msg); } /* Store BVCI/NSEI in MM context */ static void mmctx2msgid(struct msgb *msg, const struct sgsn_mm_ctx *mm) { - msgb_tlli(msg) = mm->tlli; - msgb_bvci(msg) = mm->bvci; - msgb_nsei(msg) = mm->nsei; + msgb_tlli(msg) = mm->gb.tlli; + msgb_bvci(msg) = mm->gb.bvci; + msgb_nsei(msg) = mm->gb.nsei; } static void mm_ctx_cleanup_free(struct sgsn_mm_ctx *ctx, const char *log_text) @@ -904,8 +904,8 @@ strncpy(ctx->imsi, mi_string, sizeof(ctx->imsi) - 1); #endif } - ctx->tlli = msgb_tlli(msg); - ctx->llme = llme; + ctx->gb.tlli = msgb_tlli(msg); + ctx->gb.llme = llme; msgid2mmctx(ctx, msg); break; case GSM_MI_TYPE_TMSI: @@ -920,8 +920,8 @@ ctx = sgsn_mm_ctx_alloc(msgb_tlli(msg), &ra_id); ctx->p_tmsi = tmsi; } - ctx->tlli = msgb_tlli(msg); - ctx->llme = llme; + ctx->gb.tlli = msgb_tlli(msg); + ctx->gb.llme = llme; msgid2mmctx(ctx, msg); break; default: @@ -932,7 +932,7 @@ } /* Update MM Context with currient RA and Cell ID */ ctx->ra = ra_id; - ctx->cell_id = cid; + ctx->gb.cell_id = cid; /* Update MM Context with other data */ ctx->drx_parms = drx_par; ctx->ms_radio_access_capa.len = ms_ra_acc_cap_len; @@ -952,10 +952,10 @@ #endif /* Even if there is no P-TMSI allocated, the MS will switch from * foreign TLLI to local TLLI */ - ctx->tlli_new = gprs_tmsi2tlli(ctx->p_tmsi, TLLI_LOCAL); + ctx->gb.tlli_new = gprs_tmsi2tlli(ctx->p_tmsi, TLLI_LOCAL); /* Inform LLC layer about new TLLI but keep old active */ - gprs_llgmm_assign(ctx->llme, ctx->tlli, ctx->tlli_new, + gprs_llgmm_assign(ctx->gb.llme, ctx->gb.tlli, ctx->gb.tlli_new, GPRS_ALGO_GEA0, NULL); ctx->pending_req = GSM48_MT_GMM_ATTACH_REQ; @@ -1182,7 +1182,7 @@ "TLLI: %08x (%08x), RA: %d-%d-%d-%d\n", msgb_tlli(msg), mmctx->p_tmsi, mmctx->p_tmsi_old, - mmctx->tlli, mmctx->tlli_new, + mmctx->gb.tlli, mmctx->gb.tlli_new, mmctx->ra.mcc, mmctx->ra.mnc, mmctx->ra.lac, mmctx->ra.rac); @@ -1219,7 +1219,7 @@ /* Update the MM context with the new RA-ID */ bssgp_parse_cell_id(&mmctx->ra, msgb_bcid(msg)); /* Update the MM context with the new (i.e. foreign) TLLI */ - mmctx->tlli = msgb_tlli(msg); + mmctx->gb.tlli = msgb_tlli(msg); /* FIXME: Update the MM context with the MS radio acc capabilities */ /* FIXME: Update the MM context with the MS network capabilities */ @@ -1246,10 +1246,10 @@ #endif /* Even if there is no P-TMSI allocated, the MS will switch from * foreign TLLI to local TLLI */ - mmctx->tlli_new = gprs_tmsi2tlli(mmctx->p_tmsi, TLLI_LOCAL); + mmctx->gb.tlli_new = gprs_tmsi2tlli(mmctx->p_tmsi, TLLI_LOCAL); /* Inform LLC layer about new TLLI but keep old active */ - gprs_llgmm_assign(mmctx->llme, mmctx->tlli, mmctx->tlli_new, + gprs_llgmm_assign(mmctx->gb.llme, mmctx->gb.tlli, mmctx->gb.tlli_new, GPRS_ALGO_GEA0, NULL); /* Look at PDP Context Status IE and see if MS's view of @@ -1369,8 +1369,8 @@ mmctx->p_tmsi_old = 0; mmctx->pending_req = 0; /* Unassign the old TLLI */ - mmctx->tlli = mmctx->tlli_new; - gprs_llgmm_assign(mmctx->llme, 0xffffffff, mmctx->tlli_new, + mmctx->gb.tlli = mmctx->gb.tlli_new; + gprs_llgmm_assign(mmctx->gb.llme, 0xffffffff, mmctx->gb.tlli_new, GPRS_ALGO_GEA0, NULL); mmctx->mm_state = GMM_REGISTERED_NORMAL; rc = 0; @@ -1387,8 +1387,8 @@ mmctx->p_tmsi_old = 0; mmctx->pending_req = 0; /* Unassign the old TLLI */ - mmctx->tlli = mmctx->tlli_new; - gprs_llgmm_assign(mmctx->llme, 0xffffffff, mmctx->tlli_new, + mmctx->gb.tlli = mmctx->gb.tlli_new; + gprs_llgmm_assign(mmctx->gb.llme, 0xffffffff, mmctx->gb.tlli_new, GPRS_ALGO_GEA0, NULL); mmctx->mm_state = GMM_REGISTERED_NORMAL; rc = 0; @@ -1404,8 +1404,8 @@ mmctx->p_tmsi_old = 0; mmctx->pending_req = 0; /* Unassign the old TLLI */ - mmctx->tlli = mmctx->tlli_new; - //gprs_llgmm_assign(mmctx->llme, 0xffffffff, mmctx->tlli_new, GPRS_ALGO_GEA0, NULL); + mmctx->gb.tlli = mmctx->gb.tlli_new; + //gprs_llgmm_assign(mmctx->gb.llme, 0xffffffff, mmctx->gb.tlli_new, GPRS_ALGO_GEA0, NULL); rc = 0; break; case GSM48_MT_GMM_AUTH_CIPH_RESP: @@ -2077,7 +2077,7 @@ int gsm0408_gprs_force_reattach(struct sgsn_mm_ctx *mmctx) { int rc; - gprs_llgmm_reset(mmctx->llme); + gprs_llgmm_reset(mmctx->gb.llme); rc = gsm48_tx_gmm_detach_req( mmctx, GPRS_DET_T_MT_REATT_REQ, GMM_CAUSE_IMPL_DETACHED); @@ -2101,7 +2101,7 @@ if (mmctx) { msgid2mmctx(mmctx, msg); rate_ctr_inc(&mmctx->ctrg->ctr[GMM_CTR_PKTS_SIG_IN]); - mmctx->llme = llme; + mmctx->gb.llme = llme; } /* MMCTX can be NULL */ diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c index 4cf5163..3a45f62 100644 --- a/openbsc/src/gprs/gprs_llc.c +++ b/openbsc/src/gprs/gprs_llc.c @@ -56,8 +56,8 @@ dup.ms_ra_cap.v = mmctx->ms_radio_access_capa.buf; /* make sure we only send it to the right llme */ - OSMO_ASSERT(msgb_tlli(msg) == mmctx->llme->tlli - || msgb_tlli(msg) == mmctx->llme->old_tlli); + OSMO_ASSERT(msgb_tlli(msg) == mmctx->gb.llme->tlli + || msgb_tlli(msg) == mmctx->gb.llme->old_tlli); } memcpy(&dup.qos_profile, qos_profile_default, sizeof(qos_profile_default)); diff --git a/openbsc/src/gprs/gprs_sgsn.c b/openbsc/src/gprs/gprs_sgsn.c index 65f789d..8bb6850 100644 --- a/openbsc/src/gprs/gprs_sgsn.c +++ b/openbsc/src/gprs/gprs_sgsn.c @@ -97,7 +97,7 @@ struct sgsn_mm_ctx *ctx; llist_for_each_entry(ctx, &sgsn_mm_ctxts, list) { - if ((tlli == ctx->tlli || tlli == ctx->tlli_new) && + if ((tlli == ctx->gb.tlli || tlli == ctx->gb.tlli_new) && gprs_ra_id_equals(raid, &ctx->ra)) return ctx; } @@ -165,7 +165,8 @@ return NULL; memcpy(&ctx->ra, raid, sizeof(ctx->ra)); - ctx->tlli = tlli; + ctx->ran_type = MM_CTX_T_GERAN_Gb; + ctx->gb.tlli = tlli; ctx->mm_state = GMM_DEREGISTERED; ctx->auth_triplet.key_seq = GSM_KEY_SEQ_INVAL; ctx->ctrg = rate_ctr_group_alloc(ctx, &mmctx_ctrg_desc, tlli); @@ -196,8 +197,8 @@ void sgsn_mm_ctx_cleanup_free(struct sgsn_mm_ctx *mm) { - struct gprs_llc_llme *llme = mm->llme; - uint32_t tlli = mm->tlli; + struct gprs_llc_llme *llme = mm->gb.llme; + uint32_t tlli = mm->gb.tlli; struct sgsn_pdp_ctx *pdp, *pdp2; struct sgsn_signal_data sig_data; @@ -308,7 +309,7 @@ LOGPDPCTXP(LOGL_INFO, pdp, "Forcing release of PDP context\n"); /* Force the deactivation of the SNDCP layer */ - sndcp_sm_deactivate_ind(&pdp->mm->llme->lle[pdp->sapi], pdp->nsapi); + sndcp_sm_deactivate_ind(&pdp->mm->gb.llme->lle[pdp->sapi], pdp->nsapi); memset(&sig_data, 0, sizeof(sig_data)); sig_data.pdp = pdp; @@ -751,7 +752,7 @@ struct sgsn_mm_ctx *mmctx = NULL; llist_for_each_entry(mmctx, &sgsn_mm_ctxts, list) { - if (llme == mmctx->llme) { + if (llme == mmctx->gb.llme) { gsm0408_gprs_access_cancelled(mmctx, SGSN_ERROR_CAUSE_NONE); return; } diff --git a/openbsc/src/gprs/sgsn_cdr.c b/openbsc/src/gprs/sgsn_cdr.c index d0cb712..bf0d6f7 100644 --- a/openbsc/src/gprs/sgsn_cdr.c +++ b/openbsc/src/gprs/sgsn_cdr.c @@ -94,7 +94,7 @@ mmctx->imsi, mmctx->imei, mmctx->msisdn, - mmctx->cell_id, + mmctx->gb.cell_id, mmctx->ra.lac, mmctx->hlr, ev); @@ -179,7 +179,7 @@ pdp->mm ? pdp->mm->imsi : "N/A", pdp->mm ? pdp->mm->imei : "N/A", pdp->mm ? pdp->mm->msisdn : "N/A", - pdp->mm ? pdp->mm->cell_id : -1, + pdp->mm ? pdp->mm->gb.cell_id : -1, pdp->mm ? pdp->mm->ra.lac : -1, pdp->mm ? pdp->mm->hlr : "N/A", ev, diff --git a/openbsc/src/gprs/sgsn_libgtp.c b/openbsc/src/gprs/sgsn_libgtp.c index aaf7e7a..f7a4ca0 100644 --- a/openbsc/src/gprs/sgsn_libgtp.c +++ b/openbsc/src/gprs/sgsn_libgtp.c @@ -239,7 +239,7 @@ pdp->userloc_given = 1; pdp->userloc.l = 8; pdp->userloc.v[0] = 0; /* CGI for GERAN */ - bssgp_create_cell_id(&pdp->userloc.v[1], &mmctx->ra, mmctx->cell_id); + bssgp_create_cell_id(&pdp->userloc.v[1], &mmctx->ra, mmctx->gb.cell_id); /* include the IMEI(SV) */ pdp->imeisv_given = 1; @@ -341,7 +341,7 @@ } /* Activate the SNDCP layer */ - sndcp_sm_activate_ind(&pctx->mm->llme->lle[pctx->sapi], pctx->nsapi); + sndcp_sm_activate_ind(&pctx->mm->gb.llme->lle[pctx->sapi], pctx->nsapi); /* Inform others about it */ memset(&sig_data, 0, sizeof(sig_data)); @@ -388,7 +388,7 @@ if (pctx->mm) { /* Deactivate the SNDCP layer */ - sndcp_sm_deactivate_ind(&pctx->mm->llme->lle[pctx->sapi], pctx->nsapi); + sndcp_sm_deactivate_ind(&pctx->mm->gb.llme->lle[pctx->sapi], pctx->nsapi); /* Confirm deactivation of PDP context to MS */ rc = gsm48_tx_gsm_deact_pdp_acc(pctx); @@ -521,9 +521,9 @@ ud = msgb_put(msg, len); memcpy(ud, packet, len); - msgb_tlli(msg) = mm->tlli; - msgb_bvci(msg) = mm->bvci; - msgb_nsei(msg) = mm->nsei; + msgb_tlli(msg) = mm->gb.tlli; + msgb_bvci(msg) = mm->gb.bvci; + msgb_nsei(msg) = mm->gb.nsei; switch (mm->mm_state) { case GMM_REGISTERED_SUSPENDED: @@ -531,12 +531,12 @@ memset(&pinfo, 0, sizeof(pinfo)); pinfo.mode = BSSGP_PAGING_PS; pinfo.scope = BSSGP_PAGING_BVCI; - pinfo.bvci = mm->bvci; + pinfo.bvci = mm->gb.bvci; pinfo.imsi = mm->imsi; pinfo.ptmsi = &mm->p_tmsi; pinfo.drx_params = mm->drx_parms; pinfo.qos[0] = 0; // FIXME - bssgp_tx_paging(mm->nsei, 0, &pinfo); + bssgp_tx_paging(mm->gb.nsei, 0, &pinfo); rate_ctr_inc(&mm->ctrg->ctr[GMM_CTR_PAGING_PS]); /* FIXME: queue the packet we received from GTP */ break; @@ -544,7 +544,7 @@ break; default: LOGP(DGPRS, LOGL_ERROR, "GTP DATA IND for TLLI %08X in state " - "%u\n", mm->tlli, mm->mm_state); + "%u\n", mm->gb.tlli, mm->mm_state); msgb_free(msg); return -1; } @@ -557,7 +557,7 @@ /* It is easier to have a global count */ pdp->cdr_bytes_out += len; - return sndcp_unitdata_req(msg, &mm->llme->lle[pdp->sapi], + return sndcp_unitdata_req(msg, &mm->gb.llme->lle[pdp->sapi], pdp->nsapi, mm); } diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c index f16c95a..02c0f31 100644 --- a/openbsc/src/gprs/sgsn_vty.c +++ b/openbsc/src/gprs/sgsn_vty.c @@ -431,12 +431,12 @@ vty_out(vty, "%sMM Context for IMSI %s, IMEI %s, P-TMSI %08x%s", pfx, mm->imsi, mm->imei, mm->p_tmsi, VTY_NEWLINE); vty_out(vty, "%s MSISDN: %s, TLLI: %08x%s HLR: %s", - pfx, mm->msisdn, mm->tlli, mm->hlr, VTY_NEWLINE); + pfx, mm->msisdn, mm->gb.tlli, mm->hlr, VTY_NEWLINE); vty_out(vty, "%s MM State: %s, Routeing Area: %u-%u-%u-%u, " "Cell ID: %u%s", pfx, get_value_string(gprs_mm_st_strs, mm->mm_state), mm->ra.mcc, mm->ra.mnc, mm->ra.lac, mm->ra.rac, - mm->cell_id, VTY_NEWLINE); + mm->gb.cell_id, VTY_NEWLINE); vty_out_rate_ctr_group(vty, " ", mm->ctrg); diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c index afff30f..3fb359b 100644 --- a/openbsc/tests/sgsn/sgsn_test.c +++ b/openbsc/tests/sgsn/sgsn_test.c @@ -174,7 +174,7 @@ lle = gprs_lle_get_or_create(tlli, 3); ctx = sgsn_mm_ctx_alloc(tlli, raid); ctx->mm_state = GMM_REGISTERED_NORMAL; - ctx->llme = lle->llme; + ctx->gb.llme = lle->llme; ictx = sgsn_mm_ctx_by_tlli(tlli, raid); OSMO_ASSERT(ictx == ctx); @@ -729,7 +729,7 @@ ctx = alloc_mm_ctx(local_tlli, &raid); /* inject the detach */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, detach_req, ARRAY_SIZE(detach_req)); /* verify that a single message (hopefully the Detach Accept) has been @@ -770,7 +770,7 @@ ctx = alloc_mm_ctx(local_tlli, &raid); /* inject the detach */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, detach_req, ARRAY_SIZE(detach_req)); /* verify that no message (and therefore no Detach Accept) has been @@ -967,14 +967,14 @@ OSMO_ASSERT(sgsn_tx_counter == 1); /* inject the identity response (IMEI) */ - send_0408_message(ctx->llme, foreign_tlli, &raid, + send_0408_message(ctx->gb.llme, foreign_tlli, &raid, ident_resp_imei, ARRAY_SIZE(ident_resp_imei)); /* we expect an identity request (IMSI) */ OSMO_ASSERT(sgsn_tx_counter == 1); /* inject the identity response (IMSI) */ - send_0408_message(ctx->llme, foreign_tlli, &raid, + send_0408_message(ctx->gb.llme, foreign_tlli, &raid, ident_resp_imsi, ARRAY_SIZE(ident_resp_imsi)); /* check that the MM context has not been removed due to a failed @@ -996,7 +996,7 @@ /* we got an auth & ciph request */ /* inject the auth & ciph response */ - send_0408_message(ctx->llme, foreign_tlli, &raid, + send_0408_message(ctx->gb.llme, foreign_tlli, &raid, auth_ciph_resp, ARRAY_SIZE(auth_ciph_resp)); /* check that the MM context has not been removed due to a @@ -1018,7 +1018,7 @@ local_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_LOCAL); /* inject the attach complete */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, attach_compl, ARRAY_SIZE(attach_compl)); OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL); @@ -1027,7 +1027,7 @@ OSMO_ASSERT(sgsn_tx_counter == 0); /* inject the detach */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, detach_req, ARRAY_SIZE(detach_req)); /* verify that things are gone */ @@ -1555,14 +1555,14 @@ OSMO_ASSERT(sgsn_tx_counter == 1); /* inject the identity response (IMEI) */ - send_0408_message(ctx->llme, foreign_tlli, &raid, + send_0408_message(ctx->gb.llme, foreign_tlli, &raid, ident_resp_imei, ARRAY_SIZE(ident_resp_imei)); /* we expect an identity request (IMSI) */ OSMO_ASSERT(sgsn_tx_counter == 1); /* inject the identity response (IMSI) */ - send_0408_message(ctx->llme, foreign_tlli, &raid, + send_0408_message(ctx->gb.llme, foreign_tlli, &raid, ident_resp_imsi, ARRAY_SIZE(ident_resp_imsi)); /* check that the MM context has not been removed due to a failed @@ -1580,7 +1580,7 @@ local_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_LOCAL); /* inject the attach complete */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, foreign_tlli, &raid, attach_compl, ARRAY_SIZE(attach_compl)); OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL); @@ -1707,7 +1707,7 @@ OSMO_ASSERT(sgsn_tx_counter == 1); /* inject the identity response (IMEI) */ - send_0408_message(ctx->llme, foreign_tlli, &raid, + send_0408_message(ctx->gb.llme, foreign_tlli, &raid, ident_resp_imei, ARRAY_SIZE(ident_resp_imei)); /* check that the MM context has not been removed due to a failed @@ -1740,7 +1740,7 @@ /* inject the attach complete */ local_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_LOCAL); - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, attach_compl, ARRAY_SIZE(attach_compl)); /* we don't expect a response */ @@ -1753,7 +1753,7 @@ printf(" - Repeated RA Update Request\n"); /* inject the RA update request */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, ra_upd_req, ARRAY_SIZE(ra_upd_req)); /* we expect an RA update accept */ @@ -1766,7 +1766,7 @@ ptmsi2 = ctx->p_tmsi; /* repeat the RA update request */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, ra_upd_req, ARRAY_SIZE(ra_upd_req)); /* we expect an RA update accept */ @@ -1780,7 +1780,7 @@ /* inject the RA update complete */ local_tlli = gprs_tmsi2tlli(ptmsi2, TLLI_LOCAL); - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, ra_upd_complete, ARRAY_SIZE(ra_upd_complete)); /* we don't expect a response */ @@ -1791,7 +1791,7 @@ OSMO_ASSERT(ctx->p_tmsi == ptmsi2); /* inject the detach */ - send_0408_message(ctx->llme, local_tlli, &raid, + send_0408_message(ctx->gb.llme, local_tlli, &raid, detach_req, ARRAY_SIZE(detach_req)); /* verify that things are gone */ @@ -1931,7 +1931,7 @@ OSMO_ASSERT(last_dl_parse_ctx.tlli == ms_tlli); /* inject the identity response (IMEI) */ - send_0408_message(ctx->llme, ms_tlli, &raid1, + send_0408_message(ctx->gb.llme, ms_tlli, &raid1, ident_resp_imei, ARRAY_SIZE(ident_resp_imei)); /* check that the MM context has not been removed due to a failed @@ -1951,7 +1951,7 @@ /* inject the attach complete */ ms_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_LOCAL); - send_0408_message(ctx->llme, ms_tlli, &raid1, + send_0408_message(ctx->gb.llme, ms_tlli, &raid1, attach_compl, ARRAY_SIZE(attach_compl)); /* we don't expect a response */ @@ -1964,7 +1964,7 @@ printf(" - RA Update Request (RA 1 -> RA 1)\n"); /* inject the RA update request */ - send_0408_message(ctx->llme, ms_tlli, &raid1, + send_0408_message(ctx->gb.llme, ms_tlli, &raid1, ra_upd_req1, ARRAY_SIZE(ra_upd_req1)); /* we expect an RA update accept */ @@ -1983,7 +1983,7 @@ /* inject the RA update complete */ ms_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_LOCAL); - send_0408_message(ctx->llme, ms_tlli, &raid1, + send_0408_message(ctx->gb.llme, ms_tlli, &raid1, ra_upd_complete, ARRAY_SIZE(ra_upd_complete)); /* we don't expect a response */ @@ -1992,7 +1992,7 @@ OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL); OSMO_ASSERT(ctx->p_tmsi_old == 0); OSMO_ASSERT(ctx->p_tmsi == ptmsi1); - OSMO_ASSERT(ctx->tlli == ms_tlli); + OSMO_ASSERT(ctx->gb.tlli == ms_tlli); printf(" - RA Update Request (RA 1 -> RA 2)\n"); @@ -2000,7 +2000,7 @@ ms_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_FOREIGN); /* It is coming from RA 1 => ra_upd_req1 */ - send_0408_message(ctx->llme, ms_tlli, &raid2, + send_0408_message(ctx->gb.llme, ms_tlli, &raid2, ra_upd_req1, ARRAY_SIZE(ra_upd_req1)); /* we expect an RA update accept */ @@ -2013,7 +2013,7 @@ ms_tlli = gprs_tmsi2tlli(0x12345678, TLLI_FOREIGN); /* It is coming from RA 1 => ra_upd_req1 */ - send_0408_message(ctx->llme, ms_tlli, &raid2, + send_0408_message(ctx->gb.llme, ms_tlli, &raid2, ra_upd_req_other, ARRAY_SIZE(ra_upd_req_other)); /* we expect an RA update reject (and a LLC XID RESET) */ @@ -2051,7 +2051,7 @@ OSMO_ASSERT(ictx != NULL); OSMO_ASSERT(ictx == ctx); - send_0408_message(ctx->llme, ms_tlli, &raid2, + send_0408_message(ctx->gb.llme, ms_tlli, &raid2, attach_compl, ARRAY_SIZE(attach_compl)); /* we don't expect a response */ @@ -2064,7 +2064,7 @@ printf(" - RA Update Request (RA 2 -> RA 2)\n"); /* inject the RA update request */ - send_0408_message(ctx->llme, ms_tlli, &raid2, + send_0408_message(ctx->gb.llme, ms_tlli, &raid2, ra_upd_req2, ARRAY_SIZE(ra_upd_req2)); /* we expect an RA update accept */ @@ -2082,7 +2082,7 @@ /* inject the RA update complete */ ms_tlli = gprs_tmsi2tlli(ptmsi1, TLLI_LOCAL); - send_0408_message(ctx->llme, ms_tlli, &raid2, + send_0408_message(ctx->gb.llme, ms_tlli, &raid2, ra_upd_complete, ARRAY_SIZE(ra_upd_complete)); /* we don't expect a response */ @@ -2091,11 +2091,11 @@ OSMO_ASSERT(ctx->mm_state == GMM_REGISTERED_NORMAL); OSMO_ASSERT(ctx->p_tmsi_old == 0); OSMO_ASSERT(ctx->p_tmsi == ptmsi1); - OSMO_ASSERT(ctx->tlli == ms_tlli); + OSMO_ASSERT(ctx->gb.tlli == ms_tlli); /* inject the detach */ - send_0408_message(ctx->llme, ms_tlli, &raid2, + send_0408_message(ctx->gb.llme, ms_tlli, &raid2, detach_req, ARRAY_SIZE(detach_req)); /* verify that things are gone */ -- To view, visit https://gerrit.osmocom.org/158 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ife9b02549f284e2547f16117cf43d7a36948fc4b Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte From gerrit-no-reply at lists.osmocom.org Tue May 31 11:53:26 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:53:26 +0000 Subject: [PATCH] openbsc[master]: create_pdp_conf(): factor out PDP context accept dispatch as... Message-ID: Review at https://gerrit.osmocom.org/159 create_pdp_conf(): factor out PDP context accept dispatch as send_act_pdp_cont_acc() Change-Id: Ibf60e18707ff4aa2e60291e5595386ddda8d8190 --- M openbsc/src/gprs/sgsn_libgtp.c 1 file changed, 14 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/59/159/1 diff --git a/openbsc/src/gprs/sgsn_libgtp.c b/openbsc/src/gprs/sgsn_libgtp.c index f7a4ca0..504590b 100644 --- a/openbsc/src/gprs/sgsn_libgtp.c +++ b/openbsc/src/gprs/sgsn_libgtp.c @@ -304,10 +304,22 @@ { 0, 0 } }; +static int send_act_pdp_cont_acc(struct sgsn_pdp_ctx *pctx) +{ + struct sgsn_signal_data sig_data; + + /* Inform others about it */ + memset(&sig_data, 0, sizeof(sig_data)); + sig_data.pdp = pctx; + osmo_signal_dispatch(SS_SGSN, S_SGSN_PDP_ACT, &sig_data); + + /* Send PDP CTX ACT to MS */ + return gsm48_tx_gsm_act_pdp_acc(pctx); +} + /* The GGSN has confirmed the creation of a PDP Context */ static int create_pdp_conf(struct pdp_t *pdp, void *cbp, int cause) { - struct sgsn_signal_data sig_data; struct sgsn_pdp_ctx *pctx = cbp; uint8_t reject_cause; @@ -342,14 +354,7 @@ /* Activate the SNDCP layer */ sndcp_sm_activate_ind(&pctx->mm->gb.llme->lle[pctx->sapi], pctx->nsapi); - - /* Inform others about it */ - memset(&sig_data, 0, sizeof(sig_data)); - sig_data.pdp = pctx; - osmo_signal_dispatch(SS_SGSN, S_SGSN_PDP_ACT, &sig_data); - - /* Send PDP CTX ACT to MS */ - return gsm48_tx_gsm_act_pdp_acc(pctx); + return send_act_pdp_cont_acc(pctx); reject: /* -- To view, visit https://gerrit.osmocom.org/159 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibf60e18707ff4aa2e60291e5595386ddda8d8190 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: daniel From gerrit-no-reply at lists.osmocom.org Tue May 31 11:53:36 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 May 2016 11:53:36 +0000 Subject: osmo-pcu[master]: tbf_dl: comment why we sent a dummy LLC packets to delay the... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/143 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1862674437dffef4de3ffa7b183ecf690020b0ec Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 31 11:55:00 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 May 2016 11:55:00 +0000 Subject: openbsc[master]: create_pdp_conf(): factor out PDP context accept dispatch as... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/159 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibf60e18707ff4aa2e60291e5595386ddda8d8190 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 31 11:55:31 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 May 2016 11:55:31 +0000 Subject: openbsc[master]: prepare sgsn_mm_ctx for Gb and Iu mode (UMTS) In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/158 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ife9b02549f284e2547f16117cf43d7a36948fc4b Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Harald Welte Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 31 11:55:35 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 11:55:35 +0000 Subject: openbsc[master]: rename enum gprs_mm_state to gprs_gmm_state In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 hwelte had posted +2 on identical commit abandoned for gerrit reasons -- To view, visit https://gerrit.osmocom.org/157 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibba054d15c55c7ac570e64ff66ea57964be095e3 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: daniel Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 31 11:56:48 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 May 2016 11:56:48 +0000 Subject: osmo-pcu[master]: add KPI counter to count bytes for RLC and LLC frames In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/145 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9a98a5a375d39b3f4990360056c4d6145e755f4d Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 31 11:57:54 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 May 2016 11:57:54 +0000 Subject: osmo-pcu[master]: encoding/rlc_copy_from_aligned_buffer: export written payloa... In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/142 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0e622acb1f13f7489946baf049de4ba1cde6a1fc Gerrit-PatchSet: 1 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 31 11:58:06 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 May 2016 11:58:06 +0000 Subject: osmo-bts[master]: Use libosmocore function for uplink measurements In-Reply-To: References: Message-ID: Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/108 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ide47e8e69e0d2d5859c5249b22f4bad22c18aa57 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 31 11:58:09 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 May 2016 11:58:09 +0000 Subject: [MERGED] osmo-bts[master]: Use libosmocore function for uplink measurements In-Reply-To: References: Message-ID: Harald Welte has submitted this change and it was merged. Change subject: Use libosmocore function for uplink measurements ...................................................................... Use libosmocore function for uplink measurements Related: OS#1563 Change-Id: Ide47e8e69e0d2d5859c5249b22f4bad22c18aa57 Reviewed-on: https://gerrit.osmocom.org/108 Tested-by: Jenkins Builder Reviewed-by: Harald Welte --- M include/osmo-bts/measurement.h M src/common/measurement.c M src/common/rsl.c 3 files changed, 9 insertions(+), 18 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmo-bts/measurement.h b/include/osmo-bts/measurement.h index 493b6ff..2037ff6 100644 --- a/include/osmo-bts/measurement.h +++ b/include/osmo-bts/measurement.h @@ -5,7 +5,4 @@ int trx_meas_check_compute(struct gsm_bts_trx *trx, uint32_t fn); -/* build the 3 byte RSL uplinke measurement IE content */ -int lchan_build_rsl_ul_meas(struct gsm_lchan *, uint8_t *buf); - #endif diff --git a/src/common/measurement.c b/src/common/measurement.c index 41a0170..b0906d4 100644 --- a/src/common/measurement.c +++ b/src/common/measurement.c @@ -200,17 +200,6 @@ return 1; } -/* build the 3 byte RSL uplinke measurement IE content */ -int lchan_build_rsl_ul_meas(struct gsm_lchan *lchan, uint8_t *buf) -{ - struct gsm_meas_rep_unidir *mru = &lchan->meas.ul_res; - buf[0] = (mru->full.rx_lev & 0x3f); /* FIXME: DTXu support */ - buf[1] = (mru->sub.rx_lev & 0x3f); - buf[2] = ((mru->full.rx_qual & 7) << 3) | (mru->sub.rx_qual & 7); - - return 3; -} - /* Copied from OpenBSC and enlarged to _GSM_PCHAN_MAX */ static const uint8_t subslots_per_pchan[_GSM_PCHAN_MAX] = { [GSM_PCHAN_NONE] = 0, diff --git a/src/common/rsl.c b/src/common/rsl.c index ecf570c..e13d48c 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -31,6 +32,7 @@ #include #include #include +#include #include #include @@ -1692,7 +1694,8 @@ } /* 8.4.8 MEASUREMENT RESult */ -static int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len) +static int rsl_tx_meas_res(struct gsm_lchan *lchan, uint8_t *l3, int l3_len, + bool dtxd_used) { struct msgb *msg; uint8_t meas_res[16]; @@ -1710,7 +1713,8 @@ return -ENOMEM; msgb_tv_put(msg, RSL_IE_MEAS_RES_NR, lchan->meas.res_nr++); - int ie_len = lchan_build_rsl_ul_meas(lchan, meas_res); + size_t ie_len = gsm0858_rsl_ul_meas_enc(&lchan->meas.ul_res, dtxd_used, + meas_res); if (ie_len >= 3) { msgb_tlv_put(msg, RSL_IE_UPLINK_MEAS, ie_len, meas_res); lchan->meas.flags &= ~LC_UL_M_F_RES_VALID; @@ -1751,8 +1755,9 @@ LOGP(DRSL, LOGL_INFO, "%s Handing RLL msg %s from LAPDm to MEAS REP\n", gsm_lchan_name(lchan), rsl_msg_name(rh->msg_type)); - - rc = rsl_tx_meas_res(lchan, msgb_l3(msg), msgb_l3len(msg)); + /* FIXME: add dtx downlink support */ + rc = rsl_tx_meas_res(lchan, msgb_l3(msg), msgb_l3len(msg), + false); msgb_free(msg); return rc; } else { -- To view, visit https://gerrit.osmocom.org/108 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ide47e8e69e0d2d5859c5249b22f4bad22c18aa57 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue May 31 12:00:04 2016 From: gerrit-no-reply at lists.osmocom.org (Neels Hofmeyr) Date: Tue, 31 May 2016 12:00:04 +0000 Subject: openbsc[master]: sgsn: fix use of libosmocore GPRS encryption plugins from LL... In-Reply-To: References: Message-ID: Patch Set 1: It looked to me like the code wants to make sure not to change the llme->kc by passing it into the function. So it wants to copy to a local buffer and pass *its* address instead. If we'd want to keep it that way then, yes, I see now and agree about the size, and we should use a malloc(gprs_cipher_key_length(..)) ...or just pass &kc directly. I'm not sure how to decide, just caught this by accident and am not familiar with this code... -- To view, visit https://gerrit.osmocom.org/128 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1f1b7454a0de5b7f4734aca4d03dbe67db5de189 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Holger Freyther Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 31 12:02:25 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 31 May 2016 12:02:25 +0000 Subject: [PATCH] osmo-pcu[master]: encoding/rlc_copy_from_aligned_buffer: export written payloa... In-Reply-To: References: Message-ID: Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/142 to look at the new patch set (#2). encoding/rlc_copy_from_aligned_buffer: export written payload bytes via an argument Require to count statistics for rlc_dl_payload_bytes. Change-Id: I0e622acb1f13f7489946baf049de4ba1cde6a1fc --- M src/encoding.cpp M src/encoding.h M src/tbf_dl.cpp M tests/edge/EdgeTest.cpp 4 files changed, 54 insertions(+), 36 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/42/142/2 diff --git a/src/encoding.cpp b/src/encoding.cpp index 9dba4f6..2102a1e 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -899,13 +899,13 @@ * \param num_chunks count the chunks (llc pdu data) within rlc/mac * \param data_block buffer holds rlc/mac data * \param is_final if this is the last rlc/mac within a TBF + * \param count_payload if not NULL save the written size of payload in bytes into it * \return the state of the rlc/mac like if there is more space for another chunk */ static Encoding::AppendResult rlc_data_to_dl_append_gprs( struct gprs_rlc_data_block_info *rdbi, gprs_llc *llc, int *offset, int *num_chunks, - uint8_t *data_block, - bool is_final) + uint8_t *data_block, bool is_final, int *count_payload) { int chunk; int space; @@ -930,6 +930,8 @@ *e_pointer |= 0x01; /* fill only space */ llc->consume(data, space); + if (count_payload) + *count_payload = space; /* return data block as message */ *offset = rdbi->data_len; (*num_chunks)++; @@ -947,6 +949,8 @@ *e_pointer |= 0x01; /* fill space */ llc->consume(data, space); + if (count_payload) + *count_payload = space; *offset = rdbi->data_len; (*num_chunks)++; rdbi->cv = 0; @@ -974,6 +978,8 @@ // no need to set e_pointer nor increase delimiter /* fill only space, which is 1 octet less than chunk */ llc->consume(data, space); + if (count_payload) + *count_payload = space; /* return data block as message */ *offset = rdbi->data_len; (*num_chunks)++; @@ -999,6 +1005,8 @@ (*num_chunks)++; /* copy (rest of) LLC frame to space and reset later */ llc->consume(data, chunk); + if (count_payload) + *count_payload = chunk; data += chunk; space -= chunk; (*offset) += chunk; @@ -1030,13 +1038,14 @@ * \param num_chunks count the chunks (llc pdu data) within rlc/mac * \param data_block buffer holds rlc/mac data * \param is_final if this is the last rlc/mac within a TBF + * \param count_payload if not NULL save the written size of payload in bytes into it * \return the state of the rlc/mac like if there is more space for another chunk */ static Encoding::AppendResult rlc_data_to_dl_append_egprs( struct gprs_rlc_data_block_info *rdbi, gprs_llc *llc, int *offset, int *num_chunks, uint8_t *data_block, - bool is_final) + bool is_final, int *count_payload) { int chunk; int space; @@ -1060,6 +1069,8 @@ chunk, space); /* fill only space */ llc->consume(data, space); + if (count_payload) + *count_payload = space; /* return data block as message */ *offset = rdbi->data_len; (*num_chunks)++; @@ -1074,6 +1085,8 @@ "header, and we are done\n", chunk, space); /* fill space */ llc->consume(data, space); + if (count_payload) + *count_payload = space; *offset = rdbi->data_len; (*num_chunks)++; rdbi->cv = 0; @@ -1088,6 +1101,8 @@ chunk, space); /* fill space */ llc->consume(data, space); + if (count_payload) + *count_payload = space; *offset = rdbi->data_len; (*num_chunks)++; return Encoding::AR_NEED_MORE_BLOCKS; @@ -1118,6 +1133,8 @@ (*num_chunks)++; /* copy (rest of) LLC frame to space and reset later */ llc->consume(data, chunk); + if (count_payload) + *count_payload = chunk; data += chunk; space -= chunk; (*offset) += chunk; @@ -1183,21 +1200,23 @@ * \param num_chunks count the chunks (llc pdu data) within rlc/mac * \param data_block buffer holds rlc/mac data * \param is_final if this is the last rlc/mac within a TBF + * \param count_payload if not NULL save the written size of payload in bytes into it * \return the state of the rlc/mac like if there is more space for another chunk */ Encoding::AppendResult Encoding::rlc_data_to_dl_append( struct gprs_rlc_data_block_info *rdbi, GprsCodingScheme cs, gprs_llc *llc, int *offset, int *num_chunks, - uint8_t *data_block, - bool is_final) + uint8_t *data_block, bool is_final, int *count_payload) { if (cs.isGprs()) return rlc_data_to_dl_append_gprs(rdbi, - llc, offset, num_chunks, data_block, is_final); + llc, offset, num_chunks, data_block, is_final, + count_payload); if (cs.isEgprs()) return rlc_data_to_dl_append_egprs(rdbi, - llc, offset, num_chunks, data_block, is_final); + llc, offset, num_chunks, data_block, is_final, + count_payload); LOGP(DRLCMACDL, LOGL_ERROR, "%s data block encoding not implemented\n", cs.name()); diff --git a/src/encoding.h b/src/encoding.h index 94e9a02..710de78 100644 --- a/src/encoding.h +++ b/src/encoding.h @@ -91,6 +91,5 @@ static AppendResult rlc_data_to_dl_append( struct gprs_rlc_data_block_info *rdbi, GprsCodingScheme cs, gprs_llc *llc, int *offset, int *num_chunks, - uint8_t *data, - bool is_final); + uint8_t *data, bool is_final, int *count_payload); }; diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index da6628a..00adbc9 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -538,7 +538,7 @@ is_final = llc_queue()->size() == 0 && !keep_open(fn); ar = Encoding::rlc_data_to_dl_append(rdbi, cs, - &m_llc, &write_offset, &num_chunks, data, is_final); + &m_llc, &write_offset, &num_chunks, data, is_final, NULL); if (ar == Encoding::AR_NEED_MORE_BLOCKS) break; diff --git a/tests/edge/EdgeTest.cpp b/tests/edge/EdgeTest.cpp index 96ea0c1..3e1c708 100644 --- a/tests/edge/EdgeTest.cpp +++ b/tests/edge/EdgeTest.cpp @@ -524,7 +524,7 @@ llc.put_frame(llc_data, 11); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); @@ -535,7 +535,7 @@ llc.put_frame(llc_data, 26); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); @@ -546,7 +546,7 @@ llc.put_frame(llc_data, 99); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_NEED_MORE_BLOCKS); OSMO_ASSERT(rdbi.e == 0); @@ -571,7 +571,7 @@ llc.put_frame(llc_data, 20); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_NEED_MORE_BLOCKS); OSMO_ASSERT(rdbi.e == 0); @@ -590,7 +590,7 @@ OSMO_ASSERT(llc.chunk_size() == 1); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); @@ -601,7 +601,7 @@ llc.put_frame(llc_data, 99); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_NEED_MORE_BLOCKS); OSMO_ASSERT(rdbi.e == 0); @@ -624,7 +624,7 @@ llc.put_frame(llc_data, 7); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); @@ -635,7 +635,7 @@ llc.put_frame(llc_data, 11); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_BLOCK_FILLED); OSMO_ASSERT(rdbi.e == 0); @@ -659,7 +659,7 @@ llc.put_frame(llc_data, 99); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_NEED_MORE_BLOCKS); OSMO_ASSERT(rdbi.e == 1); @@ -682,7 +682,7 @@ llc.put_frame(llc_data, 20); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, true); + &llc, &write_offset, &num_chunks, data, true, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_BLOCK_FILLED); OSMO_ASSERT(rdbi.e == 1); @@ -705,7 +705,7 @@ llc.put_frame(llc_data, 30); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_NEED_MORE_BLOCKS); OSMO_ASSERT(rdbi.e == 1); @@ -723,7 +723,7 @@ OSMO_ASSERT(llc.chunk_size() == 10); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); @@ -734,7 +734,7 @@ llc.put_frame(llc_data, 99); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_NEED_MORE_BLOCKS); OSMO_ASSERT(rdbi.e == 0); @@ -757,7 +757,7 @@ llc.put_frame(llc_data, 11); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); @@ -768,7 +768,7 @@ llc.put_frame(llc_data, 26); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); @@ -779,7 +779,7 @@ llc.put_frame(llc_data, 99); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_NEED_MORE_BLOCKS); OSMO_ASSERT(rdbi.e == 0); @@ -809,7 +809,7 @@ llc.put_frame(llc_data, 15); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); @@ -820,7 +820,7 @@ llc.put_frame(llc_data, 12); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_NEED_MORE_BLOCKS); OSMO_ASSERT(rdbi.e == 0); @@ -840,7 +840,7 @@ OSMO_ASSERT(llc.chunk_size() == 0); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); @@ -851,7 +851,7 @@ llc.put_frame(llc_data, 7); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); @@ -863,7 +863,7 @@ llc.put_frame(llc_data, 18); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_BLOCK_FILLED); OSMO_ASSERT(rdbi.e == 0); @@ -886,7 +886,7 @@ llc.put_frame(llc_data, 6); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, false); + &llc, &write_offset, &num_chunks, data, false, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_SPACE_LEFT); OSMO_ASSERT(rdbi.e == 0); @@ -897,7 +897,7 @@ llc.put_frame(llc_data, 12); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, true); + &llc, &write_offset, &num_chunks, data, true, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_BLOCK_FILLED); OSMO_ASSERT(rdbi.e == 0); @@ -926,7 +926,7 @@ llc.put_frame(llc_data, rdbi.data_len); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, true); + &llc, &write_offset, &num_chunks, data, true, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_BLOCK_FILLED); OSMO_ASSERT(rdbi.e == 1); @@ -950,7 +950,7 @@ llc.put_frame(llc_data, rdbi.data_len - 1); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, true); + &llc, &write_offset, &num_chunks, data, true, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_BLOCK_FILLED); OSMO_ASSERT(rdbi.e == 0); @@ -975,7 +975,7 @@ llc.put_frame(llc_data, rdbi.data_len - 2); ar = Encoding::rlc_data_to_dl_append(&rdbi, cs, - &llc, &write_offset, &num_chunks, data, true); + &llc, &write_offset, &num_chunks, data, true, NULL); OSMO_ASSERT(ar == Encoding::AR_COMPLETED_BLOCK_FILLED); OSMO_ASSERT(rdbi.e == 0); -- To view, visit https://gerrit.osmocom.org/142 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0e622acb1f13f7489946baf049de4ba1cde6a1fc Gerrit-PatchSet: 2 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder From gerrit-no-reply at lists.osmocom.org Tue May 31 12:25:54 2016 From: gerrit-no-reply at lists.osmocom.org (Harald Welte) Date: Tue, 31 May 2016 12:25:54 +0000 Subject: libosmo-abis[master]: Extend osmo_rtp_send_frame API In-Reply-To: References: Message-ID: Patch Set 1: Code-Review-1 (1 comment) https://gerrit.osmocom.org/#/c/82/1/include/osmocom/trau/osmo_ortp.h File include/osmocom/trau/osmo_ortp.h: PS1, Line 69: smo_rtp_send_frame(struct osmo_rtp_socket *rs, const uint8_t *payload, : unsigned int payload_len, unsigned int duration, : bool marker); The question is, do we want to break API+ABI deliberately to add this argument, or do we rather add a new osmo_rtp_send_frame2() function that has the new argument? This way we can support both old and new openbsc/osmo-bts from one given (new) libosmo-abis installation. -- To view, visit https://gerrit.osmocom.org/82 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I23e6dccfad5643e662391a0a2abebbb45597ffd9 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-HasComments: Yes From gerrit-no-reply at lists.osmocom.org Tue May 31 12:48:02 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 31 May 2016 12:48:02 +0000 Subject: libosmo-abis[master]: Extend osmo_rtp_send_frame API In-Reply-To: References: Message-ID: Patch Set 1: Probably new function is better - only AMR needs this change and I'm not sure if it's absolutely necessary or we'll find a way to make it work without in the end. -- To view, visit https://gerrit.osmocom.org/82 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I23e6dccfad5643e662391a0a2abebbb45597ffd9 Gerrit-PatchSet: 1 Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max Gerrit-HasComments: No From gerrit-no-reply at lists.osmocom.org Tue May 31 12:55:50 2016 From: gerrit-no-reply at lists.osmocom.org (Max) Date: Tue, 31 May 2016 12:55:50 +0000 Subject: [PATCH] libosmocore[master]: Add functions to detect HR/FR SID frames Message-ID: Review at https://gerrit.osmocom.org/160 Add functions to detect HR/FR SID frames Add functions which check if given FR or HR frame (packed in RTP) contains SID (SIlence Descriptor) and corresponding tests. Related: OS#22 Change-Id: I4051e3c0d4fb9ee93d7e9e0ef4abaf9f18e227ca --- M include/osmocom/codec/codec.h M src/codec/gsm610.c M src/codec/gsm620.c M tests/codec/codec_test.c M tests/codec/codec_test.ok 5 files changed, 314 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/60/160/1 diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h index b7bcc78..23c5e20 100644 --- a/include/osmocom/codec/codec.h +++ b/include/osmocom/codec/codec.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include @@ -41,6 +42,8 @@ AMR_GOOD = 1 }; +bool osmo_check_sid_fr(uint8_t *rtp_payload, size_t payload_len); +bool osmo_check_sid_hr(uint8_t *rtp_payload, size_t payload_len); int osmo_amr_rtp_enc(uint8_t *payload, uint8_t cmr, enum osmo_amr_type ft, enum osmo_amr_quality bfi); int osmo_amr_rtp_dec(const uint8_t *payload, int payload_len, uint8_t *cmr, diff --git a/src/codec/gsm610.c b/src/codec/gsm610.c index 35f6011..8699253 100644 --- a/src/codec/gsm610.c +++ b/src/codec/gsm610.c @@ -22,6 +22,9 @@ */ #include +#include + +#include /* GSM FR - subjective importance bit ordering */ /* This array encodes GSM 05.03 Table 2. @@ -292,3 +295,215 @@ 11, /* LARc1:0 */ 29, /* LARc5:0 */ }; + +/*! \brief Check whether RTP frame contains FR SID code word according to + * TS 101 318 ?5.1.2 + * \param[in] rtp_payload Buffer with RTP payload + * \param[in] payload_len Length of payload + * \returns true if code word is found, false otherwise + */ +bool osmo_check_sid_fr(uint8_t *rtp_payload, size_t payload_len) +{ + struct bitvec bv; + + /* signature does not match Full Rate SID */ + if ((rtp_payload[0] >> 4) != 0xD) + return false; + + bv.data = rtp_payload; + bv.data_len = payload_len; + + /* code word is all 0 at given bits, numbered from 1 */ + if (bitvec_get_bit_pos(&bv, 59) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 60) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 62) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 63) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 65) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 66) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 68) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 69) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 71) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 72) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 74) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 75) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 77) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 78) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 80) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 81) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 83) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 84) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 86) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 87) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 89) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 90) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 92) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 93) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 95) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 96) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 115) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 116) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 118) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 119) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 121) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 122) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 124) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 125) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 127) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 128) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 130) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 131) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 133) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 134) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 136) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 137) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 139) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 140) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 142) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 143) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 145) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 146) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 148) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 149) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 151) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 152) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 171) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 172) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 174) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 175) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 177) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 178) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 180) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 181) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 183) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 184) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 186) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 187) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 189) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 190) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 192) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 193) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 195) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 196) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 198) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 199) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 201) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 202) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 204) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 205) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 207) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 208) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 227) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 228) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 230) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 231) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 233) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 234) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 236) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 237) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 239) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 242) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 245) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 248) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 251) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 254) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 257) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 260) != ZERO) + return false; + if (bitvec_get_bit_pos(&bv, 263) != ZERO) + return false; + + return true; +} diff --git a/src/codec/gsm620.c b/src/codec/gsm620.c index f4ac9ad..873913d 100644 --- a/src/codec/gsm620.c +++ b/src/codec/gsm620.c @@ -22,6 +22,9 @@ */ #include +#include + +#include /* GSM HR unvoiced (mode=0) frames - subjective importance bit ordering */ /* This array encode mapping between GSM 05.03 Table 3a (bits @@ -260,3 +263,62 @@ 82, /* Code 3:6 */ 81, /* Code 3:7 */ }; + +/*! \brief Check whether RTP frame contains HR SID code word according to + * TS 101 318 ?5.2.2 + * \param[in] rtp_payload Buffer with RTP payload + * \param[in] payload_len Length of payload + * \returns true if code word is found, false otherwise + */ +bool osmo_check_sid_hr(uint8_t *rtp_payload, size_t payload_len) +{ + struct bitvec bv; + bv.data = rtp_payload; + bv.data_len = payload_len; + + /* code word is all 1 at given bits, numbered from 1, MODE is always 3 */ + bv.cur_bit = 33; + if (bitvec_get_uint(&bv, 1) != 0x1) + return false; + + if (bitvec_get_uint(&bv, 2) != 0x3) + return false; + + if (bitvec_get_uint(&bv, 8) != 0xFF) + return false; + + if (bitvec_get_uint(&bv, 9) != 0x1FF) + return false; + + if (bitvec_get_uint(&bv, 5) != 0x1F) + return false; + + if (bitvec_get_uint(&bv, 4) != 0xF) + return false; + + if (bitvec_get_uint(&bv, 9) != 0x1FF) + return false; + + if (bitvec_get_uint(&bv, 5) != 0x1F) + return false; + + if (bitvec_get_uint(&bv, 4) != 0xF) + return false; + + if (bitvec_get_uint(&bv, 9) != 0x1FF) + return false; + + if (bitvec_get_uint(&bv, 5) != 0x1F) + return false; + + if (bitvec_get_uint(&bv, 4) != 0xF) + return false; + + if (bitvec_get_uint(&bv, 9) != 0x1FF) + return false; + + if (bitvec_get_uint(&bv, 5) != 0x1F) + return false; + + return true; +} diff --git a/tests/codec/codec_test.c b/tests/codec/codec_test.c index 4905dd3..1b278cb 100644 --- a/tests/codec/codec_test.c +++ b/tests/codec/codec_test.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -68,6 +69,26 @@ cmpr(_cmr, cmr), cmpr(_ft, ft), cmpr(_bfi, bfi), cmi, sti); } +uint8_t fr[] = {0xd8, 0xa9, 0xb5, 0x1d, 0xda, 0xa8, 0x82, 0xcc, 0xec, 0x52, + 0x29, 0x05, 0xa8, 0xc3, 0xe3, 0x0e, 0xb0, 0x89, 0x7a, 0xee, + 0x42, 0xca, 0xc4, 0x97, 0x22, 0xe6, 0x9e, 0xa8, 0xb8, 0xec, + 0x52, 0x26, 0xbd}; +uint8_t sid_fr[] = {0xd7, 0x27, 0x93, 0xe5, 0xe3, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + +uint8_t hr[] = {0x06, 0x46, 0x76, 0xb1, 0x8e, 0x48, 0x9a, 0x2f, 0x5e, 0x4c, + 0x22, 0x2b, 0x62, 0x25}; +uint8_t sid_hr[] = {0x03, 0x8e, 0xb6, 0xcb, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff}; + +static void test_sid_xr(uint8_t *t, size_t len, bool hr) +{ + printf("%s SID ? %s:: %d\n", hr ? "HR" : "FR", osmo_hexdump(t, len), + hr ? osmo_check_sid_hr(t, len) : osmo_check_sid_fr(t, len)); +} + int main(int argc, char **argv) { printf("AMR RTP payload decoder test:\n"); @@ -79,6 +100,13 @@ test_amr_rt(AMR_12_2, AMR_12_2, AMR_GOOD); test_amr_rt(AMR_7_40, AMR_7_40, AMR_BAD); test_amr_rt(AMR_7_40, AMR_7_40, AMR_GOOD); + printf("FR RTP payload SID test:\n"); + test_sid_xr(sid_fr, 33, false); + test_sid_xr(fr, 33, false); + + printf("HR RTP payload SID test:\n"); + test_sid_xr(sid_hr, 14, true); + test_sid_xr(hr, 14, true); return 0; } diff --git a/tests/codec/codec_test.ok b/tests/codec/codec_test.ok index 0f76fef..2af7cc7 100644 --- a/tests/codec/codec_test.ok +++ b/tests/codec/codec_test.ok @@ -7,3 +7,9 @@ [33/33] AMR 12,2 kbit/s (GSM-EFR), CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 [21/21] AMR 7,40 kbit/s (TDMA-EFR), CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 [21/21] AMR 7,40 kbit/s (TDMA-EFR), CMR: OK, FT: OK, BFI: OK, CMI: -1, STI: -1 +FR RTP payload SID test: +FR SID ? d7 27 93 e5 e3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 :: 1 +FR SID ? d8 a9 b5 1d da a8 82 cc ec 52 29 05 a8 c3 e3 0e b0 89 7a ee 42 ca c4 97 22 e6 9e a8 b8 ec 52 26 bd :: 0 +HR RTP payload SID test: +HR SID ? 03 8e b6 cb ff ff ff ff ff ff ff ff ff ff :: 1 +HR SID ? 06 46 76 b1 8e 48 9a 2f 5e 4c 22 2b 62 25 :: 0 -- To view, visit https://gerrit.osmocom.org/160 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4051e3c0d4fb9ee93d7e9e0ef4abaf9f18e227ca Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Max From gerrit-no-reply at lists.osmocom.org Tue May 31 15:43:47 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 31 May 2016 15:43:47 +0000 Subject: [PATCH] openbsc[master]: add .gitreview Message-ID: Review at https://gerrit.osmocom.org/161 add .gitreview A .gitreview file is required to use git review. More information about git review https://www.mediawiki.org/wiki/Gerrit/git-review Change-Id: Ie7cdf16232181d4b8093e61f2d8a3faed9010d4f --- A .gitreview 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/61/161/1 diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..ee67509 --- /dev/null +++ b/.gitreview @@ -0,0 +1,3 @@ +[gerrit] +host=gerrit.osmocom.org +project=openbsc -- To view, visit https://gerrit.osmocom.org/161 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie7cdf16232181d4b8093e61f2d8a3faed9010d4f Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus From gerrit-no-reply at lists.osmocom.org Tue May 31 15:48:05 2016 From: gerrit-no-reply at lists.osmocom.org (lynxis lazus) Date: Tue, 31 May 2016 15:48:05 +0000 Subject: [PATCH] openbsc[master]: gprs: use new uint8_t * for kv in gprs_cipher_run() Message-ID: Review at https://gerrit.osmocom.org/162 gprs: use new uint8_t * for kv in gprs_cipher_run() libosmocore changed in bf990bb8 Update internal GPRS cipher API from uint_64 to uint8_t*. Fix a warning. Change-Id: Ib5bfe1fb05c693347b11ff4faadd3fc2205ebd76 --- M openbsc/src/gprs/gprs_llc.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/62/162/1 diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c index 4cf5163..883f0cc 100644 --- a/openbsc/src/gprs/gprs_llc.c +++ b/openbsc/src/gprs/gprs_llc.c @@ -410,7 +410,7 @@ uint8_t cipher_out[GSM0464_CIPH_MAX_BLOCK]; uint32_t iv; int rc, i; - uint64_t kc = *(uint64_t *)&lle->llme->kc; + uint8_t *kc = lle->llme->kc; /* Compute the 'Input' Paraemeter */ iv = gprs_cipher_gen_input_ui(iov_ui, sapi, nu, oc); @@ -611,7 +611,7 @@ uint16_t crypt_len = llhp.data_len + 3; uint8_t cipher_out[GSM0464_CIPH_MAX_BLOCK]; uint32_t iv; - uint64_t kc = *(uint64_t *)&lle->llme->kc; + uint8_t *kc = lle->llme->kc; int rc, i; if (lle->llme->algo == GPRS_ALGO_GEA0) { -- To view, visit https://gerrit.osmocom.org/162 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib5bfe1fb05c693347b11ff4faadd3fc2205ebd76 Gerrit-PatchSet: 1 Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-Owner: lynxis lazus