Hi all, Jouni, I started working on the rewrite of the four multi-ap patches and I have a couple of questions. On 19/11/2018 20:18, Jouni Malinen wrote: >>> diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c >>> +static struct wpabuf *multi_ap_build_assoc_req_ie(void) >> Now we have three implemntations of the construction of this vendor-specific >> element. Isn't there a way to factor them into a single function? > I sure hope so. There may use for having a separate wrapper for > allocating a wpabug with the IE, but surely this function could just > call wpa_add_multi_ap_info_ie() to generate that actual contents. So in the current patches there are 3 functions that construct this IE. - multi_ap_build_assoc_req_ie - wpa_add_multi_ap_info_ie - hostapd_eid_multi_ap - wps_build_vendor_ext_m1_wfa I'm struggling with two things to unify these: * In which file should I put it? * Which parameters should it take? A wpabuf (like wps_build_vendor_ext_m1_wfa and multi_ap_build_assoc_req_ie), a pos and size (like wpa_add_multi_ap_info_ie), or just a pos (like hostapd_eid_multi_ap)? For the latter cases, how can you be sure that the target buffer is large enough? Regards, Arnout _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap