|
1 /* |
|
2 * Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: EAP and WLAN authentication protocols. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // This is enumeration of EAPOL source code. |
|
20 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
|
21 #undef EAP_FILE_NUMBER_ENUM |
|
22 #define EAP_FILE_NUMBER_ENUM 35 |
|
23 #undef EAP_FILE_NUMBER_DATE |
|
24 #define EAP_FILE_NUMBER_DATE 1127594498 |
|
25 #endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
|
26 |
|
27 |
|
28 // INCLUDE FILES |
|
29 |
|
30 #include "eap_am_memory.h" |
|
31 #include "eap_rogue_ap_entry.h" |
|
32 |
|
33 EAP_FUNC_EXPORT eap_rogue_ap_entry_c::~eap_rogue_ap_entry_c() |
|
34 { |
|
35 } |
|
36 |
|
37 //-------------------------------------------------- |
|
38 |
|
39 EAP_FUNC_EXPORT eap_rogue_ap_entry_c::eap_rogue_ap_entry_c( |
|
40 abs_eap_am_tools_c * const tools) |
|
41 : m_am_tools(tools) |
|
42 , m_rogue_ap_reason(rogue_ap_none) |
|
43 { |
|
44 } |
|
45 |
|
46 //-------------------------------------------------- |
|
47 |
|
48 EAP_FUNC_EXPORT eap_rogue_ap_entry_c * eap_rogue_ap_entry_c::copy() const |
|
49 { |
|
50 eap_rogue_ap_entry_c * const new_object = new eap_rogue_ap_entry_c(m_am_tools); |
|
51 |
|
52 if (new_object != 0) |
|
53 { |
|
54 new_object->set_mac_address(get_mac_address()); |
|
55 new_object->set_rogue_reason(get_rogue_reason()); |
|
56 } |
|
57 |
|
58 return new_object; |
|
59 } |
|
60 |
|
61 //-------------------------------------------------- |
|
62 |
|
63 EAP_FUNC_EXPORT u8_t * eap_rogue_ap_entry_c::get_mac_address() const |
|
64 { |
|
65 return const_cast<u8_t *>(m_rogue_ap_mac_address); |
|
66 } |
|
67 |
|
68 //-------------------------------------------------- |
|
69 |
|
70 EAP_FUNC_EXPORT u8_t * eap_rogue_ap_entry_c::get_mac_address(u8_t * const mac_address) const |
|
71 { |
|
72 if (mac_address) |
|
73 { |
|
74 m_am_tools->memmove(mac_address, m_rogue_ap_mac_address, EAPOL_ETHERNET_ADDRESS_LENGTH); |
|
75 } |
|
76 return const_cast<u8_t *>(m_rogue_ap_mac_address); |
|
77 } |
|
78 |
|
79 //-------------------------------------------------- |
|
80 |
|
81 EAP_FUNC_EXPORT void eap_rogue_ap_entry_c::set_mac_address(const u8_t * const mac_address) |
|
82 { |
|
83 if (mac_address) |
|
84 { |
|
85 m_am_tools->memmove(m_rogue_ap_mac_address, mac_address, EAPOL_ETHERNET_ADDRESS_LENGTH); |
|
86 } |
|
87 } |
|
88 |
|
89 //-------------------------------------------------- |
|
90 |
|
91 EAP_FUNC_EXPORT void eap_rogue_ap_entry_c::set_rogue_reason(const eap_rogue_ap_reason_e reason) |
|
92 { |
|
93 m_rogue_ap_reason = reason; |
|
94 } |
|
95 |
|
96 //-------------------------------------------------- |
|
97 |
|
98 EAP_FUNC_EXPORT eap_rogue_ap_reason_e eap_rogue_ap_entry_c::get_rogue_reason() const |
|
99 { |
|
100 return m_rogue_ap_reason; |
|
101 } |
|
102 |
|
103 |
|
104 // End of File |