From 43896b179bdb61de94c05a48527b97281667ea1d Mon Sep 17 00:00:00 2001 From: PolynomialDivision Date: Fri, 25 Aug 2017 18:43:18 +0200 Subject: [PATCH] Different handle functions --- src/utils/ubus.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/utils/ubus.c b/src/utils/ubus.c index 965bada..497c512 100644 --- a/src/utils/ubus.c +++ b/src/utils/ubus.c @@ -174,6 +174,14 @@ int parse_to_probe_req(struct blob_attr *msg, probe_entry *prob_req) { return 0; } +static int handle_auth_req(struct blob_attr *msg) { + return 0; +} + +static int handle_assoc_req(struct blob_attr *msg) { + return 0; +} + static int handle_probe_req(struct blob_attr *msg) { printf("[WC] Parse Probe Request\n"); probe_entry prob_req; @@ -195,7 +203,7 @@ static int handle_probe_req(struct blob_attr *msg) { printf("MAC WILL BE DECLINED!!!\n"); return UBUS_STATUS_CONNECTION_FAILED; } - printf("MAC WILL BE ACCEPDTED!!!\\n"); + printf("MAC WILL BE ACCEPDTED!!!\n"); return 0; } @@ -211,6 +219,12 @@ static int hostapd_notify(struct ubus_context *ctx, struct ubus_object *obj, if (strncmp(method, "probe", 5) == 0) { return handle_probe_req(msg); } + else if (strncmp(method, "auth", 5) == 0) { + return handle_auth_req(msg); + } + else if (strncmp(method, "assoc", 5) == 0) { + return handle_assoc_req(msg); + } return 0; }