src/internet/model/ipv6.h
changeset 7176 9f2663992e99
parent 7149 87514e0d866b
child 9915 d4c2228d3c30
equal deleted inserted replaced
7175:8fffa1497fba 7176:9f2663992e99
    47 /**
    47 /**
    48  * \ingroup ipv6
    48  * \ingroup ipv6
    49  * \brief Access to the IPv6 forwarding table, interfaces, and configuration
    49  * \brief Access to the IPv6 forwarding table, interfaces, and configuration
    50  *
    50  *
    51  * This class defines the API to manipulate the following aspects of
    51  * This class defines the API to manipulate the following aspects of
    52  * the IPv6 implementation:  
    52  * the IPv6 implementation:
    53  * -# set/get an Ipv6RoutingProtocol 
    53  * -# set/get an Ipv6RoutingProtocol 
    54  * -# register a NetDevice for use by the IPv6 layer (basically, to
    54  * -# register a NetDevice for use by the IPv6 layer (basically, to
    55  * create IPv6-related state such as addressing and neighbor cache that 
    55  * create IPv6-related state such as addressing and neighbor cache that 
    56  * is associated with a NetDevice)
    56  * is associated with a NetDevice)
    57  * -# manipulate the status of the NetDevice from the IPv6 perspective, 
    57  * -# manipulate the status of the NetDevice from the IPv6 perspective, 
    78  */
    78  */
    79 class Ipv6 : public Object
    79 class Ipv6 : public Object
    80 {
    80 {
    81 public:
    81 public:
    82   static TypeId GetTypeId (void);
    82   static TypeId GetTypeId (void);
    83   
    83 
    84   /**
    84   /**
    85    * \brief Constructor.
    85    * \brief Constructor.
    86    */
    86    */
    87   Ipv6 ();
    87   Ipv6 ();
    88 
    88 
    91    */
    91    */
    92   virtual ~Ipv6 ();
    92   virtual ~Ipv6 ();
    93 
    93 
    94   /**
    94   /**
    95    * \brief Register a new routing protocol to be used by this IPv6 stack
    95    * \brief Register a new routing protocol to be used by this IPv6 stack
    96    *   
    96    *
    97    * This call will replace any routing protocol that has been previously 
    97    * This call will replace any routing protocol that has been previously 
    98    * registered.  If you want to add multiple routing protocols, you must
    98    * registered.  If you want to add multiple routing protocols, you must
    99    * add them to a Ipv6ListRoutingProtocol directly.
    99    * add them to a Ipv6ListRoutingProtocol directly.
   100    * 
   100    * 
   101    * \param routingProtocol smart pointer to Ipv6RoutingProtocol object
   101    * \param routingProtocol smart pointer to Ipv6RoutingProtocol object
   123 
   123 
   124   /**
   124   /**
   125    * \brief Get number of interfaces.
   125    * \brief Get number of interfaces.
   126    * \returns the number of interfaces added by the user.
   126    * \returns the number of interfaces added by the user.
   127    */
   127    */
   128   virtual uint32_t GetNInterfaces (void) const = 0;  
   128   virtual uint32_t GetNInterfaces (void) const = 0;
   129 
   129 
   130   /**
   130   /**
   131    * \brief Return the interface number of the interface that has been
   131    * \brief Return the interface number of the interface that has been
   132    *        assigned the specified IP address.
   132    *        assigned the specified IP address.
   133    *
   133    *
   134    * \param address The IP address being searched for
   134    * \param address The IP address being searched for
   135    * \returns The interface number of the IPv6 interface with the given 
   135    * \returns The interface number of the IPv6 interface with the given 
   136    *          address or -1 if not found.
   136    *          address or -1 if not found.
   137    *
   137    *
   138    * Each IP interface has one or more IP addresses associated with it.  
   138    * Each IP interface has one or more IP addresses associated with it.
   139    * This method searches the list of interfaces for one that holds a
   139    * This method searches the list of interfaces for one that holds a
   140    * particular address.  This call takes an IP address as a parameter and
   140    * particular address.  This call takes an IP address as a parameter and
   141    * returns the interface number of the first interface that has been assigned
   141    * returns the interface number of the first interface that has been assigned
   142    * that address, or -1 if not found.  There must be an exact match.
   142    * that address, or -1 if not found.  There must be an exact match.
   143    */
   143    */
   151    * \param address The IP address assigned to the interface of interest.
   151    * \param address The IP address assigned to the interface of interest.
   152    * \param mask The IP prefix to use in the mask
   152    * \param mask The IP prefix to use in the mask
   153    * \returns The interface number of the IPv6 interface with the given 
   153    * \returns The interface number of the IPv6 interface with the given 
   154    *          address or -1 if not found.
   154    *          address or -1 if not found.
   155    *
   155    *
   156    * Each IP interface has one or more IP addresses associated with it.  
   156    * Each IP interface has one or more IP addresses associated with it.
   157    * This method searches the list of interfaces for the first one found
   157    * This method searches the list of interfaces for the first one found
   158    * that holds an address that is included within the prefix 
   158    * that holds an address that is included within the prefix 
   159    * formed by the input address and mask parameters.  The value -1 is
   159    * formed by the input address and mask parameters.  The value -1 is
   160    * returned if no match is found.
   160    * returned if no match is found.
   161    */
   161    */
   162   virtual int32_t GetInterfaceForPrefix (Ipv6Address address,
   162   virtual int32_t GetInterfaceForPrefix (Ipv6Address address,
   163     Ipv6Prefix mask) const = 0;
   163                                          Ipv6Prefix mask) const = 0;
   164 
   164 
   165   /**
   165   /**
   166    * \brief Get the NetDevice of the specified interface number.
   166    * \brief Get the NetDevice of the specified interface number.
   167    * \param interface The interface number of an IPv6 interface.
   167    * \param interface The interface number of an IPv6 interface.
   168    * \returns The NetDevice associated with the IPv6 interface number.
   168    * \returns The NetDevice associated with the IPv6 interface number.
   207    * \brief Remove an address on specified IPv6 interface.
   207    * \brief Remove an address on specified IPv6 interface.
   208    *
   208    *
   209    * Remove the address at addressIndex on named interface.  The addressIndex
   209    * Remove the address at addressIndex on named interface.  The addressIndex
   210    * for all higher indices will decrement by one after this method is called;
   210    * for all higher indices will decrement by one after this method is called;
   211    * so, for example, to remove 5 addresses from an interface i, one could
   211    * so, for example, to remove 5 addresses from an interface i, one could
   212    * call RemoveAddress (i, 0); 5 times.  
   212    * call RemoveAddress (i, 0); 5 times.
   213    * 
   213    * 
   214    * \param interface Interface number of an IPv6 interface
   214    * \param interface Interface number of an IPv6 interface
   215    * \param addressIndex index of Ipv6InterfaceAddress to remove 
   215    * \param addressIndex index of Ipv6InterfaceAddress to remove 
   216    * \returns true if the operation succeeded
   216    * \returns true if the operation succeeded
   217    */
   217    */