File: make_socksfc.c

package info (click to toggle)
socks4-server 4.3.beta2-14
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,504 kB
  • ctags: 1,779
  • sloc: ansic: 19,305; makefile: 394; sh: 52
file content (28 lines) | stat: -rw-r--r-- 571 bytes parent folder | download | duplicates (9)
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
/* make_socksfc */

#include <string.h>
#include <stdio.h>
#include "socks.h"

char *infile = SOCKS_CONF, *outfile = SOCKS_FC;

main(argc, argv)
int argc;
char **argv;
{
	struct config *confAddr = NULL;
	int Nconf = 0;
	int useSyslog = 0;

	if ((argc == 2) || (argc == 3))
		infile = *++argv;
	if (argc == 3)
		outfile = *++argv;
	if (socks_rdconf(infile, &confAddr, &Nconf, useSyslog) == -1) {
		fprintf(stderr, "File  %s not found\n", infile);
		exit(1);
	}
	socks_wrfz(outfile, confAddr, Nconf, useSyslog);
	printf("Frozen configuration written to %s\n", outfile);
}