26 RCSIDH(protocol_h,
"$Id: 3fd4b0bb6f2073207110cdfaa30615258ca50443 $")
32 #include <freeradius-devel/io/base.h>
34 #include <freeradius-devel/server/dl_module.h>
35 #include <freeradius-devel/server/listen.h>
42 #ifdef WITH_IFINDEX_NAME_RESOLUTION
43 char if_name[IFNAMSIZ];
51 #ifdef WITH_IFINDEX_NAME_RESOLUTION
55 received ?
"Received" :
"Sent",
58 packet->src_ipaddr.af == AF_INET6 ?
"[" :
"",
60 packet->src_ipaddr.af == AF_INET6 ?
"]" :
"",
62 packet->dst_ipaddr.af == AF_INET6 ?
"[" :
"",
64 packet->dst_ipaddr.af == AF_INET6 ?
"]" :
"",
66 #ifdef WITH_IFINDEX_NAME_RESOLUTION
67 packet->ifindex ?
"via " :
"",
68 packet->ifindex ? fr_ifname_from_ifindex(if_name, packet->ifindex) :
"",
69 packet->ifindex ?
" " :
"",
73 if (received || request->parent) {
void log_request_proto_pair_list(fr_log_lvl_t lvl, request_t *request, fr_pair_t const *parent, fr_pair_list_t const *vps, char const *prefix)
Print a list of protocol fr_pair_ts.
void log_request(fr_log_type_t type, fr_log_lvl_t lvl, request_t *request, char const *file, int line, char const *fmt,...)
Marshal variadic log arguments into a va_list and pass to normal logging functions.
void log_request_pair_list(fr_log_lvl_t lvl, request_t *request, fr_pair_t const *parent, fr_pair_list_t const *vps, char const *prefix)
Print a fr_pair_list_t.
@ L_DBG_LVL_1
Highest priority debug messages (-x).
@ L_DBG
Only displayed when debugging is enabled.
void common_packet_debug(request_t *request, fr_packet_t *packet, fr_pair_list_t *pairs, bool received)
unsigned int code
Packet code (type).
int id
Packet ID (used to link requests/responses).
size_t data_len
Length of packet data.
#define fr_box_ipaddr(_val)