3 @@ -119,6 +119,9 @@ endif
4 ifdef CONFIG_NO_CTRL_IFACE
5 CFLAGS += -DCONFIG_NO_CTRL_IFACE
7 +ifdef CONFIG_CTRL_IFACE_MIB
8 +CFLAGS += -DCONFIG_CTRL_IFACE_MIB
11 OBJS += ../src/ap/ctrl_iface_ap.o
13 --- a/hostapd/ctrl_iface.c
14 +++ b/hostapd/ctrl_iface.c
15 @@ -855,6 +855,7 @@ static void hostapd_ctrl_iface_receive(i
16 } else if (os_strncmp(buf, "RELOG", 5) == 0) {
17 if (wpa_debug_reopen_file() < 0)
19 +#ifdef CONFIG_CTRL_IFACE_MIB
20 } else if (os_strcmp(buf, "MIB") == 0) {
21 reply_len = ieee802_11_get_mib(hapd, reply, reply_size);
23 @@ -884,10 +885,12 @@ static void hostapd_ctrl_iface_receive(i
26 #endif /* CONFIG_NO_RADIUS */
28 } else if (os_strcmp(buf, "DOWN") == 0) {
29 hostapd_ctrl_iface_set_down(hapd);
30 } else if (os_strncmp(buf, "RELOAD ", 7) == 0) {
31 hostapd_ctrl_iface_reload(hapd, buf + 7);
32 +#ifdef CONFIG_CTRL_IFACE_MIB
33 } else if (os_strcmp(buf, "STA-FIRST") == 0) {
34 reply_len = hostapd_ctrl_iface_sta_first(hapd, reply,
36 @@ -897,6 +900,7 @@ static void hostapd_ctrl_iface_receive(i
37 } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
38 reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply,
41 } else if (os_strcmp(buf, "ATTACH") == 0) {
42 if (hostapd_ctrl_iface_attach(hapd, &from, fromlen))
44 --- a/wpa_supplicant/Makefile
45 +++ b/wpa_supplicant/Makefile
46 @@ -675,6 +675,9 @@ ifdef CONFIG_IEEE80211N
47 OBJS += ../src/ap/ieee802_11_ht.o
49 ifdef CONFIG_CTRL_IFACE
50 +ifdef CONFIG_CTRL_IFACE_MIB
51 +CFLAGS += -DCONFIG_CTRL_IFACE_MIB
53 OBJS += ../src/ap/ctrl_iface_ap.o
56 --- a/wpa_supplicant/ctrl_iface.c
57 +++ b/wpa_supplicant/ctrl_iface.c
58 @@ -2929,6 +2929,7 @@ char * wpa_supplicant_ctrl_iface_process
60 } else if (os_strncmp(buf, "NOTE ", 5) == 0) {
61 wpa_printf(MSG_INFO, "NOTE: %s", buf + 5);
62 +#ifdef CONFIG_CTRL_IFACE_MIB
63 } else if (os_strcmp(buf, "MIB") == 0) {
64 reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size);
66 @@ -2940,6 +2941,7 @@ char * wpa_supplicant_ctrl_iface_process
71 } else if (os_strncmp(buf, "STATUS", 6) == 0) {
72 reply_len = wpa_supplicant_ctrl_iface_status(
73 wpa_s, buf + 6, reply, reply_size);
74 @@ -3245,6 +3247,7 @@ char * wpa_supplicant_ctrl_iface_process
75 reply_len = wpa_supplicant_ctrl_iface_bss(
76 wpa_s, buf + 4, reply, reply_size);
78 +#ifdef CONFIG_CTRL_IFACE_MIB
79 } else if (os_strcmp(buf, "STA-FIRST") == 0) {
80 reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size);
81 } else if (os_strncmp(buf, "STA ", 4) == 0) {
82 @@ -3253,6 +3256,7 @@ char * wpa_supplicant_ctrl_iface_process
83 } else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
84 reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply,
87 #endif /* CONFIG_AP */
88 } else if (os_strcmp(buf, "SUSPEND") == 0) {
89 wpas_notify_suspend(wpa_s->global);
90 --- a/src/ap/ctrl_iface_ap.c
91 +++ b/src/ap/ctrl_iface_ap.c
93 #include "p2p_hostapd.h"
94 #include "ctrl_iface_ap.h"
96 +#ifdef CONFIG_CTRL_IFACE_MIB
98 static int hostapd_ctrl_iface_sta_mib(struct hostapd_data *hapd,
100 @@ -106,3 +107,5 @@ int hostapd_ctrl_iface_sta_next(struct h
102 return hostapd_ctrl_iface_sta_mib(hapd, sta->next, buf, buflen);
106 --- a/src/ap/ieee802_1x.c
107 +++ b/src/ap/ieee802_1x.c
108 @@ -1896,6 +1896,7 @@ static const char * bool_txt(Boolean boo
109 return bool ? "TRUE" : "FALSE";
112 +#ifdef CONFIG_CTRL_IFACE_MIB
114 int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen)
116 @@ -2047,6 +2048,7 @@ int ieee802_1x_get_mib_sta(struct hostap
122 static void ieee802_1x_finished(struct hostapd_data *hapd,
123 struct sta_info *sta, int success)
124 --- a/src/ap/wpa_auth.c
125 +++ b/src/ap/wpa_auth.c
126 @@ -2491,6 +2491,7 @@ static int wpa_cipher_bits(int cipher)
130 +#ifdef CONFIG_CTRL_IFACE_MIB
132 #define RSN_SUITE "%02x-%02x-%02x-%d"
133 #define RSN_SUITE_ARG(s) \
134 @@ -2654,7 +2655,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
141 void wpa_auth_countermeasures_start(struct wpa_authenticator *wpa_auth)
143 --- a/src/rsn_supp/wpa.c
144 +++ b/src/rsn_supp/wpa.c
145 @@ -1913,6 +1913,8 @@ static u32 wpa_cipher_suite(struct wpa_s
149 +#ifdef CONFIG_CTRL_IFACE_MIB
151 #define RSN_SUITE "%02x-%02x-%02x-%d"
152 #define RSN_SUITE_ARG(s) \
153 ((s) >> 24) & 0xff, ((s) >> 16) & 0xff, ((s) >> 8) & 0xff, (s) & 0xff
154 @@ -1992,6 +1994,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch
159 #endif /* CONFIG_CTRL_IFACE */