Print this page
inet_pton

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/nfs/nfs4_srv_deleg.c
          +++ new/usr/src/uts/common/fs/nfs/nfs4_srv_deleg.c
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
       25 +/*
       26 + * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
       27 + */
  25   28  
  26   29  #include <sys/systm.h>
  27   30  #include <rpc/auth.h>
  28   31  #include <rpc/clnt.h>
  29   32  #include <nfs/nfs4_kprot.h>
  30   33  #include <nfs/nfs4.h>
  31   34  #include <nfs/lm.h>
  32   35  #include <sys/cmn_err.h>
  33   36  #include <sys/disp.h>
  34   37  #include <sys/sdt.h>
↓ open down ↓ 75 lines elided ↑ open up ↑
 110  113                                              ua[j] <= '9') {
 111  114                                                  c *= 10;
 112  115                                                  c += ua[j] - '0';
 113  116                                          } else {
 114  117                                                  ua[k] = '.';
 115  118                                                  return (EINVAL);
 116  119                                          }
 117  120                                  }
 118  121                                  port += c;
 119  122  
 120      -
 121      -                                /* reset to network order */
 122      -                                if (af == AF_INET) {
 123      -                                        *(uint32_t *)ap =
 124      -                                            htonl(*(uint32_t *)ap);
 125      -                                        *pp = htons(port);
 126      -                                } else {
 127      -                                        int ix;
 128      -                                        uint16_t *sap;
 129      -
 130      -                                        for (sap = ap, ix = 0; ix <
 131      -                                            sizeof (struct in6_addr) /
 132      -                                            sizeof (uint16_t); ix++)
 133      -                                                sap[ix] = htons(sap[ix]);
 134      -
 135      -                                        *pp = htons(port);
 136      -                                }
      123 +                                *pp = htons(port);
 137  124  
 138  125                                  ua[k] = '.';
 139  126                                  return (0);
 140  127                          } else {
 141  128                                  ua[k] = '.';
 142  129                                  return (EINVAL);
 143  130                          }
 144  131                  }
 145  132          }
 146  133  
↓ open down ↓ 1768 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX