merge from trunk

This commit is contained in:
Mathieu Lacage
2007-08-06 12:35:06 +02:00
83 changed files with 8288 additions and 1589 deletions

View File

@@ -23,8 +23,17 @@
#include "ns3/address-utils.h"
#include "arp-header.h"
NS_HEADER_ENSURE_REGISTERED (ns3::ArpHeader);
namespace ns3 {
uint32_t
ArpHeader::GetUid (void)
{
static uint32_t uid = Header::Register<ArpHeader> ("ArpHeader.ns3");
return uid;
}
ArpHeader::~ArpHeader ()
{}

View File

@@ -25,13 +25,17 @@
#include "ns3/header.h"
#include "ns3/address.h"
#include "ns3/ipv4-address.h"
#include <string>
namespace ns3 {
/**
* \brief The packet header for an ARP packet
*/
class ArpHeader : public Header {
public:
class ArpHeader : public Header
{
public:
static uint32_t GetUid (void);
virtual ~ArpHeader ();
void SetRequest (Address sourceHardwareAddress,

View File

@@ -35,7 +35,6 @@
namespace ns3 {
InternetNode::InternetNode()
{
Construct ();
@@ -75,7 +74,6 @@ InternetNode::Construct (void)
Object::AddInterface (ipv4L4Demux);
}
void
InternetNode::DoFillTraceResolver (CompositeTraceResolver &resolver)
{

View File

@@ -26,10 +26,19 @@
NS_DEBUG_COMPONENT_DEFINE ("Ipv4Header");
NS_HEADER_ENSURE_REGISTERED (ns3::Ipv4Header);
namespace ns3 {
bool Ipv4Header::m_calcChecksum = false;
uint32_t
Ipv4Header::GetUid (void)
{
static uint32_t uid = Header::Register<Ipv4Header> ("Ipv4Header.ns3");
return uid;
}
Ipv4Header::Ipv4Header ()
: m_payloadSize (0),
m_identification (0),

View File

@@ -29,8 +29,10 @@ namespace ns3 {
/**
* \brief Packet header for IPv4
*/
class Ipv4Header : public Header {
class Ipv4Header : public Header
{
public:
static uint32_t GetUid (void);
/**
* \brief Construct a null IPv4 header
*/

View File

@@ -22,10 +22,19 @@
#include "udp-header.h"
#include "ipv4-checksum.h"
NS_HEADER_ENSURE_REGISTERED (ns3::UdpHeader);
namespace ns3 {
bool UdpHeader::m_calcChecksum = false;
uint32_t
UdpHeader::GetUid (void)
{
static uint32_t uid = Header::Register<UdpHeader> ("UdpHeader.ns3");
return uid;
}
/* The magic values below are used only for debugging.
* They can be used to easily detect memory corruption
* problems so you can see the patterns in memory.

View File

@@ -23,6 +23,7 @@
#define UDP_HEADER_H
#include <stdint.h>
#include <string>
#include "ns3/header.h"
#include "ns3/ipv4-address.h"
@@ -30,8 +31,11 @@ namespace ns3 {
/**
* \brief Packet header for UDP packets
*/
class UdpHeader : public Header {
class UdpHeader : public Header
{
public:
static uint32_t GetUid (void);
/**
* \brief Constructor
*