diff options
author | darrenr <darrenr@FreeBSD.org> | 2000-05-24 02:14:22 +0000 |
---|---|---|
committer | darrenr <darrenr@FreeBSD.org> | 2000-05-24 02:14:22 +0000 |
commit | dda6755c7b3b3b5d3e9111b7d0c39a7d8b5f3e12 (patch) | |
tree | 8658a81b1c1fcbbbec3b1df568cc198dd98d44ee /contrib/ipfilter/samples | |
parent | 1fa4f6782a7e92a232e56892d8bce7920d49292e (diff) | |
download | FreeBSD-src-dda6755c7b3b3b5d3e9111b7d0c39a7d8b5f3e12.zip FreeBSD-src-dda6755c7b3b3b5d3e9111b7d0c39a7d8b5f3e12.tar.gz |
Import IP Filter 3.4.4 into FreeBSD-current
Diffstat (limited to 'contrib/ipfilter/samples')
-rw-r--r-- | contrib/ipfilter/samples/proxy.c | 3 | ||||
-rw-r--r-- | contrib/ipfilter/samples/userauth.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/contrib/ipfilter/samples/proxy.c b/contrib/ipfilter/samples/proxy.c index b72ccce..7ac6ec9 100644 --- a/contrib/ipfilter/samples/proxy.c +++ b/contrib/ipfilter/samples/proxy.c @@ -51,6 +51,7 @@ char *argv[]; { struct sockaddr_in sin, sloc, sout; natlookup_t natlook; + natlookup_t *natlookp = &natlook; char buffer[512]; int namelen, fd, n; @@ -88,7 +89,7 @@ char *argv[]; * Open the NAT device and lookup the mapping pair. */ fd = open(IPL_NAT, O_RDONLY); - if (ioctl(fd, SIOCGNATL, &natlook) == -1) { + if (ioctl(fd, SIOCGNATL, &natlookp) == -1) { perror("ioctl"); exit(-1); } diff --git a/contrib/ipfilter/samples/userauth.c b/contrib/ipfilter/samples/userauth.c index 9cecffd..65dcc74 100644 --- a/contrib/ipfilter/samples/userauth.c +++ b/contrib/ipfilter/samples/userauth.c @@ -15,13 +15,14 @@ extern int errno; main() { struct frauth fra; + struct frauth *frap = &fra; fr_info_t *fin = &fra.fra_info; fr_ip_t *fi = &fin->fin_fi; char yn[16]; int fd; fd = open(IPL_NAME, O_RDWR); - while (ioctl(fd, SIOCAUTHW, &fra) == 0) { + while (ioctl(fd, SIOCAUTHW, &frap) == 0) { if (fra.fra_info.fin_out) fra.fra_pass = FR_OUTQUE; else @@ -49,7 +50,7 @@ main() fra.fra_pass |= FR_NOMATCH; printf("answer = %c (%x), id %d idx %d\n", yn[0], fra.fra_pass, fra.fra_info.fin_id, fra.fra_index); - if (ioctl(fd, SIOCAUTHR, &fra) != 0) + if (ioctl(fd, SIOCAUTHR, &frap) != 0) perror("SIOCAUTHR"); } fprintf(stderr, "errno=%d \n", errno); |