rx: Introduce 'rx_host' internal global

Remember what local address we're bound to (as passed to rx_InitHost(),
which is given when -rxbind is passed to various programs), like we do
for our local port with rx_port. Store this in a new internal global
variable, rx_host.

This commit just introduces the new variable, but does not use it.
Future commits will add code that make use of this information.

Change-Id: I5ac1a60b10f6c28df1e6620e30515bcdfd749311
Reviewed-on: https://gerrit.openafs.org/15905
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
This commit is contained in:
Andrew Deason 2024-11-11 15:34:50 -06:00
parent d76df7cb24
commit 1cb8deb64f
2 changed files with 6 additions and 0 deletions

View File

@ -222,6 +222,9 @@ struct opr_queue rx_idleServerQueue;
/* List of free rx_serverQueueEntry structs */
struct opr_queue rx_freeServerQueue;
/* Host address we're bound to, in NBO. */
afs_uint32 rx_host;
#if !defined(offsetof)
#include <stddef.h> /* for definition of offsetof() */
#endif
@ -592,6 +595,7 @@ rx_InitHost(u_int host, u_int port)
#else
osi_GetTime(&tv);
#endif
rx_host = host;
if (port) {
rx_port = port;
} else {

View File

@ -17,6 +17,8 @@
extern rx_atomic_t rx_nWaiting;
extern rx_atomic_t rx_nWaited;
extern afs_uint32 rx_host;
/* How many times to retry sendmsg()-equivalent calls for AFS_RXERRQ_ENV. */
#define RXI_SENDMSG_RETRY 8