File: testing6.c

package info (click to toggle)
drac 1.12-7.2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 160 kB
  • sloc: ansic: 878; makefile: 119; sh: 83
file content (27 lines) | stat: -rw-r--r-- 464 bytes parent folder | download | duplicates (6)
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
/*
 * Test client for dracauth
 */

#include <stdio.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>

main(argc, argv)
	int argc;
	char *argv[];
{
        int rc;
	char *host;
	unsigned char ip6[16];
	char *err;

	if (argc < 3) {
		printf("usage:  %s server_host client_addr\n", argv[0]);
		exit(1);
	}
	host = argv[1];
	inet_pton(AF_INET6, argv[2], ip6);
	rc = dracauth6(host, ip6, &err);
	if (rc != 0) printf("%s: %s\n", argv[0], err);
}