Defines | Functions

firewalladmin.c File Reference

Functions for managing firewall profiles. More...

#include <string.h>
#include <unistd.h>
#include <assert.h>
#include <libxml/tree.h>
#include <sqlite3.h>
#include <eurephia_nullsafe.h>
#include <eurephia_context.h>
#include <eurephia_log.h>
#include <eurephia_xml.h>
#include <eurephia_values.h>
#include <eurephiadb_session_struct.h>
#include <eurephiadb_mapping.h>
#include <passwd.h>
#include "../sqlite.h"
#include "../fieldmapping.h"
Include dependency graph for firewalladmin.c:

Go to the source code of this file.

Functions

xmlDoc * fwadmin_search (eurephiaCTX *ctx, eDBfieldMap *fmap)
xmlDoc * fwadmin_add (eurephiaCTX *ctx, eDBfieldMap *fmap)
xmlDoc * fwadmin_delete (eurephiaCTX *ctx, eDBfieldMap *fmap)
xmlDoc * eDBadminFirewallProfiles (eurephiaCTX *ctx, xmlDoc *xmlqry)

Detailed Description

Functions for managing firewall profiles.

Author:
David Sommerseth <dazo@users.sourceforge.net>
Date:
2009-03-28

Definition in file firewalladmin.c.


Function Documentation

xmlDoc* eDBadminFirewallProfiles ( eurephiaCTX ctx,
xmlDoc *  xmlqry 
)

Query or modify the firewall access profiles.

Version:
API version level 2
Parameters:
ctx eurephiaCTX
xmlqry XML document with the operation and information.

The XML format skeleton

    <eurephia format="1">
        <firewall_profiles mode="{search|add|delete}">
            <fieldMapping table="fwprofiles">
               <{field name}>{search value}</{field name}>
            </fieldMapping>
        </firewall_profiles>
    </eurephia>

It can be several field name tags to narrow the search even more. For the add mode, the fw_profile field name tag must be present.

Returns:
Returns a valid XML document with the result on success, otherwise either NULL or an XML error document is returned.
See also:
eurephiaXML_CreateDoc(), eurephiaXML_getRoot()

< Messages intended when debugging. Only for log level > 10

< The context is used via the eurephiadm console utility

< The context is used via a web based utility

< Alias for LOG_CRITICAL

< Operation failed and might have been aborted. Log level always 0

< Alias for LOG_CRITICAL

< Operation failed and might have been aborted. Log level always 0

< Alias for LOG_ERROR, in case it is not defined

< API errors but not sever, program can continue to run

< Alias for LOG_ERROR, in case it is not defined

< API errors but not sever, program can continue to run

< Alias for LOG_ERROR, in case it is not defined

< API errors but not sever, program can continue to run

Definition at line 245 of file firewalladmin.c.

Here is the call graph for this function:

xmlDoc* fwadmin_add ( eurephiaCTX ctx,
eDBfieldMap fmap 
)

Internal function. Registers a new firewall profile

Parameters:
ctx eurephiaCTX
fmap eDBfieldMap containing information about the new profile
Returns:
Returns an eurephia ResultMsg XML document, with success message or an error message

< Alias for LOG_FATAL

< Operation failed and cannot continue. Log level always < 2

Definition at line 153 of file firewalladmin.c.

Here is the call graph for this function:

Here is the caller graph for this function:

xmlDoc* fwadmin_delete ( eurephiaCTX ctx,
eDBfieldMap fmap 
)

Internal function. Deletes firewall profile(s) from the database

Parameters:
ctx eurephiaCTX
fmap eDBfieldMap containing information about the profile(s) to be deleted
Returns:
Returns an eurephia ResultMsg XML document, with success message or an error message

< Special field, should be used to indicate primary key of the table

< Alias for LOG_FATAL

< Operation failed and cannot continue. Log level always < 2

< Alias for LOG_FATAL

< Operation failed and cannot continue. Log level always < 2

< Alias for LOG_FATAL

< Operation failed and cannot continue. Log level always < 2

Definition at line 187 of file firewalladmin.c.

Here is the call graph for this function:

Here is the caller graph for this function:

xmlDoc* fwadmin_search ( eurephiaCTX ctx,
eDBfieldMap fmap 
)

Internal function. Queries the database for a list of user-certificate links

Parameters:
ctx eurephiaCTX
fmap eDBfieldMap containing the search criteria
Returns:
Returns a valid eurephia XML document on success, otherwise NULL

< Alias for LOG_ERROR, in case it is not defined

< API errors but not sever, program can continue to run

Definition at line 62 of file firewalladmin.c.

Here is the call graph for this function:

Here is the caller graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines