reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
RROverlay.hxx
Go to the documentation of this file.
1#ifndef RESIP_RR_OVERLAY_HXX
2#define RESIP_RR_OVERLAY_HXX
3
4namespace resip
5{
6class Data;
7class BaseException;
8
10{
11 friend bool operator<(const RROverlay& r1, const RROverlay& r2)
12 {
13 if (r1.mType < r2.mType)
14 {
15 return true;
16 }
17 if (r1.mType > r2.mType)
18 {
19 return false;
20 }
21 return r1.mDomain < r2.mDomain;
22 }
23
24 public:
25 RROverlay(const unsigned char *aptr, const unsigned char *abuf, int alen);
26
27 class OverlayException final : public BaseException
28 {
29 public:
30 OverlayException(const Data& msg, const Data& file, const int line)
31 : BaseException(msg, file, line)
32 {
33 }
34
35 const char* name() const noexcept override { return "OverlayException"; }
36 };
37
38 const unsigned char* data() const { return mData; }
39 const unsigned char* msg() const { return mMsg; }
40 int msgLength() const { return mMsgLen; }
41 int dataLength() const { return mDataLen; }
42 int nameLength() const { return mNameLen; }
43 int ttl() const { return mTTL; }
44 int type() const { return mType; }
45 const Data& domain() const { return mDomain; }
46
47 private:
48 const unsigned char* mData;
49 const unsigned char* mMsg;
50 int mMsgLen;
51 int mDataLen;
52 int mNameLen;
53 int mTTL;
54 int mType; //short?
55 Data mDomain; // the domain name this RR refers to.
56};
57
58}
59
60#endif
61
62/* ====================================================================
63 * The Vovida Software License, Version 1.0
64 *
65 * Copyright (c) 2000-2005 Vovida Networks, Inc. All rights reserved.
66 *
67 * Redistribution and use in source and binary forms, with or without
68 * modification, are permitted provided that the following conditions
69 * are met:
70 *
71 * 1. Redistributions of source code must retain the above copyright
72 * notice, this list of conditions and the following disclaimer.
73 *
74 * 2. Redistributions in binary form must reproduce the above copyright
75 * notice, this list of conditions and the following disclaimer in
76 * the documentation and/or other materials provided with the
77 * distribution.
78 *
79 * 3. The names "VOCAL", "Vovida Open Communication Application Library",
80 * and "Vovida Open Communication Application Library (VOCAL)" must
81 * not be used to endorse or promote products derived from this
82 * software without prior written permission. For written
83 * permission, please contact vocal@vovida.org.
84 *
85 * 4. Products derived from this software may not be called "VOCAL", nor
86 * may "VOCAL" appear in their name, without prior written
87 * permission of Vovida Networks, Inc.
88 *
89 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
90 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
91 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
92 * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA
93 * NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT DAMAGES
94 * IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
95 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
96 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
97 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
98 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
99 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
100 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
101 * DAMAGE.
102 *
103 * ====================================================================
104 *
105 * This software consists of voluntary contributions made by Vovida
106 * Networks, Inc. and many individuals on behalf of Vovida Networks,
107 * Inc. For more information on Vovida Networks, Inc., please see
108 * <http://www.vovida.org/>.
109 *
110 */
The abstract base-class for all exceptions thrown by resip code.
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
Definition Data.hxx:90
OverlayException(const Data &msg, const Data &file, const int line)
Definition RROverlay.hxx:30
const char * name() const noexcept override
Definition RROverlay.hxx:35
int type() const
Definition RROverlay.hxx:44
friend bool operator<(const RROverlay &r1, const RROverlay &r2)
Definition RROverlay.hxx:11
int msgLength() const
Definition RROverlay.hxx:40
const Data & domain() const
Definition RROverlay.hxx:45
int dataLength() const
Definition RROverlay.hxx:41
const unsigned char * msg() const
Definition RROverlay.hxx:39
int nameLength() const
Definition RROverlay.hxx:42
const unsigned char * data() const
Definition RROverlay.hxx:38
int ttl() const
Definition RROverlay.hxx:43
dcm! – add UnusedChecking(_enum) below;