summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-rlc.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2012-08-09 19:33:36 +0000
committerJeff Morriss <jeff.morriss.ws@gmail.com>2012-08-09 19:33:36 +0000
commit1c1db865f64de1004571abd8d377b912a1b13476 (patch)
tree7ad9c067a8e4a384ca3f4a867f273809c5d87341 /epan/dissectors/packet-rlc.c
parent621ab443547335f1bd6ff5897697650afe27cbb0 (diff)
downloadwireshark-1c1db865f64de1004571abd8d377b912a1b13476.tar.gz
Don't define HAVE_UMTS_KASUMI to anything unless we actually have it.
Use #ifdef HAVE_UMTS_KASUMI instead of #if HAVE_UMTS_KASUMI Put $Id$ tag in kasumi.h svn path=/trunk/; revision=44398
Diffstat (limited to 'epan/dissectors/packet-rlc.c')
-rw-r--r--epan/dissectors/packet-rlc.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/epan/dissectors/packet-rlc.c b/epan/dissectors/packet-rlc.c
index 3b9a1421f7..72f344b92c 100644
--- a/epan/dissectors/packet-rlc.c
+++ b/epan/dissectors/packet-rlc.c
@@ -76,8 +76,8 @@ static gboolean global_rlc_ciphered = FALSE;
/* Preference to try deciphering */
static gboolean global_rlc_try_decipher = FALSE;
-#if HAVE_UMTS_KASUMI
-static const char* global_rlc_kasumi_key = NULL;
+#ifdef HAVE_UMTS_KASUMI
+static const char *global_rlc_kasumi_key = NULL;
#endif
/* Stop trying to do reassembly if this is true. */
@@ -1949,7 +1949,7 @@ rlc_am_reassemble(tvbuff_t *tvb, guint8 offs, packet_info *pinfo,
col_append_fstr(pinfo->cinfo, COL_INFO, "[RLC AM Data] SN=%u %s",
seq, poll_set ? "(P)" : "");
}
-#if HAVE_UMTS_KASUMI
+#ifdef HAVE_UMTS_KASUMI
static guint8 *
translate_hex_key(gchar * char_key){
int i,j;
@@ -1970,6 +1970,7 @@ translate_hex_key(gchar * char_key){
}
#endif
+
/** @brief Deciphers a given tvb
*
* Note that the actual KASUMI implementation needs to be placed into
@@ -1985,14 +1986,14 @@ translate_hex_key(gchar * char_key){
* @param dir Direction of the link
* @return tvb Returns a deciphered tvb
*/
-
-#if !HAVE_UMTS_KASUMI
-static tvbuff_t * rlc_decipher_tvb(tvbuff_t * tvb _U_, packet_info * pinfo , guint32 counter _U_ , guint8 rbid _U_,gboolean dir _U_ ){
+static tvbuff_t *
+#ifndef HAVE_UMTS_KASUMI
+rlc_decipher_tvb(tvbuff_t *tvb _U_, packet_info *pinfo, guint32 counter _U_, guint8 rbid _U_, gboolean dir _U_) {
/*Check if we have a KASUMI implementatation*/
expert_add_info_format(pinfo, NULL, PI_UNDECODED, PI_WARN, "Unable to decipher packet since KASUMI implementation is missing.");
return NULL;
#else
-static tvbuff_t * rlc_decipher_tvb(tvbuff_t * tvb, packet_info * pinfo , guint32 counter , guint8 rbid ,gboolean dir ){
+rlc_decipher_tvb(tvbuff_t *tvb, packet_info *pinfo, guint32 counter, guint8 rbid, gboolean dir) {
guint64 i;
guint8* out=NULL,*key_in = NULL;
tvbuff_t *t;
@@ -2891,8 +2892,8 @@ proto_register_rlc(void)
#ifdef HAVE_UMTS_KASUMI
prefs_register_string_preference(rlc_module, "kasumi_key",
"KASUMI key", "Key for kasumi 32 characters long hex-string", &global_rlc_kasumi_key);
-
#endif /* HAVE_UMTS_KASUMI */
+
register_init_routine(fragment_table_init);
}