Attention is currently required from: dexter, keith, osmith, pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/34150?usp=email )
Change subject: vty and log: also show local port for RTP conns
......................................................................
Patch Set 3:
(2 comments)
Patchset:
PS3:
This is a good patch of yours. I can imagine the annoyance of not seeing the useful information!
I fancied trying around a bit and ended up with this ready new patch set as a suggestion, feel free to discard / push over it if it's not to your liking.
File src/libosmo-mgcp/mgcp_conn.c:
https://gerrit.osmocom.org/c/osmo-mgw/+/34150/comment/671355d6_f4628bf2
PS1, Line 373: "rtp:%u<->%u rtcp:%u)",
> I'm totally fine with dropping the rtcp part. […]
Done
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34150?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ib89a6779e1d68c6600f00699d4303f6c0ee07132
Gerrit-Change-Number: 34150
Gerrit-PatchSet: 3
Gerrit-Owner: keith <keith(a)rhizomatica.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: keith <keith(a)rhizomatica.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 01 Nov 2023 20:49:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: keith <keith(a)rhizomatica.org>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: dexter, keith, osmith.
neels has uploaded a new patch set (#3) to the change originally created by keith. ( https://gerrit.osmocom.org/c/osmo-mgw/+/34150?usp=email )
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: vty and log: also show local port for RTP conns
......................................................................
vty and log: also show local port for RTP conns
Before:
CONN: (1226/rtp, id:0xD94316AD, ip:127.0.0.2, rtp:2344 rtcp:2345)
After:
CONN: (1226/rtp C:D94316AD r=127.0.0.2:2344<->l=127.0.0.1:4002)
While changing that string, also include these changes for consistency
and readability:
- use the same r:...<->l:... format as osmo_sock_get_name().
- Instead of 'id:0x' use the actual MGCP format 'C: 9B686BE3'.
- drop the commas
- drop RTCP port: it is always RTP+1 and always an odd number.
Rationale:
The CONN pairs associated with each endpoint show remote RTP
ports. When osmo-mgw is being used by both BSC and MSC, one
side of the pair is showing the internal loop connection inside
osmo-mgw, while my intuition suggested this connection pair
is showing me the RTP port tuple of a single RTP stream. Adding
the local port to the display makes it more clear, IMHO.
Seeing the local port can also help to correlate the MGW vty
dump with a capture of RTP.
Implementation:
I first tried directly using osmo_sock_get_name_buf() on
conn->u.rtp.end.rtp.fd, but that might hide already known information
when the fd is not actively used yet (before SDP): the local address and
port would then be shown from the fd, not from
conn->u.rtp.end.local_addr/_port == hidden before the fd is set up.
Patch-By: whytek, nhofmeyr
Change-Id: Ib89a6779e1d68c6600f00699d4303f6c0ee07132
---
M src/libosmo-mgcp/mgcp_conn.c
1 file changed, 58 insertions(+), 30 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/50/34150/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/34150?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ib89a6779e1d68c6600f00699d4303f6c0ee07132
Gerrit-Change-Number: 34150
Gerrit-PatchSet: 3
Gerrit-Owner: keith <keith(a)rhizomatica.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: keith <keith(a)rhizomatica.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newpatchset
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/34939?usp=email )
Change subject: docs: Fix docstring syntax to avoid warnings
......................................................................
docs: Fix docstring syntax to avoid warnings
pySim/tlv.py:docstring of pySim.tlv.IE.from_bytes:1: ERROR: Unknown target name: "part".
pySim/tlv.py:docstring of pySim.tlv.IE.to_bytes:1: ERROR: Unknown target name: "part".
Change-Id: I170176910c4519005b9276dbe5854aaaecb58efb
---
M pySim/tlv.py
1 file changed, 14 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/39/34939/1
diff --git a/pySim/tlv.py b/pySim/tlv.py
index 827972f..7f20559 100644
--- a/pySim/tlv.py
+++ b/pySim/tlv.py
@@ -178,7 +178,7 @@
"""Convert the internal representation to entire IE including IE header."""
def to_bytes(self) -> bytes:
- """Convert the internal representation _of the value part_ to binary bytes."""
+ """Convert the internal representation *of the value part* to binary bytes."""
if self.is_constructed():
# concatenate the encoded IE of all children to form the value part
out = b''
@@ -189,7 +189,7 @@
return super().to_bytes()
def from_bytes(self, do: bytes):
- """Parse _the value part_ from binary bytes to internal representation."""
+ """Parse *the value part* from binary bytes to internal representation."""
if self.nested_collection:
self.children = self.nested_collection.from_bytes(do)
else:
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34939?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I170176910c4519005b9276dbe5854aaaecb58efb
Gerrit-Change-Number: 34939
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/34938?usp=email )
Change subject: docs: shell: Re-order the command sections/classes
......................................................................
docs: shell: Re-order the command sections/classes
the generic pysim command should precede those from specs like ISO7816
Change-Id: I11e66757f10cc28fda547244ae09d51dacd70824
---
M docs/shell.rst
1 file changed, 122 insertions(+), 110 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/38/34938/1
diff --git a/docs/shell.rst b/docs/shell.rst
index ce66dfa..1b27edc 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -55,6 +55,117 @@
to learn about those.
+pySim commands
+--------------
+
+Commands in this category are pySim specific; they do not have a 1:1 correspondence to ISO 7816
+or 3GPP commands. Mostly they will operate either only on local (in-memory) state, or execute
+a complex sequence of card-commands.
+
+desc
+~~~~
+Display human readable file description for the currently selected file.
+
+
+dir
+~~~
+.. argparse::
+ :module: pySim-shell
+ :func: PySimCommands.dir_parser
+
+Example:
+::
+
+ pySIM-shell (00:MF)> dir
+ MF
+ 3f00
+ .. ADF.USIM DF.SYSTEM EF.DIR EF.UMPC
+ ADF.ARA-M DF.EIRENE DF.TELECOM EF.ICCID MF
+ ADF.ISIM DF.GSM EF.ARR EF.PL
+ 14 files
+
+
+export
+~~~~~~
+.. argparse::
+ :module: pySim-shell
+ :func: PySimCommands.export_parser
+
+Please note that `export` works relative to the current working
+directory, so if you are in `MF`, then the export will contain all known
+files on the card. However, if you are in `ADF.ISIM`, only files below
+that ADF will be part of the export.
+
+Furthermore, it is strongly advised to first enter the ADM1 pin
+(`verify_adm`) to maximize the chance of having permission to read
+all/most files.
+
+
+tree
+~~~~
+Display a tree of the card filesystem. It is important to note that this displays a tree
+of files that might potentially exist (based on the card profile). In order to determine if
+a given file really exists on a given card, you have to try to select that file.
+
+Example:
+::
+
+ pySIM-shell (00:MF)> tree --help
+ EF.DIR 2f00 Application Directory
+ EF.ICCID 2fe2 ICC Identification
+ EF.PL 2f05 Preferred Languages
+ EF.ARR 2f06 Access Rule Reference
+ EF.UMPC 2f08 UICC Maximum Power Consumption
+ DF.TELECOM 7f10 None
+ EF.ADN 6f3a Abbreviated Dialing Numbers
+ ...
+
+
+
+verify_adm
+~~~~~~~~~~
+Verify the ADM (Administrator) PIN specified as argument. This is typically needed in order
+to get write/update permissions to most of the files on SIM cards.
+
+Currently only ADM1 is supported.
+
+
+reset
+~~~~~
+Perform card reset and display the card ATR.
+
+intro
+~~~~~
+[Re-]Display the introductory banner
+
+
+equip
+~~~~~
+Equip pySim-shell with a card; particularly useful if the program was
+started before a card was present, or after a card has been replaced by
+the user while pySim-shell was kept running.
+
+bulk_script
+~~~~~~~~~~~
+.. argparse::
+ :module: pySim-shell
+ :func: PysimApp.bulk_script_parser
+
+
+echo
+~~~~
+.. argparse::
+ :module: pySim-shell
+ :func: PysimApp.echo_parser
+
+
+apdu
+~~~~
+.. argparse::
+ :module: pySim-shell
+ :func: PysimApp.apdu_cmd_parser
+
+
ISO7816 commands
----------------
@@ -243,116 +354,6 @@
:func: CardProfileUICC.AddlShellCommands.resume_uicc_parser
-pySim commands
---------------
-
-Commands in this category are pySim specific; they do not have a 1:1 correspondence to ISO 7816
-or 3GPP commands. Mostly they will operate either only on local (in-memory) state, or execute
-a complex sequence of card-commands.
-
-desc
-~~~~
-Display human readable file description for the currently selected file.
-
-
-dir
-~~~
-.. argparse::
- :module: pySim-shell
- :func: PySimCommands.dir_parser
-
-Example:
-::
-
- pySIM-shell (00:MF)> dir
- MF
- 3f00
- .. ADF.USIM DF.SYSTEM EF.DIR EF.UMPC
- ADF.ARA-M DF.EIRENE DF.TELECOM EF.ICCID MF
- ADF.ISIM DF.GSM EF.ARR EF.PL
- 14 files
-
-
-export
-~~~~~~
-.. argparse::
- :module: pySim-shell
- :func: PySimCommands.export_parser
-
-Please note that `export` works relative to the current working
-directory, so if you are in `MF`, then the export will contain all known
-files on the card. However, if you are in `ADF.ISIM`, only files below
-that ADF will be part of the export.
-
-Furthermore, it is strongly advised to first enter the ADM1 pin
-(`verify_adm`) to maximize the chance of having permission to read
-all/most files.
-
-
-tree
-~~~~
-Display a tree of the card filesystem. It is important to note that this displays a tree
-of files that might potentially exist (based on the card profile). In order to determine if
-a given file really exists on a given card, you have to try to select that file.
-
-Example:
-::
-
- pySIM-shell (00:MF)> tree --help
- EF.DIR 2f00 Application Directory
- EF.ICCID 2fe2 ICC Identification
- EF.PL 2f05 Preferred Languages
- EF.ARR 2f06 Access Rule Reference
- EF.UMPC 2f08 UICC Maximum Power Consumption
- DF.TELECOM 7f10 None
- EF.ADN 6f3a Abbreviated Dialing Numbers
- ...
-
-
-
-verify_adm
-~~~~~~~~~~
-Verify the ADM (Administrator) PIN specified as argument. This is typically needed in order
-to get write/update permissions to most of the files on SIM cards.
-
-Currently only ADM1 is supported.
-
-
-reset
-~~~~~
-Perform card reset and display the card ATR.
-
-intro
-~~~~~
-[Re-]Display the introductory banner
-
-
-equip
-~~~~~
-Equip pySim-shell with a card; particularly useful if the program was
-started before a card was present, or after a card has been replaced by
-the user while pySim-shell was kept running.
-
-bulk_script
-~~~~~~~~~~~
-.. argparse::
- :module: pySim-shell
- :func: PysimApp.bulk_script_parser
-
-
-echo
-~~~~
-.. argparse::
- :module: pySim-shell
- :func: PysimApp.echo_parser
-
-
-apdu
-~~~~
-.. argparse::
- :module: pySim-shell
- :func: PysimApp.apdu_cmd_parser
-
Linear Fixed EF commands
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34938?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I11e66757f10cc28fda547244ae09d51dacd70824
Gerrit-Change-Number: 34938
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/34937?usp=email )
Change subject: docs: shell: link to cmd2 documentation
......................................................................
docs: shell: link to cmd2 documentation
Change-Id: I532cb33781f95fe847db7fae7a5264b5d9c416de
---
M docs/shell.rst
1 file changed, 12 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/37/34937/1
diff --git a/docs/shell.rst b/docs/shell.rst
index 2a16965..ce66dfa 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -50,7 +50,9 @@
cmd2 basics
-----------
-FIXME
+As pySim-shell is built upon ``cmd``, some generic cmd2 commands/features are available. You may
+want to check out the `cmd2 Builtin commands <https://cmd2.readthedocs.io/en/stable/features/builtin_commands.html>`_
+to learn about those.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34937?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I532cb33781f95fe847db7fae7a5264b5d9c416de
Gerrit-Change-Number: 34937
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/34935?usp=email )
Change subject: docs: shell: Clarify various different card support
......................................................................
docs: shell: Clarify various different card support
Change-Id: Ibf8e3538aa3c954df72c11ec0a2f885031b54b0e
---
M docs/shell.rst
1 file changed, 11 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/35/34935/1
diff --git a/docs/shell.rst b/docs/shell.rst
index de30ae7..c7e788a 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -1,7 +1,8 @@
pySim-shell
===========
-pySim-shell is an interactive command line shell for all kind of interactions with SIM cards.
+pySim-shell is an interactive command line shell for all kind of interactions with SIM cards,
+including classic GSM SIM, GSM-R SIM, UICC, USIM, ISIM, HPSIM and recently even eUICC.
The interactive shell provides command for
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34935?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ibf8e3538aa3c954df72c11ec0a2f885031b54b0e
Gerrit-Change-Number: 34935
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/34936?usp=email )
Change subject: docs: shell: By now we have encoders/decoders for most files
......................................................................
docs: shell: By now we have encoders/decoders for most files
Change-Id: Ia771f9969ae7eb0094d1768af3f7f54cc9d0d581
---
M docs/shell.rst
1 file changed, 11 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/36/34936/1
diff --git a/docs/shell.rst b/docs/shell.rst
index c7e788a..2a16965 100644
--- a/docs/shell.rst
+++ b/docs/shell.rst
@@ -11,9 +11,9 @@
* CHV/PIN management (VERIFY, ENABLE, DISABLE, UNBLOCK)
* decoding of SELECT response (file control parameters)
* reading and writing of files and records in raw, hex-encoded binary format
-* for some files where related support has been developed:
+* for most files (where related file-specific encoder/decoder classes have been developed):
- * decoded reading (display file data in JSON format)
+ * decoded reading (display file data represented in human and machine readable JSON format)
* decoded writing (encode from JSON to binary format, then write)
By means of using the python ``cmd2`` module, various useful features improve usability:
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/34936?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ia771f9969ae7eb0094d1768af3f7f54cc9d0d581
Gerrit-Change-Number: 34936
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange