summaryrefslogtreecommitdiffstats
path: root/src/main.c
blob: 0f4023c3a78e5b273c51f6ad11467967c5c0173e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
 * Program entry point
 *
 * Copyright (C) 2019  Libiquity LLC
 *
 * This file is part of wolfssl-util.
 *
 * wolfssl-util is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * wolfssl-util is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with wolfssl-util.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "commands.h"

static void
usage(FILE *stream, const char *program_name)
{
	fprintf(stream, "Usage: %s s_client [options]\n", program_name);
}

int
main(int argc, char **argv)
{
	if (argc < 2 || strcmp(argv[1], "s_client") != 0) {
		usage(stderr, argv[0]);
		return EXIT_FAILURE;
	}

	return s_client(argc - 2, argv + 2);
}