Sync usage with man page.
[netbsd-mini2440.git] / dist / ipf / lib / print_toif.c
blobafa777b5d454c02b2814985da71c9032a505a5c2
1 /* $NetBSD$ */
3 /*
4 * Copyright (C) 2000-2002 by Darren Reed.
6 * See the IPFILTER.LICENCE file for details on licencing.
8 * Id: print_toif.c,v 1.8.4.1 2006/06/16 17:21:09 darrenr Exp
9 */
11 #include "ipf.h"
14 void print_toif(tag, fdp)
15 char *tag;
16 frdest_t *fdp;
18 printf("%s %s%s", tag, fdp->fd_ifname,
19 (fdp->fd_ifp || (long)fdp->fd_ifp == -1) ? "" : "(!)");
20 #ifdef USE_INET6
21 if (use_inet6 && IP6_NOTZERO(&fdp->fd_ip6.in6)) {
22 char ipv6addr[80];
24 inet_ntop(AF_INET6, &fdp->fd_ip6, ipv6addr,
25 sizeof(fdp->fd_ip6));
26 printf(":%s", ipv6addr);
27 } else
28 #endif
29 if (fdp->fd_ip.s_addr)
30 printf(":%s", inet_ntoa(fdp->fd_ip));
31 putchar(' ');