--- old/usr/src/cmd/cmd-inet/usr.sbin/socket-filter-kssl.xml	Wed May  2 13:57:42 2012
+++ new/usr/src/cmd/cmd-inet/usr.sbin/socket-filter-kssl.xml	Wed May  2 13:57:41 2012
@@ -2,6 +2,7 @@
 <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
 <!--
 	Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+	Copyright 2012, Nexenta Systems, Inc. All rights reserved.
 
  CDDL HEADER START
 
@@ -83,6 +84,108 @@
 			</documentation>
 		</template>
 	</instance>
+
+	<instance name='http' enabled='false'>
+		<dependency
+		    name='http-filter-filesystem-root'
+		    grouping='require_all'
+		    restart_on='none'
+		    type='service'>
+			<service_fmri value='svc:/system/filesystem/root' />	
+		</dependency>
+
+		<exec_method
+			type='method'
+			name='start'
+			exec='/lib/svc/method/svc-sockfilter start'
+			timeout_seconds='60' />
+
+		<exec_method
+			type='method'
+			name='stop'
+			exec='/lib/svc/method/svc-sockfilter stop'
+			timeout_seconds='60' />
+
+		<property_group name='startd' type='framework'>
+			<propval name='duration' type='astring'
+				value='transient' />
+		</property_group>
+
+		<property_group name='socket-filter' type='framework'>
+			<propval name='name' type='astring' value='httpfilt' />
+			<propval name='module_name' type='astring'
+				value='httpfilt' />
+			<propval name='attach_semantics' type='astring'
+				value='prog' />
+			<propval name='socket_tuples' type='astring'
+				value='2:2:0,2:2:6,26:2:0,26:2:6' />
+		</property_group>
+		
+		<template>
+			<common_name>
+				<loctext xml:lang='C'>
+				kernel inbound HTTP request socket filter 
+				</loctext>
+			</common_name>
+<!--
+			<documentation>
+				<manpage title='ksslcfg' section='1M'
+				    manpath='/usr/share/man' />
+			</documentation>
+-->
+		</template>
+	</instance>
+
+	<instance name='data' enabled='false'>
+		<dependency
+		    name='data-filter-filesystem-root'
+		    grouping='require_all'
+		    restart_on='none'
+		    type='service'>
+			<service_fmri value='svc:/system/filesystem/root' />	
+		</dependency>
+
+		<exec_method
+			type='method'
+			name='start'
+			exec='/lib/svc/method/svc-sockfilter start'
+			timeout_seconds='60' />
+
+		<exec_method
+			type='method'
+			name='stop'
+			exec='/lib/svc/method/svc-sockfilter stop'
+			timeout_seconds='60' />
+
+		<property_group name='startd' type='framework'>
+			<propval name='duration' type='astring'
+				value='transient' />
+		</property_group>
+
+		<property_group name='socket-filter' type='framework'>
+			<propval name='name' type='astring' value='datafilt' />
+			<propval name='module_name' type='astring'
+				value='datafilt' />
+			<propval name='attach_semantics' type='astring'
+				value='prog' />
+			<propval name='socket_tuples' type='astring'
+				value='2:2:0,2:2:6,26:2:0,26:2:6' />
+		</property_group>
+		
+		<template>
+			<common_name>
+				<loctext xml:lang='C'>
+				TCP inbound data socket filter
+				</loctext>
+			</common_name>
+<!--
+			<documentation>
+				<manpage title='ksslcfg' section='1M'
+				    manpath='/usr/share/man' />
+			</documentation>
+-->
+		</template>
+	</instance>
 
 	<stability value='Unstable' />
 </service>
--- old/usr/src/pkg/manifests/system-kernel.mf	Wed May  2 13:57:43 2012
+++ new/usr/src/pkg/manifests/system-kernel.mf	Wed May  2 13:57:43 2012
@@ -21,6 +21,7 @@
 
 #
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2012, Nexenta Systems, Inc. All rights reserved.
 #
 
 #
