--- old/usr/src/cmd/truss/actions.c	Wed Oct  9 15:51:46 2013
+++ new/usr/src/cmd/truss/actions.c	Wed Oct  9 15:51:46 2013
@@ -489,7 +489,7 @@
 			} else if (x != NOV && (x != HID || raw)) {
 				if (argprinted)
 					outstring(pri, ", ");
-				if (x == LLO)
+				if (x == LLO || x == SAD)
 					(*Print[x])(pri, raw, arg,
 					    pri->sys_args[++i]);
 				else
--- old/usr/src/cmd/truss/expound.c	Wed Oct  9 15:51:46 2013
+++ new/usr/src/cmd/truss/expound.c	Wed Oct  9 15:51:46 2013
@@ -3485,12 +3485,12 @@
 	 * A buffer large enough for PATH_MAX size AF_UNIX address, which is
 	 * also large enough to store a sockaddr_in or a sockaddr_in6.
 	 */
-	long buf[(sizeof (short) + PATH_MAX + sizeof (long) - 1)
-	    / sizeof (long)];
-	struct sockaddr *sa = (struct sockaddr *)buf;
-	struct sockaddr_in *sin = (struct sockaddr_in *)buf;
-	struct sockaddr_un *soun = (struct sockaddr_un *)buf;
-	struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)buf;
+	struct sockaddr_storage buf;
+
+	struct sockaddr *sa = (struct sockaddr *)&buf;
+	struct sockaddr_in *sin = (struct sockaddr_in *)&buf;
+	struct sockaddr_un *soun = (struct sockaddr_un *)&buf;
+	struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&buf;
 	char addrbuf[INET6_ADDRSTRLEN];
 
 	if (lenoff != 0) {
@@ -3502,7 +3502,7 @@
 
 	if (len >= sizeof (buf))	/* protect against ridiculous length */
 		len = sizeof (buf) - 1;
-	if (Pread(Proc, buf, len, addroff) != len)
+	if (Pread(Proc, (void*)&buf, len, addroff) != len)
 		return;
 
 	switch (sa->sa_family) {
--- old/usr/src/cmd/truss/print.c	Wed Oct  9 15:51:46 2013
+++ new/usr/src/cmd/truss/print.c	Wed Oct  9 15:51:46 2013
@@ -82,6 +82,8 @@
 #include <sys/rctl_impl.h>
 #include <sys/fork.h>
 #include <sys/task.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
 #include "ramdata.h"
 #include "print.h"
 #include "proto.h"
@@ -1786,6 +1788,96 @@
 }
 
 /*
+ * Print connect() 2nd and 3rd arguments.
+ */
+/*ARGSUSED*/
+void
+prt_sad(private_t *pri, int raw, long addr, long len)
+{
+	/*
+	 * A buffer large enough for PATH_MAX size AF_UNIX address, which is
+	 * also large enough to store a sockaddr_in or a sockaddr_in6.
+	 */
+	struct sockaddr_storage buf;
+
+	struct sockaddr *sa = (struct sockaddr *)&buf;
+	struct sockaddr_in *sin = (struct sockaddr_in *)&buf;
+	struct sockaddr_un *soun = (struct sockaddr_un *)&buf;
+	struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&buf;
+	char addrbuf[INET6_ADDRSTRLEN];
+	char scope[16] = "";
+	long rlen = len;
+
+	GROW(20);
+	if (data_model == PR_MODEL_ILP32) {
+		pri->sys_leng += sprintf(pri->sys_string + pri->sys_leng,
+		    "0x%.8X", (int)addr);
+	} else {
+		pri->sys_leng += sprintf(pri->sys_string + pri->sys_leng,
+		    "0x%.8lX", addr);
+	}
+
+	if (raw != 0)
+		return;
+
+	if (rlen >= sizeof (buf))	/* protect against ridiculous length */
+		rlen = sizeof (buf) - 1;
+	if (Pread(Proc, (void*)&buf, rlen, addr) != rlen)
+		return;
+
+	GROW(175);
+
+	switch (sa->sa_family) {
+	case AF_INET6:
+		if (ntohl(sin6->sin6_scope_id) != 0) {
+		    sprintf(scope, "%%%u", ntohl(sin6->sin6_scope_id));
+		}
+		pri->sys_leng += sprintf(pri->sys_string + pri->sys_leng,
+		    " AF_INET6 to = [%s]%s:%u",
+		    inet_ntop(AF_INET6, &sin6->sin6_addr, addrbuf,
+		    sizeof (addrbuf)),
+		    scope, ntohs(sin6->sin6_port));
+		pri->sys_leng += sprintf(pri->sys_string + pri->sys_leng,
+		    " source id = 0x%x"
+		    " flow class = 0x%02x flow label = 0x%05x",
+		    ntohl(sin6->__sin6_src_id),
+		    ntohl((sin6->sin6_flowinfo & IPV6_FLOWINFO_TCLASS) >> 20),
+		    ntohl(sin6->sin6_flowinfo & IPV6_FLOWINFO_FLOWLABEL));
+		break;
+	case AF_INET:
+		pri->sys_leng += sprintf(pri->sys_string + pri->sys_leng,
+		    " AF_INET to = %s:%u",
+		    inet_ntop(AF_INET, &sin->sin_addr, addrbuf,
+		    sizeof (addrbuf)),
+		    ntohs(sin->sin_port));
+		break;
+	case AF_UNIX:
+		rlen -= sizeof (soun->sun_family);
+		if (rlen >= 0) {
+			/* Null terminate */
+			soun->sun_path[rlen] = NULL;
+			pri->sys_leng += sprintf(
+			    pri->sys_string + pri->sys_leng,
+			    " AF_UNIX to = %s", soun->sun_path);
+		}
+		break;
+	}
+
+	/*
+	 * print the third argument len
+	 */
+	if (data_model == PR_MODEL_ILP32) {
+		pri->sys_leng += sprintf(pri->sys_string + pri->sys_leng,
+		    ", %d", (int)len);
+	} else {
+		pri->sys_leng += sprintf(pri->sys_string + pri->sys_leng,
+		    ", %ld", len);
+	}
+
+}
+
+
+/*
  * Print accept4() flags argument.
  */
 void
@@ -2815,6 +2907,7 @@
 	prt_skt,	/* SKT -- print so_socket() socket-type (2nd) arg */
 	prt_skp,	/* SKP -- print so_socket() protocol (3rd) arg */
 	prt_skv,	/* SKV -- print socket version arg */
+	prt_sad,	/* SAD -- print connect 2nd and 3rd arguments */
 	prt_sol,	/* SOL -- print [sg]etsockopt() level (2nd) arg */
 	prt_son,	/* SON -- print [sg]etsockopt() opt-name (3rd) arg */
 	prt_utt,	/* UTT -- print utrap type */
--- old/usr/src/cmd/truss/print.h	Wed Oct  9 15:51:47 2013
+++ new/usr/src/cmd/truss/print.h	Wed Oct  9 15:51:47 2013
@@ -108,38 +108,39 @@
 #define	SKT	67		/* print so_socket() socket type (2nd) arg */
 #define	SKP	68		/* print so_socket() protocol (3rd) arg */
 #define	SKV	69		/* print so_socket() version (5th) arg */
-#define	SOL	70		/* print [sg]etsockopt() level (2nd) arg */
-#define	SON	71		/* print [sg]etsockopt() name (3rd) arg */
-#define	UTT	72		/* print utrap type */
-#define	UTH	73		/* print utrap handler */
-#define	ACC	74		/* print access flags */
-#define	SHT	75		/* print shutdown() "how" (2nd) arg */
-#define	FFG	76		/* print fcntl() flags (3rd) arg */
-#define	PRS	77		/* privilege set */
-#define	PRO	78		/* privilege set operation */
-#define	PRN	79		/* privilege set name */
-#define	PFL	80		/* privilege/process flag name */
-#define	LAF	81		/* print lgrp_affinity arguments */
-#define	KEY	82		/* print key_t 0 as IPC_PRIVATE */
-#define	ZGA	83		/* print zone_getattr attribute types */
-#define	ATC	84		/* print AT_FDCWD or file descriptor */
-#define	LIO	85		/* print LIO_XX flags */
-#define	DFL	86		/* print door_create() flags */
-#define	DPM	87		/* print DOOR_PARAM_XX flags */
-#define	TND	88		/* print trusted network data base opcode */
-#define	RSC	89		/* print rctlsys subcode */
-#define	RGF	90		/* print rctlsys_get flags */
-#define	RSF	91		/* print rctlsys_set flags */
-#define	RCF	92		/* print rctlsys_ctl flags */
-#define	FXF	93		/* print forkx flags */
-#define	SPF	94		/* print rctlsys_projset flags */
-#define	UN1	95		/* unsigned except for -1 */
-#define	MOB	96		/* print mmapobj() flags */
-#define	SNF	97		/* print AT_SYMLINK_[NO]FOLLOW flag */
-#define	SKC	98		/* print sockconfig subcode */
-#define	ACF	99		/* accept4 flags */
-#define	PFD	100		/* pipe fds[2] */
-#define	HID	101		/* hidden argument, don't print */
+#define	SAD	70		/* print sockaddr and len for connect() */
+#define	SOL	71		/* print [sg]etsockopt() level (2nd) arg */
+#define	SON	72		/* print [sg]etsockopt() name (3rd) arg */
+#define	UTT	73		/* print utrap type */
+#define	UTH	74		/* print utrap handler */
+#define	ACC	75		/* print access flags */
+#define	SHT	76		/* print shutdown() "how" (2nd) arg */
+#define	FFG	77		/* print fcntl() flags (3rd) arg */
+#define	PRS	78		/* privilege set */
+#define	PRO	79		/* privilege set operation */
+#define	PRN	80		/* privilege set name */
+#define	PFL	81		/* privilege/process flag name */
+#define	LAF	82		/* print lgrp_affinity arguments */
+#define	KEY	83		/* print key_t 0 as IPC_PRIVATE */
+#define	ZGA	84		/* print zone_getattr attribute types */
+#define	ATC	85		/* print AT_FDCWD or file descriptor */
+#define	LIO	86		/* print LIO_XX flags */
+#define	DFL	87		/* print door_create() flags */
+#define	DPM	88		/* print DOOR_PARAM_XX flags */
+#define	TND	89		/* print trusted network data base opcode */
+#define	RSC	90		/* print rctlsys subcode */
+#define	RGF	91		/* print rctlsys_get flags */
+#define	RSF	92		/* print rctlsys_set flags */
+#define	RCF	93		/* print rctlsys_ctl flags */
+#define	FXF	94		/* print forkx flags */
+#define	SPF	95		/* print rctlsys_projset flags */
+#define	UN1	96		/* unsigned except for -1 */
+#define	MOB	97		/* print mmapobj() flags */
+#define	SNF	98		/* print AT_SYMLINK_[NO]FOLLOW flag */
+#define	SKC	99		/* print sockconfig subcode */
+#define	ACF	100		/* accept4 flags */
+#define	PFD	101		/* pipe fds[2] */
+#define	HID	102		/* hidden argument, don't print */
 				/* make sure HID is always the last member */
 
 /*
--- old/usr/src/cmd/truss/systable.c	Wed Oct  9 15:51:47 2013
+++ new/usr/src/cmd/truss/systable.c	Wed Oct  9 15:51:47 2013
@@ -453,7 +453,7 @@
 {"bind",	4, DEC, NOV, DEC, HEX, DEC, SKV},		/* 232 */
 {"listen",	3, DEC, NOV, DEC, DEC, SKV},			/* 233 */
 {"accept",	5, DEC, NOV, DEC, HEX, HEX, SKV, ACF},		/* 234 */
-{"connect",	4, DEC, NOV, DEC, HEX, DEC, SKV},		/* 235 */
+{"connect",	4, DEC, NOV, DEC, SAD, DEC, SKV},		/* 235 */
 {"shutdown",	3, DEC, NOV, DEC, SHT, SKV},			/* 236 */
 {"recv",	4, DEC, NOV, DEC, IOB, DEC, DEC},		/* 237 */
 {"recvfrom",	6, DEC, NOV, DEC, IOB, DEC, DEC, HEX, HEX},	/* 238 */
