FuseGuard Logo

fuseguard.components.ip
Component DBIPListProvider

ip.IPListProvider
  |
  +--ip.DBIPListProvider

Method Summary
public any init([any firewallInstance])
          Initialize the IPListManager
public void addIP([string listID], [struct data])
          Adds an IP to the list
public void addList([struct data])
          Adds a list to the providers repository
public boolean canAddList()
          Returns true if the provider supports adding a new list
public array getAllIPData([string listID])
          Returns an array of structs containing all the data
public string getCounter([any ipAddress], [string listID])
          Returns the value of the counter for the IP or empty string if IP does not have a counter value
public struct getDataByID([any ipID], [string listID])
          Returns a structure with info corresponding to the ID or an empty struct if list has no info about the ID
public binary getIntegerIPAsBinary([string intIP])
public string getIntegerIPFromBinary([any ip])
public struct getIPData([any ipAddress], [string listID])
          Returns a structure with info about the IP or an empty struct if list has no info about the IP
public array getIPLists()
          Returns an array of structures with keys: name, type, id
public numeric getListCount([string listID])
          Returns the number of records in the list
public string getName()
          Returns the name of the list provider
public boolean hasIP([any ipAddress], [string listID])
public void incrementCounter([any ipAddress], [string listID])
          Increments the counter value by one. If the IP does not exist on the list yet it will add it to the list and set the counter to 1
public boolean isManagerEnabled()
          Only one provider can be manager enabled per FuseGuard instance
public void removeIP([string ipID], [string listID])
          Removes an IP from the list
public void removeIPLastUpdatedBefore([string listID=""], [date updatedBefore])
          Removes IPs that have not been updated since the date specified
public void updateIP([string ipID], [string listID], [struct data])
          Updates an IP in the list

Methods inherited from ip.IPListProvider
getIPAsInteger, isValidIPVersion4Integer, isValidIPVersion6Integer, getIPVersion, isValidIPVersion6, isValidIPVersion4, getIPV4FromInteger, bigInt, getIPV4AsInteger, getIPV6FromInteger, getIPV6AsInteger, getIPV4CIDR, assertValidIPData
 

Method Detail

addIP

public void addIP([string listID], [struct data])
Adds an IP to the list

Parameters:
[string listID]
[struct data]

addList

public void addList([struct data])
Adds a list to the providers repository

Parameters:
[struct data]

canAddList

public boolean canAddList()
Returns true if the provider supports adding a new list


getAllIPData

public array getAllIPData([string listID])
Returns an array of structs containing all the data

Parameters:
[string listID]

getCounter

public string getCounter([any ipAddress], [string listID])
Returns the value of the counter for the IP or empty string if IP does not have a counter value

Parameters:
[any ipAddress]
[string listID]

getDataByID

public struct getDataByID([any ipID], [string listID])
Returns a structure with info corresponding to the ID or an empty struct if list has no info about the ID

Parameters:
[any ipID]
[string listID]

getIntegerIPAsBinary

public binary getIntegerIPAsBinary([string intIP])
Parameters:
[string intIP]

getIntegerIPFromBinary

public string getIntegerIPFromBinary([any ip])
Parameters:
[any ip]

getIPData

public struct getIPData([any ipAddress], [string listID])
Returns a structure with info about the IP or an empty struct if list has no info about the IP

Parameters:
[any ipAddress]
[string listID]

getIPLists

public array getIPLists()
Returns an array of structures with keys: name, type, id


getListCount

public numeric getListCount([string listID])
Returns the number of records in the list

Parameters:
[string listID]

getName

public string getName()
Returns the name of the list provider


hasIP

public boolean hasIP([any ipAddress], [string listID])
Parameters:
[any ipAddress]
[string listID]

incrementCounter

public void incrementCounter([any ipAddress], [string listID])
Increments the counter value by one. If the IP does not exist on the list yet it will add it to the list and set the counter to 1

Parameters:
[any ipAddress]
[string listID]

init

public any init([any firewallInstance])
Initialize the IPListManager

Parameters:
[any firewallInstance]

isManagerEnabled

public boolean isManagerEnabled()
Only one provider can be manager enabled per FuseGuard instance


removeIP

public void removeIP([string ipID], [string listID])
Removes an IP from the list

Parameters:
[string ipID]
[string listID]

removeIPLastUpdatedBefore

public void removeIPLastUpdatedBefore([string listID=""], [date updatedBefore])
Removes IPs that have not been updated since the date specified

Parameters:
[string listID=""]
[date updatedBefore]

updateIP

public void updateIP([string ipID], [string listID], [struct data])
Updates an IP in the list

Parameters:
[string ipID]
[string listID]
[struct data]