[BACK]Return to netcat.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / nc

Diff for /src/usr.bin/nc/netcat.c between version 1.110 and 1.111

version 1.110, 2013/03/12 02:57:37 version 1.111, 2013/03/20 09:27:56
Line 69 
Line 69 
 unsigned int iflag;                             /* Interval Flag */  unsigned int iflag;                             /* Interval Flag */
 int     kflag;                                  /* More than one connect */  int     kflag;                                  /* More than one connect */
 int     lflag;                                  /* Bind to local port */  int     lflag;                                  /* Bind to local port */
   int     Nflag;                                  /* shutdown() network socket */
 int     nflag;                                  /* Don't do name look up */  int     nflag;                                  /* Don't do name look up */
 char   *Pflag;                                  /* Proxy username */  char   *Pflag;                                  /* Proxy username */
 char   *pflag;                                  /* Localport flag */  char   *pflag;                                  /* Localport flag */
Line 131 
Line 132 
         sv = NULL;          sv = NULL;
   
         while ((ch = getopt(argc, argv,          while ((ch = getopt(argc, argv,
             "46DdhI:i:klnO:P:p:rSs:tT:UuV:vw:X:x:z")) != -1) {              "46DdhI:i:klNnO:P:p:rSs:tT:UuV:vw:X:x:z")) != -1) {
                 switch (ch) {                  switch (ch) {
                 case '4':                  case '4':
                         family = AF_INET;                          family = AF_INET;
Line 169 
Line 170 
                 case 'l':                  case 'l':
                         lflag = 1;                          lflag = 1;
                         break;                          break;
                   case 'N':
                           Nflag = 1;
                           break;
                 case 'n':                  case 'n':
                         nflag = 1;                          nflag = 1;
                         break;                          break;
Line 771 
Line 775 
                         if ((n = read(wfd, buf, plen)) < 0)                          if ((n = read(wfd, buf, plen)) < 0)
                                 return;                                  return;
                         else if (n == 0) {                          else if (n == 0) {
                                 shutdown(nfd, SHUT_WR);                                  if (Nflag)
                                           shutdown(nfd, SHUT_WR);
                                 pfd[1].fd = -1;                                  pfd[1].fd = -1;
                                 pfd[1].events = 0;                                  pfd[1].events = 0;
                         } else {                          } else {
Line 1014 
Line 1019 
         \t-i secs\t     Delay interval for lines sent, ports scanned\n\          \t-i secs\t     Delay interval for lines sent, ports scanned\n\
         \t-k            Keep inbound sockets open for multiple connects\n\          \t-k            Keep inbound sockets open for multiple connects\n\
         \t-l            Listen mode, for inbound connects\n\          \t-l            Listen mode, for inbound connects\n\
           \t-N            Shutdown the network socket after EOF on stdin\n\
         \t-n            Suppress name/port resolutions\n\          \t-n            Suppress name/port resolutions\n\
         \t-O length     TCP send buffer length\n\          \t-O length     TCP send buffer length\n\
         \t-P proxyuser\tUsername for proxy authentication\n\          \t-P proxyuser\tUsername for proxy authentication\n\
Line 1039 
Line 1045 
 usage(int ret)  usage(int ret)
 {  {
         fprintf(stderr,          fprintf(stderr,
             "usage: nc [-46DdhklnrStUuvz] [-I length] [-i interval] [-O length]\n"              "usage: nc [-46DdhklNnrStUuvz] [-I length] [-i interval] [-O length]\n"
             "\t  [-P proxy_username] [-p source_port] [-s source] [-T ToS]\n"              "\t  [-P proxy_username] [-p source_port] [-s source] [-T ToS]\n"
             "\t  [-V rtable] [-w timeout] [-X proxy_protocol]\n"              "\t  [-V rtable] [-w timeout] [-X proxy_protocol]\n"
             "\t  [-x proxy_address[:port]] [destination] [port]\n");              "\t  [-x proxy_address[:port]] [destination] [port]\n");

Legend:
Removed from v.1.110  
changed lines
  Added in v.1.111