-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathVoodooWirelessCipher.cpp
97 lines (79 loc) · 2.48 KB
/
VoodooWirelessCipher.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
* VoodooWirelessCipher.cpp
* VoodooWireless
*
* Created by Prashant Vaibhav on 07/07/09.
* Copyright 2009 Prashant Vaibhav. All rights reserved.
*
*/
#include <IOKit/IOLib.h>
#include "VoodooWirelessCipher.h"
#define MyClass VoodooWirelessCipher
#define super IOService
OSDefineMetaClassAndStructors(VoodooWirelessCipher, IOService);
OSMetaClassDefineReservedUnused(VoodooWirelessCipher, 0);
OSMetaClassDefineReservedUnused(VoodooWirelessCipher, 1);
OSMetaClassDefineReservedUnused(VoodooWirelessCipher, 2);
OSMetaClassDefineReservedUnused(VoodooWirelessCipher, 3);
OSMetaClassDefineReservedUnused(VoodooWirelessCipher, 4);
OSMetaClassDefineReservedUnused(VoodooWirelessCipher, 5);
OSMetaClassDefineReservedUnused(VoodooWirelessCipher, 6);
OSMetaClassDefineReservedUnused(VoodooWirelessCipher, 7);
OSMetaClassDefineReservedUnused(VoodooWirelessCipher, 8);
bool MyClass::start(IOService* provider) {
if (super::start(provider) == false)
return false;
_cipherInfo.cipherType = IEEE80211_CIPHER_NULL;
_cipherInfo.cipherName = "NULL";
_cipherInfo.headerSize = 0;
_cipherInfo.trailerSize = 0;
_cipherInfo.micSize = 0;
return true;
}
void MyClass::stop(IOService* provider) {
super::stop(provider);
IOLog("Unregistered VoodooWireless crypto module: %s\n", _cipherInfo.cipherName);
}
void MyClass::registerService(IOOptionBits options) {
super::registerService(options);
/* Set cipher properties in the IORegistry, which will be used to find it */
setProperty(CIPHER_PROPERTY_NAME, _cipherInfo.cipherName);
/*
setProperty(CIPHER_PROPERTY_TYPE, _cipherInfo.cipherType);
setProperty(CIPHER_PROPERTY_MICSIZE, _cipherInfo.micSize);
setProperty(CIPHER_PROPERTY_HEADERSIZE, _cipherInfo.headerSize);
setProperty(CIPHER_PROPERTY_TRAILERSIZE,_cipherInfo.trailerSize);
*/
IOLog("Registered VoodooWireless crypto module: %s\n", _cipherInfo.cipherName);
}
MyClass::Info MyClass::getInfo() const {
return _cipherInfo;
}
VoodooWirelessCipherContext* MyClass::initContext()
{
return 0;
}
void MyClass::freeContext(VoodooWirelessCipherContext* ctx)
{
return;
}
bool MyClass::setKey(VoodooWirelessCipherContext* ctx, VoodooWirelessCipherKey* key)
{
return false;
}
bool MyClass::encap(VoodooWirelessCipherContext* ctx, mbuf_t* m)
{
return false;
}
bool MyClass::decap(VoodooWirelessCipherContext* ctx, mbuf_t* m)
{
return false;
}
bool MyClass::enMIC(VoodooWirelessCipherContext* ctx, mbuf_t* m)
{
return false;
}
bool MyClass::deMIC(VoodooWirelessCipherContext* ctx, mbuf_t* m)
{
return false;
}