PageRenderTime 63ms CodeModel.GetById 38ms RepoModel.GetById 0ms app.codeStats 0ms

/doc/tutorial/source/resources.rst

https://bitbucket.org/binhngq/lena-local
ReStructuredText | 126 lines | 104 code | 22 blank | 0 comment | 0 complexity | 01513e3a5d3f9bddae34623de578cf7e MD5 | raw file
  1. .. include:: replace.txt
  2. Resources
  3. ---------
  4. The Web
  5. *******
  6. There are several important resources of which any |ns3| user must be
  7. aware. The main web site is located at http://www.nsnam.org and
  8. provides access to basic information about the |ns3| system. Detailed
  9. documentation is available through the main web site at
  10. http://www.nsnam.org/documentation/. You can also find documents
  11. relating to the system architecture from this page.
  12. There is a Wiki that complements the main |ns3| web site which you will
  13. find at http://www.nsnam.org/wiki/. You will find user and developer
  14. FAQs there, as well as troubleshooting guides, third-party contributed code,
  15. papers, etc.
  16. The source code may be found and browsed at http://code.nsnam.org/.
  17. There you will find the current development tree in the repository named
  18. ``ns-3-dev``. Past releases and experimental repositories of the core
  19. developers may also be found there.
  20. Mercurial
  21. *********
  22. Complex software systems need some way to manage the organization and
  23. changes to the underlying code and documentation. There are many ways to
  24. perform this feat, and you may have heard of some of the systems that are
  25. currently used to do this. The Concurrent Version System (CVS) is probably
  26. the most well known.
  27. The |ns3| project uses Mercurial as its source code management system.
  28. Although you do not need to know much about Mercurial in order to complete
  29. this tutorial, we recommend becoming familiar with Mercurial and using it
  30. to access the source code. Mercurial has a web site at
  31. http://www.selenic.com/mercurial/,
  32. from which you can get binary or source releases of this Software
  33. Configuration Management (SCM) system. Selenic (the developer of Mercurial)
  34. also provides a tutorial at
  35. http://www.selenic.com/mercurial/wiki/index.cgi/Tutorial/,
  36. and a QuickStart guide at
  37. http://www.selenic.com/mercurial/wiki/index.cgi/QuickStart/.
  38. You can also find vital information about using Mercurial and |ns3|
  39. on the main |ns3| web site.
  40. Waf
  41. ***
  42. Once you have source code downloaded to your local system, you will need
  43. to compile that source to produce usable programs. Just as in the case of
  44. source code management, there are many tools available to perform this
  45. function. Probably the most well known of these tools is ``make``. Along
  46. with being the most well known, ``make`` is probably the most difficult to
  47. use in a very large and highly configurable system. Because of this, many
  48. alternatives have been developed. Recently these systems have been developed
  49. using the Python language.
  50. The build system Waf is used on the |ns3| project. It is one
  51. of the new generation of Python-based build systems. You will not need to
  52. understand any Python to build the existing |ns3| system.
  53. For those interested in the gory details of Waf, the main web site can be
  54. found at http://code.google.com/p/waf/.
  55. Development Environment
  56. ***********************
  57. As mentioned above, scripting in |ns3| is done in C++ or Python.
  58. Most of the |ns3| API is available in Python, but the
  59. models are written in C++ in either case. A working
  60. knowledge of C++ and object-oriented concepts is assumed in this document.
  61. We will take some time to review some of the more advanced concepts or
  62. possibly unfamiliar language features, idioms and design patterns as they
  63. appear. We don't want this tutorial to devolve into a C++ tutorial, though,
  64. so we do expect a basic command of the language. There are an almost
  65. unimaginable number of sources of information on C++ available on the web or
  66. in print.
  67. If you are new to C++, you may want to find a tutorial- or cookbook-based
  68. book or web site and work through at least the basic features of the language
  69. before proceeding. For instance, `this tutorial
  70. <http://www.cplusplus.com/doc/tutorial/>`_.
  71. The |ns3| system uses several components of the GNU "toolchain"
  72. for development. A
  73. software toolchain is the set of programming tools available in the given
  74. environment. For a quick review of what is included in the GNU toolchain see,
  75. http://en.wikipedia.org/wiki/GNU_toolchain. |ns3| uses gcc,
  76. GNU binutils, and gdb. However, we do not use the GNU build system tools,
  77. neither make nor autotools. We use Waf for these functions.
  78. Typically an |ns3| author will work in Linux or a Linux-like
  79. environment. For those running under Windows, there do exist environments
  80. which simulate the Linux environment to various degrees. The |ns3|
  81. project has in the past (but not presently) supported development in the Cygwin environment for
  82. these users. See http://www.cygwin.com/
  83. for details on downloading, and visit the |ns3| wiki for more information
  84. about Cygwin and |ns3|. MinGW is presently not officially supported.
  85. Another alternative to Cygwin is to install a virtual machine environment
  86. such as VMware server and install a Linux virtual machine.
  87. Socket Programming
  88. ******************
  89. We will assume a basic facility with the Berkeley Sockets API in the examples
  90. used in this tutorial. If you are new to sockets, we recommend reviewing the
  91. API and some common usage cases. For a good overview of programming TCP/IP
  92. sockets we recommend `TCP/IP Sockets in C, Donahoo and Calvert
  93. <http://www.elsevier.com/wps/find/bookdescription.cws_home/717656/description#description>`_.
  94. There is an associated web site that includes source for the examples in the
  95. book, which you can find at:
  96. http://cs.baylor.edu/~donahoo/practical/CSockets/.
  97. If you understand the first four chapters of the book (or for those who do
  98. not have access to a copy of the book, the echo clients and servers shown in
  99. the website above) you will be in good shape to understand the tutorial.
  100. There is a similar book on Multicast Sockets,
  101. `Multicast Sockets, Makofske and Almeroth
  102. <http://www.elsevier.com/wps/find/bookdescription.cws_home/700736/description#description>`_.
  103. that covers material you may need to understand if you look at the multicast
  104. examples in the distribution.