droptail and ipv4address dox

Raj Bhattacharjea 2007-05-14 14:07:26 -04:00
parent 6c93b818af
commit 29ba1c1c64
2 changed files with 54 additions and 13 deletions

View File

@ -31,14 +31,29 @@ class TraceContainer;
const int DTQ_NPACKETS_MAX_DEFAULT = 100;
/**
* \brief A FIFO packet queue that drops tail-end packets on overflow
*/
class DropTailQueue : public Queue {
public:
static const ClassId cid;
/**
* \brief DropTailQueue Constructor
*
* Creates a droptail queue with a maximum size of 100 packets by default
*/
DropTailQueue ();
virtual ~DropTailQueue();
/**
* \param npackets The maximum number of packets this queue will hold before
* dropping packets.
*/
void SetMaxPackets (uint32_t npackets);
/**
* \return The maximum number of packets this queue will hold before dropping
* packets.
*/
uint32_t GetMaxPackets (void);
private:

View File

@ -27,31 +27,57 @@
namespace ns3 {
/* Ipv4 addresses are stored in host order in
/** Ipv4 addresses are stored in host order in
* this class.
*/
class Ipv4Address {
public:
Ipv4Address ();
/* input address is in host order. */
/**
* input address is in host order.
* \param address The host order 32-bit address
*/
Ipv4Address (uint32_t address);
/* input address is in format:
/**
* \brief Constructs 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
*/
Ipv4Address (char const *address);
/**
* \brief Comparison operation between two Ipv4Addresses
* \param other address to which to compare this address
* \return True if the addresses are equal. False otherwise.
*/
bool IsEqual (Ipv4Address other) const;
/* Using this method is frowned upon.
/**
* \brief Get the host-order 32-bit IP address
*
* Using this method is frowned upon.
* Please, do _not_ use this method.
* It is there only for chunk-ipv4.
* \return the host-order 32-bit IP address
*/
uint32_t GetHostOrder (void) const;
void SetHostOrder (uint32_t ip);
/**
* Serialize this address to a 4-byte buffer
* \param buf output buffer to which this address gets overwritten with this
* Ipv4Address
*/
void Serialize (uint8_t buf[4]) const;
/**
* \brief Print this address to the given output stream
*
* The print format is in the typical "192.168.1.1"
* \param os The output stream to which this Ipv4Address is printed
*/
void Print (std::ostream &os) const;
bool IsBroadcast (void);