more crap
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Fri Feb 27 17:11:24 2009 +0100 (11 months ago)
changeset 106a89ba28d9ea
parent 9 229fc8418aee
child 11 7dc0ba86f063
more crap
.hgignore
Makefile
magic-cow.dia
wns3.tex
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/.hgignore	Fri Feb 27 17:11:24 2009 +0100
     1.3 @@ -0,0 +1,2 @@
     1.4 +^.*~$
     1.5 +^.*pdf$
     1.6 \ No newline at end of file
     2.1 --- a/Makefile	Fri Feb 27 15:54:41 2009 +0100
     2.2 +++ b/Makefile	Fri Feb 27 17:11:24 2009 +0100
     2.3 @@ -9,7 +9,7 @@
     2.4  
     2.5  all: wns3.pdf
     2.6  
     2.7 -wns3.pdf: wns3.tex scenario.pdf object-aggregation.pdf buffer.pdf
     2.8 +wns3.pdf: wns3.tex scenario.pdf object-aggregation.pdf buffer.pdf magic-cow.pdf
     2.9  	pdflatex wns3.tex
    2.10  
    2.11  force:
     3.1 Binary file magic-cow.dia has changed
     4.1 --- a/wns3.tex	Fri Feb 27 15:54:41 2009 +0100
     4.2 +++ b/wns3.tex	Fri Feb 27 17:11:24 2009 +0100
     4.3 @@ -217,6 +217,11 @@
     4.4  \end{itemize}
     4.5  \end{frame}
     4.6  
     4.7 +\begin{frame}{}
     4.8 +
     4.9 +XXX: maybe add more details.
    4.10 +\end{frame}
    4.11 +
    4.12  \section{Diving In: an End To End Tour of a Packet}
    4.13  
    4.14  \begin{frame}{The first event scheduled}
    4.15 @@ -233,17 +238,21 @@
    4.16  \end{itemize}
    4.17  \item Calls \code{OnOffApplication::ScheduleStartEvent}
    4.18  \item Calls \code{Simulator::Schedule} on \code{OnOffApplication::StartSending}
    4.19 +\item Later (very later), user calls \code{Simulator::Run}
    4.20  \end{itemize}
    4.21  \end{frame}
    4.22  
    4.23  
    4.24 -\begin{frame}{The first packet created}
    4.25 +\begin{frame}{The first event executed}
    4.26  
    4.27 +This is the first event called by \code{Simulator::Run}:
    4.28 +\code{OnOffApplication::StartSending}
    4.29  \begin{itemize}
    4.30 -\item \code{OnOffApplication::StartSending}
    4.31  \item Calls \code{OnOffApplication::ScheduleNextTx}
    4.32  \item Calls \code{Simulator::Schedule} on \code{OnOffApplication::SendPacket}
    4.33 -\item \code{OnOffApplication::SendPacket}
    4.34 +\end{itemize}
    4.35 +And the second event: \code{OnOffApplication::SendPacket}
    4.36 +\begin{itemize}
    4.37  \item Calls \code{Create<Packet>}
    4.38  \item Calls \code{m\_txTrace::operator()}
    4.39  \item Calls all connected trace sinks
    4.40 @@ -272,7 +281,40 @@
    4.41  \end{itemize}
    4.42  \end{frame}
    4.43  
    4.44 -\begin{frame}{How the first packet is sent}
    4.45 +\begin{frame}{Magic COW Packets}
    4.46 +ns-3 packets contain a lot of information:
    4.47 +\begin{itemize}
    4.48 +\item Buffer: a byte buffer which contains payload, 
    4.49 +headers, trailers, all in real network format
    4.50 +\item Metadata: information about the type of headers
    4.51 +and trailers located in the byte buffer
    4.52 +\item Tags: extra user-provided information, very useful
    4.53 +for end-to-end simulation-only stuff: timestamps for rtt
    4.54 +calculations, etc.
    4.55 +\end{itemize}
    4.56 +ns-3 packets are magic:
    4.57 +\begin{itemize}
    4.58 +\item They are reference-counted
    4.59 +\item They have Copy On Write semantics: \code{Packet::Copy} does not
    4.60 +create a new packet buffer: it creates a new reference to the
    4.61 +same packet buffer
    4.62 +\item Payload is zero-filled and never allocated by default: only headers
    4.63 +and trailers use memory
    4.64 +\end{itemize}
    4.65 +\end{frame}
    4.66 +
    4.67 +\begin{frame}{Magic COW Packets}
    4.68 +\begin{columns}[T]
    4.69 +\begin{column}{0.7\textwidth}
    4.70 +\includegraphics[width=8cm]{buffer}
    4.71 +\end{column}
    4.72 +\begin{column}{0.3\textwidth}
    4.73 +\includegraphics[width=3cm]{magic-cow}
    4.74 +\end{column}
    4.75 +\end{columns}
    4.76 +\end{frame}
    4.77 +
    4.78 +\begin{frame}{The first packet reaches the UDP layer}
    4.79  
    4.80  Through a Socket... and reaches the UDP layer.
    4.81  \end{frame}