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

December 2022

  • 1 participants
  • 1979 discussions
Change in osmo-ttcn3-hacks[master]: library/RLCMAC_Templates: add ts_PTCCHDownlinkMsg
by fixeria 20 Dec '22

20 Dec '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30741 ) Change subject: library/RLCMAC_Templates: add ts_PTCCHDownlinkMsg ...................................................................... library/RLCMAC_Templates: add ts_PTCCHDownlinkMsg Change-Id: Ia47a5c6a5b27b41a5339f1e8ce60405b01de0a1f Related: OS#5500 --- M library/RLCMAC_Templates.ttcn 1 file changed, 37 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/41/30741/1 diff --git a/library/RLCMAC_Templates.ttcn b/library/RLCMAC_Templates.ttcn index 7d7ff28..612ce02 100644 --- a/library/RLCMAC_Templates.ttcn +++ b/library/RLCMAC_Templates.ttcn @@ -827,6 +827,43 @@ payload := data } + template (value) PTCCHDownlinkMsg + ts_PTCCHDownlinkMsg(template (value) uint7_t tai0_ta := 0, + template (value) uint7_t tai1_ta := 0, + template (value) uint7_t tai2_ta := 0, + template (value) uint7_t tai3_ta := 0, + template (value) uint7_t tai4_ta := 0, + template (value) uint7_t tai5_ta := 0, + template (value) uint7_t tai6_ta := 0, + template (value) uint7_t tai7_ta := 0, + template (value) uint7_t tai8_ta := 0, + template (value) uint7_t tai9_ta := 0, + template (value) uint7_t tai10_ta := 0, + template (value) uint7_t tai11_ta := 0, + template (value) uint7_t tai12_ta := 0, + template (value) uint7_t tai13_ta := 0, + template (value) uint7_t tai14_ta := 0, + template (value) uint7_t tai15_ta := 0) := { + ta_idx := { + { spare := '0'B, ta_val := tai0_ta }, + { spare := '0'B, ta_val := tai1_ta }, + { spare := '0'B, ta_val := tai2_ta }, + { spare := '0'B, ta_val := tai3_ta }, + { spare := '0'B, ta_val := tai4_ta }, + { spare := '0'B, ta_val := tai5_ta }, + { spare := '0'B, ta_val := tai6_ta }, + { spare := '0'B, ta_val := tai7_ta }, + { spare := '0'B, ta_val := tai8_ta }, + { spare := '0'B, ta_val := tai9_ta }, + { spare := '0'B, ta_val := tai10_ta }, + { spare := '0'B, ta_val := tai11_ta }, + { spare := '0'B, ta_val := tai12_ta }, + { spare := '0'B, ta_val := tai13_ta }, + { spare := '0'B, ta_val := tai14_ta }, + { spare := '0'B, ta_val := tai15_ta } + }, + padding := '2B2B2B2B2B2B2B'O + } template PTCCHDownlinkMsg tr_PTCCHDownlinkMsg(template (present) uint7_t tai0_ta := ?, template (present) uint7_t tai1_ta := ?, -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30741 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ia47a5c6a5b27b41a5339f1e8ce60405b01de0a1f Gerrit-Change-Number: 30741 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-ttcn3-hacks[master]: library/RLCMAC_Templates: add ts_RLCMAC_DL_DUMMY_CTRL
by fixeria 20 Dec '22

