droptail and ipv4address dox
parent
6c93b818af
commit
29ba1c1c64
|
@ -31,14 +31,29 @@ class TraceContainer;
|
||||||
|
|
||||||
const int DTQ_NPACKETS_MAX_DEFAULT = 100;
|
const int DTQ_NPACKETS_MAX_DEFAULT = 100;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief A FIFO packet queue that drops tail-end packets on overflow
|
||||||
|
*/
|
||||||
class DropTailQueue : public Queue {
|
class DropTailQueue : public Queue {
|
||||||
public:
|
public:
|
||||||
static const ClassId cid;
|
static const ClassId cid;
|
||||||
|
/**
|
||||||
|
* \brief DropTailQueue Constructor
|
||||||
|
*
|
||||||
|
* Creates a droptail queue with a maximum size of 100 packets by default
|
||||||
|
*/
|
||||||
DropTailQueue ();
|
DropTailQueue ();
|
||||||
|
|
||||||
virtual ~DropTailQueue();
|
virtual ~DropTailQueue();
|
||||||
|
/**
|
||||||
|
* \param npackets The maximum number of packets this queue will hold before
|
||||||
|
* dropping packets.
|
||||||
|
*/
|
||||||
void SetMaxPackets (uint32_t npackets);
|
void SetMaxPackets (uint32_t npackets);
|
||||||
|
/**
|
||||||
|
* \return The maximum number of packets this queue will hold before dropping
|
||||||
|
* packets.
|
||||||
|
*/
|
||||||
uint32_t GetMaxPackets (void);
|
uint32_t GetMaxPackets (void);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -27,31 +27,57 @@
|
||||||
|
|
||||||
namespace ns3 {
|
namespace ns3 {
|
||||||
|
|
||||||
/* Ipv4 addresses are stored in host order in
|
/** Ipv4 addresses are stored in host order in
|
||||||
* this class.
|
* this class.
|
||||||
*/
|
*/
|
||||||
class Ipv4Address {
|
class Ipv4Address {
|
||||||
public:
|
public:
|
||||||
Ipv4Address ();
|
Ipv4Address ();
|
||||||
/* input address is in host order. */
|
/**
|
||||||
Ipv4Address (uint32_t address);
|
* input address is in host order.
|
||||||
/* input address is in format:
|
* \param address The host order 32-bit address
|
||||||
* hhh.xxx.xxx.lll
|
|
||||||
* where h is the high byte and l the
|
|
||||||
* low byte
|
|
||||||
*/
|
*/
|
||||||
|
Ipv4Address (uint32_t address);
|
||||||
|
/**
|
||||||
|
* \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);
|
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;
|
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.
|
* Please, do _not_ use this method.
|
||||||
* It is there only for chunk-ipv4.
|
* It is there only for chunk-ipv4.
|
||||||
|
* \return the host-order 32-bit IP address
|
||||||
*/
|
*/
|
||||||
uint32_t GetHostOrder (void) const;
|
uint32_t GetHostOrder (void) const;
|
||||||
void SetHostOrder (uint32_t ip);
|
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;
|
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;
|
void Print (std::ostream &os) const;
|
||||||
|
|
||||||
bool IsBroadcast (void);
|
bool IsBroadcast (void);
|
||||||
|
|
Loading…
Reference in New Issue