annotate dbmulti.c @ 31:3c2066e196a9

removed some test targets
author Matt Johnston <matt@ucc.asn.au>
date Tue, 27 Jul 2004 14:54:25 +0000
parents 223b0f5f8dce
children f789045062e6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
1 #include "includes.h"
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
2
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
3 /* definitions are cleanest if we just put them here */
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
4 int dropbear_main(int argc, char ** argv);
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
5 int dropbearkey_main(int argc, char ** argv);
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
6 int dropbearconvert_main(int argc, char ** argv);
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
7 int scp_main(int argc, char ** argv);
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
8
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
9 int main(int argc, char ** argv) {
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
10
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
11 char * progname;
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
12
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
13 if (argc > 0) {
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
14 /* figure which form we're being called as */
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
15 progname = basename(argv[0]);
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
16
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
17 #ifdef DBMULTI_dropbear
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
18 if (strcmp(progname, "dropbear") == 0) {
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
19 return dropbear_main(argc, argv);
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
20 }
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
21 #endif
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
22 #ifdef DBMULTI_dropbearkey
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
23 if (strcmp(progname, "dropbearkey") == 0) {
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
24 return dropbearkey_main(argc, argv);
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
25 }
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
26 #endif
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
27 #ifdef DBMULTI_dropbearconvert
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
28 if (strcmp(progname, "dropbearconvert") == 0) {
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
29 return dropbearconvert_main(argc, argv);
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
30 }
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
31 #endif
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
32 #ifdef DBMULTI_scp
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
33 if (strcmp(progname, "scp") == 0) {
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
34 return scp_main(argc, argv);
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
35 }
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
36 #endif
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
37 }
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
38
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
39 fprintf(stderr, "Dropbear multi-purpose version %s\n"
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
40 "Make a symlink pointing at this binary with one of the following names:\n"
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
41 #ifdef DBMULTI_dropbear
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
42 "'dropbear' - the Dropbear server\n"
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
43 #endif
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
44 #ifdef DBMULTI_dropbearkey
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
45 "'dropbearkey' - the key generator\n"
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
46 #endif
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
47 #ifdef DBMULTI_dropbearconvert
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
48 "'dropbearconvert' - the key converter\n"
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
49 #endif
30
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
50 #ifdef DBMULTI_scp
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
51 "'scp' - secure copy\n"
223b0f5f8dce Switching to the magical new Makefile, and new dbmulti style
Matt Johnston <matt@ucc.asn.au>
parents: 4
diff changeset
52 #endif
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
53 ,
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
54 DROPBEAR_VERSION);
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
55 exit(1);
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
56
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
57 }