20 Dec '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30742 ) Change subject: library/RLCMAC_Templates: add ts_RLCMAC_DL_DUMMY_CTRL ...................................................................... library/RLCMAC_Templates: add ts_RLCMAC_DL_DUMMY_CTRL Change-Id: I6c2f3677151f6c4bb013e1515f43942ffc24969f Related: OS#5500 --- M library/RLCMAC_Templates.ttcn 1 file changed, 33 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/42/30742/1 diff --git a/library/RLCMAC_Templates.ttcn b/library/RLCMAC_Templates.ttcn index 612ce02..a4cd993 100644 --- a/library/RLCMAC_Templates.ttcn +++ b/library/RLCMAC_Templates.ttcn @@ -506,10 +506,21 @@ } } - template DlMacHeader t_RLCMAC_DlMacH(template (present) MacPayloadType pt, - template (present) boolean rrbp_valid, - template (present) MacRrbp rrbp, - template (present) uint3_t usf) := { + template (value) DlMacHeader + ts_RLCMAC_DlMacH(template (value) MacPayloadType pt := MAC_PT_RLCMAC_NO_OPT, + template (value) boolean rrbp_valid := false, + template (value) MacRrbp rrbp := RRBP_Nplus13_mod_2715648, + template (value) uint3_t usf := 7) := { + payload_type := pt, + rrbp := rrbp, + rrbp_valid := rrbp_valid, + usf := usf + } + template DlMacHeader + t_RLCMAC_DlMacH(template (present) MacPayloadType pt, + template (present) boolean rrbp_valid, + template (present) MacRrbp rrbp, + template (present) uint3_t usf) := { payload_type := pt, rrbp := rrbp, rrbp_valid := rrbp_valid, @@ -529,6 +540,24 @@ } } + template (value) RlcmacDlBlock + ts_RLCMAC_DL_DUMMY_CTRL(template (value) DlMacHeader mac_hdr := ts_RLCMAC_DlMacH, + template (value) PageMode page_mode := PAGE_MODE_NORMAL) := { + ctrl := { + mac_hdr := mac_hdr, + opt := omit, + payload := { + msg_type := PACKET_DL_DUMMY_CTRL, + u := { + dl_dummy := { + page_mode := page_mode, + persistence_levels_present := '0'B, + persistence_levels := omit + } + } + } + } + } template RlcmacDlBlock tr_RLCMAC_DL_DUMMY_CTRL(template uint3_t usf := ?, template PageMode page_mode := ?) := { ctrl := { mac_hdr := { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30742 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I6c2f3677151f6c4bb013e1515f43942ffc24969f Gerrit-Change-Number: 30742 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-ttcn3-hacks[master]: library/L1CTL_Types: add send template for L1CTL_DATA_IND
by fixeria 20 Dec '22

20 Dec '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30738 ) Change subject: library/L1CTL_Types: add send template for L1CTL_DATA_IND ...................................................................... library/L1CTL_Types: add send template for L1CTL_DATA_IND We need to be able to send L1ctlDlMessage to the l1gprs_test [1], a special program for testing the MS side GRR implementation. Change-Id: Id163cb53afcbf803caf60a5b1a5768c67a9a2bf0 Related: [1] I36ceec4035b2ea593d47998f3f14f1415c606765 Related: OS#5500 --- M library/L1CTL_Types.ttcn 1 file changed, 27 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/38/30738/1 diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn index d525924..c8767e2 100644 --- a/library/L1CTL_Types.ttcn +++ b/library/L1CTL_Types.ttcn @@ -855,7 +855,33 @@ payload := * }; - /* for matching against incoming DATA_IND */ + /* for sending and matching L1CTL_DATA_IND */ + template (value) L1ctlDlMessage + ts_L1CTL_DATA_IND(template (value) RslChannelNr chan_nr, + template (value) RslLinkId link_id, + template (value) octetstring l2_data, + template (value) GsmBandArfcn arfcn, + template (value) uint32_t fn := 1337, + template (value) GsmRxLev rx_level := 63, + template (value) uint8_t num_biterr := 0, + template (value) uint8_t fire_crc := 0) := { + header := ts_L1ctlHeader(L1CTL_DATA_IND), + dl_info := { + chan_nr := chan_nr, + link_id := link_id, + arfcn := arfcn, + frame_nr := fn, + rx_level := rx_level, + snr := 0, + num_biterr := num_biterr, + fire_crc := fire_crc + }, + payload := { + data_ind := { + payload := l2_data + } + } + }; template L1ctlDlMessage tr_L1CTL_DATA_IND(template (present) RslChannelNr chan_nr, template (present) RslLinkId link_id := ?, -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30738 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id163cb53afcbf803caf60a5b1a5768c67a9a2bf0 Gerrit-Change-Number: 30738 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-ttcn3-hacks[master]: library/L1CTL_Types: eliminate warning about missing 'h0h1' field
by fixeria 20 Dec '22

