@@ -28,6 +28,15 @@
#include <osmocom/vty/vty.h>
#include <osmocom/vty/buffer.h>
#include <osmocom/vty/command.h>
+#include <osmocom/vty/ports.h>
+
+/* support old versions of libosmocore */
+#ifndef OSMO_VTY_PORT_PCAP_CLIENT
+#define OSMO_VTY_PORT_PCAP_CLIENT 4237
+#endif
+#ifndef OSMO_VTY_PORT_PCAP_SERVER
+#define OSMO_VTY_PORT_PCAP_SERVER 4238
+#endif
enum {
DPCAP,
@@ -20,8 +20,8 @@
}
apps = [
- (4241, "src/osmo_pcap_server", "OsmoPCAPServer", "osmo-pcap-server"),
- (4240, "src/osmo_pcap_client", "OsmoPCAPClient", "osmo-pcap-client"),
+ (4238, "src/osmo_pcap_server", "OsmoPCAPServer", "osmo-pcap-server"),
+ (4237, "src/osmo_pcap_client", "OsmoPCAPClient", "osmo-pcap-client"),
]
vty_command = ["src/osmo_pcap_server", "-c", "contrib/osmo-pcap-server.cfg"]
@@ -206,7 +206,7 @@
osmo_tls_init();
- rc = telnet_init(tall_bsc_ctx, NULL, 4240);
+ rc = telnet_init(tall_bsc_ctx, NULL, OSMO_VTY_PORT_PCAP_CLIENT);
if (rc < 0) {
LOGP(DCLIENT, LOGL_ERROR, "Failed to bind telnet interface\n");
exit(1);
@@ -219,7 +219,7 @@
osmo_tls_init();
- rc = telnet_init(tall_bsc_ctx, NULL, 4241);
+ rc = telnet_init(tall_bsc_ctx, NULL, OSMO_VTY_PORT_PCAP_SERVER);
if (rc < 0) {
LOGP(DCLIENT, LOGL_ERROR, "Failed to bind telnet interface\n");
exit(1);