From 5423709dda9f47ef586a8b3fdd5b037b78997522 Mon Sep 17 00:00:00 2001 From: 7u83 <7u83@mail.ru> Date: Tue, 20 Sep 2022 10:35:23 +0200 Subject: [PATCH] Removed libwifi dependencies --- src/ac/Makefile | 3 +-- src/ac/ac_main.c | 2 +- src/ac/dataman.c | 22 +--------------------- src/wtp/Makefile | 2 +- src/wtp/wtp_main.c | 1 - 5 files changed, 4 insertions(+), 26 deletions(-) diff --git a/src/ac/Makefile b/src/ac/Makefile index 1b0a80f9..cd890bc1 100644 --- a/src/ac/Makefile +++ b/src/ac/Makefile @@ -9,7 +9,7 @@ OBJS = \ discovery_cache.o\ rpc.o\ statemachine.o\ - hapd.o + #hapd.o ACTOBJS = \ act.o @@ -27,7 +27,6 @@ LIBS+=-lnettle LIBS+=-lssl LIBS+=-lcrypto LIBS+=-ledit -LIBS+=-lwifi #LIBS+=-l:libhapd.a INCL_DIRS=-I../ -I/usr/local/include -I./ -I../../include -I../../include/hostapd -I../../include/hostapd/utils diff --git a/src/ac/ac_main.c b/src/ac/ac_main.c index f8db7e40..0b256e1c 100644 --- a/src/ac/ac_main.c +++ b/src/ac/ac_main.c @@ -237,7 +237,7 @@ int main (int argc, char *argv[]) goto errX; }; -hapd_run(); // init +//hapd_run(); // init //stop(); //const char *ttt = cw_cfg_get(global_cfg,"cisco/ssl-cipher",NULL); //printf("CFG: %s\n",ttt); diff --git a/src/ac/dataman.c b/src/ac/dataman.c index 7976d87f..f5d497d0 100644 --- a/src/ac/dataman.c +++ b/src/ac/dataman.c @@ -169,7 +169,6 @@ int dataman_process_keep_alive(struct cw_Conn *nc, uint8_t *rawmsg, int len) return -1; } -#include int dataman_process_message0(struct cw_Conn *nc, uint8_t * rawmsg, int len, struct sockaddr *from) @@ -192,13 +191,10 @@ int dataman_process_message0(struct cw_Conn *nc, uint8_t * rawmsg, int len, // ppacket (dot11frame,len-cw_get_hdr_msg_offset(rawmsg)); - struct libwifi_frame frame = {0}; - struct libwifi_frame resp={0}; // cw_dbg(DBG_X,"802.11 - %s",dot11_get_frame_name(dot11frame)); // cw_dbg(DBG_X,"802.11 - T&S: %d %d",dot11_get_type(dot11frame),dot11_get_subtype(dot11frame)); - rc = libwifi_get_wifi_frame(&frame, (unsigned char*)(dot11frame+1), dot11len-1, 0); // cw_dbg(DBG_X,"Frame CTL:%d,%d",frame.frame_control.type, frame.frame_control.subtype); @@ -213,22 +209,6 @@ int dataman_process_message0(struct cw_Conn *nc, uint8_t * rawmsg, int len, // // - if (frame.frame_control.type == TYPE_MANAGEMENT && - frame.frame_control.subtype == SUBTYPE_ASSOC_REQ){ -// cw_dbg(DBG_X,"ASSOC REQ RECEIVED"); -/* libwifi_create_assoc_resp(&resp, - frame.frame_control.transmitter, - frame.frame_control.receiver, - frame.frame_control.transmitter, - 1 - );*/ - - - - -// stop(); - } - @@ -266,7 +246,7 @@ int dataman_process_message(struct cw_Conn *nc, uint8_t * rawmsg, int len, extern void ppacket(uint8_t * p, int len); - ppacket (rawmsg,len); +// ppacket (rawmsg,len); cw_dbg(DBG_X,"There was someting else than dataman"); diff --git a/src/wtp/Makefile b/src/wtp/Makefile index 13189625..854c8a15 100644 --- a/src/wtp/Makefile +++ b/src/wtp/Makefile @@ -7,7 +7,7 @@ LIBARCHDIR := $(LIBDIR)/$(KERNEL)/$(ARCH) CFLAGS+=-I../ -DUSE_OPENSSL -I../../include -I/usr/include/libnl3 LDFLAGS+=-L$(LIBARCHDIR) -L/usr/local/lib -LIBS+=-lcw -lnettle -lssl -lcrypto -ldl -lpthread -lmavl -lwifi -lnl-3 -lnl-genl-3 +LIBS+=-lcw -lnettle -lssl -lcrypto -ldl -lpthread -lmavl -lnl-3 -lnl-genl-3 SOURCES=\ wtp_main.c\ diff --git a/src/wtp/wtp_main.c b/src/wtp/wtp_main.c index ddcda18e..a29e8273 100644 --- a/src/wtp/wtp_main.c +++ b/src/wtp/wtp_main.c @@ -89,7 +89,6 @@ struct bootcfg bootcfg; #include "cw/file.h" -#include #include "cw/dot11.h"