AddressString Class Reference

#include <NetAddress.hh>


Public Member Functions

 AddressString (struct sockaddr_in const &addr)
 AddressString (struct in_addr const &addr)
 AddressString (netAddressBits addr)
virtual ~AddressString ()
char const * val () const

Private Member Functions

void init (netAddressBits addr)

Private Attributes

char * fVal


Detailed Description

Definition at line 148 of file NetAddress.hh.


Constructor & Destructor Documentation

AddressString::AddressString ( struct sockaddr_in const &  addr  ) 

Definition at line 292 of file NetAddress.cpp.

References init().

00292                                                            {
00293   init(addr.sin_addr.s_addr);
00294 }

AddressString::AddressString ( struct in_addr const &  addr  ) 

Definition at line 296 of file NetAddress.cpp.

References init().

00296                                                        {
00297   init(addr.s_addr);
00298 }

AddressString::AddressString ( netAddressBits  addr  ) 

Definition at line 300 of file NetAddress.cpp.

References init().

00300                                                 {
00301   init(addr);
00302 }

AddressString::~AddressString (  )  [virtual]

Definition at line 310 of file NetAddress.cpp.

References fVal.

00310                               {
00311   delete[] fVal;
00312 }


Member Function Documentation

char const* AddressString::val (  )  const [inline]

Definition at line 156 of file NetAddress.hh.

References fVal.

Referenced by ServerMediaSession::generateSDPDescription(), RTSPServer::RTSPClientSession::handleCmd_SETUP(), DarwinInjector::setDestination(), RTSPClient::setRequestFields(), and OnDemandServerMediaSubsession::setSDPLinesFromRTPSink().

00156 { return fVal; }

void AddressString::init ( netAddressBits  addr  )  [private]

Definition at line 304 of file NetAddress.cpp.

References fVal.

Referenced by AddressString().

00304                                             {
00305   fVal = new char[16]; // large enough for "abc.def.ghi.jkl"
00306   netAddressBits addrNBO = htonl(addr); // make sure we have a value in a known byte order: big endian
00307   sprintf(fVal, "%u.%u.%u.%u", (addrNBO>>24)&0xFF, (addrNBO>>16)&0xFF, (addrNBO>>8)&0xFF, addrNBO&0xFF);
00308 }


Field Documentation

char* AddressString::fVal [private]

Definition at line 162 of file NetAddress.hh.

Referenced by init(), val(), and ~AddressString().


The documentation for this class was generated from the following files:
Generated on Tue Mar 25 14:39:00 2014 for live by  doxygen 1.5.2