OPAL
Version 3.18.8
|
#include <ies.h>
Public Member Functions | |
IAX2IeCallToken (BYTE length, BYTE *srcData) | |
IAX2IeCallToken () | |
virtual void | PrintOn (ostream &str) const |
virtual BYTE | GetKeyValue () const |
virtual void | StoreDataIn (IAX2IeData &res) |
void | WriteKeySequence (PIPSocket::Address &remoteAddress) |
![]() | |
IAX2IeBinary (BYTE length, BYTE *srcData) | |
IAX2IeBinary (PBYTEArray newValue) | |
IAX2IeBinary () | |
virtual BYTE | GetLengthOfData () const |
void | SetData (const PBYTEArray &newData) |
void | GetData (PBYTEArray &answer) |
void | CopyData (IAX2IeBinary *src) |
![]() | |
IAX2Ie () | |
virtual | ~IAX2Ie () |
virtual PBoolean | IsValid () |
int | GetBinarySize () const |
void | SetData (int &) |
int | ReadData () |
void | WriteBinary (void *data, PINDEX &writeIndex) |
Static Public Member Functions | |
static void | InitialiseKey () |
static PBoolean | ValidKeySequence (IAX2IeCallToken &cf, PIPSocket::Address &remote) |
![]() | |
static IAX2Ie * | BuildInformationElement (BYTE _typeCode, BYTE length, BYTE *srcData) |
Protected Types | |
enum | { iKeyValue = 0x36, oKeyValue = 0x5c, blockSize = 64 } |
Static Protected Member Functions | |
static PString | ReportKeySequence (const PString &time, PIPSocket::Address &remote) |
Static Protected Attributes | |
static PString | secretKey |
static BYTE | iKeyPad [blockSize] |
static BYTE | oKeyPad [blockSize] |
An Information Element that contains the Call Token - a mechanism to stop DOS attacks through setting up lots of calls
The IAX2IeCallToken uses the HMAC SHA1 algorithm to secure the challenge message sent to the initiating computer. With this approach, it is not feasible for spoofing etc of the reply. You can readup on hmac-sha1 at http://en.wikipedia.org/wiki/HMAC
|
protected |
|
inline |
Constructor from data read from the network. Contents are
undefined if the network data is bogus/invalid
|
inline |
Build an empty IAX2IeCallToken, which is used in the new packet, as sent by the node initiating a call
|
inlinevirtual |
Get the key value for this particular Information Element class
Reimplemented from IAX2Ie.
References IAX2Ie::ie_callToken.
|
static |
Initialise the internal key, and the iKeyPad and oKeyPad variables, for the generation of the SHA1-HMAC keysequence. This initialisation happens once, at program startup.
|
virtual |
print this class (nicely) to the designated stream
Reimplemented from IAX2IeBinary.
|
staticprotected |
Report the key sequence that should be built, provided the supplied time string and address
|
inlinevirtual |
Take the data from this IAX2Ie, and copy it into the IAX2IeData structure. This is done on processing an incoming frame which contains IAX2Ie in the data section.
Reimplemented from IAX2Ie.
References IAX2IeData::callToken, and IAX2IeBinary::dataValue.
|
static |
Examine the hash key sequence in the supplied IE, and see if it is valid.
void IAX2IeCallToken::WriteKeySequence | ( | PIPSocket::Address & | remoteAddress | ) |
Fill with a hash key sequence, that we will later verify
|
staticprotected |
Used for generating the SHA1-HMAC hash. Initialised at program startup, saves on time later.
|
staticprotected |
Similar to the iKeyPad, an internal variable
|
staticprotected |
The key used in generating the SHA1-HMAC hash. Key is required for handling incoming calls