diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/ndpi_main.h | 3 | ||||
-rw-r--r-- | src/include/ndpi_utils.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/include/ndpi_main.h b/src/include/ndpi_main.h index 4c1f328ac..1dfef4606 100644 --- a/src/include/ndpi_main.h +++ b/src/include/ndpi_main.h @@ -151,7 +151,8 @@ extern "C" { char *risk_message); int ndpi_isset_risk(struct ndpi_detection_module_struct *ndpi_str, struct ndpi_flow_struct *flow, ndpi_risk_enum r); - int ndpi_is_printable_string(char * const str, size_t len); + int ndpi_is_printable_buffer(uint8_t const * const buf, size_t len); + int ndpi_normalize_printable_string(char * const str, size_t len); int ndpi_is_valid_hostname(char * const str, size_t len); #define NDPI_ENTROPY_ENCRYPTED_OR_RANDOM(entropy) (entropy > 7.0f) float ndpi_entropy(u_int8_t const * const buf, size_t len); diff --git a/src/include/ndpi_utils.h b/src/include/ndpi_utils.h index c6605528b..5a31cb426 100644 --- a/src/include/ndpi_utils.h +++ b/src/include/ndpi_utils.h @@ -25,6 +25,7 @@ extern u_int8_t ndpi_ends_with(char *str, char *ends); #define ndpi_isalpha(ch) (((ch) >= 'a' && (ch) <= 'z') || ((ch) >= 'A' && (ch) <= 'Z')) #define ndpi_isdigit(ch) ((ch) >= '0' && (ch) <= '9') +#define ndpi_isalnum(ch) (ndpi_isalpha(ch) != 0 || ndpi_isdigit(ch) != 0) #define ndpi_isspace(ch) (((ch) >= '\t' && (ch) <= '\r') || ((ch) == ' ')) #define ndpi_isprint(ch) ((ch) >= 0x20 && (ch) <= 0x7e) #define ndpi_ispunct(ch) (((ch) >= '!' && (ch) <= '/') || \ |