aboutsummaryrefslogtreecommitdiff
path: root/stand/libsa/net.c
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2018-02-26 18:14:37 +0000
committerKyle Evans <kevans@FreeBSD.org>2018-02-26 18:14:37 +0000
commitfae9c380ce04d3419af5587c43bd14a058c6bab0 (patch)
treed451087b22088bec1d26d6152481a32dd6ed935e /stand/libsa/net.c
parent8763ae3526dd24442637988497c625a0d88975fc (diff)
downloadsrc-fae9c380ce04d3419af5587c43bd14a058c6bab0.tar.gz
src-fae9c380ce04d3419af5587c43bd14a058c6bab0.zip
libsa: Move MAXWAIT from net.h to net.c
It's not a setting that has any effect or use outside of the net.c context.
Notes
Notes: svn path=/head/; revision=330026
Diffstat (limited to 'stand/libsa/net.c')
-rw-r--r--stand/libsa/net.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/stand/libsa/net.c b/stand/libsa/net.c
index 9f2eabb1da9c..e0f8e8a208e8 100644
--- a/stand/libsa/net.c
+++ b/stand/libsa/net.c
@@ -58,6 +58,20 @@ __FBSDID("$FreeBSD$");
#include "net.h"
/*
+ * Maximum wait time for sending and receiving before we give up and timeout.
+ * If set to 0, operations will eventually timeout completely, but send/recv
+ * timeouts must progress exponentially from MINTMO to MAXTMO before final
+ * timeout is hit.
+ */
+#ifndef MAXWAIT
+#define MAXWAIT 0 /* seconds */
+#endif
+
+#if MAXWAIT < 0
+#error MAXWAIT must not be a negative number
+#endif
+
+/*
* Send a packet and wait for a reply, with exponential backoff.
*
* The send routine must return the actual number of bytes written,