20 Dec '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30737 ) Change subject: library/L1CTL_Types: eliminate warning about missing 'h0h1' field ...................................................................... library/L1CTL_Types: eliminate warning about missing 'h0h1' field Change-Id: I73c86eea4708823e9c004a5b830793ce705dcb75 --- M library/L1CTL_Types.ttcn 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/37/30737/1 diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn index 1b50703..d525924 100644 --- a/library/L1CTL_Types.ttcn +++ b/library/L1CTL_Types.ttcn @@ -650,6 +650,7 @@ payload := { dm_est_req := { tsc := tsc, + h0h1 := -, tch_mode := L1CTL_CHAN_MODE_SIGN, audio_mode := t_L1CTL_AudioModeFwd } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/30737 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I73c86eea4708823e9c004a5b830793ce705dcb75 Gerrit-Change-Number: 30737 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in libosmo-gprs[master]: llc: Proper separation of public & private APIs, Introduce llc_prim API
by fixeria 20 Dec '22

20 Dec '22
Attention is currently required from: pespin, dexter. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/30489 ) Change subject: llc: Proper separation of public & private APIs, Introduce llc_prim API ...................................................................... Patch Set 4: Code-Review+1 (8 comments) Patchset: PS4: None of my comments are critical, looks nice to me in general! File include/osmocom/gprs/llc/llc_private.h: https://gerrit.osmocom.org/c/libosmo-gprs/+/30489/comment/a517bc3a_c3484046 PS4, Line 36: OSMO_ Private API should not be using the 'OSMO_' prefix, right? https://gerrit.osmocom.org/c/libosmo-gprs/+/30489/comment/c253a562_481e6a6b PS4, Line 52: OSMO_ Same here: drop 'OSMO_' prefix. https://gerrit.osmocom.org/c/libosmo-gprs/+/30489/comment/9bd03185_f118e034 PS4, Line 78: OSMO_ Same here: drop 'OSMO_' prefix. https://gerrit.osmocom.org/c/libosmo-gprs/+/30489/comment/ab79c2ae_7cfbd677 PS4, Line 116: OSMO_ Same here: drop 'OSMO_' prefix. https://gerrit.osmocom.org/c/libosmo-gprs/+/30489/comment/0c604c51_8eaad7f7 PS4, Line 131: OSMO_ Same here: drop 'OSMO_' prefix. https://gerrit.osmocom.org/c/libosmo-gprs/+/30489/comment/ac4a4ffc_024946c4 PS4, Line 154: OSMO_ Same here: drop 'OSMO_' prefix. File src/llc/llc.c: https://gerrit.osmocom.org/c/libosmo-gprs/+/30489/comment/88e576f8_ec38b2e5 PS4, Line 203: &llme->lle[sapi] We may want to check-if/assert-that: sapi < ARRAY_SIZE(llme->lle). -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/30489 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I588eb576b2703262f4ab9566ec362920d8390cfd Gerrit-Change-Number: 30489 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 20 Dec 2022 22:18:18 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmo-gprs[master]: llc: fix typo: OSMO_GPRS_LLC_SAPI_SNDCP{12->11}
by fixeria 20 Dec '22

20 Dec '22
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/30731 ) Change subject: llc: fix typo: OSMO_GPRS_LLC_SAPI_SNDCP{12->11} ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/30731 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Icee190d0e20044d3808a8b1beb237a987a795d8e Gerrit-Change-Number: 30731 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 20 Dec 2022 21:57:30 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmo-gprs[master]: llc: libosmo-gprs-llc.pc.in: add 'Requires.private: talloc'
by fixeria 20 Dec '22

20 Dec '22
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/30732 ) Change subject: llc: libosmo-gprs-llc.pc.in: add 'Requires.private: talloc' ...................................................................... Patch Set 1: (1 comment) Commit Message: https://gerrit.osmocom.org/c/libosmo-gprs/+/30732/comment/374d957b_591d7f24 PS1, Line 9: This is needed BTW, why is this needed? Other osmo-projects don't seem to have it. -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/30732 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ie8ba61b124585e55accdaf2713b72e3ace78772f Gerrit-Change-Number: 30732 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 20 Dec 2022 21:57:26 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in libosmo-gprs[master]: llc: add enum osmo_gprs_llc_{location,prim_sap}
by fixeria 20 Dec '22

