LEFT | RIGHT |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2011 Universita' di Firenze, Italy | 3 * Copyright (c) 2011 Universita' di Firenze, Italy |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "ns3/net-device-container.h" | 24 #include "ns3/net-device-container.h" |
25 #include "ns3/object-factory.h" | 25 #include "ns3/object-factory.h" |
26 #include <string> | 26 #include <string> |
27 | 27 |
28 namespace ns3 { | 28 namespace ns3 { |
29 | 29 |
30 class Node; | 30 class Node; |
31 class AttributeValue; | 31 class AttributeValue; |
32 | 32 |
33 /** | 33 /** |
34 * \brief Add capability to bridge multiple LAN segments (IEEE 802.1D bridging) | 34 * \ingroup sixlowpan |
| 35 * |
| 36 * \brief Setup a sixlowpan stack to be used as a shim between IPv6 and a generi
c NetDevice. |
35 */ | 37 */ |
36 class SixLowPanHelper | 38 class SixLowPanHelper |
37 { | 39 { |
38 public: | 40 public: |
39 /* | 41 /* |
40 * Construct a SixlowpanHelper | 42 * Construct a SixlowpanHelper |
41 */ | 43 */ |
42 SixLowPanHelper (); | 44 SixLowPanHelper (); |
43 /** | 45 /** |
44 * Set an attribute on each ns3::SixlowpanNetDevice created by | 46 * Set an attribute on each ns3::SixlowpanNetDevice created by |
45 * SixlowpanHelper::Install | 47 * SixlowpanHelper::Install. |
46 * | 48 * |
47 * \param n1 the name of the attribute to set | 49 * \param n1 the name of the attribute to set |
48 * \param v1 the value of the attribute to set | 50 * \param v1 the value of the attribute to set |
49 */ | 51 */ |
50 void SetDeviceAttribute (std::string n1, | 52 void SetDeviceAttribute (std::string n1, |
51 const AttributeValue &v1); | 53 const AttributeValue &v1); |
52 | 54 |
53 /** | 55 /** |
54 * Install the SixLoWPAN stack on top of an existing NetDevice. | 56 * \brief Install the SixLoWPAN stack on top of an existing NetDevice. |
| 57 * |
55 * This function requires a set of properly configured NetDevices | 58 * This function requires a set of properly configured NetDevices |
| 59 * passed in as the parameter "c". The new NetDevices will have to |
| 60 * be used instead of the original ones. In this way these |
| 61 * SixLoWPAN devices will behave as shims between the NetDevices |
| 62 * passed in and IPv6. |
| 63 * |
| 64 * Note that only IPv6 (and related protocols, such as ICMPv6) can |
| 65 * be transmitted over a 6LoWPAN interface. |
| 66 * Any other protocol (e.g., IPv4) will be discarded by 6LoWPAN. |
| 67 * |
| 68 * Other protocols (e.g., IPv4) could be used on the original NetDevices |
| 69 * with some limitations. |
| 70 * See the manual for a complete discussion. |
| 71 * |
| 72 * \note IPv6 stack must be installed \a after SixLoWPAN, |
| 73 * using the SixLoWPAN NetDevices. See the example in the |
| 74 * examples directory. |
| 75 * |
56 * | 76 * |
57 * \param c the NetDevice container | 77 * \param c the NetDevice container |
58 * \return a container with the newly created NetDevices | 78 * \return a container with the newly created SixLowPanNetDevices |
59 */ | 79 */ |
60 NetDeviceContainer Install (NetDeviceContainer c); | 80 NetDeviceContainer Install (NetDeviceContainer c); |
| 81 |
| 82 /** |
| 83 * Assign a fixed random variable stream number to the random variables |
| 84 * used by this model. Return the number of streams (possibly zero) that |
| 85 * have been assigned. The Install() method should have previously been |
| 86 * called by the user. |
| 87 * |
| 88 * \param c NetDeviceContainer of the set of net devices for which the |
| 89 * SixLowPanNetDevice should be modified to use a fixed stream |
| 90 * \param stream first stream index to use |
| 91 * \return the number of stream indices assigned by this helper |
| 92 */ |
| 93 int64_t AssignStreams (NetDeviceContainer c, int64_t stream); |
| 94 |
61 private: | 95 private: |
62 ObjectFactory m_deviceFactory; | 96 ObjectFactory m_deviceFactory; //!< Object factory |
63 }; | 97 }; |
64 | 98 |
65 } // namespace ns3 | 99 } // namespace ns3 |
66 | 100 |
67 | 101 |
68 #endif /* SIXLOWPAN_HELPER_H */ | 102 #endif /* SIXLOWPAN_HELPER_H */ |
LEFT | RIGHT |