Updated
Aug 19th, 2013
First Posted
Aug 19th, 2013

ET/BWMGR PHP API Reference

add_protocol

Syntax

$bwmgr->add_protocol($arg);

Example:

$bwmgr->add_protocol($arg)


Parameters
protocol:protocol
port:port
ipprot:ipprot
disable:disable
ip_address:ip_address
site:site
agent:agent
url:url
server:server
xheader:xheader
group:group
tag:tag
remove:1

addr_cidr

Syntax

$bwmgr->addr_cidr();

Example:

$bwmgr->addr_cidr()

addrule

Example: $bwmgr->addrule($arg)

Parameters:

xarg
namearg
addrarg
daddrarg
saddrarg
add_beforearg
add_afterarg
addrmskarg
daddrmskarg
saddrmskarg
maddrarg
tosarg
dmaddrarg
smaddrarg
portarg
dportarg
sportarg
autothresh_inarg
autothresh_outarg
autoperiod_inarg
autoperiod_outarg
bwinarg
bwoutarg
bwbotharg
bwminarg
burstmaxarg
bwburstarg
bwburst_inarg
bwburst_outarg
bwprofilearg
burstthresharg
burstthresh_inarg
burstthresh_outarg
burstperiod_inarg
burstperiod_outarg
min_windowarg
bursttrigarg
maxlinksarg
portrangearg
ppsinarg
ppsoutarg
ppshiarg
priorityarg
vlanarg
urlarg
sitearg
commentarg
bwlinkarg
ruletmoarg
tfarg
fixedtmoarg
revtmoarg
todarg
mprotarg
tagarg
ipprotarg
start_rangearg
rangearg
wdwthresharg
ARGarg

Flags:

v1
l1
r1
o1
t1
tf1
i1
d1
b1
fw1
usesaddr1
usedaddr1
usesport1
usedport1
useprot1
rm1
group1
ifac1
stats1
global1
debug1
no_shaping1
do_range1

analyze

Syntax

$bwmgr->analyze($arg);

Example:

$bwmgr->analyze($arg)


Parameters
ifname:ifname

apply_profile

Syntax

$bwmgr->apply_profile();

Example:

$bwmgr->apply_profile()

bridge

Syntax

$bwmgr->bridge($arg);

Example:

$bwmgr->bridge($arg)


Parameters
addif:addif
ifname:ifname
ff:1
learning:1
dump_routes:1
fastbridge:fastbridge

changeindex

Syntax

$bwmgr->changeindex($arg);

Example:

$bwmgr->changeindex($arg)


Parameters
ifname:ifname
index:index
newindex:newindex

clearcounters

Syntax

$bwmgr->clearcounters($arg);

Example:

$bwmgr->clearcounters($arg)


Parameters
x:x
name:name

createbridge

Syntax

$bwmgr->createbridge($arg);

Example:

$bwmgr->createbridge($arg)


Parameters
ifname:ifname
address:1

decode_port

Syntax

$bwmgr->decode_port();

Example:

$bwmgr->decode_port()

decode_priority

Syntax

$bwmgr->decode_priority();

Example:

$bwmgr->decode_priority()

delete_profile

Syntax

$bwmgr->delete_profile();

Example:

$bwmgr->delete_profile()

delete_time_profile

Syntax

$bwmgr->delete_time_profile();

Example:

$bwmgr->delete_time_profile()

delfwrule

Syntax

$bwmgr->delfwrule($arg);

Example:

$bwmgr->delfwrule($arg)


Parameters
index:index

delrule

Syntax

$bwmgr->delrule($arg);

Example:

$bwmgr->delrule($arg)


Parameters
param:param

disable

Syntax

$bwmgr->disable($arg);

Example:

$bwmgr->disable($arg)


Parameters
ifname:ifname
index:index

disablefw

Syntax

$bwmgr->disablefw($arg);

Example:

$bwmgr->disablefw($arg)


Parameters
ifname:ifname
index:index

dumpprots

Syntax

$bwmgr->dumpprots();

Example:

$bwmgr->dumpprots()

enable

Syntax

$bwmgr->enable($arg);

Example:

$bwmgr->enable($arg)


Parameters
ifname:ifname
index:index
flags:flags

enablefw

Syntax

$bwmgr->enablefw($arg);

Example:

$bwmgr->enablefw($arg)


Parameters
index:index
ifname:ifname
flags:flags

flush

Syntax