20 Dec '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/30734 ) Change subject: llc: add enum osmo_gprs_llc_{location,prim_sap} ...................................................................... llc: add enum osmo_gprs_llc_{location,prim_sap} Change-Id: I5606c0b41196f25adbc00cfdce9927daaed9a901 Related: OS#5502 --- M include/osmocom/gprs/llc/llc.h M include/osmocom/gprs/llc/llc_prim.h M src/llc/Makefile.am A src/llc/llc_prim.c 4 files changed, 56 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/34/30734/1 diff --git a/include/osmocom/gprs/llc/llc.h b/include/osmocom/gprs/llc/llc.h index ff12884..0f0ab83 100644 --- a/include/osmocom/gprs/llc/llc.h +++ b/include/osmocom/gprs/llc/llc.h @@ -7,6 +7,13 @@ #include <osmocom/core/msgb.h> +/* Section 7.1.2 LLC layer service primitives */ +enum osmo_gprs_llc_location { + OSMO_GPRS_LLC_LOCATION_UNSET, + OSMO_GPRS_LLC_LOCATION_MS, + OSMO_GPRS_LLC_LOCATION_SGSN, +}; + /* Section 6.2.3 Service Access Point Identifier (SAPI) */ enum osmo_gprs_llc_sapi { OSMO_GPRS_LLC_SAPI_GMM = 1, diff --git a/include/osmocom/gprs/llc/llc_prim.h b/include/osmocom/gprs/llc/llc_prim.h index f58c5fa..dc5f097 100644 --- a/include/osmocom/gprs/llc/llc_prim.h +++ b/include/osmocom/gprs/llc/llc_prim.h @@ -6,6 +6,21 @@ #include <stddef.h> #include <osmocom/core/prim.h> +#include <osmocom/core/utils.h> + +/* Section 7.1.0 */ +enum osmo_gprs_llc_prim_sap { + OSMO_GPRS_LLC_SAP_LLGM, + OSMO_GPRS_LLC_SAP_LL, + OSMO_GPRS_LLC_SAP_GRR, + OSMO_GPRS_LLC_SAP_BSSGP, +}; + +extern const struct value_string osmo_gprs_llc_prim_sap_names[]; +static inline const char *osmo_gprs_llc_prim_sap_name(enum osmo_gprs_llc_prim_sap val) +{ + return get_value_string(osmo_gprs_llc_prim_sap_names, val); +} /* TS 04.64 Section 7.1.2 Table 7: LLC layer primitives (GMM/SNDCP/SMS/TOM) */ /* TS 04.65 Section 5.1.2 Table 2: Service primitives used by SNDCP */ diff --git a/src/llc/Makefile.am b/src/llc/Makefile.am index c25841e..317b855 100644 --- a/src/llc/Makefile.am +++ b/src/llc/Makefile.am @@ -26,6 +26,7 @@ libosmo_gprs_llc_la_SOURCES = \ crc24.c \ llc_pdu.c \ + llc_prim.c \ llc_xid.c \ misc.c \ $(NULL) diff --git a/src/llc/llc_prim.c b/src/llc/llc_prim.c new file mode 100644 index 0000000..030494a --- /dev/null +++ b/src/llc/llc_prim.c @@ -0,0 +1,33 @@ +/* GPRS LLC protocol primitive implementation as per 3GPP TS 44.064 */ +/* + * (C) 2022 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> + * + * 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 Affero 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 <http://www.gnu.org/licenses/>. + * + */ + +#include <osmocom/core/utils.h> + +#include <osmocom/gprs/llc/llc.h> +#include <osmocom/gprs/llc/llc_prim.h> + +const struct value_string osmo_gprs_llc_prim_sap_names[] = { + { OSMO_GPRS_LLC_SAP_LLGM, "LLGM" }, + { OSMO_GPRS_LLC_SAP_LL, "LL" }, + { OSMO_GPRS_LLC_SAP_GRR, "GRR" }, + { OSMO_GPRS_LLC_SAP_BSSGP, "BSSGP" }, + { 0, NULL } +}; -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/30734 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I5606c0b41196f25adbc00cfdce9927daaed9a901 Gerrit-Change-Number: 30734 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in libosmo-gprs[master]: llc: split up enum osmo_gprs_llc_prim_type
by fixeria 20 Dec '22