@@ -747,9 +748,13 @@
 $(i386_ONLY)file path=kernel/sched/SDC group=sys mode=0755
 $(i386_ONLY)file path=kernel/sched/TS group=sys mode=0755
 $(i386_ONLY)file path=kernel/sched/TS_DPTBL group=sys mode=0755
+file path=kernel/socketmod/$(ARCH64)/datafilt group=sys mode=0755
+file path=kernel/socketmod/$(ARCH64)/httpfilt group=sys mode=0755
 file path=kernel/socketmod/$(ARCH64)/ksslf group=sys mode=0755
 file path=kernel/socketmod/$(ARCH64)/socksctp group=sys mode=0755
 file path=kernel/socketmod/$(ARCH64)/trill group=sys mode=0755
+$(i386_ONLY)file path=kernel/socketmod/datafilt group=sys mode=0755
+$(i386_ONLY)file path=kernel/socketmod/httpfilt group=sys mode=0755
 $(i386_ONLY)file path=kernel/socketmod/ksslf group=sys mode=0755
 $(i386_ONLY)file path=kernel/socketmod/socksctp group=sys mode=0755
 $(i386_ONLY)file path=kernel/socketmod/trill group=sys mode=0755
--- old/usr/src/uts/common/Makefile.files	Wed May  2 13:57:44 2012
+++ new/usr/src/uts/common/Makefile.files	Wed May  2 13:57:43 2012
@@ -24,7 +24,7 @@
 #
 
 #
-# Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
+# Copyright 2012 Nexenta Systems, Inc.  All rights reserved.
 #
 
 #
@@ -576,6 +576,10 @@
 
 IPSECAH_OBJS +=	ipsecahddi.o ipsecah.o sadb.o
 
+DATAFILT_OBJS += datafilt.o
+
+HTTPFILT_OBJS += httpfilt.o
+
 SPPP_OBJS +=	sppp.o sppp_dlpi.o sppp_mod.o s_common.o
 
 SPPPTUN_OBJS +=	sppptun.o sppptun_mod.o
