Go to the documentation of this file.
39 #ifndef __STUMPLESS_TARGET_NETWORK_H
40 # define __STUMPLESS_TARGET_NETWORK_H
53 #define STUMPLESS_DEFAULT_TRANSPORT_PORT "514"
63 #define STUMPLESS_DEFAULT_UDP_MAX_MESSAGE_SIZE 1472
413 const char *destination,
581 const char *destination );
670 size_t max_msg_size );
struct stumpless_target * stumpless_new_tcp6_target(const char *name)
Creates a network target for logging over IPv6 and TCP, but does not open it.
enum stumpless_network_protocol stumpless_get_network_protocol(const struct stumpless_target *target)
Gets the network protocol of a network target.
@ STUMPLESS_TCP_TRANSPORT_PROTOCOL
TCP, RFC 793.
Definition: network.h:81
struct stumpless_target * stumpless_new_udp6_target(const char *name)
Creates a network target for logging over IPv6 and UDP, but does not open it.
enum stumpless_transport_protocol stumpless_get_transport_protocol(const struct stumpless_target *target)
Gets the transport protocol of a network target.
size_t stumpless_get_udp_max_message_size(const struct stumpless_target *target)
Gets the current maximum message size of a UDP network target.
const char * stumpless_get_destination(const struct stumpless_target *target)
Gets the destination of a network target.
char * name
The name of this target.
Definition: target.h:153
struct stumpless_target * stumpless_open_tcp4_target(const char *name, const char *destination)
Opens a network target for remote logging over IPv4 and TCP.
struct stumpless_target * stumpless_open_udp4_target(const char *name, const char *destination)
Opens a network target for remote logging over IPv4 and UDP.
A target that log entries can be sent to.
Definition: target.h:136
struct stumpless_target * stumpless_new_network_target(const char *name, enum stumpless_network_protocol network, enum stumpless_transport_protocol transport)
Creates a network target, but does not open it.
const char * stumpless_get_transport_port(const struct stumpless_target *target)
Gets the transport port number of a network target.
struct stumpless_target * stumpless_open_network_target(const char *name, const char *destination, enum stumpless_network_protocol network, enum stumpless_transport_protocol transport)
Opens a network target.
struct stumpless_target * stumpless_set_transport_port(struct stumpless_target *target, const char *port)
Sets the transport port number of a network target.
struct stumpless_target * stumpless_open_udp6_target(const char *name, const char *destination)
Opens a network target for remote logging over IPv6 and UDP.
struct stumpless_target * stumpless_new_tcp4_target(const char *name)
Creates a network target for logging over IPv4 and TCP, but does not open it.
struct stumpless_target * stumpless_open_tcp6_target(const char *name, const char *destination)
Opens a network target for remote logging over IPv6 and TCP.
@ STUMPLESS_IPV4_NETWORK_PROTOCOL
Internet Protocol version 4, RFC 791.
Definition: network.h:73
#define STUMPLESS_PUBLIC_FUNCTION
Marks functions that are provided for use by the library.
Definition: config.h:31
@ STUMPLESS_IPV6_NETWORK_PROTOCOL
Internet Protocl version 6, RFC 8200.
Definition: network.h:74
struct stumpless_target * stumpless_set_udp_max_message_size(struct stumpless_target *target, size_t max_msg_size)
Sets the maximum message size of a UDP network target.
stumpless_network_protocol
Network protocols used by a network target.
Definition: network.h:72
struct stumpless_target * stumpless_new_udp4_target(const char *name)
Creates a network target for logging over IPv4 and UDP, but does not open it.
stumpless_transport_protocol
Transport protocols used by a network target.
Definition: network.h:80
@ STUMPLESS_UDP_TRANSPORT_PROTOCOL
UDP, RFC 768.
Definition: network.h:82
struct stumpless_target * stumpless_set_destination(struct stumpless_target *target, const char *destination)
Sets the destination of a network target.
void stumpless_close_network_target(const struct stumpless_target *target)
Closes a network target.