\hypertarget{classFirewallEntry}{
\section{FirewallEntry Class Reference}
\label{classFirewallEntry}\index{FirewallEntry@{FirewallEntry}}
}


Firewall Table Entry.  




{\ttfamily \#include $<$firewall\_\-entry.hh$>$}

\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum {\bfseries Action} \{ \par
{\bfseries ACTION\_\-MIN} =  0x00, 
{\bfseries ACTION\_\-ANY} =  0x00, 
{\bfseries ACTION\_\-NONE} =  0x01, 
{\bfseries ACTION\_\-PASS} =  0x02, 
\par
{\bfseries ACTION\_\-DROP} =  0x03, 
{\bfseries ACTION\_\-REJECT} =  0x04, 
{\bfseries ACTION\_\-MAX} =  0x05, 
{\bfseries ACTION\_\-INVALID} =  0xff
 \}
\item 
enum \{ \par
{\bfseries RULE\_\-NUMBER\_\-DEFAULT} =  0, 
{\bfseries IP\_\-PROTOCOL\_\-MIN} =  0, 
{\bfseries IP\_\-PROTOCOL\_\-MAX} =  255, 
{\bfseries IP\_\-PROTOCOL\_\-ANY} =  0, 
\par
{\bfseries PORT\_\-MIN} =  0, 
{\bfseries PORT\_\-MAX} =  65535
 \}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classFirewallEntry_af37592b31079a6bbb00505476830c453}{
{\bfseries FirewallEntry} (int family)}
\label{classFirewallEntry_af37592b31079a6bbb00505476830c453}

\item 
\hypertarget{classFirewallEntry_add950012ecc53a8f362f24fa4ca0c4a1}{
{\bfseries FirewallEntry} (uint32\_\-t rule\_\-number, const string \&ifname, const string \&vifname, const \hyperlink{classIPvXNet}{IPvXNet} \&src\_\-network, const \hyperlink{classIPvXNet}{IPvXNet} \&dst\_\-network, uint8\_\-t ip\_\-protocol, uint16\_\-t src\_\-port\_\-begin, uint16\_\-t src\_\-port\_\-end, uint16\_\-t dst\_\-port\_\-begin, uint16\_\-t dst\_\-port\_\-end, FirewallEntry::Action action)}
\label{classFirewallEntry_add950012ecc53a8f362f24fa4ca0c4a1}

\item 
bool \hyperlink{classFirewallEntry_a06dd8f72459ce928286601d0130a13b4}{is\_\-ipv4} () const 
\begin{DoxyCompactList}\small\item\em Test whether this is an \hyperlink{classIPv4}{IPv4} entry. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFirewallEntry_a531b87215e6b0e3351264f7ff901f79c}{is\_\-ipv6} () const 
\begin{DoxyCompactList}\small\item\em Test whether this is an \hyperlink{classIPv6}{IPv6} entry. \item\end{DoxyCompactList}\item 
\hypertarget{classFirewallEntry_a7fe322e577f8637d2b2f7b915d231463}{
uint32\_\-t {\bfseries rule\_\-number} () const }
\label{classFirewallEntry_a7fe322e577f8637d2b2f7b915d231463}

\item 
\hypertarget{classFirewallEntry_a33ea15c7d173af000770db69fa613e58}{
const string \& {\bfseries ifname} () const }
\label{classFirewallEntry_a33ea15c7d173af000770db69fa613e58}

\item 
\hypertarget{classFirewallEntry_af5c9a1a5faba4663cccffae621de8b6d}{
const string \& {\bfseries vifname} () const }
\label{classFirewallEntry_af5c9a1a5faba4663cccffae621de8b6d}

\item 
\hypertarget{classFirewallEntry_a508b6b61e1edde60b3c065edf9a05d07}{
const \hyperlink{classIPvXNet}{IPvXNet} \& {\bfseries src\_\-network} () const }
\label{classFirewallEntry_a508b6b61e1edde60b3c065edf9a05d07}

