int addon_log_xml_init(struct addon_plugin *a) {

    struct output_log_xml_priv *priv = log_xml_init();
    if (!priv)
        return POM_ERR;

    addon_plugin_set_priv(a, priv);

    if (addon_plugin_add_param(a, "filename", "log.xml", priv->p_filename) != POM_OK)
        goto err;

    return POM_OK;

err:
    output_log_xml_cleanup(priv);
    return POM_ERR;

}
Beispiel #2
0
int addon_tap_init(struct addon_plugin *a) {

	struct output_tap_priv *priv = tap_init();
	if (!priv)
		return POM_ERR;

	addon_plugin_set_priv(a, priv);

	if (addon_plugin_add_param(a, "ifname", "pom0", priv->p_ifname) != POM_OK)
		goto err;

	if (addon_plugin_add_param(a, "persistent", "no", priv->p_persistent) != POM_OK)
		goto err;

	return POM_OK;

err:
	output_tap_cleanup(priv);

	return POM_ERR;
}