Date: Wed, 3 Apr 2002 12:10:03 -0800 (PST) From: Dan Nelson <dnelson@allantgroup.com> To: freebsd-bugs@FreeBSD.org Subject: Re: misc/26373: Rpc.statd implements the SM_NOTIFY call but does not accept it Message-ID: <200204032010.g33KA3P76968@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/26373; it has been noted by GNATS.
From: Dan Nelson <dnelson@allantgroup.com>
To: freebsd-gnats-submit@FreeBSD.org, bg@sics.se
Cc:
Subject: Re: misc/26373: Rpc.statd implements the SM_NOTIFY call but does not accept it
Date: Wed, 3 Apr 2002 14:01:50 -0600
Here is another patch that more closely follows what was already
committed to 5.*:
Index: include/rpcsvc/sm_inter.x
===================================================================
RCS file: /home/ncvs/src/include/rpcsvc/sm_inter.x,v
retrieving revision 1.8
diff -u -r1.8 sm_inter.x
--- include/rpcsvc/sm_inter.x 27 Aug 1999 23:45:11 -0000 1.8
+++ include/rpcsvc/sm_inter.x 3 Apr 2002 19:06:02 -0000
@@ -62,6 +62,7 @@
struct sm_stat SM_UNMON_ALL(struct my_id) = 4;
void SM_SIMU_CRASH(void) = 5;
+ void SM_NOTIFY(struct stat_chge) = 6;
} = 1;
} = 100024;
@@ -90,6 +91,10 @@
opaque priv[16]; /* private information to store at monitor for requesting process */
};
+struct stat_chge {
+ string mon_name<SM_MAXSTRLEN>; /* name of the site that had the state change */
+ int state;
+};
/*
* state # of status monitor monitonically increases each time
@@ -101,13 +106,13 @@
int state; /* state # of status monitor */
};
-enum res {
+enum sm_res {
stat_succ = 0, /* status monitor agrees to monitor */
stat_fail = 1 /* status monitor cannot monitor */
};
struct sm_stat_res {
- res res_stat;
+ sm_res res_stat;
int state;
};
@@ -115,7 +120,7 @@
* structure of the status message sent back by the status monitor
* when monitor site status changes
*/
-struct status {
+struct sm_status {
string mon_name<SM_MAXSTRLEN>;
int state;
opaque priv[16]; /* stored private information */
Index: usr.sbin/rpc.statd/procs.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/rpc.statd/procs.c,v
retrieving revision 1.4
diff -u -r1.4 procs.c
--- usr.sbin/rpc.statd/procs.c 28 Aug 1999 01:19:37 -0000 1.4
+++ usr.sbin/rpc.statd/procs.c 3 Apr 2002 19:07:51 -0000
@@ -301,7 +301,7 @@
struct timeval timeout = { 20, 0 }; /* 20 secs timeout */
CLIENT *cli;
static char dummy;
- status tx_arg; /* arg sent to callback procedure */
+ sm_status tx_arg; /* arg sent to callback procedure */
MonList *lp;
HostInfo *hp;
pid_t pid;
@@ -340,7 +340,7 @@
}
else
{
- if (clnt_call(cli, lp->notifyProc, xdr_status, &tx_arg, xdr_void, &dummy,
+ if (clnt_call(cli, lp->notifyProc, xdr_sm_status, &tx_arg, xdr_void, &dummy,
timeout) != RPC_SUCCESS)
{
syslog(LOG_ERR, "Failed to call rpc.statd client at host %s",
Index: usr.sbin/rpc.statd/statd.h
===================================================================
RCS file: /home/ncvs/src/usr.sbin/rpc.statd/statd.h,v
retrieving revision 1.2
diff -u -r1.2 statd.h
--- usr.sbin/rpc.statd/statd.h 1 Apr 1996 05:36:06 -0000 1.2
+++ usr.sbin/rpc.statd/statd.h 3 Apr 2002 19:56:35 -0000
@@ -35,20 +35,6 @@
#include "sm_inter.h"
-/* These pieces are missing from the distributed sm_inter.x, which */
-/* omits the SM_NOTIFY procedure used between cooperating rpc.statd's */
-
-#define SM_NOTIFY ((u_long)6)
-extern void *sm_notify_1();
-
-struct stat_chge
-{
- char *mon_name;
- int state;
-};
-typedef struct stat_chge stat_chge;
-bool_t xdr_stat_chge();
-
/* ------------------------------------------------------------------------- */
/*
Data structures for recording monitored hosts
--
Dan Nelson
dnelson@allantgroup.com
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204032010.g33KA3P76968>