\item 
\hypertarget{classFirewallEntry_a13339e6d814ab3a48aa1770b3182aaf2}{
const \hyperlink{classIPvXNet}{IPvXNet} \& {\bfseries dst\_\-network} () const }
\label{classFirewallEntry_a13339e6d814ab3a48aa1770b3182aaf2}

\item 
\hypertarget{classFirewallEntry_a49b6b6dffaddbf1d822fc64a762969e5}{
uint8\_\-t {\bfseries ip\_\-protocol} () const }
\label{classFirewallEntry_a49b6b6dffaddbf1d822fc64a762969e5}

\item 
\hypertarget{classFirewallEntry_a2143df5b58a2eda0f369d7a66158b0a9}{
uint32\_\-t {\bfseries src\_\-port\_\-begin} () const }
\label{classFirewallEntry_a2143df5b58a2eda0f369d7a66158b0a9}

\item 
\hypertarget{classFirewallEntry_a01cccd4a85e8bafae4f1ca87b6ea060a}{
uint32\_\-t {\bfseries src\_\-port\_\-end} () const }
\label{classFirewallEntry_a01cccd4a85e8bafae4f1ca87b6ea060a}

\item 
\hypertarget{classFirewallEntry_a534b3d59096def2cc121b14018ad4a8b}{
uint32\_\-t {\bfseries dst\_\-port\_\-begin} () const }
\label{classFirewallEntry_a534b3d59096def2cc121b14018ad4a8b}

\item 
\hypertarget{classFirewallEntry_a22a3607804af887f664ad96574a55006}{
uint32\_\-t {\bfseries dst\_\-port\_\-end} () const }
\label{classFirewallEntry_a22a3607804af887f664ad96574a55006}

\item 
\hypertarget{classFirewallEntry_af9943d1d450248fd80fbe09b67634949}{
FirewallEntry::Action {\bfseries action} () const }
\label{classFirewallEntry_af9943d1d450248fd80fbe09b67634949}

\item 
\hypertarget{classFirewallEntry_a086c01ba178bd79633e872b40515d1c4}{
void \hyperlink{classFirewallEntry_a086c01ba178bd79633e872b40515d1c4}{zero} ()}
\label{classFirewallEntry_a086c01ba178bd79633e872b40515d1c4}

\begin{DoxyCompactList}\small\item\em Reset all members. \item\end{DoxyCompactList}\item 
bool \hyperlink{classFirewallEntry_a730d5c487c2dbdd95be7ac6994867d83}{match} (const \hyperlink{classFirewallEntry}{FirewallEntry} \&other) const 
\begin{DoxyCompactList}\small\item\em Comparison function for an exact match with \hyperlink{protocolthe-p}{the} entry. \item\end{DoxyCompactList}\item 
string \hyperlink{classFirewallEntry_ab1d1a61481a825ce28b21997836d17dd}{str} () const 
\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static string \hyperlink{classFirewallEntry_ac1f36faa3b2d62910006e82e9633643d}{action2str} (FirewallEntry::Action action)
\begin{DoxyCompactList}\small\item\em Convert firewall entry action value to a string representation. \item\end{DoxyCompactList}\item 
static FirewallEntry::Action \hyperlink{classFirewallEntry_ad5e118bbe2ff46b519d4c11c702a7443}{str2action} (const string \&name)
\begin{DoxyCompactList}\small\item\em Convert string representation to a firewall entry action value. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classFirewallEntry_a72909b0516c9af317ecb5ce13953fc99}{
uint32\_\-t {\bfseries \_\-rule\_\-number}}
\label{classFirewallEntry_a72909b0516c9af317ecb5ce13953fc99}

\item 
\hypertarget{classFirewallEntry_a617beb92cd7978c984457dda3ab7c1b3}{
string {\bfseries \_\-ifname}}
\label{classFirewallEntry_a617beb92cd7978c984457dda3ab7c1b3}

\item 
\hypertarget{classFirewallEntry_a195aa000ea33bbfcc4456d57c0fac7c0}{
string {\bfseries \_\-vifname}}
\label{classFirewallEntry_a195aa000ea33bbfcc4456d57c0fac7c0}

