Age | Commit message (Collapse) | Author | Files | Lines |
|
We need both, the p2p-addr and the iface address so we can correctly match
them against previous events.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
If we run as local GO, we need the p2p-addr *and* the iface-addr of the
remote peer. Both are advertised in the GO-NEG-SUCCESS event so parse
them.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Instead of waiting 10s for an answer, lets use 1s as default.
wpa-supplicant sometimes performs blocking actions that *might* take a
while. However, waiting 10s just screws the whole applications and is the
wrong approach to fix that. wpa_supplicant needs to learn asynchronous
transactions and deal with incoming requests in a timely manner.
Therefore, set the default to 1s and be happy \o/
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
There's really no need to wait for DETACH to complete. We do not only for
compatibility and to make sure the message is actually transmitted.
However, if wpa-supplicant is currently terminating, the message might be
in the queue, but not processed. We thus don't get any ECONNREFUSED and
wait for 10s for an answer.. That's just awful.
Set it to 10ms for now as that seems to work just fine.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
If we call into user-callbacks, we need to make sure that they do not free
the wpa-object. We want to explicitly allow that so take a ref before
calling any callback and drop it afterwards.
We already check for !open so we bail out early if sth fails.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Parse the TERMINATING event that is sent by wpa-supplicant on shutdown.
This way we can cleanly react to shutdowns instead of waiting for a
PING-timeout/refused.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
This is a dummy event sent by wpa_supplicant once a beacon scan is
started. It's highly annoying in logs. Add a parser so we can ignore it in
binaries.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
We use _CNT all the time, so be consistent and rename the max-values.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Require reply-bufs to be at least of size 2 and use the last byte as
terminating zero at all times. This makes dealing with ugly WPA requests
much simpler and safer.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
We really *have* to call DETACH in a synchronous fashion, otherwise
wpa_supplicant is too stupid to notice it immediately. Yey! It doesn't
hurt to let the FD linger, but that just causes weird wpa_supplicant
warnings that we want to avoid.
Hence, do a synchronous DETACH.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Add parser for P2P-DEVICE-LOST events so we can react on it.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
This variable is not used, remove it.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
This is a copy-paste error, so lets fix it before we do the first release.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
As wpa_supplicant is the de-facto standard for wifi on linux, add a common
API to deal with it. It's mostly copied from old openwfd so should be
working fine.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
|
Initial import of most generic WFD stuff from OpenWFD. The libwfd library
will be independent of any Miracast implementation so it can be shared
across projects. It will not provide any fancy integration or policy, but
only the most basic protocol parsers and handling.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|