Critical Link MityCam SoC Firmware
1.0
Critical Link MityCam SoC Firmware
|
#include <stdint.h>
#include <string>
#include <list>
#include <vector>
#include <stdarg.h>
Go to the source code of this file.
Macros | |
#define | PVAR(v) " "#v" = " << (v) |
#define | PVARX(v) " "#v" = 0x" << std::hex << (v) << std::dec |
#define | PLOC __FILE__ << ":" << __LINE__ << " " |
Functions | |
void | str_replace (std::string &s1, const std::string &s2, const std::string &s3) |
void | str_remove (std::string &s1, const std::string &s2) |
void | str_length_trim (std::string &s1, int maxlen) |
void | str_pad (std::string &s1, int len, char cc) |
uint32_t | str_to_uint32 (const std::string &s1, int base=10) |
void | str_toupper (std::string &s1) |
void | str_tolower (std::string &s1) |
void | str_vsprintf (std::string &s1, const char *fmt, va_list args) |
void | str_sprintf (std::string &s1, const char *fmt,...) |
std::string | str_sprintf (const char *fmt,...) |
void | str_split (std::vector< std::string > &list, const std::string &s1, const std::string &s2, bool keep_empty=true) |
void | str_strcpy (char *destination, const std::string &source, size_t dest_buf_size) |
template<size_t dest_buf_size> | |
void | str_strcpy (char(&destination)[dest_buf_size], const std::string &source) |
void | str_from_ip (std::string &s1, uint32_t ip) |
std::string | format_ipaddr (uint32_t ip) |
uint32_t | ip_from_str (const char *s1) |
uint32_t | ip_from_str (const std::string &s1) |
void | parse_macaddr (const std::string &s1, uint8_t *macaddr) |
std::string | format_macaddr (const uint8_t *macaddr) |
std::string | xml_escape (const char *str) |
std::string | xml_escape (std::string str) |
void | split_ip (uint32_t ip, uint8_t *octets) |
Converts a uint32 IP address into four octets. More... | |
void | form_ip (uint32_t &ip, uint8_t *octets) |
Converts four octets into a uint32 IP address. More... | |
std::string | fileToString (const char *filename) |
std::string | getcwd_string () |
Get the cwd as a string object. More... | |
void | hexdump (void *ptr, int buflen) |
simple hex dump routine More... | |
#define PLOC __FILE__ << ":" << __LINE__ << " " |
#define PVAR | ( | v | ) | " "#v" = " << (v) |
#define PVARX | ( | v | ) | " "#v" = 0x" << std::hex << (v) << std::dec |
std::string fileToString | ( | const char * | filename | ) |
void form_ip | ( | uint32_t & | ip, |
uint8_t * | octets | ||
) |
Converts four octets into a uint32 IP address.
std::string format_ipaddr | ( | uint32_t | ip | ) |
std::string format_macaddr | ( | const uint8_t * | macaddr | ) |
std::string getcwd_string | ( | ) |
Get the cwd as a string object.
void hexdump | ( | void * | ptr, |
int | buflen | ||
) |
simple hex dump routine
ptr | memory to print |
buflen | number of bytes |
uint32_t ip_from_str | ( | const char * | s1 | ) |
uint32_t ip_from_str | ( | const std::string & | s1 | ) |
void parse_macaddr | ( | const std::string & | s1, |
uint8_t * | macaddr | ||
) |
void split_ip | ( | uint32_t | ip, |
uint8_t * | octets | ||
) |
Converts a uint32 IP address into four octets.
void str_from_ip | ( | std::string & | s1, |
uint32_t | ip | ||
) |
void str_length_trim | ( | std::string & | s1, |
int | maxlen | ||
) |
void str_pad | ( | std::string & | s1, |
int | len, | ||
char | cc | ||
) |
void str_remove | ( | std::string & | s1, |
const std::string & | s2 | ||
) |
void str_replace | ( | std::string & | s1, |
const std::string & | s2, | ||
const std::string & | s3 | ||
) |
void str_split | ( | std::vector< std::string > & | list, |
const std::string & | s1, | ||
const std::string & | s2, | ||
bool | keep_empty = true |
||
) |
std::string str_sprintf | ( | const char * | fmt, |
... | |||
) |
void str_sprintf | ( | std::string & | s1, |
const char * | fmt, | ||
... | |||
) |
void str_strcpy | ( | char * | destination, |
const std::string & | source, | ||
size_t | dest_buf_size | ||
) |
void str_strcpy | ( | char(&) | destination[dest_buf_size], |
const std::string & | source | ||
) |
uint32_t str_to_uint32 | ( | const std::string & | s1, |
int | base = 10 |
||
) |
void str_tolower | ( | std::string & | s1 | ) |
void str_toupper | ( | std::string & | s1 | ) |
void str_vsprintf | ( | std::string & | s1, |
const char * | fmt, | ||
va_list | args | ||
) |
std::string xml_escape | ( | const char * | str | ) |
std::string xml_escape | ( | std::string | str | ) |