Main Page | Data Structures | Directories | File List | Data Fields | Globals

hostap_crypt_wep.c File Reference

#include <linux/config.h>
#include <linux/version.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/random.h>
#include <linux/tqueue.h>
#include <asm/string.h>
#include "hostap_crypt.h"
#include "hostap_compat.h"

Include dependency graph for hostap_crypt_wep.c:

Go to the source code of this file.

Defines

#define WEP_KEYS   4
#define WEP_KEY_LEN   13
#define S_SWAP(a, b)   do { u8 t = S[a]; S[a] = S[b]; S[b] = t; } while(0)

Functions

 MODULE_AUTHOR ("Jouni Malinen")
 MODULE_DESCRIPTION ("Host AP crypt: WEP")
 MODULE_LICENSE ("GPL")
static void * prism2_wep_init (void)
static void prism2_wep_deinit (void *priv)
static int prism2_wep_encrypt (u8 *buf, int len, void *priv)
static int prism2_wep_decrypt (u8 *buf, int len, void *priv)
static int prism2_wep_set_key (int idx, void *key, int len, void *priv)
static int prism2_wep_get_key (int idx, void *key, int len, void *priv)
static int prism2_wep_set_key_idx (int idx, void *priv)
static int prism2_wep_get_key_idx (void *priv)
static int __init hostap_crypto_wep_init (void)
static void __exit hostap_crypto_wep_exit (void)
 module_init (hostap_crypto_wep_init)
 module_exit (hostap_crypto_wep_exit)

Variables

static const __u32 crc32_table [256]
static struct hostap_crypto_ops hostap_crypt_wep


Define Documentation

#define S_SWAP a,
 )    do { u8 t = S[a]; S[a] = S[b]; S[b] = t; } while(0)
 

Referenced by prism2_wep_decrypt(), and prism2_wep_encrypt().

#define WEP_KEY_LEN   13
 

Definition at line 36 of file hostap_crypt_wep.c.

Referenced by ap_crypt_init(), hostap_set_encryption(), prism2_wep_decrypt(), prism2_wep_encrypt(), and prism2_wep_set_key().

#define WEP_KEYS   4
 

Definition at line 35 of file hostap_crypt_wep.c.

Referenced by hostap_set_encryption(), prism2_wep_get_key(), prism2_wep_set_key(), and prism2_wep_set_key_idx().


Function Documentation

static void __exit hostap_crypto_wep_exit void  ) [static]
 

Definition at line 364 of file hostap_crypt_wep.c.

References hostap_crypt_wep, and hostap_unregister_crypto_ops().

Here is the call graph for this function:

static int __init hostap_crypto_wep_init void  ) [static]
 

Definition at line 355 of file hostap_crypt_wep.c.

References hostap_crypt_wep, and hostap_register_crypto_ops().

Here is the call graph for this function:

MODULE_AUTHOR "Jouni Malinen"  ) 
 

MODULE_DESCRIPTION "Host AP crypt: WEP"  ) 
 

module_exit hostap_crypto_wep_exit  ) 
 

module_init hostap_crypto_wep_init  ) 
 

MODULE_LICENSE "GPL"  ) 
 

static int prism2_wep_decrypt u8 * buf,
int len,
void * priv
[static]
 

Definition at line 226 of file hostap_crypt_wep.c.

References crc32_table, prism2_wep_data::key_lens, prism2_wep_data::keys, S_SWAP, and WEP_KEY_LEN.

static void prism2_wep_deinit void * priv  ) [static]
 

Definition at line 127 of file hostap_crypt_wep.c.

static int prism2_wep_encrypt u8 * buf,
int len,
void * priv
[static]
 

Definition at line 145 of file hostap_crypt_wep.c.

References crc32_table, prism2_wep_data::iv, prism2_wep_data::key_lens, prism2_wep_data::keys, S_SWAP, prism2_wep_data::tx_key, and WEP_KEY_LEN.

static int prism2_wep_get_key int idx,
void * key,
int len,
void * priv
[static]
 

Definition at line 307 of file hostap_crypt_wep.c.

References prism2_wep_data::key_lens, prism2_wep_data::keys, and WEP_KEYS.

static int prism2_wep_get_key_idx void * priv  ) [static]
 

Definition at line 333 of file hostap_crypt_wep.c.

References prism2_wep_data::tx_key.

static void* prism2_wep_init void  ) [static]
 

Definition at line 98 of file hostap_crypt_wep.c.

References prism2_wep_data::iv.

static int prism2_wep_set_key int idx,
void * key,
int len,
void * priv
[static]
 

Definition at line 293 of file hostap_crypt_wep.c.

References prism2_wep_data::key_lens, prism2_wep_data::keys, WEP_KEY_LEN, and WEP_KEYS.

static int prism2_wep_set_key_idx int idx,
void * priv
[static]
 

Definition at line 320 of file hostap_crypt_wep.c.

References prism2_wep_data::key_lens, prism2_wep_data::tx_key, and WEP_KEYS.


Variable Documentation

const __u32 crc32_table[256] [static]
 

Definition at line 42 of file hostap_crypt_wep.c.

Referenced by prism2_wep_decrypt(), and prism2_wep_encrypt().

struct hostap_crypto_ops hostap_crypt_wep [static]
 

Initial value:

 {
        .name                   = "WEP",
        .init                   = prism2_wep_init,
        .deinit                 = prism2_wep_deinit,
        .encrypt                = prism2_wep_encrypt,
        .decrypt                = prism2_wep_decrypt,
        .set_key                = prism2_wep_set_key,
        .get_key                = prism2_wep_get_key,
        .set_key_idx            = prism2_wep_set_key_idx,
        .get_key_idx            = prism2_wep_get_key_idx,
        .extra_prefix_len       = 4 ,
        .extra_postfix_len      = 4 
}

Definition at line 340 of file hostap_crypt_wep.c.

Referenced by hostap_crypto_wep_exit(), and hostap_crypto_wep_init().


Generated on Mon Nov 21 16:00:03 2005 for openwifi by  doxygen 1.4.1