Defines | Functions

eurephiafw.h File Reference

Takes care of loading the configured firewall driver and provides a generic API for updating the firewall rules. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define FWRULE_ADD   0x101
#define FWRULE_DELETE   0x102
#define FWRULE_BLACKLIST   0x103

Functions

int eFW_load (eurephiaCTX *ctx, const char *intf)
int eFW_unload (eurephiaCTX *ctx)
void eFW_StartFirewall (eurephiaCTX *ctx)
void eFW_StopFirewall (eurephiaCTX *ctx)
int eFW_UpdateFirewall (eurephiaCTX *ctx, int mode, const char *macaddr, const char *fwdest, const char *fwprofile)

Detailed Description

Takes care of loading the configured firewall driver and provides a generic API for updating the firewall rules.

Author:
David Sommerseth <dazo@users.sourceforge.net>
Date:
2008-08-10

Definition in file eurephiafw.h.


Define Documentation

#define FWRULE_ADD   0x101

Add a new firewall rule

Definition at line 35 of file eurephiafw.h.

#define FWRULE_BLACKLIST   0x103

Blacklist an IP address in the firewall

Definition at line 37 of file eurephiafw.h.

#define FWRULE_DELETE   0x102

Delete an existing firewall rule

Definition at line 36 of file eurephiafw.h.


Function Documentation

int eFW_load ( eurephiaCTX ctx,
const char *  intf 
)

Loads the given firewall driver/interface

Parameters:
ctx eurephiaCTX
intf full path to the firewall interface
Returns:
Returns 1 on success, otherwise 0.

< Alias for LOG_FATAL

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

< Informational messages. Log level should be < 5

< 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

< Informational messages. Log level should be < 5

< Input data or processing revealed unexpected data. Log level never > 2

< Alias for LOG_FATAL

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

Definition at line 86 of file eurephiafw.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void eFW_StartFirewall ( eurephiaCTX ctx  ) 

Starts the firewall thread. It is started as a separate process, to make sure it will run with root privileges.

Parameters:
ctx eurephiaCTX

< Alias for LOG_CRITICAL

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

< The context should not have any privileges at all

< Alias for LOG_PANIC

< Action failed an program could not continue to run. Log level always 0

< Informational messages. Log level should be < 5

< Alias for LOG_PANIC

< Action failed an program could not continue to run. Log level always 0

< Informational messages. Log level should be < 5

< Informational messages. Log level should be < 5

< Informational messages. Log level should be < 5

< Informational messages. Log level should be < 5

< Informational messages. Log level should be < 5

< Alias for LOG_PANIC

< Action failed an program could not continue to run. Log level always 0

< Informational messages. Log level should be < 5

< Alias for LOG_CRITICAL

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

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

< Informational messages. Log level should be < 5

< Alias for LOG_FATAL

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

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

< Informational messages. Log level should be < 5

< 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

< Blacklist an IP address in the firewall

Definition at line 137 of file eurephiafw.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void eFW_StopFirewall ( eurephiaCTX ctx  ) 

Stops the firewall update process.

Parameters:
ctx eurephiaCTX

< Informational messages. Log level should be < 5

< 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_PANIC

< Action failed an program could not continue to run. Log level always 0

< Alias for LOG_FATAL

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

< Alias for LOG_PANIC

< Action failed an program could not continue to run. Log level always 0

< Informational messages. Log level should be < 5

Definition at line 296 of file eurephiafw.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int eFW_unload ( eurephiaCTX ctx  ) 

Unloads the firewall driver

Parameters:
ctx eurephiaCTX
Returns:
Returns 1 on success, otherwise 0.

< Informational messages. Log level should be < 5

Definition at line 63 of file eurephiafw.c.

Here is the caller graph for this function:

int eFW_UpdateFirewall ( eurephiaCTX ctx,
int  mode,
const char *  addr,
const char *  fwdest,
const char *  fwprofile 
)

Requests an update of the firewall rules

Parameters:
ctx eurephiaCTX
mode int value which can be FWRULE_ADD, FWRULE_DELETE, FWRULE_BLACKLIST
addr The address of the rule to be changed (IP address or MAC address)
fwdest The firewall destination, where the rule is (to be) found.
fwprofile The firewall profile the user is defined to make use of.
Returns:
Returns 1 on success, otherwise 0.

< Alias for LOG_FATAL

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

< Add a new firewall rule

< Informational messages. Log level should be < 5

< Delete an existing firewall rule

< Informational messages. Log level should be < 5

< Blacklist an IP address in the firewall

< Informational messages. Log level should be < 5

< Informational messages. Log level should be < 5

< Alias for LOG_CRITICAL

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

Definition at line 377 of file eurephiafw.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