X-Git-Url: http://git.asbjorn.biz/?p=debian%2Fdhcpd-pools.git;a=blobdiff_plain;f=src%2Foutput.c;fp=src%2Foutput.c;h=874efa4edb6fcacc2482f194da1f63ca5f701fdc;hp=657af88462c7baa82752be37b3def4906f9015e6;hb=171ff1d7045de1059556f674470aa87a853563f0;hpb=17429ef85bfb4bdf51f4a659443fe4c31c972928 diff --git a/src/output.c b/src/output.c index 657af88..874efa4 100644 --- a/src/output.c +++ b/src/output.c @@ -190,6 +190,7 @@ int output_xml(void) struct in_addr first, last; struct range_t *range_p; struct shared_network_t *shared_p; + struct macaddr_t *macaddr_p; int ret; FILE *outfile; @@ -206,13 +207,22 @@ int output_xml(void) range_p = ranges; shared_p = shared_networks; + fprintf(outfile, "\n"); + + if (macaddr != NULL) { + for (macaddr_p = macaddr; macaddr_p->next != NULL; + macaddr_p = macaddr_p->next) { + fprintf(outfile, + "\n\t%s\n\t%s\n\n", + macaddr_p->ip, macaddr_p->ethernet); + } + } + if (config.output_limit[1] & output_limit_bit_1) { for (i = 0; i < num_ranges; i++) { first.s_addr = ntohl(range_p->first_ip + 1); last.s_addr = ntohl(range_p->last_ip - 1); - fprintf(outfile, "\n"); - if (range_p->shared_net) { fprintf(outfile, "\t%s\n", @@ -235,9 +245,7 @@ int output_xml(void) fprintf(outfile, "\t%lu\n", range_p->last_ip - range_p->first_ip - 1 - range_p->count); - range_p++; - fprintf(outfile, "\n"); } } @@ -245,7 +253,6 @@ int output_xml(void) if (config.output_limit[1] & output_limit_bit_2) { for (i = 0; i < num_shared_networks; i++) { shared_p++; - fprintf(outfile, "\n"); fprintf(outfile, "\t%s\n", shared_p->name); @@ -273,6 +280,7 @@ int output_xml(void) fprintf(outfile, "\n"); } + fprintf(outfile, "\n"); if (outfile == stdout) { ret = fflush(stdout); if (ret) { @@ -355,7 +363,6 @@ void html_footer(FILE * f) fprintf(f, "

\nData generated by "); fprintf(f, "", PACKAGE_URL); fprintf(f, "dhcpd-pools.\n

\n"); - fprintf(f, "

\n"); fprintf(f, "