udp, polypath: Log `experiencing success receiving', etc.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 1 Oct 2014 23:55:28 +0000 (00:55 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 21 Oct 2014 00:07:12 +0000 (01:07 +0100)
commitc72d679d2344a22f55889da6932754986fc0a7b9
tree24e4d2cfba4a844e908bc4dd7e1120ce197418c0
parent7cafb08048979850a82b43059b48b947bc2fa9bc
udp, polypath: Log `experiencing success receiving', etc.

We want to use the `experienced' mechanism to report success while
receiving.

But, previously, the udp_socks_afterpoll function which does the
reciving didn't have a suitable description (`socksdesc') available:
in particular, for polypath, it should print the interface name.

Solve this as follows:
 * Add a `desc' field to struct udpsocks, set by udp_socks_register
   (for polypath this duplicates interf->name, but we don't really
   care much about that as it's only one pointer).
 * Add a new argument to udp_socks_register to ensure we catch
   all the creation sites.
 * Have have udp_sock_experienced take a struct udpsocks*.

After all that, the new call to udp_sock_experienced is trivial.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
comm-common.h
polypath.c
udp.c