/* $Id: srvru.c,v 1.1 1996/04/03 23:06:57 spreitze Exp $ */
/* Last edited by Mike Spreitzer April 3, 1996 2:59 pm PST */

#include "srvr.h"

#include <stdio.h>
#include <math.h>

int main (int ac, char **av)
{
  char           *pinfo = NULL;
  ilu_string      tinfo_space[10] = {"sunrpcrm", "tcp_0_0", ILU_NIL};
  ilu_string     *tinfo = NULL;
  int             i = 1;
  while (i < ac) {
    if (strcmp(av[i], "-p") == 0) {
      if (i++ < ac)
	pinfo = av[i++];
      else
	goto usage;
    } else if (strcmp(av[i], "-t") == 0) {
      int             j = 0;
      tinfo = tinfo_space;
      ++i;
      while ((i < ac) && (av[i][0] != '-'))
	tinfo[j++] = av[i++];
    } else
      goto usage;
  }
  return doit(pinfo, tinfo);
usage:
  fprintf(stderr, "Usage: %s [-t tinfo [tinfo...]] [-p pinfo]\n", av[0]);
  return 2;
}
