Revision 9fac310d client/client.c

View differences:

client/client.c
6 6
 *	Can be freely distributed and used under the terms of the GNU GPL.
7 7
 */
8 8

  
9
#include <stdio.h>
10
#include <string.h>
11
#include <stdlib.h>
12
#include <unistd.h>
13

  
9 14
#include "nest/bird.h"
15
#include "lib/resource.h"
10 16
#include "client/client.h"
11 17

  
12
struct cmd_info {
13
  char *command;
14
  char *args;
15
  char *help;
16
};
18
static char *opt_list = "";
17 19

  
18
static struct cmd_info command_table[] = {
19
#include "conf/commands.h"
20
};
20
static void
21
usage(void)
22
{
23
  fprintf(stderr, "Usage: birdc\n");
24
  exit(1);
25
}
26

  
27
static void
28
parse_args(int argc, char **argv)
29
{
30
  int c;
31

  
32
  while ((c = getopt(argc, argv, opt_list)) >= 0)
33
    switch (c)
34
      {
35
      default:
36
	usage();
37
      }
38
  if (optind < argc)
39
    usage();
40
}
21 41

  
22 42
int
23 43
main(int argc, char **argv)
24 44
{
25
  return client_main(argc, argv);	/* Call sysdep code */
45
#ifdef HAVE_LIBDMALLOC
46
  if (!getenv("DMALLOC_OPTIONS"))
47
    dmalloc_debug(0x2f03d00);
48
#endif
49

  
50
  parse_args(argc, argv);
51

  
52
  bug("Not implemented yet!");
26 53
}

Also available in: Unified diff