Skip to content
Snippets Groups Projects
Commit 7f0f1a1a authored by Jakob Olsson's avatar Jakob Olsson
Browse files

remove local map_module header

parent d7c72635
No related branches found
No related tags found
No related merge requests found
Pipeline #24558 failed
/*
* map_module.h - multi-ap module(s) registration API header.
*
* Copyright (C) 2020 iopsys Software Solutions AB. All rights reserved.
*
* Author: anjan.chanda@iopsys.eu
*
* See LICENSE file for license related information.
*
*/
#ifndef MAP_MODULE_H
#define MAP_MODULE_H
#include <stdint.h>
#include <stdbool.h>
#include <linux/types.h>
#ifdef __cplusplus
extern "C" {
#endif
/* wifi-agents and wifi-controller will implement the multiap CMDU handler
* function. Based on the cmdu_type, appropriate action will be taken by
* wifi-agents and wifi-controller.
* 'msg' points to the TLVs buffer, as defined in the multiap specification
* and in that order.
* 'msglen' is length of the 'msg'.
*/
typedef int (*cmdu_handler_t)(uint16_t cmdu_type, void *msg, size_t msglen);
typedef uint8_t map_module_id_t[32];
enum map_role {
MAP_ROLE_AGENT = 0x1,
MAP_ROLE_CONTROLLER = 0x2
};
enum map_profile {
MAP_PROFILE_1,
MAP_PROFILE_2,
};
/* wifiagents and wificontroller will call the following functions to register
* and unregister multiap CMDU handler modules with the libmap.so plugin.
*
* The libmap.so plugin will implement the '(un)register_multiap_module'
* functions.
* The plugin will parse the multiap CMDUs for sanity and calls the registered
* module's CMDU handler with the cmdu_type and the 'msg' payload.
*/
struct map_module {
map_module_id_t uid; /**< handle to module object */
uint8_t sign[32];
uint32_t role; /**< bitmap of MAP_ROLE_* */
enum map_profile profile; /**< one of MAP_PROFILE_* */
cmdu_handler_t map_cmdu_rx; /**< multiap CMDU handler function */
/* following optional */
int num_cmdu_types; /**< wildcard is '0', meaning all */
uint16_t cmdutype[64]; /**< present if num_cmdu_types != 0 */
};
int register_multiap_module(struct map_module *module);
int unregister_multiap_module(struct map_module *module);
/* The following functions will be called by wifi-agent/wifi-controller to
* start/stop receiving multiap CMDUs from the ieee1905 libmap.so plugin.
*/
int start_multiap_module(struct map_module *m);
int stop_multiap_module(struct map_module *m);
/* The ieee1905 multiap plugin ('libmap.so') will implement this function.
* Whenever a multiap module has any CMDU (request/response) to transmit,
* it will call this function.
*/
extern int map_cmdu_tx(uint16_t cmdu_type, void *msg, size_t msglen);
#ifdef __cplusplus
}
#endif
#endif /* MAP_MODULE_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment