@@ -41,6 +41,7 @@ typedef void ws_pae_timer(uint16_t ticks);
41
41
typedef struct {
42
42
ns_list_link_t link ; /**< Link */
43
43
uint8_t target_eui_64 [8 ]; /**< EAPOL target */
44
+ uint8_t br_eui_64 [8 ]; /**< Border router EUI-64 */
44
45
sec_prot_gtk_keys_t gtks ; /**< GTKs */
45
46
sec_prot_certs_t certs ; /**< Certificates */
46
47
protocol_interface_info_entry_t * interface_ptr ; /**< List link entry */
@@ -176,6 +177,7 @@ int8_t ws_pae_controller_init(protocol_interface_info_entry_t *interface_ptr)
176
177
}
177
178
178
179
memset (controller -> target_eui_64 , 0 , 8 );
180
+ memset (controller -> br_eui_64 , 0 , 8 );
179
181
controller -> interface_ptr = interface_ptr ;
180
182
controller -> auth_completed = NULL ;
181
183
controller -> key_insert = NULL ;
@@ -253,6 +255,39 @@ int8_t ws_pae_controller_certificate_chain_set(const arm_certificate_chain_entry
253
255
return 0 ;
254
256
}
255
257
258
+ int8_t ws_pae_controller_border_router_addr_write (protocol_interface_info_entry_t * interface_ptr , uint8_t * eui_64 )
259
+ {
260
+ if (!interface_ptr || !eui_64 ) {
261
+ return -1 ;
262
+ }
263
+
264
+ pae_controller_t * controller = ws_pae_controller_get (interface_ptr );
265
+ if (!controller ) {
266
+ return -1 ;
267
+ }
268
+
269
+ memcpy (controller -> br_eui_64 , eui_64 , 8 );
270
+
271
+ return 0 ;
272
+
273
+ }
274
+
275
+ int8_t ws_pae_controller_border_router_addr_read (protocol_interface_info_entry_t * interface_ptr , uint8_t * eui_64 )
276
+ {
277
+ if (!interface_ptr || !eui_64 ) {
278
+ return -1 ;
279
+ }
280
+
281
+ pae_controller_t * controller = ws_pae_controller_get (interface_ptr );
282
+ if (!controller ) {
283
+ return -1 ;
284
+ }
285
+
286
+ memcpy (eui_64 , controller -> br_eui_64 , 8 );
287
+
288
+ return 0 ;
289
+ }
290
+
256
291
void ws_pae_controller_timer (uint16_t ticks )
257
292
{
258
293
ns_list_foreach (pae_controller_t , entry , & pae_controller_list ) {
0 commit comments