diff --git a/fixup-gv.sh b/fixup-gv.sh
new file mode 100755
index 0000000..4709c2f
--- /dev/null
+++ b/fixup-gv.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+inFile="${1/.go/}"
+visFile="${inFile}-vis.gv"
+
+#grep -o "\.[a-zA-Z_]*\$[0-9]*" "$inFile"-vis.gv | sort | uniq
+grep -o "#gv:.*" "$inFile.go" | cut -f2 -d: | \
+while read -r expr; do sed -i ${expr} "${visFile}"; done
+
diff --git a/hkexpasswd/hkexpasswd-vis.gv b/hkexpasswd/hkexpasswd-vis.gv
index 2e36bce..625bc0d 100755
--- a/hkexpasswd/hkexpasswd-vis.gv
+++ b/hkexpasswd/hkexpasswd-vis.gv
@@ -14,43 +14,43 @@ digraph gocallvis {
edge [minlen="2"]
subgraph "cluster_focus" {
- bgcolor="#e6ecfa";
-label="main";
-labelloc="t";
+ labelloc="t";
labeljust="c";
fontsize="18";
+bgcolor="#e6ecfa";
+label="main";
- "blitter.com/go/hkexsh/hkexpasswd.main" [ fillcolor="lightblue" label="main" penwidth="0.5" ]
+ "blitter.com/go/hkexsh/hkexpasswd.main" [ label="main" penwidth="0.5" fillcolor="lightblue" ]
subgraph "cluster_blitter.com/go/hkexsh" {
- style="filled";
+ fontsize="16";
fillcolor="lightyellow";
-label="[hkexsh]";
-penwidth="0.8";
-fontsize="16";
fontname="bold";
-rank="sink";
-URL="/?f=blitter.com/go/hkexsh";
tooltip="package: blitter.com/go/hkexsh";
+penwidth="0.8";
+style="filled";
+rank="sink";
+label="[hkexsh]";
+URL="/?f=blitter.com/go/hkexsh";
"blitter.com/go/hkexsh.ReadPassword" [ fillcolor="moccasin" label="ReadPassword" penwidth="1.5" ]
}
subgraph "cluster_github.com/jameskeane/bcrypt" {
- fontname="bold";
+ fillcolor="lightyellow";
+fontname="bold";
rank="sink";
+tooltip="package: github.com/jameskeane/bcrypt";
+fontsize="16";
+style="filled";
label="[bcrypt]";
URL="/?f=github.com/jameskeane/bcrypt";
penwidth="0.8";
-fontsize="16";
-style="filled";
-fillcolor="lightyellow";
-tooltip="package: github.com/jameskeane/bcrypt";
"github.com/jameskeane/bcrypt.Salt" [ fillcolor="moccasin" label="Salt" penwidth="1.5" ]
"github.com/jameskeane/bcrypt.Hash" [ penwidth="1.5" fillcolor="moccasin" label="Hash" ]
- "github.com/jameskeane/bcrypt.Match" [ penwidth="1.5" fillcolor="moccasin" label="Match" ]
+ "github.com/jameskeane/bcrypt.Match" [ fillcolor="moccasin" label="Match" penwidth="1.5" ]
}
diff --git a/hkexsh/Makefile b/hkexsh/Makefile
index b4d319d..14c3c30 100644
--- a/hkexsh/Makefile
+++ b/hkexsh/Makefile
@@ -10,6 +10,5 @@ clean:
$(RM) $(EXE) $(EXE).exe
vis:
- go-callvis -skipbrowser -svg -png -output hkexsh-vis -ignore $(EXTPKGS) -group pkg,type .
-
-
+ go-callvis -skipbrowser -output hkexsh-vis -ignore $(EXTPKGS) -group pkg,type .
+ ../fixup-gv.sh hkexsh.go && cat hkexsh-vis.gv | dot -Tpng -ohkexsh-vis.gv.png
diff --git a/hkexsh/hkexsh-vis.gv b/hkexsh/hkexsh-vis.gv
index 6dbe216..0d24c14 100755
--- a/hkexsh/hkexsh-vis.gv
+++ b/hkexsh/hkexsh-vis.gv
@@ -20,13 +20,13 @@ labelloc="t";
labeljust="c";
fontsize="18";
- "blitter.com/go/hkexsh/hkexsh.rejectUserMsg" [ penwidth="0.5" fillcolor="lightblue" label="rejectUserMsg" ]
- "blitter.com/go/hkexsh/hkexsh.reqTunnel" [ label="reqTunnel" penwidth="0.5" fillcolor="lightblue" ]
- "blitter.com/go/hkexsh/hkexsh.main" [ fillcolor="lightblue" label="main" penwidth="0.5" ]
- "blitter.com/go/hkexsh/hkexsh.parseNonSwitchArgs" [ label="parseNonSwitchArgs" penwidth="0.5" fillcolor="lightblue" ]
- "blitter.com/go/hkexsh/hkexsh.main$1" [ style="dotted,filled" fillcolor="lightblue" label="deferRestore" ]
+ "blitter.com/go/hkexsh/hkexsh.main" [ label="main" penwidth="0.5" fillcolor="lightblue" ]
+ "blitter.com/go/hkexsh/hkexsh.parseNonSwitchArgs" [ fillcolor="lightblue" label="parseNonSwitchArgs" penwidth="0.5" ]
+ "blitter.com/go/hkexsh/hkexsh.main$1" [ fillcolor="lightblue" label="deferRestore" style="dotted,filled" ]
"blitter.com/go/hkexsh/hkexsh.sendSessionParams" [ fillcolor="lightblue" label="sendSessionParams" penwidth="0.5" ]
+ "blitter.com/go/hkexsh/hkexsh.rejectUserMsg" [ penwidth="0.5" fillcolor="lightblue" label="rejectUserMsg" ]
"blitter.com/go/hkexsh/hkexsh.main$2" [ label="deferCloseChaff" style="dotted,filled" fillcolor="lightblue" ]
+ "blitter.com/go/hkexsh/hkexsh.reqTunnel" [ penwidth="0.5" fillcolor="lightblue" label="reqTunnel" ]
"blitter.com/go/hkexsh/hkexsh.launchTuns" [ fillcolor="lightblue" label="launchTuns" penwidth="0.5" ]
"blitter.com/go/hkexsh/hkexsh.doShellMode$1" [ fillcolor="lightblue" label="shellRemoteToStdin" style="dotted,filled" ]
"blitter.com/go/hkexsh/hkexsh.doShellMode" [ fillcolor="lightblue" label="doShellMode" penwidth="0.5" ]
@@ -35,107 +35,107 @@ fontsize="18";
"blitter.com/go/hkexsh/hkexsh.handleTermResizes" [ fillcolor="lightblue" label="handleTermResizes" penwidth="0.5" ]
"blitter.com/go/hkexsh/hkexsh.doShellMode$2" [ label="shellStdinToRemote" style="dotted,filled" fillcolor="lightblue" ]
"blitter.com/go/hkexsh/hkexsh.doShellMode$2$1" [ fillcolor="lightblue" label="doShellMode$2$1" style="dotted,filled" ]
- "blitter.com/go/hkexsh/hkexsh.doCopyMode" [ label="doCopyMode" penwidth="0.5" fillcolor="lightblue" ]
- "blitter.com/go/hkexsh/hkexsh.usageShell" [ label="usageShell" penwidth="0.5" fillcolor="lightblue" ]
+ "blitter.com/go/hkexsh/hkexsh.doCopyMode" [ penwidth="0.5" fillcolor="lightblue" label="doCopyMode" ]
+ "blitter.com/go/hkexsh/hkexsh.usageShell" [ fillcolor="lightblue" label="usageShell" penwidth="0.5" ]
"blitter.com/go/hkexsh/hkexsh.usageCp" [ fillcolor="lightblue" label="usageCp" penwidth="0.5" ]
subgraph "cluster_blitter.com/go/hkexsh" {
- style="filled";
+ fontsize="16";
+style="filled";
fillcolor="lightyellow";
fontname="bold";
penwidth="0.8";
-fontsize="16";
-URL="/?f=blitter.com/go/hkexsh";
-tooltip="package: blitter.com/go/hkexsh";
rank="sink";
label="[hkexsh]";
+URL="/?f=blitter.com/go/hkexsh";
+tooltip="package: blitter.com/go/hkexsh";
"blitter.com/go/hkexsh.MakeRaw" [ fillcolor="moccasin" label="MakeRaw" penwidth="1.5" ]
- "blitter.com/go/hkexsh.Restore" [ penwidth="1.5" fillcolor="moccasin" label="Restore" ]
+ "blitter.com/go/hkexsh.Restore" [ label="Restore" penwidth="1.5" fillcolor="moccasin" ]
"blitter.com/go/hkexsh.ReadPassword" [ fillcolor="moccasin" label="ReadPassword" penwidth="1.5" ]
"blitter.com/go/hkexsh.NewSession" [ fillcolor="moccasin" label="NewSession" penwidth="1.5" ]
subgraph "cluster_*blitter.com/go/hkexsh.Session" {
- penwidth="0.5";
+ label="(*Session)";
+tooltip="type: *blitter.com/go/hkexsh.Session";
+penwidth="0.5";
fontsize="15";
fontcolor="#222222";
labelloc="b";
style="rounded,filled";
fillcolor="wheat2";
-label="(*Session)";
-tooltip="type: *blitter.com/go/hkexsh.Session";
"(*blitter.com/go/hkexsh.Session).SetStatus" [ fillcolor="moccasin" label="SetStatus" penwidth="1.5" ]
}
subgraph "cluster_blitter.com/go/hkexsh.Session" {
- fontsize="15";
+ tooltip="type: blitter.com/go/hkexsh.Session";
+penwidth="0.5";
+fontsize="15";
fontcolor="#222222";
labelloc="b";
style="rounded,filled";
fillcolor="wheat2";
label="(Session)";
-tooltip="type: blitter.com/go/hkexsh.Session";
-penwidth="0.5";
"(blitter.com/go/hkexsh.Session).Op" [ fillcolor="moccasin" label="Op" penwidth="1.5" ]
"(blitter.com/go/hkexsh.Session).Who" [ fillcolor="moccasin" label="Who" penwidth="1.5" ]
"(blitter.com/go/hkexsh.Session).ConnHost" [ fillcolor="moccasin" label="ConnHost" penwidth="1.5" ]
- "(blitter.com/go/hkexsh.Session).TermType" [ penwidth="1.5" fillcolor="moccasin" label="TermType" ]
+ "(blitter.com/go/hkexsh.Session).TermType" [ label="TermType" penwidth="1.5" fillcolor="moccasin" ]
"(blitter.com/go/hkexsh.Session).Cmd" [ fillcolor="moccasin" label="Cmd" penwidth="1.5" ]
"(blitter.com/go/hkexsh.Session).AuthCookie" [ fillcolor="moccasin" label="AuthCookie" penwidth="1.5" ]
- "(blitter.com/go/hkexsh.Session).Status" [ penwidth="1.5" fillcolor="moccasin" label="Status" ]
+ "(blitter.com/go/hkexsh.Session).Status" [ fillcolor="moccasin" label="Status" penwidth="1.5" ]
}
}
subgraph "cluster_blitter.com/go/hkexsh/hkexnet" {
- fontname="bold";
-URL="/?f=blitter.com/go/hkexsh/hkexnet";
-fillcolor="lightyellow";
-fontsize="16";
-style="filled";
-rank="sink";
-label="[hkexnet]";
+ URL="/?f=blitter.com/go/hkexsh/hkexnet";
tooltip="package: blitter.com/go/hkexsh/hkexnet";
penwidth="0.8";
+fontsize="16";
+fontname="bold";
+label="[hkexnet]";
+style="filled";
+fillcolor="lightyellow";
+rank="sink";
- "blitter.com/go/hkexsh/hkexnet.Init" [ penwidth="1.5" fillcolor="moccasin" label="Init" ]
+ "blitter.com/go/hkexsh/hkexnet.Init" [ fillcolor="moccasin" label="Init" penwidth="1.5" ]
"blitter.com/go/hkexsh/hkexnet.Dial" [ fillcolor="moccasin" label="Dial" penwidth="1.5" ]
subgraph "cluster_*blitter.com/go/hkexsh/hkexnet.Conn" {
- fontsize="15";
-fontcolor="#222222";
-labelloc="b";
+ labelloc="b";
style="rounded,filled";
fillcolor="wheat2";
label="(*Conn)";
tooltip="type: *blitter.com/go/hkexsh/hkexnet.Conn";
penwidth="0.5";
+fontsize="15";
+fontcolor="#222222";
- "(*blitter.com/go/hkexsh/hkexnet.Conn).WritePacket" [ label="WritePacket" penwidth="1.5" fillcolor="moccasin" ]
- "(*blitter.com/go/hkexsh/hkexnet.Conn).Close" [ fillcolor="moccasin" label="Close" penwidth="1.5" ]
- "(*blitter.com/go/hkexsh/hkexnet.Conn).SetupChaff" [ fillcolor="moccasin" label="SetupChaff" penwidth="1.5" ]
+ "(*blitter.com/go/hkexsh/hkexnet.Conn).Close" [ penwidth="1.5" fillcolor="moccasin" label="Close" ]
+ "(*blitter.com/go/hkexsh/hkexnet.Conn).SetupChaff" [ penwidth="1.5" fillcolor="moccasin" label="SetupChaff" ]
"(*blitter.com/go/hkexsh/hkexnet.Conn).EnableChaff" [ fillcolor="moccasin" label="EnableChaff" penwidth="1.5" ]
- "(*blitter.com/go/hkexsh/hkexnet.Conn).DisableChaff" [ label="DisableChaff" penwidth="1.5" fillcolor="moccasin" ]
- "(*blitter.com/go/hkexsh/hkexnet.Conn).ShutdownChaff" [ label="ShutdownChaff" penwidth="1.5" fillcolor="moccasin" ]
+ "(*blitter.com/go/hkexsh/hkexnet.Conn).DisableChaff" [ fillcolor="moccasin" label="DisableChaff" penwidth="1.5" ]
+ "(*blitter.com/go/hkexsh/hkexnet.Conn).ShutdownChaff" [ fillcolor="moccasin" label="ShutdownChaff" penwidth="1.5" ]
+ "(*blitter.com/go/hkexsh/hkexnet.Conn).WritePacket" [ fillcolor="moccasin" label="WritePacket" penwidth="1.5" ]
"(*blitter.com/go/hkexsh/hkexnet.Conn).SetStatus" [ fillcolor="moccasin" label="SetStatus" penwidth="1.5" ]
}
subgraph "cluster_blitter.com/go/hkexsh/hkexnet.Conn" {
- penwidth="0.5";
-fontsize="15";
-fontcolor="#222222";
-labelloc="b";
-style="rounded,filled";
+ style="rounded,filled";
fillcolor="wheat2";
label="(Conn)";
tooltip="type: blitter.com/go/hkexsh/hkexnet.Conn";
+penwidth="0.5";
+fontsize="15";
+fontcolor="#222222";
+labelloc="b";
- "(blitter.com/go/hkexsh/hkexnet.Conn).Write" [ fillcolor="moccasin" label="Write" penwidth="1.5" ]
+ "(blitter.com/go/hkexsh/hkexnet.Conn).Write" [ penwidth="1.5" fillcolor="moccasin" label="Write" ]
"(blitter.com/go/hkexsh/hkexnet.Conn).Read" [ fillcolor="moccasin" label="Read" penwidth="1.5" ]
"(blitter.com/go/hkexsh/hkexnet.Conn).GetStatus" [ fillcolor="moccasin" label="GetStatus" penwidth="1.5" ]
@@ -144,56 +144,53 @@ tooltip="type: blitter.com/go/hkexsh/hkexnet.Conn";
}
subgraph "cluster_blitter.com/go/hkexsh/logger" {
- fontsize="16";
+ URL="/?f=blitter.com/go/hkexsh/logger";
+fontsize="16";
style="filled";
+fillcolor="lightyellow";
fontname="bold";
-tooltip="package: blitter.com/go/hkexsh/logger";
penwidth="0.8";
rank="sink";
label="[logger]";
-URL="/?f=blitter.com/go/hkexsh/logger";
-fillcolor="lightyellow";
+tooltip="package: blitter.com/go/hkexsh/logger";
- "blitter.com/go/hkexsh/logger.LogDebug" [ fillcolor="moccasin" label="LogDebug" penwidth="1.5" ]
"blitter.com/go/hkexsh/logger.New" [ fillcolor="moccasin" label="New" penwidth="1.5" ]
+ "blitter.com/go/hkexsh/logger.LogDebug" [ fillcolor="moccasin" label="LogDebug" penwidth="1.5" ]
}
subgraph "cluster_blitter.com/go/hkexsh/spinsult" {
- label="[spinsult]";
+ fillcolor="lightyellow";
+rank="sink";
+fontsize="16";
+style="filled";
+label="[spinsult]";
+URL="/?f=blitter.com/go/hkexsh/spinsult";
tooltip="package: blitter.com/go/hkexsh/spinsult";
penwidth="0.8";
-fontsize="16";
fontname="bold";
-URL="/?f=blitter.com/go/hkexsh/spinsult";
-style="filled";
-fillcolor="lightyellow";
-rank="sink";
"blitter.com/go/hkexsh/spinsult.GetSentence" [ fillcolor="moccasin" label="GetSentence" penwidth="1.5" ]
}
subgraph "cluster_github.com/mattn/go-isatty" {
- URL="/?f=github.com/mattn/go-isatty";
-tooltip="package: github.com/mattn/go-isatty";
-fontsize="16";
+ fillcolor="lightyellow";
fontname="bold";
-rank="sink";
label="[isatty]";
+URL="/?f=github.com/mattn/go-isatty";
+tooltip="package: github.com/mattn/go-isatty";
penwidth="0.8";
+fontsize="16";
style="filled";
-fillcolor="lightyellow";
+rank="sink";
- "github.com/mattn/go-isatty.IsTerminal" [ label="IsTerminal" penwidth="1.5" fillcolor="moccasin" ]
+ "github.com/mattn/go-isatty.IsTerminal" [ fillcolor="moccasin" label="IsTerminal" penwidth="1.5" ]
}
}
- "blitter.com/go/hkexsh/hkexsh.rejectUserMsg" -> "blitter.com/go/hkexsh/spinsult.GetSentence" [ color="saddlebrown" ]
- "blitter.com/go/hkexsh/hkexsh.reqTunnel" -> "blitter.com/go/hkexsh/logger.LogDebug" [ color="saddlebrown" ]
- "blitter.com/go/hkexsh/hkexsh.reqTunnel" -> "(*blitter.com/go/hkexsh/hkexnet.Conn).WritePacket" [ color="saddlebrown" ]
"blitter.com/go/hkexsh/hkexsh.main" -> "blitter.com/go/hkexsh/hkexsh.parseNonSwitchArgs" [ ]
"blitter.com/go/hkexsh/hkexsh.main" -> "blitter.com/go/hkexsh/logger.New" [ color="saddlebrown" ]
"blitter.com/go/hkexsh/hkexsh.main" -> "blitter.com/go/hkexsh/hkexnet.Init" [ color="saddlebrown" ]
@@ -211,10 +208,11 @@ fillcolor="lightyellow";
"blitter.com/go/hkexsh/hkexsh.sendSessionParams" -> "(blitter.com/go/hkexsh.Session).TermType" [ color="saddlebrown" ]
"blitter.com/go/hkexsh/hkexsh.sendSessionParams" -> "(blitter.com/go/hkexsh.Session).Cmd" [ color="saddlebrown" ]
"blitter.com/go/hkexsh/hkexsh.sendSessionParams" -> "(blitter.com/go/hkexsh.Session).AuthCookie" [ color="saddlebrown" ]
- "blitter.com/go/hkexsh/hkexsh.sendSessionParams" -> "(blitter.com/go/hkexsh/hkexnet.Conn).Write" [ style="dashed" color="saddlebrown" ]
+ "blitter.com/go/hkexsh/hkexsh.sendSessionParams" -> "(blitter.com/go/hkexsh/hkexnet.Conn).Write" [ color="saddlebrown" style="dashed" ]
"blitter.com/go/hkexsh/hkexsh.main" -> "blitter.com/go/hkexsh/hkexsh.sendSessionParams" [ ]
"blitter.com/go/hkexsh/hkexsh.main" -> "(blitter.com/go/hkexsh/hkexnet.Conn).Read" [ color="saddlebrown" ]
"blitter.com/go/hkexsh/hkexsh.main" -> "(*blitter.com/go/hkexsh.Session).SetStatus" [ color="saddlebrown" ]
+ "blitter.com/go/hkexsh/hkexsh.rejectUserMsg" -> "blitter.com/go/hkexsh/spinsult.GetSentence" [ color="saddlebrown" ]
"blitter.com/go/hkexsh/hkexsh.main" -> "blitter.com/go/hkexsh/hkexsh.rejectUserMsg" [ ]
"blitter.com/go/hkexsh/hkexsh.main" -> "(*blitter.com/go/hkexsh/hkexnet.Conn).SetupChaff" [ color="saddlebrown" ]
"blitter.com/go/hkexsh/hkexsh.main" -> "(*blitter.com/go/hkexsh/hkexnet.Conn).EnableChaff" [ color="saddlebrown" ]
@@ -222,6 +220,8 @@ fillcolor="lightyellow";
"blitter.com/go/hkexsh/hkexsh.main" -> "(*blitter.com/go/hkexsh/hkexnet.Conn).ShutdownChaff" [ arrowhead="normalnoneodiamond" color="saddlebrown" ]
"blitter.com/go/hkexsh/hkexsh.main$2" -> "(*blitter.com/go/hkexsh/hkexnet.Conn).WritePacket" [ color="saddlebrown" ]
"blitter.com/go/hkexsh/hkexsh.main" -> "blitter.com/go/hkexsh/hkexsh.main$2" [ arrowhead="normalnoneodot" ]
+ "blitter.com/go/hkexsh/hkexsh.reqTunnel" -> "blitter.com/go/hkexsh/logger.LogDebug" [ color="saddlebrown" ]
+ "blitter.com/go/hkexsh/hkexsh.reqTunnel" -> "(*blitter.com/go/hkexsh/hkexnet.Conn).WritePacket" [ color="saddlebrown" ]
"blitter.com/go/hkexsh/hkexsh.launchTuns" -> "blitter.com/go/hkexsh/hkexsh.reqTunnel" [ ]
"blitter.com/go/hkexsh/hkexsh.main" -> "blitter.com/go/hkexsh/hkexsh.launchTuns" [ ]
"blitter.com/go/hkexsh/hkexsh.doShellMode$1" -> "blitter.com/go/hkexsh.Restore" [ color="saddlebrown" ]
diff --git a/hkexsh/hkexsh-vis.gv.png b/hkexsh/hkexsh-vis.gv.png
index 0a39d15..762405b 100644
Binary files a/hkexsh/hkexsh-vis.gv.png and b/hkexsh/hkexsh-vis.gv.png differ
diff --git a/hkexsh/hkexsh-vis.gv.svg b/hkexsh/hkexsh-vis.gv.svg
deleted file mode 100644
index a064d0f..0000000
--- a/hkexsh/hkexsh-vis.gv.svg
+++ /dev/null
@@ -1,719 +0,0 @@
-
-
-
-
-
diff --git a/hkexshd/Makefile b/hkexshd/Makefile
index 7e41914..78ba392 100644
--- a/hkexshd/Makefile
+++ b/hkexshd/Makefile
@@ -10,5 +10,6 @@ clean:
$(RM) $(EXE) $(EXE).exe
vis:
- go-callvis -skipbrowser -png -svg -output hkexshd-vis -ignore $(EXTPKGS) -group pkg,type .
+ go-callvis -skipbrowser -output hkexshd-vis -ignore $(EXTPKGS) -group pkg,type .
+ ../fixup-gv.sh hkexshd.go && cat hkexshd-vis.gv | dot -Tpng -ohkexshd-vis.gv.png
diff --git a/hkexshd/hkexshd-vis.gv b/hkexshd/hkexshd-vis.gv
index 7c686ab..8d52fed 100755
--- a/hkexshd/hkexshd-vis.gv
+++ b/hkexshd/hkexshd-vis.gv
@@ -20,85 +20,86 @@ labelloc="t";
labeljust="c";
fontsize="18";
- "blitter.com/go/hkexsh/hkexshd.main$1" [ label="main$1" style="dotted,filled" fillcolor="lightblue" ]
+ "blitter.com/go/hkexsh/hkexshd.main$1" [ fillcolor="lightblue" label="main$1" style="dotted,filled" ]
"blitter.com/go/hkexsh/hkexshd.main" [ fillcolor="lightblue" label="main" penwidth="0.5" ]
- "blitter.com/go/hkexsh/hkexshd.main$2" [ style="dotted,filled" fillcolor="lightblue" label="main$2" ]
- "blitter.com/go/hkexsh/hkexshd.GenAuthToken" [ label="GenAuthToken" penwidth="1.5" fillcolor="lightblue" ]
+ "blitter.com/go/hkexsh/hkexshd.main$2" [ fillcolor="lightblue" label="main$2" style="dotted,filled" ]
+ "blitter.com/go/hkexsh/hkexshd.GenAuthToken" [ fillcolor="lightblue" label="GenAuthToken" penwidth="1.5" ]
"blitter.com/go/hkexsh/hkexshd.runShellAs" [ fillcolor="lightblue" label="runShellAs" penwidth="0.5" ]
- "blitter.com/go/hkexsh/hkexshd.runShellAs$1" [ style="dotted,filled" fillcolor="lightblue" label="runShellAs$1" ]
- "blitter.com/go/hkexsh/hkexshd.runShellAs$2" [ fillcolor="lightblue" label="runShellAs$2" style="dotted,filled" ]
- "blitter.com/go/hkexsh/hkexshd.runShellAs$3" [ fillcolor="lightblue" label="runShellAs$3" style="dotted,filled" ]
- "blitter.com/go/hkexsh/hkexshd.runShellAs$4" [ label="runShellAs$4" style="dotted,filled" fillcolor="lightblue" ]
- "blitter.com/go/hkexsh/hkexshd.main$2$1" [ fillcolor="lightblue" label="main$2$1" style="dotted,filled" ]
- "blitter.com/go/hkexsh/hkexshd.runClientToServerCopyAs" [ fillcolor="lightblue" label="runClientToServerCopyAs" penwidth="0.5" ]
+ "blitter.com/go/hkexsh/hkexshd.runShellAs$1" [ fillcolor="lightblue" label="deferPtmxClose" style="dotted,filled" ]
+ "blitter.com/go/hkexsh/hkexshd.runShellAs$2" [ fillcolor="lightblue" label="termResizeWatcher" style="dotted,filled" ]
+ "blitter.com/go/hkexsh/hkexshd.runShellAs$3" [ fillcolor="lightblue" label="stdinToPtyWorker" style="dotted,filled" ]
+ "blitter.com/go/hkexsh/hkexshd.runShellAs$4" [ fillcolor="lightblue" label="deferChaffShutdown" style="dotted,filled" ]
+ "blitter.com/go/hkexsh/hkexshd.runShellAs$5" [ fillcolor="lightblue" label="runShellAs$5" style="dotted,filled" ]
+ "blitter.com/go/hkexsh/hkexshd.main$2$1" [ label="main$2$1" style="dotted,filled" fillcolor="lightblue" ]
+ "blitter.com/go/hkexsh/hkexshd.runClientToServerCopyAs" [ penwidth="0.5" fillcolor="lightblue" label="runClientToServerCopyAs" ]
"blitter.com/go/hkexsh/hkexshd.runServerToClientCopyAs" [ fillcolor="lightblue" label="runServerToClientCopyAs" penwidth="0.5" ]
subgraph "cluster_blitter.com/go/goutmp" {
- penwidth="0.8";
+ style="filled";
fillcolor="lightyellow";
+label="[goutmp]";
URL="/?f=blitter.com/go/goutmp";
+tooltip="package: blitter.com/go/goutmp";
+penwidth="0.8";
fontsize="16";
-style="filled";
fontname="bold";
rank="sink";
-label="[goutmp]";
-tooltip="package: blitter.com/go/goutmp";
"blitter.com/go/goutmp.GetHost" [ fillcolor="moccasin" label="GetHost" penwidth="1.5" ]
- "blitter.com/go/goutmp.Put_utmp" [ fillcolor="moccasin" label="Put_utmp" penwidth="1.5" ]
- "blitter.com/go/goutmp.Unput_utmp" [ fillcolor="moccasin" label="Unput_utmp" penwidth="1.5" ]
+ "blitter.com/go/goutmp.Put_utmp" [ penwidth="1.5" fillcolor="moccasin" label="Put_utmp" ]
+ "blitter.com/go/goutmp.Unput_utmp" [ label="Unput_utmp" penwidth="1.5" fillcolor="moccasin" ]
"blitter.com/go/goutmp.Put_lastlog_entry" [ fillcolor="moccasin" label="Put_lastlog_entry" penwidth="1.5" ]
}
subgraph "cluster_blitter.com/go/hkexsh" {
style="filled";
-fontname="bold";
-label="[hkexsh]";
-fontsize="16";
fillcolor="lightyellow";
-rank="sink";
-URL="/?f=blitter.com/go/hkexsh";
+label="[hkexsh]";
tooltip="package: blitter.com/go/hkexsh";
penwidth="0.8";
+fontsize="16";
+URL="/?f=blitter.com/go/hkexsh";
+fontname="bold";
+rank="sink";
"blitter.com/go/hkexsh.AuthUserByToken" [ fillcolor="moccasin" label="AuthUserByToken" penwidth="1.5" ]
"blitter.com/go/hkexsh.AuthUserByPasswd" [ fillcolor="moccasin" label="AuthUserByPasswd" penwidth="1.5" ]
subgraph "cluster_*blitter.com/go/hkexsh.Session" {
- fontsize="15";
-fontcolor="#222222";
-labelloc="b";
+ labelloc="b";
style="rounded,filled";
fillcolor="wheat2";
label="(*Session)";
tooltip="type: *blitter.com/go/hkexsh.Session";
penwidth="0.5";
+fontsize="15";
+fontcolor="#222222";
- "(*blitter.com/go/hkexsh.Session).SetOp" [ fillcolor="moccasin" label="SetOp" penwidth="1.5" ]
+ "(*blitter.com/go/hkexsh.Session).SetOp" [ label="SetOp" penwidth="1.5" fillcolor="moccasin" ]
"(*blitter.com/go/hkexsh.Session).SetWho" [ fillcolor="moccasin" label="SetWho" penwidth="1.5" ]
"(*blitter.com/go/hkexsh.Session).SetConnHost" [ fillcolor="moccasin" label="SetConnHost" penwidth="1.5" ]
"(*blitter.com/go/hkexsh.Session).SetTermType" [ fillcolor="moccasin" label="SetTermType" penwidth="1.5" ]
"(*blitter.com/go/hkexsh.Session).SetCmd" [ penwidth="1.5" fillcolor="moccasin" label="SetCmd" ]
"(*blitter.com/go/hkexsh.Session).SetAuthCookie" [ fillcolor="moccasin" label="SetAuthCookie" penwidth="1.5" ]
- "(*blitter.com/go/hkexsh.Session).ClearAuthCookie" [ fillcolor="moccasin" label="ClearAuthCookie" penwidth="1.5" ]
+ "(*blitter.com/go/hkexsh.Session).ClearAuthCookie" [ label="ClearAuthCookie" penwidth="1.5" fillcolor="moccasin" ]
}
subgraph "cluster_blitter.com/go/hkexsh.Session" {
- fontcolor="#222222";
-labelloc="b";
-style="rounded,filled";
-fillcolor="wheat2";
-label="(Session)";
+ label="(Session)";
tooltip="type: blitter.com/go/hkexsh.Session";
penwidth="0.5";
fontsize="15";
+fontcolor="#222222";
+labelloc="b";
+style="rounded,filled";
+fillcolor="wheat2";
- "(blitter.com/go/hkexsh.Session).Op" [ fillcolor="moccasin" label="Op" penwidth="1.5" ]
+ "(blitter.com/go/hkexsh.Session).Op" [ penwidth="1.5" fillcolor="moccasin" label="Op" ]
"(blitter.com/go/hkexsh.Session).Who" [ fillcolor="moccasin" label="Who" penwidth="1.5" ]
- "(blitter.com/go/hkexsh.Session).ConnHost" [ label="ConnHost" penwidth="1.5" fillcolor="moccasin" ]
- "(blitter.com/go/hkexsh.Session).Cmd" [ label="Cmd" penwidth="1.5" fillcolor="moccasin" ]
+ "(blitter.com/go/hkexsh.Session).ConnHost" [ fillcolor="moccasin" label="ConnHost" penwidth="1.5" ]
+ "(blitter.com/go/hkexsh.Session).Cmd" [ fillcolor="moccasin" label="Cmd" penwidth="1.5" ]
"(blitter.com/go/hkexsh.Session).AuthCookie" [ fillcolor="moccasin" label="AuthCookie" penwidth="1.5" ]
"(blitter.com/go/hkexsh.Session).TermType" [ fillcolor="moccasin" label="TermType" penwidth="1.5" ]
@@ -107,34 +108,34 @@ fontsize="15";
}
subgraph "cluster_blitter.com/go/hkexsh/hkexnet" {
- fillcolor="lightyellow";
+ tooltip="package: blitter.com/go/hkexsh/hkexnet";
fontname="bold";
-tooltip="package: blitter.com/go/hkexsh/hkexnet";
+rank="sink";
+label="[hkexnet]";
+fillcolor="lightyellow";
URL="/?f=blitter.com/go/hkexsh/hkexnet";
penwidth="0.8";
fontsize="16";
style="filled";
-rank="sink";
-label="[hkexnet]";
- "blitter.com/go/hkexsh/hkexnet.Init" [ fillcolor="moccasin" label="Init" penwidth="1.5" ]
+ "blitter.com/go/hkexsh/hkexnet.Init" [ label="Init" penwidth="1.5" fillcolor="moccasin" ]
"blitter.com/go/hkexsh/hkexnet.Listen" [ fillcolor="moccasin" label="Listen" penwidth="1.5" ]
subgraph "cluster_*blitter.com/go/hkexsh/hkexnet.Conn" {
- fillcolor="wheat2";
+ style="rounded,filled";
+fillcolor="wheat2";
label="(*Conn)";
tooltip="type: *blitter.com/go/hkexsh/hkexnet.Conn";
penwidth="0.5";
fontsize="15";
fontcolor="#222222";
labelloc="b";
-style="rounded,filled";
- "(*blitter.com/go/hkexsh/hkexnet.Conn).SetupChaff" [ label="SetupChaff" penwidth="1.5" fillcolor="moccasin" ]
+ "(*blitter.com/go/hkexsh/hkexnet.Conn).SetupChaff" [ fillcolor="moccasin" label="SetupChaff" penwidth="1.5" ]
"(*blitter.com/go/hkexsh/hkexnet.Conn).Close" [ fillcolor="moccasin" label="Close" penwidth="1.5" ]
- "(*blitter.com/go/hkexsh/hkexnet.Conn).RemoteAddr" [ fillcolor="moccasin" label="RemoteAddr" penwidth="1.5" ]
+ "(*blitter.com/go/hkexsh/hkexnet.Conn).RemoteAddr" [ label="RemoteAddr" penwidth="1.5" fillcolor="moccasin" ]
"(*blitter.com/go/hkexsh/hkexnet.Conn).EnableChaff" [ fillcolor="moccasin" label="EnableChaff" penwidth="1.5" ]
- "(*blitter.com/go/hkexsh/hkexnet.Conn).DisableChaff" [ penwidth="1.5" fillcolor="moccasin" label="DisableChaff" ]
+ "(*blitter.com/go/hkexsh/hkexnet.Conn).DisableChaff" [ fillcolor="moccasin" label="DisableChaff" penwidth="1.5" ]
"(*blitter.com/go/hkexsh/hkexnet.Conn).ShutdownChaff" [ fillcolor="moccasin" label="ShutdownChaff" penwidth="1.5" ]
"(*blitter.com/go/hkexsh/hkexnet.Conn).SetStatus" [ fillcolor="moccasin" label="SetStatus" penwidth="1.5" ]
"(*blitter.com/go/hkexsh/hkexnet.Conn).WritePacket" [ fillcolor="moccasin" label="WritePacket" penwidth="1.5" ]
@@ -142,42 +143,42 @@ style="rounded,filled";
}
subgraph "cluster_*blitter.com/go/hkexsh/hkexnet.HKExListener" {
- fontcolor="#222222";
-labelloc="b";
-style="rounded,filled";
-fillcolor="wheat2";
-label="(*HKExListener)";
+ label="(*HKExListener)";
tooltip="type: *blitter.com/go/hkexsh/hkexnet.HKExListener";
penwidth="0.5";
fontsize="15";
+fontcolor="#222222";
+labelloc="b";
+style="rounded,filled";
+fillcolor="wheat2";
- "(*blitter.com/go/hkexsh/hkexnet.HKExListener).Accept" [ fillcolor="moccasin" label="Accept" penwidth="1.5" ]
+ "(*blitter.com/go/hkexsh/hkexnet.HKExListener).Accept" [ label="Accept" penwidth="1.5" fillcolor="moccasin" ]
}
subgraph "cluster_blitter.com/go/hkexsh/hkexnet.Conn" {
- fontcolor="#222222";
-labelloc="b";
-style="rounded,filled";
-fillcolor="wheat2";
+ fillcolor="wheat2";
label="(Conn)";
tooltip="type: blitter.com/go/hkexsh/hkexnet.Conn";
penwidth="0.5";
fontsize="15";
+fontcolor="#222222";
+labelloc="b";
+style="rounded,filled";
- "(blitter.com/go/hkexsh/hkexnet.Conn).Write" [ penwidth="1.5" fillcolor="moccasin" label="Write" ]
+ "(blitter.com/go/hkexsh/hkexnet.Conn).Write" [ fillcolor="moccasin" label="Write" penwidth="1.5" ]
}
subgraph "cluster_blitter.com/go/hkexsh/hkexnet.HKExListener" {
- fillcolor="wheat2";
+ style="rounded,filled";
+fillcolor="wheat2";
label="(HKExListener)";
tooltip="type: blitter.com/go/hkexsh/hkexnet.HKExListener";
penwidth="0.5";
fontsize="15";
fontcolor="#222222";
labelloc="b";
-style="rounded,filled";
"(blitter.com/go/hkexsh/hkexnet.HKExListener).Close" [ fillcolor="moccasin" label="Close" penwidth="1.5" ]
@@ -186,15 +187,15 @@ style="rounded,filled";
}
subgraph "cluster_blitter.com/go/hkexsh/logger" {
- fillcolor="lightyellow";
-label="[logger]";
-penwidth="0.8";
+ penwidth="0.8";
+fontsize="16";
style="filled";
rank="sink";
+label="[logger]";
URL="/?f=blitter.com/go/hkexsh/logger";
-tooltip="package: blitter.com/go/hkexsh/logger";
-fontsize="16";
+fillcolor="lightyellow";
fontname="bold";
+tooltip="package: blitter.com/go/hkexsh/logger";
"blitter.com/go/hkexsh/logger.LogNotice" [ fillcolor="moccasin" label="LogNotice" penwidth="1.5" ]
"blitter.com/go/hkexsh/logger.New" [ fillcolor="moccasin" label="New" penwidth="1.5" ]
@@ -204,14 +205,14 @@ fontname="bold";
subgraph "cluster_github.com/kr/pty" {
fillcolor="lightyellow";
-fontname="bold";
rank="sink";
-label="[pty]";
-URL="/?f=github.com/kr/pty";
+tooltip="package: github.com/kr/pty";
penwidth="0.8";
fontsize="16";
style="filled";
-tooltip="package: github.com/kr/pty";
+fontname="bold";
+label="[pty]";
+URL="/?f=github.com/kr/pty";
"github.com/kr/pty.Start" [ fillcolor="moccasin" label="Start" penwidth="1.5" ]
"github.com/kr/pty.Setsize" [ fillcolor="moccasin" label="Setsize" penwidth="1.5" ]
@@ -255,9 +256,10 @@ tooltip="package: github.com/kr/pty";
"blitter.com/go/hkexsh/hkexshd.runShellAs" -> "blitter.com/go/hkexsh/hkexshd.runShellAs$2" [ arrowhead="normalnoneodot" ]
"blitter.com/go/hkexsh/hkexshd.runShellAs" -> "blitter.com/go/hkexsh/hkexshd.runShellAs$3" [ arrowhead="normalnoneodot" ]
"blitter.com/go/hkexsh/hkexshd.runShellAs" -> "(*blitter.com/go/hkexsh/hkexnet.Conn).EnableChaff" [ color="saddlebrown" ]
- "blitter.com/go/hkexsh/hkexshd.runShellAs" -> "(*blitter.com/go/hkexsh/hkexnet.Conn).DisableChaff" [ color="saddlebrown" arrowhead="normalnoneodiamond" ]
- "blitter.com/go/hkexsh/hkexshd.runShellAs" -> "(*blitter.com/go/hkexsh/hkexnet.Conn).ShutdownChaff" [ arrowhead="normalnoneodiamond" color="saddlebrown" ]
- "blitter.com/go/hkexsh/hkexshd.runShellAs" -> "blitter.com/go/hkexsh/hkexshd.runShellAs$4" [ arrowhead="normalnoneodot" ]
+ "blitter.com/go/hkexsh/hkexshd.runShellAs$4" -> "(*blitter.com/go/hkexsh/hkexnet.Conn).DisableChaff" [ color="saddlebrown" ]
+ "blitter.com/go/hkexsh/hkexshd.runShellAs$4" -> "(*blitter.com/go/hkexsh/hkexnet.Conn).ShutdownChaff" [ color="saddlebrown" ]
+ "blitter.com/go/hkexsh/hkexshd.runShellAs" -> "blitter.com/go/hkexsh/hkexshd.runShellAs$4" [ arrowhead="normalnoneodiamond" ]
+ "blitter.com/go/hkexsh/hkexshd.runShellAs" -> "blitter.com/go/hkexsh/hkexshd.runShellAs$5" [ arrowhead="normalnoneodot" ]
"blitter.com/go/hkexsh/hkexshd.runShellAs" -> "(*blitter.com/go/hkexsh/hkexnet.Conn).SetStatus" [ color="saddlebrown" ]
"blitter.com/go/hkexsh/hkexshd.main$2" -> "blitter.com/go/hkexsh/hkexshd.runShellAs" [ ]
"blitter.com/go/hkexsh/hkexshd.main$2" -> "blitter.com/go/hkexsh/logger.LogErr" [ color="saddlebrown" ]
diff --git a/hkexshd/hkexshd-vis.gv.png b/hkexshd/hkexshd-vis.gv.png
index 9996caa..02d1833 100644
Binary files a/hkexshd/hkexshd-vis.gv.png and b/hkexshd/hkexshd-vis.gv.png differ
diff --git a/hkexshd/hkexshd-vis.gv.svg b/hkexshd/hkexshd-vis.gv.svg
deleted file mode 100644
index 381a2cc..0000000
--- a/hkexshd/hkexshd-vis.gv.svg
+++ /dev/null
@@ -1,767 +0,0 @@
-
-
-
-
-
diff --git a/hkexshd/hkexshd.go b/hkexshd/hkexshd.go
index 77748d3..a2be3be 100755
--- a/hkexshd/hkexshd.go
+++ b/hkexshd/hkexshd.go
@@ -267,14 +267,15 @@ func runShellAs(who, ttype string, cmd string, interactive bool, conn *hkexnet.C
return err, hkexnet.CSEPtyExecFail
}
// Make sure to close the pty at the end.
+ // #gv:s/label=\"runShellAs\$1\"/label=\"deferPtmxClose\"/
defer func() { _ = ptmx.Close() }() // Best effort.
log.Printf("[%s]\n", cmd)
if err != nil {
log.Printf("Command finished with error: %v", err)
} else {
-
// Watch for term resizes
+ // #gv:s/label=\"runShellAs\$2\"/label=\"termResizeWatcher\"/
go func() {
for sz := range conn.WinCh {
log.Printf("[Setting term size to: %v %v]\n", sz.Rows, sz.Cols)
@@ -284,6 +285,7 @@ func runShellAs(who, ttype string, cmd string, interactive bool, conn *hkexnet.C
}()
// Copy stdin to the pty.. (bgnd goroutine)
+ // #gv:s/label=\"runShellAs\$3\"/label=\"stdinToPtyWorker\"/
go func() {
_, e := io.Copy(ptmx, conn)
if e != nil {
@@ -296,8 +298,12 @@ func runShellAs(who, ttype string, cmd string, interactive bool, conn *hkexnet.C
if chaffing {
conn.EnableChaff()
}
- defer conn.DisableChaff()
- defer conn.ShutdownChaff()
+ // #gv:s/label=\"runShellAs\$4\"/label=\"deferChaffShutdown\"/
+ defer func() {
+ conn.DisableChaff()
+ conn.ShutdownChaff()
+ }()
+
// ..and the pty to stdout.
// This may take some time exceeding that of the
@@ -306,6 +312,7 @@ func runShellAs(who, ttype string, cmd string, interactive bool, conn *hkexnet.C
// to ensure all stdout data gets to the client before
// connection is closed.
wg.Add(1)
+ // #gv:s/label=\"runShellAs\$2\"/label=\"ptyToStdoutWorker\"/
go func() {
defer wg.Done()
_, e := io.Copy(conn, ptmx)