From 1cb8deb64fb54562ce25aef17e4c7be7a7b65444 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Mon, 11 Nov 2024 15:34:50 -0600 Subject: [PATCH] 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 Reviewed-by: Mark Vitale Reviewed-by: Marcio Brito Barbosa Reviewed-by: Michael Meffie Reviewed-by: Cheyenne Wills --- src/rx/rx.c | 4 ++++ src/rx/rx_internal.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/rx/rx.c b/src/rx/rx.c index dd5f434f08..3021fc3631 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -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 /* 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 { diff --git a/src/rx/rx_internal.h b/src/rx/rx_internal.h index 992682f950..63977b64b0 100644 --- a/src/rx/rx_internal.h +++ b/src/rx/rx_internal.h @@ -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