[Aggregator] Fix request display
This commit is contained in:
parent
603293c5f9
commit
c158d87b5a
|
@ -451,11 +451,6 @@ int read_loop(int sockfd)
|
||||||
struct sockaddr_in client; // UDP client structure
|
struct sockaddr_in client; // UDP client structure
|
||||||
socklen_t client_len = sizeof(client) ; // Size of clients
|
socklen_t client_len = sizeof(client) ; // Size of clients
|
||||||
owl_captured_request request ; // Message read on the socket
|
owl_captured_request request ; // Message read on the socket
|
||||||
char // Return values of
|
|
||||||
mobile_ip_str[INET_ADDRSTRLEN], // inet_ntop()
|
|
||||||
// and owl_timestamp_to_string():
|
|
||||||
request_time_str[OWL_TIMESTAMP_STRLEN],
|
|
||||||
start_time_str[OWL_TIMESTAMP_STRLEN] ;
|
|
||||||
|
|
||||||
while (owl_run)
|
while (owl_run)
|
||||||
{
|
{
|
||||||
|
@ -481,11 +476,24 @@ int read_loop(int sockfd)
|
||||||
|
|
||||||
if (VERBOSE_REQUESTS)
|
if (VERBOSE_REQUESTS)
|
||||||
{
|
{
|
||||||
|
char // Return values of
|
||||||
|
mobile_ip_str[INET_ADDRSTRLEN], // inet_ntop()
|
||||||
|
// and owl_timestamp_to_string():
|
||||||
|
request_time_str[OWL_TIMESTAMP_STRLEN],
|
||||||
|
start_time_str[OWL_TIMESTAMP_STRLEN],
|
||||||
|
ap_mac_addr_str[OWL_ETHER_ADDR_STRLEN],
|
||||||
|
mobile_mac_addr_str[OWL_ETHER_ADDR_STRLEN] ;
|
||||||
|
|
||||||
inet_ntop(AF_INET, &request.mobile_ip_addr_bytes,
|
inet_ntop(AF_INET, &request.mobile_ip_addr_bytes,
|
||||||
mobile_ip_str, INET_ADDRSTRLEN) ;
|
mobile_ip_str, INET_ADDRSTRLEN) ;
|
||||||
owl_timestamp_to_string(request_time_str,
|
owl_timestamp_to_string(request_time_str,
|
||||||
request.request_time) ;
|
request.request_time) ;
|
||||||
owl_timestamp_to_string(start_time_str, request.start_time) ;
|
owl_timestamp_to_string(start_time_str, request.start_time) ;
|
||||||
|
owl_mac_bytes_to_string_r(request.ap_mac_addr_bytes,
|
||||||
|
ap_mac_addr_str) ;
|
||||||
|
owl_mac_bytes_to_string_r(request.mobile_mac_addr_bytes,
|
||||||
|
mobile_mac_addr_str) ;
|
||||||
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"\n"
|
"\n"
|
||||||
"*** Request received from AP ***\n"
|
"*** Request received from AP ***\n"
|
||||||
|
@ -502,8 +510,8 @@ int read_loop(int sockfd)
|
||||||
"\tDirection: %"PRIu8"\n"
|
"\tDirection: %"PRIu8"\n"
|
||||||
,
|
,
|
||||||
request.type,
|
request.type,
|
||||||
owl_mac_bytes_to_string(request.ap_mac_addr_bytes),
|
ap_mac_addr_str,
|
||||||
owl_mac_bytes_to_string(request.mobile_mac_addr_bytes),
|
mobile_mac_addr_str,
|
||||||
mobile_ip_str,
|
mobile_ip_str,
|
||||||
request_time_str,
|
request_time_str,
|
||||||
start_time_str,
|
start_time_str,
|
||||||
|
|
Loading…
Reference in New Issue