diff --git a/ac.project b/ac.project index 89e35b07..5a16c217 100644 --- a/ac.project +++ b/ac.project @@ -21,6 +21,7 @@ + diff --git a/src/ac/Makefile b/src/ac/Makefile index 51d031f0..93844e4f 100644 --- a/src/ac/Makefile +++ b/src/ac/Makefile @@ -14,12 +14,6 @@ LDFLAGS+=-L$(LIBARCHDIR) CFLAGS+=-DSYS_ARCH=\"$(ARCH)\" -#LIBS+=-lcapwap -#LIBS+=-lcapwap80211 -#LIBS+=-lcipwap -#LIBS+=-lcisco -#LIBS+=-lfortinet -#LIBS+=-lzyxel LIBS+=-lcw LIBS+=-lrt LIBS+=-lpthread @@ -63,6 +57,7 @@ AC_OBJS = \ socklist.o \ db.o \ ac_global.o \ + discovery_cache.o\ ${AC_MODULES} diff --git a/src/ac/ac_main.c b/src/ac/ac_main.c index 736fe615..3c983ed3 100644 --- a/src/ac/ac_main.c +++ b/src/ac/ac_main.c @@ -533,8 +533,6 @@ void process_cw_ctrl_packet (int index, struct sockaddr *addr, uint8_t * buffer, wtplist_lock(); struct wtpman *wtpman = wtplist_get (addr); -printf("Seaching for packet %s\n",sock_addr2str(addr,sock_buf)); - if (!wtpman) { diff --git a/src/ac/discovery_cache.c b/src/ac/discovery_cache.c new file mode 100644 index 00000000..e04773f5 --- /dev/null +++ b/src/ac/discovery_cache.c @@ -0,0 +1,25 @@ + +#include "cw/mlist.h" +#include "cw/mavl.h" + +struct cw_DiscoveryCache{ + int len; + +}; + +struct CacheElem{ + struct sockaddr_storage addr; + const char *mod_capwap; + const char *mod_bindings; + +}; + +void discovery_cache_destroy(struct cw_DiscoveryCache * c) +{ + +} + +struct cw_DiscoveryCache * discovery_cache_init(int len){ + + return NULL; +} \ No newline at end of file diff --git a/src/ac/wtplist.c b/src/ac/wtplist.c index 265fcbcd..a4c46142 100644 --- a/src/ac/wtplist.c +++ b/src/ac/wtplist.c @@ -24,7 +24,7 @@ #include #include -#define MAX_WTPS 200 +/*#define MAX_WTPS 200*/ #include @@ -81,9 +81,11 @@ struct wtpman * wtplist_get(const struct sockaddr * addr) struct wtpman * wtplist_get_by_session_id(uint8_t *session_id) { struct conn search; + struct conn * conn; + memcpy (search.session_id, session_id,16); - struct conn * conn = connlist_get_by_session_id(connlist,&search); + conn = connlist_get_by_session_id(connlist,&search); return conn->data; } diff --git a/src/cw/conn_q_wait_packet.c b/src/cw/conn_q_wait_packet.c index f313cff4..f81e20e5 100644 --- a/src/cw/conn_q_wait_packet.c +++ b/src/cw/conn_q_wait_packet.c @@ -15,6 +15,6 @@ int conn_q_wait_packet(struct conn * conn, int seconds) if (sem_timedwait(&conn->q_sem,×pec)==-1){ return EAGAIN; }; - + sem_post(&conn->q_sem); return 0; } diff --git a/src/wtp/join.c b/src/wtp/join.c index 083a2cc9..3fac22fb 100644 --- a/src/wtp/join.c +++ b/src/wtp/join.c @@ -241,11 +241,12 @@ int run_join(struct conn *conn) int join(struct conn * conn, struct cw_DiscoveryResult * dis) { +/* struct sockaddr_storage s; sock_strtoaddr("192.168.0.14:5246",(struct sockaddr*)&s); run_join_d(conn,(struct sockaddr*)&s); exit(0); - +*/ mavliter_t ii; mavliter_init(&ii,dis->prio_ip); diff --git a/src/wtp/wtp_main.c b/src/wtp/wtp_main.c index bc46b0ff..33a53b07 100644 --- a/src/wtp/wtp_main.c +++ b/src/wtp/wtp_main.c @@ -165,9 +165,9 @@ int main (int argc, char **argv) cw_discovery_init_results(&dis); -/* cw_run_discovery(conn, "255.255.255.255",NULL, &dis); + cw_run_discovery(conn, "255.255.255.255",NULL, &dis); cw_dbg_ktv_dump(dis.prio_ip, DBG_INFO, "=== IP list ===", "IP", "=== END IP List ==="); -*/ + /* { mavliter_t i;