merge with trunk
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2007 University of Washington
|
||||
*
|
||||
* 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;
|
||||
@@ -14,11 +12,8 @@
|
||||
* 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: Craig Dowell <craigdo@ee.washingon.edu>
|
||||
*
|
||||
* Wed Feb 14 16:05:46 PST 2007 craigdo: Created
|
||||
*/
|
||||
|
||||
#ifndef CHANNEL_H
|
||||
#define CHANNEL_H
|
||||
|
||||
@@ -41,6 +36,7 @@ class Channel : public Object
|
||||
{
|
||||
public:
|
||||
static const InterfaceId iid;
|
||||
|
||||
Channel ();
|
||||
Channel (std::string name);
|
||||
|
||||
@@ -62,8 +58,8 @@ public:
|
||||
virtual Ptr<NetDevice> GetDevice (uint32_t i) const = 0;
|
||||
|
||||
protected:
|
||||
virtual ~Channel ();
|
||||
std::string m_name;
|
||||
virtual ~Channel ();
|
||||
std::string m_name;
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
@@ -135,6 +135,17 @@ Ipv4Address::Ipv4Address (char const *address)
|
||||
m_address = AsciiToIpv4Host (address);
|
||||
}
|
||||
|
||||
void
|
||||
Ipv4Address::Set (uint32_t address)
|
||||
{
|
||||
m_address = address;
|
||||
}
|
||||
void
|
||||
Ipv4Address::Set (char const *address)
|
||||
{
|
||||
m_address = AsciiToIpv4Host (address);
|
||||
}
|
||||
|
||||
bool
|
||||
Ipv4Address::IsEqual (Ipv4Address other) const
|
||||
{
|
||||
|
||||
@@ -51,6 +51,22 @@ public:
|
||||
*/
|
||||
Ipv4Address (char const *address);
|
||||
|
||||
/**
|
||||
* input address is in host order.
|
||||
* \param address The host order 32-bit address
|
||||
*/
|
||||
void Set (uint32_t address);
|
||||
/**
|
||||
* \brief Sets an Ipv4Address by parsing a the input C-string
|
||||
*
|
||||
* Input address is in format:
|
||||
* hhh.xxx.xxx.lll
|
||||
* where h is the high byte and l the
|
||||
* low byte
|
||||
* \param address C-string containing the address as described above
|
||||
*/
|
||||
void Set (char const *address);
|
||||
|
||||
/**
|
||||
* \brief Comparison operation between two Ipv4Addresses
|
||||
* \param other address to which to compare this address
|
||||
|
||||
Reference in New Issue
Block a user