28 #define NAT_FACILITY SYSLOG_FACILITY_LOCAL0 30 #define NAT_APPNAME "NAT" 32 #define SADD_SDEL_SEVERITY SYSLOG_SEVERITY_INFORMATIONAL 33 #define APMADD_APMDEL_SEVERITY SYSLOG_SEVERITY_INFORMATIONAL 35 #define SADD_MSGID "SADD" 36 #define SDEL_MSGID "SDEL" 37 #define APMADD_MSGID "APMADD" 38 #define APMDEL_MSGID "APMDEL" 40 #define NSESS_SDID "nsess" 41 #define NAPMAP_SDID "napmap" 43 #define SSUBIX_SDPARAM_NAME "SSUBIX" 44 #define SVLAN_SDPARAM_NAME "SVLAN" 45 #define IATYP_SDPARAM_NAME "IATYP" 46 #define ISADDR_SDPARAM_NAME "ISADDR" 47 #define ISPORT_SDPARAM_NAME "ISPORT" 48 #define IDADDR_SDPARAM_NAME "IDADDR" 49 #define IDPORT_SDPARAM_NAME "IDPORT" 50 #define XATYP_SDPARAM_NAME "XATYP" 51 #define XSADDR_SDPARAM_NAME "XSADDR" 52 #define XSPORT_SDPARAM_NAME "XSPORT" 53 #define XDADDR_SDPARAM_NAME "XDADDR" 54 #define XDPORT_SDPARAM_NAME "XDPORT" 55 #define PROTO_SDPARAM_NAME "PROTO" 56 #define SV6ENC_SDPARAM_NAME "SV6ENC" 58 #define IATYP_IPV4 "IPv4" 59 #define IATYP_IPV6 "IPv6" 96 clib_net_to_host_u16 (isport));
101 clib_net_to_host_u16 (xsport));
175 clib_net_to_host_u16 (isport));
180 clib_net_to_host_u16 (xsport));
186 clib_net_to_host_u16 (xdport));
192 clib_net_to_host_u16 (idport));
206 idaddr, idport, xdaddr, xdport, proto, 1,
218 idaddr, idport, xdaddr, xdport, proto, 0,
249 clib_net_to_host_u16 (isport));
254 clib_net_to_host_u16 (xsport));
259 clib_net_to_host_u16 (xdport));
#define XSADDR_SDPARAM_NAME
void nat_syslog_nat64_sdel(u32 sfibix, ip6_address_t *isaddr, u16 isport, ip4_address_t *xsaddr, u16 xsport, ip4_address_t *xdaddr, u16 xdport, snat_protocol_t proto)
void nat_syslog_nat44_sdel(u32 ssubix, u32 sfibix, ip4_address_t *isaddr, u16 isport, ip4_address_t *idaddr, u16 idport, ip4_address_t *xsaddr, u16 xsport, ip4_address_t *xdaddr, u16 xdport, snat_protocol_t proto, u8 is_twicenat)
#define SSUBIX_SDPARAM_NAME
#define APMADD_APMDEL_SEVERITY
#define IDPORT_SDPARAM_NAME
#define XSPORT_SDPARAM_NAME
int syslog_msg_send(syslog_msg_t *syslog_msg)
Send syslog message.
#define SVLAN_SDPARAM_NAME
#define XDPORT_SDPARAM_NAME
#define XDADDR_SDPARAM_NAME
void nat_syslog_dslite_apmadd(u32 ssubix, ip6_address_t *sv6enc, ip4_address_t *isaddr, u16 isport, ip4_address_t *xsaddr, u16 xsport, snat_protocol_t proto)
void nat_syslog_nat64_sadd(u32 sfibix, ip6_address_t *isaddr, u16 isport, ip4_address_t *xsaddr, u16 xsport, ip4_address_t *xdaddr, u16 xdport, snat_protocol_t proto)
void nat_syslog_nat44_sadd(u32 ssubix, u32 sfibix, ip4_address_t *isaddr, u16 isport, ip4_address_t *idaddr, u16 idport, ip4_address_t *xsaddr, u16 xsport, ip4_address_t *xdaddr, u16 xdport, snat_protocol_t proto, u8 is_twicenat)
void nat_syslog_nat44_apmadd(u32 ssubix, u32 sfibix, ip4_address_t *isaddr, u16 isport, ip4_address_t *xsaddr, u16 xsport, snat_protocol_t proto)
void syslog_msg_sd_init(syslog_msg_t *syslog_msg, char *sd_id)
Initialize structured data element.
static void nat_syslog_nat44_apmap(u32 ssubix, u32 sfibix, ip4_address_t *isaddr, u16 isport, ip4_address_t *xsaddr, u16 xsport, snat_protocol_t proto, u8 is_add, ip6_address_t *sv6enc)
#define SV6ENC_SDPARAM_NAME
static u8 snat_proto_to_ip_proto(snat_protocol_t snat_proto)
u32 ft_table_id
Table ID (hash key) for this FIB.
#define XATYP_SDPARAM_NAME
#define SADD_SDEL_SEVERITY
#define ISADDR_SDPARAM_NAME
static void nat_syslog_nat64_sess(u32 sfibix, ip6_address_t *isaddr, u16 isport, ip4_address_t *xsaddr, u16 xsport, ip4_address_t *xdaddr, u16 xdport, snat_protocol_t proto, u8 is_add)
void syslog_msg_init(syslog_msg_t *syslog_msg, syslog_facility_t facility, syslog_severity_t severity, char *app_name, char *msgid)
Initialize syslog message header.
#define IDADDR_SDPARAM_NAME
void nat_syslog_nat44_apmdel(u32 ssubix, u32 sfibix, ip4_address_t *isaddr, u16 isport, ip4_address_t *xsaddr, u16 xsport, snat_protocol_t proto)
static void nat_syslog_nat44_sess(u32 ssubix, u32 sfibix, ip4_address_t *isaddr, u16 isport, ip4_address_t *xsaddr, u16 xsport, ip4_address_t *idaddr, u16 idport, ip4_address_t *xdaddr, u16 xdport, snat_protocol_t proto, u8 is_add, u8 is_twicenat)
#define PROTO_SDPARAM_NAME
fib_table_t * fib_table_get(fib_node_index_t index, fib_protocol_t proto)
Get a pointer to a FIB table.
#define ISPORT_SDPARAM_NAME
void syslog_msg_add_sd_param(syslog_msg_t *syslog_msg, char *name, char *fmt,...)
Add structured data elemnt parameter name-value pair RFC5424 6.3.3.
void nat_syslog_dslite_apmdel(u32 ssubix, ip6_address_t *sv6enc, ip4_address_t *isaddr, u16 isport, ip4_address_t *xsaddr, u16 xsport, snat_protocol_t proto)
static int syslog_severity_filter_block(syslog_severity_t s)
Severity filter test.
static int syslog_is_enabled(void)
Check if syslog logging is enabled.
#define IATYP_SDPARAM_NAME
vl_api_fib_path_nh_proto_t proto
A protocol Independent FIB table.