dhcpd-pools  2.28
ISC dhcpd lease usage analyser
Functions
output.c File Reference

All about output formats. More...

#include <config.h>
#include <arpa/inet.h>
#include <errno.h>
#include <inttypes.h>
#include <langinfo.h>
#include <math.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <time.h>
#include "close-stream.h"
#include "error.h"
#include "progname.h"
#include "strftime.h"
#include "dhcpd-pools.h"
Include dependency graph for output.c:

Functions

int output_txt (void)
 Text output format, which is the default. More...
 
int output_xml (void)
 The xml output formats. More...
 
int output_json (void)
 The json output formats. More...
 
static void html_header (FILE *restrict f)
 Header for full html output format. More...
 
static void html_footer (FILE *restrict f)
 Footer for full html output format. More...
 
static void start_tag (FILE *restrict f, char const *restrict tag)
 Start a html tag. More...
 
static void end_tag (FILE *restrict f, char const *restrict tag)
 End a html tag. More...
 
static void output_line (FILE *restrict f, char const *restrict type, char const *restrict text)
 Line with text in html output format. More...
 
static void output_double (FILE *restrict f, char const *restrict type, double d)
 Line with digit in html output format. More...
 
static void output_float (FILE *restrict f, char const *restrict type, float fl)
 Line with float in html output format. More...
 
static void table_start (FILE *restrict f, char const *restrict id, char const *restrict summary)
 Begin table in html output format. More...
 
static void table_end (FILE *restrict f)
 End table in html output format. More...
 
static void newsection (FILE *restrict f, char const *restrict title)
 New section in html output format. More...
 
int output_html (void)
 Output html format. More...
 
int output_csv (void)
 Output cvs format. More...
 
int output_alarming (void)
 Output alarm text, and return program exit value. More...
 

Detailed Description

All about output formats.

Function Documentation

static void end_tag ( FILE *restrict  f,
char const *restrict  tag 
)
static

End a html tag.

Parameters
fOutput file descriptor.
tagThe html tag.

Referenced by output_html().

static void html_footer ( FILE *restrict  f)
static

Footer for full html output format.

Parameters
fOutput file descriptor.

Referenced by output_html().

static void html_header ( FILE *restrict  f)
static

Header for full html output format.

Parameters
fOutput file descriptor.

Referenced by output_html().

Here is the call graph for this function:

static void newsection ( FILE *restrict  f,
char const *restrict  title 
)
static

New section in html output format.

Parameters
fOutput file descriptor.
titleTable title.

Referenced by output_html().

Here is the call graph for this function:

int output_alarming ( void  )

Output alarm text, and return program exit value.

Referenced by main().

Here is the call graph for this function:

int output_csv ( void  )

Output cvs format.

Referenced by main().

Here is the call graph for this function:

static void output_double ( FILE *restrict  f,
char const *restrict  type,
double  d 
)
static

Line with digit in html output format.

Parameters
fOutput file descriptor.
typeHMTL tag name.
dActual payload of the printout.

Referenced by output_html().

static void output_float ( FILE *restrict  f,
char const *restrict  type,
float  fl 
)
static

Line with float in html output format.

Parameters
fOutput file descriptor.
typeHTML tag name.
flActual payload of the printout.

Referenced by output_html().

int output_html ( void  )

Output html format.

Referenced by main().

Here is the call graph for this function:

int output_json ( void  )

The json output formats.

Referenced by main().

Here is the call graph for this function:

static void output_line ( FILE *restrict  f,
char const *restrict  type,
char const *restrict  text 
)
static

Line with text in html output format.

Parameters
fOutput file descriptor.
typeHTML tag name.
classHow the data is aligned.
textActual payload of the printout.

Referenced by newsection(), and output_html().

int output_txt ( void  )

Text output format, which is the default.

Referenced by main().

Here is the call graph for this function:

int output_xml ( void  )

The xml output formats.

Referenced by main().

Here is the call graph for this function:

static void start_tag ( FILE *restrict  f,
char const *restrict  tag 
)
static

Start a html tag.

Parameters
fOutput file descriptor.
tagThe html tag.

Referenced by output_html().

static void table_end ( FILE *restrict  f)
static

End table in html output format.

Parameters
fOutput file descriptor.

Referenced by output_html().

static void table_start ( FILE *restrict  f,
char const *restrict  id,
char const *restrict  summary 
)
static

Begin table in html output format.

Parameters
fOutput file descriptor.

Referenced by output_html().