\item 
\hypertarget{classFirewallEntry_acf8438a70e6262d50c77692a7a0dcea3}{
\hyperlink{classIPvXNet}{IPvXNet} {\bfseries \_\-src\_\-network}}
\label{classFirewallEntry_acf8438a70e6262d50c77692a7a0dcea3}

\item 
\hypertarget{classFirewallEntry_a87b0d643ce602025c7d611c80003d981}{
\hyperlink{classIPvXNet}{IPvXNet} {\bfseries \_\-dst\_\-network}}
\label{classFirewallEntry_a87b0d643ce602025c7d611c80003d981}

\item 
\hypertarget{classFirewallEntry_a9c359495c0748a6962da0d9f8443dacc}{
uint8\_\-t {\bfseries \_\-ip\_\-protocol}}
\label{classFirewallEntry_a9c359495c0748a6962da0d9f8443dacc}

\item 
\hypertarget{classFirewallEntry_abe0abc1adab04a7e6a0e77758945eebd}{
uint16\_\-t {\bfseries \_\-src\_\-port\_\-begin}}
\label{classFirewallEntry_abe0abc1adab04a7e6a0e77758945eebd}

\item 
\hypertarget{classFirewallEntry_a341e4dfa54de66d1a4b251a621e053b1}{
uint32\_\-t {\bfseries \_\-src\_\-port\_\-end}}
\label{classFirewallEntry_a341e4dfa54de66d1a4b251a621e053b1}

\item 
\hypertarget{classFirewallEntry_a89c12f541b5c1193248f51c3b292ae84}{
uint32\_\-t {\bfseries \_\-dst\_\-port\_\-begin}}
\label{classFirewallEntry_a89c12f541b5c1193248f51c3b292ae84}

\item 
\hypertarget{classFirewallEntry_af5884b124c374028cb703bb15189f0a5}{
uint32\_\-t {\bfseries \_\-dst\_\-port\_\-end}}
\label{classFirewallEntry_af5884b124c374028cb703bb15189f0a5}

\item 
\hypertarget{classFirewallEntry_a98d019e25d4d61157ea8c114a90303bc}{
FirewallEntry::Action {\bfseries \_\-action}}
\label{classFirewallEntry_a98d019e25d4d61157ea8c114a90303bc}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Firewall Table Entry. Representation of a firewall table entry. 

