|
reSIProcate/rutil
9694
|
dcm! -- add UnusedChecking(_enum) below; More...
Classes | |
| class | FifoStatsInterface |
| Interface for providing metrics on FIFOs, primarily used by CongestionManager. More... | |
| class | AbstractFifo |
| The base class from which various templated Fifo classes are derived. More... | |
| class | AsyncResult |
| class | AsyncProcessHandler |
| class | BaseException |
| The abstract base-class for all exceptions thrown by resip code. More... | |
| class | Base64Coder |
| class | Condition |
| A condition variable that can be signaled or waited on, wraps POSIX/Windows implementations depending on environment. More... | |
| class | ConfigParse |
| class | CongestionManager |
| Abstract base class that provides a basic congestion management interface. More... | |
| class | ConsumerFifoBuffer |
| class | CountBuffer |
| Implementation of std::streambuf used to back CountStream. More... | |
| class | CountStream |
| Used to count the amount of data written to a stream. More... | |
| struct | DataLocalSize |
| class | Data |
| An alternative to std::string, encapsulates an arbitrary buffer of bytes. More... | |
| class | DataHelper |
| class | DataException |
| class | DataBuffer |
| Implementation of std::streambuf used to back the DataStream, iDataStream, and oDataStream. More... | |
| class | DataStream |
| An iostream that operates on an existing Data. More... | |
| class | iDataStream |
| An istream that operates on an existing Data. More... | |
| class | oDataStream |
| An ostream that operates on an existing Data. More... | |
| class | DigestBuffer |
| Implementation of std::streambuf used to back the DigestStream. More... | |
| class | DigestStream |
| Used to accumlate data written to the stream in a DigestBuffer and convert the data to Digest. More... | |
| class | DinkyPool |
| A dirt-simple lightweight pool allocator meant for use in short-lifetime objects. More... | |
| class | AresDnsPollItem |
| class | AresDns |
| class | DnsAAAARecord |
| class | DnsCnameRecord |
| class | DnsHandler |
| class | DnsHostRecord |
| class | DnsNaptrRecord |
| class | DnsResourceRecord |
| class | DnsSrvRecord |
| class | GetDnsCacheDumpHandler |
| class | DNSResult |
| class | DnsResultSink |
| class | DnsRawSink |
| class | DnsStub |
| class | DnsThread |
| class | ExternalDns |
| class | ExternalDnsResult |
| class | ExternalDnsRawResult |
| class | ExternalDnsHostResult |
| class | ExternalDnsHandler |
| class | ExternalDnsCreator |
| class | ExternalDnsFactory |
| class | LocalDns |
| class | RRCache |
| class | RRFactoryBase |
| class | RRFactory |
| class | RRList |
| class | RROverlay |
| class | RRVip |
| class | DnsUtil |
| Provides a collection of utility functions for manipulating DNS names and IP addresses and discovering details about the local interfaces. More... | |
| class | FdPollItemFdSetInfo |
| class | FdPollImplFdSet |
| class | FdPollItemIf |
| class | FdPollItemBase |
| class | FdPollGrp |
| class | FdSetIOObserver |
| An interface class for elements that use an FdSet to watch for IO. More... | |
| class | Fifo |
| A templated, threadsafe message-queue class. More... | |
| class | FileSystem |
| Provides file-system traversal. More... | |
| class | FiniteFifo |
| A templated, threadsafe message-queue class with a fixed size. More... | |
| class | GeneralCongestionManager |
| This is a general-purpose congestion manager. More... | |
| struct | GenericIPAddress |
| Represents an IP-address and port (V4 or V6). More... | |
| class | GenericTimerQueue |
| class | HeapInstanceCounter |
| class | InserterClass |
| Allows a (possibly recursive) container of anything with operator<< to be dumped to a stream. More... | |
| class | InserterPClass |
| Allows a (possibly recursive) container of anything with operator<< to be dumped to a stream. More... | |
| class | IntrusiveListElement |
| class | IntrusiveListElement1 |
| class | IntrusiveListElement2 |
| class | IntrusiveListElement3 |
| class | KeyValueStore |
| class | Lock |
| A convenience class to lock a Lockable (such as a Mutex) on object creation, and unlock on destruction. More... | |
| class | ReadLock |
| class | WriteLock |
| class | PtrLock |
| Much like class Lock above, but takes pointer argument to Lockable, which may be NULL. More... | |
| class | Lockable |
| Abstract base-class for Mutexes. More... | |
| class | Log |
| Singleton that handles logging calls. More... | |
| class | ExternalLogger |
| Interface functor for external logging. More... | |
| class | LogStaticInitializer |
| Class to initialize Log class static variables. More... | |
| class | MD5Buffer |
| Implementation of std::streambuf used to back the MD5Stream. More... | |
| class | MD5Stream |
| Used to accumlate data written to the stream in a MD5Buffer and convert the data to MD5. More... | |
| class | Mutex |
| A semaphore that can be locked by only one thread at a time. More... | |
| class | ParseBuffer |
| Provides string-parsing functionality with protection from buffer overflow. More... | |
| class | ParseException |
| BaseException used to indicate parse failures. More... | |
| class | Poll |
| This class abstracts the Unix system call "poll". More... | |
| class | PoolBase |
| class | ProducerFifoBuffer |
| Class for buffering messages placed in a Fifo, to be used by a single producer. More... | |
| class | Random |
| A static class that wraps the random-number generation code of your platform. More... | |
| class | RecursiveMutex |
| Wraps the recursive mutex implementation on your platform (if there is one). More... | |
| class | ResipStreamBuf |
| class | ResipBasicIOStream |
| class | ResipFastOStream |
| std::ostream replacement. More... | |
| class | ResipFastIStream |
| std::istream replacement More... | |
| class | ResipStdBuf |
| Used to replace std::cerr, std::cout, etc. More... | |
| class | ResipStdCOStream |
| A direct replacement for std::cout, std::cerr, etc. More... | |
| class | RWMutex |
| Wraps the readers/writers mutex implementation on your platform. More... | |
| class | SelectInterruptor |
| Used to 'artificially' interrupt a select call. More... | |
| class | ServerProcess |
| struct | checked_deleter |
| class | bad_weak_ptr |
| class | sp_counted_base |
| class | sp_counted_base_impl |
| class | shared_count |
| struct | static_cast_tag |
| struct | const_cast_tag |
| struct | dynamic_cast_tag |
| struct | polymorphic_cast_tag |
| struct | SharedPtr_traits |
| struct | SharedPtr_traits< void > |
| struct | SharedPtr_traits< void const > |
| struct | SharedPtr_traits< void volatile > |
| struct | SharedPtr_traits< void const volatile > |
| class | SharedPtr |
| Implements reference counted copy semantics for a class T. More... | |
| class | FdSet |
| Object-oriented wrapper for your platform's file-descriptor set. More... | |
| class | OpenSSLInit |
| class | SHA1Buffer |
| An implementation of std::streambuf used to back the SHA1Stream. More... | |
| class | SHA1Stream |
| Used to accumlate data written to the stream in a SHA1Buffer and convert the data to SHA1. More... | |
| class | StlPoolAllocator |
| A dirt-simple lightweight stl pool allocator meant for use in short-lifetime objects. More... | |
| class | Subsystem |
| Class used to specify what sub-system given sections of code belong to, for use by the logging system. More... | |
| class | SysLogBuf |
| class | SysLogStream |
| class | ThreadIf |
| A wrapper class to create and spawn a thread. More... | |
| class | ResipClock |
| Clock used for timing in the Timer class and possibly other areas. More... | |
| class | Timestamped |
| wraps an object with a timestamp More... | |
| class | TimeLimitFifo |
| class | Timer |
| This class is used to get the current system time. More... | |
| class | TransactionTimer |
| class | TimerWithPayload |
| struct | MD5Context |
| class | XMLCursor |
Typedefs | |
| typedef unsigned long | AsyncID |
| typedef DnsStub::Protocol | Protocol |
| typedef unsigned short | FdPollEventMask |
| typedef struct FdPollItemFake * | FdPollItemHandle |
| This is opaque type used to identify a particular Item. | |
| typedef Log | GenericLogImpl |
| DEPRECATED! Left for backward compatibility. | |
| typedef int | Socket |
| typedef void(* | AfterSocketCreationFuncPtr )(Socket s, int transportType, const char *file, int line) |
| typedef unsigned char | md5byte |
Enumerations | |
| enum | LockType { VOCAL_LOCK = 0, VOCAL_READLOCK, VOCAL_WRITELOCK } |
| enum | TransportType { UNKNOWN_TRANSPORT = 0, TLS, TCP, UDP, SCTP, DCCP, DTLS, MAX_TRANSPORT } |
| An enumeration of transport protocols. More... | |
| enum | IpVersion { V4, V6 } |
| An enumeration of IP versions. More... | |
| enum | StunSetting { StunDisabled, StunEnabled } |
Functions | |
| template<typename _Tp > | |
| const _Tp & | resipMin (const _Tp &__a, const _Tp &__b) |
| template<typename _Tp > | |
| const _Tp & | resipMax (const _Tp &__a, const _Tp &__b) |
| template<typename _Tp1 , typename _Tp2 > | |
| const _Tp1 | resipIntDiv (const _Tp1 &__a, const _Tp2 &__b) |
| EncodeStream & | operator<< (EncodeStream &strm, const ConfigParse &config) |
| bool | isEqualNoCase (const Data &left, const Data &right) |
| bool | isTokenEqualNoCase (const Data &left, const Data &right) |
| bool | isLessThanNoCase (const Data &left, const Data &right) |
| bool | operator!= (const Data &lhs, const Data &rhs) |
| bool | operator> (const Data &lhs, const Data &rhs) |
| bool | operator<= (const Data &lhs, const Data &rhs) |
| bool | operator>= (const Data &lhs, const Data &rhs) |
| bool | operator!= (const Data &lhs, const char *rhs) |
| bool | operator> (const Data &lhs, const char *rhs) |
| bool | operator<= (const Data &lhs, const char *rhs) |
| bool | operator>= (const Data &lhs, const char *rhs) |
| bool | operator== (const char *lhs, const Data &rhs) |
| bool | operator!= (const char *lhs, const Data &rhs) |
| bool | operator> (const char *lhs, const Data &rhs) |
| bool | operator<= (const char *lhs, const Data &rhs) |
| bool | operator>= (const char *lhs, const Data &rhs) |
| EncodeStream & | operator<< (EncodeStream &strm, const Data &d) |
| std::ostream & | operator<< (std::ostream &strm, const Data &d) |
| Data | operator+ (const char *c, const Data &d) |
| EncodeStream & | operator<< (EncodeStream &strm, DnsResourceRecord &rr) |
| template<class T > | |
| EncodeStream & | operator<< (EncodeStream &strm, const DNSResult< T > &r) |
| defineQueryType (A, DnsHostRecord, 1, true,"RFC 1035") | |
| defineQueryType (CNAME, DnsCnameRecord, 5, false,"RFC 1035") | |
| defineQueryType (AAAA, DnsAAAARecord, 28, true,"RFC 3596") | |
| defineQueryType (SRV, DnsSrvRecord, 33, true,"RFC 2782") | |
| defineQueryType (NAPTR, DnsNaptrRecord, 35, true,"RFC 2915") | |
| static const char * | leftanglebracket ("<") |
| static const char * | rightanglebracket (">") |
| static const char * | leftsqbracket ("[") |
| static const char * | rightsqbracket ("]") |
| static const char * | sparrowsp (" -> ") |
| static const char * | commaspace (", ") |
| template<class T > | |
| EncodeStream & | insert (EncodeStream &s, const T &t) |
| Completely generic insert function. | |
| template<class T > | |
| EncodeStream & | insert (EncodeStream &s, const std::vector< T > &c) |
| template<class T > | |
| EncodeStream & | insert (EncodeStream &s, const std::deque< T > &c) |
| template<class T > | |
| EncodeStream & | insert (EncodeStream &s, const std::list< T > &c) |
| template<class K , class C > | |
| EncodeStream & | insert (EncodeStream &s, const std::set< K, C > &c) |
| template<class K , class C > | |
| EncodeStream & | insert (EncodeStream &s, const std::multiset< K, C > &c) |
| template<class K , class V , class H > | |
| EncodeStream & | insert (EncodeStream &s, const std::map< K, V, H > &c) |
| template<class T > | |
| EncodeStream & | insert (EncodeStream &s, const std::basic_string< T > &str) |
| template<class T , class U > | |
| EncodeStream & | insert (EncodeStream &s, const std::pair< T, U > &p) |
| template<class T > | |
| EncodeStream & | operator<< (EncodeStream &s, const InserterClass< T > &inserter) |
| Function to allow an Inserter to be used directly with a stream. | |
| template<class T > | |
| InserterClass< T > | Inserter (const T &t) |
| Templatized function to construct an instance of InserterClass for a container to be inserted. | |
| template<class T > | |
| EncodeStream & | insertP (EncodeStream &s, const T &t) |
| The following functions are more or less the same as the above, but add P to the naming and treat data items as pointers. | |
| template<class T > | |
| EncodeStream & | insertP (EncodeStream &s, const std::vector< T > &c) |
| template<class T > | |
| EncodeStream & | insertP (EncodeStream &s, const std::deque< T > &c) |
| template<class T > | |
| EncodeStream & | insertP (EncodeStream &s, const std::list< T > &c) |
| template<class K , class C > | |
| EncodeStream & | insertP (EncodeStream &s, const std::set< K, C > &c) |
| template<class K , class C > | |
| EncodeStream & | insertP (EncodeStream &s, const std::multiset< K, C > &c) |
| template<class K , class V , class H > | |
| EncodeStream & | insertP (EncodeStream &s, const std::map< K, V, H > &c) |
| template<class T > | |
| EncodeStream & | insertP (EncodeStream &s, const std::basic_string< T > &str) |
| template<class T , class U > | |
| EncodeStream & | insertP (EncodeStream &s, const std::pair< T, U > &p) |
| template<class T > | |
| EncodeStream & | operator<< (EncodeStream &s, const InserterPClass< T > &inserter) |
| Function to allow an Inserter to be used directly with a stream. | |
| template<class T > | |
| InserterPClass< T > | InserterP (const T &t) |
| Templatized function to construct an instance of InserterClass for a container to be inserted. | |
| EncodeStream & | operator<< (EncodeStream &strm, const KeyValueStore &store) |
| resip::ResipFastOStream & | operator<< (resip::ResipFastOStream &ostr, const char *str) |
| resip::ResipFastOStream & | operator<< (resip::ResipFastOStream &ostr, char ch) |
| resip::ResipFastOStream & | operator<< (resip::ResipFastOStream &ostr, unsigned char ch) |
| resip::ResipFastOStream & | operator<< (resip::ResipFastOStream &ostr, const unsigned char *str) |
| resip::ResipFastOStream & | operator<< (resip::ResipFastOStream &ostr, signed char ch) |
| resip::ResipFastOStream & | operator<< (resip::ResipFastOStream &ostr, const signed char *str) |
| resip::ResipFastOStream & | operator<< (resip::ResipFastOStream &ostr, const std::string &str) |
| template<class T > | |
| void | checked_delete (T *x) |
| template<class T , class Y > | |
| void | sp_enable_shared_from_this (shared_count const &pn, resip::enable_shared_from_this< T > const *pe, Y const *px) |
| void | sp_enable_shared_from_this (shared_count const &,...) |
| template<class T , class U > | |
| bool | operator== (SharedPtr< T > const &a, SharedPtr< U > const &b) |
| template<class T , class U > | |
| bool | operator!= (SharedPtr< T > const &a, SharedPtr< U > const &b) |
| template<class T , class U > | |
| bool | operator< (SharedPtr< T > const &a, SharedPtr< U > const &b) |
| template<class T > | |
| void | swap (SharedPtr< T > &a, SharedPtr< T > &b) |
| template<class T , class U > | |
| SharedPtr< T > | static_pointer_cast (SharedPtr< U > const &r) |
| template<class T , class U > | |
| SharedPtr< T > | const_pointer_cast (SharedPtr< U > const &r) |
| template<class T , class U > | |
| SharedPtr< T > | dynamic_pointer_cast (SharedPtr< U > const &r) |
| template<class T , class U > | |
| SharedPtr< T > | shared_static_cast (SharedPtr< U > const &r) |
| template<class T , class U > | |
| SharedPtr< T > | shared_dynamic_cast (SharedPtr< U > const &r) |
| template<class T , class U > | |
| SharedPtr< T > | shared_polymorphic_cast (SharedPtr< U > const &r) |
| template<class T , class U > | |
| SharedPtr< T > | shared_polymorphic_downcast (SharedPtr< U > const &r) |
| template<class T > | |
| T * | get_pointer (SharedPtr< T > const &p) |
| template<class E , class T , class Y > | |
| std::basic_ostream< E, T > & | operator<< (std::basic_ostream< E, T > &os, SharedPtr< Y > const &p) |
| template<class D , class T > | |
| D * | get_deleter (SharedPtr< T > const &p) |
| void | initNetwork () |
| set up network - does nothing in unix but needed for windows | |
| int | getErrno () |
| bool | makeSocketNonBlocking (Socket fd) |
| bool | makeSocketBlocking (Socket fd) |
| int | closeSocket (Socket fd) |
| int | getSocketError (Socket fd) |
| int | increaseLimitFds (unsigned int targetFds) |
| Returns negative on error, or number of (positive) allowed fds. | |
| int | setSocketRcvBufLen (Socket fd, int buflen) |
| std::ostream & | operator<< (std::ostream &str, const TransactionTimer &t) |
| std::ostream & | operator<< (std::ostream &str, const TimerWithPayload &t) |
| TransportType | getTransportTypeFromName (const std::string &transportName) |
| Function which translates a transport name to its corrisponding integer enum value. | |
| TransportType | toTransportType (const resip::Data &transportName) |
| std::string | getTransportNameFromType (const TransportType typeEnum) |
| Function which translates a transport enum value to its corrisponding name. | |
| std::string | getTransportNameFromTypeLower (const TransportType typeEnum) |
| const resip::Data & | toData (const TransportType typeEnum) |
| const resip::Data & | toDataLower (const TransportType typeEnum) |
| bool | isReliable (TransportType type) |
| Returns true if passed in transport type is a reliable transport protocol. | |
| void | MD5Init (struct MD5Context *context) |
| void | MD5Update (struct MD5Context *context, md5byte const *buf, unsigned len) |
| void | MD5Final (unsigned char digest[16], struct MD5Context *context) |
| void | MD5Transform (u_int32_t buf[4], u_int32_t const in[16]) |
| void | byteSwap (u_int32_t *buf, unsigned words) |
| wchar_t * | ToWString (const char *str) |
| char * | FromWString (const wchar_t *wstr) |
| void | FreeWString (wchar_t *wstr) |
| void | FreeString (char *str) |
| EncodeStream & | operator<< (EncodeStream &str, const XMLCursor &cursor) |
| EncodeStream & | operator<< (EncodeStream &str, const XMLCursor::Node &cursor) |
Variables | |
| static bool | invokeDataInit = Data::init(DataLocalSize<RESIP_DATA_LOCAL_SIZE>(0)) |
| static LogStaticInitializer | _staticLogInit |
| ResipStdCOStream | resipFastNull |
| static bool | invokeOpenSSLInit = OpenSSLInit::init() |
| static const Data | transportNames [MAX_TRANSPORT] |
| static const Data | transportNamesLower [MAX_TRANSPORT] |
dcm! -- add UnusedChecking(_enum) below;
Define below to enable "RtlGenRandom" (aka SystemFunction036) on Windows platform.
Infrastructure common to VOCAL.
This is an implemention built around FdSet, which in turn is built around select().
As such, it should work on all platforms. The number of concurrent fds is limited by your platform's select call.
See Random.cxx for details. Define below to use common random number generator sate for all resip threads, but private from other parts of app. This makes use of random_r() and friends with mutex protection. Define below to use independent random number generator state for each thread. This makes use of random_r() and friends with TheadIf::tls (thread-local-storage). By default, on POSIX, the standard srandom() and random() functions will be used. This shares the generator state with others libraries running in the same application. Under Linux random() obtains a mutex so is threadsafe. NOTE: See http://evanjones.ca/random-thread-safe.html for some good info. WATCHOUT: Some other library can call srandom() in a stupid way, causing duplicate callids and such.
| typedef void(* resip::AfterSocketCreationFuncPtr)(Socket s, int transportType, const char *file, int line) |
Definition at line 107 of file Socket.hxx.
| typedef unsigned long resip::AsyncID |
Definition at line 26 of file AsyncID.hxx.
| typedef unsigned short resip::FdPollEventMask |
Definition at line 23 of file FdPoll.hxx.
| typedef struct FdPollItemFake* resip::FdPollItemHandle |
This is opaque type used to identify a particular Item.
It is assigned when Item is allocated, and then used to modify or destroy the Item. NOTE: FdPollItemFake doesn't exist: it is fictious, thus this type can never be deferenced.
Definition at line 37 of file FdPoll.hxx.
| typedef Log resip::GenericLogImpl |
DEPRECATED! Left for backward compatibility.
Definition at line 171 of file Logger.hxx.
| typedef unsigned char resip::md5byte |
| typedef DnsStub::Protocol resip::Protocol |
Definition at line 429 of file DnsStub.hxx.
| typedef int resip::Socket |
Definition at line 94 of file Socket.hxx.
| enum resip::IpVersion |
An enumeration of IP versions.
Definition at line 29 of file TransportType.hxx.
| enum resip::LockType |
Definition at line 9 of file Lock.hxx.
{
VOCAL_LOCK = 0,
VOCAL_READLOCK,
VOCAL_WRITELOCK
};
| enum resip::StunSetting |
Definition at line 59 of file TransportType.hxx.
| enum resip::TransportType |
An enumeration of transport protocols.
Definition at line 14 of file TransportType.hxx.
{
UNKNOWN_TRANSPORT = 0,
TLS,
TCP,
UDP,
SCTP,
DCCP,
DTLS,
MAX_TRANSPORT
} TransportType;
| void resip::byteSwap | ( | u_int32_t * | buf, |
| unsigned | words | ||
| ) |
| void resip::checked_delete | ( | T * | x | ) | [inline] |
Definition at line 31 of file SharedCount.hxx.
Referenced by resip::checked_deleter< T >::operator()().
{
// intentionally complex - simplification causes regressions
typedef char type_must_be_complete[ sizeof(T)? 1: -1 ];
(void) sizeof(type_must_be_complete);
delete x;
};
| int resip::closeSocket | ( | Socket | fd | ) |
Definition at line 117 of file Socket.cxx.
References errno, InfoLog, and strerror().
Referenced by openPort(), stunFindLocalInterfaces(), stunNatType(), stunOpenSocketPair(), stunRand(), stunServerProcess(), stunStopServer(), and stunTest().
{
//int ret = ::shutdown(fd, SHUT_RDWR); !jf!
int ret = ::close(fd);
if (ret < 0)
{
InfoLog (<< "Failed to shutdown socket " << fd << " : " << strerror(errno));
}
return ret;
}

| SharedPtr<T> resip::const_pointer_cast | ( | SharedPtr< U > const & | r | ) |
Definition at line 309 of file SharedPtr.hxx.
{
return SharedPtr<T>(r, const_cast_tag());
}
| resip::defineQueryType | ( | A | , |
| DnsHostRecord | , | ||
| 1 | , | ||
| true | , | ||
| "RFC 1035" | |||
| ) |
| resip::defineQueryType | ( | CNAME | , |
| DnsCnameRecord | , | ||
| 5 | , | ||
| false | , | ||
| "RFC 1035" | |||
| ) |
| resip::defineQueryType | ( | AAAA | , |
| DnsAAAARecord | , | ||
| 28 | , | ||
| true | , | ||
| "RFC 3596" | |||
| ) |
| resip::defineQueryType | ( | SRV | , |
| DnsSrvRecord | , | ||
| 33 | , | ||
| true | , | ||
| "RFC 2782" | |||
| ) |
| resip::defineQueryType | ( | NAPTR | , |
| DnsNaptrRecord | , | ||
| 35 | , | ||
| true | , | ||
| "RFC 2915" | |||
| ) |
| SharedPtr<T> resip::dynamic_pointer_cast | ( | SharedPtr< U > const & | r | ) |
Definition at line 314 of file SharedPtr.hxx.
{
return SharedPtr<T>(r, dynamic_cast_tag());
}
| void resip::FreeString | ( | char * | str | ) |
Definition at line 102 of file WceCompat.cxx.
{
if (str)
delete str;
}
| void resip::FreeWString | ( | wchar_t * | wstr | ) |
Definition at line 96 of file WceCompat.cxx.
Referenced by resip::Log::OutputToWin32DebugWindow().
{
if (wstr)
delete wstr;
}
| char* resip::FromWString | ( | const wchar_t * | wstr | ) |
Definition at line 86 of file WceCompat.cxx.
{
if (!wstr) return 0;
int dCharacters = WideCharToMultiByte( CP_UTF8, 0, wstr,lstrlen(wstr)+1, 0,0,0,0 );
char *str = new char[dCharacters +1];
WideCharToMultiByte( CP_UTF8, 0, wstr,-1, str,dCharacters ,0,0 );
return str;
};
| D* resip::get_deleter | ( | SharedPtr< T > const & | p | ) |
Definition at line 372 of file SharedPtr.hxx.
References resip::SharedPtr< T >::_internal_get_deleter().
{
return static_cast<D *>(p._internal_get_deleter(typeid(D)));
}

| T* resip::get_pointer | ( | SharedPtr< T > const & | p | ) | [inline] |
Definition at line 342 of file SharedPtr.hxx.
References resip::SharedPtr< T >::get().
{
return p.get();
}

| int resip::getErrno | ( | ) | [inline] |
Definition at line 97 of file Socket.hxx.
References errno.
Referenced by resip::DnsUtil::getLocalDomainName(), resip::DnsUtil::getLocalHostName(), getMessage(), openPort(), sendMessage(), stunNatType(), stunParseHostName(), stunServerProcess(), and resip::FdPollImplFdSet::waitAndProcess().
{ return errno; }
| int resip::getSocketError | ( | Socket | fd | ) |
XXX: should check return code of getsockopt
Definition at line 131 of file Socket.cxx.
{
int errNum = 0;
int errNumSize = sizeof(errNum);
getsockopt(fd, SOL_SOCKET, SO_ERROR,
(char *)&errNum, (socklen_t *)&errNumSize);
return errNum;
}
| std::string resip::getTransportNameFromType | ( | const TransportType | typeEnum | ) |
Function which translates a transport enum value to its corrisponding name.
| transportNum | the enum value of the transport |
Definition at line 50 of file TransportType.cxx.
References resip::Data::c_str(), and toData().

| std::string resip::getTransportNameFromTypeLower | ( | const TransportType | typeEnum | ) |
Definition at line 56 of file TransportType.cxx.
References resip::Data::c_str(), and toDataLower().
{
return toDataLower(typeEnum).c_str();
}

| TransportType resip::getTransportTypeFromName | ( | const std::string & | transportName | ) |
Function which translates a transport name to its corrisponding integer enum value.
| transportName | the name of the transport e.g. "TCP" |
Definition at line 30 of file TransportType.cxx.
References toTransportType().
{
return toTransportType(transportName.c_str());
}

| int resip::increaseLimitFds | ( | unsigned int | targetFds | ) |
Returns negative on error, or number of (positive) allowed fds.
Definition at line 145 of file Socket.cxx.
References CritLog, errno, and strerror().
{
#if defined(WIN32)
// kw: i don't know if any equiv on windows
return targetFds;
#else
struct rlimit lim;
if (getrlimit(RLIMIT_NOFILE, &lim) < 0)
{
CritLog(<<"getrlimit(NOFILE) failed: " << strerror(errno));
return -1;
}
if (lim.rlim_cur==RLIM_INFINITY || targetFds < lim.rlim_cur)
{
return targetFds;
}
int euid = geteuid();
if (lim.rlim_max==RLIM_INFINITY || targetFds < lim.rlim_max)
{
lim.rlim_cur=targetFds;
}
else
{
if (euid!=0)
{
CritLog(<<"Attempting to increase number of fds when not root. This probably wont work");
}
lim.rlim_cur=targetFds;
lim.rlim_max=targetFds;
}
if (setrlimit(RLIMIT_NOFILE, &lim) < 0)
{
CritLog(<<"setrlimit(NOFILE)=(c="<<lim.rlim_cur<<",m="<<lim.rlim_max
<<",uid="<<euid<<") failed: " << strerror(errno));
/* There is intermediate: could raise cur to max */
return -1;
}
return targetFds;
#endif
}

| void resip::initNetwork | ( | ) |
set up network - does nothing in unix but needed for windows
Definition at line 66 of file Socket.cxx.
Referenced by resip::DnsUtil::getLocalHostName().
{
#if defined(WIN32)
bool doneInit=false;
if( !doneInit )
{
doneInit=true;
WORD wVersionRequested = MAKEWORD( 2, 2 );
WSADATA wsaData;
int err;
err = WSAStartup( wVersionRequested, &wsaData );
if ( err != 0 )
{
// could not find a usable WinSock DLL
//cerr << "Could not load winsock" << endl;
assert(0); // is this is failing, try a different version that 2.2, 1.0 or later will likely work
exit(1);
}
/* Confirm that the WinSock DLL supports 2.2.*/
/* Note that if the DLL supports versions greater */
/* than 2.2 in addition to 2.2, it will still return */
/* 2.2 in wVersion since that is the version we */
/* requested. */
if ( LOBYTE( wsaData.wVersion ) != 2 ||
HIBYTE( wsaData.wVersion ) != 2 )
{
/* Tell the user that we could not find a usable */
/* WinSock DLL. */
WSACleanup( );
//cerr << "Bad winsock verion" << endl;
// TODO !cj! - add error message logging
assert(0); // if this is failing, try a different version that 2.2, 1.0 or later will likely work
exit(1);
}
}
#endif
}
| EncodeStream& resip::insert | ( | EncodeStream & | s, |
| const T & | t | ||
| ) |
Completely generic insert function.
Definition at line 63 of file Inserter.hxx.
Referenced by insert(), insertP(), and operator<<().
{
// use native <<
s << t;
return s;
}
| EncodeStream& resip::insert | ( | EncodeStream & | s, |
| const std::vector< T > & | c | ||
| ) |
Definition at line 74 of file Inserter.hxx.
References commaspace(), insert(), leftsqbracket(), and rightsqbracket().
{
s << leftsqbracket;
for (typename std::vector <T>::const_iterator i = c.begin();
i != c.end(); i++)
{
if (i != c.begin())
{
s << commaspace;
}
// recurse
insert(s, *i);
}
s << rightsqbracket;
return s;
}

| EncodeStream& resip::insert | ( | EncodeStream & | s, |
| const std::deque< T > & | c | ||
| ) |
Definition at line 93 of file Inserter.hxx.
References commaspace(), insert(), leftsqbracket(), and rightsqbracket().
{
s << leftsqbracket;
for (typename std::deque <T>::const_iterator i = c.begin();
i != c.end(); i++)
{
if (i != c.begin())
{
s << commaspace;
}
// recurse
insert(s, *i);
}
s << rightsqbracket;
return s;
}

| EncodeStream& resip::insert | ( | EncodeStream & | s, |
| const std::list< T > & | c | ||
| ) |
Definition at line 112 of file Inserter.hxx.
References commaspace(), insert(), leftsqbracket(), and rightsqbracket().
{
s << leftsqbracket;
for (typename std::list <T>::const_iterator i = c.begin();
i != c.end(); i++)
{
if (i != c.begin())
{
s << commaspace;
}
// recurse
insert(s, *i);
}
s << rightsqbracket;
return s;
}

| EncodeStream& resip::insert | ( | EncodeStream & | s, |
| const std::set< K, C > & | c | ||
| ) |
Definition at line 132 of file Inserter.hxx.
References commaspace(), insert(), leftsqbracket(), and rightsqbracket().
{
s << leftsqbracket;
for (typename std::set <K, C>::const_iterator i = c.begin();
i != c.end(); i++)
{
if (i != c.begin())
{
s << commaspace;
}
insert(s, *i);
}
s << rightsqbracket;
return s;
}

| EncodeStream& resip::insert | ( | EncodeStream & | s, |
| const std::multiset< K, C > & | c | ||
| ) |
Definition at line 152 of file Inserter.hxx.
References commaspace(), insert(), leftsqbracket(), and rightsqbracket().
{
s << leftsqbracket;
for (typename std::multiset <K, C>::const_iterator i = c.begin();
i != c.end(); i++)
{
if (i != c.begin())
{
s << commaspace;
}
insert(s, *i);
}
s << rightsqbracket;
return s;
}

| EncodeStream& resip::insert | ( | EncodeStream & | s, |
| const std::map< K, V, H > & | c | ||
| ) |
Definition at line 215 of file Inserter.hxx.
References commaspace(), insert(), leftsqbracket(), rightsqbracket(), and sparrowsp().
{
s << leftsqbracket;
for (typename std::map<K,V, H>::const_iterator i = c.begin();
i != c.end(); i++)
{
if (i != c.begin())
{
s << commaspace;
}
insert(s, i->first);
s << sparrowsp;
insert(s, i->second);
}
s << rightsqbracket;
return s;
}

| EncodeStream& resip::insert | ( | EncodeStream & | s, |
| const std::basic_string< T > & | str | ||
| ) |
Definition at line 236 of file Inserter.hxx.
{
// use native <<
s << str;
return s;
}
| EncodeStream& resip::insert | ( | EncodeStream & | s, |
| const std::pair< T, U > & | p | ||
| ) |
Definition at line 246 of file Inserter.hxx.
References commaspace(), leftanglebracket(), and rightanglebracket().
{
// use native <<
s << leftanglebracket << p.first << commaspace << p.second << rightanglebracket;
return s;
}

| InserterClass<T> resip::Inserter | ( | const T & | t | ) |
Templatized function to construct an instance of InserterClass for a container to be inserted.
The function induces the template type, saving the user from thinking about it.
Definition at line 298 of file Inserter.hxx.
Referenced by resip::DnsUtil::lookupARecords(), and main().
{
return InserterClass<T>(t);
}
| InserterPClass<T> resip::InserterP | ( | const T & | t | ) |
Templatized function to construct an instance of InserterClass for a container to be inserted.
The function induces the template type, saving the user from thinking about it.
Definition at line 551 of file Inserter.hxx.
Referenced by main().
{
return InserterPClass<T>(t);
}
| EncodeStream& resip::insertP | ( | EncodeStream & | s, |
| const T & | t | ||
| ) |
The following functions are more or less the same as the above, but add P to the naming and treat data items as pointers.
Completely generic insert function
Definition at line 316 of file Inserter.hxx.
Referenced by operator<<().
{
// use native <<
s << *t;
return s;
}
| EncodeStream& resip::insertP | ( | EncodeStream & | s, |
| const std::vector< T > & | c | ||
| ) |
Definition at line 327 of file Inserter.hxx.
References commaspace(), insert(), leftsqbracket(), and rightsqbracket().
{
s << leftsqbracket;
for (typename std::vector <T>::const_iterator i = c.begin();
i != c.end(); i++)
{
if (i != c.begin())
{
s << commaspace;
}
// recurse
insert(s, *(*i));
}
s << rightsqbracket;
return s;
}

| EncodeStream& resip::insertP | ( | EncodeStream & | s, |
| const std::deque< T > & | c | ||
| ) |
Definition at line 346 of file Inserter.hxx.
References commaspace(), insert(), leftsqbracket(), and rightsqbracket().
{
s << leftsqbracket;
for (typename std::deque <T>::const_iterator i = c.begin();
i != c.end(); i++)
{
if (i != c.begin())
{
s << commaspace;
}
// recurse
insert(s, *(*i));
}
s << rightsqbracket;
return s;
}

| EncodeStream& resip::insertP | ( | EncodeStream & | s, |
| const std::list< T > & | c | ||
| ) |
Definition at line 365 of file Inserter.hxx.
References commaspace(), insert(), leftsqbracket(), and rightsqbracket().
{
s << leftsqbracket;
for (typename std::list <T>::const_iterator i = c.begin();
i != c.end(); i++)
{
if (i != c.begin())
{
s << commaspace;
}
// recurse
insert(s, *(*i));
}
s << rightsqbracket;
return s;
}

| EncodeStream& resip::insertP | ( | EncodeStream & | s, |
| const std::set< K, C > & | c | ||
| ) |
Definition at line 385 of file Inserter.hxx.
References commaspace(), insert(), leftsqbracket(), and rightsqbracket().
{
s << leftsqbracket;
for (typename std::set <K, C>::const_iterator i = c.begin();
i != c.end(); i++)
{
if (i != c.begin())
{
s << commaspace;
}
insert(s, *(*i));
}
s << rightsqbracket;
return s;
}

| EncodeStream& resip::insertP | ( | EncodeStream & | s, |
| const std::multiset< K, C > & | c | ||
| ) |
Definition at line 405 of file Inserter.hxx.
References commaspace(), insert(), leftsqbracket(), and rightsqbracket().
{
s << leftsqbracket;
for (typename std::multiset <K, C>::const_iterator i = c.begin();
i != c.end(); i++)
{
if (i != c.begin())
{
s << commaspace;
}
insert(s, *(*i));
}
s << rightsqbracket;
return s;
}

| EncodeStream& resip::insertP | ( | EncodeStream & | s, |
| const std::map< K, V, H > & | c | ||
| ) |
Definition at line 468 of file Inserter.hxx.
References commaspace(), insert(), leftsqbracket(), rightsqbracket(), and sparrowsp().
{
s << leftsqbracket;
for (typename std::map<K,V, H>::const_iterator i = c.begin();
i != c.end(); i++)
{
if (i != c.begin())
{
s << commaspace;
}
insert(s, i->first);
s << sparrowsp;
insert(s, *i->second);
}
s << rightsqbracket;
return s;
}

| EncodeStream& resip::insertP | ( | EncodeStream & | s, |
| const std::basic_string< T > & | str | ||
| ) |
Definition at line 489 of file Inserter.hxx.
{
// use native <<
s << str;
return s;
}
| EncodeStream& resip::insertP | ( | EncodeStream & | s, |
| const std::pair< T, U > & | p | ||
| ) |
Definition at line 499 of file Inserter.hxx.
References commaspace(), leftanglebracket(), and rightanglebracket().
{
// use native <<
s << leftanglebracket << *p.first << commaspace << *p.second << rightanglebracket;
return s;
}

| bool resip::isEqualNoCase | ( | const Data & | left, |
| const Data & | right | ||
| ) | [inline] |
Definition at line 1000 of file Data.hxx.
References resip::Data::data(), and resip::Data::size().
Referenced by resip::ConfigParse::getConfigValue(), resip::Log::initialize(), TestData::main(), resip::ConfigParse::parseCommandLine(), toTransportType(), and resip::GeneralCongestionManager::updateFifoTolerances().
{
return ( (left.size() == right.size()) &&
(strncasecmp(left.data(), right.data(), left.size()) == 0) );
}

| bool resip::isLessThanNoCase | ( | const Data & | left, |
| const Data & | right | ||
| ) | [inline] |
Definition at line 1011 of file Data.hxx.
References resip::Data::data(), resipMin(), and resip::Data::size().
{
size_t minsize = resipMin( left.size(), right.size() );
int res = strncasecmp(left.data(), right.data(), minsize);
if (res < 0)
{
return true;
}
else if (res > 0)
{
return false;
}
else
{
return left.size() < right.size();
}
}

| bool resip::isReliable | ( | TransportType | type | ) |
| bool resip::isTokenEqualNoCase | ( | const Data & | left, |
| const Data & | right | ||
| ) | [inline] |
Definition at line 1006 of file Data.hxx.
References resip::Data::caseInsensitiveTokenCompare().
{
return left.caseInsensitiveTokenCompare(right);
}

| bool resip::makeSocketBlocking | ( | Socket | fd | ) |
Definition at line 43 of file Socket.cxx.
{
#if defined(WIN32)
unsigned long noBlock = 0;
int errNoBlock = ioctlsocket( fd, FIONBIO , &noBlock );
if ( errNoBlock != 0 )
{
return false;
}
#else
int flags = fcntl( fd, F_GETFL, 0);
int errNoBlock = fcntl(fd, F_SETFL, flags & ~O_NONBLOCK );
if ( errNoBlock != 0 ) // !cj! I may have messed up this line
{
return false;
}
#endif
return true;
}
| bool resip::makeSocketNonBlocking | ( | Socket | fd | ) |
Definition at line 21 of file Socket.cxx.
Referenced by resip::SelectInterruptor::SelectInterruptor(), and stunTest().
{
#if defined(WIN32)
unsigned long noBlock = 1;
int errNoBlock = ioctlsocket( fd, FIONBIO , &noBlock );
if ( errNoBlock != 0 )
{
return false;
}
#else
int flags = fcntl( fd, F_GETFL, 0);
int errNoBlock = fcntl(fd, F_SETFL, flags | O_NONBLOCK );
if ( errNoBlock != 0 ) // !cj! I may have messed up this line
{
return false;
}
#endif
return true;
}
| void resip::MD5Final | ( | unsigned char | digest[16], |
| struct MD5Context * | context | ||
| ) |
Definition at line 116 of file vmd5.cxx.
References resip::MD5Context::buf, resip::MD5Context::bytes, byteSwap, resip::MD5Context::in, and MD5Transform().
Referenced by resip::MD5Buffer::getBin(), resip::MD5Buffer::getHex(), and resip::Data::md5().
{
int count = ctx->bytes[0] & 0x3f; /* Number of bytes in ctx->in */
md5byte *p = (md5byte *)ctx->in + count;
/* Set the first char of padding to 0x80. There is always room. */
*p++ = 0x80;
/* Bytes of padding needed to make 56 bytes (-8..55) */
count = 56 - 1 - count;
if (count < 0)
{ /* Padding forces an extra block */
memset(p, 0, count + 8);
byteSwap(ctx->in, 16);
MD5Transform(ctx->buf, ctx->in);
p = (md5byte *)ctx->in;
count = 56;
}
memset(p, 0, count);
byteSwap(ctx->in, 14);
/* Append length in bits and transform */
ctx->in[14] = ctx->bytes[0] << 3;
ctx->in[15] = ctx->bytes[1] << 3 | ctx->bytes[0] >> 29;
MD5Transform(ctx->buf, ctx->in);
byteSwap(ctx->buf, 4);
memcpy(digest, ctx->buf, 16);
memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
}

| void resip::MD5Init | ( | struct MD5Context * | context | ) |
Definition at line 58 of file vmd5.cxx.
References resip::MD5Context::buf, and resip::MD5Context::bytes.
Referenced by resip::Data::md5(), and resip::MD5Buffer::MD5Buffer().
{
ctx->buf[0] = 0x67452301;
ctx->buf[1] = 0xefcdab89;
ctx->buf[2] = 0x98badcfe;
ctx->buf[3] = 0x10325476;
ctx->bytes[0] = 0;
ctx->bytes[1] = 0;
}
| void resip::MD5Transform | ( | u_int32_t | buf[4], |
| u_int32_t const | in[16] | ||
| ) |
Definition at line 168 of file vmd5.cxx.
References F1, F2, F3, F4, and MD5STEP.
Referenced by MD5Final(), and MD5Update().
{
register u_int32_t a, b, c, d;
a = buf[0];
b = buf[1];
c = buf[2];
d = buf[3];
MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7);
MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12);
MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17);
MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22);
MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7);
MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12);
MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17);
MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22);
MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7);
MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12);
MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22);
MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7);
MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12);
MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17);
MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22);
MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5);
MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9);
MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14);
MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20);
MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5);
MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9);
MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20);
MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5);
MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9);
MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14);
MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20);
MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5);
MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9);
MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14);
MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4);
MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11);
MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23);
MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4);
MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11);
MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16);
MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23);
MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4);
MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11);
MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16);
MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23);
MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4);
MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23);
MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6);
MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10);
MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15);
MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21);
MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6);
MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10);
MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15);
MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21);
MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6);
MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10);
MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15);
MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21);
MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6);
MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10);
MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15);
MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21);
buf[0] += a;
buf[1] += b;
buf[2] += c;
buf[3] += d;
}
| void resip::MD5Update | ( | struct MD5Context * | context, |
| md5byte const * | buf, | ||
| unsigned | len | ||
| ) |
Definition at line 74 of file vmd5.cxx.
References resip::MD5Context::buf, resip::MD5Context::bytes, byteSwap, resip::MD5Context::in, and MD5Transform().
Referenced by resip::Data::md5(), and resip::MD5Buffer::sync().
{
u_int32_t t;
/* Update byte count */
t = ctx->bytes[0];
if ((ctx->bytes[0] = t + len) < t)
ctx->bytes[1]++; /* Carry from low to high */
t = 64 - (t & 0x3f); /* Space available in ctx->in (at least 1) */
if (t > len)
{
memcpy((md5byte *)ctx->in + 64 - t, buf, len);
return ;
}
/* First chunk is an odd size */
memcpy((md5byte *)ctx->in + 64 - t, buf, t);
byteSwap(ctx->in, 16);
MD5Transform(ctx->buf, ctx->in);
buf += t;
len -= t;
/* Process data in 64-byte chunks */
while (len >= 64)
{
memcpy(ctx->in, buf, 64);
byteSwap(ctx->in, 16);
MD5Transform(ctx->buf, ctx->in);
buf += 64;
len -= 64;
}
/* Handle any remaining bytes of data. */
memcpy(ctx->in, buf, len);
}

| bool resip::operator!= | ( | SharedPtr< T > const & | a, |
| SharedPtr< U > const & | b | ||
| ) | [inline] |
Definition at line 278 of file SharedPtr.hxx.
References resip::SharedPtr< T >::get().
{
return a.get() != b.get();
}

| bool resip::operator!= | ( | const Data & | lhs, |
| const Data & | rhs | ||
| ) | [inline] |
| bool resip::operator!= | ( | const Data & | lhs, |
| const char * | rhs | ||
| ) | [inline] |
| bool resip::operator!= | ( | const char * | lhs, |
| const Data & | rhs | ||
| ) | [inline] |
| Data resip::operator+ | ( | const char * | c, |
| const Data & | d | ||
| ) | [inline] |
| bool resip::operator< | ( | SharedPtr< T > const & | a, |
| SharedPtr< U > const & | b | ||
| ) | [inline] |
Definition at line 294 of file SharedPtr.hxx.
References resip::SharedPtr< T >::_internal_less().
{
return a._internal_less(b);
}

| EncodeStream & resip::operator<< | ( | EncodeStream & | strm, |
| DnsResourceRecord & | rr | ||
| ) |
Definition at line 5 of file DnsResourceRecord.cxx.
References resip::DnsResourceRecord::dump().
{
rr.dump(strm);
return strm;
}

| EncodeStream& resip::operator<< | ( | EncodeStream & | strm, |
| const DNSResult< T > & | r | ||
| ) |
Definition at line 70 of file DnsStub.hxx.
{
r.dump(strm);
return strm;
}
| EncodeStream & resip::operator<< | ( | EncodeStream & | strm, |
| const KeyValueStore & | store | ||
| ) |
Definition at line 85 of file KeyValueStore.cxx.
{
strm << "[KeyValueStore]";
return strm;
}
| EncodeStream & resip::operator<< | ( | EncodeStream & | str, |
| const XMLCursor & | cursor | ||
| ) |
Definition at line 631 of file XMLCursor.cxx.
References resip::XMLCursor::mCursor.
{
str << "XMLCursor " << *cursor.mCursor;
return str;
}
| EncodeStream & resip::operator<< | ( | EncodeStream & | str, |
| const XMLCursor::Node & | cursor | ||
| ) |
Definition at line 616 of file XMLCursor.cxx.
References resip::ParseBuffer::end(), resip::XMLCursor::Node::mPb, and resip::ParseBuffer::start().
{
Data::size_type size = node.mPb.end() - node.mPb.start();
static const Data::size_type showSize(35);
str << &node << "["
<< Data(node.mPb.start(),
min(showSize, size))
<< "]" << (size ? "" : "...");
return str;
}

| std::ostream& resip::operator<< | ( | std::ostream & | str, |
| const TransactionTimer & | t | ||
| ) | [inline] |
Definition at line 212 of file Timer.hxx.
References resip::TransactionTimer::encode().
{
return t.encode(str);
}

| std::ostream& resip::operator<< | ( | std::ostream & | str, |
| const TimerWithPayload & | t | ||
| ) | [inline] |
Definition at line 217 of file Timer.hxx.
References resip::TimerWithPayload::encode().
{
return t.encode(str);
}

| EncodeStream& resip::operator<< | ( | EncodeStream & | s, |
| const InserterClass< T > & | inserter | ||
| ) |
Function to allow an Inserter to be used directly with a stream.
Definition at line 283 of file Inserter.hxx.
References insert().
{
#if defined(WIN32) && defined(_MSC_VER) && (_MSC_VER < 1310)
assert(0); // CJ - really need to fix this
return s;
#else
return insert(s, inserter._t);
#endif
}

| EncodeStream & resip::operator<< | ( | EncodeStream & | strm, |
| const ConfigParse & | config | ||
| ) |
Definition at line 326 of file ConfigParse.cxx.
References resip::ConfigParse::mConfigValues.
{
ConfigParse::ConfigValuesMap::const_iterator it = config.mConfigValues.begin();
for(; it != config.mConfigValues.end(); it++)
{
strm << it->first << " = " << it->second << endl;
}
return strm;
}
| std::basic_ostream<E, T>& resip::operator<< | ( | std::basic_ostream< E, T > & | os, |
| SharedPtr< Y > const & | p | ||
| ) |
Definition at line 355 of file SharedPtr.hxx.
References resip::SharedPtr< T >::get().
{
os << p.get();
return os;
}

| resip::ResipFastOStream& resip::operator<< | ( | resip::ResipFastOStream & | ostr, |
| const char * | str | ||
| ) | [inline] |
Definition at line 367 of file resipfaststreams.hxx.
References resip::ResipFastOStream::write().
{
ostr.write(str,strlen(str));
return ostr;
}

| resip::ResipFastOStream& resip::operator<< | ( | resip::ResipFastOStream & | ostr, |
| char | ch | ||
| ) | [inline] |
Definition at line 374 of file resipfaststreams.hxx.
References resip::ResipFastOStream::put().
{
ostr.put(ch);
return ostr;
}

| resip::ResipFastOStream& resip::operator<< | ( | resip::ResipFastOStream & | ostr, |
| unsigned char | ch | ||
| ) | [inline] |
Definition at line 381 of file resipfaststreams.hxx.
References resip::ResipFastOStream::put().
{
ostr.put((char)ch);
return ostr;
}

| resip::ResipFastOStream& resip::operator<< | ( | resip::ResipFastOStream & | ostr, |
| const unsigned char * | str | ||
| ) | [inline] |
Definition at line 388 of file resipfaststreams.hxx.
References resip::ResipFastOStream::write().
{
ostr.write((const char *)str,strlen((const char *)str));
return ostr;
}

| resip::ResipFastOStream& resip::operator<< | ( | resip::ResipFastOStream & | ostr, |
| signed char | ch | ||
| ) | [inline] |
Definition at line 395 of file resipfaststreams.hxx.
References resip::ResipFastOStream::put().
{
ostr.put((char)ch);
return ostr;
}

| resip::ResipFastOStream& resip::operator<< | ( | resip::ResipFastOStream & | ostr, |
| const signed char * | str | ||
| ) | [inline] |
Definition at line 402 of file resipfaststreams.hxx.
References resip::ResipFastOStream::write().
{
ostr.write((const char *)str,strlen((const char *)str));
return ostr;
}

| resip::ResipFastOStream& resip::operator<< | ( | resip::ResipFastOStream & | ostr, |
| const std::string & | str | ||
| ) | [inline] |
Definition at line 409 of file resipfaststreams.hxx.
References resip::ResipFastOStream::write().
{
ostr.write(str.c_str(),str.size());
return ostr;
}

| EncodeStream& resip::operator<< | ( | EncodeStream & | s, |
| const InserterPClass< T > & | inserter | ||
| ) |
Function to allow an Inserter to be used directly with a stream.
Definition at line 536 of file Inserter.hxx.
References insertP().
{
#if defined(WIN32) && defined(_MSC_VER) && (_MSC_VER < 1310)
assert(0); // CJ - really need to fix this
return s;
#else
return insertP(s, inserter._t);
#endif
}

| EncodeStream & resip::operator<< | ( | EncodeStream & | strm, |
| const Data & | d | ||
| ) |
Definition at line 1883 of file Data.cxx.
References resip::Data::mBuf, and resip::Data::mSize.
| std::ostream& resip::operator<< | ( | std::ostream & | strm, |
| const Data & | d | ||
| ) | [inline] |
Definition at line 1087 of file Data.hxx.
References resip::Data::mBuf, and resip::Data::mSize.
{
return strm.write(d.mBuf, d.mSize);
}
| bool resip::operator<= | ( | const Data & | lhs, |
| const Data & | rhs | ||
| ) | [inline] |
| bool resip::operator<= | ( | const Data & | lhs, |
| const char * | rhs | ||
| ) | [inline] |
| bool resip::operator<= | ( | const char * | lhs, |
| const Data & | rhs | ||
| ) | [inline] |
| bool resip::operator== | ( | SharedPtr< T > const & | a, |
| SharedPtr< U > const & | b | ||
| ) | [inline] |
Definition at line 273 of file SharedPtr.hxx.
References resip::SharedPtr< T >::get().
{
return a.get() == b.get();
}

| bool resip::operator== | ( | const char * | lhs, |
| const Data & | rhs | ||
| ) | [inline] |
| bool resip::operator> | ( | const Data & | lhs, |
| const Data & | rhs | ||
| ) | [inline] |
| bool resip::operator> | ( | const Data & | lhs, |
| const char * | rhs | ||
| ) | [inline] |
| bool resip::operator> | ( | const char * | lhs, |
| const Data & | rhs | ||
| ) | [inline] |
| bool resip::operator>= | ( | const Data & | lhs, |
| const Data & | rhs | ||
| ) | [inline] |
| bool resip::operator>= | ( | const Data & | lhs, |
| const char * | rhs | ||
| ) | [inline] |
| bool resip::operator>= | ( | const char * | lhs, |
| const Data & | rhs | ||
| ) | [inline] |
| const _Tp1 resip::resipIntDiv | ( | const _Tp1 & | __a, |
| const _Tp2 & | __b | ||
| ) | [inline] |
Definition at line 132 of file compat.hxx.
Referenced by resip::GeneralCongestionManager::getCongestionPercent(), and resip::AbstractFifo< Timestamped< Msg * > >::onFifoPolled().
{
// .bwc. Divide-round-nearest without using any floating-point.
if(__a%__b > __b/2)
{
return __a/__b+1;
}
return __a/__b;
}
| const _Tp& resip::resipMax | ( | const _Tp & | __a, |
| const _Tp & | __b | ||
| ) | [inline] |
Definition at line 125 of file compat.hxx.
Referenced by resip::Data::operator^=().
{
if (__a < __b) return __b; return __a;
}
| const _Tp& resip::resipMin | ( | const _Tp & | __a, |
| const _Tp & | __b | ||
| ) | [inline] |
Definition at line 118 of file compat.hxx.
Referenced by resip::FdPollImplFdSet::buildFdSetForObservers(), isLessThanNoCase(), and resip::FdPollImplFdSet::waitAndProcess().
{
if (__b < __a) return __b; return __a;
}
| static const char* resip::rightanglebracket | ( | " | , |
| " | |||
| ) | [static] |
| int resip::setSocketRcvBufLen | ( | Socket | fd, |
| int | buflen | ||
| ) |
Definition at line 228 of file Socket.cxx.
References ErrLog, InfoLog, and trySetRcvBuf().
{
assert(buflen >= 1024);
int goal=buflen;
int trylen=goal;
int sts;
int lastgoodset = 0, lastgoodget=0;
/* go down by factors of 2 */
for (; ; trylen /= 2)
{
if (trylen < 1024)
{
ErrLog(<<"setsockopt(SO_RCVBUF) failed");
return -1;
}
if ((sts=trySetRcvBuf(fd, trylen)) >= 0)
{
lastgoodset = trylen;
lastgoodget = sts;
break;
}
}
/* go up by 10% steps */
unsigned step = trylen/10;
for ( ; trylen<goal; trylen+=step)
{
if ((sts=trySetRcvBuf(fd,trylen)) < 0)
{
break;
}
lastgoodset = trylen;
lastgoodget = sts;
}
if (lastgoodset < goal)
{
ErrLog(<<"setsockopt(SO_RCVBUF) goal "<<goal<<" not met (set="
<<lastgoodset<<",get="<<lastgoodget<<")");
}
else
{
InfoLog(<<"setsockopt(SO_RCVBUF) goal "<<goal<<" met (set="
<<lastgoodset<<",get="<<lastgoodget<<")");
}
return lastgoodset;
}

| SharedPtr<T> resip::shared_dynamic_cast | ( | SharedPtr< U > const & | r | ) |
Definition at line 326 of file SharedPtr.hxx.
{
return SharedPtr<T>(r, dynamic_cast_tag());
}
| SharedPtr<T> resip::shared_polymorphic_cast | ( | SharedPtr< U > const & | r | ) |
Definition at line 331 of file SharedPtr.hxx.
{
return SharedPtr<T>(r, polymorphic_cast_tag());
}
| SharedPtr<T> resip::shared_polymorphic_downcast | ( | SharedPtr< U > const & | r | ) |
Definition at line 336 of file SharedPtr.hxx.
References resip::SharedPtr< T >::get(), and shared_static_cast().
{
assert(dynamic_cast<T *>(r.get()) == r.get());
return shared_static_cast<T>(r);
}

| SharedPtr<T> resip::shared_static_cast | ( | SharedPtr< U > const & | r | ) |
Definition at line 321 of file SharedPtr.hxx.
Referenced by shared_polymorphic_downcast().
{
return SharedPtr<T>(r, static_cast_tag());
}
| void resip::sp_enable_shared_from_this | ( | shared_count const & | pn, |
| resip::enable_shared_from_this< T > const * | pe, | ||
| Y const * | px | ||
| ) |
Definition at line 58 of file SharedPtr.hxx.
Referenced by resip::SharedPtr< Foo >::SharedPtr().
{
if(pe != 0) pe->_internal_weak_this._internal_assign(const_cast<Y*>(px), pn);
}
| void resip::sp_enable_shared_from_this | ( | shared_count const & | , |
| ... | |||
| ) | [inline] |
Definition at line 63 of file SharedPtr.hxx.
{
}
| SharedPtr<T> resip::static_pointer_cast | ( | SharedPtr< U > const & | r | ) |
Definition at line 304 of file SharedPtr.hxx.
{
return SharedPtr<T>(r, static_cast_tag());
}
| void resip::swap | ( | SharedPtr< T > & | a, |
| SharedPtr< T > & | b | ||
| ) | [inline] |
Definition at line 299 of file SharedPtr.hxx.
References resip::SharedPtr< T >::swap().
Referenced by resip::AbstractFifo< Timestamped< Msg * > >::addMultiple(), and resip::AbstractFifo< Timestamped< Msg * > >::getMultiple().
{
a.swap(b);
}

| const resip::Data & resip::toData | ( | const TransportType | typeEnum | ) |
Definition at line 62 of file TransportType.cxx.
References MAX_TRANSPORT, transportNames, and UNKNOWN_TRANSPORT.
Referenced by getTransportNameFromType().
{
assert(typeEnum >= UNKNOWN_TRANSPORT && typeEnum < MAX_TRANSPORT);
return transportNames[typeEnum];
}
| const resip::Data & resip::toDataLower | ( | const TransportType | typeEnum | ) |
Definition at line 69 of file TransportType.cxx.
References MAX_TRANSPORT, transportNamesLower, and UNKNOWN_TRANSPORT.
Referenced by getTransportNameFromTypeLower().
{
assert(typeEnum >= UNKNOWN_TRANSPORT && typeEnum < MAX_TRANSPORT);
return transportNamesLower[typeEnum];
}
| TransportType resip::toTransportType | ( | const resip::Data & | transportName | ) |
Definition at line 36 of file TransportType.cxx.
References isEqualNoCase(), MAX_TRANSPORT, transportNames, and UNKNOWN_TRANSPORT.
Referenced by getTransportTypeFromName().
{
for (TransportType i = UNKNOWN_TRANSPORT; i < MAX_TRANSPORT;
i = static_cast<TransportType>(i + 1))
{
if (isEqualNoCase(transportName, transportNames[i]))
{
return i;
}
}
return UNKNOWN_TRANSPORT;
}

| wchar_t* resip::ToWString | ( | const char * | str | ) |
Definition at line 76 of file WceCompat.cxx.
Referenced by resip::Log::OutputToWin32DebugWindow().
{
if (!str) return 0;
int dCharacters = MultiByteToWideChar( CP_UTF8, 0, str,strlen(str)+1, 0,0);
wchar_t *wszStr = new wchar_t[dCharacters+1];
MultiByteToWideChar( CP_UTF8, 0, str,-1, wszStr,dCharacters);
return wszStr;
};
bool resip::invokeDataInit = Data::init(DataLocalSize<RESIP_DATA_LOCAL_SIZE>(0)) [static] |
bool resip::invokeOpenSSLInit = OpenSSLInit::init() [static] |
Definition at line 53 of file OpenSSLInit.hxx.
const Data resip::transportNames[MAX_TRANSPORT] [static] |
{
Data("UNKNOWN_TRANSPORT"),
Data("TLS"),
Data("TCP"),
Data("UDP"),
Data("SCTP"),
Data("DCCP"),
Data("DTLS")
}
Definition at line 7 of file TransportType.cxx.
Referenced by toData(), and toTransportType().
const Data resip::transportNamesLower[MAX_TRANSPORT] [static] |
{
Data("UNKNOWN_TRANSPORT"),
Data("tls"),
Data("tcp"),
Data("udp"),
Data("sctp"),
Data("dccp"),
Data("dtls")
}
Definition at line 18 of file TransportType.cxx.
Referenced by toDataLower().
1.7.5.1