![]() |
Critical Link MityCam SoC Firmware
1.0
Critical Link MityCam SoC Firmware
|
#include <netinet/in.h>#include <arpa/inet.h>#include <fstream>#include <sstream>#include <stdio.h>#include <ctype.h>#include <string.h>#include <unistd.h>#include <limits.h>#include <list>#include <vector>#include <algorithm>#include "str_funcs.h"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) |
| 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_str,...) |
| void | str_split (std::vector< std::string > &list, const std::string &s1, const std::string &s2, bool keep_empty) |
| void | str_strcpy (char *destination, const std::string &source, size_t dest_buf_size) |
| 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) |
| std::string | json_escape (const char *str) |
| std::string | json_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... | |
| 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 | ) |
| std::string json_escape | ( | const char * | str | ) |
| std::string json_escape | ( | std::string | str | ) |
| 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 | ||
| ) |
| std::string str_sprintf | ( | const char * | fmt_str, |
| ... | |||
| ) |
| void str_sprintf | ( | std::string & | s1, |
| const char * | fmt, | ||
| ... | |||
| ) |
| void str_strcpy | ( | char * | destination, |
| const std::string & | source, | ||
| size_t | dest_buf_size | ||
| ) |
| uint32_t str_to_uint32 | ( | const std::string & | s1, |
| int | base | ||
| ) |
| 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 | ) |