Print this page
inet_pton

@@ -20,10 +20,13 @@
  */
 /*
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
+/*
+ * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
+ */
 
 /*
  * NL7C (Network Layer 7 Cache) as part of SOCKFS provides an in-kernel
  * gateway cache for the request/response message based L7 protocol HTTP
  * (Hypertext Transfer Protocol, see HTTP/1.1 RFC2616) in a semantically

@@ -58,10 +61,11 @@
 #include <fs/sockfs/socktpi.h>
 
 #include <inet/nca/ncadoorhdr.h>
 #include <inet/nca/ncalogd.h>
 #include <inet/nca/ncandd.h>
+#include <inet/ip.h>
 
 #include <sys/promif.h>
 
 /*
  * NL7C, NCA, NL7C logger enabled:

@@ -74,13 +78,10 @@
 boolean_t       nl7c_logd_cycle = B_TRUE;
 
 /*
  * Some externs:
  */
-
-extern int      inet_pton(int, char *, void *);
-
 extern void     nl7c_uri_init(void);
 extern boolean_t nl7c_logd_init(int, caddr_t *);
 extern void     nl7c_nca_init(void);
 
 /*

@@ -330,12 +331,12 @@
                         return (1);
                 }
                 p->family = AF_INET6;
         } else {
                 p->family = AF_INET;
-                p->addr.v4 = ntohl(p->addr.v4);
         }
+
         return (0);
 }
 
 /*
  * Open and read each line from "/etc/nca/ncaport.conf", the syntax of a