1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00
VILLASnode/lib/nodes/rtp.cpp

623 lines
15 KiB
C++
Raw Permalink Normal View History

/** Node type: Real-time Protocol (RTP)
*
* @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
* @author Marvin Klimke <marvin.klimke@rwth-aachen.de>
2020-01-20 17:17:00 +01:00
* @copyright 2014-2020, Institute for Automation of Complex Power Systems, EONERC
* @license GNU General Public License (version 3)
*
* VILLASnode
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************************/
#include <cinttypes>
#include <pthread.h>
#include <cstring>
#include <ctime>
2019-01-07 15:49:34 +01:00
#include <signal.h>
#include <villas/nodes/rtp.hpp>
2019-03-26 15:34:07 +01:00
extern "C" {
2021-02-19 06:38:38 +01:00
#include <re/re_main.h>
#include <re/re_types.h>
#include <re/re_mbuf.h>
#include <re/re_mem.h>
#include <re/re_sys.h>
#include <re/re_udp.h>
#undef ALIGN_MASK
2019-03-26 15:34:07 +01:00
}
2018-11-21 18:21:29 +01:00
#include <villas/plugin.h>
#include <villas/nodes/socket.hpp>
#include <villas/utils.hpp>
2019-06-23 13:35:42 +02:00
#include <villas/stats.hpp>
2019-06-23 16:13:23 +02:00
#include <villas/hook.hpp>
#include <villas/format_type.h>
2019-04-23 13:14:47 +02:00
#include <villas/super_node.hpp>
2019-01-21 22:14:41 +01:00
#ifdef WITH_NETEM
#include <villas/kernel/if.hpp>
2019-01-21 22:14:41 +01:00
#endif /* WITH_NETEM */
static pthread_t re_pthread;
2019-06-23 13:35:42 +02:00
using namespace villas;
2019-06-04 16:55:38 +02:00
using namespace villas::utils;
using namespace villas::node;
using namespace villas::kernel;
2019-03-26 15:34:07 +01:00
2019-04-07 15:13:40 +02:00
static struct plugin p;
2020-08-25 21:00:52 +02:00
static int rtp_aimd(struct vnode *n, double loss_frac)
{
struct rtp *r = (struct rtp *) n->_vd;
double rate;
if (!r->rtcp.enabled)
return -1;
2019-02-17 21:16:51 +01:00
if (loss_frac < 0.01)
rate = r->aimd.rate + r->aimd.a;
else
rate = r->aimd.rate * r->aimd.b;
r->aimd.rate = r->aimd.rate_pid.calculate(rate, r->aimd.rate);
if (r->aimd.rate_hook) {
r->aimd.rate_hook->setRate(r->aimd.rate);
2021-02-16 14:15:14 +01:00
n->logger->debug("AIMD: Set rate limit to: {}", r->aimd.rate);
}
if (r->aimd.log)
*(r->aimd.log) << r->rtcp.num_rrs << "\t" << loss_frac << "\t" << r->aimd.rate << std::endl;
2019-01-28 12:30:47 +01:00
2021-02-16 14:15:14 +01:00
n->logger->debug("AIMD: {}\t{}\t{}", r->rtcp.num_rrs, loss_frac, r->aimd.rate);
2019-01-28 12:30:47 +01:00
return 0;
}
2020-08-25 21:00:52 +02:00
int rtp_init(struct vnode *n)
{
struct rtp *r = (struct rtp *) n->_vd;
2021-02-16 14:15:14 +01:00
n->logger = villas::logging.get("node:rtp");
2019-03-29 09:50:27 +01:00
/* Default values */
r->aimd.rate = 1;
r->aimd.a = 10;
r->aimd.b = 0.5;
r->aimd.Kp = 1;
r->aimd.Ki = 0;
r->aimd.Kd = 0;
r->aimd.rate_min = 1;
r->aimd.rate_source = 2000;
2019-03-29 09:50:47 +01:00
r->aimd.log_filename = nullptr;
r->aimd.log = nullptr;
r->rtcp.enabled = false;
2019-06-23 16:13:23 +02:00
r->aimd.rate_hook_type = RTPHookType::DISABLED;
return 0;
}
2020-08-25 21:00:52 +02:00
int rtp_reverse(struct vnode *n)
{
struct rtp *r = (struct rtp *) n->_vd;
2019-03-28 09:23:44 +01:00
SWAP(r->in.saddr_rtp, r->out.saddr_rtp);
SWAP(r->in.saddr_rtcp, r->out.saddr_rtcp);
return 0;
}
2021-02-16 14:15:14 +01:00
int rtp_parse(struct vnode *n, json_t *json)
{
2018-11-21 18:21:29 +01:00
int ret = 0;
struct rtp *r = (struct rtp *) n->_vd;
const char *local, *remote;
const char *format = "villas.binary";
2019-03-29 09:50:47 +01:00
const char *log = nullptr;
const char *hook_type = nullptr;
uint16_t port;
json_error_t err;
json_t *json_aimd = nullptr;
2021-02-16 14:15:14 +01:00
ret = json_unpack_ex(json, &err, 0, "{ s?: s, s?: b, s?: o, s: { s: s }, s: { s: s } }",
"format", &format,
"rtcp", &r->rtcp.enabled,
"aimd", &json_aimd,
"out",
"address", &remote,
"in",
"address", &local
);
if (ret)
2021-02-16 14:15:14 +01:00
throw ConfigError(json, err, "node-config-node-rtp");
/* AIMD */
if (json_aimd) {
ret = json_unpack_ex(json_aimd, &err, 0, "{ s?: F, s?: F, s?: F, s?: F, s?: F, s?: F, s?: F, s?: F, s?: s, s?: s }",
"a", &r->aimd.a,
"b", &r->aimd.b,
"Kp", &r->aimd.Kp,
"Ki", &r->aimd.Ki,
"Kd", &r->aimd.Kd,
"rate_min", &r->aimd.rate_min,
"rate_source", &r->aimd.rate_source,
"rate_init", &r->aimd.rate,
"log", &log,
"hook_type", &hook_type
);
if (ret)
2021-02-16 14:15:14 +01:00
throw ConfigError(json_aimd, err, "node-config-node-rtp-aimd");
/* AIMD Hook type */
if (!r->rtcp.enabled)
2019-06-23 16:13:23 +02:00
r->aimd.rate_hook_type = RTPHookType::DISABLED;
else if (hook_type) {
if (!strcmp(hook_type, "decimate"))
2019-06-23 16:13:23 +02:00
r->aimd.rate_hook_type = RTPHookType::DECIMATE;
else if (!strcmp(hook_type, "limit_rate"))
2019-06-23 16:13:23 +02:00
r->aimd.rate_hook_type = RTPHookType::LIMIT_RATE;
else if (!strcmp(hook_type, "disabled"))
2019-06-23 16:13:23 +02:00
r->aimd.rate_hook_type = RTPHookType::DISABLED;
else
2021-02-16 14:15:14 +01:00
throw RuntimeError("Unknown RTCP hook_type: {}", hook_type);
}
}
2019-03-29 09:50:47 +01:00
if (log)
r->aimd.log_filename = strdup(log);
/* Format */
r->format = format_type_lookup(format);
2019-02-15 10:21:14 +01:00
if (!r->format)
2021-02-16 14:15:14 +01:00
throw RuntimeError("Invalid format '{}'", format);
/* Remote address */
ret = sa_decode(&r->out.saddr_rtp, remote, strlen(remote));
2021-02-16 14:15:14 +01:00
if (ret)
throw RuntimeError("Failed to resolve remote address '{}': {}", remote, strerror(ret));
/* Assign even port number to RTP socket, next odd number to RTCP socket */
port = sa_port(&r->out.saddr_rtp) & ~1;
sa_set_sa(&r->out.saddr_rtcp, &r->out.saddr_rtp.u.sa);
sa_set_port(&r->out.saddr_rtp, port);
sa_set_port(&r->out.saddr_rtcp, port+1);
/* Local address */
ret = sa_decode(&r->in.saddr_rtp, local, strlen(local));
2021-02-16 14:15:14 +01:00
if (ret)
throw RuntimeError("Failed to resolve local address '{}': {}", local, strerror(ret));
/* Assign even port number to RTP socket, next odd number to RTCP socket */
port = sa_port(&r->in.saddr_rtp) & ~1;
sa_set_sa(&r->in.saddr_rtcp, &r->in.saddr_rtp.u.sa);
sa_set_port(&r->in.saddr_rtp, port);
sa_set_port(&r->in.saddr_rtcp, port+1);
/** @todo parse * in addresses */
2021-03-11 05:46:22 -05:00
return 0;
}
2020-08-25 21:00:52 +02:00
char * rtp_print(struct vnode *n)
{
struct rtp *r = (struct rtp *) n->_vd;
char *buf;
char *local = socket_print_addr((struct sockaddr *) &r->in.saddr_rtp.u);
char *remote = socket_print_addr((struct sockaddr *) &r->out.saddr_rtp.u);
buf = strf("format=%s, in.address=%s, out.address=%s, rtcp.enabled=%s",
format_type_name(r->format),
local, remote,
r->rtcp.enabled ? "yes" : "no");
if (r->rtcp.enabled) {
const char *hook_type;
switch (r->aimd.rate_hook_type) {
2019-06-23 16:13:23 +02:00
case RTPHookType::DECIMATE:
hook_type = "decimate";
2019-01-28 11:09:53 +01:00
break;
2019-06-23 16:13:23 +02:00
case RTPHookType::LIMIT_RATE:
hook_type = "limit_rate";
2019-01-28 11:09:53 +01:00
break;
2019-06-23 16:13:23 +02:00
case RTPHookType::DISABLED:
hook_type = "disabled";
2019-01-28 11:09:53 +01:00
break;
2019-02-06 17:31:27 +01:00
default:
hook_type = "unknown";
}
strcatf(&buf, ", aimd.hook_type=%s", hook_type);
strcatf(&buf, ", aimd.a=%f, aimd.b=%f, aimd.start_rate=%f", r->aimd.a, r->aimd.b, r->aimd.rate);
}
free(local);
free(remote);
return buf;
}
2018-11-28 06:11:13 +01:00
static void rtp_handler(const struct sa *src, const struct rtp_header *hdr, struct mbuf *mb, void *arg)
{
2019-01-28 10:53:34 +01:00
int ret;
2020-08-25 21:00:52 +02:00
struct vnode *n = (struct vnode *) arg;
struct rtp *r = (struct rtp *) n->_vd;
/* source, header not used */
(void) src;
(void) hdr;
2019-01-28 10:53:34 +01:00
void *d = mem_ref((void *) mb);
ret = queue_signalled_push(&r->recv_queue, d);
if (ret != 1) {
2021-02-16 14:15:14 +01:00
n->logger->warn("Failed to push to queue");
2019-01-28 10:53:34 +01:00
mem_deref(d);
}
2018-11-28 06:11:13 +01:00
}
static void rtcp_handler(const struct sa *src, struct rtcp_msg *msg, void *arg)
{
2020-08-25 21:00:52 +02:00
struct vnode *n = (struct vnode *) arg;
2019-01-28 12:30:47 +01:00
struct rtp *r = (struct rtp *) n->_vd;
/* source not used */
2019-01-28 10:53:34 +01:00
(void) src;
2021-02-16 14:15:14 +01:00
n->logger->debug("RTCP: recv {}", rtcp_type_name((enum rtcp_type) msg->hdr.pt));
if (msg->hdr.pt == RTCP_SR) {
2019-02-15 10:21:14 +01:00
if (msg->hdr.count > 0) {
const struct rtcp_rr *rr = &msg->r.sr.rrv[0];
2019-03-29 09:51:00 +01:00
double loss_frac = (double) rr->fraction / 256;
2019-03-29 09:51:00 +01:00
rtp_aimd(n, loss_frac);
2019-03-29 09:51:00 +01:00
if (n->stats) {
2019-06-23 13:35:42 +02:00
n->stats->update(Stats::Metric::RTP_PKTS_LOST, rr->lost);
n->stats->update(Stats::Metric::RTP_LOSS_FRACTION, loss_frac);
n->stats->update(Stats::Metric::RTP_JITTER, rr->jitter);
2019-03-29 09:51:00 +01:00
}
2021-02-16 14:15:14 +01:00
n->logger->info("RTCP: rr: num_rrs={}, loss_frac={}, pkts_lost={}, jitter={}", r->rtcp.num_rrs, loss_frac, rr->lost, rr->jitter);
}
2019-01-28 10:53:34 +01:00
else
2021-02-16 14:15:14 +01:00
n->logger->debug("RTCP: Received sender report with zero reception reports");
}
2019-01-28 12:30:47 +01:00
r->rtcp.num_rrs++;
}
2020-08-25 21:00:52 +02:00
int rtp_start(struct vnode *n)
{
int ret;
struct rtp *r = (struct rtp *) n->_vd;
2019-01-28 10:54:09 +01:00
/* Initialize queue */
2019-06-23 16:13:23 +02:00
ret = queue_signalled_init(&r->recv_queue, 1024, &memory_heap);
if (ret)
return ret;
/* Initialize IO */
2019-06-23 16:13:23 +02:00
ret = io_init(&r->io, r->format, &n->in.signals, (int) SampleFlags::HAS_ALL & ~(int) SampleFlags::HAS_OFFSET);
if (ret)
return ret;
/* Initialize memory buffer for sending */
2019-01-28 10:53:01 +01:00
r->send_mb = mbuf_alloc(RTP_INITIAL_BUFFER_LEN);
if (!r->send_mb)
return -1;
2019-01-28 10:53:01 +01:00
ret = mbuf_fill(r->send_mb, 0, RTP_HEADER_SIZE);
if (ret)
return -1;
/* Initialize AIMD hook */
2019-06-23 16:13:23 +02:00
if (r->aimd.rate_hook_type != RTPHookType::DISABLED) {
#ifdef WITH_HOOKS
switch (r->aimd.rate_hook_type) {
2019-06-23 16:13:23 +02:00
case RTPHookType::DECIMATE:
r->aimd.rate_hook = new DecimateHook(nullptr, n, 0, 0);
break;
2019-06-23 16:13:23 +02:00
case RTPHookType::LIMIT_RATE:
r->aimd.rate_hook = new LimitRateHook(nullptr, n, 0, 0);
break;
default:
2019-03-26 15:34:07 +01:00
return -1;
}
if (!r->aimd.rate_hook)
throw MemoryAllocationError();
r->aimd.rate_hook->init();
vlist_push(&n->out.hooks, (void *) r->aimd.rate_hook);
r->aimd.rate_hook->setRate(r->aimd.rate_last);
#else
2021-02-16 14:15:14 +01:00
throw RuntimeError("Rate limiting is not supported");
return -1;
#endif
}
double dt = 5.0; // TODO
r->aimd.rate_pid = villas::dsp::PID(dt, r->aimd.rate_source, r->aimd.rate_min, r->aimd.Kp, r->aimd.Ki, r->aimd.Kd);
/* Initialize RTP socket */
uint16_t port = sa_port(&r->in.saddr_rtp) & ~1;
ret = rtp_listen(&r->rs, IPPROTO_UDP, &r->in.saddr_rtp, port, port+1, r->rtcp.enabled, rtp_handler, rtcp_handler, n);
/* Start RTCP session */
2019-01-28 12:30:47 +01:00
if (r->rtcp.enabled) {
r->rtcp.num_rrs = 0;
rtcp_start(r->rs, node_name(n), &r->out.saddr_rtcp);
if (r->aimd.log_filename) {
2019-03-29 09:50:47 +01:00
char fn[128];
2019-01-28 12:30:47 +01:00
2019-03-29 09:45:12 +01:00
time_t ts = time(nullptr);
2019-01-28 12:30:47 +01:00
struct tm tm;
/* Convert time */
gmtime_r(&ts, &tm);
2019-03-29 09:50:47 +01:00
strftime(fn, sizeof(fn), r->aimd.log_filename, &tm);
2019-01-28 12:30:47 +01:00
r->aimd.log = new std::ofstream(fn, std::ios::out | std::ios::trunc);
if (!r->aimd.log)
throw MemoryAllocationError();
2019-01-28 12:30:47 +01:00
*(r->aimd.log) << "# cnt\tfrac_loss\trate" << std::endl;
2019-01-28 12:30:47 +01:00
}
else
r->aimd.log = nullptr;
2019-01-28 12:30:47 +01:00
}
return ret;
}
2020-08-25 21:00:52 +02:00
int rtp_stop(struct vnode *n)
{
2018-12-19 18:40:53 +01:00
int ret;
struct rtp *r = (struct rtp *) n->_vd;
mem_deref(r->rs);
ret = queue_signalled_close(&r->recv_queue);
2021-02-16 14:15:14 +01:00
if (ret)
throw RuntimeError("Problem closing queue");
2018-12-19 18:40:53 +01:00
ret = queue_signalled_destroy(&r->recv_queue);
2021-02-16 14:15:14 +01:00
if (ret)
throw RuntimeError("Problem destroying queue");
2018-12-19 18:40:53 +01:00
2019-01-28 10:53:01 +01:00
mem_deref(r->send_mb);
if (r->aimd.log)
r->aimd.log->close();
2019-01-28 12:30:47 +01:00
2019-03-26 07:10:37 +01:00
ret = io_destroy(&r->io);
if (ret)
return ret;
return 0;
}
2020-08-25 21:00:52 +02:00
int rtp_destroy(struct vnode *n)
2019-03-29 09:50:47 +01:00
{
struct rtp *r = (struct rtp *) n->_vd;
if (r->aimd.log)
delete r->aimd.log;
2019-03-29 09:50:47 +01:00
if (r->aimd.log_filename)
free(r->aimd.log_filename);
return 0;
}
2019-01-08 22:53:04 +01:00
static void stop_handler(int sig, siginfo_t *si, void *ctx)
{
re_cancel();
}
typedef void *(*pthread_start_routine)(void *);
2019-04-23 13:14:47 +02:00
int rtp_type_start(villas::node::SuperNode *sn)
{
int ret;
/* Initialize library */
ret = libre_init();
2021-02-16 14:15:14 +01:00
if (ret)
throw RuntimeError("Error initializing libre");
/* Add worker thread */
2019-03-29 09:45:12 +01:00
ret = pthread_create(&re_pthread, nullptr, (pthread_start_routine) re_main, nullptr);
2021-02-16 14:15:14 +01:00
if (ret)
throw RuntimeError("Error creating rtp node type pthread");
2019-01-07 15:49:34 +01:00
struct sigaction sa;
sa.sa_flags = SA_SIGINFO;
sa.sa_sigaction = stop_handler;
2019-03-29 09:45:12 +01:00
ret = sigaction(SIGUSR1, &sa, nullptr);
2019-01-07 15:49:34 +01:00
if (ret)
return ret;
#ifdef WITH_NETEM
/* Gather list of used network interfaces */
for (size_t i = 0; i < vlist_length(&p.node.instances); i++) {
2020-08-25 21:00:52 +02:00
struct vnode *n = (struct vnode *) vlist_at(&p.node.instances, i);
struct rtp *r = (struct rtp *) n->_vd;
Interface *j = Interface::getEgress(&r->out.saddr_rtp.u.sa, sn);
2021-02-16 14:15:14 +01:00
if (!j)
throw RuntimeError("Failed to find egress interface");
j->addNode(n);
}
#endif /* WITH_NETEM */
return 0;
}
int rtp_type_stop()
{
int ret;
/* Join worker thread */
2019-01-07 15:49:34 +01:00
pthread_kill(re_pthread, SIGUSR1);
2019-03-29 09:45:12 +01:00
ret = pthread_join(re_pthread, nullptr);
2021-02-16 14:15:14 +01:00
if (ret)
throw RuntimeError("Error joining rtp node type pthread");
libre_close();
2019-01-08 22:53:04 +01:00
2021-03-11 05:46:22 -05:00
return 0;
}
2020-08-25 21:00:52 +02:00
int rtp_read(struct vnode *n, struct sample *smps[], unsigned cnt, unsigned *release)
{
2019-01-28 10:53:34 +01:00
int ret;
struct rtp *r = (struct rtp *) n->_vd;
struct mbuf *mb;
/* Get data from queue */
ret = queue_signalled_pull(&r->recv_queue, (void **) &mb);
2021-02-16 14:15:14 +01:00
if (ret < 0)
throw RuntimeError("Failed to pull from queue");
/* Unpack data */
2019-03-29 09:45:12 +01:00
ret = io_sscan(&r->io, (char *) mb->buf + mb->pos, mbuf_get_left(mb), nullptr, smps, cnt);
2019-01-28 10:53:34 +01:00
mem_deref(mb);
return ret;
}
2020-08-25 21:00:52 +02:00
int rtp_write(struct vnode *n, struct sample *smps[], unsigned cnt, unsigned *release)
{
int ret;
struct rtp *r = (struct rtp *) n->_vd;
size_t wbytes;
size_t avail;
2019-03-29 09:45:12 +01:00
uint32_t ts = (uint32_t) time(nullptr);
2019-01-28 10:53:01 +01:00
retry: mbuf_set_pos(r->send_mb, RTP_HEADER_SIZE);
avail = mbuf_get_space(r->send_mb);
cnt = io_sprint(&r->io, (char *) r->send_mb->buf + r->send_mb->pos, avail, &wbytes, smps, cnt);
if (cnt < 0)
return -1;
if (wbytes > avail) {
2019-01-28 10:53:01 +01:00
ret = mbuf_resize(r->send_mb, wbytes + RTP_HEADER_SIZE);
if (!ret)
return -1;
goto retry;
}
else
2019-01-28 10:53:01 +01:00
mbuf_set_end(r->send_mb, r->send_mb->pos + wbytes);
2019-01-28 10:53:34 +01:00
mbuf_set_pos(r->send_mb, RTP_HEADER_SIZE);
/* Send dataset */
2019-01-28 10:53:01 +01:00
ret = rtp_send(r->rs, &r->out.saddr_rtp, false, false, RTP_PACKET_TYPE, ts, r->send_mb);
2021-02-16 14:15:14 +01:00
if (ret)
throw RuntimeError("Error from rtp_send, reason: {}", ret);
return cnt;
}
2020-08-25 21:00:52 +02:00
int rtp_poll_fds(struct vnode *n, int fds[])
{
struct rtp *r = (struct rtp *) n->_vd;
fds[0] = queue_signalled_fd(&r->recv_queue);
return 1;
}
2020-08-25 21:00:52 +02:00
int rtp_netem_fds(struct vnode *n, int fds[])
{
struct rtp *r = (struct rtp *) n->_vd;
int m = 0;
struct udp_sock *rtp = (struct udp_sock *) rtp_sock(r->rs);
struct udp_sock *rtcp = (struct udp_sock *) rtcp_sock(r->rs);
fds[m++] = udp_sock_fd(rtp, AF_INET);
if (r->rtcp.enabled)
fds[m++] = udp_sock_fd(rtcp, AF_INET);
return m;
}
2019-03-27 14:12:34 +01:00
__attribute__((constructor(110)))
static void register_plugin() {
p.name = "rtp";
#ifdef WITH_NETEM
p.description = "real-time transport protocol (libre, libnl3 netem support)";
#else
p.description = "real-time transport protocol (libre)";
#endif
2019-06-23 16:13:23 +02:00
p.type = PluginType::NODE;
p.node.instances.state = State::DESTROYED;
2019-03-27 14:12:34 +01:00
p.node.vectorize = 0;
p.node.size = sizeof(struct rtp);
p.node.type.start = rtp_type_start;
p.node.type.stop = rtp_type_stop;
p.node.init = rtp_init;
2019-03-29 09:50:47 +01:00
p.node.destroy = rtp_destroy;
2019-03-27 14:12:34 +01:00
p.node.parse = rtp_parse;
p.node.print = rtp_print;
p.node.start = rtp_start;
p.node.stop = rtp_stop;
p.node.read = rtp_read;
p.node.write = rtp_write;
p.node.reverse = rtp_reverse;
p.node.poll_fds = rtp_poll_fds;
p.node.netem_fds = rtp_netem_fds;
int ret = vlist_init(&p.node.instances);
if (!ret)
vlist_init_and_push(&plugins, &p);
2019-03-27 14:12:34 +01:00
}
__attribute__((destructor(110)))
static void deregister_plugin() {
2020-06-16 02:35:34 +02:00
vlist_remove_all(&plugins, &p);
2019-03-27 14:12:34 +01:00
}