Пример #1
0
int main() {
	int n;
	char *file = "../addresses.txt";
	struct arptable *p = NULL;
	int i;

	i = 0;
	while (i++ < 5000) {
		p = NULL;

		n = load_addrs(&p, file);
		if (n < 0) {
			fprintf(stderr, "load_addrs() failed\n");
			exit(1);
		}

		free_arptable(p);
		if (n < 0) {
			fprintf(stderr, "free_arptable() failed\n");
			exit(1);
		}
	}

	return 0;
}
Пример #2
0
int main(int argc, char* argv[])
{
	if(argc < 6) {
		fprintf(stderr, "Needs 5 args:\n"
		"<tty> <CallerID> <Name> <dist-ring-nr.> <Called Nr.>\n");
		exit(-2);
	}
	load_addrs(ADDRS);
	parse_cid(argv[1], argv[2], argv[3], atoi(argv[4]), argv[5]);
	return 0;
}