Diff for /embedaddon/miniupnpd/netfilter/testiptcrdr.c between versions 1.1.1.1 and 1.1.1.2

version 1.1.1.1, 2012/02/21 23:16:02 version 1.1.1.2, 2012/05/29 12:55:57
Line 1 Line 1
 /* $Id$ */  /* $Id$ */
 /* MiniUPnP project  /* MiniUPnP project
  * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/   * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
 * (c) 2006 Thomas Bernard  * (c) 2006-2011 Thomas Bernard 
  * This software is subject to the conditions detailed   * This software is subject to the conditions detailed
  * in the LICENCE file provided within the distribution */   * in the LICENCE file provided within the distribution */
   
Line 12 Line 12
   
 #include "iptcrdr.h"  #include "iptcrdr.h"
   
   #ifndef PRIu64
   #define PRIu64 "llu"
   #endif
   
 int  int
 main(int argc, char ** argv)  main(int argc, char ** argv)
 {  {
Line 21  main(int argc, char ** argv) Line 25  main(int argc, char ** argv)
                   
         if(argc<4)          if(argc<4)
                 return -1;                  return -1;
        openlog("testuptcrdr", LOG_PERROR|LOG_CONS, LOG_LOCAL0);        openlog("testiptcrdr", LOG_PERROR|LOG_CONS, LOG_LOCAL0);
         eport = (unsigned short)atoi(argv[1]);          eport = (unsigned short)atoi(argv[1]);
         iaddr = argv[2];          iaddr = argv[2];
         iport = (unsigned short)atoi(argv[3]);          iport = (unsigned short)atoi(argv[3]);
Line 42  main(int argc, char ** argv) Line 46  main(int argc, char ** argv)
                                       &p2, &proto2, desc, sizeof(desc),                                        &p2, &proto2, desc, sizeof(desc),
                                                                           &packets, &bytes) < 0)                                                                            &packets, &bytes) < 0)
                 {                  {
                        printf("redirected port %hu to %s:%hu proto %d   packets=%llu bytes=%llu\n",                        printf("rule not found\n");
                               p1, addr, p2, proto2, packets, bytes); 
                 }                  }
                 else                  else
                 {                  {
                        printf("rule not found\n");                        printf("redirected port %hu to %s:%hu proto %d   packets=%" PRIu64 " bytes=%" PRIu64 "\n",
                                p1, addr, p2, proto2, packets, bytes);
                 }                  }
         }          }
         printf("trying to list nat rules :\n");          printf("trying to list nat rules :\n");

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>