Add Brazilian Portuguese translation (pt-br) of tutorial

This commit is contained in:
Frank Helbert
2012-03-04 15:24:28 -08:00
parent 25acb29db6
commit 91a0402e0d
23 changed files with 10714 additions and 0 deletions

150
doc/tutorial-pt-br/Makefile Normal file
View File

@@ -0,0 +1,150 @@
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
# Additional variables for figures, not sphinx default:
DIA = dia
EPSTOPDF = epstopdf
FIGURES = source/figures
IMAGES_EPS = \
IMAGES_PNG = ${IMAGES_EPS:.eps=.png}
IMAGES_PDF = ${IMAGES_EPS:.eps=.pdf}
IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF)
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
%.eps : %.dia; $(DIA) -t eps $< -e $@
%.png : %.dia; $(DIA) -t png $< -e $@
%.pdf : %.eps; $(EPSTOPDF) $< -o=$@
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
-rm -rf $(BUILDDIR)/*
frag: pickle
@if test ! -d $(BUILDDIR)/frag; then mkdir $(BUILDDIR)/frag; fi
pushd $(BUILDDIR)/frag && ../../pickle-to-xml.py ../pickle/index.fpickle > navigation.xml && popd
cp -r $(BUILDDIR)/pickle/_images $(BUILDDIR)/frag
html: $(IMAGES)
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml: $(IMAGES)
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml: $(IMAGES)
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle: $(IMAGES)
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json: $(IMAGES)
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp: $(IMAGES)
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp: $(IMAGES)
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/ns-3.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ns-3.qhc"
devhelp: $(IMAGES)
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/ns-3"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ns-3"
@echo "# devhelp"
epub: $(IMAGES)
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex: $(IMAGES)
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf: $(IMAGES)
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
make -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text: $(IMAGES)
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man: $(IMAGES)
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
changes: $(IMAGES)
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck: $(IMAGEs)
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest: $(IMAGES)
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

View File

@@ -0,0 +1,18 @@
Please write image files in a vector graphics format, when possible, and
generate the .png and .pdf versions on the fly (see ../Makefile).
The currently supported tool is dia. xfig could be added similarly
if someone wants to add it. The main requirement for adding another format
is that the tool to edit it is freely available and that a cron script can
autogenerate the pdf and png from the figure source. Tgif (.obj) files
were once used but the file conversions require a valid X display to
be running, and are therefore to be avoided since our code server
does not run such a server. Tgif pdf conversions were also cumbersome.
Store the .dia versions in mercurial, but not the .png or .pdfs.
If the figure is not available in a vector graphics format, store both
a .png and a .pdf version in this directory.
If you add a source (.dia) file here, remember to add it to
the list of figure sources in the Makefile in the directory above

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,42 @@
#!/usr/bin/python
# output xml format:
# <pages>
# <page url="xx"><prev url="yyy">zzz</prev><next url="hhh">lll</next><fragment>file.frag</fragment></page>
# ...
# </pages>
import pickle
import os
import codecs
def dump_pickles(out, dirname, filename, path):
f = open(os.path.join(dirname, filename), 'r')
data = pickle.load(f)
fragment_file = codecs.open(data['current_page_name'] + '.frag', mode='w', encoding='utf-8')
fragment_file.write(data['body'])
fragment_file.close()
out.write(' <page url="%s">\n' % path)
out.write(' <fragment>%s.frag</fragment>\n' % data['current_page_name'])
if data['prev'] is not None:
out.write(' <prev url="%s">%s</prev>\n' %
(os.path.normpath(os.path.join(path, data['prev']['link'])),
data['prev']['title']))
if data['next'] is not None:
out.write(' <next url="%s">%s</next>\n' %
(os.path.normpath(os.path.join(path, data['next']['link'])),
data['next']['title']))
out.write(' </page>\n')
f.close()
if data['next'] is not None:
next_path = os.path.normpath(os.path.join(path, data['next']['link']))
next_filename = os.path.basename(next_path) + '.fpickle'
dump_pickles(out, dirname, next_filename, next_path)
return
import sys
sys.stdout.write('<pages>\n')
dump_pickles(sys.stdout, os.path.dirname(sys.argv[1]), os.path.basename(sys.argv[1]), '/')
sys.stdout.write('</pages>')

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,89 @@
.. include:: replace.txt
..
========================================================================================
Translated for portuguese by the students of the inter-institutional doctorate program of IME-USP/UTFPR-CM.
Traduzido para o português pelos alunos do programa de doutorado inter institucional do Instituto de Matemática e Estatística da Universidade de São Paulo --- IME-USP em parceria com a Universidade Tecnológica Federal do Paraná - Campus Campo Mourão --- UTFPR-CM:
* Frank Helbert (frank@ime.usp.br);
* Luiz Arthur Feitosa dos Santos (luizsan@ime.usp.br);
* Rodrigo Campiolo (campiolo@ime.usp.br).
========================================================================================
.. Conclusion
Conclusão
---------
.. Futures
Para o futuro
*************
..
This document is a work in process. We hope and expect it to grow over time
to cover more and more of the nuts and bolts of |ns3|.
Este documento é um trabalho em andamento. Espera-se que cresça com o tempo e cubra mais e mais funcionalidades do |ns3|.
..
We hope to add the following chapters over the next few releases:
Para as próximas versões, os seguintes capítulos são esperados:
..
* The Callback System
* The Object System and Memory Management
* The Routing System
* Adding a New NetDevice and Channel
* Adding a New Protocol
* Working with Real Networks and Hosts
* O sistema de `callback`
* O sistema de objetos e o gerenciamento de memória
* O sistema de roteamento
* Adicionando novos dispositivos de rede e canais de comunicação
* Adicionando novos protocolos
* Trabalhando com redes e `hosts` reais
..
Writing manual and tutorial chapters is not something we all get excited about,
but it is very important to the project. If you are an expert in one of these
areas, please consider contributing to |ns3| by providing one of these
chapters; or any other chapter you may think is important.
Escrever capítulos de manuais e tutoriais não é fácil, mas é muito importante para o projeto. Se você, leitor, é especialista em uma dessas áreas, por favor, considere contribuir com o |ns3| escrevendo um desses capítulos; ou com qualquer outro capítulo que julgue importante.
.. Closing
Finalizando
***********
..
|ns3| is a large and complicated system. It is impossible to cover all
of the things you will need to know in one small tutorial.
O |ns3| é um sistema grande e muito complexo. Por isto, é impossível cobrir todos os aspectos relevantes em um tutorial.
..
We have really just scratched the surface of |ns3| in this tutorial,
but we hope to have covered enough to get you started doing useful networking
research using our favorite simulator.
Ao leitor foi apresentada apenas uma introdução ao |ns3|, entretanto, espera-se que tenha abordado o suficiente para o início de trabalhos e pesquisas relevantes com o simulador.
.. -- The |ns3| development team.
-- Atenciosamente, equipe de desenvolvimento do |ns3|.
**Tradução**
*Traduzido para o português pelos alunos do programa de doutorado inter institucional do Instituto de Matemática e Estatística da Universidade de São Paulo --- IME-USP em parceria com a Universidade Tecnológica Federal do Paraná - Câmpus Campo Mourão --- UTFPR-CM:*
* Frank Helbert (frank@ime.usp.br);
* Luiz Arthur Feitosa dos Santos (luizsan@ime.usp.br);
* Rodrigo Campiolo (campiolo@ime.usp.br).

View File

@@ -0,0 +1,218 @@
# -*- coding: utf-8 -*-
#
# ns-3 documentation build configuration file, created by
# sphinx-quickstart on Tue Dec 14 09:00:39 2010.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys, os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.pngmath']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
source_encoding = 'latin1'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'ns-3'
copyright = u'2008-11, ns-3 project'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = 'ns-3-dev'
# The full version, including alpha/beta/rc tags.
release = 'ns-3-dev'
# The language for content autogenerated by . Refer to babel documentation
# for a list of supported languages.
language = 'pt-br'
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = []
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'ns-3doc'
# -- Options for LaTeX output --------------------------------------------------
# The paper size ('letter' or 'a4').
#latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
#latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'ns-3-tutorial.tex', u'ns-3 Tutorial',
u'ns-3 project', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Additional stuff for the LaTeX preamble.
#latex_preamble = ''
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output --------------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'ns-3-tutorial', u'ns-3 Tutorial',
[u'ns-3 project'], 1)
]

View File

@@ -0,0 +1,746 @@
.. include:: replace.txt
..
========================================================================================
Translated for portuguese by the students of the inter-institutional doctorate program of IME-USP/UTFPR-CM.
Traduzido para o português pelos alunos do programa de doutorado inter institucional do Instituto de Matemática e Estatística da Universidade de São Paulo --- IME-USP em parceria com a Universidade Tecnológica Federal do Paraná - Campus Campo Mourão --- UTFPR-CM:
* Frank Helbert (frank@ime.usp.br);
* Luiz Arthur Feitosa dos Santos (luizsan@ime.usp.br);
* Rodrigo Campiolo (campiolo@ime.usp.br).
========================================================================================
.. Getting Started
Iniciando
---------------
.. Downloading ns-3
Baixando o ns-3
****************
..
The |ns3| system as a whole is a fairly complex system and has a
number of dependencies on other components. Along with the systems you will
most likely deal with every day (the GNU toolchain, Mercurial, you programmer
editor) you will need to ensure that a number of additional libraries are
present on your system before proceeding. |ns3| provides a wiki
for your reading pleasure that includes pages with many useful hints and tips.
One such page is the "Installation" page,
http://www.nsnam.org/wiki/index.php/Installation.
O |ns3|, como um todo, é bastante complexo e possui várias dependências. Isto também é verdade para as ferramentas que fornecem suporte ao |ns3| (exemplos, `"GNU toolchain"`, Mercurial e um editor para a programação), desta forma é necessário assegurar que várias bibliotecas estejam presentes no sistema. O |ns3| fornece um Wiki com várias dicas sobre o sistema. Uma das páginas do Wiki é a página de instalação (`"Installation"`) que está disponível em: http://www.nsnam.org/wiki/index.php/Installation.
..
The "Prerequisites" section of this wiki page explains which packages are
required to support common |ns3| options, and also provides the
commands used to install them for common Linux variants. Cygwin users will
have to use the Cygwin installer (if you are a Cygwin user, you used it to
install Cygwin).
A seção de pré-requisitos (`"Prerequisites"`) do Wiki explica quais pacotes são necessários para a instalação básica do |ns3| e também fornece os comandos usados para a instalação nas variantes mais comuns do Linux. Os usuários do Cygwin devem utilizar o ``Cygwin installer``.
..
You may want to take this opportunity to explore the |ns3| wiki
a bit since there really is a wealth of information there.
Seria interessante explorar um pouco o Wiki, pois lá existe uma grande variedade de informações.
..
From this point forward, we are going to assume that the reader is working in
Linux or a Linux emulation environment (Linux, Cygwin, etc.) and has the GNU
toolchain installed and verified along with the prerequisites mentioned
above. We are also going to assume that you have Mercurial and Waf installed
and running on the target system.
A partir deste ponto considera-se que o leitor está trabalhando com Linux ou em um ambiente que o emule (Linux, Cygwin, etc), que tenha o `"GNU toolchain"` instalado, bem como os pré-requisitos mencionados anteriormente. Também assume-se que o leitor tenha o Mercurial e o Waf instalados e funcionando em seu sistema.
..
The |ns3| code is available in Mercurial repositories on the server
http://code.nsnam.org. You can also download a tarball release at
http://www.nsnam.org/releases/, or you can work with repositories
using Mercurial. We recommend using Mercurial unless there's a good reason
not to. See the end of this section for instructions on how to get a tarball
release.
Os códigos fonte do |ns3| estão disponíveis através dos repositórios do Mercurial no servidor http://code.nsnam.org. Os fontes compactados podem ser obtidos em http://www.nsnam.org/releases/. No final desta seção há instruções de como obter uma versão compactada. No entanto, a não ser que se tenha uma boa razão, recomenda-se o uso do Mercurial para acesso ao código.
..
The simplest way to get started using Mercurial repositories is to use the
``ns-3-allinone`` environment. This is a set of scripts that manages the
downloading and building of various subsystems of |ns3| for you. We
recommend that you begin your |ns3| adventures in this environment
as it can really simplify your life at this point.
A maneira mais simples de iniciar com o Mercurial é usando o ambiente ``ns-3-allinone``. Trata-se de um conjunto de `scripts` que gerencia o baixar e o construir de vários sub-sistemas do |ns3|. Recomenda-se que os pouco experientes iniciem sua aventura neste ambiente, pois irá realmente facilitar a jornada.
.. Downloading ns-3 Using Mercurial
Obtendo o ns-3 usando o Mercurial
++++++++++++++++++++++++++++++++++
..
One practice is to create a directory called ``repos`` in one's home
directory under which one can keep local Mercurial repositories.
*Hint: we will assume you do this later in the tutorial.* If you adopt
that approach, you can get a copy of ``ns-3-allinone`` by typing the
following into your Linux shell (assuming you have installed Mercurial):
Para iniciar, uma boa prática é criar um diretório chamado ``repos`` no diretório `home` sobre o qual será mantido o repositório local do Mercurial. *Dica: iremos assumir que o leitor fez isto no restante deste tutorial, então é bom executar este passo!* Se o leitor adotar esta abordagem é possível obter a cópia do ``ns-3-allinone`` executando os comandos a seguir no `shell` Linux (assumindo que o Mercurial está instalado):
::
cd
mkdir repos
cd repos
hg clone http://code.nsnam.org/ns-3-allinone
..
As the hg (Mercurial) command executes, you should see something like the
following displayed,
Quando executarmos o comando `hg` (Mercurial), teremos como saída algo como:
::
destination directory: ns-3-allinone
requesting all changes
adding changesets
adding manifests
adding file changes
added 31 changesets with 45 changes to 7 files
7 files updated, 0 files merged, 0 files removed, 0 files unresolved
..
After the clone command completes, you should have a directory called
``ns-3-allinone`` under your ``~/repos`` directory, the contents of which should
look something like the following:
Depois que o comando `clone` for executado com sucesso, teremos um diretório chamado ``ns-3-allinone`` dentro do diretório ``~/repos``. O conteúdo deste diretório deve ser algo como:
::
build.py* constants.py dist.py* download.py* README util.py
..
Notice that you really just downloaded some Python scripts. The next step
will be to use those scripts to download and build the |ns3|
distribution of your choice.
Até agora foram baixados alguns `scripts` em Python. O próximo passo será usar estes `scripts` para baixar e construir a distribuição |ns3| de sua escolha.
..
If you go to the following link: http://code.nsnam.org/,
you will see a number of repositories. Many are the private repositories of
the |ns3| development team. The repositories of interest to you will
be prefixed with "ns-3". Official releases of |ns3| will be
numbered as ``ns-3.<release>.<hotfix>``. For example, a second hotfix to a
still hypothetical release forty two of |ns3| would be numbered as
``ns-3.42.2``.
Acessando o endereço: http://code.nsnam.org/, observa-se vários repositórios. Alguns são privados à equipe de desenvolvimento do |ns3|. Os repositórios de interesse ao leitor estarão prefixados com "ns-3". As `releases` oficiais do |ns3| estarão enumeradas da seguinte forma: ``ns-3.<release>.<hotfix>``. Por exemplo, uma segunda atualização de pequeno porte (`hotfix`) de uma hipotética `release` 42, seria enumerada da seguinte maneira: ``ns-3.42.2``.
..
The current development snapshot (unreleased) of |ns3| may be found
at http://code.nsnam.org/ns-3-dev/. The
developers attempt to keep these repository in consistent, working states but
they are in a development area with unreleased code present, so you may want
to consider staying with an official release if you do not need newly-
introduced features.
A versão em desenvolvimento (que ainda não é uma `release` oficial) pode ser encontrada em http://code.nsnam.org/ns-3-dev/. Os desenvolvedores tentam manter este repositório em um estado consistente, mas podem existir códigos instáveis. Recomenda-se o uso de uma `release` oficial, a não ser que se necessite das novas funcionalidades introduzidas.
..
Since the release numbers are going to be changing, I will stick with
the more constant ns-3-dev here in the tutorial, but you can replace the
string "ns-3-dev" with your choice of release (e.g., ns-3.10) in the
text below. You can find the latest version of the
code either by inspection of the repository list or by going to the
`"ns-3 Releases"
<http://www.nsnam.org/releases>`_
web page and clicking on the latest release link.
Uma vez que o número das versões fica mudando constantemente, neste tutorial será utilizada a versão ns-3-dev, mas o leitor pode escolher outra (por exemplo, ns-3.10). A última versão pode ser encontrada inspecionando a lista de repositórios ou acessando a página `"ns-3 Releases" <http://www.nsnam.org/releases>`_ e clicando em `latest release`.
..
Go ahead and change into the ``ns-3-allinone`` directory you created when
you cloned that repository. We are now going to use the ``download.py``
script to pull down the various pieces of |ns3| you will be using.
Entre no diretório ``ns-3-allinone`` criado anteriormente. O arquivo ``download.py`` será usado para baixar as várias partes do |ns3| que serão utilizadas.
..
Go ahead and type the following into your shell (remember you can substitute
the name of your chosen release number instead of ``ns-3-dev`` -- like
``"ns-3.10"`` if you want to work with a
stable release).
Execute os seguintes comandos no `shell` (lembre-se de substituir o número da versão no lugar de ``ns-3-dev`` pela que escolheu, por exemplo, se você optou por usar a décima `release` estável, então deve usar o nome ``"ns-3.10"``).
::
./download.py -n ns-3-dev
..
Note that the default for the ``-n`` option is ``ns-3-dev`` and so the
above is actually redundant. We provide this example to illustrate how to
specify alternate repositories. In order to download ``ns-3-dev`` you
can actually use the defaults and simply type,
O ``ns-3-dev`` é o padrão quando usamos a opção ``-n``, assim o comando poderia ser ``./download.py -n``. O exemplo redundante é apenas para ilustra como especificar repositórios alternativos. Um comando mais simples para obter o ``ns-3-dev`` seria:
::
./download.py
..
As the hg (Mercurial) command executes, you should see something like the
following,
Com o comando `hg` (Mercurial) em execução devemos ver a seguinte saída:
::
#
# Get NS-3
#
Cloning ns-3 branch
=> hg clone http://code.nsnam.org/ns-3-dev ns-3-dev
requesting all changes
adding changesets
adding manifests
adding file changes
added 4634 changesets with 16500 changes to 1762 files
870 files updated, 0 files merged, 0 files removed, 0 files unresolved
..
This is output by the download script as it fetches the actual ``ns-3``
code from the repository.
Esta é a saída do `script` de download obtendo o código atual do repositório ``ns-3``.
..
The download script is smart enough to know that on some platforms various
pieces of ns-3 are not supported. On your platform you may not see some
of these pieces come down. However, on most platforms, the process should
continue with something like,
O `script` de download reconhece que partes do ns-3 não são suportadas na plataforma. Dependendo do sistema, pode ser que a saída não seja exatamente como a mostrada a seguir. Porém, a maioria dos sistemas apresentarão algo como:
::
#
# Get PyBindGen
#
Required pybindgen version: 0.10.0.640
Trying to fetch pybindgen; this will fail if no network connection is available.
Hit Ctrl-C to skip.
=> bzr checkout -rrevno:640 https://launchpad.net/pybindgen pybindgen
Fetch was successful.
..
This was the download script getting the Python bindings generator for you.
Note that you will need bazaar (bzr), a version control system, to download
PyBindGen. Next you should see (modulo platform variations) something along
the lines of,
Este é o `script` de download obtendo um gerador de `bindings` Python --- um `binding` é literalmente a ligação ou ponte entre dois sistemas, chamaremos aqui de extensões Python. Também será necessário o Bazaar (brz) para baixar o PyBindGen. O Bazaar é um sistema de controle de versões. Em seguida, o leitor deve ver (com algumas variações devido as plataformas) algo parecido com as seguintes linhas:
::
#
# Get NSC
#
Required NSC version: nsc-0.5.0
Retrieving nsc from https://secure.wand.net.nz/mercurial/nsc
=> hg clone https://secure.wand.net.nz/mercurial/nsc nsc
requesting all changes
adding changesets
adding manifests
adding file changes
added 273 changesets with 17565 changes to 15175 files
10622 files updated, 0 files merged, 0 files removed, 0 files unresolved
..
This part of the process is the script downloading the Network Simulation
Cradle for you. Note that NSC is not supported on OSX or Cygwin and works
best with gcc-3.4 or gcc-4.2 or greater series.
Neste momento, o `script` de download baixa o `Network Simulation Cradle` - NSC. Note que o NSC não é suportado no OSX ou Cygwin e trabalha melhor com o gcc-3.4, gcc-4.2 ou superiores.
..
After the download.py script completes, you should have several new directories
under ``~/repos/ns-3-allinone``:
Depois que o `script` ``download.py`` tiver completado sua tarefa, veremos vários diretórios novos dentro de ``~/repos/ns-3-allinone``:
::
build.py* constants.pyc download.py* nsc/ README util.pyc
constants.py dist.py* ns-3-dev/ pybindgen/ util.py
..
Go ahead and change into ``ns-3-dev`` under your ``~/repos/ns-3-allinone``
directory. You should see something like the following there:
Por fim, no diretório ``ns-3-dev`` que está dentro do diretório ``~/repos/ns-3-allinone`` deve existir, depois dos passos anteriores, o seguinte conteúdo:
::
AUTHORS doc ns3 scratch testpy.supp VERSION waf-tools
bindings examples README src utils waf* wscript
CHANGES.html LICENSE RELEASE_NOTES test.py* utils.py waf.bat* wutils.py
..
You are now ready to build the |ns3| distribution.
Agora está tudo pronto para a construção da distribuição do |ns3|.
.. Downloading ns-3 Using a Tarball
Obtendo o ns-3 compactado (`Tarball`)
+++++++++++++++++++++++++++++++++++++++
..
The process for downloading |ns3| via tarball is simpler than the
Mercurial process since all of the pieces are pre-packaged for you. You just
have to pick a release, download it and decompress it.
O processo de download do |ns3| compactado é mais simples do que o processo usando o Mercurial, porque tudo que precisamos já vem empacotado. Basta escolher a versão, baixá-la e extraí-la.
..
As mentioned above, one practice is to create a directory called ``repos``
in one's home directory under which one can keep local Mercurial repositories.
One could also keep a ``tarballs`` directory. *Hint: the tutorial
will assume you downloaded into a ``repos`` directory, so remember the
placekeeper.``* If you adopt the ``tarballs`` directory approach, you can
get a copy of a release by typing the following into your Linux shell
(substitute the appropriate version numbers, of course):
Como mencionado anteriormente, uma boa prática é criar um diretório chamado ``repos`` no diretório `home` para manter a cópia local dos repositórios do Mercurial. Da mesma forma, pode-se manter também um diretório chamado ``tarballs`` para manter as versões obtidas via arquivo compactado. *Dica: o tutorial irá assumir que o download foi feito dentro do diretório ``repos``*. Se a opção for pelo método do arquivo compactado, pode-se obter a cópia de uma versão digitando os seguintes comandos no `shell` Linux (obviamente, substitua os números de versões do comando para o valor apropriado):
::
cd
mkdir tarballs
cd tarballs
wget http://www.nsnam.org/releases/ns-allinone-3.10.tar.bz2
tar xjf ns-allinone-3.10.tar.bz2
..
If you change into the directory ``ns-allinone-3.10`` you should see a
number of files:
Dentro do diretório ``ns-allinone-3.10`` extraído, deverá haver algo como:
::
build.py ns-3.10/ pybindgen-0.15.0/ util.py
constants.py nsc-0.5.2/ README
..
You are now ready to build the |ns3| distribution.
Agora está tudo pronto para a construção da distribuição do |ns3|.
.. Building ns-3
Construindo o ns-3
******************
.. Building with build.py
Construindo com o ``build.py``
++++++++++++++++++++++++++++++
..
The first time you build the |ns3| project you should build using the
``allinone`` environment. This will get the project configured for you
in the most commonly useful way.
A primeira construção do |ns3| deve ser feita usando o ambiente ``allinone``. Isto fará com que o projeto seja configurado da maneira mais funcional.
..
Change into the directory you created in the download section above. If you
downloaded using Mercurial you should have a directory called
``ns-3-allinone`` under your ``~/repos`` directory. If you downloaded
using a tarball you should have a directory called something like
``ns-allinone-3.10`` under your ``~/tarballs`` directory. Take a deep
breath and type the following:
Entre no diretório criado na seção "Obtendo o ns-3". Se o Mercurial foi utilizado, então haverá um diretório chamado ``ns-3-allinone`` localizado dentro de ``~/repos``. Se foi utilizado o arquivo compactado, haverá um diretório chamado ``ns-allinone-3.10`` dentro do diretório ``~/tarballs``. Lembre-se de adequar os nomes conforme os arquivos obtidos e diretórios criados. Agora, digite o seguinte comando:
::
./build.py --enable-examples --enable-tests
..
Because we are working with examples and tests in this tutorial, and
because they are not built by default in |ns3|, the arguments for
build.py tells it to build them for us. In the future you can build
|ns3| without examples and tests if you wish.
Foram utilizadas as opções ``--enable-examples`` e ``--enable-tests`` pois o tutorial irá trabalhar com exemplos e testes, e, por padrão, eles não são construídos. Futuramente, o leitor poderá construir sem estas opções.
..
You will see lots of typical compiler output messages displayed as the build
script builds the various pieces you downloaded. Eventually you should see the
following magic words:
Serão exibidas muitas saídas típicas de um compilador conforme o código é construído. Finalmente, no final do processo, deverá aparecer uma saída como esta:
::
Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build'
'build' finished successfully (2m30.586s)
Modules built:
aodv applications bridge
click config-store core
csma csma-layout dsdv
emu energy flow-monitor
internet lte mesh
mobility mpi netanim
network nix-vector-routing ns3tcp
ns3wifi olsr openflow
point-to-point point-to-point-layout propagation
spectrum stats tap-bridge
template test tools
topology-read uan virtual-net-device
visualizer wifi wimax
..
Once the project has built you can say goodbye to your old friends, the
``ns-3-allinone`` scripts. You got what you needed from them and will now
interact directly with Waf and we do it in the ``ns-3-dev`` directory,
not in the ``ns-3-allinone`` directory. Go ahead and change into the
``ns-3-dev`` directory (or the directory for the appropriate release you
downloaded.
Uma vez que o projeto foi construído, pode-se deixar de lado os `scripts` ``ns-3-allinone``. O leitor já obteve o que precisava e agora irá interagir diretamente com o Waf no diretório ``ns-3-dev``. Mude para o diretório ``ns-3-dev`` (ou para o diretório apropriado de sua versão).
::
cd ns-3-dev
.. Building with Waf
Construindo com o Waf
+++++++++++++++++++++
..
We use Waf to configure and build the |ns3| project. It's not
strictly required at this point, but it will be valuable to take a slight
detour and look at how to make changes to the configuration of the project.
Probably the most useful configuration change you can make will be to
build the optimized version of the code. By default you have configured
your project to build the debug version. Let's tell the project to
make an optimized build. To explain to Waf that it should do optimized
builds that include the examples and tests, you will need to execute the
following command,
O Waf é utilizado para configurar e construir o projeto do |ns3|. Não é estritamente necessário neste ponto, mas será valioso quando se forem necessárias alterações nas configurações do projeto. Provavelmente a mudança mais útil que será feita futuramente é a construção de uma versão do código otimizado. Por padrão, o projeto é construído com a opção de depuração (`debug`), para verificação de erros. Então, para construir um projeto otimizado, deve-se executar o seguinte comando (ainda com suporte a testes e exemplos):
::
./waf -d optimized --enable-examples --enable-tests configure
..
This runs Waf out of the local directory (which is provided as a convenience
for you). As the build system checks for various dependencies you should see
output that looks similar to the following,
Isto executa o Waf fora do diretório local (o que é bem conveniente). Como o sistema em construção verifica várias dependências, deverá aparecer uma saída similar com a que segue:
::
Checking for program g++ : ok /usr/bin/g++
Checking for program cpp : ok /usr/bin/cpp
Checking for program ar : ok /usr/bin/ar
Checking for program ranlib : ok /usr/bin/ranlib
Checking for g++ : ok
Checking for program pkg-config : ok /usr/bin/pkg-config
Checking for -Wno-error=deprecated-declarations support : yes
Checking for -Wl,--soname=foo support : yes
Checking for header stdlib.h : ok
Checking for header signal.h : ok
Checking for header pthread.h : ok
Checking for high precision time implementation : 128-bit integer
Checking for header stdint.h : ok
Checking for header inttypes.h : ok
Checking for header sys/inttypes.h : not found
Checking for library rt : ok
Checking for header netpacket/packet.h : ok
Checking for pkg-config flags for GSL : ok
Checking for header linux/if_tun.h : ok
Checking for pkg-config flags for GTK_CONFIG_STORE : ok
Checking for pkg-config flags for LIBXML2 : ok
Checking for library sqlite3 : ok
Checking for NSC location : ok ../nsc (guessed)
Checking for library dl : ok
Checking for NSC supported architecture x86_64 : ok
Checking for program python : ok /usr/bin/python
Checking for Python version >= 2.3 : ok 2.5.2
Checking for library python2.5 : ok
Checking for program python2.5-config : ok /usr/bin/python2.5-config
Checking for header Python.h : ok
Checking for -fvisibility=hidden support : yes
Checking for pybindgen location : ok ../pybindgen (guessed)
Checking for Python module pybindgen : ok
Checking for pybindgen version : ok 0.10.0.640
Checking for Python module pygccxml : ok
Checking for pygccxml version : ok 0.9.5
Checking for program gccxml : ok /usr/local/bin/gccxml
Checking for gccxml version : ok 0.9.0
Checking for program sudo : ok /usr/bin/sudo
Checking for program hg : ok /usr/bin/hg
Checking for program valgrind : ok /usr/bin/valgrind
---- Summary of optional NS-3 features:
Threading Primitives : enabled
Real Time Simulator : enabled
Emulated Net Device : enabled
GNU Scientific Library (GSL) : enabled
Tap Bridge : enabled
GtkConfigStore : enabled
XmlIo : enabled
SQlite stats data output : enabled
Network Simulation Cradle : enabled
Python Bindings : enabled
Python API Scanning Support : enabled
Use sudo to set suid bit : not enabled (option --enable-sudo not selected)
Build tests : enabled
Build examples : enabled
Static build : not enabled (option --enable-static not selected)
'configure' finished successfully (2.870s)
..
Note the last part of the above output. Some ns-3 options are not enabled by
default or require support from the underlying system to work properly.
For instance, to enable XmlTo, the library libxml-2.0 must be found on the
system. If this library were not found, the corresponding |ns3| feature
would not be enabled and a message would be displayed. Note further that there is
a feature to use the program ``sudo`` to set the suid bit of certain programs.
This is not enabled by default and so this feature is reported as "not enabled."
Repare a última parte da saída. Algumas opções do ns-3 não estão habilitadas por padrão ou necessitam de algum suporte do sistema para funcionar corretamente. Por exemplo, para habilitar XmlTo, a biblioteca libxml-2.0 deve estar presente no sistema. Se a biblioteca não estiver instalada esta funcionalidade não é habilitada no |ns3| e uma mensagem é apresentada. Note também que existe uma funcionalidade que utiliza o Sudo para configurar o `suid` de certos programas. Isto não está habilitado por padrão, então esta funcionalidade é reportada como não habilitada (``not enabled``).
..
Now go ahead and switch back to the debug build that includes the examples and tests.
Vamos configurar uma construção do |ns3| com suporte a depuração, bem como, vamos incluir exemplos e testes. Para isto devemos executar:
::
./waf -d debug --enable-examples --enable-tests configure
..
The build system is now configured and you can build the debug versions of
the |ns3| programs by simply typing,
Pronto o sistema está configurado, agora podemos construir nossa versão digitando:
::
./waf
..
Some waf commands are meaningful during the build phase and some commands are valid
in the configuration phase. For example, if you wanted to use the emulation
features of |ns3|, you might want to enable setting the suid bit using
sudo as described above. This turns out to be a configuration-time command, and so
you could reconfigure using the following command that also includes the examples and tests
Alguns comandos do Waf são válidos apenas na fase de construção e outros são válidos na fase de configuração do sistema. Por exemplo, se o leitor espera usar características de emulação do |ns3|, deve habilitar o `suid` usando o Sudo como descrito anteriormente, isto na fase de configuração. O comando utilizado, incluindo exemplos e testes, será:
::
./waf -d debug --enable-sudo --enable-examples --enable-tests configure
..
If you do this, waf will have run sudo to change the socket creator programs of the
emulation code to run as root. There are many other configure- and build-time options
available in waf. To explore these options, type:
Com esta configuração, o Waf executará o Sudo para alterar programas que criam soquetes para executar o código de emulação como `root`. Existem várias outras opções de configuração e construção disponíveis no Waf. Para explorar estas opções, digite:
::
./waf --help
..
We'll use some of the testing-related commands in the next section.
Alguns comandos de teste serão utilizados na próxima seção.
..
Okay, sorry, I made you build the |ns3| part of the system twice,
but now you know how to change the configuration and build optimized code.
Como pôde ser notado, a construção do |ns3| foi feita duas vezes. Isto para que o leitor saiba como trocar a configuração para construir código otimizado no futuro.
.. Testing ns-3
Testando o ns-3
***************
..
You can run the unit tests of the |ns3| distribution by running the
"./test.py -c core" script,
Para executar os testes de unidade do |ns3|, basta chamar o arquivo ``./test.py`` da seguinte forma:
::
./test.py -c core
..
These tests are run in parallel by waf. You should eventually
see a report saying that,
Estes testes são executados em paralelo pelo Waf. No final, uma mensagem como a que segue deve aparecer.
::
47 of 47 tests passed (47 passed, 0 failed, 0 crashed, 0 valgrind errors)
..
This is the important message.
Esta é uma mensagem importante.
..
You will also see output from the test runner and the output will actually look something like,
Também haverá saídas da execução do teste e estas geralmente são algo como:
::
Waf: Entering directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build'
Waf: Leaving directory `/home/craigdo/repos/ns-3-allinone/ns-3-dev/build'
'build' finished successfully (1.799s)
Modules built:
aodv applications bridge
click config-store core
csma csma-layout dsdv
emu energy flow-monitor
internet lte mesh
mobility mpi netanim
network nix-vector-routing ns3tcp
ns3wifi olsr openflow
point-to-point point-to-point-layout propagation
spectrum stats tap-bridge
template test tools
topology-read uan virtual-net-device
visualizer wifi wimax
PASS: TestSuite ns3-wifi-interference
PASS: TestSuite histogram
PASS: TestSuite sample
PASS: TestSuite ipv4-address-helper
PASS: TestSuite devices-wifi
PASS: TestSuite propagation-loss-model
...
PASS: TestSuite attributes
PASS: TestSuite config
PASS: TestSuite global-value
PASS: TestSuite command-line
PASS: TestSuite basic-random-number
PASS: TestSuite object
PASS: TestSuite random-number-generators
95 of 95 tests passed (95 passed, 0 failed, 0 crashed, 0 valgrind errors)
..
This command is typically run by ``users`` to quickly verify that an
|ns3| distribution has built correctly.
Este comando é normalmente executado pelos usuários para verificar se o |ns3| foi construído corretamente.
.. Running a Script
Executando um código (`Script`)
*******************************
..
We typically run scripts under the control of Waf. This allows the build
system to ensure that the shared library paths are set correctly and that
the libraries are available at run time. To run a program, simply use the
``--run`` option in Waf. Let's run the |ns3| equivalent of the
ubiquitous hello world program by typing the following:
Os códigos normalmente são executados sob o controle do Waf. Isto assegura que os caminhos das bibliotecas compartilhadas estejam corretas e que estarão disponíveis em tempo de execução. Para executar um programa, basta usar a opção ``--run`` no Waf. Para executar um equivalente ao "Olá mundo" (`Hello world`) no |ns3|, utilizamos o comando:
::
./waf --run hello-simulator
..
Waf first checks to make sure that the program is built correctly and
executes a build if required. Waf then executes the program, which
produces the following output.
O Waf primeiro verifica se o programa foi construído corretamente e se necessário, o constrói. Então executa o programa, que fornece a seguinte saída:
::
Hello Simulator
..
*Congratulations. You are now an ns-3 user.*
*Parabéns. Você agora é um usuário ns-3*
..
*What do I do if I don't see the output?*
*O que fazer se o comando não gerar uma saída?*
..
If you see ``waf`` messages indicating that the build was
completed successfully, but do not see the "Hello Simulator" output,
chances are that you have switched your build mode to "optimized" in
the "Building with Waf" section, but have missed the change back to
"debug" mode. All of the console output used in this tutorial uses a
special |ns3| logging component that is useful for printing
user messages to the console. Output from this component is
automatically disabled when you compile optimized code -- it is
"optimized out." If you don't see the "Hello Simulator" output,
type the following,
Se a mensagem ``Hello Simulator`` não aparece, mas o Waf gera saídas indicando que a construção do sistema foi executada com sucesso, é possível que o leitor tenha trocado o sistema para o modo otimizado na seção `Construindo com o Waf`, e tenha esquecido de voltar ao modo de depuração. Todas as saídas utilizadas neste tutorial são feitas com um componente especial de registro (`logging`) do |ns3| que é muito útil para mostrar mensagens na tela. As saídas deste componente são automaticamente desabilitadas quando o código é contruído na forma otimizada. Para produzir as saídas, digite o seguinte comando,
::
./waf -d debug --enable-examples --enable-tests configure
..
to tell ``waf`` to build the debug versions of the |ns3|
programs that includes the examples and tests. You must still build
the actual debug version of the code by typing,
para dizer ao Waf para construir o |ns3| com a versão de depuração e incluir exemplos e testes. Ainda é necessário digitar o seguinte comando para a construção:
::
./waf
..
Now, if you run the ``hello-simulator`` program, you should see the
expected output.
Agora, ao executar o programa ``hello-simulator`` devemos ter a seguinte a saída.
..
If you want to run programs under another tool such as gdb or valgrind,
see this `wiki entry
<http://www.nsnam.org/wiki/index.php/User_FAQ#How_to_run_NS-3_programs_under_another_tool>`_.
Se o leitor for executar seus programas sob outras ferramentas, tais como Gdb ou Valgrind, é recomendável que leia a seguinte `entrada no Wiki <http://www.nsnam.org/wiki/index.php/User_FAQ#How_to_run_NS-3_programs_under_another_tool>`_.

View File

@@ -0,0 +1,51 @@
.. only:: html or latex
..
========================================================================================
Translated for portuguese by the students of doctorate inter institutional program of IME-USP/UTFPR-CM.
Traduzido para o português pelos alunos do programa de doutorado inter institucional do Instituto de Matemática e Estatística da Universidade de São Paulo --- IME-USP em parceria com a Universidade Tecnológica Federal do Paraná - Campus Campo Mourão --- UTFPR-CM:
* Frank Helbert (frank@ime.usp.br);
* Luiz Arthur Feitosa dos Santos (luizsan@ime.usp.br);
* Rodrigo Campiolo (rcampiol@ime.usp.br).
========================================================================================
ns-3 Tutorial
===========================
..
This is the *ns-3 Tutorial*. Primary documentation for the ns-3 project is
available in five forms:
Este é o *Tutorial do ns-3* baseado no *ns-3 Tutorial* (inglês). A documentação para o projeto ns-3 esta disponível da seguinte forma:
..
* `ns-3 Doxygen <http://www.nsnam.org/doxygen/index.html>`_: Documentation of the public APIs of the simulator
* `ns-3 Doxygen <http://www.nsnam.org/doxygen/index.html>`_: Documentação das APIs públicas do simulador;
..
* Tutorial *(this document)*, Manual, and Model Library for the `latest release <http://www.nsnam.org/documentation/latest/>`_ and `development tree <http://www.nsnam.org/ns-3-dev/documentation/>`_
* Tutorial *(este documento)*, manual, modelos de bibliotecas para a `última release <http://www.nsnam.org/documentation/latest/>`_ e `árvore de desenvolvimento <http://www.nsnam.org/ns-3-dev/documentation/>`_;
* `ns-3 wiki <http://www.nsnam.org/wiki/index.php/Main_Page>`_.
..
This document is written in `reStructuredText <http://docutils.sourceforge.net/rst.html>`_ for `Sphinx <http://sphinx.pocoo.org/>`_ and is maintained in the
``doc/tutorial`` directory of ns-3's source code.
Este documento é escrito em `reStructuredText <http://docutils.sourceforge.net/rst.html>`_ para `Sphinx <http://sphinx.pocoo.org/>`_ e é mantido no diretório ``doc/tutorial-pt-br`` do código fonte do ns-3.
.. toctree::
:maxdepth: 2
introduction
resources
getting-started
conceptual-overview
tweaking
building-topologies
tracing
conclusion

View File

@@ -0,0 +1,192 @@
.. include:: replace.txt
..
========================================================================================
Translated for portuguese by the students of the inter-institutional doctorate program of IME-USP/UTFPR-CM.
Traduzido para o português pelos alunos do programa de doutorado inter institucional do Instituto de Matemática e Estatística da Universidade de São Paulo --- IME-USP em parceria com a Universidade Tecnológica Federal do Paraná - Campus Campo Mourão --- UTFPR-CM:
* Frank Helbert (frank@ime.usp.br);
* Luiz Arthur Feitosa dos Santos (luizsan@ime.usp.br);
* Rodrigo Campiolo (campiolo@ime.usp.br).
========================================================================================
Introdução
-----------
..
The |ns3| simulator is a discrete-event network simulator targeted
primarily for research and educational use. The
`ns-3 project
<http://www.nsnam.org>`_,
started in 2006, is an open-source project developing |ns3|.
O |ns3| é um simulador de redes baseado em eventos discretos desenvolvido especialmente para pesquisa e uso educacional. O `projeto ns-3 <http://www.nsnam.org>`_ iniciou em 2006 e tem seu código aberto.
..
The purpose of this tutorial is to introduce new |ns3| users to the
system in a structured way. It is sometimes difficult for new users to
glean essential information from detailed manuals and to convert this
information into working simulations. In this tutorial, we will build
several example simulations, introducing and explaining key concepts and
features as we go.
O objetivo deste tutorial é apresentar o |ns3| de forma estruturada aos usuários iniciantes. Algumas vezes torna-se difícil obter informações básicas de manuais detalhados e converter em informações úteis para as simulações. Neste tutorial são ilustrados vários exemplos de simulações, introduzindo e explicando os principais conceitos necessários ao longo do texto.
..
As the tutorial unfolds, we will introduce the full |ns3| documentation
and provide pointers to source code for those interested in delving deeper
into the workings of the system.
A documentação completa do |ns3| e trechos do código fonte são apresentados para os interessados em aprofundar-se no funcionamento do sistema.
..
A few key points are worth noting at the onset:
Alguns pontos importantes para se observar:
..
* Ns-3 is not an extension of `ns-2
<http://www.isi.edu/nsnam/ns>`_;
it is a new simulator. The two simulators are both written in C++ but
|ns3| is a new simulator that does not support the ns-2 APIs. Some
models from ns-2 have already been ported from ns-2 to |ns3|. The
project will continue to maintain ns-2 while |ns3| is being built,
and will study transition and integration mechanisms.
* O |ns3| não é uma extensão do `ns-2 <http://www.isi.edu/nsnam/ns>`_; O |ns3| é um simulador novo. Ambos são escritos em C++, mas o |ns3| é totalmente novo e não suporta as APIs da versão anterior. Algumas funcionalidades do ns-2 já foram portadas para o |ns3|. O projeto continuará mantendo o ns-2 enquanto o |ns3| estiver em fase de desenvolvimento e formas de integração e transição estão em estudo.
..
* |ns3| is open-source, and the project strives to maintain an
open environment for researchers to contribute and share their software.
* O |ns3| é código aberto e existe um grande esforço para manter um ambiente aberto para pesquisadores que queiram contribuir e compartilhar software com o projeto.
..
For ns-2 Users
Para os usuários do ns-2
*************************
..
For those familiar with ns-2, the most visible outward change when moving to
|ns3| is the choice of scripting language. Ns-2 is
scripted in OTcl and results of simulations can be visualized using the
Network Animator nam. It is not possible to run a simulation
in ns-2 purely from C++ (i.e., as a main() program without any OTcl).
Moreover, some components of ns-2 are written in C++ and others in OTcl.
In |ns3|, the simulator is written entirely in C++, with optional
Python bindings. Simulation scripts can therefore be written in C++
or in Python. The results of some simulations can be visualized by
nam, but new animators are under development. Since |ns3|
generates pcap packet trace files, other utilities can be used to
analyze traces as well.
In this tutorial, we will first concentrate on scripting
directly in C++ and interpreting results via trace files.
Para aqueles familiarizados com o ns-2 a mudança mais visível é a escolha da linguagem de codificação (*scripting*). O ns-2 utiliza a linguagem OTcl e os resultados das simulações podem ser visualizados utilizando o *Network Animator - nam*. Entretanto, não é possível executar uma simulação escrita inteira em C++ no ns-2 (por exemplo, com um ``main()`` sem nenhum código OTcl). Assim sendo, no ns-2 alguns componentes são escritos em C++ e outros em OTcl. No |ns3|, todo o simulador é escrito em C++ com suporte opcional a Python. Desta forma, os códigos de simulação podem ser escritos somente em C++ ou Python. Os resultados de algumas simulações podem ser visualizados pelo *nam*, mas novas formas de visualização estão sendo desenvolvidas. O |ns3| gera arquivos de rastreamento de pacotes *(packet trace)* no formato *pcap*, assim, é possível utilizar outras ferramentas para a análise de pacotes. Neste tutorial iremos nos concentrar inicialmente nos códigos de simulação escritos em C++ e na interpretação dos pacotes nos arquivos de rastreamento.
..
But there are similarities as well (both, for example, are based on C++
objects, and some code from ns-2 has already been ported to |ns3|).
We will try to highlight differences between ns-2 and |ns3|
as we proceed in this tutorial.
Também existem semelhanças entre o ns-2 e o |ns3|. Ambos, por exemplo, são orientados a objeto e parte do código do ns-2 já foi portado para o |ns3|. As diferenças entre as versões serão destacadas ao longo deste tutorial.
..
A question that we often hear is "Should I still use ns-2 or move to
|ns3|?" The answer is that it depends. |ns3| does not have
all of the models that ns-2 currently has, but on the other hand, |ns3|
does have new capabilities (such as handling multiple interfaces on nodes
correctly, use of IP addressing and more alignment with Internet
protocols and designs, more detailed 802.11 models, etc.). ns-2
models can usually be ported to |ns3| (a porting guide is under
development). There is active development on multiple fronts for
|ns3|. The |ns3| developers believe (and certain early users
have proven) that |ns3| is ready for active use, and should be an
attractive alternative for users looking to start new simulation projects.
Uma questão que frequentemente aparece é: "Eu devo continuar usando o ns-2 ou devo migrar para o |ns3|?". A resposta é: depende. O |ns3| não tem todos os modelos do ns-2, contudo, possui novas funcionalidades (tais como: trabalha corretamente com nós de rede com múltiplas interfaces de rede (por exemplo, computadores com várias placas de rede), usa endereçamento IP, é mais consistente com arquiteturas e protocolos da Internet, detalha mais o modelo 802.11, etc.). Em todo o caso, os modelos do ns-2 podem ser portados para o |ns3| (um guia está em desenvolvimento). Atualmente existem várias frentes de trabalho para o desenvolvimento do simulador. Os desenvolvedores acreditam (e os primeiros usuários concordam) que o |ns3| está pronto para o uso e é uma ótima alternativa para usuários que querem iniciar novos projetos de simulação.
..
Contributing
Contribuindo
************
..
|ns3| is a research and educational simulator, by and for the
research community. It will rely on the ongoing contributions of the
community to develop new models, debug or maintain existing ones, and share
results. There are a few policies that we hope will encourage people to
contribute to |ns3| like they have for ns-2:
O |ns3| é um simulador para pesquisas e de uso educacional, feito por e para pesquisadores. Este conta com contribuições da comunidade para desenvolver novos modelos, corrigir erros ou manter códigos e compartilhar os resultados. Existem políticas de incentivo para que as pessoas contribuam com o projeto, assim como foi feito no ns-2, tais como:
..
* Open source licensing based on GNU GPLv2 compatibility
* Licença de código aberto compatível com GNU GPLv2;
* `Wiki <http://www.nsnam.org/wiki/index.php>`_;
..
* `Contributed Code
<http://www.nsnam.org/wiki/index.php/Contributed_Code>`_ page, similar to ns-2's popular Contributed Code
`page
<http://nsnam.isi.edu/nsnam/index.php/Contributed_Code>`_
* Página para `contribuição com o código <http://www.nsnam.org/wiki/index.php/Contributed_Code>`_, similar a página de contribuição do `ns-2 <http://nsnam.isi.edu/nsnam/index.php/Contributed_Code>`_;
..
* Open `bug tracker
<http://www.nsnam.org/bugzilla>`_
* `Registro de erros (bugs) <http://www.nsnam.org/bugzilla>`_ aberto.
..
We realize that if you are reading this document, contributing back to
the project is probably not your foremost concern at this point, but
we want you to be aware that contributing is in the spirit of the project and
that even the act of dropping us a note about your early experience
with |ns3| (e.g. "this tutorial section was not clear..."),
reports of stale documentation, etc. are much appreciated.
Se você está lendo este documento, provavelmente contribuir diretamente não seja o foco neste momento, mas esteja ciente que contribuir está no espírito do projeto, mesmo que seja deixando uma mensagem descrevendo suas experiências com o |ns3| (por exemplo, você pode relatar qual seção deste tutorial não esta clara), reportar a desatualização da documentação, etc. Toda ajuda será muita bem vinda.
..
Tutorial Organization
Organização do Tutorial
***********************
..
The tutorial assumes that new users might initially follow a path such as the
following:
Este tutorial assume que os novos usuários podem iniciar da seguinte forma:
..
* Try to download and build a copy;
* Baixar e compilar uma cópia do |ns3|;
..
* Try to run a few sample programs;
* Executar alguns programas exemplo;
..
* Look at simulation output, and try to adjust it.
* Analisar as saídas de simulação e ajustá-las.
..
As a result, we have tried to organize the tutorial along the above
broad sequences of events.
Assim, tentamos organizar este tutorial nesta sequência.

View File

@@ -0,0 +1,3 @@
.. |ns3| replace:: *ns-3*
.. |ns2| replace:: *ns-2*

View File

@@ -0,0 +1,227 @@
.. include:: replace.txt
..
========================================================================================
Translated for portuguese by the students of the inter-institutional doctorate program of IME-USP/UTFPR-CM.
Traduzido para o português pelos alunos do programa de doutorado inter institucional do Instituto de Matemática e Estatística da Universidade de São Paulo --- IME-USP em parceria com a Universidade Tecnológica Federal do Paraná - Campus Campo Mourão --- UTFPR-CM:
* Frank Helbert (frank@ime.usp.br);
* Luiz Arthur Feitosa dos Santos (luizsan@ime.usp.br);
* Rodrigo Campiolo (campiolo@ime.usp.br).
========================================================================================
.. Resources
Recursos
---------
.. The Web
A Internet
**********
..
There are several important resources of which any |ns3| user must be
aware. The main web site is located at http://www.nsnam.org and
provides access to basic information about the |ns3| system. Detailed
documentation is available through the main web site at
http://www.nsnam.org/documents.html. You can also find documents
relating to the system architecture from this page.
Há vários recursos importantes que um usuário do |ns3| deve conhecer. O principal está em http://www.nsnam.org e fornece acesso a informações básicas sobre o |ns3|. A documentação detalhada esta disponível no sítio principal através do endereço http://www.nsnam.org/documents.html. Nesta página, também podem ser encontrados documentos relacionados a arquitetura do sistema.
..
There is a Wiki that complements the main |ns3| web site which you will
find at http://www.nsnam.org/wiki/. You will find user and developer
FAQs there, as well as troubleshooting guides, third-party contributed code,
papers, etc.
Também existe um *Wiki* que completa o sítio do |ns3| e pode ser encontrado em http://www.nsnam.org/wiki/. Nesta página são encontradas perguntas freqüentes - FAQs (do inglês, *Frequently Asked Questions*) para usuários e desenvolvedores, guias para resolução de problemas, código de terceiros, artigos, etc.
..
The source code may be found and browsed at http://code.nsnam.org/.
There you will find the current development tree in the repository named
``ns-3-dev``. Past releases and experimental repositories of the core
developers may also be found there.
O código fonte também pode ser encontrado e explorado em http://code.nsnam.org/. Neste encontra-se a árvore de código em desenvolvimento em um repositório chamado ``ns-3-dev``. Repositórios antigos e experimentais do núcleo de desenvolvimento podem ser encontrados neste sítio também.
Mercurial
*********
..
Complex software systems need some way to manage the organization and
changes to the underlying code and documentation. There are many ways to
perform this feat, and you may have heard of some of the systems that are
currently used to do this. The Concurrent Version System (CVS) is probably
the most well known.
Sistemas complexos precisam gerenciar a organização e alterações do código, bem como a documentação. Existem várias maneiras de fazer isto e o leitor provavelmente já ouviu falar de algumas. O *Concurrent Version System (CVS)* --- em português, Sistema de Versões Concorrentes --- é provavelmente o mais conhecido.
..
The |ns3| project uses Mercurial as its source code management system.
Although you do not need to know much about Mercurial in order to complete
this tutorial, we recommend becoming familiar with Mercurial and using it
to access the source code. Mercurial has a web site at
http://www.selenic.com/mercurial/,
from which you can get binary or source releases of this Software
Configuration Management (SCM) system. Selenic (the developer of Mercurial)
also provides a tutorial at
http://www.selenic.com/mercurial/wiki/index.cgi/Tutorial/,
and a QuickStart guide at
http://www.selenic.com/mercurial/wiki/index.cgi/QuickStart/.
O |ns3| utiliza o Mercurial para isto. Embora não seja necessário conhecer muito sobre o Mercurial para entender este tutorial, recomenda-se a familiarização com o uso da ferramenta para acessar o código fonte do sistema. O Mercurial tem um sítio em http://www.selenic.com/mercurial/, no qual pode-se baixar diretamente os executáveis ou o código fonte deste sistema de *Software Configuration Management (SCM)* --- em português, Software de Gerenciamento de Configuração. Selenic (o desenvolvedor do Mercurial), também fornece tutoriais em http://www.selenic.com/mercurial/wiki/index.cgi/Tutorial/, e um guia rápido em http://www.selenic.com/mercurial/wiki/index.cgi/QuickStart/.
..
You can also find vital information about using Mercurial and |ns3|
on the main |ns3| web site.
Informações vitais de como usar o Mercurial e o |ns3| são encontradas no sítio principal do projeto.
Waf
***
..
Once you have source code downloaded to your local system, you will need
to compile that source to produce usable programs. Just as in the case of
source code management, there are many tools available to perform this
function. Probably the most well known of these tools is ``make``. Along
with being the most well known, ``make`` is probably the most difficult to
use in a very large and highly configurable system. Because of this, many
alternatives have been developed. Recently these systems have been developed
using the Python language.
Uma vez baixado o código fonte para o seu sistema de arquivos local, será necessário compilar estes fontes para criar os executáveis. Para esta tarefa existem várias ferramentas disponíveis. Provavelmente a mais conhecida é o Make. Além de mais conhecido, também deve ser o mais difícil de usar em grandes sistemas e com muitas opções de configuração. Por este motivo, muitas alternativas foram desenvolvidas, utilizando principalmente a linguagem Python.
..
The build system Waf is used on the |ns3| project. It is one
of the new generation of Python-based build systems. You will not need to
understand any Python to build the existing |ns3| system, and will
only have to understand a tiny and intuitively obvious subset of Python in
order to extend the system in most cases.
O Waf é utilizado para gerar os binários no projeto |ns3|. Ele faz parte da nova geração de sistemas de compilação e contrução baseados em Python. O leitor não precisa entender nada de Python para compilar o |ns3|, e terá que entender um pequeno e intuitivo subconjunto da linguagem se quiser estender o sistema.
..
For those interested in the gory details of Waf, the main web site can be
found at http://code.google.com/p/waf/.
Para os interessados em mais detalhes sobre o Waf, basta acessar o sítio http://code.google.com/p/waf/.
.. Development Environment
Ambiente de Desenvolvimento
***************************
..
As mentioned above, scripting in |ns3| is done in C++ or Python.
As of ns-3.2, most of the |ns3| API is available in Python, but the
models are written in C++ in either case. A working
knowledge of C++ and object-oriented concepts is assumed in this document.
We will take some time to review some of the more advanced concepts or
possibly unfamiliar language features, idioms and design patterns as they
appear. We don't want this tutorial to devolve into a C++ tutorial, though,
so we do expect a basic command of the language. There are an almost
unimaginable number of sources of information on C++ available on the web or
in print.
Como mencionado anteriormente, a programação no |ns3| é feita em C++ ou Python. A partir do ns-3.2, a maioria das APIs já estão disponíveis em Python, mas os modelos continuam sendo escritos em C++. Considera-se que o leitor possui conhecimento básico de C++ e conceitos de orientação a objetos neste documento. Somente serão revistos conceitos avançados, possíveis características pouco utilizadas da linguagem, dialetos e padrões de desenvolvimento. O objetivo não é tornar este um tutorial de C++, embora seja necessário saber o básico da linguagem. Para isto, existe um número muito grande de fontes de informação na Web e em materiais impressos (livros, tutoriais, revistas, etc).
..
If you are new to C++, you may want to find a tutorial- or cookbook-based
book or web site and work through at least the basic features of the language
before proceeding. For instance, `this tutorial
<http://www.cplusplus.com/doc/tutorial/>`_.
Se você é inexperiente em C++, pode encontrar tutoriais, livros e sítios Web para obter o mínimo de conhecimento sobre a linguagem antes de continuar. Por exemplo, pode utilizar `este tutorial <http://www.cplusplus.com/doc/tutorial/>`_.
..
The |ns3| system uses several components of the GNU "toolchain"
for development. A
software toolchain is the set of programming tools available in the given
environment. For a quick review of what is included in the GNU toolchain see,
http://en.wikipedia.org/wiki/GNU_toolchain. |ns3| uses gcc,
GNU binutils, and gdb. However, we do not use the GNU build system tools,
neither make nor autotools. We use Waf for these functions.
O |ns3| utiliza vários componentes do conjunto de ferramentas GNU --- `"GNU toolchain"` --- para o desenvolvimento. Um `software toolchain` é um conjunto de ferramentas de programação para um determinado ambiente. Para uma breve visão do que consiste o `GNU toolchain` veja http://en.wikipedia.org/wiki/GNU_toolchain. O |ns3| usa o `gcc`, `GNU binutils` e `gdb`. Porém, não usa as ferramentas GNU para compilar o sistema, nem o Make e nem o Autotools. Para estas funções é utilizado o Waf.
..
Typically an |ns3| author will work in Linux or a Linux-like
environment. For those running under Windows, there do exist environments
which simulate the Linux environment to various degrees. The |ns3|
project supports development in the Cygwin environment for
these users. See http://www.cygwin.com/
for details on downloading (MinGW is presently not officially supported,
although some of the project maintainers to work with it). Cygwin provides
many of the popular Linux system commands. It can, however, sometimes be
problematic due to the way it actually does its emulation, and sometimes
interactions with other Windows software can cause problems.
Normalmente um usuário do |ns3| irá trabalhar no Linux ou um ambiente baseado nele. Para aqueles que usam Windows, existem ambientes que simulam o Linux em vários níveis. Para estes usuários, o projeto |ns3| fornece suporte ao ambiente Cygwin. Veja o sítio http://www.cygwin.com/ para detalhes de como baixá-lo (o MinGW não é suportado oficialmente, embora alguns mantenedores do projeto trabalhem com ele). O Cygwin fornece vários comandos populares do Linux, entretanto podemos ter problemas com a emulação, às vezes a interação com outros programas do Windows pode causar problemas.
..
If you do use Cygwin or MinGW; and use Logitech products, we will save you
quite a bit of heartburn right off the bat and encourage you to take a look
at the `MinGW FAQ
<http://oldwiki.mingw.org/index.php/FAQ>`_.
Se você usa o Cygwin ou MinGW e usa produtos da Logitech, evite dores de cabeça e dê uma olhada em `MinGW FAQ <http://oldwiki.mingw.org/index.php/FAQ>`_.
..
Search for "Logitech" and read the FAQ entry, "why does make often
crash creating a sh.exe.stackdump file when I try to compile my source code."
Believe it or not, the ``Logitech Process Monitor`` insinuates itself into
every DLL in the system when it is running. It can cause your Cygwin or
MinGW DLLs to die in mysterious ways and often prevents debuggers from
running. Beware of Logitech software when using Cygwin.
Busque por "Logitech" e leia a entrada com o assunto: "why does make often crash creating a sh.exe.stackdump file when I try to compile my source code.". Acredite ou não, o ``Logitech Process Monitor`` influencia todas as DLLs do sistema. Isto pode ocasionar problemas misteriosos durante a execução do Cygwin ou do MinGW. Muita cautela quando utilizar software da Logitech junto com o Cygwin.
..
Another alternative to Cygwin is to install a virtual machine environment
such as VMware server and install a Linux virtual machine.
Uma alternativa ao Cygwin é instalar um ambiente de máquina virtual, tal como o VMware server e criar uma máquina virtual Linux.
.. Socket Programming
Programando com Soquetes (Sockets)
**********************************
..
We will assume a basic facility with the Berkeley Sockets API in the examples
used in this tutorial. If you are new to sockets, we recommend reviewing the
API and some common usage cases. For a good overview of programming TCP/IP
sockets we recommend `TCP/IP Sockets in C, Donahoo and Calvert
<http://www.elsevier.com/wps/find/bookdescription.
cws_home/717656/description#description>`_.
Neste tutorial assume-se, nos exemplos utilizados, que o leitor está familiarizado com as funcionalidades básicas da API dos soquetes de Berkeley. Se este não for o caso, recomendamos a leitura das APIs e alguns casos de uso comuns. Uma API --- do Inglês, `Application Programming Interface` --- é um é um conjunto de rotinas e padrões estabelecidos por um software para a utilização das suas funcionalidades. Para uma boa visão geral sobre a programação de soquetes TCP/IP sugerimos `TCP/IP Sockets in C, Donahoo and Calvert
<http://www.elsevier.com/wps/find/bookdescription.cws_home/717656/description#description>`_.
..
There is an associated web site that includes source for the examples in the
book, which you can find at:
http://cs.baylor.edu/~donahoo/practical/CSockets/.
O sítio http://cs.baylor.edu/~donahoo/practical/CSockets/ contém os códigos fontes dos exemplos do livro.
..
If you understand the first four chapters of the book (or for those who do
not have access to a copy of the book, the echo clients and servers shown in
the website above) you will be in good shape to understand the tutorial.
There is a similar book on Multicast Sockets,
`Multicast Sockets, Makofske and Almeroth
<http://www.elsevier.com/wps/find/bookdescription.cws_home/700736/description#description>`_.
that covers material you may need to understand if you look at the multicast
examples in the distribution.
Se o leitor entender os primeiros quatro capítulos do livro (ou para aqueles que não têm acesso ao livro, os exemplos de cliente e servidor de eco mostrado no sítio anterior) estará apto para compreender o tutorial. Existe também um livro sobre soquetes multidifusão, `Multicast Sockets, Makofske and Almeroth <http://www.elsevier.com/wps/find/bookdescription.cws_home/700736/description#description>`_. que é um material que cobre o necessário sobre multidifusão caso o leitor se interesse.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff