add local address/family to NG stats output

closes #1004

Change-Id: Iba93d9200791eaade6e6f7bc9e2b5939fadf983a
changes/79/41179/1
Richard Fuchs 6 years ago
parent 6b49c88527
commit a3b298e11c

@ -1299,8 +1299,12 @@ static void ng_stats_stream(bencode_item_t *list, const struct packet_stream *ps
dict = bencode_list_add_dictionary(list);
if (ps->selected_sfd)
if (ps->selected_sfd) {
bencode_dictionary_add_integer(dict, "local port", ps->selected_sfd->socket.local.port);
bencode_dictionary_add_string_dup(dict, "local address",
sockaddr_print_buf(&ps->selected_sfd->socket.local.address));
bencode_dictionary_add_string(dict, "family", ps->selected_sfd->socket.local.address.family->name);
}
ng_stats_endpoint(bencode_dictionary_add_dictionary(dict, "endpoint"), &ps->endpoint);
ng_stats_endpoint(bencode_dictionary_add_dictionary(dict, "advertised endpoint"),
&ps->advertised_endpoint);

Loading…
Cancel
Save