|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
26 #define NAT_FACILITY SYSLOG_FACILITY_LOCAL0
28 #define NAT_APPNAME "NAT"
30 #define SADD_SDEL_SEVERITY SYSLOG_SEVERITY_INFORMATIONAL
31 #define APMADD_APMDEL_SEVERITY SYSLOG_SEVERITY_INFORMATIONAL
33 #define SADD_MSGID "SADD"
34 #define SDEL_MSGID "SDEL"
35 #define APMADD_MSGID "APMADD"
36 #define APMDEL_MSGID "APMDEL"
38 #define NSESS_SDID "nsess"
39 #define NAPMAP_SDID "napmap"
41 #define SSUBIX_SDPARAM_NAME "SSUBIX"
42 #define SVLAN_SDPARAM_NAME "SVLAN"
43 #define IATYP_SDPARAM_NAME "IATYP"
44 #define ISADDR_SDPARAM_NAME "ISADDR"
45 #define ISPORT_SDPARAM_NAME "ISPORT"
46 #define IDADDR_SDPARAM_NAME "IDADDR"
47 #define IDPORT_SDPARAM_NAME "IDPORT"
48 #define XATYP_SDPARAM_NAME "XATYP"
49 #define XSADDR_SDPARAM_NAME "XSADDR"
50 #define XSPORT_SDPARAM_NAME "XSPORT"
51 #define XDADDR_SDPARAM_NAME "XDADDR"
52 #define XDPORT_SDPARAM_NAME "XDPORT"
53 #define PROTO_SDPARAM_NAME "PROTO"
54 #define SV6ENC_SDPARAM_NAME "SV6ENC"
56 #define IATYP_IPV4 "IPv4"
57 #define IATYP_IPV6 "IPv6"
63 ip6_address_t * sv6enc)
94 clib_net_to_host_u16 (isport));
99 clib_net_to_host_u16 (xsport));
173 clib_net_to_host_u16 (isport));
178 clib_net_to_host_u16 (xsport));
184 clib_net_to_host_u16 (xdport));
190 clib_net_to_host_u16 (idport));
204 idaddr, idport, xdaddr, xdport,
proto, 1,
216 idaddr, idport, xdaddr, xdport,
proto, 0,
247 clib_net_to_host_u16 (isport));
252 clib_net_to_host_u16 (xsport));
257 clib_net_to_host_u16 (xdport));
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, nat_protocol_t proto, u8 is_add, u8 is_twicenat)
#define SSUBIX_SDPARAM_NAME
#define ISADDR_SDPARAM_NAME
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, nat_protocol_t proto)
#define IDADDR_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, nat_protocol_t proto)
#define SADD_SDEL_SEVERITY
#define ISPORT_SDPARAM_NAME
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.
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, nat_protocol_t proto, u8 is_add)
A protocol Independent FIB table.
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, nat_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, nat_protocol_t proto)
u32 ft_table_id
Table ID (hash key) for this FIB.
#define IATYP_SDPARAM_NAME
static_always_inline u8 nat_proto_to_ip_proto(nat_protocol_t nat_proto)
static int syslog_severity_filter_block(syslog_severity_t s)
Severity filter test.
void nat_syslog_dslite_apmdel(u32 ssubix, ip6_address_t *sv6enc, ip4_address_t *isaddr, u16 isport, ip4_address_t *xsaddr, u16 xsport, nat_protocol_t proto)
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, nat_protocol_t proto)
#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.
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.
#define SVLAN_SDPARAM_NAME
static int syslog_is_enabled(void)
Check if syslog logging is enabled.
void nat_syslog_nat44_apmdel(u32 ssubix, u32 sfibix, ip4_address_t *isaddr, u16 isport, ip4_address_t *xsaddr, u16 xsport, nat_protocol_t proto)
#define XSPORT_SDPARAM_NAME
void syslog_msg_sd_init(syslog_msg_t *syslog_msg, char *sd_id)
Initialize structured data element.
#define XDPORT_SDPARAM_NAME
#define XDADDR_SDPARAM_NAME
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, nat_protocol_t proto, u8 is_twicenat)
#define XSADDR_SDPARAM_NAME
int syslog_msg_send(syslog_msg_t *syslog_msg)
Send syslog message.
static void nat_syslog_nat44_apmap(u32 ssubix, u32 sfibix, ip4_address_t *isaddr, u16 isport, ip4_address_t *xsaddr, u16 xsport, nat_protocol_t proto, u8 is_add, ip6_address_t *sv6enc)
#define APMADD_APMDEL_SEVERITY
#define SV6ENC_SDPARAM_NAME
#define IDPORT_SDPARAM_NAME
#define XATYP_SDPARAM_NAME