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.

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.
0 success, else error

Top of page | Main page

Copyright © 2018 Beck IPC GmbH
Generated on Fri Feb 9 2018 17:44:50 by Doxygen 1.8.13