]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libsa: Consolidate tftp sendrecv into net.c sendrecv
authorkevans <kevans@FreeBSD.org>
Thu, 15 Feb 2018 19:49:15 +0000 (19:49 +0000)
committerkevans <kevans@FreeBSD.org>
Thu, 15 Feb 2018 19:49:15 +0000 (19:49 +0000)
commitb4539f9711d5cd0ed38e629e9493a52efe396b7d
treec7dbd1b1ba3828b8120c4776b9487c259754b4f8
parenta2cbd359658e2677e0d9b4dcba29282efa619b2a
libsa: Consolidate tftp sendrecv into net.c sendrecv

bootp/arp/rarp/rpc all use the sendrecv implementation in net.c. tftp has
its own implementation because it passes an extra parameter into the recv
callback for the received payload type to be held.

These sendrecv implementations are otherwise equivalent, so consolidate
them. The other users of sendrecv won't be using the extra argument to recv,
but this gives us only one place to worry about respecting timeouts and one
consistent timeout behavior.

Tested by: sbruno
Reviewed by: sbruno, tsoome
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D14373
stand/libsa/arp.c
stand/libsa/bootp.c
stand/libsa/net.c
stand/libsa/net.h
stand/libsa/rarp.c
stand/libsa/rpc.c
stand/libsa/tftp.c