lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

May 2023

  • 1 participants
  • 2583 discussions
[S] Change in pysim[master]: ts_31_102: Fix FID + SFI of EF.MCHPPLMN
by laforge 24 May '23

24 May '23
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/32981 ) Change subject: ts_31_102: Fix FID + SFI of EF.MCHPPLMN ...................................................................... ts_31_102: Fix FID + SFI of EF.MCHPPLMN Change-Id: I7e24c904e47cc6f90e90b8634cbed478bd14231f --- M pySim/ts_31_102.py 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/81/32981/1 diff --git a/pySim/ts_31_102.py b/pySim/ts_31_102.py index 08a99f6..77b8325 100644 --- a/pySim/ts_31_102.py +++ b/pySim/ts_31_102.py @@ -1330,7 +1330,7 @@ # TS 31.102 Section 4.4.11.20 (Rel 17) class EF_MCHPPLMN(TransparentEF): - def __init__(self, fid='4f12', sfid=0x12, name='EF.MCHPPLMN', + def __init__(self, fid='4f15', sfid=0x15, name='EF.MCHPPLMN', desc='Multiplier Coefficient for Higher Priority PLMN search', **kwargs): super().__init__(fid, sfid=sfid, name=name, desc=desc, **kwargs) self._construct = Struct('multiplier_coefficient'/Int8ub) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/32981 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I7e24c904e47cc6f90e90b8634cbed478bd14231f Gerrit-Change-Number: 32981 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in libosmo-netif[arehbein/osmo_io_ipa]: stream: Move helper functions
by arehbein 24 May '23

24 May '23
arehbein has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/32974 ) Change subject: stream: Move helper functions ...................................................................... stream: Move helper functions Prepare for next commits Change-Id: I318965538e5329c44d0910694621b5e1f1db0626 --- M src/stream.c 1 file changed, 32 insertions(+), 21 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/74/32974/1 diff --git a/src/stream.c b/src/stream.c index 150b85f..d1682c2 100644 --- a/src/stream.c +++ b/src/stream.c @@ -1184,6 +1184,27 @@ osmo_stream_cli_open(cli); } +/* msgb_l1(msg) is expected to be set */ +static inline enum ipaccess_proto msg_get_ipa_proto(struct msgb *msg) +{ + struct ipa_head *ih = msgb_l1(msg); + OSMO_ASSERT(ih); + return ih->proto; +} + +/* msgb->l1h is expected to be set, msgb->l2h is expected to be set if + * we have IPAC_PROTO_OSMO specified in the header. + * Returns the protocol extension (enum ipaccess_proto) or -ENOPROTOOPT if + * we don't have IPAC_PROTO_OSMO specified in the IPA header */ +static inline int msg_get_ipa_proto_ext(struct msgb *msg) +{ + if (msg_get_ipa_proto(msg) != IPAC_PROTO_OSMO) + return -ENOPROTOOPT; + struct ipa_head_ext *ihe = msgb_l2(msg); + OSMO_ASSERT(ihe); + return ihe->proto; +} + /*! \brief Enqueue data to be sent via an Osmocom stream client * \param[in] cli Stream Client through which we want to send * \param[in] msg Message buffer to enqueue in transmit queue */ @@ -1937,27 +1958,6 @@ talloc_free(conn); } -/* msgb_l1(msg) is expected to be set */ -static inline enum ipaccess_proto msg_get_ipa_proto(struct msgb *msg) -{ - struct ipa_head *ih = msgb_l1(msg); - OSMO_ASSERT(ih); - return ih->proto; -} - -/* msgb->l1h is expected to be set, msgb->l2h is expected to be set if - * we have IPAC_PROTO_OSMO specified in the header. - * Returns the protocol extension (enum ipaccess_proto) or -ENOPROTOOPT if - * we don't have IPAC_PROTO_OSMO specified in the IPA header */ -static inline int msg_get_ipa_proto_ext(struct msgb *msg) -{ - if (msg_get_ipa_proto(msg) != IPAC_PROTO_OSMO) - return -ENOPROTOOPT; - struct ipa_head_ext *ihe = msgb_l2(msg); - OSMO_ASSERT(ihe); - return ihe->proto; -} - /*! \brief Enqueue IPA data to be sent via an Osmocom stream server * \param[in] conn Stream Server through which we want to send * \param[in] p Protocol transported by IPA. When set to IPAC_PROTO_UNSPECIFIED, the protocol will be -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/32974 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: arehbein/osmo_io_ipa Gerrit-Change-Id: I318965538e5329c44d0910694621b5e1f1db0626 Gerrit-Change-Number: 32974 Gerrit-PatchSet: 1 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmo-netif[arehbein/osmo_io_ipa]: stream: Add IPA send function/IPA-mode read to cli
by arehbein 24 May '23

24 May '23
arehbein has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/32975 ) Change subject: stream: Add IPA send function/IPA-mode read to cli ...................................................................... stream: Add IPA send function/IPA-mode read to cli - Also: Adapt ipa-stream-client example to work alongside new change Related: OS#5753 Change-Id: I042700af6614dd1879514dca0482e05b5ff22cb7 --- M examples/ipa-stream-client.c M include/osmocom/netif/stream.h M src/stream.c 3 files changed, 37 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/75/32975/1 diff --git a/examples/ipa-stream-client.c b/examples/ipa-stream-client.c index c3bb2a3..44a6caf 100644 --- a/examples/ipa-stream-client.c +++ b/examples/ipa-stream-client.c @@ -93,10 +93,8 @@ msg_sent->num = i; llist_add(&msg_sent->head, &msg_sent_list); - ipa_prepend_header_ext(msg, IPAC_PROTO_EXT_MGCP); - osmo_ipa_msg_push_header(msg, IPAC_PROTO_OSMO); - - osmo_stream_cli_send(conn, msg); + osmo_stream_cli_send_ipa(conn, IPAC_PROTO_OSMO, + IPAC_PROTO_EXT_MGCP, msg); LOGP(DIPATEST, LOGL_DEBUG, "enqueueing msg %d of " "%d bytes to be sent\n", i, msg->len); diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h index 16940dc..5c8cea3 100644 --- a/include/osmocom/netif/stream.h +++ b/include/osmocom/netif/stream.h @@ -113,6 +113,8 @@ void osmo_stream_cli_close(struct osmo_stream_cli *cli); void osmo_stream_cli_send(struct osmo_stream_cli *cli, struct msgb *msg); +void osmo_stream_cli_send_ipa(struct osmo_stream_cli *cli, int ipaccess_proto, + enum ipaccess_proto_ext pe, struct msgb *msg); int osmo_stream_cli_recv(struct osmo_stream_cli *cli, struct msgb *msg); void osmo_stream_cli_clear_tx_queue(struct osmo_stream_cli *cli); diff --git a/src/stream.c b/src/stream.c index d1682c2..00ea33d 100644 --- a/src/stream.c +++ b/src/stream.c @@ -689,8 +689,8 @@ if (res == 0) osmo_stream_cli_reconnect(cli); else if (cli->iofd_read_cb) { - // if (cli->stream_proto == OSMO_STREAM_IPAC) - // ipa_check_pull_headers( + if (cli->stream_proto == OSMO_STREAM_IPAC) + ipa_check_pull_headers(msg, cli); cli->iofd_read_cb(cli, msg); } break; @@ -868,7 +868,6 @@ client_ops.segmentation_cb = segmentation_cbs[osp]; osmo_iofd_set_ioops(cli->iofd, &client_ops); cli->flags |= OSMO_STREAM_CLI_F_RECONF; - osmo_iofd_set_ioops(cli->iofd, &osmo_stream_cli_ioops); } /*! \brief Set the socket type for the stream server link @@ -1207,6 +1206,25 @@ /*! \brief Enqueue data to be sent via an Osmocom stream client * \param[in] cli Stream Client through which we want to send + * \param[in] p Protocol transported by IPA. When set to IPAC_PROTO_UNSPECIFIED, the protocol will be + * read from the msgb structure's l1 and possibly l2 headers. + * \param[in] pe Ignored, unless p == IPAC_PROTO_OSMO, in which case this specifies the + * Osmocom protocol extension + * \param[in] msg Message buffer to enqueue in transmit queue */ +void osmo_stream_cli_send_ipa(struct osmo_stream_cli *cli, int ipaccess_proto, + enum ipaccess_proto_ext pe, struct msgb *msg) +{ + OSMO_ASSERT(msg); + if (ipaccess_proto == IPAC_PROTO_UNSPECIFIED) { + ipaccess_proto = msg_get_ipa_proto(msg); + pe = msg_get_ipa_proto_ext(msg); + } + ipa_push_headers(ipaccess_proto, pe, msg); + osmo_stream_cli_send(cli, msg); +} + +/*! \brief Enqueue data to be sent via an Osmocom stream client + * \param[in] cli Stream Client through which we want to send * \param[in] msg Message buffer to enqueue in transmit queue */ void osmo_stream_cli_send(struct osmo_stream_cli *cli, struct msgb *msg) { -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/32975 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: arehbein/osmo_io_ipa Gerrit-Change-Id: I042700af6614dd1879514dca0482e05b5ff22cb7 Gerrit-Change-Number: 32975 Gerrit-PatchSet: 1 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmo-netif[arehbein/osmo_io_ipa]: example: Remove call to osmo_ipa_process_msg()
by arehbein 24 May '23

24 May '23
arehbein has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-netif/+/32976 ) Change subject: example: Remove call to osmo_ipa_process_msg() ...................................................................... example: Remove call to osmo_ipa_process_msg() That call now happens up the call stack in IPA mode Change-Id: I53283ec7bd7f07dfa612681ae84af93d5cd098b9 --- M examples/ipa-stream-client.c 1 file changed, 12 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/76/32976/1 diff --git a/examples/ipa-stream-client.c b/examples/ipa-stream-client.c index 44a6caf..a48aace 100644 --- a/examples/ipa-stream-client.c +++ b/examples/ipa-stream-client.c @@ -104,12 +104,7 @@ static int read_cb(struct osmo_stream_cli *conn, struct msgb *msg) { - LOGP(DIPATEST, LOGL_DEBUG, "received message from stream (len=%d)\n", msgb_length(msg)); - - if (osmo_ipa_process_msg(msg) < 0) { - LOGP(DIPATEST, LOGL_ERROR, "bad IPA message\n"); - return 0; - } + LOGP(DIPATEST, LOGL_DEBUG, "received message from stream (payload len=%d)\n", msgb_length(msg)); int num; struct msg_sent *cur, *tmp, *found = NULL; -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/32976 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: arehbein/osmo_io_ipa Gerrit-Change-Id: I53283ec7bd7f07dfa612681ae84af93d5cd098b9 Gerrit-Change-Number: 32976 Gerrit-PatchSet: 1 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[L] Change in libosmocore[master]: ASCI: Add message definition and encoding according to 3GPP TS 48.008
by jolly 24 May '23

24 May '23
Attention is currently required from: jolly, pespin. Hello Jenkins Builder, laforge, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmocore/+/32932 to look at the new patch set (#5). Change subject: ASCI: Add message definition and encoding according to 3GPP TS 48.008 ...................................................................... ASCI: Add message definition and encoding according to 3GPP TS 48.008 Change-Id: Ib94c64136c31ce4af67c314a8550d93946cc844f --- M include/osmocom/gsm/gsm0808.h M include/osmocom/gsm/protocol/gsm_08_08.h M src/gsm/gsm0808.c M src/gsm/libosmogsm.map 4 files changed, 914 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/32/32932/5 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32932 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib94c64136c31ce4af67c314a8550d93946cc844f Gerrit-Change-Number: 32932 Gerrit-PatchSet: 5 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in osmocom-bb[master]: layer23: modem: Submit GMMRR-PAGE.ind upon rx of Paging Request Type ...
by pespin 24 May '23

24 May '23
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/32973 ) Change subject: layer23: modem: Submit GMMRR-PAGE.ind upon rx of Paging Request Type 1/2/3 ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: Thinking twice about this one, we may want to pass the encoded message to libosmo-gprs-rlcmac and decode + submit GMMR-PAGING.ind to GMM from there. This would mean however that we'd need IMSI & P-TMSI knowledge in RLCMAC layer, which I think doesn't so far. -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/32973 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Iee4b5ee5e1e5874b550dd8536b095bf0b5eeb8f4 Gerrit-Change-Number: 32973 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Wed, 24 May 2023 12:51:30 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[L] Change in libosmocore[master]: ASCI: Add message definition and encoding according to 3GPP TS 48.008
by Jenkins Builder 24 May '23

24 May '23
Attention is currently required from: pespin. Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/32932 ) Change subject: ASCI: Add message definition and encoding according to 3GPP TS 48.008 ...................................................................... Patch Set 4: (1 comment) File src/gsm/gsm0808.c: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-7340): https://gerrit.osmocom.org/c/libosmocore/+/32932/comment/647ad6e6_c9c0c950 PS4, Line 2154: * message type infromation in the specifications. */ 'infromation' may be misspelled - perhaps 'information'? -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32932 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib94c64136c31ce4af67c314a8550d93946cc844f Gerrit-Change-Number: 32932 Gerrit-PatchSet: 4 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 24 May 2023 12:50:47 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
[L] Change in libosmocore[master]: ASCI: Add IE transcoding according to 3GPP TS 48.008
by jolly 24 May '23

