Navigation: Developing Apps > BINETIX® AGE™ API > The Node > Connectivity > age_gateway
get_rule/1
Description
get_rule/1 is an Erlang function exported by "age_gateway" module.
Retrieves firewall rule data record associated to the specified Port. If no rule is found then the function returns error.
References
•age_gateway
Parameters
Name
Type
Port
integer()
Port number
Result
Value or Type
#age_firewall{}
Returns
Code Sample
> age_gateway:get_rule(5538).
{age_firewall,5538,tcp,enabled,
[incoming,outgoing,sustain,server],
[binary,{packet,0}],
{1564,575350,382023},
undefined}
> age_gateway:get_rule(1234).
{error,firewall_unknown_rule}