<p style="white-space: pre-wrap; word-wrap: break-word;">The more "canonical" way for the port numbers part is of course to add them to /etc/services so that you can do something like "telnet localhost osmo-msc".  I used to do that.  However,adding records to that file during package installation isn't very elegant, and there is no /etc/services.d or something along those lines.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Another approach would be to write a NSS module (see http://www.gnu.org/software/libc/manual/html_node/Name-Service-Switch.html#Name-Service-Switch) which would either have a compiled-in list of service name/port mappings, or (even better) parse the /etc/osmocom/osmo*.cfg files to create those mappings from the config files. In that case you would automatically get aliases for the port numbers that you configured.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Yet another approach is to use http://git.osmocom.org/libtelnet/ to create an osmocom-extended telnet client program which would have capabilities specific to the osmcoom vty, including finding the port numbers from the config files (or compiled-in defaults) and issue the VTY commands for logging, etc. using some local commands, maybe prefixed by @.</p><p><a href="https://gerrit.osmocom.org/13756">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/13756">change 13756</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/13756"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: Ice4532be7cb3139da29cb9d84dd4769e8d826dfa </div>
<div style="display:none"> Gerrit-Change-Number: 13756 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Keith Whyte <keith@rhizomatica.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-CC: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 24 Apr 2019 08:42:25 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-HasLabels: No </div>