39#ifndef __STUMPLESS_TARGET_NETWORK_H
40# define __STUMPLESS_TARGET_NETWORK_H
43# include <stumpless/config.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 );
#define STUMPLESS_PUBLIC_FUNCTION
Marks functions that are provided for use by the library.
Definition config.h:31
STUMPLESS_PUBLIC_FUNCTION struct stumpless_target * stumpless_open_udp6_target(const char *name, const char *destination)
Opens a network target for remote logging over IPv6 and UDP.
STUMPLESS_PUBLIC_FUNCTION void stumpless_close_network_target(const struct stumpless_target *target)
Closes a network target.
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
@ STUMPLESS_TCP_TRANSPORT_PROTOCOL
TCP, RFC 793.
Definition network.h:81
STUMPLESS_PUBLIC_FUNCTION 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.
STUMPLESS_PUBLIC_FUNCTION size_t stumpless_get_udp_max_message_size(const struct stumpless_target *target)
Gets the current maximum message size of a UDP network target.
STUMPLESS_PUBLIC_FUNCTION enum stumpless_network_protocol stumpless_get_network_protocol(const struct stumpless_target *target)
Gets the network protocol of a network target.
STUMPLESS_PUBLIC_FUNCTION struct stumpless_target * stumpless_open_udp4_target(const char *name, const char *destination)
Opens a network target for remote logging over IPv4 and UDP.
STUMPLESS_PUBLIC_FUNCTION struct stumpless_target * stumpless_set_transport_port(struct stumpless_target *target, const char *port)
Sets the transport port number of a network target.
STUMPLESS_PUBLIC_FUNCTION const char * stumpless_get_transport_port(const struct stumpless_target *target)
Gets the transport port number of a network target.
STUMPLESS_PUBLIC_FUNCTION 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.
STUMPLESS_PUBLIC_FUNCTION const char * stumpless_get_destination(const struct stumpless_target *target)
Gets the destination of a network target.
STUMPLESS_PUBLIC_FUNCTION struct stumpless_target * stumpless_open_tcp4_target(const char *name, const char *destination)
Opens a network target for remote logging over IPv4 and TCP.
STUMPLESS_PUBLIC_FUNCTION 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.
STUMPLESS_PUBLIC_FUNCTION struct stumpless_target * stumpless_set_destination(struct stumpless_target *target, const char *destination)
Sets the destination of a network target.
stumpless_network_protocol
Network protocols used by a network target.
Definition network.h:72
@ STUMPLESS_IPV6_NETWORK_PROTOCOL
Internet Protocl version 6, RFC 8200.
Definition network.h:74
@ STUMPLESS_IPV4_NETWORK_PROTOCOL
Internet Protocol version 4, RFC 791.
Definition network.h:73
STUMPLESS_PUBLIC_FUNCTION enum stumpless_transport_protocol stumpless_get_transport_protocol(const struct stumpless_target *target)
Gets the transport protocol of a network target.
STUMPLESS_PUBLIC_FUNCTION 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_PUBLIC_FUNCTION 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.
STUMPLESS_PUBLIC_FUNCTION 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.
STUMPLESS_PUBLIC_FUNCTION 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_PUBLIC_FUNCTION struct stumpless_target * stumpless_open_tcp6_target(const char *name, const char *destination)
Opens a network target for remote logging over IPv6 and TCP.
A target that log entries can be sent to.
Definition target.h:140
char * name
The name of this target.
Definition target.h:157
General types and functions for working with all targets.