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.
定义 config.h:31
stumpless_transport_protocol
Transport protocols used by a network target.
定义 network.h:80
@ STUMPLESS_UDP_TRANSPORT_PROTOCOL
UDP, RFC 768
定义 network.h:82
@ STUMPLESS_TCP_TRANSPORT_PROTOCOL
TCP, RFC 793
定义 network.h:81
struct stumpless_target * stumpless_open_udp4_target(const char *name, const char *destination)
Opens a network target for remote logging over IPv4 and UDP.
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_new_udp4_target(const char *name)
Creates a network target for logging over IPv4 and UDP, but does not open it.
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.
struct stumpless_target * stumpless_open_udp6_target(const char *name, const char *destination)
Opens a network target for remote logging over IPv6 and UDP.
enum stumpless_transport_protocol stumpless_get_transport_protocol(const struct stumpless_target *target)
Gets the transport protocol of a network target.
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.
const char * stumpless_get_transport_port(const struct stumpless_target *target)
Gets the transport port number of a network target.
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.
enum stumpless_network_protocol stumpless_get_network_protocol(const struct stumpless_target *target)
Gets the network protocol of a network target.
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.
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_network_protocol
Network protocols used by a network target.
定义 network.h:72
@ STUMPLESS_IPV6_NETWORK_PROTOCOL
Internet Protocl version 6, RFC 8200
定义 network.h:74
@ STUMPLESS_IPV4_NETWORK_PROTOCOL
Internet Protocol version 4, RFC 791
定义 network.h:73
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.
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.
struct stumpless_target * stumpless_open_tcp6_target(const char *name, const char *destination)
Opens a network target for remote logging over IPv6 and TCP.
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_tcp4_target(const char *name, const char *destination)
Opens a network target for remote logging over IPv4 and TCP.
A target that log entries can be sent to.
定义 target.h:140
char * name
The name of this target.
定义 target.h:157
General types and functions for working with all targets.