WPS: Add support for external Registrars using UPnP transport
This adds mostly feature complete external Registrar support with the main missing part being proper support for multiple external Registrars working at the same time and processing of concurrent registrations when using an external Registrar. This code is based on Sony/Saice implementation (https://www.saice-wpsnfc.bz/) and the changes made by Ted Merrill (Atheros) to make it more suitable for hostapd design and embedded systems. Some of the UPnP code is based on Intel's libupnp. Copyrights and licensing are explained in src/wps/wps_upnp.c in more detail.
This commit is contained in:
parent
39034ce80f
commit
f620268f13
23 changed files with 6273 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Dynamic data buffer
|
||||
* Copyright (c) 2007-2008, Jouni Malinen <j@w1.fi>
|
||||
* Copyright (c) 2007-2009, Jouni Malinen <j@w1.fi>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
|
@ -195,3 +195,18 @@ struct wpabuf * wpabuf_zeropad(struct wpabuf *buf, size_t len)
|
|||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void wpabuf_printf(struct wpabuf *buf, char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
void *tmp = wpabuf_mhead_u8(buf) + wpabuf_len(buf);
|
||||
int res;
|
||||
|
||||
va_start(ap, fmt);
|
||||
res = vsnprintf(tmp, buf->size - buf->used, fmt, ap);
|
||||
va_end(ap);
|
||||
if (res < 0 || (size_t) res >= buf->size - buf->used)
|
||||
wpabuf_overflow(buf, res);
|
||||
buf->used += res;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue