|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
36 #define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
43 #define foreach_vpe_api_msg \
44 _(SYSLOG_SET_SENDER, syslog_set_sender) \
45 _(SYSLOG_GET_SENDER, syslog_get_sender) \
46 _(SYSLOG_SET_FILTER, syslog_set_filter) \
47 _(SYSLOG_GET_FILTER, syslog_get_filter)
58 *s = SYSLOG_SEVERITY_EMERGENCY;
61 *s = SYSLOG_SEVERITY_ALERT;
64 *s = SYSLOG_SEVERITY_CRITICAL;
67 *s = SYSLOG_SEVERITY_ERROR;
70 *s = SYSLOG_SEVERITY_WARNING;
73 *s = SYSLOG_SEVERITY_NOTICE;
76 *s = SYSLOG_SEVERITY_INFORMATIONAL;
79 *s = SYSLOG_SEVERITY_DEBUG;
82 rv = VNET_API_ERROR_INVALID_VALUE;
94 case SYSLOG_SEVERITY_EMERGENCY:
97 case SYSLOG_SEVERITY_ALERT:
100 case SYSLOG_SEVERITY_CRITICAL:
103 case SYSLOG_SEVERITY_ERROR:
106 case SYSLOG_SEVERITY_WARNING:
109 case SYSLOG_SEVERITY_NOTICE:
112 case SYSLOG_SEVERITY_INFORMATIONAL:
115 case SYSLOG_SEVERITY_DEBUG:
119 rv = VNET_API_ERROR_INVALID_VALUE;
129 vl_api_syslog_set_sender_reply_t *rmp;
170 vl_api_syslog_set_filter_reply_t *rmp;
200 #define vl_msg_name_crc_list
202 #undef vl_msg_name_crc_list
207 #define _(id,n,crc) vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id);
208 foreach_vl_msg_name_crc_syslog;
218 vl_msg_api_set_handlers(VL_API_##N, #n, \
219 vl_api_##n##_t_handler, \
221 vl_api_##n##_t_endian, \
222 vl_api_##n##_t_print, \
223 sizeof(vl_api_##n##_t), 1);
#define REPLY_MACRO2(t, body)
@ SYSLOG_API_SEVERITY_CRIT
vnet_api_error_t set_syslog_sender(ip4_address_t *collector, u16 collector_port, ip4_address_t *src, u32 vrf_id, u32 max_msg_size)
Set syslog sender configuration.
#define clib_memcpy(d, s, n)
u32 fib_table_get_table_id(u32 fib_index, fib_protocol_t proto)
Get the Table-ID of the FIB from protocol and index.
static void setup_message_id_table(api_main_t *am)
ip4_address_t src_address
IPv4 address of sender (source)
u16 collector_port[default=514]
@ SYSLOG_API_SEVERITY_DBG
static int syslog_severity_decode(vl_api_syslog_severity_t v, syslog_severity_t *s)
Get syslog sender configuration reply.
@ SYSLOG_API_SEVERITY_NOTICE
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
@ SYSLOG_API_SEVERITY_EMERG
VLIB_API_INIT_FUNCTION(syslog_api_hookup)
syslog_severity_t severity_filter
severity filter (specified severity and greater match)
vl_api_ip4_address_t src_address
static void vl_api_syslog_set_sender_t_handler(vl_api_syslog_set_sender_t *mp)
vl_api_ip4_address_t collector_address
syslog_main_t syslog_main
u16 collector_port
UDP port number of remote host (destination)
static int syslog_severity_encode(syslog_severity_t v, vl_api_syslog_severity_t *s)
vl_api_ip4_address_t collector_address
u32 max_msg_size
message size limit
@ SYSLOG_API_SEVERITY_ERR
static api_main_t * vlibapi_get_main(void)
@ SYSLOG_API_SEVERITY_WARN
static clib_error_t * syslog_api_hookup(vlib_main_t *vm)
Set syslog sender configuration.
API main structure, used by both vpp and binary API clients.
ip4_address_t collector
IPv4 address of remote host (destination)
vl_api_ip4_address_t src_address
static void vl_api_syslog_set_filter_t_handler(vl_api_syslog_set_filter_t *mp)
u32 max_msg_size[default=480]
@ SYSLOG_API_SEVERITY_ALERT
static void vl_api_syslog_get_filter_t_handler(vl_api_syslog_get_filter_t *mp)
vl_api_syslog_severity_t severity
@ SYSLOG_API_SEVERITY_INFO
Get syslog sender configuration.
u32 fib_index
FIB table index.
vl_api_syslog_severity_t severity
static void vl_api_syslog_get_sender_t_handler(vl_api_syslog_get_sender_t *mp)
#define foreach_vpe_api_msg