$bwmgr->flush($arg);

Example:

$bwmgr->flush($arg)


Parameters
ifname:ifname
fw:1
all:1

flushdb

Syntax

$bwmgr->flushdb($arg);

Example:

$bwmgr->flushdb($arg)


Parameters
stats:1

fwlevel

Syntax

$bwmgr->fwlevel($arg);

Example:

$bwmgr->fwlevel($arg)


Parameters
ifname:ifname
level:level

get_dbrule

Syntax

$bwmgr->get_dbrule();

Example:

$bwmgr->get_dbrule()

get_groups

Syntax

$bwmgr->get_groups();

Example:

$bwmgr->get_groups()

get_profile

Syntax

$bwmgr->get_profile();

Example:

$bwmgr->get_profile()

get_profiles

Syntax

$bwmgr->get_profiles();

Example:

$bwmgr->get_profiles()

get_row

Syntax

$bwmgr->get_row();

Example:

$bwmgr->get_row()

get_settings

Syntax

$bwmgr->get_settings();

Example:

$bwmgr->get_settings()

get_time_profile

Syntax

$bwmgr->get_time_profile();

Example:

$bwmgr->get_time_profile()

get_time_profiles

Syntax

$bwmgr->get_time_profiles();

Example:

$bwmgr->get_time_profiles()

get_triggers

Syntax

$bwmgr->get_triggers();

Example:

$bwmgr->get_triggers()

get_var

Syntax

$bwmgr->get_var();

Example:

$bwmgr->get_var()

getagent

Syntax

$bwmgr->getagent();

Example:

$bwmgr->getagent()

getagents

Syntax

$bwmgr->getagents($arg);

Example:

$bwmgr->getagents($arg)


Parameters
agent:agent

getbridges

Syntax

$bwmgr->getbridges();

Example:

$bwmgr->getbridges()

getfwrule

Syntax

$bwmgr->getfwrule($arg);

Example:

$bwmgr->getfwrule($arg)


Parameters
ifname:ifname
index:index

getgroup

Syntax

$bwmgr->getgroup($arg);

Example:

$bwmgr->getgroup($arg)


Parameters
name:name

getifac

Syntax

$bwmgr->getifac($arg);

Example:

$bwmgr->getifac($arg)


Parameters
ifname:ifname
dump:1

getiptag

Syntax

$bwmgr->getiptag();

Example:

$bwmgr->getiptag()

getnextprot

Syntax

$bwmgr->getnextprot();

Example:

$bwmgr->getnextprot()

getparams

Syntax

$bwmgr->getparams();

Example:

$bwmgr->getparams()

getprot

Syntax

$bwmgr->getprot($arg);

Example:

$bwmgr->getprot($arg)


Parameters
protocol:protocol
getports:1
active:1
port:port

getrule

Syntax

$bwmgr->getrule($arg);

Example:

$bwmgr->getrule($arg)


Parameters
ifname:ifname
param:param
all:1

getrulebyindex

Syntax

$bwmgr->getrulebyindex();

Example:

$bwmgr->getrulebyindex()

getstats

Syntax

$bwmgr->getstats($arg);

Example:

$bwmgr->getstats($arg)


Parameters
name:name

gettaglist

Syntax

$bwmgr->gettaglist();

Example:

$bwmgr->gettaglist()

guipassword

Syntax

$bwmgr->guipassword($arg);

Example:

$bwmgr->guipassword($arg)


Parameters
password:password

has_stats

Syntax

$bwmgr->has_stats();

Example:

$bwmgr->has_stats()

indexlevel

Syntax

$bwmgr->indexlevel($arg);

Example:

$bwmgr->indexlevel($arg)


Parameters
ifname:ifname
level:level

init_rrd

Syntax

$bwmgr->init_rrd();

Example:

$bwmgr->init_rrd()

load_protocol_file

Syntax

$bwmgr->load_protocol_file();

Example:

$bwmgr->load_protocol_file()

monitor

Syntax

$bwmgr->monitor($arg);

Example:

$bwmgr->monitor($arg)


Parameters
status:1
start:1
stop:1
shutdown:1

nextifac

Syntax

$bwmgr->nextifac();

Example:

$bwmgr->nextifac()

nextrule

Syntax

$bwmgr->nextrule();

Example:

$bwmgr->nextrule()

query

Syntax

$bwmgr->query();

Example:

$bwmgr->query()

read_cfg

Syntax

$bwmgr->read_cfg();

Example:

$bwmgr->read_cfg()

rebuild

Syntax

$bwmgr->rebuild($arg);

Example:

$bwmgr->rebuild($arg)


Parameters
filename:filename
userules:1

rebuild_fromdb

Syntax

$bwmgr->rebuild_fromdb();

Example:

$bwmgr->rebuild_fromdb()

rebuild_fromrules

Syntax

$bwmgr->rebuild_fromrules();

Example:

$bwmgr->rebuild_fromrules()

rebuildbridging

Syntax

$bwmgr->rebuildbridging();

Example:

$bwmgr->rebuildbridging()

register_protfile

Syntax

$bwmgr->register_protfile($arg);

Example:

$bwmgr->register_protfile($arg)


Parameters
filename:filename

reset_rrd

Syntax

$bwmgr->reset_rrd();

Example:

$bwmgr->reset_rrd()

rule_add_time_profile

Syntax

$bwmgr->rule_add_time_profile();

Example:

$bwmgr->rule_add_time_profile()

rule_get_time_profiles

Syntax

$bwmgr->rule_get_time_profiles();

Example:

$bwmgr->rule_get_time_profiles()

rule_remove_time_profiles

Syntax

$bwmgr->rule_remove_time_profiles();

Example:

$bwmgr->rule_remove_time_profiles()

save_cfg

Syntax

$bwmgr->save_cfg();

Example:

$bwmgr->save_cfg()

save_profile

Syntax

$bwmgr->save_profile();

Example:

$bwmgr->save_profile()

save_rule

Syntax

$bwmgr->save_rule();

Example:

$bwmgr->save_rule()

save_settings

Syntax

$bwmgr->save_settings();

Example:

$bwmgr->save_settings()

save_time_profile

Syntax

$bwmgr->save_time_profile();

Example:

$bwmgr->save_time_profile()

set

Syntax

$bwmgr->set($arg);

Example:

$bwmgr->set($arg)


Parameters
max_buffers:max_buffers
burstmax:burstmax
stats_period:stats_period
max_streams:max_streams
urlparams:urlparams
unburst:unburst
sniffing:sniffing
track_all:track_all
small_pkt_pri:small_pkt_pri
global_ruleset:global_ruleset

set_error

Syntax

$bwmgr->set_error();

Example:

$bwmgr->set_error()

set_profile

Syntax

$bwmgr->set_profile();

Example:

$bwmgr->set_profile()

setdebug

Syntax

$bwmgr->setdebug($arg);

Example:

$bwmgr->setdebug($arg)


Parameters
drops:drops
url:url
reverse:reverse
smtp:smtp
sniffing:sniffing
name:name
bridge:bridge
agents:agents
compress:compress
content:content
sip:sip
counts:counts
streams:streams
protocols:protocols
servers:servers
xheaders:xheaders
httpheaders:httpheaders
fw:fw
ip:ip
sites:sites
shaping:shaping
bursts:bursts

show

Syntax

$bwmgr->show($arg);

Example:

$bwmgr->show($arg)


Parameters
ifname:ifname
index:index

show_error

Syntax

$bwmgr->show_error();

Example:

$bwmgr->show_error()

showbridges

Syntax

$bwmgr->showbridges();

Example:

$bwmgr->showbridges()

showfw

Syntax

$bwmgr->showfw($arg);

Example:

$bwmgr->showfw($arg)


Parameters
ifname:ifname
index:index

shownics

Syntax

$bwmgr->shownics();

Example:

$bwmgr->shownics()

status

Syntax

$bwmgr->status();

Example:

$bwmgr->status()

stop

Syntax

$bwmgr->stop();

Example:

$bwmgr->stop()

tod_toname

Syntax

$bwmgr->tod_toname();

Example:

$bwmgr->tod_toname()

tods_toindex

Syntax

$bwmgr->tods_toindex();

Example:

$bwmgr->tods_toindex()

tods_toname

Syntax

$bwmgr->tods_toname();

Example:

$bwmgr->tods_toname()

unregister_protfile

Syntax

$bwmgr->unregister_protfile($arg);

Example:

$bwmgr->unregister_protfile($arg)


Parameters
filename:filename

version

Syntax

$bwmgr->version();

Example:

$bwmgr->version()

write_protfiles

Syntax

$bwmgr->write_protfiles();

Example:

$bwmgr->write_protfiles()

Add Comment

Next: Traffic Monitor