Check out the new USENIX Web site. next up previous
Next: Expansion and contraction Up: MULTOPS implementation Previous: Data structure


Algorithm

IPRateMonitor's method $\CALL{handle\_packet}$ (given in pseudo-code in Algorithm 5.1) implements the functionality represented by Figure 1. It is, together with method $\CALL{update}$, responsible for implementing the algorithm described in Section 4.4.

\begin{figure}\begin{center}
\begin{pseudocode}{handle\_packet}{port,packet}\IF ...
...\mbox{packet.src\_addr, packet, false}}
\end{pseudocode}\end{center}\end{figure}

IPRateMonitor's 2 input ports should each be logically connected to one of the network interfaces. Port 0 connects to the interface for forward packets, port 1 connects to the interface for reverse packets. (This is achieved through Click configuration.) $port$ is the input of the IPRateMonitor element that packet $packet$ arrived on. This information is passed to $\CALL{update}$ using its $fwd$ parameter.



2001-05-11