IPC@CHIP® RTOS-LNX – API Documentation

Header image

Main page


◆ netfAddFirewallRule()

int netfAddFirewallRule ( unsigned char  protocol,
unsigned short  portMin,
unsigned short  portMax,
unsigned long  ipMin,
unsigned long  ipMax,
const char *  ifaceName 
)

This function adds a rule to the firewall. If an incoming packet matches such a rule the packet is received and handled. If at least one rule is defined but no rule matches the incoming packet is dropped.

After adding mappings, the netfConfigRefresh() function needs to be called.

Parameters
protocolSet to TCP (6) or UDP (17)
portMinMinimum port number, 0 means that port range is not compared
portMaxMaximum port number
ipMinMinimum IP address, 0 means that IP range is not compared
ipMaxMaximum IP address
ifaceNameName of the interface (e.g. eth0, ppp0) or NULL when unspecified.
Returns
0 success, else error
Since
V1.05





Top of page | Main page

Copyright © 2018 Beck IPC GmbH
Generated on Fri Jun 8 2018 12:48:21 by Doxygen 1.8.13