chiark / gitweb /
udp, polypath: Log `experiencing success receiving', etc. proposed.polypath.v3
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, 2 Oct 2014 15:41:57 +0000 (16:41 +0100)
commit42f89040397ec65a68dfb7ee72bb140e0b6ab042
treea3819ee7d9eb48a676a40f9274ed67912fe40315
parent7e4d366f6395c2c84476287273ca7f1164309e8e
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