Skip to content

Distinguish ipv4 and ipv6 in XML output #808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/out-xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ xml_out_status(struct Output *out, FILE *fp, time_t timestamp, int status,

UNUSEDPARM(out);
fprintf(fp, "<host endtime=\"%u\">"
"<address addr=\"%s\" addrtype=\"ipv4\"/>"
"<address addr=\"%s\" addrtype=\"%s\"/>"
"<ports>"
"<port protocol=\"%s\" portid=\"%u\">"
"<state state=\"%s\" reason=\"%s\" reason_ttl=\"%u\"/>"
Expand All @@ -81,6 +81,7 @@ xml_out_status(struct Output *out, FILE *fp, time_t timestamp, int status,
"\r\n",
(unsigned)timestamp,
fmt.string,
ip.version == 6 ? "ipv6" : "ipv4",
name_from_ip_proto(ip_proto),
port,
status_string(status),
Expand Down