Commit Graph

33 Commits

Author SHA1 Message Date
Pau Espin 3092167e4e server: Call osmo_fd_unregister() before closing and changing bfd->fd
Change-Id: I44405687dae79a13db5617867c669ee4840485ba
2023-03-14 11:50:02 +01:00
Pau Espin b9be6767ab server: Add vty command file-permission-mask
Related: SYS#5792
Change-Id: I78e0b56b38de438ee5fb679ae41c65b02ea2e722
2022-01-12 17:44:38 +01:00
Pau Espin ef92a539e8 Use new stat item/ctr getter APIs
Generated with spatch:
"""
@@
expression E1, E2;
@@
- &E2->ctr[E1]
+ rate_ctr_group_get_ctr(E2, E1)
"""

Change-Id: Ic860db04489e9ee7312edb008497186116f30bfc
2021-06-04 18:01:06 +02:00
Harald Welte 20c6ba5a9e Use OSMO_FD_* instead of deprecated BSC_FD_*
Change-Id: I7d57919877520710b5dc1f54de1de89cae78093e
2020-10-18 22:39:39 +02:00
Pau Espin a82aaef507 server: Add pcap snaplen VTY cmd
Change-Id: I8fdcdc1a58926ec66a1dc5dc7a5e57ed4dceb4b4
2018-10-08 20:20:43 +02:00
Pau Espin 868a501213 server: Improve verification of messages from client
Take the chance to define SERVER_MAX_DATA_SIZE as pcap payload, which we
can later match to configurable snaplen parameter.

Change-Id: I45d4c59026faf1108c0976eb6ad8c270e3577dbf
2018-10-08 20:20:43 +02:00
Pau Espin f10c57801a Replace '.' in counter names with ':'
The '.' is illegal character in counter names, as they are exported
via CTRL interface, where '.' has a special meaning that cannot be
used by strings comprising the variable name.

Change-Id: Icec5338d3242137980fa05d2c7ae2db940afb542
2018-10-08 20:20:43 +02:00
Holger Hans Peter Freyther cf29fd7069 server: Add vty interface for the TLS configuration
Make the priority configurable, load DH params, allow to specify
certificates or anonymous operations.

Change-Id: I8ec3c0f8e1ee2089e1b7dacd9de842260930032f
2016-09-08 16:17:02 +02:00
Holger Hans Peter Freyther 9ea4da4bbb server: Introduce tls mode for the server
Using tls priority of NORMAL:+ANON-ECDH:+ANON-DH already allows a
client to connect to a server and protect the data using tls.

Generate the dh params on load (and do that for the client right
now as well) but that will go away soon.

Change-Id: Ifa2ad24c0a631573c259a3bf94b91a946ad9ec9d
2016-09-08 16:17:01 +02:00
Holger Hans Peter Freyther 064d224288 server: Re-factor the read dispatch and connection close
In preparation of TLS let's not call close_connection from
within the dispatch but return an error and then close the
connection from the outside.

Change-Id: I607fed0191907cfbc8887d749c88f7f4ffb87166
2016-09-08 16:17:00 +02:00
Holger Hans Peter Freyther 1bec9d5d09 server: Add API function to close a connection
Change-Id: I4295854c749d86ca8c34a979c877363d9f48e176
2016-09-08 16:17:00 +02:00
Holger Hans Peter Freyther 098850d0a8 server: Move to a write_queue for the conn socket
We are only reading from the socket and never write but the osmo_tls
code is integrated with it. We will never write and the queue size is
set to 0. Simplify the read_cb.

Change-Id: I32335b1f7b7ed06b92c6222516c185301ce13781
2016-09-08 16:17:00 +02:00
Holger Hans Peter Freyther 6413e7669e server: Update copyright after zmq changes
Change-Id: I8861acaaec5465de620637b7fdf3341517133c4f
2016-09-08 16:16:59 +02:00
Holger Hans Peter Freyther 99526a6ad0 server: Add global and per client counters and begin to count
Add the basics for getting a picture what a client and the server
is doing. We need to create unique descriptions as the code is
working with names and not numbers for clients.

Change-Id: I4a9be5bdd815d280cccf0199efc2ca79fc77d393
2016-08-19 19:23:00 +02:00
Holger Hans Peter Freyther e024869a72 server: Add zmq based event and data interface to the server
To allow easily extracting or streaming the data to an external
analysis system, zeromq can be configured (and reconfigured). The
system works as fire and forget and no loss detection is present.

A simple go based client application is provided to subscribe to
the publisher.

Change-Id: I4f3e6d675023a81b7d2ee19bf1f44a2be0ca003c
2016-08-05 16:10:05 +02:00
Holger Hans Peter Freyther 2899428be2 server: Add a config knob to not store the pcap stream
We might only want to centralize the data streams but handle the
data differently. This will be combined with an upcoming ZeroMQ
publisher feature to broadcast all events out.

Change-Id: I12c6bf16310820d882fa28c6930931650475e0bb
2016-08-04 16:14:38 +02:00
Holger Hans Peter Freyther ff1a5dc751 server: Deal with jumbo frames on the wire
The 2000 as a number is too small. Modern networks can have a
higher MTU (up to 9000). Take this number and assume there is
a big header in front of it.
2015-12-03 19:53:24 +01:00
Holger Hans Peter Freyther 26327bd0ce server: Fix the language and refer to the received data length 2015-12-03 19:29:38 +01:00
Daniel Willmann b000368ad6 Catch up with API change in osmo_sock_init
The connect0_bind1 parameter has been replaced by a generic flag
parameter. With this patch osmo-pcap works (only) with versions of
libosmocore 0.3.2 or newer - configure.ac changed to reflects that.
2011-07-19 17:56:09 +02:00
Daniel Willmann c7401c6c23 server: Register signal handler to reopen logfiles on SIGHUP 2011-07-19 17:56:07 +02:00
Daniel Willmann de77386d84 server: Fix memory leak and error handling in restart_pcap 2011-07-19 17:56:03 +02:00
Holger Hans Peter Freyther f60990e3f4 server: Allow the group to read the files too 2011-06-10 15:29:46 +02:00
Holger Hans Peter Freyther 91eaae33ea osmo-pcap-server: Read the header in pieces too... 2011-06-02 17:58:46 +02:00
Holger Hans Peter Freyther 39d904f149 osmo-pcap-server: Try to read the the data with a simple state machine 2011-06-01 18:49:07 +02:00
Holger Hans Peter Freyther 9df7dc5f69 wireformat: Send the length in the network order..
this is a format change. but it is necessary now.
2011-06-01 17:34:09 +02:00
Holger Hans Peter Freyther 59bfb5854d osmo-server-network: Print the size of the packet.
Fix a typo, print the data we received and what we wanted.
2011-06-01 17:00:12 +02:00
Holger Hans Peter Freyther 54ff0b1b86 osmo-pcap-server: Just check for >= 0 to find a valid fd 2011-06-01 16:33:11 +02:00
Holger Hans Peter Freyther dc3d1dcd59 osmo-pcap-server: Initialize local_fd with -1 otherwise 2011-06-01 16:32:29 +02:00
Holger Hans Peter Freyther e6acfea051 osmo-pcap-server: Deal with systems not providing these macros 2011-06-01 15:31:50 +02:00
Holger Hans Peter Freyther 7309a906d0 osmo-pcap-server: Write the pcap files to disk, roll them over 2011-06-01 14:09:26 +02:00
Holger Hans Peter Freyther 80b8b606c5 osmo-pcap-server: Accept the client connection from a given host
We now read from a given system.
2011-05-31 23:42:48 +02:00
Holger Hans Peter Freyther 9f6127f592 osmo-pcap-server: Work on the generic VTY interface for the server
Work on being able to configure clients that are allowed to
connect to the server.
2011-05-31 23:42:48 +02:00
Holger Hans Peter Freyther 13619dd235 osmo-pcap-server: Start with the skeleton of the pcap server 2011-05-31 23:42:48 +02:00