20 Dec '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/30735 ) Change subject: llc: split up enum osmo_gprs_llc_prim_type ...................................................................... llc: split up enum osmo_gprs_llc_prim_type Change-Id: Ic5b7a2fb8d028a6e2031fb805189be4e92d80b9f Related: OS#5502 --- M include/osmocom/gprs/llc/llc_prim.h 1 file changed, 36 insertions(+), 25 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/35/30735/1 diff --git a/include/osmocom/gprs/llc/llc_prim.h b/include/osmocom/gprs/llc/llc_prim.h index dc5f097..a26c1c5 100644 --- a/include/osmocom/gprs/llc/llc_prim.h +++ b/include/osmocom/gprs/llc/llc_prim.h @@ -24,31 +24,42 @@ /* TS 04.64 Section 7.1.2 Table 7: LLC layer primitives (GMM/SNDCP/SMS/TOM) */ /* TS 04.65 Section 5.1.2 Table 2: Service primitives used by SNDCP */ -enum osmo_gprs_llc_prim_type { - /* GMM <-> LLME */ - OSMO_GPRS_LLC_LLGMM_ASSIGN, /* Req: TLLI old, TLLI new, Kc, CiphAlg */ - OSMO_GPRS_LLC_LLGMM_RESET, /* Req/Cnf: TLLI */ - OSMO_GPRS_LLC_LLGMM_TRIGGER, /* Req: TLLI, Cause */ - OSMO_GPRS_LLC_LLGMM_SUSPEND, /* Req: TLLI, Page */ - OSMO_GPRS_LLC_LLGMM_RESUME, /* Req: TLLI */ - OSMO_GPRS_LLC_LLGMM_PAGE, /* Ind: TLLI */ - OSMO_GPRS_LLC_LLGMM_IOV, /* Req: TLLI */ - OSMO_GPRS_LLC_LLGMM_STATUS, /* Ind: TLLI, Cause */ - OSMO_GPRS_LLC_LLGMM_PSHO, /* Req/Ind/Cnf: TLLI, Ciph, IOV-UI, Old XID */ - OSMO_GPRS_LLC_LLGMM_ASSIGN_UP, /* Req: TLLI */ - /* LLE <-> (GMM/SNDCP/SMS/TOM) */ - OSMO_GPRS_LLC_LL_RESET, /* Ind: TLLI */ - OSMO_GPRS_LLC_LL_ESTABLISH, /* Req/Ind/Rsp/Cnf: TLLI, XID Req/Neg, N201-I, N201-U */ - OSMO_GPRS_LLC_LL_RELEASE, /* Req/Ind/Cnf: TLLI, Local, Cause */ - OSMO_GPRS_LLC_LL_XID, /* Req/Ind/Rsp/Cnf: TLLI, XID Req/Neg, N201-I, N201-U */ - OSMO_GPRS_LLC_LL_DATA, /* Req/Ind/Cnf: TLLI, L3-PDU, Ref, QoS, Radio Prio */ - OSMO_GPRS_LLC_LL_UNITDATA, /* Req/Ind: TLLI, L3-PDU, QoS, Radio Prio, Ciph, ... */ - OSMO_GPRS_LLC_LL_STATUS, /* Ind: TLLI, Cause */ - /* LLE <-> RLC/MAC (MS side) */ - OSMO_GPRS_LLC_GRR_DATA, /* Req/Ind: TLLI, LL-PDU, SAPI, Cause, QoS, Radio Prio */ - OSMO_GPRS_LLC_GRR_UNITDATA, /* Req/Ind: TLLI, LL-PDU, SAPI, QoS, Radio Prio */ - /* LLE <-> BSSGP (SGSN side) */ - OSMO_GPRS_LLC_BSSGP_UNITDATA, /* Req/Ind: TLLI, LL-PDU, Cell Id, QoS, RLC Confirm, SAPI, ... */ + +/* TS 04.65 Section 7.2.1 GMM - LLME primitives */ +enum osmo_gprs_llc_llgmm_prim_type { + OSMO_GPRS_LLC_LLGMM_ASSIGN, /* Req: TLLI old, TLLI new, Kc, CiphAlg */ + OSMO_GPRS_LLC_LLGMM_RESET, /* Req/Cnf: TLLI */ + OSMO_GPRS_LLC_LLGMM_TRIGGER, /* Req: TLLI, Cause */ + OSMO_GPRS_LLC_LLGMM_SUSPEND, /* Req: TLLI, Page */ + OSMO_GPRS_LLC_LLGMM_RESUME, /* Req: TLLI */ + OSMO_GPRS_LLC_LLGMM_PAGE, /* Ind: TLLI */ + OSMO_GPRS_LLC_LLGMM_IOV, /* Req: TLLI */ + OSMO_GPRS_LLC_LLGMM_STATUS, /* Ind: TLLI, Cause */ + OSMO_GPRS_LLC_LLGMM_PSHO, /* Req/Ind/Cnf: TLLI, Ciph, IOV-UI, Old XID */ + OSMO_GPRS_LLC_LLGMM_ASSIGN_UP, /* Req: TLLI */ +}; + +/* TS 04.65 Section 7.2.2 "Layer 3 - LLE primitives" */ +enum osmo_gprs_llc_ll_prim_type { + OSMO_GPRS_LLC_LL_RESET, /* Ind: TLLI */ + OSMO_GPRS_LLC_LL_ESTABLISH, /* Req/Ind/Rsp/Cnf: TLLI, XID Req/Neg, N201-I, N201-U */ + OSMO_GPRS_LLC_LL_RELEASE, /* Req/Ind/Cnf: TLLI, Local, Cause */ + OSMO_GPRS_LLC_LL_XID, /* Req/Ind/Rsp/Cnf: TLLI, XID Req/Neg, N201-I, N201-U */ + OSMO_GPRS_LLC_LL_DATA, /* Req/Ind/Cnf: TLLI, L3-PDU, Ref, QoS, Radio Prio */ + OSMO_GPRS_LLC_LL_UNITDATA, /* Req/Ind: TLLI, L3-PDU, QoS, Radio Prio, Ciph, ... */ + OSMO_GPRS_LLC_LL_STATUS, /* Ind: TLLI, Cause */ +}; + +/* TS 04.65 Section 7.2.3 "LLE - RLC/MAC primitives" (MS side) */ +enum osmo_gprs_llc_grr_prim_type { + OSMO_GPRS_LLC_GRR_DATA, /* Req/Ind: TLLI, LL-PDU, SAPI, Cause, QoS, Radio Prio */ + OSMO_GPRS_LLC_GRR_UNITDATA, /* Req/Ind: TLLI, LL-PDU, SAPI, QoS, Radio Prio */ +}; + +/* TS 04.65 Section 7.2.4 "LLE - BSSGP primitives" (SGSN side) */ +enum osmo_gprs_llc_bssgp_prim_type { + OSMO_GPRS_LLC_BSSGP_DL_UNITDATA, /* Req: TLLI, LL-PDU, Cell Id, QoS, RLC Confirm, SAPI, ... */ + OSMO_GPRS_LLC_BSSGP_UL_UNITDATA, /* Ind: TLLI, LL-PDU, Cell Id, edirect attempt, IMSI, V(U) for redirect, ... */ }; /* Parameters for OSMO_GPRS_LLC_LLGMM_* prims */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/30735 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ic5b7a2fb8d028a6e2031fb805189be4e92d80b9f Gerrit-Change-Number: 30735 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in libosmo-gprs[master]: llc: rework logging, add LOGLLC macro
by fixeria 20 Dec '22

