libDwm-0.9.45
Dwm::MplsLabelStack Class Reference

Encapsulates an MPLS label stack. More...

#include <DwmMplsLabelStack.hh>

Public Member Functions

const std::vector< MplsLabel > & Labels () const
 Returns a const reference to the contained MPLS labels.
 
std::vector< MplsLabel > & Labels ()
 Returns a mutable reference to the contained MPLS labels.
 
bool operator== (const MplsLabelStack &labelStack) const
 operator ==
 
std::istream & Read (std::istream &is)
 Reads the label stack from an istream. Returns the istream.
 
std::ostream & Write (std::ostream &os) const
 Writes the label stack to an ostream. Returns the ostream.
 
ssize_t Read (int fd)
 Reads the label stack from a file descriptor.
 
ssize_t Write (int fd) const
 Writes the label stack to a file descriptor.
 
size_t Read (FILE *f)
 Reads the label stack from a FILE.
 
size_t Write (FILE *f) const
 Writes the label stack to a FILE.
 
int Read (gzFile gzf)
 Reads the label stack from the given gzFile gzf.
 
int Write (gzFile gzf) const
 Writes the label stack to the given gzFile gzf.
 
int BZRead (BZFILE *bzf)
 Reads the label stack from the given BZFILE bzf.
 
int BZWrite (BZFILE *bzf) const
 Writes the label stack to the given BZFILE bzf.
 
uint64_t StreamedLength () const
 Returns the number of bytes that should be written if we call one of the Write() members.
 

Protected Attributes

std::vector< MplsLabel_labels
 

Friends

std::ostream & operator<< (std::ostream &os, const MplsLabelStack &labelStack)
 Prints the label stack to an ostream in human-readable form.
 

Detailed Description

Encapsulates an MPLS label stack.

Member Function Documentation

◆ BZRead()

int Dwm::MplsLabelStack::BZRead ( BZFILE * bzf)

Reads the label stack from the given BZFILE bzf.

Returns the number of bytes read on success, -1 on failure.

◆ BZWrite()

int Dwm::MplsLabelStack::BZWrite ( BZFILE * bzf) const

Writes the label stack to the given BZFILE bzf.

Returns the number of bytes written on success, -1 on failure.

◆ Read() [1/3]

size_t Dwm::MplsLabelStack::Read ( FILE * f)

Reads the label stack from a FILE.

Returns 1 on success, 0 on failure.

◆ Read() [2/3]

int Dwm::MplsLabelStack::Read ( gzFile gzf)

Reads the label stack from the given gzFile gzf.

Returns the number of bytes read on success, -1 on failure.

◆ Read() [3/3]

ssize_t Dwm::MplsLabelStack::Read ( int fd)

Reads the label stack from a file descriptor.

Returns the number of bytes read on success, -1 on failure.

◆ Write() [1/3]

size_t Dwm::MplsLabelStack::Write ( FILE * f) const

Writes the label stack to a FILE.

Returns 1 on success, 0 on failure.

◆ Write() [2/3]

int Dwm::MplsLabelStack::Write ( gzFile gzf) const

Writes the label stack to the given gzFile gzf.

Returns the number of bytes written on success, -1 on failure.

◆ Write() [3/3]

ssize_t Dwm::MplsLabelStack::Write ( int fd) const

Writes the label stack to a file descriptor.

Returns the number of bytes written on success, -1 on failure.


The documentation for this class was generated from the following file: