LIBSSDP
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Macros
include
socket_helpers.h
Go to the documentation of this file.
1
7
#ifndef __SOCKET_HELPERS_H__
8
#define __SOCKET_HELPERS_H__
9
10
#include <sys/socket.h>
11
12
#include "
common_definitions.h
"
13
17
typedef
struct
socket_conf_s
{
19
BOOL
is_ipv6
;
21
BOOL
is_udp
;
23
BOOL
is_multicast
;
25
char
*
interface
;
27
char
*
if_ip
;
29
struct
sockaddr_storage *
sa
;
31
const
char
*
ip
;
33
int
port
;
35
BOOL
is_server
;
37
int
queue_length
;
39
BOOL
keepalive
;
41
int
ttl
;
43
BOOL
loopback
;
45
int
send_timeout
;
47
int
recv_timeout
;
48
}
socket_conf_s
;
49
58
int
set_send_timeout
(
SOCKET
sock,
int
timeout);
59
68
int
set_receive_timeout
(
SOCKET
sock,
int
timeout);
69
78
int
set_reuseaddr
(
SOCKET
sock);
79
88
int
set_reuseport
(
SOCKET
sock);
89
99
int
set_keepalive
(
SOCKET
sock,
BOOL
keepalive);
100
109
int
set_ttl
(
SOCKET
sock,
int
family,
int
ttl);
110
119
int
disable_multicast_loopback
(
SOCKET
sock,
int
family);
120
129
int
join_multicast_group
(
SOCKET
sock,
char
*multicast_group,
130
char
*interface_ip);
131
140
SOCKET
setup_socket
(
socket_conf_s
*
conf
);
141
142
#endif
/* __SOCKET_HELPERS_H__ */
setup_socket
SOCKET setup_socket(socket_conf_s *conf)
Definition:
socket_helpers.c:375
set_reuseaddr
int set_reuseaddr(SOCKET sock)
Definition:
socket_helpers.c:64
join_multicast_group
int join_multicast_group(SOCKET sock, char *multicast_group, char *interface_ip)
Definition:
socket_helpers.c:135
socket_conf_s
struct socket_conf_s socket_conf_s
SOCKET
int SOCKET
Definition:
common_definitions.h:32
socket_conf_s::recv_timeout
int recv_timeout
Definition:
socket_helpers.h:47
common_definitions.h
socket_conf_s::is_ipv6
BOOL is_ipv6
Definition:
socket_helpers.h:19
set_reuseport
int set_reuseport(SOCKET sock)
Definition:
socket_helpers.c:75
set_keepalive
int set_keepalive(SOCKET sock, BOOL keepalive)
Definition:
socket_helpers.c:93
socket_conf_s::ttl
int ttl
Definition:
socket_helpers.h:41
set_receive_timeout
int set_receive_timeout(SOCKET sock, int timeout)
Definition:
socket_helpers.c:48
socket_conf_s::port
int port
Definition:
socket_helpers.h:33
socket_conf_s::is_multicast
BOOL is_multicast
Definition:
socket_helpers.h:23
set_ttl
int set_ttl(SOCKET sock, int family, int ttl)
Definition:
socket_helpers.c:103
socket_conf_s::sa
struct sockaddr_storage * sa
Definition:
socket_helpers.h:29
socket_conf_s::interface
char * interface
Definition:
socket_helpers.h:25
socket_conf_s::if_ip
char * if_ip
Definition:
socket_helpers.h:27
socket_conf_s
Definition:
socket_helpers.h:17
set_send_timeout
int set_send_timeout(SOCKET sock, int timeout)
Definition:
socket_helpers.c:32
BOOL
int BOOL
Definition:
common_definitions.h:34
conf
static configuration_s conf
Definition:
main.c:73
socket_conf_s::is_server
BOOL is_server
Definition:
socket_helpers.h:35
socket_conf_s::queue_length
int queue_length
Definition:
socket_helpers.h:37
disable_multicast_loopback
int disable_multicast_loopback(SOCKET sock, int family)
Definition:
socket_helpers.c:118
socket_conf_s::send_timeout
int send_timeout
Definition:
socket_helpers.h:45
socket_conf_s::ip
const char * ip
Definition:
socket_helpers.h:31
socket_conf_s::keepalive
BOOL keepalive
Definition:
socket_helpers.h:39
socket_conf_s::is_udp
BOOL is_udp
Definition:
socket_helpers.h:21
socket_conf_s::loopback
BOOL loopback
Definition:
socket_helpers.h:43
Generated on Mon Jun 12 2017 08:54:20 for LIBSSDP by
1.8.8