This repository has been archived on 2024-10-30. You can view files and clone it, but cannot push or open issues or pull requests.
esp-firewall/doxygen/html/classfw_1_1_firewall.html

490 lines
32 KiB
HTML
Raw Permalink Normal View History

2022-07-30 11:46:19 +02:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ESP32/ESP8266 Firewall: fw::Firewall Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">ESP32/ESP8266 Firewall<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">a software firewall for ESP23 or ESP8266</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('classfw_1_1_firewall.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classfw_1_1_firewall-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">fw::Firewall Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>The <a class="el" href="classfw_1_1_firewall.html" title="The Firewall will handle Firewall rules as linked list.">Firewall</a> will handle <a class="el" href="classfw_1_1_firewall.html" title="The Firewall will handle Firewall rules as linked list.">Firewall</a> rules as linked list.
<a href="classfw_1_1_firewall.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_firewall_8hpp_source.html">Firewall.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for fw::Firewall:</div>
<div class="dyncontent">
<div class="center">
<img src="classfw_1_1_firewall.png" usemap="#fw::Firewall_map" alt=""/>
<map id="fw::Firewall_map" name="fw::Firewall_map">
<area href="classfw_1_1_storage.html" title="The Storage will handle Firewall rules in EEPROM." alt="fw::Storage" shape="rect" coords="0,0,76,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2cc2717bd5999bc9a2f24ae33e4abd42"><td class="memItemLeft" align="right" valign="top"><a id="a2cc2717bd5999bc9a2f24ae33e4abd42" name="a2cc2717bd5999bc9a2f24ae33e4abd42"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Firewall</b> ()</td></tr>
<tr class="memdesc:a2cc2717bd5999bc9a2f24ae33e4abd42"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a new <a class="el" href="classfw_1_1_firewall.html" title="The Firewall will handle Firewall rules as linked list.">Firewall</a> object, retrieve current amount of firewall rules and restore them from <a class="el" href="classfw_1_1_storage.html" title="The Storage will handle Firewall rules in EEPROM.">Storage</a>. <br /></td></tr>
<tr class="separator:a2cc2717bd5999bc9a2f24ae33e4abd42"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c7c043d66b645ecc15e71561132057d"><td class="memItemLeft" align="right" valign="top"><a id="a2c7c043d66b645ecc15e71561132057d" name="a2c7c043d66b645ecc15e71561132057d"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>~Firewall</b> ()</td></tr>
<tr class="memdesc:a2c7c043d66b645ecc15e71561132057d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy the <a class="el" href="classfw_1_1_firewall.html" title="The Firewall will handle Firewall rules as linked list.">Firewall</a> object. <br /></td></tr>
<tr class="separator:a2c7c043d66b645ecc15e71561132057d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86f7d6ef56888f673fa46c4bc9ad3009"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structfirewall__rule__t.html">firewall_rule_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_firewall.html#a86f7d6ef56888f673fa46c4bc9ad3009">get_rule_head</a> ()</td></tr>
<tr class="memdesc:a86f7d6ef56888f673fa46c4bc9ad3009"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current rule head, it indicates the first rule position of the linked list. <a href="classfw_1_1_firewall.html#a86f7d6ef56888f673fa46c4bc9ad3009">More...</a><br /></td></tr>
<tr class="separator:a86f7d6ef56888f673fa46c4bc9ad3009"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae2a4a36257033c91f8f183b11de82c5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_firewall.html#aae2a4a36257033c91f8f183b11de82c5">add_rule_to_firewall</a> (<a class="el" href="structfirewall__rule__t.html">firewall_rule_t</a> *rule_ptr, const bool save_in_eeprom=true)</td></tr>
<tr class="memdesc:aae2a4a36257033c91f8f183b11de82c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">add a new rule to the linked list, update amount of rules, store it in <a class="el" href="classfw_1_1_storage.html" title="The Storage will handle Firewall rules in EEPROM.">Storage</a> if save_in_eeprom is true <a href="classfw_1_1_firewall.html#aae2a4a36257033c91f8f183b11de82c5">More...</a><br /></td></tr>
<tr class="separator:aae2a4a36257033c91f8f183b11de82c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1d9481f13052673c64aaf88d019e01d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structfirewall__rule__t.html">firewall_rule_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_firewall.html#af1d9481f13052673c64aaf88d019e01d">add_rule_to_firewall</a> (String *args)</td></tr>
<tr class="memdesc:af1d9481f13052673c64aaf88d019e01d"><td class="mdescLeft">&#160;</td><td class="mdescRight">add a new rule to the firewall, providing request parameter <a href="classfw_1_1_firewall.html#af1d9481f13052673c64aaf88d019e01d">More...</a><br /></td></tr>
<tr class="separator:af1d9481f13052673c64aaf88d019e01d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a987ec9a98b7d6ef56cf569e0290b3594"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structfirewall__rule__t.html">firewall_rule_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_firewall.html#a987ec9a98b7d6ef56cf569e0290b3594">update_rule_of_firewall</a> (String *args, const uint8_t key)</td></tr>
<tr class="memdesc:a987ec9a98b7d6ef56cf569e0290b3594"><td class="mdescLeft">&#160;</td><td class="mdescRight">update rule of firewall, store it in <a class="el" href="classfw_1_1_storage.html" title="The Storage will handle Firewall rules in EEPROM.">Storage</a> <a href="classfw_1_1_firewall.html#a987ec9a98b7d6ef56cf569e0290b3594">More...</a><br /></td></tr>
<tr class="separator:a987ec9a98b7d6ef56cf569e0290b3594"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7aa017cfb1ae6d6748d3f8c48e18dcf2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structfirewall__rule__t.html">firewall_rule_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_firewall.html#a7aa017cfb1ae6d6748d3f8c48e18dcf2">get_rule_from_firewall</a> (const uint8_t key)</td></tr>
<tr class="memdesc:a7aa017cfb1ae6d6748d3f8c48e18dcf2"><td class="mdescLeft">&#160;</td><td class="mdescRight">retrieve rule from the firewall linked list <a href="classfw_1_1_firewall.html#a7aa017cfb1ae6d6748d3f8c48e18dcf2">More...</a><br /></td></tr>
<tr class="separator:a7aa017cfb1ae6d6748d3f8c48e18dcf2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25fac8da12651a927c8285aa75e213d1"><td class="memItemLeft" align="right" valign="top">ok_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_firewall.html#a25fac8da12651a927c8285aa75e213d1">delete_rule_from_firewall</a> (const uint8_t key)</td></tr>
<tr class="memdesc:a25fac8da12651a927c8285aa75e213d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">delete rule from the firewall linked list, update amount of rules, store new order of rules in <a class="el" href="classfw_1_1_storage.html" title="The Storage will handle Firewall rules in EEPROM.">Storage</a> <a href="classfw_1_1_firewall.html#a25fac8da12651a927c8285aa75e213d1">More...</a><br /></td></tr>
<tr class="separator:a25fac8da12651a927c8285aa75e213d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a81eca0d34c28e5c4244b557a1f8e047d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_firewall.html#a81eca0d34c28e5c4244b557a1f8e047d">is_packet_allowed</a> (struct pbuf *pbuf)</td></tr>
<tr class="memdesc:a81eca0d34c28e5c4244b557a1f8e047d"><td class="mdescLeft">&#160;</td><td class="mdescRight">checks if network packet is allowed to pass firewall <a href="classfw_1_1_firewall.html#a81eca0d34c28e5c4244b557a1f8e047d">More...</a><br /></td></tr>
<tr class="separator:a81eca0d34c28e5c4244b557a1f8e047d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classfw_1_1_storage"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classfw_1_1_storage')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classfw_1_1_storage.html">fw::Storage</a></td></tr>
<tr class="memitem:a9b9fcc0e523d4b14a77e33a5806a348e inherit pub_methods_classfw_1_1_storage"><td class="memItemLeft" align="right" valign="top"><a id="a9b9fcc0e523d4b14a77e33a5806a348e" name="a9b9fcc0e523d4b14a77e33a5806a348e"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Storage</b> ()</td></tr>
<tr class="memdesc:a9b9fcc0e523d4b14a77e33a5806a348e inherit pub_methods_classfw_1_1_storage"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a new <a class="el" href="classfw_1_1_storage.html" title="The Storage will handle Firewall rules in EEPROM.">Storage</a> object. <br /></td></tr>
<tr class="separator:a9b9fcc0e523d4b14a77e33a5806a348e inherit pub_methods_classfw_1_1_storage"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11b6f2d893abc79879418853d4f840e1 inherit pub_methods_classfw_1_1_storage"><td class="memItemLeft" align="right" valign="top"><a id="a11b6f2d893abc79879418853d4f840e1" name="a11b6f2d893abc79879418853d4f840e1"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>~Storage</b> ()</td></tr>
<tr class="memdesc:a11b6f2d893abc79879418853d4f840e1 inherit pub_methods_classfw_1_1_storage"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy the <a class="el" href="classfw_1_1_storage.html" title="The Storage will handle Firewall rules in EEPROM.">Storage</a> object. <br /></td></tr>
<tr class="separator:a11b6f2d893abc79879418853d4f840e1 inherit pub_methods_classfw_1_1_storage"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-methods" name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a26fea38729777e00e5ee3a8d58f785b1"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_firewall.html#a26fea38729777e00e5ee3a8d58f785b1">rule_allows_packet</a> (<a class="el" href="structfirewall__rule__t.html">firewall_rule_t</a> *rule_ptr, <a class="el" href="structmy__packet__t.html">my_packet_t</a> *packet)</td></tr>
<tr class="memdesc:a26fea38729777e00e5ee3a8d58f785b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">checks if network packet is allowed by the rule <a href="classfw_1_1_firewall.html#a26fea38729777e00e5ee3a8d58f785b1">More...</a><br /></td></tr>
<tr class="separator:a26fea38729777e00e5ee3a8d58f785b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6815085477349f902e77cc5564b1b5ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmy__packet__t.html">my_packet_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_firewall.html#a6815085477349f902e77cc5564b1b5ba">get_packet_information</a> (struct pbuf *pbuf)</td></tr>
<tr class="memdesc:a6815085477349f902e77cc5564b1b5ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">prepares the necessary information to check packet <a href="classfw_1_1_firewall.html#a6815085477349f902e77cc5564b1b5ba">More...</a><br /></td></tr>
<tr class="separator:a6815085477349f902e77cc5564b1b5ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_methods_classfw_1_1_storage"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classfw_1_1_storage')"><img src="closed.png" alt="-"/>&#160;Protected Member Functions inherited from <a class="el" href="classfw_1_1_storage.html">fw::Storage</a></td></tr>
<tr class="memitem:aba4b010a57e6f5f5255b41d832891394 inherit pro_methods_classfw_1_1_storage"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_storage.html#aba4b010a57e6f5f5255b41d832891394">retrieve_amount_of_rules</a> ()</td></tr>
<tr class="memdesc:aba4b010a57e6f5f5255b41d832891394 inherit pro_methods_classfw_1_1_storage"><td class="mdescLeft">&#160;</td><td class="mdescRight">retrieve the current amount of <a class="el" href="classfw_1_1_firewall.html" title="The Firewall will handle Firewall rules as linked list.">Firewall</a> rules in the <a class="el" href="classfw_1_1_storage.html" title="The Storage will handle Firewall rules in EEPROM.">Storage</a> <a href="classfw_1_1_storage.html#aba4b010a57e6f5f5255b41d832891394">More...</a><br /></td></tr>
<tr class="separator:aba4b010a57e6f5f5255b41d832891394 inherit pro_methods_classfw_1_1_storage"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79d1951d339a19edab7fd22aaa68cc96 inherit pro_methods_classfw_1_1_storage"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_storage.html#a79d1951d339a19edab7fd22aaa68cc96">store_amount_of_rules</a> (const uint8_t new_amount)</td></tr>
<tr class="memdesc:a79d1951d339a19edab7fd22aaa68cc96 inherit pro_methods_classfw_1_1_storage"><td class="mdescLeft">&#160;</td><td class="mdescRight">store a new amount of <a class="el" href="classfw_1_1_firewall.html" title="The Firewall will handle Firewall rules as linked list.">Firewall</a> rules in the <a class="el" href="classfw_1_1_storage.html" title="The Storage will handle Firewall rules in EEPROM.">Storage</a> <a href="classfw_1_1_storage.html#a79d1951d339a19edab7fd22aaa68cc96">More...</a><br /></td></tr>
<tr class="separator:a79d1951d339a19edab7fd22aaa68cc96 inherit pro_methods_classfw_1_1_storage"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a20d0089533fea31893b323f7fde8535c inherit pro_methods_classfw_1_1_storage"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structfirewall__rule__t.html">firewall_rule_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_storage.html#a20d0089533fea31893b323f7fde8535c">retrieve_firewall_rule</a> (const uint8_t key)</td></tr>
<tr class="memdesc:a20d0089533fea31893b323f7fde8535c inherit pro_methods_classfw_1_1_storage"><td class="mdescLeft">&#160;</td><td class="mdescRight">retrieve a <a class="el" href="classfw_1_1_firewall.html" title="The Firewall will handle Firewall rules as linked list.">Firewall</a> rule from <a class="el" href="classfw_1_1_storage.html" title="The Storage will handle Firewall rules in EEPROM.">Storage</a> <a href="classfw_1_1_storage.html#a20d0089533fea31893b323f7fde8535c">More...</a><br /></td></tr>
<tr class="separator:a20d0089533fea31893b323f7fde8535c inherit pro_methods_classfw_1_1_storage"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7747d174b1b3dd6bb417c1c5a8ac259c inherit pro_methods_classfw_1_1_storage"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_storage.html#a7747d174b1b3dd6bb417c1c5a8ac259c">store_all_firewall_rules</a> (<a class="el" href="structfirewall__rule__t.html">firewall_rule_t</a> *rule_head)</td></tr>
<tr class="memdesc:a7747d174b1b3dd6bb417c1c5a8ac259c inherit pro_methods_classfw_1_1_storage"><td class="mdescLeft">&#160;</td><td class="mdescRight">store all <a class="el" href="classfw_1_1_firewall.html" title="The Firewall will handle Firewall rules as linked list.">Firewall</a> rules in <a class="el" href="classfw_1_1_storage.html" title="The Storage will handle Firewall rules in EEPROM.">Storage</a> <a href="classfw_1_1_storage.html#a7747d174b1b3dd6bb417c1c5a8ac259c">More...</a><br /></td></tr>
<tr class="separator:a7747d174b1b3dd6bb417c1c5a8ac259c inherit pro_methods_classfw_1_1_storage"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c1d226dbad072a6d0bf7e3507b7863b inherit pro_methods_classfw_1_1_storage"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classfw_1_1_storage.html#a9c1d226dbad072a6d0bf7e3507b7863b">store_firewall_rule</a> (<a class="el" href="structfirewall__rule__t.html">firewall_rule_t</a> *rule_ptr)</td></tr>
<tr class="memdesc:a9c1d226dbad072a6d0bf7e3507b7863b inherit pro_methods_classfw_1_1_storage"><td class="mdescLeft">&#160;</td><td class="mdescRight">store <a class="el" href="classfw_1_1_firewall.html" title="The Firewall will handle Firewall rules as linked list.">Firewall</a> rule in <a class="el" href="classfw_1_1_storage.html" title="The Storage will handle Firewall rules in EEPROM.">Storage</a> <a href="classfw_1_1_storage.html#a9c1d226dbad072a6d0bf7e3507b7863b">More...</a><br /></td></tr>
<tr class="separator:a9c1d226dbad072a6d0bf7e3507b7863b inherit pro_methods_classfw_1_1_storage"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-attribs" name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:aa67aba1e6dc06e88119b1681757ebc44"><td class="memItemLeft" align="right" valign="top"><a id="aa67aba1e6dc06e88119b1681757ebc44" name="aa67aba1e6dc06e88119b1681757ebc44"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><b>amount_of_rules</b> = 0</td></tr>
<tr class="separator:aa67aba1e6dc06e88119b1681757ebc44"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69d03fa8fcaffd218ef4520e98d654b1"><td class="memItemLeft" align="right" valign="top"><a id="a69d03fa8fcaffd218ef4520e98d654b1" name="a69d03fa8fcaffd218ef4520e98d654b1"></a>
<a class="el" href="structfirewall__rule__t.html">firewall_rule_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>rule_head</b> = NULL</td></tr>
<tr class="separator:a69d03fa8fcaffd218ef4520e98d654b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >The <a class="el" href="classfw_1_1_firewall.html" title="The Firewall will handle Firewall rules as linked list.">Firewall</a> will handle <a class="el" href="classfw_1_1_firewall.html" title="The Firewall will handle Firewall rules as linked list.">Firewall</a> rules as linked list. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="aae2a4a36257033c91f8f183b11de82c5" name="aae2a4a36257033c91f8f183b11de82c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aae2a4a36257033c91f8f183b11de82c5">&#9670;&nbsp;</a></span>add_rule_to_firewall() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void fw::Firewall::add_rule_to_firewall </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structfirewall__rule__t.html">firewall_rule_t</a> *&#160;</td>
<td class="paramname"><em>rule_ptr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>save_in_eeprom</em> = <code>true</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>add a new rule to the linked list, update amount of rules, store it in <a class="el" href="classfw_1_1_storage.html" title="The Storage will handle Firewall rules in EEPROM.">Storage</a> if save_in_eeprom is true </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">rule_ptr</td><td></td></tr>
<tr><td class="paramname">save_in_eeprom</td><td></td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="af1d9481f13052673c64aaf88d019e01d" name="af1d9481f13052673c64aaf88d019e01d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af1d9481f13052673c64aaf88d019e01d">&#9670;&nbsp;</a></span>add_rule_to_firewall() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structfirewall__rule__t.html">firewall_rule_t</a> * fw::Firewall::add_rule_to_firewall </td>
<td>(</td>
<td class="paramtype">String *&#160;</td>
<td class="paramname"><em>args</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>add a new rule to the firewall, providing request parameter </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">args</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>firewall_rule_t* </dd></dl>
</div>
</div>
<a id="a25fac8da12651a927c8285aa75e213d1" name="a25fac8da12651a927c8285aa75e213d1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a25fac8da12651a927c8285aa75e213d1">&#9670;&nbsp;</a></span>delete_rule_from_firewall()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">ok_t fw::Firewall::delete_rule_from_firewall </td>
<td>(</td>
<td class="paramtype">const uint8_t&#160;</td>
<td class="paramname"><em>key</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>delete rule from the firewall linked list, update amount of rules, store new order of rules in <a class="el" href="classfw_1_1_storage.html" title="The Storage will handle Firewall rules in EEPROM.">Storage</a> </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">key</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ok_t </dd></dl>
</div>
</div>
<a id="a6815085477349f902e77cc5564b1b5ba" name="a6815085477349f902e77cc5564b1b5ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6815085477349f902e77cc5564b1b5ba">&#9670;&nbsp;</a></span>get_packet_information()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structmy__packet__t.html">my_packet_t</a> * fw::Firewall::get_packet_information </td>
<td>(</td>
<td class="paramtype">struct pbuf *&#160;</td>
<td class="paramname"><em>pbuf</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>prepares the necessary information to check packet </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pbuf</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>my_packet_t* </dd></dl>
</div>
</div>
<a id="a7aa017cfb1ae6d6748d3f8c48e18dcf2" name="a7aa017cfb1ae6d6748d3f8c48e18dcf2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7aa017cfb1ae6d6748d3f8c48e18dcf2">&#9670;&nbsp;</a></span>get_rule_from_firewall()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structfirewall__rule__t.html">firewall_rule_t</a> * fw::Firewall::get_rule_from_firewall </td>
<td>(</td>
<td class="paramtype">const uint8_t&#160;</td>
<td class="paramname"><em>key</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>retrieve rule from the firewall linked list </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">key</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>firewall_rule_t* </dd></dl>
</div>
</div>
<a id="a86f7d6ef56888f673fa46c4bc9ad3009" name="a86f7d6ef56888f673fa46c4bc9ad3009"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a86f7d6ef56888f673fa46c4bc9ad3009">&#9670;&nbsp;</a></span>get_rule_head()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structfirewall__rule__t.html">firewall_rule_t</a> * fw::Firewall::get_rule_head </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the current rule head, it indicates the first rule position of the linked list. </p>
<dl class="section return"><dt>Returns</dt><dd>firewall_rule_t* </dd></dl>
</div>
</div>
<a id="a81eca0d34c28e5c4244b557a1f8e047d" name="a81eca0d34c28e5c4244b557a1f8e047d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a81eca0d34c28e5c4244b557a1f8e047d">&#9670;&nbsp;</a></span>is_packet_allowed()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool fw::Firewall::is_packet_allowed </td>
<td>(</td>
<td class="paramtype">struct pbuf *&#160;</td>
<td class="paramname"><em>pbuf</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>checks if network packet is allowed to pass firewall </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pbuf</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true </dd>
<dd>
false </dd></dl>
</div>
</div>
<a id="a26fea38729777e00e5ee3a8d58f785b1" name="a26fea38729777e00e5ee3a8d58f785b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a26fea38729777e00e5ee3a8d58f785b1">&#9670;&nbsp;</a></span>rule_allows_packet()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool fw::Firewall::rule_allows_packet </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structfirewall__rule__t.html">firewall_rule_t</a> *&#160;</td>
<td class="paramname"><em>rule_ptr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structmy__packet__t.html">my_packet_t</a> *&#160;</td>
<td class="paramname"><em>packet</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>checks if network packet is allowed by the rule </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">rule_ptr</td><td></td></tr>
<tr><td class="paramname">packet</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true </dd>
<dd>
false </dd></dl>
</div>
</div>
<a id="a987ec9a98b7d6ef56cf569e0290b3594" name="a987ec9a98b7d6ef56cf569e0290b3594"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a987ec9a98b7d6ef56cf569e0290b3594">&#9670;&nbsp;</a></span>update_rule_of_firewall()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structfirewall__rule__t.html">firewall_rule_t</a> * fw::Firewall::update_rule_of_firewall </td>
<td>(</td>
<td class="paramtype">String *&#160;</td>
<td class="paramname"><em>args</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t&#160;</td>
<td class="paramname"><em>key</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>update rule of firewall, store it in <a class="el" href="classfw_1_1_storage.html" title="The Storage will handle Firewall rules in EEPROM.">Storage</a> </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">args</td><td></td></tr>
<tr><td class="paramname">key</td><td></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>firewall_rule_t* </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/<a class="el" href="_firewall_8hpp_source.html">Firewall.hpp</a></li>
<li>src/Firewall.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><b>fw</b></li><li class="navelem"><a class="el" href="classfw_1_1_firewall.html">Firewall</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4 </li>
</ul>
</div>
</body>
</html>