diff options
Diffstat (limited to 'epan/strutil.h')
-rw-r--r-- | epan/strutil.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/epan/strutil.h b/epan/strutil.h index 0f7b8b4b95..10bf242da4 100644 --- a/epan/strutil.h +++ b/epan/strutil.h @@ -107,10 +107,26 @@ gboolean hex_str_to_bytes(const char *hex_str, GByteArray *bytes, * @param bytes The GByteArray that will receive the bytes. This * must be initialized by the caller. * @return True if the string was converted successfully + * @see format_uri() */ gboolean uri_str_to_bytes(const char *uri_str, GByteArray *bytes); -/** Turn a OID string representation (dot notaion) into a byte array. +/** Turn a byte array into an RFC 3986 percent-encoded string. + * + * @param bytes The GByteArray that will receive the bytes. This + * must be initialized by the caller. + * @param reserved_chars Normally the "gen-delims" and "sub-delims" + * from RFC 3986 (":/?#[]@" and "!$&'()*+,;=" respectively) + * plus space (hex value 20) are treated as reserved characters. + * If this variable is non-NULL, its contents will be used + * instead. + * @note Any non-printing character determined by isprint(), along + * with the % character itself are always reserved. + * @see uri_str_to_bytes(), format_text(), isprint() + */ +gchar* format_uri(const GByteArray *bytes, const gchar *reserved_chars); + +/** Turn a OID string representation (dot notation) into a byte array. * * @param oid_str The OID string (dot notaion). * @param bytes The GByteArray that will receive the bytes. This |