--- /dev/null	Wed May  2 13:57:44 2012
+++ new/usr/src/uts/common/inet/sockmods/datafilt.c	Wed May  2 13:57:44 2012
@@ -0,0 +1,112 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright (c) 2012, OmniTI Computer Consulting, Inc. All rights reserved.
+ */
+
+#include <sys/kmem.h>
+#include <sys/systm.h>
+#include <sys/stropts.h>
+#include <sys/strsun.h>
+#include <sys/socketvar.h>
+#include <sys/sockfilter.h>
+#include <sys/note.h>
+#include <sys/taskq.h>
+
+static struct modlmisc dataf_modlmisc = {
+	&mod_miscops,
+	"Kernel data-ready socket filter"
+};
+
+static struct modlinkage dataf_modlinkage = {
+	MODREV_1,
+	&dataf_modlmisc,
+	NULL
+};
+
+#define	DATAFILT_MODULE "datafilt"
+
+/* ARGSUSED */
+sof_rval_t
+dataf_attach_passive_cb(sof_handle_t handle, sof_handle_t ph,
+    void *parg, struct sockaddr *laddr, socklen_t laddrlen,
+    struct sockaddr *faddr, socklen_t faddrlen, void **cookiep)
+{
+	return (SOF_RVAL_DEFER);
+}
+
+void
+dataf_detach_cb(sof_handle_t handle, void *cookie, cred_t *cr)
+{
+	_NOTE(ARGUNUSED(handle, cookie, cr));
+}
+
+/*
+ * Called for each incoming segment.
+ */
+mblk_t *
+dataf_data_in_cb(sof_handle_t handle, void *cookie, mblk_t *mp, int flags,
+    size_t *lenp)
+{
+	_NOTE(ARGUNUSED(cookie, flags, lenp));
+
+	if (mp != NULL && msgdsize(mp) > 0)
+		sof_newconn_ready(handle);
+
+	return (mp);
+}
+
+sof_ops_t dataf_ops = {
+	.sofop_attach_passive = dataf_attach_passive_cb,
+	.sofop_detach = dataf_detach_cb,
+	.sofop_data_in = dataf_data_in_cb
+};
+
+int
+_init(void)
+{
+	int error;
+
+	if ((error = sof_register(SOF_VERSION, DATAFILT_MODULE, &dataf_ops, 0))
+	    != 0)
+		return (error);
+	if ((error = mod_install(&dataf_modlinkage)) != 0)
+		(void) sof_unregister(DATAFILT_MODULE);
+
+	return (error);
+}
+
+int
+_fini(void)
+{
+	int error;
+
+	if ((error = sof_unregister(DATAFILT_MODULE)) != 0)
+		return (error);
+
+	return (mod_remove(&dataf_modlinkage));
+}
+
+int
+_info(struct modinfo *modinfop)
+{
+	return (mod_info(&dataf_modlinkage, modinfop));
+}
--- /dev/null	Wed May  2 13:57:45 2012
+++ new/usr/src/uts/common/inet/sockmods/httpfilt.c	Wed May  2 13:57:45 2012
@@ -0,0 +1,287 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright (c) 2012, OmniTI Computer Consulting, Inc. All rights reserved.
+ */
+
+#include <sys/kmem.h>
+#include <sys/systm.h>
+#include <sys/stropts.h>
+#include <sys/strsun.h>
+#include <sys/socketvar.h>
+#include <sys/sockfilter.h>
+#include <sys/note.h>
+#include <sys/taskq.h>
+
+static struct modlmisc httpf_modlmisc = {
+	&mod_miscops,
+	"Kernel HTTP socket filter"
+};
+
+static struct modlinkage httpf_modlinkage = {
+	MODREV_1,
+	&httpf_modlmisc,
+	NULL
+};
+/*
+ * Name of the HTTP filter
+ */
+#define	HTTPFILT_MODULE	"httpfilt"
+#define	MAX_HTTP_FILTER_SIZE 8192
+
+/*
+ * httpf filter cookie
+ */
+typedef struct httpf {
+	size_t	httpf_bytes_in;	/* bytes read */
+	int	httpf_method;	/* HTTP method */
+	int	httpf_sm;	/* \r\n\r\n | \n\n state machine */
+	char	httpf_ff[4];	/* the first 4 bytes of the data stream */
+	union {
+		char httpfu_ff[4]; /* the first 4 bytes of the data stream */
+		uint32_t httpfu_w; /* in an easy-to-compare 32-bit word */
+	} httpf_u;
+#define	httpf_ff httpf_u.httpfu_ff
+#define	httpf_ffw httpf_u.httpfu_w
+} httpf_t;
+
+#ifdef _BIG_ENDIAN
+#define	CHAR_TO_32(a, b, c, d) ((d) + ((c) << 8) + ((b) << 16) + ((a) << 24))
+#else
+#define	CHAR_TO_32(a, b, c, d) ((a) + ((b) << 8) + ((c) << 16) + ((d) << 24))
+#endif
+
+#define	WORD_GET	CHAR_TO_32('G', 'E', 'T', ' ')
+#define	WORD_PUT	CHAR_TO_32('P', 'U', 'T', ' ')
+#define	WORD_POST	CHAR_TO_32('P', 'O', 'S', 'T')
+#define	WORD_HEAD	CHAR_TO_32('H', 'E', 'A', 'D')
+
+#define	HTTPF_METHOD_INVALID -1
+#define	HTTPF_METHOD_UNSET 0
+#define	HTTPF_METHOD_GET   1
+#define	HTTPF_METHOD_HEAD  2
+#define	HTTPF_METHOD_PUT   3
+#define	HTTPF_METHOD_POST  4
+
+static int
+httpf_method_from_ff(uint32_t ffw)
+{
+	switch (ffw) {
+	case WORD_GET:
+		return (HTTPF_METHOD_GET);
+	case WORD_PUT:
+		return (HTTPF_METHOD_PUT);
+	case WORD_POST:
+		return (HTTPF_METHOD_POST);
+	case WORD_HEAD:
+		return (HTTPF_METHOD_HEAD);
+	}
+
+	return (HTTPF_METHOD_INVALID);
+}
+
+static int
+httpf_progress_crlfcrlf_state(httpf_t *httpf, unsigned char ch) {
+#define	HTTPF_STATE(a) httpf->httpf_sm = (a)
+#define	IF_HTTPF_TOKEN(a) if ((ch) == (a))
+	switch (httpf->httpf_sm) {
+	case 0:
+		IF_HTTPF_TOKEN('\r') HTTPF_STATE(1);
+		IF_HTTPF_TOKEN('\n') HTTPF_STATE(3);
+		break;
+	case 1:
+		IF_HTTPF_TOKEN('\n') HTTPF_STATE(2);
+		else HTTPF_STATE(0);
+		break;
+	case 2:
+		IF_HTTPF_TOKEN('\n') return (0);
+		IF_HTTPF_TOKEN('\r') HTTPF_STATE(3);
+		else HTTPF_STATE(0);
+		break;
+	case 3:
+		IF_HTTPF_TOKEN('\n') return (0);
+		IF_HTTPF_TOKEN('\r') HTTPF_STATE(1);
+		else HTTPF_STATE(0);
+		break;
+	}
+	return (-1);
+}
+
+static int
+httpf_process_input(httpf_t *httpf, mblk_t *mp) {
+	int i, blen = MBLKL(mp), dlen = msgdsize(mp);
+
+	for (i = 0; i < dlen; i++) {
+		while (blen-- == 0) {
+			DTRACE_PROBE(http__zero__len__mblk);
+			mp = mp->b_cont;
+			/*
+			 * If we are here we must have some of "dlen" bytes
+			 * left, which means we MUST have a non-zero-length
+			 * mblk in the chain.  We will never fall off the
+			 * edge after a zero-length mblk UNLESS there's no
+			 * dlen left, which means we'll never get here!
+			 */
+			ASSERT(mp != NULL);
+			blen = MBLKL(mp);
+		}
+
+		/* Collect the first four bytes for a protocol validation */
+		if (httpf->httpf_method == HTTPF_METHOD_UNSET &&
+		    httpf->httpf_bytes_in < 4)
+			httpf->httpf_ff[httpf->httpf_bytes_in] = mp->b_rptr[i];
+
+		httpf->httpf_bytes_in++;
+
+		/*
+		 * if we haven't yet determined out HTTP method, do it at
+		 * exactly 4 bytes into the stream.
+		 */
+		if (httpf->httpf_method == HTTPF_METHOD_UNSET &&
+		    httpf->httpf_bytes_in == 4) {
+			/*
+			 * if we find no good method, we can't defer this stream
+			 */
+			httpf->httpf_method =
+			    httpf_method_from_ff(httpf->httpf_ffw);
+			if (httpf->httpf_method == HTTPF_METHOD_INVALID)
+				return (-1);
+		}
+
+		/*
+		 * if the method is set, start looking for either
+		 *  \r\n\r\n or \n\n
+		 */
+		if (httpf->httpf_method > HTTPF_METHOD_UNSET)
+			if (httpf_progress_crlfcrlf_state(httpf, mp->b_rptr[i])
+			    == 0) {
+				return (1);
+			}
+	}
+	return (0);
+}
+
+/*
+ * Allocate httpf state
+ */
+sof_rval_t
+httpf_attach_passive_cb(sof_handle_t handle, sof_handle_t ph,
+    void *parg, struct sockaddr *laddr, socklen_t laddrlen,
+    struct sockaddr *faddr, socklen_t faddrlen, void **cookiep)
+{
+	httpf_t *new;
+
+	_NOTE(ARGUNUSED(handle, ph, parg, faddr, faddrlen, laddr, laddrlen));
+
+	/* Allocate the SSL context for the new connection */
+	new = kmem_zalloc(sizeof (httpf_t), KM_NOSLEEP);
+	if (new == NULL)
+		return (SOF_RVAL_ENOMEM);
+
+	new->httpf_bytes_in = 0;
+	new->httpf_method = HTTPF_METHOD_UNSET;
+
+	*cookiep = new;
+	/*
+	 * We are awaiting a request, defer the notification of this
+	 * connection until it is completed.
+	 */
+	return (SOF_RVAL_DEFER);
+}
+
+void
+httpf_detach_cb(sof_handle_t handle, void *cookie, cred_t *cr)
+{
+	httpf_t *httpf = (httpf_t *)cookie;
+
+	_NOTE(ARGUNUSED(handle, cr));
+
+	if (httpf == NULL)
+		return;
+
+	kmem_free(httpf, sizeof (httpf_t));
+}
+
+/*
+ * Called for each incoming segment.
+ */
+mblk_t *
+httpf_data_in_cb(sof_handle_t handle, void *cookie, mblk_t *mp, int flags,
+    size_t *lenp)
+{
+	httpf_t	*httpf = cookie;
+
+	_NOTE(ARGUNUSED(flags, lenp));
+
+	if (httpf == NULL) {
+		sof_bypass(handle);
+		return (mp);
+	}
+
+	if (mp == NULL)
+		return (mp);
+
+	if (httpf_process_input(httpf, mp))
+		sof_newconn_ready(handle);
+
+	if (httpf->httpf_bytes_in > MAX_HTTP_FILTER_SIZE)
+		sof_newconn_ready(handle);
+
+	return (mp);
+}
+
+sof_ops_t httpf_ops = {
+	.sofop_attach_passive = httpf_attach_passive_cb,
+	.sofop_detach = httpf_detach_cb,
+	.sofop_data_in = httpf_data_in_cb,
+};
+
+int
+_init(void)
+{
+	int error;
+
+	if ((error = sof_register(SOF_VERSION, HTTPFILT_MODULE, &httpf_ops, 0))
+	    != 0) {
+		return (error);
+	}
+	if ((error = mod_install(&httpf_modlinkage)) != 0)
+		(void) sof_unregister(HTTPFILT_MODULE);
+
+	return (error);
+}
+
+int
+_fini(void)
+{
+	int error;
+
+	if ((error = sof_unregister(HTTPFILT_MODULE)) != 0)
+		return (error);
+
+	return (mod_remove(&httpf_modlinkage));
+}
+
+int
+_info(struct modinfo *modinfop)
+{
+	return (mod_info(&httpf_modlinkage, modinfop));
+}
--- old/usr/src/uts/intel/Makefile.intel.shared	Wed May  2 13:57:46 2012
+++ new/usr/src/uts/intel/Makefile.intel.shared	Wed May  2 13:57:45 2012
@@ -21,7 +21,7 @@
 
 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
 
-# Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
+# Copyright 2012 Nexenta Systems, Inc.  All rights reserved.
 
 #
 #	This makefile contains the common definitions for all intel
@@ -728,6 +728,8 @@
 SOCKET_KMODS    += socksdp
 SOCKET_KMODS	+= sockrds
 SOCKET_KMODS	+= ksslf
+SOCKET_KMODS	+= httpfilt
+SOCKET_KMODS	+= datafilt
 
 #
 #	kiconv modules (/kernel/kiconv):
--- /dev/null	Wed May  2 13:57:46 2012
+++ new/usr/src/uts/intel/datafilt/Makefile	Wed May  2 13:57:46 2012
@@ -0,0 +1,83 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 2011, OmniTI Computer Consulting, Inc. All rights reserved.
+# Copyright 2012, Nexenta Systems, Inc. All rights reserved.
+#
+#
+
+#
+#	Path to the base of the uts directory tree (usually /usr/src/uts).
+#
+UTSBASE	= ../..
+
+#
+#	Define the module and object file sets.
+#
+MODULE		= datafilt
+OBJECTS		= $(DATAFILT_OBJS:%=$(OBJS_DIR)/%)
+LINTS		= $(DATAFILT_OBJS:%.o=$(LINTS_DIR)/%.ln)
+ROOTMODULE	= $(ROOT_SOCK_DIR)/$(MODULE)
+
+#
+#	Include common rules.
+#
+include $(UTSBASE)/intel/Makefile.intel
+
+#
+#	Define targets
+#
+ALL_TARGET	= $(BINARY)
+LINT_TARGET	= $(MODULE).lint
+INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
+
+#
+# lint pass one enforcement and OS version
+#
+CFLAGS += $(CCVERBOSE)
+
+LDFLAGS += -dy -Nfs/sockfs -Ndrv/ip
+
+#
+#	Default build targets.
+#
+.KEEP_STATE:
+
+def:		$(DEF_DEPS)
+
+all:		$(ALL_DEPS)
+
+clean:		$(CLEAN_DEPS)
+
+clobber:	$(CLOBBER_DEPS)
+
+lint:		$(LINT_DEPS)
+
+modlintlib:	$(MODLINTLIB_DEPS)
+
+clean.lint:	$(CLEAN_LINT_DEPS)
+
+install:	$(INSTALL_DEPS)
+
+#
+#	Include common targets.
+#
+include $(UTSBASE)/intel/Makefile.targ
--- /dev/null	Wed May  2 13:57:47 2012
+++ new/usr/src/uts/intel/httpfilt/Makefile	Wed May  2 13:57:46 2012
@@ -0,0 +1,83 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 2011, OmniTI Computer Consulting, Inc. All rights reserved.
+# Copyright 2012, Nexenta Systems, Inc. All rights reserved.
+#
+#
+
+#
+#	Path to the base of the uts directory tree (usually /usr/src/uts).
+#
+UTSBASE	= ../..
+
+#
+#	Define the module and object file sets.
+#
+MODULE		= httpfilt
+OBJECTS		= $(HTTPFILT_OBJS:%=$(OBJS_DIR)/%)
+LINTS		= $(HTTPFILT_OBJS:%.o=$(LINTS_DIR)/%.ln)
+ROOTMODULE	= $(ROOT_SOCK_DIR)/$(MODULE)
+
+#
+#	Include common rules.
+#
+include $(UTSBASE)/intel/Makefile.intel
+
+#
+#	Define targets
+#
+ALL_TARGET	= $(BINARY)
+LINT_TARGET	= $(MODULE).lint
+INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
+
+#
+# lint pass one enforcement and OS version
+#
+CFLAGS += $(CCVERBOSE)
+
+LDFLAGS += -dy -Nfs/sockfs -Ndrv/ip
+
+#
+#	Default build targets.
+#
+.KEEP_STATE:
+
+def:		$(DEF_DEPS)
+
+all:		$(ALL_DEPS)
+
+clean:		$(CLEAN_DEPS)
+
+clobber:	$(CLOBBER_DEPS)
+
+lint:		$(LINT_DEPS)
+
+modlintlib:	$(MODLINTLIB_DEPS)
+
+clean.lint:	$(CLEAN_LINT_DEPS)
+
+install:	$(INSTALL_DEPS)
+
+#
+#	Include common targets.
+#
+include $(UTSBASE)/intel/Makefile.targ
--- old/usr/src/uts/sparc/Makefile.sparc.shared	Wed May  2 13:57:48 2012
+++ new/usr/src/uts/sparc/Makefile.sparc.shared	Wed May  2 13:57:47 2012
@@ -20,8 +20,8 @@
 #
 
 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2012, Nexenta Systems, Inc. All rights reserved.
 
-
 #
 #	This makefile contains the common definitions for all sparc
 #	implementation architecture independent modules.
@@ -506,6 +506,8 @@
 SOCKET_KMODS	+= socksdp
 SOCKET_KMODS	+= sockrds
 SOCKET_KMODS	+= ksslf
+SOCKET_KMODS	+= httpfilt
+SOCKET_KMODS	+= datafilt
 
 #
 #	kiconv modules (/kernel/kiconv):
--- /dev/null	Wed May  2 13:57:48 2012
+++ new/usr/src/uts/sparc/datafilt/Makefile	Wed May  2 13:57:48 2012
@@ -0,0 +1,83 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 2011, OmniTI Computer Consulting, Inc. All rights reserved.
+# Copyright 2012, Nexenta Systems, Inc. All rights reserved.
+#
+#
+
+#
+#	Path to the base of the uts directory tree (usually /usr/src/uts).
+#
+UTSBASE	= ../..
+
+#
+#	Define the module and object file sets.
+#
+MODULE		= datafilt
+OBJECTS		= $(DATAFILT_OBJS:%=$(OBJS_DIR)/%)
+LINTS		= $(DATAFILT_OBJS:%.o=$(LINTS_DIR)/%.ln)
+ROOTMODULE	= $(ROOT_SOCK_DIR)/$(MODULE)
+
+#
+#	Include common rules.
+#
+include $(UTSBASE)/sparc/Makefile.sparc
+
+#
+#	Define targets
+#
+ALL_TARGET	= $(BINARY)
+LINT_TARGET	= $(MODULE).lint
+INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
+
+#
+# lint pass one enforcement and OS version
+#
+CFLAGS += $(CCVERBOSE)
+
+LDFLAGS += -dy -Nfs/sockfs -Ndrv/ip
+
+#
+#	Default build targets.
+#
+.KEEP_STATE:
+
+def:		$(DEF_DEPS)
+
+all:		$(ALL_DEPS)
+
+clean:		$(CLEAN_DEPS)
+
+clobber:	$(CLOBBER_DEPS)
+
+lint:		$(LINT_DEPS)
+
+modlintlib:	$(MODLINTLIB_DEPS)
+
+clean.lint:	$(CLEAN_LINT_DEPS)
+
+install:	$(INSTALL_DEPS)
+
+#
+#	Include common targets.
+#
+include $(UTSBASE)/sparc/Makefile.targ
--- /dev/null	Wed May  2 13:57:49 2012
+++ new/usr/src/uts/sparc/httpfilt/Makefile	Wed May  2 13:57:48 2012
@@ -0,0 +1,83 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 2011, OmniTI Computer Consulting, Inc. All rights reserved.
+# Copyright 2012, Nexenta Systems, Inc. All rights reserved.
+#
+#
+
+#
+#	Path to the base of the uts directory tree (usually /usr/src/uts).
+#
+UTSBASE	= ../..
+
+#
+#	Define the module and object file sets.
+#
+MODULE		= httpfilt
+OBJECTS		= $(HTTPFILT_OBJS:%=$(OBJS_DIR)/%)
+LINTS		= $(HTTPFILT_OBJS:%.o=$(LINTS_DIR)/%.ln)
+ROOTMODULE	= $(ROOT_SOCK_DIR)/$(MODULE)
+
+#
+#	Include common rules.
+#
+include $(UTSBASE)/sparc/Makefile.sparc
+
+#
+#	Define targets
+#
+ALL_TARGET	= $(BINARY)
+LINT_TARGET	= $(MODULE).lint
+INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
+
+#
+# lint pass one enforcement and OS version
+#
+CFLAGS += $(CCVERBOSE)
+
+LDFLAGS += -dy -Nfs/sockfs -Ndrv/ip
+
+#
+#	Default build targets.
+#
+.KEEP_STATE:
+
+def:		$(DEF_DEPS)
+
+all:		$(ALL_DEPS)
+
+clean:		$(CLEAN_DEPS)
+
+clobber:	$(CLOBBER_DEPS)
+
+lint:		$(LINT_DEPS)
+
+modlintlib:	$(MODLINTLIB_DEPS)
+
+clean.lint:	$(CLEAN_LINT_DEPS)
+
+install:	$(INSTALL_DEPS)
+
+#
+#	Include common targets.
+#
+include $(UTSBASE)/sparc/Makefile.targ
