WhiteBoard Project using C RPC
A Project in Distributed Computing at IIIT-Delhi
deregall.c
Go to the documentation of this file.
1 
2 /*
3  * Deregister RPC program numbers
4  * pmateti@wright.edu Fri Jul 16 1993
5  * usage: deregall <prgnum> <howmany>
6 */
7 
8 #include "wb.h"
9 
10 int main(int argc, char *argv[])
11 {
12  long prognum = 0x40000000, m = 10, i, d, v;
13 
14  if (argc > 1 && argv[1] != NULL) {
15  prognum = atol(argv[1]);
16  }
17  if (argc > 2 && argv[2] != NULL) {
18  m = atol(argv[2]);
19  }
20  printf("%s %ld %ld\n", argv[0], prognum, m);
21  for (d = 0, i = prognum; i < prognum + m; i++) {
22  for (v = 1; v < 4; v++) {
23  int x = pmap_unset(i, v);
24  printf("pmap_unset(%ld, %ld) == %d\n", i, v, x);
25  d += x;
26  }
27  }
28  printf("%s: deregistered %ld port+version pairs.\n", argv[0], d);
29  return 0;
30 }
31 
int pmap_unset(unsigned long, unsigned long)
int main(int argc, char *argv[])
Definition: deregall.c:10