User Tools

Site Tools


pom:xmlrpc_interface

XML-RPC interface

The XML-RPC interface allow easy configuration of packet-o-matic by remote applications. The arguments can be either strings (s/) or integers (i/). By default, packet-o-matic listens on TCP port 8080 and the path for the XML-RPC queries is /RPC2. If you did specify a password for the XML-RPC interface, the user will be 'admin'.

Here is the documentation of the currently implemented functions :

core.getParameters

Returns all the core parameters and their values.
Arguments : none

core.setParameter

Set a core parameters.
Arguments : s/name s/value

conntrack.listLoaded

Get a list of all the conntrack modules loaded in packet-o-matic and their parameters.
Arguments : none

conntrack.listAvail

Get a list of the available conntrack modules.
Arguments : none

conntrack.setParameter

Set one parameter of a conntrack.
Arguments : s/conntrack_name s/param_name s/param_value

conntrack.load

Load a new conntrack module.
Arguments : s/conntrack_name

conntrack.unload

Unload a conntrack module.
Arguments : s/conntrack_name

datastore.listLoaded

List currently loaded datastore modules and their parameters.
Arguments : none

datastore.listAvail

List available datastore modules.
Arguments : none

datastore.get

Return all the datastores currently configured with their configuration.
Arguments : none

datastore.add

Add a datastore.
Arguments : s/datastore_type s/datastore_name

datastore.remove

Remove a datastore.
Arguments : s/datastore_name

datastore.start

Start a datastore.
Arguments : s/datastore_name

datastore.stop

Stop a datastore.
Arguments : s/datastore_name

datastore.load

Load a datastore module.
Arguments : s/datastore_type

datastore.unload

Unload a datastore module.
Arguments : s/datastore_type

datastore.setParameter

Set the value for a datastore parameter.
Arguments : s/datastore_name s/parameter_name s/value

datastore.setDescription

Set the description of a datastore.
Arguments : s/datastore_name s/description

datastore.listDataset

List all the datasets of a datastore.
Arguments : s/datastore_name

datastore.destroyDataset

Destroy a dataset from a datastore.
Arguments : s/datastore_name s/dataset_name

main.getSerial

Return the serial value for each component.
Arguments : none

main.halt

Halt packet-o-matic.
Arguments : none

main.setPassword

Set/unset the XML-RPC interface password.
Arguments : s/new_password or nothing to unset the password

main.getLogs

Retrieve the logs from the system give last one that was seen.
Arguments : i/last_log_seen

main.getVersion

Return packet-o-matic's version.
Arguments : none

input.get

Get the properties of the currently configured input.
Arguments : none

input.start

Start the currently configured input.
Arguments : none

input.stop

Stop the currently configured input.
Arguments : none

input.setType

Set the type of the input. For example, pcap or docsis.
Arguments : s/input_type

input.setMode

Set the mode of the input.
Arguments : s/input_mode

input.setParameter

Set a parameter of the input.
Arguments : s/param_name s/param_value

input.listLoaded

Get a list of the input modules loaded in packet-o-matic as well as their modes and parameters.
Arguments : none

input.listAvail

Get a list of the available input modules.
Arguments : none

input.load

Load an input given its name.
Arguments : s/input_name

input.unload

Unload an input given its name.
Arguments : s/input_name

helper.listLoaded

Get a list of all the helper modules loaded in packet-o-matic and their parameters.
Arguments : none

helper.listAvail

Get a list of the available helper modules.
Arguments : none

helper.setParameter

Set one parameter of a helper.
Arguments : s/helper_name s/param_name s/param_value

helper.load

Load a new helper module.
Arguments : s/helper_name

helper.unload

Unload a helper module.
Arguments : s/helper_name

rules.get

Get all the rules, their status and their unique ID.
Arguments : none

rules.add

Add a new rule. This function returns the unique ID of the rule that was added.
Arguments : s/rule_string

rules.set

Change a rule and returns its unique ID.
Arguments : i/rule_id s/rule_string

rules.setDescription

Change the description of a rule. If description is empty, it's removes it.
Arguments : i/rule_id s/description

rules.remove

Remove a rule and returns its unique ID.
Arguments : i/rule_id

rules.enable

Enable a rule and return its unique ID.
Arguments : i/rule_id

rules.disable

Disable a rule and return its unique ID.
Arguments : i/rule_id

match.listLoaded

Get a list of all the match modules loaded in packet-o-matic and their parameters.
Arguments : none

match.listAvail

Get a list of the available match modules.
Arguments : none

match.load

Load a new match module.
Arguments : s/match_name

match.unload

Unload a helper module.
Arguments : s/match_name

target.listLoaded

Get a list of the target modules loaded in packet-o-matic as well as their modes and parameters.
Arguments : none

target.listAvail

Get a list of the available target modules.
Arguments : none

target.get

Return all the targets of a rule give the rule UID.
Arguments : i/rule_id

target.start

Start a target.
Arguments : i/rule_id i/target_id

target.stop

Stop a target.
Arguments : i/rule_id i/target_id

target.add

Add a target to a rule.
Arguments : i/rule_id s/target_name

target.remove

Remove a target from a rule.
Arguments : i/rule_id i/target_id

target.setMode

Set the mode of a target.
Arguments : i/rule_id i/target_id s/mode_name

target.setParameter

Set a parameter of a target.
Arguments : i/rule_id i/target_id s/param_name s/param_value

target.load

Load a target module into the system.
Arguments : s/target_name

target.unload

Unload a target from the system.
Arguments : s/target_name

system.listMethods

List all the XML-RPC methods available.
Arguments : none

system.methodHelp

Provide help for a XML-RPC method.
Arguments : s/method

system.methodSignature

Provide signature of a XML-RPC method.
Arguments : s/method

pom/xmlrpc_interface.txt · Last modified: 2020/05/26 21:59 by 127.0.0.1