diff --git a/src/dhcpd-pools.h b/src/dhcpd-pools.h index 183d3ae..879e5a1 100644 --- a/src/dhcpd-pools.h +++ b/src/dhcpd-pools.h @@ -75,14 +75,6 @@ union ipaddr_t { unsigned char v6[16]; }; -/*! \enum dhcpd_magic_numbers - * \brief MAXLEN is maximum expected line length in dhcpd.conf and - * dhcpd.leases. - */ -enum dhcpd_magic_numbers { - MAXLEN = 1024 -}; - /*! \enum dhcp_version * \brief The IP version, IPv4 or IPv6, served by the dhcpd. */ @@ -108,28 +100,6 @@ enum prefix_t { NUM_OF_PREFIX }; -/*! \enum output_formats - * \brief Enumeration of output formats. Keep the text and html first, they - * are used color array selector. - */ -enum output_formats { - OUT_FORM_TEXT, - OUT_FORM_HTML, - NUM_OF_OUT_FORMS -}; - -/*! \enum count_status_t - * \brief Enumeration of possible range and shared net statuses. - */ -enum count_status_t { - STATUS_OK, - STATUS_WARN, - STATUS_CRIT, - STATUS_IGNORED, - STATUS_SUPPRESSED, - COLOR_RESET -}; - enum color_mode { color_unknown, color_off, @@ -174,19 +144,6 @@ struct output_helper_t { double bup; }; -/*! \enum isc_conf_parser - * \brief Configuration file parsing state flags. - */ -enum isc_conf_parser { - ITS_NOTHING_INTERESTING, - ITS_A_RANGE_FIRST_IP, - ITS_A_RANGE_SECOND_IP, - ITS_A_SHAREDNET, - ITS_AN_INCLUDE, - ITS_A_SUBNET, - ITS_A_NETMASK -}; - /*! \enum ltype * \brief Lease state types. */ diff --git a/src/getdata.c b/src/getdata.c index d7b9bb2..850f48e 100644 --- a/src/getdata.c +++ b/src/getdata.c @@ -55,6 +55,27 @@ #include "dhcpd-pools.h" +/*! \enum dhcpd_magic_numbers + * \brief MAXLEN is maximum expected line length in dhcpd.conf and + * dhcpd.leases. + */ +enum dhcpd_magic_numbers { + MAXLEN = 1024 +}; + +/*! \enum isc_conf_parser + * \brief Configuration file parsing state flags. + */ +enum isc_conf_parser { + ITS_NOTHING_INTERESTING, + ITS_A_RANGE_FIRST_IP, + ITS_A_RANGE_SECOND_IP, + ITS_A_SHAREDNET, + ITS_AN_INCLUDE, + ITS_A_SUBNET, + ITS_A_NETMASK +}; + /*! \brief Lease file parser. The parser can only read ISC DHCPD * dhcpd.leases file format. */ int parse_leases(struct conf_t *state, const int print_mac_addreses) diff --git a/src/output.c b/src/output.c index e60aa97..9052854 100644 --- a/src/output.c +++ b/src/output.c @@ -59,6 +59,28 @@ #include "dhcpd-pools.h" +/*! \enum colored_formats + * \brief Enumeration of output formats. Keep the text and html first, they + * are used color array selector. + */ +enum colored_formats { + OUT_FORM_TEXT, + OUT_FORM_HTML, + NUM_OF_OUT_FORMS +}; + +/*! \enum count_status_t + * \brief Enumeration of possible range and shared net statuses. + */ +enum count_status_t { + STATUS_OK, + STATUS_WARN, + STATUS_CRIT, + STATUS_IGNORED, + STATUS_SUPPRESSED, + COLOR_RESET +}; + static const char *color_tags[][NUM_OF_OUT_FORMS] = { [STATUS_OK] = { "", "" }, [STATUS_WARN] = { "\033[1;33m", " style=\"color:magenta;font-style:italic\"" }, @@ -68,8 +90,6 @@ static const char *color_tags[][NUM_OF_OUT_FORMS] = { [COLOR_RESET] = { "\033[0m", "" } }; - - /*! \brief Calculate range percentages and such. */ int range_output_helper(struct conf_t *state, struct output_helper_t *oh, struct range_t *range_p)