\subsection{Member Function Documentation}
\hypertarget{classFirewallEntry_ac1f36faa3b2d62910006e82e9633643d}{
\index{FirewallEntry@{FirewallEntry}!action2str@{action2str}}
\index{action2str@{action2str}!FirewallEntry@{FirewallEntry}}
\subsubsection[{action2str}]{\setlength{\rightskip}{0pt plus 5cm}string FirewallEntry::action2str (
\begin{DoxyParamCaption}
\item[{FirewallEntry::Action}]{action}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classFirewallEntry_ac1f36faa3b2d62910006e82e9633643d}


Convert firewall entry action value to a string representation. 


\begin{DoxyParams}{Parameters}
{\em action} & \hyperlink{protocolthe-p}{the} action to convert. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} string representation of \hyperlink{protocolthe-p}{the} action value. 
\end{DoxyReturn}
\hypertarget{classFirewallEntry_a06dd8f72459ce928286601d0130a13b4}{
\index{FirewallEntry@{FirewallEntry}!is\_\-ipv4@{is\_\-ipv4}}
\index{is\_\-ipv4@{is\_\-ipv4}!FirewallEntry@{FirewallEntry}}
\subsubsection[{is\_\-ipv4}]{\setlength{\rightskip}{0pt plus 5cm}bool FirewallEntry::is\_\-ipv4 (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classFirewallEntry_a06dd8f72459ce928286601d0130a13b4}


Test whether this is an \hyperlink{classIPv4}{IPv4} entry. 

\begin{DoxyReturn}{Returns}
true if this is an \hyperlink{classIPv4}{IPv4} entry, otherwise false. 
\end{DoxyReturn}
\hypertarget{classFirewallEntry_a531b87215e6b0e3351264f7ff901f79c}{
\index{FirewallEntry@{FirewallEntry}!is\_\-ipv6@{is\_\-ipv6}}
\index{is\_\-ipv6@{is\_\-ipv6}!FirewallEntry@{FirewallEntry}}
\subsubsection[{is\_\-ipv6}]{\setlength{\rightskip}{0pt plus 5cm}bool FirewallEntry::is\_\-ipv6 (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classFirewallEntry_a531b87215e6b0e3351264f7ff901f79c}


Test whether this is an \hyperlink{classIPv6}{IPv6} entry. 

\begin{DoxyReturn}{Returns}
true if this is an \hyperlink{classIPv6}{IPv6} entry, otherwise false. 
\end{DoxyReturn}
\hypertarget{classFirewallEntry_a730d5c487c2dbdd95be7ac6994867d83}{
\index{FirewallEntry@{FirewallEntry}!match@{match}}
\index{match@{match}!FirewallEntry@{FirewallEntry}}
\subsubsection[{match}]{\setlength{\rightskip}{0pt plus 5cm}bool FirewallEntry::match (
\begin{DoxyParamCaption}
\item[{const {\bf FirewallEntry} \&}]{other}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classFirewallEntry_a730d5c487c2dbdd95be7ac6994867d83}


Comparison function for an exact match with \hyperlink{protocolthe-p}{the} entry. 

Note that \hyperlink{protocolthe-p}{the} action is masked off in \hyperlink{protocolthe-p}{the} comparison, and only \hyperlink{protocolthe-p}{the} rule-\/match part of \hyperlink{protocolthe-p}{the} tuple is evaluated.

\begin{DoxyReturn}{Returns}
true if \hyperlink{protocolthe-p}{the} rule-\/match portion of \hyperlink{protocolthe-p}{the} entry is matched, otherwise false. 
\end{DoxyReturn}
\hypertarget{classFirewallEntry_ab1d1a61481a825ce28b21997836d17dd}{
\index{FirewallEntry@{FirewallEntry}!str@{str}}
\index{str@{str}!FirewallEntry@{FirewallEntry}}
\subsubsection[{str}]{\setlength{\rightskip}{0pt plus 5cm}string FirewallEntry::str (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classFirewallEntry_ab1d1a61481a825ce28b21997836d17dd}
\begin{DoxyReturn}{Returns}
a string representation of \hyperlink{protocolthe-p}{the} entry. 
\end{DoxyReturn}
\hypertarget{classFirewallEntry_ad5e118bbe2ff46b519d4c11c702a7443}{
\index{FirewallEntry@{FirewallEntry}!str2action@{str2action}}
\index{str2action@{str2action}!FirewallEntry@{FirewallEntry}}
\subsubsection[{str2action}]{\setlength{\rightskip}{0pt plus 5cm}FirewallEntry::Action FirewallEntry::str2action (
\begin{DoxyParamCaption}
\item[{const string \&}]{name}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classFirewallEntry_ad5e118bbe2ff46b519d4c11c702a7443}


Convert string representation to a firewall entry action value. 


\begin{DoxyParams}{Parameters}
{\em name} & \hyperlink{protocolthe-p}{the} name of \hyperlink{protocolthe-p}{the} action. It is one of \hyperlink{protocolthe-p}{the} following keywords: \char`\"{}none\char`\"{}, \char`\"{}pass\char`\"{}, \char`\"{}drop\char`\"{}, \char`\"{}reject\char`\"{}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{protocolthe-p}{the} firewall entry action value if \hyperlink{protocolthe-p}{the} name is valid, otherwise ACTION\_\-INVALID. 
\end{DoxyReturn}


The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/fea/firewall\_\-entry.hh\item 
/home/greearb/git/xorp.ct.github/xorp/fea/firewall\_\-entry.cc\end{DoxyCompactItemize}
