EpcTools
An event based multi-threaded C++ development framework.
Static Public Member Functions | List of all members
FDUtility Class Reference

Various Diameter utility functions. More...

#include <efd.h>

Static Public Member Functions

static Void splitDiameterFQDN (std::string &fqdn, std::string &host, std::string &realm)
 Splits a fully qualified domain name into host and realm. More...
 
static Void splitDiameterFQDN (const char *fqdn, std::string &host, std::string &realm)
 Splits a fully qualified domain name into host and realm. More...
 
static size_t str2tbcd (const char *src, size_t srclen, uint8_t *dst, size_t dstlen)
 Converts a series of digits to telephony binary coded decimal. More...
 
static size_t str2tbcd (const char *src, uint8_t *dst, size_t dstlen)
 Converts a series of digits to telephony binary coded decimal. More...
 
static size_t str2tbcd (const std::string &src, uint8_t *dst, size_t dstlen)
 Converts a series of digits to telephony binary coded decimal. More...
 
static size_t tbcd2str (uint8_t *src, size_t srclen, char *dst, size_t dstlen)
 Converts a TBCD value to a series of digits. More...
 
static size_t tbcd2str (uint8_t *src, size_t srclen, std::string &dst)
 Converts a TBCD value to a series of digits. More...
 

Detailed Description

Various Diameter utility functions.

Member Function Documentation

◆ splitDiameterFQDN() [1/2]

static Void FDUtility::splitDiameterFQDN ( const char *  fqdn,
std::string &  host,
std::string &  realm 
)
inlinestatic

Splits a fully qualified domain name into host and realm.

Parameters
fqdnthe fully qualified domain name.
hostthe resulting host.
realmthe resulting realm.

◆ splitDiameterFQDN() [2/2]

Void FDUtility::splitDiameterFQDN ( std::string &  fqdn,
std::string &  host,
std::string &  realm 
)
static

Splits a fully qualified domain name into host and realm.

Parameters
fqdnthe fully qualified domain name.
hostthe resulting host.
realmthe resulting realm.

◆ str2tbcd() [1/3]

size_t FDUtility::str2tbcd ( const char *  src,
size_t  srclen,
uint8_t *  dst,
size_t  dstlen 
)
static

Converts a series of digits to telephony binary coded decimal.

Parameters
srcthe source string containing the digits.
srclenthe length of the source string.
dstthe destination where the TBCD value will be stored.
dstlenthe maximum length of the TBCD value.
Returns
the length of the TBCD encoded value.

◆ str2tbcd() [2/3]

size_t FDUtility::str2tbcd ( const char *  src,
uint8_t *  dst,
size_t  dstlen 
)
static

Converts a series of digits to telephony binary coded decimal.

Parameters
srcthe source NULL terminated string containing the digits.
dstthe destination where the TBCD value will be stored.
dstlenthe maximum length of the TBCD value.
Returns
the length of the TBCD encoded value.

◆ str2tbcd() [3/3]

size_t FDUtility::str2tbcd ( const std::string &  src,
uint8_t *  dst,
size_t  dstlen 
)
static

Converts a series of digits to telephony binary coded decimal.

Parameters
srcthe string containing the digits.
dstthe destination where the TBCD value will be stored.
dstlenthe maximum length of the TBCD value.
Returns
the length of the TBCD encoded value.

◆ tbcd2str() [1/2]

size_t FDUtility::tbcd2str ( uint8_t *  src,
size_t  srclen,
char *  dst,
size_t  dstlen 
)
static

Converts a TBCD value to a series of digits.

Parameters
srcthe source TBCD value.
srclenthe length of the TBCD value in bytes.
dstthe destination where the digits will be stored.
dstlenthe maximum length of the buffer where the digits will be stored.
Returns
the length of the string of digits.

◆ tbcd2str() [2/2]

size_t FDUtility::tbcd2str ( uint8_t *  src,
size_t  srclen,
std::string &  dst 
)
static

Converts a TBCD value to a series of digits.

Parameters
srcthe source TBCD value.
srclenthe length of the TBCD value in bytes.
dstthe destination where the digits will be stored.
Returns
the length of the string of digits.

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