Commit Graph

16 Commits

Author SHA1 Message Date
Pau Espin a55253f438 client: Add 'wqueue max-length <0-4294967295>' VTY command
This allows setting a suitable write-queue max length per client. The
desired value can be different based on a lot of variables, like memory
availabilty, network and CPU load, input/output link state, etc.

Related: SYS#5921
Change-Id: I4e9d5d836ddda215f9e7a075aa8e10d2d3854dd2
2022-04-14 18:32:23 +02:00
Vadim Yanitskiy ff3f4b3bef vty_{client,server}_init(): remove unused argument
Change-Id: I65256c8602e91bcdbe5fe9e532b6ce7d347d3980
2021-04-16 20:30:18 +02:00
Harald Welte 611fd19fa3 vty: Add space after prompt, as customary
In all other programs, we have a space after the VTY prompt.

Change-Id: I7916c15cc34e41738a5716e4fefbb15e18f02fa7
2021-04-12 16:07:17 +02:00
Pau Espin f946fa21ee client: Add pcap snaplen VTY cmd
Change-Id: I84fda9f27b725e031c218187ab679392dfa7ec3d
2018-10-08 20:20:43 +02:00
Pau Espin 6e9bf9aa15 vty: skip installing cmds now always installed by default
Fixes following compilation warning:
osmo-pcap/src/osmo_client_vty.c:511:2: warning: ‘install_default’ is deprecated: Now happens implicitly with install_node() [-Wdeprecated-declarations]

Depends: libosmocore I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b
Change-Id: I943f68dbafd7906313ad9e59f4adb289ae23cdec
2018-10-08 13:29:52 +02:00
Harald Welte f335e37ed5 Add support for generating IPIP to osmo-pcap-client
This allows the user to change the configuration between either using

a) the classic OsmoPCAP protocol (over TCP with or without TLS)
   which is used when you want to talk to an osmo-pcap-server

b) the (new) IPIP encapsulation, which will simply take the IP
   packet (without Ethernet or pcap header) and transmit it inside IPIP
   to the specified server IP address.  This is useful for gettin
   real-time streaming into wireshark.

Change-Id: I8056fc163ac2f15adcb964d867dd5e51df4e4710
2018-02-09 12:07:50 +01:00
Holger Hans Peter Freyther 40c1e85499 client: Allow to bind to a specific source_ip
Modify the osmo_sock_init (code clone to be integrated upstream)
to allow binding to a specific source ip and source port. Allow
the source ip to be configured but allow the kernel to pick a
random port for us.

This is necessary for systems with multiple interfaces where the
default route is not necessarily the right one to connect to the
pcap server.

Change-Id: I84e728b0752213d28f970fcbbfd6565c441ccfeb
2017-01-17 09:06:42 +01:00
Holger Hans Peter Freyther 0a94e57b72 client: Allow to stop and remove a connection
Change-Id: I2118723345caf6a68f03de74a4182506e7bf105c
2016-11-09 01:04:04 +01:00
Holger Hans Peter Freyther 1448f50db4 client: Allow to configure and connect multiple servers
Allow to configure multiple servers and connect. Introduce a new VTY
node to allow multiple servers. Add an explicit connect. Do not put
the main connection into the same list but assume it exists.

Change-Id: I9448ad4a005dd7c7eb1c615d03e57d6cb058ae4d
2016-11-09 01:04:04 +01:00
Holger Hans Peter Freyther 13f397c68c client: Prepare to have multiple server connections
Take out various fields into a new connection class. We will have the
option to connect to multiple servers.

Change-Id: I820176d133fbdb0240a16eb4e1a6d505e5c080c6
2016-11-09 00:20:29 +01:00
Holger Hans Peter Freyther c266796caa client: Initial support for TLS in the client
Use GNUtls because it is GPL compatible and instead of mbedTLS seems
to have a working non-blocking I/O integration. GNUtls has various
issues that could not be resolved easily:

* Pick spdy as sub protocol
* gmt_time not randomized
* private key loaded to RAM (but not verified)

This is the beginning and not the end. Client support might need more
work with actual tls verification. Maybe more manual x509 cert
verification is needed and maybe client certs don't work at all. I try
to ignore renegotiation as I threw away the key.

Reload x509 creds and keys as they might have changed from one
connection to another.

Change-Id: I9128e14084da1fc2705f858393f98b8133996172
2016-09-08 16:16:55 +02:00
Holger Hans Peter Freyther b7a834b4cb gprs: Add a custom GPRS filter
Allow to inspect UDP messages and check for GPRS, NS, BSSGP
and then filter LLC frames. Parsing the vL datastructure with
the libpcap syntax is a pain. It could be done using BPF but
we do not want to use bpf asm to specify the entire ruleset.

I looked into using libepan/libwireshark but this has memory
issues and is painful too. So let's parse UDP, NS, BSSGP using
the info we already have. I tried a bit of editcap to generate
a bit of broken data. The length check might still be bad.

I used my crash_20100602.pcap file to count the LLC frames we
detect and compare that to wireshark it ended with the right
number.

  pcap add-filter gprs

can be used to enable the new filtering option after the OS
has received the packet.

Fixes: ONW#1314
2015-09-10 16:55:33 +02:00
Holger Hans Peter Freyther cd2d3db3b7 osmo-pcap-client: Set the filter string on the pcap device.. 2011-05-31 21:19:51 +02:00
Holger Hans Peter Freyther bac0c98d22 osmo-pcap-client: Do not print the strings if they are NULL
this makes glibc add the (null) for us, but we don't want that
as we would attempt to compile a filter or open a device with that.
2011-05-31 17:55:45 +02:00
Holger Hans Peter Freyther 3b9b38ca68 osmo-pcap-client: Work on the client code, be able to open the device
Add vty code to allow changing the device, this will just attempt
to open and close the device. Nothing else is done.
2011-05-31 17:42:53 +02:00
Holger Hans Peter Freyther 530ecc0879 osmo_pcap_client: Start with the framework for the pcap client
This is just the normal skeleton for the osmocom code.
2011-05-31 15:47:44 +02:00