Coverage Report

Created: 2026-11-30 06:37

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/strongswan/src/libcharon/network/socket.c
Line
Count
Source
1
/*
2
 * Copyright (C) 2011 Martin Willi
3
 *
4
 * Copyright (C) secunet Security Networks AG
5
 *
6
 * This program is free software; you can redistribute it and/or modify it
7
 * under the terms of the GNU General Public License as published by the
8
 * Free Software Foundation; either version 2 of the License, or (at your
9
 * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
10
 *
11
 * This program is distributed in the hope that it will be useful, but
12
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14
 * for more details.
15
 */
16
17
#include "socket.h"
18
19
#include <daemon.h>
20
21
/**
22
 * See header
23
 */
24
bool socket_register(plugin_t *plugin, plugin_feature_t *feature,
25
           bool reg, void *data)
26
0
{
27
0
  if (reg)
28
0
  {
29
0
    charon->socket->add_socket(charon->socket, (socket_constructor_t)data);
30
0
  }
31
0
  else
32
0
  {
33
0
    charon->socket->remove_socket(charon->socket,
34
0
                    (socket_constructor_t)data);
35
0
  }
36
  return TRUE;
37
0
}