20 Dec '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/30736 ) Change subject: llc: rework logging, add LOGLLC macro ...................................................................... llc: rework logging, add LOGLLC macro Change-Id: I8ad3267f890a21b6c935b36b256b00bd0a4da8d6 Related: OS#5502 --- M include/osmocom/gprs/llc/llc.h M src/llc/llc_pdu.c M src/llc/llc_xid.c M src/llc/misc.c 4 files changed, 46 insertions(+), 36 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/36/30736/1 diff --git a/include/osmocom/gprs/llc/llc.h b/include/osmocom/gprs/llc/llc.h index 0f0ab83..8ae403a 100644 --- a/include/osmocom/gprs/llc/llc.h +++ b/include/osmocom/gprs/llc/llc.h @@ -184,4 +184,14 @@ const struct osmo_gprs_llc_xid_field *fields, unsigned int num_fields); -void osmo_gprs_llc_set_log_cat(int cat); +enum osmo_gprs_llc_log_cat { + OSMO_GPRS_LLC_LOGC_LLC, + _OSMO_GPRS_LLC_LOGC_MAX, +}; + +void osmo_gprs_llc_set_log_cat(enum osmo_gprs_llc_log_cat logc, int logc_num); + +/* TODO: move to llc_private.h */ +extern int g_llc_log_cat[_OSMO_GPRS_LLC_LOGC_MAX]; + +#define LOGLLC(lvl, fmt, args...) LOGP(g_llc_log_cat[OSMO_GPRS_LLC_LOGC_LLC], lvl, fmt, ## args) diff --git a/src/llc/llc_pdu.c b/src/llc/llc_pdu.c index 6f0a17f..c031098 100644 --- a/src/llc/llc_pdu.c +++ b/src/llc/llc_pdu.c @@ -253,8 +253,7 @@ ctrl[0] |= GPRS_LLC_U_XID; break; default: - LOGP(g_log_cat, LOGL_ERROR, - "Unknown UI func=0x%02x\n", pdu->func); + LOGLLC(LOGL_ERROR, "Unknown UI func=0x%02x\n", pdu->func); return -EINVAL; } break; @@ -268,8 +267,7 @@ /* 5.5a Message Authentication Code (MAC) field */ if (pdu->flags & OSMO_GPRS_LLC_PDU_F_MAC_PRES) { /* TODO: calculate MAC (see 3GPP TS 43.020) */ - LOGP(g_log_cat, LOGL_ERROR, - "Message Authentication Code (MAC) is not implemented\n"); + LOGLLC(LOGL_ERROR, "Message Authentication Code (MAC) is not implemented\n"); return -ENOTSUP; } @@ -295,7 +293,7 @@ #define check_len(len, text) \ do { \ if (data_len < (len)) { \ - LOGP(g_log_cat, LOGL_ERROR, "Failed to parse LLC PDU: %s\n", text); \ + LOGLLC(LOGL_ERROR, "Failed to parse LLC PDU: %s\n", text); \ return -EINVAL; \ } \ } while (0) @@ -316,7 +314,7 @@ /* 6.2.1 Protocol Discriminator bit (PD): shall be 0 */ if (*addr & 0x80) { - LOGP(g_log_cat, LOGL_ERROR, "Protocol Discriminator shall be 0\n"); + LOGLLC(LOGL_ERROR, "Protocol Discriminator shall be 0\n"); return -EINVAL; } @@ -336,7 +334,7 @@ case 0x0c: case 0x0d: case 0x0f: - LOGP(g_log_cat, LOGL_ERROR, "Unknown SAPI=%u\n", pdu->sapi); + LOGLLC(LOGL_ERROR, "Unknown SAPI=%u\n", pdu->sapi); return -EINVAL; } @@ -485,7 +483,7 @@ pdu->data_len = data_len; break; default: - LOGP(g_log_cat, LOGL_ERROR, "Unknown U func=0x%02x\n", ctrl[0] & 0x0f); + LOGLLC(LOGL_ERROR, "Unknown U func=0x%02x\n", ctrl[0] & 0x0f); return -ENOTSUP; } } diff --git a/src/llc/llc_xid.c b/src/llc/llc_xid.c index a787e1a..1aab3a5 100644 --- a/src/llc/llc_xid.c +++ b/src/llc/llc_xid.c @@ -29,8 +29,6 @@ #include <osmocom/gprs/llc/llc.h> -extern int g_log_cat; - const struct value_string osmo_gprs_llc_xid_type_names[] = { { OSMO_GPRS_LLC_XID_T_VERSION, "LLC-Version" }, { OSMO_GPRS_LLC_XID_T_IOV_UI, "IOV-UI" }, @@ -80,8 +78,8 @@ bool osmo_gprs_llc_xid_field_is_valid(const struct osmo_gprs_llc_xid_field *field) { if (field->type >= ARRAY_SIZE(gprs_llc_xid_desc)) { - LOGP(g_log_cat, LOGL_ERROR, - "Unknown XID field type 0x%02x\n", field->type); + LOGLLC(LOGL_ERROR, + "Unknown XID field type 0x%02x\n", field->type); return false; } @@ -93,18 +91,18 @@ return true; if (field->val < gprs_llc_xid_desc[field->type].min) { - LOGP(g_log_cat, LOGL_ERROR, - "XID field %s value=%u < min=%u\n", - osmo_gprs_llc_xid_type_name(field->type), - field->val, gprs_llc_xid_desc[field->type].min); + LOGLLC(LOGL_ERROR, + "XID field %s value=%u < min=%u\n", + osmo_gprs_llc_xid_type_name(field->type), + field->val, gprs_llc_xid_desc[field->type].min); return false; } if (field->val > gprs_llc_xid_desc[field->type].max) { - LOGP(g_log_cat, LOGL_ERROR, - "XID field %s value=%u > max=%u\n", - osmo_gprs_llc_xid_type_name(field->type), - field->val, gprs_llc_xid_desc[field->type].max); + LOGLLC(LOGL_ERROR, + "XID field %s value=%u > max=%u\n", + osmo_gprs_llc_xid_type_name(field->type), + field->val, gprs_llc_xid_desc[field->type].max); return false; } @@ -177,7 +175,7 @@ #define check_len(len, text) \ do { \ if (data_len < (len)) { \ - LOGP(g_log_cat, LOGL_ERROR, "Failed to parse XID: %s\n", text); \ + LOGLLC(LOGL_ERROR, "Failed to parse XID: %s\n", text); \ return -EINVAL; \ } \ } while (0) @@ -187,8 +185,8 @@ uint8_t len; if (num_fields > max_fields) { - LOGP(g_log_cat, LOGL_ERROR, - "Failed to parse XID: too many fields\n"); + LOGLLC(LOGL_ERROR, + "Failed to parse XID: too many fields\n"); return -ENOMEM; } @@ -198,8 +196,8 @@ /* XID field type */ field->type = (*ptr >> 2) & 0x1f; if (field->type >= ARRAY_SIZE(gprs_llc_xid_desc)) { - LOGP(g_log_cat, LOGL_ERROR, - "Failed to parse XID: unknown field type 0x%02x\n", field->type); + LOGLLC(LOGL_ERROR, + "Failed to parse XID: unknown field type 0x%02x\n", field->type); return -EINVAL; } @@ -222,10 +220,10 @@ field->var.val_len = len; } else { if (len != gprs_llc_xid_desc[field->type].len) { - LOGP(g_log_cat, LOGL_NOTICE, - "XID field %s has unusual length=%u (expected %u)\n", - osmo_gprs_llc_xid_type_name(field->type), - len, gprs_llc_xid_desc[field->type].len); + LOGLLC(LOGL_NOTICE, + "XID field %s has unusual length=%u (expected %u)\n", + osmo_gprs_llc_xid_type_name(field->type), + len, gprs_llc_xid_desc[field->type].len); } switch (len) { @@ -242,9 +240,9 @@ field->val = osmo_load32be(ptr); break; default: - LOGP(g_log_cat, LOGL_ERROR, - "Failed to parse XID: unsupported field (%s) length=%u\n", - osmo_gprs_llc_xid_type_name(field->type), len); + LOGLLC(LOGL_ERROR, + "Failed to parse XID: unsupported field (%s) length=%u\n", + osmo_gprs_llc_xid_type_name(field->type), len); return -EINVAL; } diff --git a/src/llc/misc.c b/src/llc/misc.c index 06e2a6c..defe13d 100644 --- a/src/llc/misc.c +++ b/src/llc/misc.c @@ -16,10 +16,14 @@ */ #include <osmocom/core/logging.h> +#include <osmocom/gprs/llc/llc.h> -int g_log_cat = DLGLOBAL; +int g_llc_log_cat[_OSMO_GPRS_LLC_LOGC_MAX] = { + [0 ... _OSMO_GPRS_LLC_LOGC_MAX - 1] = DLGLOBAL +}; -void osmo_gprs_llc_set_log_cat(int cat) +void osmo_gprs_llc_set_log_cat(enum osmo_gprs_llc_log_cat logc, int logc_num) { - g_log_cat = cat; + OSMO_ASSERT(logc < _OSMO_GPRS_LLC_LOGC_MAX); + g_llc_log_cat[logc] = logc_num; } -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/30736 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I8ad3267f890a21b6c935b36b256b00bd0a4da8d6 Gerrit-Change-Number: 30736 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • ...
  • 198
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.