2016-03-02 13:20:30 +01:00
|
|
|
/*
|
|
|
|
This file is part of actube.
|
|
|
|
|
|
|
|
actube is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
libcapwap is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2016-02-22 09:20:57 +01:00
|
|
|
#ifndef __MOD_H
|
|
|
|
#define __MOD_H
|
|
|
|
|
|
|
|
#include <stddef.h>
|
2016-02-23 08:58:05 +01:00
|
|
|
#include <stdint.h>
|
2016-02-22 09:20:57 +01:00
|
|
|
|
2016-03-03 20:46:20 +01:00
|
|
|
#include "sock.h"
|
|
|
|
#include "conn.h"
|
2016-02-27 05:35:25 +01:00
|
|
|
#include "action.h"
|
|
|
|
|
|
|
|
struct cw_actiondef;
|
2016-02-22 18:33:47 +01:00
|
|
|
|
2016-02-22 09:20:57 +01:00
|
|
|
struct mod_ac
|
|
|
|
{
|
2016-02-22 18:33:47 +01:00
|
|
|
/** Name of the mod */
|
2016-02-22 09:20:57 +01:00
|
|
|
const char *name;
|
2016-02-22 18:33:47 +01:00
|
|
|
/** Initializion method */
|
2016-02-22 09:20:57 +01:00
|
|
|
int (*init)();
|
2016-02-22 18:33:47 +01:00
|
|
|
/** Detect capwap
|
|
|
|
This function ifter receiving and disassembling a complete
|
|
|
|
CAPWAP message. Either on Discovery Request or Join Request
|
|
|
|
**/
|
2016-02-27 10:47:37 +01:00
|
|
|
int (*detect)(struct conn *conn,const uint8_t *rawmsg, int rawlen,int elems_len, struct sockaddr *from);
|
2016-02-23 19:38:10 +01:00
|
|
|
|
|
|
|
/** used for private data */
|
|
|
|
void *data;
|
2016-02-27 05:35:25 +01:00
|
|
|
|
2016-03-02 13:20:30 +01:00
|
|
|
/** Register actions */
|
2016-02-27 05:35:25 +01:00
|
|
|
int (*register_actions)(struct cw_actiondef *def);
|
2016-02-22 09:20:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2016-03-02 13:20:30 +01:00
|
|
|
/**
|
|
|
|
* We define here struct mod_wtp in case we need
|
|
|
|
* different methods for WTP and AC later
|
|
|
|
*/
|
|
|
|
#define mod_wtp mod_ac
|
2016-02-22 09:20:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|