From cdb5cc083fc6a20a5d8b3ab964366d906595aad3 Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Thu, 12 Jun 2008 06:11:18 -0700 Subject: [PATCH 1/5] Doxygen for global routing --- src/routing/global-routing/global-routing.h | 79 +++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 src/routing/global-routing/global-routing.h diff --git a/src/routing/global-routing/global-routing.h b/src/routing/global-routing/global-routing.h new file mode 100644 index 000000000..ad9851505 --- /dev/null +++ b/src/routing/global-routing/global-routing.h @@ -0,0 +1,79 @@ +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ +/* + * Copyright 2008 University of Washington + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation; + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/** + * \ingroup routing + * \defgroup globalrouting Global Routing + * + * \section model Model + * + * ns-3 global routing performs pre-simulation static route computation + * on a layer-3 Ipv4 topology. The user API from the script level is + * fairly minimal; once a topology has been constructed and addresses + * assigned, the user may call ns3::GlobalRouteManager::PopulateRoutingTables() + * and the simulator will initialize the routing database and set up + * static unicast forwarding tables for each node. + * + * The model assumes that all nodes on an ns-3 channel are reachable to + * one another, regardless of whether the nodes can use the channel + * successfully (in the case of wireless). Therefore, this model + * should typically be used only on wired topologies. API does not + * yet exist to control the subset of a topology to which this global + * static routing is applied. + * + * This model also does not yet deal with the possible presence of + * layer-2 relays such as switches, bridges, and hubs, although ns-3 does + * not have such devices yet. + * + * \section api API and Usage + * + * Users must include ns3/global-route-manager.h header file. After the + * IPv4 topology has been built and addresses assigned, users call + * ns3::GlobalRouteManager::PopulateRoutingTables (), prior to the + * ns3::Simulator::Run() call. There are no other attributes or + * public methods that are typically called, or ways to parameterize + * the behavior. + * + * \section impl Implementation + * + * A singleton object, ns3::GlobalRouteManager, builds a global routing + * database of information about the topology, and executes a Dijkstra + * Shortest Path First (SPF) algorithm on the topology for each node, and + * stores the computed routes in each node's IPv4 forwarding table by + * making use of the routing API in class ns3::Ipv4. + * + * The nodes that export data are those that have had an ns3::GlobalRouter + * object aggregated to them. The ns3::GlobalRouter can be thought of + * as a per-node agent that exports topology information to the + * ns3::GlobalRouteManager. When it comes time to build the global + * routing database, the list of nodes is iterated and each node with + * an ns3::GlobalRouter object is asked to export routing information + * concerning the links to which it is attached. + * + * The format of the data exported conforms to the OSPFv2 standard + * (http://www.ietf.org/rfc/rfc2328.txt). In particular, the + * information is exported in the form of ns3::GlobalLSA objects that + * semantically match the Link State Advertisements of OSPF. + * + * By using a standard data format for reporting topology, existing + * OSPF route computation code can be reused, and that is what is done + * by the ns3::GlobalRouteManager. The main computation functions are + * ported from the quagga routing suite (http://www.quagga.net). + * + */ From cbc938e2bfcf7029c435a83c77876047cd2c2579 Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Thu, 12 Jun 2008 22:21:19 -0700 Subject: [PATCH 2/5] OLSR doxygen --- src/routing/olsr/olsr.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/routing/olsr/olsr.h b/src/routing/olsr/olsr.h index 1ba19c02d..0d5d6af30 100644 --- a/src/routing/olsr/olsr.h +++ b/src/routing/olsr/olsr.h @@ -23,6 +23,39 @@ #include "ns3/node-list.h" +/** + * \ingroup routing + * \defgroup olsr OLSR + * + * \section model Model + * + * This model implements the base specification of the Optimized + * Link State Routing (OLSR) protocol, which is a dynamic mobile ad hoc + * unicast routing protocol. It has been developed at the + * University of Murcia (Spain) by Francisco J. Ros for ns-2, and was + * ported to ns-3 by Gustavo Carneiro. + * + * Here is a summary of software's main features: + * - Compliant with core-OLSR (but the use of multiple interfaces which is currently not supported by NS2) as it is documented in RFC 3626 + * (http://www.ietf.org/rfc/rfc3626.txt). + * - Support for MAC layer feedback as described in RFC 3626. + * + * \section api API and Usage + * + * A helper class for OLSR has been written. After an IPv4 topology + * has been created and assigned IP addresses, the simulation script + * writer can call one of three overloaded functions with different scope + * to enable OLSR: ns3::OlsrHelper::Install (NodeContainer container); + * ns3::OlsrHelper::Install (Ptr node); + * or ns3::OlsrHelper::InstallAll (void); + * + * In addition, the behavior of OLSR can be modified by changing certain + * attributes. The method ns3::OlsrHelper::SetAgent () can be used + * to set OLSR attributes. These include HelloInterval, TcInterval, + * MidInterval, Willingness. Other parameters are defined as macros + * in olsr-agent-impl.cc. + */ + namespace ns3 { /** From 1e4c17bc9fbd7aeef65e9a8d5414ad694d8cb15e Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Fri, 13 Jun 2008 06:32:54 -0700 Subject: [PATCH 3/5] doxygen for applications --- src/applications/onoff/onoff-application.h | 17 ++++++++++++++- src/applications/packet-sink/packet-sink.h | 15 +++++++++++++ src/applications/udp-echo/udp-echo-client.h | 1 + src/applications/udp-echo/udp-echo-server.h | 6 ++++++ src/node/application.h | 24 ++++++++++++--------- 5 files changed, 52 insertions(+), 11 deletions(-) diff --git a/src/applications/onoff/onoff-application.h b/src/applications/onoff/onoff-application.h index ac79ff18b..58047ee6b 100644 --- a/src/applications/onoff/onoff-application.h +++ b/src/applications/onoff/onoff-application.h @@ -40,10 +40,25 @@ class RandomVariable; class Socket; /** + * \ingroup applications + * \defgroup onoff OnOffApplication + * + * This traffic generator follows an On/Off pattern: after + * Application::StartApplication + * is called, "On" and "Off" states alternate. The duration of each of + * these states is determined with the onTime and the offTime random + * variables. During the "Off" state, no traffic is generated. + * During the "On" state, cbr traffic is generated. This cbr traffic is + * characterized by the specified "data rate" and "packet size". + */ + /** + * \ingroup onoff + * * \brief Generate traffic to a single destination according to an * OnOff pattern. * - * This traffic follows an On/Off pattern: after Application::StartApplication + * This traffic generator follows an On/Off pattern: after + * Application::StartApplication * is called, "On" and "Off" states alternate. The duration of each of * these states is determined with the onTime and the offTime random * variables. During the "Off" state, no traffic is generated. diff --git a/src/applications/packet-sink/packet-sink.h b/src/applications/packet-sink/packet-sink.h index 638309aad..20781a79e 100644 --- a/src/applications/packet-sink/packet-sink.h +++ b/src/applications/packet-sink/packet-sink.h @@ -34,6 +34,21 @@ class Socket; class Packet; /** + * \ingroup applications + * \defgroup packetsink PacketSink + * + * This application was written to complement OnOffApplication, but it + * is more general so a PacketSink name was selected. Functionally it is + * important to use in multicast situations, so that reception of the layer-2 + * multicast frames of interest are enabled, but it is also useful for + * unicast as an example of how you can write something simple to receive + * packets at the application layer. Also, if an IP stack generates + * ICMP Port Unreachable errors, receiving applications will be needed. + */ + +/** + * \ingroup packetsink + * * \brief Receive and consume traffic generated to an IP address and port * * This application was written to complement OnOffApplication, but it diff --git a/src/applications/udp-echo/udp-echo-client.h b/src/applications/udp-echo/udp-echo-client.h index bfb1c3fcf..bea207918 100644 --- a/src/applications/udp-echo/udp-echo-client.h +++ b/src/applications/udp-echo/udp-echo-client.h @@ -30,6 +30,7 @@ class Socket; class Packet; /** + * \ingroup udpecho * \brief A Udp Echo client * * Every packet sent should be returned by the server and received here. diff --git a/src/applications/udp-echo/udp-echo-server.h b/src/applications/udp-echo/udp-echo-server.h index 4e2b09fce..7715761c3 100644 --- a/src/applications/udp-echo/udp-echo-server.h +++ b/src/applications/udp-echo/udp-echo-server.h @@ -30,6 +30,12 @@ class Socket; class Packet; /** + * \ingroup applications + * \defgroup udpecho UdpEcho + */ + +/** + * \ingroup udpecho * \brief A Udp Echo server * * Every packet received is sent back. diff --git a/src/node/application.h b/src/node/application.h index 1fb243691..bb706cd4f 100644 --- a/src/node/application.h +++ b/src/node/application.h @@ -33,17 +33,13 @@ class Node; class RandomVariable; /** - * \ingroup node - * \defgroup application Application - */ -/** - * \ingroup application - * \brief The base class for all ns3 applications + * \addtogroup applications Applications + * + * Class ns3::Application can be used as a base class for ns3 applications. + * Applications are associated with individual nodes. Each node + * holds a list of references (smart pointers) to its applications. * - * Class Application is the base class for all ns3 applications. - * Applications are associated with individual nodes. - * - * Conceptually, an application has zero or more Socket + * Conceptually, an application has zero or more ns3::Socket * objects associated with it, that are created using the Socket * creation API of the Kernel capability. The Socket object * API is modeled after the @@ -53,6 +49,14 @@ class RandomVariable; * in ns3. A set of "upcalls" are defined that will be called when * the previous blocking call would normally exit. THis is documented * in more detail Socket class in socket.h. + * + * The main purpose of the base class application public API is to + * provide a uniform way to start and stop applications. + */ + + /** + * \brief The base class for all ns3 applications + * */ class Application : public Object { From 8ae203ce50b5a59dbf7ce2f6561cba8c00d30f6a Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Fri, 13 Jun 2008 15:35:07 +0100 Subject: [PATCH 4/5] Correct the OLSR documentation; remove dead API declarations and source file. --- src/helper/olsr-helper.h | 15 ++++++++++ src/routing/olsr/olsr.cc | 41 -------------------------- src/routing/olsr/olsr.h | 62 +++++++--------------------------------- 3 files changed, 26 insertions(+), 92 deletions(-) delete mode 100644 src/routing/olsr/olsr.cc diff --git a/src/helper/olsr-helper.h b/src/helper/olsr-helper.h index b901ab9d8..f481fe110 100644 --- a/src/helper/olsr-helper.h +++ b/src/helper/olsr-helper.h @@ -26,11 +26,17 @@ namespace ns3 { +/** + * \brief Helper class that adds OLSR routing to nodes. + */ class OlsrHelper { public: OlsrHelper (); + /** + * \brief Set default OLSR routing agent parameters + */ void SetAgent (std::string tid, std::string n0 = "", const AttributeValue &v0 = EmptyAttributeValue (), std::string n1 = "", const AttributeValue &v2 = EmptyAttributeValue (), @@ -41,8 +47,17 @@ public: std::string n6 = "", const AttributeValue &v6 = EmptyAttributeValue (), std::string n7 = "", const AttributeValue &v7 = EmptyAttributeValue ()); + /** + * \brief Enable OLSR routing for a set of nodes + */ void Install (NodeContainer container); + /** + * \brief Enable OLSR routing for a single node + */ void Install (Ptr node); + /** + * \brief Enable OLSR routing for all nodes + */ void InstallAll (void); private: ObjectFactory m_agentFactory; diff --git a/src/routing/olsr/olsr.cc b/src/routing/olsr/olsr.cc deleted file mode 100644 index 932629743..000000000 --- a/src/routing/olsr/olsr.cc +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ -/* - * Copyright (c) 2007 INESC Porto - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Author: Gustavo J. A. M. Carneiro - */ - -#include "olsr-agent.h" -#include "olsr.h" - -namespace ns3 { namespace olsr { - - -void -EnableAllNodes (void) -{ - EnableNodes (NodeList::Begin (), NodeList::End ()); -} - -void -EnableNode (Ptr node) -{ - olsr::Agent::CreateDefault (node)->Start (); -} - - -}} // namespace ns3, olsr - diff --git a/src/routing/olsr/olsr.h b/src/routing/olsr/olsr.h index 0d5d6af30..f2dbb7830 100644 --- a/src/routing/olsr/olsr.h +++ b/src/routing/olsr/olsr.h @@ -21,8 +21,6 @@ #ifndef OLSR_H #define OLSR_H -#include "ns3/node-list.h" - /** * \ingroup routing * \defgroup olsr OLSR @@ -32,22 +30,23 @@ * This model implements the base specification of the Optimized * Link State Routing (OLSR) protocol, which is a dynamic mobile ad hoc * unicast routing protocol. It has been developed at the - * University of Murcia (Spain) by Francisco J. Ros for ns-2, and was - * ported to ns-3 by Gustavo Carneiro. + * University of Murcia (Spain) by Francisco J. Ros for NS-2, and was + * ported to NS-3 by Gustavo Carneiro at INESC Porto (Portugal). * * Here is a summary of software's main features: - * - Compliant with core-OLSR (but the use of multiple interfaces which is currently not supported by NS2) as it is documented in RFC 3626 - * (http://www.ietf.org/rfc/rfc3626.txt). - * - Support for MAC layer feedback as described in RFC 3626. + * - Mostly compliant with OLSR as documented in RFC 3626 (http://www.ietf.org/rfc/rfc3626.txt), with the following differences: + * - The use of multiple interfaces was not supported by the NS-2 version, but is supported in NS-3; + * - Unlike the NS-2 version, does not yet support MAC layer feedback as described in RFC 3626; + * - HNA (Host/Network Association) messages are almost-but-not-quite supported in this version. * * \section api API and Usage * * A helper class for OLSR has been written. After an IPv4 topology - * has been created and assigned IP addresses, the simulation script - * writer can call one of three overloaded functions with different scope - * to enable OLSR: ns3::OlsrHelper::Install (NodeContainer container); - * ns3::OlsrHelper::Install (Ptr node); - * or ns3::OlsrHelper::InstallAll (void); + * has been created and unique IP addresses assigned to each node, the + * simulation script writer can call one of three overloaded functions + * with different scope to enable OLSR: ns3::OlsrHelper::Install + * (NodeContainer container); ns3::OlsrHelper::Install (Ptr + * node); or ns3::OlsrHelper::InstallAll (void); * * In addition, the behavior of OLSR can be modified by changing certain * attributes. The method ns3::OlsrHelper::SetAgent () can be used @@ -56,44 +55,5 @@ * in olsr-agent-impl.cc. */ -namespace ns3 -{ - /** - * \namespace ns3::olsr - * \brief Includes a set of utility functions to enable OLSR on - * certain nodes with default parameters. For finer grained control - * of OLSR parameters, see OlsrAgent. - */ - namespace olsr - { - /// \brief Start the OLSR routing agent on all nodes - void EnableAllNodes (void); - - /// \brief Start the OLSR routing agent on a given list of nodes - template - void EnableNodes (InputIterator begin, InputIterator end); - - /// \brief Start the OLSR routing agent on the given node - void EnableNode (Ptr node); - } -} - - -// implementation -namespace ns3 -{ - namespace olsr - { - template - void EnableNodes (InputIterator begin, InputIterator end) - { - for (InputIterator i = begin; i != end; i++) - { - EnableNode (*i); - } - } - } -} - #endif /* OLSR_H */ From 9ccd6dadcb238a76b285251c0376cca982629c65 Mon Sep 17 00:00:00 2001 From: Raj Bhattacharjea Date: Fri, 13 Jun 2008 16:47:07 -0400 Subject: [PATCH 5/5] Update the internet-stack documentation --- src/internet-stack/ipv4-end-point-demux.h | 10 ++++++++++ src/internet-stack/ipv4-end-point.h | 11 +++++++++++ src/internet-stack/ipv4-interface.h | 1 + src/internet-stack/ipv4-l3-protocol.h | 3 +++ src/internet-stack/ipv4-l4-demux.h | 3 +++ src/internet-stack/ipv4-l4-protocol.h | 6 +++--- src/internet-stack/pending-data.h | 2 +- src/internet-stack/tcp-header.h | 8 ++++++++ src/internet-stack/tcp-l4-protocol.h | 11 +++++++++-- src/internet-stack/tcp-socket-factory-impl.h | 6 ++++-- src/internet-stack/tcp-socket-impl.h | 14 ++++++++++++++ src/internet-stack/udp-header.h | 4 ++++ src/internet-stack/udp-socket-impl.h | 7 +++++++ 13 files changed, 78 insertions(+), 8 deletions(-) diff --git a/src/internet-stack/ipv4-end-point-demux.h b/src/internet-stack/ipv4-end-point-demux.h index 271325164..61e580e3c 100644 --- a/src/internet-stack/ipv4-end-point-demux.h +++ b/src/internet-stack/ipv4-end-point-demux.h @@ -30,6 +30,16 @@ namespace ns3 { class Ipv4EndPoint; +/** + * \brief Demultiplexes packets to various transport layer endpoints + * + * This class serves as a lookup table to match partial or full information + * about a four-tuple to an ns3::Ipv4EndPoint. It internally contains a list + * of endpoints, and has APIs to add and find endpoints in this demux. This + * code is shared in common to TCP and UDP protocols in ns3. This demux + * sits between ns3's layer four and the socket layer + */ + class Ipv4EndPointDemux { public: typedef std::list EndPoints; diff --git a/src/internet-stack/ipv4-end-point.h b/src/internet-stack/ipv4-end-point.h index 35f0f04bc..99666f73f 100644 --- a/src/internet-stack/ipv4-end-point.h +++ b/src/internet-stack/ipv4-end-point.h @@ -30,6 +30,17 @@ namespace ns3 { class Header; class Packet; +/** + * \brief A representation of an internet endpoint/connection + * + * This class provides an internet four-tuple (source and destination ports + * and addresses). These are used in the ns3::Ipv4EndPointDemux as targets + * of lookups. The class also has a callback for notification to higher + * layers that a packet from a lower layer was received. In the ns3 + * internet-stack, these notifications are automatically registered to be + * received by the corresponding socket. + */ + class Ipv4EndPoint { public: Ipv4EndPoint (Ipv4Address address, uint16_t port); diff --git a/src/internet-stack/ipv4-interface.h b/src/internet-stack/ipv4-interface.h index 5a1e94df5..74007b09e 100644 --- a/src/internet-stack/ipv4-interface.h +++ b/src/internet-stack/ipv4-interface.h @@ -58,6 +58,7 @@ class Packet; * * Subclasses must implement the two methods: * - Ipv4Interface::SendTo + * - Ipv4Interface::GetDevice */ class Ipv4Interface : public Object { diff --git a/src/internet-stack/ipv4-l3-protocol.h b/src/internet-stack/ipv4-l3-protocol.h index 40f0be5bd..7b2879aaf 100644 --- a/src/internet-stack/ipv4-l3-protocol.h +++ b/src/internet-stack/ipv4-l3-protocol.h @@ -43,6 +43,9 @@ class Node; /** * \brief Implement the Ipv4 layer. + * + * This is the actual implementation of IP. It contains APIs to send and + * receive packets at the IP layer, as well as APIs for IP routing. */ class Ipv4L3Protocol : public Object { diff --git a/src/internet-stack/ipv4-l4-demux.h b/src/internet-stack/ipv4-l4-demux.h index fa04f8a37..54ceda210 100644 --- a/src/internet-stack/ipv4-l4-demux.h +++ b/src/internet-stack/ipv4-l4-demux.h @@ -35,6 +35,9 @@ class Node; /** * \brief L4 Ipv4 Demux + * + * This class demultiplexes IP datagrams to the correct layer four protocol + * object. This demux sits between IP and layer 4. */ class Ipv4L4Demux : public Object { diff --git a/src/internet-stack/ipv4-l4-protocol.h b/src/internet-stack/ipv4-l4-protocol.h index e7f2407ad..1a8595a5b 100644 --- a/src/internet-stack/ipv4-l4-protocol.h +++ b/src/internet-stack/ipv4-l4-protocol.h @@ -33,10 +33,10 @@ class Packet; class Ipv4Address; /** - * \brief L4 Protocol base class + * \brief L4 Protocol abstract base class * - * If you want to implement a new L4 protocol, all you have to do is - * implement a subclass of this base class and add it to an L4Demux. + * This is an abstract base class for layer four protocols which use IPv4 as + * the network layer. */ class Ipv4L4Protocol : public Object { diff --git a/src/internet-stack/pending-data.h b/src/internet-stack/pending-data.h index 7cdbe6495..eeba9ad69 100644 --- a/src/internet-stack/pending-data.h +++ b/src/internet-stack/pending-data.h @@ -32,7 +32,7 @@ namespace ns3 { class Packet; -//Doc:ClassXRef + class PendingData { public: PendingData (); diff --git a/src/internet-stack/tcp-header.h b/src/internet-stack/tcp-header.h index e676287f6..c1ba93877 100644 --- a/src/internet-stack/tcp-header.h +++ b/src/internet-stack/tcp-header.h @@ -30,6 +30,14 @@ namespace ns3 { +/** + * \brief Header for the Transmission Control Protocol + * + * This class has fields corresponding to those in a network TCP header + * (port numbers, sequence and acknowledgement numbers, flags, etc) as well + * as methods for serialization to and deserialization from a byte buffer. + */ + class TcpHeader : public Header { public: diff --git a/src/internet-stack/tcp-l4-protocol.h b/src/internet-stack/tcp-l4-protocol.h index 4555b004e..9092a7e3b 100644 --- a/src/internet-stack/tcp-l4-protocol.h +++ b/src/internet-stack/tcp-l4-protocol.h @@ -39,9 +39,16 @@ namespace ns3 { class Node; class Socket; class TcpHeader; + /** - * \brief Implementation of the TCP protocol - */ + * \brief A layer between the sockets interface and IP + * + * This class allocates "endpoint" objects (ns3::Ipv4EndPoint) for TCP, + * and SHOULD checksum packets its receives from the socket layer going down + * the stack , but currently checksumming is disabled. It also recieves + * packets from IP, and forwards them up to the endpoints. +*/ + class TcpL4Protocol : public Ipv4L4Protocol { public: static TypeId GetTypeId (void); diff --git a/src/internet-stack/tcp-socket-factory-impl.h b/src/internet-stack/tcp-socket-factory-impl.h index 673010f9f..acef1e2d9 100644 --- a/src/internet-stack/tcp-socket-factory-impl.h +++ b/src/internet-stack/tcp-socket-factory-impl.h @@ -35,11 +35,13 @@ class TcpL4Protocol; * \ingroup Tcp * \section Tcp Overview * - * The TCP code in ns3::InternetNode is ported from the + * The TCP code in ns3's internet stack is ported from the * * Georgia Tech Network Simulator (GTNetS). - * + * * Most of the logic is in class ns3::TcpSocketImpl. + * This class serves to create sockets of the TcpSocketImpl + * type. That is, it creates sockets which use the GTNetS Tahoe code. */ class TcpSocketFactoryImpl : public TcpSocketFactory { diff --git a/src/internet-stack/tcp-socket-impl.h b/src/internet-stack/tcp-socket-impl.h index 8f1f832f5..dd52f440a 100644 --- a/src/internet-stack/tcp-socket-impl.h +++ b/src/internet-stack/tcp-socket-impl.h @@ -42,6 +42,20 @@ class Packet; class TcpL4Protocol; class TcpHeader; +/** + * \ingroup socket + * + * \brief An implementation of a stream socket using TCP. + * + * This class contains an implementation of TCP Tahoe, as well as a sockets + * interface for talking to TCP. Features include connection orientation, + * reliability through cumulative acknowledgements, congestion and flow + * control. Finite send/receive buffer semantics are modeled. + * + * Asynchronous callbacks to provide notifications to higher layers that a + * protocol event has occured, such as space freeing up in the send buffer + * or new data arriving in the receive buffer. + */ class TcpSocketImpl : public TcpSocket { public: diff --git a/src/internet-stack/udp-header.h b/src/internet-stack/udp-header.h index a7bbf23e2..d2ab5e73a 100644 --- a/src/internet-stack/udp-header.h +++ b/src/internet-stack/udp-header.h @@ -29,6 +29,10 @@ namespace ns3 { /** * \brief Packet header for UDP packets + * + * This class has fields corresponding to those in a network UDP header + * (port numbers, payload size, checksum) as well as methods for serialization + * to and deserialization from a byte buffer. */ class UdpHeader : public Header { diff --git a/src/internet-stack/udp-socket-impl.h b/src/internet-stack/udp-socket-impl.h index f7b185215..ae713e9a3 100644 --- a/src/internet-stack/udp-socket-impl.h +++ b/src/internet-stack/udp-socket-impl.h @@ -36,6 +36,13 @@ class Node; class Packet; class UdpL4Protocol; +/** + * \brief A sockets interface to UDP + * + * This class subclasses ns3::UdpSocket, and provides a socket interface + * to ns3's implementation of UDP. + */ + class UdpSocketImpl : public UdpSocket { public: