Minor doc notes added to ipv4.h
authortjkopena@cs.drexel.edu
Thu Jul 03 09:44:23 2008 -0400 (19 months ago)
changeset 338038b8549b1ad3
parent 3379 a2ef1eb4c16d
child 3381 3cdd9d60f7c7
Minor doc notes added to ipv4.h
src/internet-stack/wscript
src/node/ipv4.h
src/node/node.cc
src/node/node.h
     1.1 --- a/src/internet-stack/wscript	Wed Jul 02 21:07:36 2008 -0700
     1.2 +++ b/src/internet-stack/wscript	Thu Jul 03 09:44:23 2008 -0400
     1.3 @@ -39,4 +39,7 @@
     1.4          'udp-header.h',
     1.5          'tcp-header.h',
     1.6          'sequence-number.h',
     1.7 +        'ipv4-interface.h',
     1.8 +        'ipv4-l3-protocol.h',
     1.9 +        'ipv4-static-routing.h',
    1.10          ]
     2.1 --- a/src/node/ipv4.h	Wed Jul 02 21:07:36 2008 -0700
     2.2 +++ b/src/node/ipv4.h	Thu Jul 03 09:44:23 2008 -0400
     2.3 @@ -425,6 +425,11 @@
     2.4    /**
     2.5     * \param i index of ipv4 interface
     2.6     * \returns the address associated to the underlying ipv4 interface
     2.7 +   *
     2.8 +   * Note that the broadcast address for this interface may be fetched
     2.9 +   * from the Ipv4Address object returned here using
    2.10 +   * Ipv4Address::GetSubnetDirectedBroadcast(mask), where the mask for
    2.11 +   * the interface may be retrived using Ipv4::GetNetworkMask(i).
    2.12     */
    2.13    virtual Ipv4Address GetAddress (uint32_t i) const = 0;
    2.14  
    2.15 @@ -432,6 +437,11 @@
    2.16     * \param destination The IP address of a hypothetical destination.
    2.17     * \returns The IP address assigned to the interface that will be used
    2.18     * if we were to send a packet to destination.
    2.19 +   *
    2.20 +   * Note that the broadcast address for this interface may be fetched
    2.21 +   * from the Ipv4Address object returned here using
    2.22 +   * Ipv4Address::GetSubnetDirectedBroadcast(mask), where the mask for
    2.23 +   * the interface may be retrived using Ipv4::GetNetworkMask(i).
    2.24     */
    2.25    virtual Ipv4Address GetSourceAddress (Ipv4Address destination) const = 0;
    2.26  
     3.1 --- a/src/node/node.cc	Wed Jul 02 21:07:36 2008 -0700
     3.2 +++ b/src/node/node.cc	Thu Jul 03 09:44:23 2008 -0400
     3.3 @@ -128,6 +128,18 @@
     3.4  {
     3.5    return m_applications.size ();
     3.6  }
     3.7 +Ptr<Application>
     3.8 +Node::GetFirstApplication(TypeId tid)
     3.9 +{
    3.10 +  for (std::vector<Ptr<Application> >::iterator i = m_applications.begin ();
    3.11 +       i != m_applications.end (); i++) {
    3.12 +    Ptr<Application> app = *i;
    3.13 +    if (app->GetInstanceTypeId() == tid)
    3.14 +      return app;
    3.15 +  }
    3.16 +
    3.17 +  return 0;
    3.18 +}
    3.19  
    3.20  void 
    3.21  Node::DoDispose()
     4.1 --- a/src/node/node.h	Wed Jul 02 21:07:36 2008 -0700
     4.2 +++ b/src/node/node.h	Thu Jul 03 09:44:23 2008 -0400
     4.3 @@ -123,6 +123,13 @@
     4.4     */
     4.5    Ptr<Application> GetApplication (uint32_t index) const;
     4.6    /**
     4.7 +   * \param index
     4.8 +   * \returns the application associated to this requested index
     4.9 +   *          within this Node.
    4.10 +   */
    4.11 +  Ptr<Application> GetFirstApplication (TypeId tid);
    4.12 +
    4.13 +  /**
    4.14     * \returns the number of applications associated to this Node.
    4.15     */
    4.16    uint32_t GetNApplications (void) const;