aboutsummaryrefslogtreecommitdiffstats
path: root/epan/crypt/airpdcap_user.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2007-01-11 02:42:34 +0000
committerGerald Combs <gerald@wireshark.org>2007-01-11 02:42:34 +0000
commit983f496f6944f27301f08017a89264077b9fcb7d (patch)
tree79057e0a71f586e0d34c79087bc9d39e18127c79 /epan/crypt/airpdcap_user.h
parent5223c8dfa6b285d0cf59f9fc30c3e42c1e255ab6 (diff)
Add uri_str_to_bytes(), byte_array_dup(), and byte_array_equal()
functions to strutil. Use GByteArrays to store SSIDs for decryption, and let the user specify arbitrary byte strings using percent-encoded strings. We should probably add percent encoding for pass phrases as well, so you can escape the ":" character. Move the key struct key conversion utilities to airpdcap.c, and remove duplicate code from packet-ieee80211.c. Fix a lot of indentation. svn path=/trunk/; revision=20388
Diffstat (limited to 'epan/crypt/airpdcap_user.h')
-rw-r--r--epan/crypt/airpdcap_user.h25
1 files changed, 18 insertions, 7 deletions
diff --git a/epan/crypt/airpdcap_user.h b/epan/crypt/airpdcap_user.h
index b637ea90b8..fb7413a719 100644
--- a/epan/crypt/airpdcap_user.h
+++ b/epan/crypt/airpdcap_user.h
@@ -51,10 +51,10 @@
* Struct to store info about a specific decryption key.
*/
typedef struct {
- GString *key;
- GString *ssid;
- guint bits;
- guint type;
+ GString *key;
+ GByteArray *ssid;
+ guint bits;
+ guint type;
} decryption_key_t;
/**
@@ -159,9 +159,20 @@ typedef struct _AIRPDCAP_KEYS_COLLECTION {
/******************************************************************************/
/* Function prototype declarations */
-/* */
-/* */
-/* */
+
+/*
+ * Returns the decryption_key_t struct given a string describing the key.
+ * Returns NULL if the key_string cannot be parsed.
+ */
+decryption_key_t*
+parse_key_string(gchar* key_string);
+
+/*
+ * Returns a newly allocated string representing the given decryption_key_t struct
+ */
+gchar*
+get_key_string(decryption_key_t* dk);
+
/******************************************************************************/
#endif /* _AIRPDCAP_USER_H */