chiark / gitweb /
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>
Thu, 9 Oct 2014 18:30:00 +0000 (19:30 +0100)
commit88d42c97398619bce6cd9a42e15f7c4de1c6c5a0
tree24e4d2cfba4a844e908bc4dd7e1120ce197418c0
parentec48f215405a991c32b0b577b809a51c4a6c342c
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