24 May '23
Attention is currently required from: laforge, pespin. jolly has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/32931 ) Change subject: ASCI: Add IE transcoding according to 3GPP TS 48.008 ...................................................................... Patch Set 4: (2 comments) File include/osmocom/gsm/gsm0808_utils.h: https://gerrit.osmocom.org/c/libosmocore/+/32931/comment/469078d6_a8668c0a PS1, Line 33: #include <sys/socket.h> > After correcting my patches, this change is not required anymore, so I removed it. Done File src/gsm/gsm0808_utils.c: https://gerrit.osmocom.org/c/libosmocore/+/32931/comment/756dcd13_a5f5e83f PS1, Line 2517: *ci = osmo_load32le(elem); > Yes, this is LE. I added a comment line that states it. Done -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32931 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ic1fc714bb04228a7f32e9925811e21c8efc610bd Gerrit-Change-Number: 32931 Gerrit-PatchSet: 4 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 24 May 2023 12:50:38 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: jolly <andreas(a)eversberg.eu> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[L] Change in libosmocore[master]: ASCI: Add message definition and encoding according to 3GPP TS 48.008
by jolly 24 May '23

24 May '23
Attention is currently required from: pespin. jolly has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/32932 ) Change subject: ASCI: Add message definition and encoding according to 3GPP TS 48.008 ...................................................................... Patch Set 4: (1 comment) File src/gsm/gsm0808_utils.c: https://gerrit.osmocom.org/c/libosmocore/+/32932/comment/7bdeb979_f4cac50e PS1, Line 2378: ptr = msgb_put(msg, 1); > fyi, there's msgb_put_u8: […] This is not required anymore, because i use packed structures now. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32932 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib94c64136c31ce4af67c314a8550d93946cc844f Gerrit-Change-Number: 32932 Gerrit-PatchSet: 4 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 24 May 2023 12:50:15 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmocom-bb[master]: layer23: modem: Submit GMMRR-PAGE.ind upon rx of Paging Request Type ...
by pespin 24 May '23

24 May '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/32973 ) Change subject: layer23: modem: Submit GMMRR-PAGE.ind upon rx of Paging Request Type 1/2/3 ...................................................................... layer23: modem: Submit GMMRR-PAGE.ind upon rx of Paging Request Type 1/2/3 Change-Id: Iee4b5ee5e1e5874b550dd8536b095bf0b5eeb8f4 --- M src/host/layer23/src/modem/grr.c 1 file changed, 172 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/73/32973/1 diff --git a/src/host/layer23/src/modem/grr.c b/src/host/layer23/src/modem/grr.c index 70c6c53..6a287af 100644 --- a/src/host/layer23/src/modem/grr.c +++ b/src/host/layer23/src/modem/grr.c @@ -35,6 +35,8 @@ #include <osmocom/gsm/protocol/gsm_04_08.h> #include <osmocom/gsm/protocol/gsm_08_58.h> #include <osmocom/gprs/rlcmac/rlcmac_prim.h> +#include <osmocom/gprs/rlcmac/csn1_defs.h> +#include <osmocom/gprs/gmm/gmm_prim.h> #include <osmocom/bb/common/logging.h> #include <osmocom/bb/common/sysinfo.h> @@ -315,6 +317,161 @@ return 0; } +/* TS 44.018 3.3.2.1.1: +* It is used when sending paging information to a mobile station in packet idle mode, if PCCCH is not present in the cell. +* If the mobile station in packet idle mode is identified by its IMSI, it shall parse the message for a corresponding Packet +* Page Indication field: +* - if the Packet Page Indication field indicates a packet paging procedure, the mobile station shall proceed as +* specified in sub-clause 3.5.1.2. +* 3.5.1.2 "On receipt of a packet paging request": +* On the receipt of a paging request message, the RR sublayer of addressed mobile station indicates the receipt of a +* paging request to the MM sublayer, see 3GPP TS 24.007. +*/ +/* TS 44.018 9.1.22 "Paging request type 1" */ +static int grr_rx_pag_req_1(struct osmocom_ms *ms, struct msgb *msg) +{ + struct gsm48_paging1 *pag = msgb_l3(msg); + (void)pag; + uint8_t len; + uint8_t *buf = pag->data; + int rc; + struct osmo_mobile_identity mi1 = {}; /* GSM_MI_TYPE_NONE */ + struct osmo_mobile_identity mi2 = {}; /* GSM_MI_TYPE_NONE */ + P1_Rest_Octets_t p1ro = {}; + unsigned p1_rest_oct_len; + struct osmo_gprs_gmm_prim *gmm_prim; + /* TS 44.018 3.3.2.1.1: + * It is used when sending paging information to a mobile station in + * packet idle mode, if PCCCH is not present in the cell. + * If the mobile station in packet idle mode is identified by its IMSI, it shall parse the message for a corresponding Packet + * Page Indication field: + * - if the Packet Page Indication field indicates a packet paging procedure, the mobile station shall proceed as + * specified in sub-clause 3.5.1.2. + * 3.5.1.2 "On receipt of a packet paging request": + * On the receipt of a paging request message, the RR sublayer of addressed mobile station indicates the receipt of a + * paging request to the MM sublayer, see 3GPP TS 24.007. + */ + + /* TODO: skip messages outside paging group? (3GPP TS 45.002) */ + + LOGP(DRR, LOGL_NOTICE, "Rx Paging Request Type 1\n"); + + if (msgb_l3len(msg) < sizeof(*pag)) + return -EBADMSG; + + /* The L2 pseudo length of this message is the sum of lengths of all + * information elements present in the message except the P1 Rest Octets and L2 + * Pseudo Length information elements. */ + if (pag->l2_plen == msgb_l3len(msg) - sizeof(pag->l2_plen)) { + /* no P1 Rest Octets => no Packet Page Indication => Discard */ + return 0; + } + + if (msgb_l3len(msg) < sizeof(*pag) + 1) + return -EBADMSG; + len = *buf; + buf++; + + if (msgb_l3len(msg) < sizeof(*pag) + 1 + len) + return -EBADMSG; + + if ((rc = osmo_mobile_identity_decode(&mi1, buf, len, false)) < 0) + return rc; + buf += len; + + if (msgb_l3len(msg) < (buf - (uint8_t *)pag) + 1) { + /* No MI2 and no P1 Rest Octets => no Packet Page Indication => Discard */ + return 0; + } + + if (*buf == GSM48_IE_MOBILE_ID) { + buf++; + if (msgb_l3len(msg) < (buf - (uint8_t *)pag) + 1) + return -EBADMSG; + len = *buf; + buf++; + if (msgb_l3len(msg) < (buf - (uint8_t *)pag) + len) + return -EBADMSG; + if ((rc = osmo_mobile_identity_decode(&mi2, buf, len, false)) < 0) + return rc; + buf += len; + } + + p1_rest_oct_len = msgb_l3len(msg) - (buf - (uint8_t *)pag); + if (p1_rest_oct_len == 0) { + /*No P1 Rest Octets => no Packet Page Indication => Discard */ + return 0; + } + + rc = osmo_gprs_rlcmac_decode_p1ro(&p1ro, buf, p1_rest_oct_len); + if (rc != 0) { + LOGP(DRR, LOGL_ERROR, "Failed to parse P1 Rest Octets\n"); + return rc; + } + + if (p1ro.Packet_Page_Indication_1 == 1) { /* for GPRS*/ + switch (mi1.type) { + case GSM_MI_TYPE_IMSI: + if (strcmp(mi1.imsi, ms->subscr.imsi) == 0) + goto tx_page_ind; + break; + case GSM_MI_TYPE_TMSI: + if (mi1.tmsi == ms->subscr.gprs.ptmsi) + goto tx_page_ind; + break; + default: + return -EINVAL; + } + } + + if (p1ro.Packet_Page_Indication_2 == 1) { /* for GPRS*/ + switch (mi2.type) { + case GSM_MI_TYPE_IMSI: + if (strcmp(mi2.imsi, ms->subscr.imsi) == 0) + goto tx_page_ind; + break; + case GSM_MI_TYPE_TMSI: + if (mi2.tmsi == ms->subscr.gprs.ptmsi) + goto tx_page_ind; + break; + default: + return -EINVAL; + } + } + + return rc; + +tx_page_ind: + /* TODO: convert IMSI/PTMSI -> TLLI using some cached values from GMM layers */ + uint32_t tlli = 0; + /* TS 24.007 C.13: Submit GMMRR-PAGE.ind: */ + gmm_prim = osmo_gprs_gmm_prim_alloc_gmmrr_page_ind(tlli); + rc = osmo_gprs_gmm_prim_lower_up(gmm_prim); + return rc; +} + +static int grr_rx_pag_req_2(struct osmocom_ms *ms, struct msgb *msg) +{ + struct gsm48_paging2 *pag = msgb_l3(msg); + (void)pag; + + /* TODO: skip messages outside paging group? (3GPP TS 45.002) */ + + LOGP(DRR, LOGL_NOTICE, "Rx Paging Request Type 2\n"); + return 0; +} + +static int grr_rx_pag_req_3(struct osmocom_ms *ms, struct msgb *msg) +{ + struct gsm48_paging3 *pag = msgb_l3(msg); + (void)pag; + + /* TODO: skip messages outside paging group? (3GPP TS 45.002) */ + + LOGP(DRR, LOGL_ERROR, "Rx Paging Request Type 3: TODO Cell Update\n"); + return 0; +} + /* Dummy Paging Request 1 with "no identity" */ static const uint8_t paging_fill[] = { 0x15, 0x06, 0x21, 0x00, 0x01, 0xf0, 0x2b, @@ -363,6 +520,12 @@ switch (sih->system_information) { case GSM48_MT_RR_IMM_ASS: return grr_rx_imm_ass(ms, msg); + case GSM48_MT_RR_PAG_REQ_1: + return grr_rx_pag_req_1(ms, msg); + case GSM48_MT_RR_PAG_REQ_2: + return grr_rx_pag_req_2(ms, msg); + case GSM48_MT_RR_PAG_REQ_3: + return grr_rx_pag_req_3(ms, msg); default: return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/32973 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Iee4b5ee5e1e5874b550dd8536b095bf0b5eeb8f4 Gerrit-Change-Number: 32973 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • ...
  • 259
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.