diff options
author | Gerald Combs <gerald@wireshark.org> | 2007-01-11 22:12:33 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2007-01-11 22:12:33 +0000 |
commit | def1f435fcc72329f170d120f82233e18f523ebf (patch) | |
tree | 06f89c3c54818c78533d28e22ad77511fe97ed0e /epan/strutil.h | |
parent | 2b15cb01564e381c890022ed037bf65ed02e81da (diff) | |
download | wireshark-def1f435fcc72329f170d120f82233e18f523ebf.tar.gz wireshark-def1f435fcc72329f170d120f82233e18f523ebf.tar.bz2 wireshark-def1f435fcc72329f170d120f82233e18f523ebf.zip |
Fix compilation problems under Windows. In the GTK code, convert SSIDs
to GByteArrays. Add format_uri() to strutil, which formats a byte string
with percent-escapes. Fixup whitespace and indentation.
svn path=/trunk/; revision=20397
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 |