On Tue, Nov 27, 2018 at 03:09:41PM +0100, Arnout Vandecappelle wrote: > I started working on the rewrite of the four multi-ap patches and I have a > couple of questions. Please note that like I mentioned earlier, Venkateswara was working on the two patches and a new version of them is now on the mailing list. > 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? src/common/ieee802_11_common.c could be a convenient place for building an information element. > * 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? One option could be to take in a pointer to the buffer and maximum size of the buffer and return number of octets written. The other function types could then be simpler wrapper on top of that if it is more convenient to do something else. -- Jouni Malinen PGP id EFC895FA _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap