/usr/include/ns3.26/ns3/radvd-helper.h is in libns3-dev 3.26+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2013 Universita' di Firenze
*
* 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: Tommaso Pecorella <tommaso.pecorella@unifi.it>
*/
#ifndef RADVD_HELPER_H
#define RADVD_HELPER_H
#include <stdint.h>
#include <list>
#include <map>
#include "ns3/object-factory.h"
#include "ns3/ipv6-address.h"
#include "ns3/application-container.h"
#include "ns3/node-container.h"
#include "ns3/radvd-interface.h"
namespace ns3 {
/**
* \ingroup radvd
* \brief Radvd application helper.
*/
class RadvdHelper
{
public:
/**
* \brief Constructor.
*/
RadvdHelper ();
/**
* \brief Add a new prefix to be announced through an interface.
* \param interface outgoing interface
* \param prefix announced IPv6 prefix
* \param prefixLength announced IPv6 prefix length
*/
void AddAnnouncedPrefix (uint32_t interface, Ipv6Address prefix, uint32_t prefixLength);
/**
* \brief Enable the router as default router for the interface.
* The effect is to set the Router Lifetime to the default value (30 minutes)
* \param interface outgoing interface
*/
void EnableDefaultRouterForInterface (uint32_t interface);
/**
* \brief Disable the router as default router for the interface.
* The effect is to set the Router Lifetime to zero
* \param interface outgoing interface
*/
void DisableDefaultRouterForInterface (uint32_t interface);
/**
* \brief Get the low-level RadvdInterface specification for an interface.
* This method is provided to enable fine-grain parameter setup.
* \param interface outgoing interface
* \returns the RadvdInterface
*/
Ptr<RadvdInterface> GetRadvdInterface (uint32_t interface);
/**
* \brief Clear the stored Prefixes
*/
void ClearPrefixes ();
/**
* \brief Set some attributes.
* \param name attribute name
* \param value attribute value
*/
void SetAttribute (std::string name, const AttributeValue& value);
/**
* \brief Install the application in a Node.
* \param node the Node
* \return application container
*/
ApplicationContainer Install (Ptr<Node> node);
private:
/**
* \brief An object factory.
*/
ObjectFactory m_factory;
/// Container: interface index, RadvdInterface
typedef std::map<uint32_t, Ptr<RadvdInterface> > RadvdInterfaceMap;
/// Container Iterator: interface index, RadvdInterface
typedef std::map<uint32_t, Ptr<RadvdInterface> >::iterator RadvdInterfaceMapI;
RadvdInterfaceMap m_radvdInterfaces; //!< RadvdInterface(s)
};
} /* namespace ns3 */
#endif /* RADVD_HELPER_H */
|