Projects
osmocom:master
osmo-pcap
Log In
Username
Password
File not found: simtrace2_0.8.1.78.64e0a.202411242026.dsc
×
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 43
View file
osmo-pcap.spec
Changed
@@ -14,13 +14,13 @@ Name: osmo-pcap Requires: osmocom-master -Version: 0.7.0.4.39f5 +Version: 0.7.0.6.82a3 Release: 0 Summary: Osmocom's PCAP client and server License: AGPL-3.0-or-later AND GPL-2.0-or-later Group: Productivity/Telephony/Servers URL: https://osmocom.org/projects/osmo-pcap -Source: osmo-pcap_0.7.0.4.39f5.tar.xz +Source: osmo-pcap_0.7.0.6.82a3.tar.xz Source1: rpmlintrc BuildRequires: autoconf BuildRequires: automake >= 1.6
View file
commit_39f5c49945b58856fc04ed09c62b4570c3777542.txt
Deleted
View file
commit_82a335b6054b8f85eb68e17978ce5558d17cced2.txt
Added
View file
osmo-pcap_0.7.0.4.39f5.dsc
Deleted
@@ -1,22 +0,0 @@ -Format: 3.0 (native) -Source: osmo-pcap -Binary: osmo-pcap-client, osmo-pcap-server, osmo-pcap-client-dbg, osmo-pcap-server-dbg -Architecture: any -Version: 0.7.0.4.39f5 -Maintainer: Osmocom team <openbsc@lists.osmocom.org> -Homepage: https://osmocom.org/projects/osmo-pcap -Standards-Version: 3.9.1 -Vcs-Browser: https://gitea.osmocom.org/osmocom/osmo-pcap -Vcs-Git: https://gitea.osmocom.org/osmocom/osmo-pcap -Build-Depends: debhelper (>= 10), dh-autoreconf, autotools-dev, libpcap0.8-dev, pkg-config, libosmocore-dev (>= 1.11.0), libosmo-netif-dev (>= 1.6.0), libgnutls28-dev, libzmq3-dev (>= 3.2.2) -Package-List: - osmo-pcap-client deb net extra arch=any - osmo-pcap-client-dbg deb net extra arch=any - osmo-pcap-server deb net extra arch=any - osmo-pcap-server-dbg deb net extra arch=any -Checksums-Sha1: - acd8873d28fefd04c87bbdd8eefee28c4e05434a 66720 osmo-pcap_0.7.0.4.39f5.tar.xz -Checksums-Sha256: - 922842cbe429ce606e1f5a9b291c144261b5909fb797f1a3e98a314a2f4bbac6 66720 osmo-pcap_0.7.0.4.39f5.tar.xz -Files: - dc5e8e729de98e0cdc59e2a7beceedf3 66720 osmo-pcap_0.7.0.4.39f5.tar.xz
View file
osmo-pcap_0.7.0.6.82a3.dsc
Added
@@ -0,0 +1,22 @@ +Format: 3.0 (native) +Source: osmo-pcap +Binary: osmo-pcap-client, osmo-pcap-server, osmo-pcap-client-dbg, osmo-pcap-server-dbg +Architecture: any +Version: 0.7.0.6.82a3 +Maintainer: Osmocom team <openbsc@lists.osmocom.org> +Homepage: https://osmocom.org/projects/osmo-pcap +Standards-Version: 3.9.1 +Vcs-Browser: https://gitea.osmocom.org/osmocom/osmo-pcap +Vcs-Git: https://gitea.osmocom.org/osmocom/osmo-pcap +Build-Depends: debhelper (>= 10), dh-autoreconf, autotools-dev, libpcap0.8-dev, pkg-config, libosmocore-dev (>= 1.11.0), libosmo-netif-dev (>= 1.6.0), libgnutls28-dev, libzmq3-dev (>= 3.2.2) +Package-List: + osmo-pcap-client deb net extra arch=any + osmo-pcap-client-dbg deb net extra arch=any + osmo-pcap-server deb net extra arch=any + osmo-pcap-server-dbg deb net extra arch=any +Checksums-Sha1: + 7f5c667236d18df9423513dded184c656d2c9397 66900 osmo-pcap_0.7.0.6.82a3.tar.xz +Checksums-Sha256: + f71c0a487fefe46b58e9bbe8076c3fc2be525467cbff6bed24d482ff7407957a 66900 osmo-pcap_0.7.0.6.82a3.tar.xz +Files: + fc3d4256a70a843e97064ca8504370c3 66900 osmo-pcap_0.7.0.6.82a3.tar.xz
View file
osmo-pcap_0.7.0.4.39f5.tar.xz/.tarball-version -> osmo-pcap_0.7.0.6.82a3.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -0.7.0.4-39f5 +0.7.0.6-82a3
View file
osmo-pcap_0.7.0.4.39f5.tar.xz/debian/changelog -> osmo-pcap_0.7.0.6.82a3.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -osmo-pcap (0.7.0.4.39f5) unstable; urgency=medium +osmo-pcap (0.7.0.6.82a3) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom master feed - -- Osmocom OBS scripts <info@osmocom.org> Tue, 08 Apr 2025 15:10:44 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Wed, 09 Apr 2025 23:10:28 +0000 osmo-pcap (0.7.0) unstable; urgency=medium
View file
osmo-pcap_0.7.0.4.39f5.tar.xz/src/osmo_client_core.c -> osmo-pcap_0.7.0.6.82a3.tar.xz/src/osmo_client_core.c
Changed
@@ -152,27 +152,38 @@ return check_gprs(payload_data, payload_len); } +static void pcap_read_one_cb(u_char *user, const struct pcap_pkthdr *hdr, const u_char *data) +{ + struct osmo_pcap_handle *ph = (struct osmo_pcap_handle *)user; + struct osmo_pcap_client *client = ph->client; + struct osmo_pcap_client_conn *conn; + + /* NOTE: hdr & data are only available during the call of this callback, + * and should be copied somewhere else if need be accessed later. + * In here we are fine since we generate a msgb and copy over the + * content on each loop iteration below. */ + + if (!can_forward_packet(client, ph, hdr, data)) + return; + + llist_for_each_entry(conn, &client->conns, entry) + osmo_client_conn_send_data(conn, ph, hdr, data); +} static int pcap_read_cb(struct osmo_fd *fd, unsigned int what) { struct osmo_pcap_handle *ph = fd->data; - struct osmo_pcap_client *client = ph->client; - struct osmo_pcap_client_conn *conn; - struct pcap_pkthdr hdr; - const u_char *data; + int rc; - data = pcap_next(ph->handle, &hdr); - if (!data) { + /* Read up to 10 packets at once, to avoid starving the event loop and + * filling up transmit queue towards peer. */ + rc = pcap_dispatch(ph->handle, 10, pcap_read_one_cb, (u_char *)ph); + if (rc < 0) { rate_ctr_inc2(ph->ctrg, PH_CTR_PERR); - rate_ctr_inc2(client->ctrg, CLIENT_CTR_PERR); + rate_ctr_inc2(ph->client->ctrg, CLIENT_CTR_PERR); return -1; } - if (!can_forward_packet(client, ph, &hdr, data)) - return 0; - - llist_for_each_entry(conn, &client->conns, entry) - osmo_client_conn_send_data(conn, ph, &hdr, data); return 0; } @@ -448,6 +459,13 @@ return -2; } + if (client->filter_string) + osmo_pcap_handle_install_filter(ph); + + errbuf0 = '\0'; + if (pcap_setnonblock(ph->handle, 1, errbuf) != 0) + LOGPH(ph, LOGL_ERROR, "Failed pcap_setnonblock(): %s\n", errbuf); + fd = pcap_fileno(ph->handle); if (fd == -1) { LOGPH(ph, LOGL_ERROR, "No file descriptor provided.\n"); @@ -463,7 +481,5 @@ osmo_timer_setup(&ph->pcap_stat_timer, pcap_check_stats_cb, ph); pcap_check_stats_cb(ph); - if (client->filter_string) - osmo_pcap_handle_install_filter(ph); return 0; }
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.