Now this hangs indefinitely because we don't send a packet. That
comes next.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
exec 3<&-
exec cat
"
+ close $fakeuh
set cfg "
netlink userv-ipif {
name \"netlink\";
}
proc spawn-secnet {which} {
+ global netlinkfh
upvar #0 pids($which) pid
set cf test/$which.conf
set ch [open $cf w]
if {!$pid} {
execl ./secnet $argl
}
+ puts -nonewline $netlinkfh($which.t) "\xc0"
+}
+
+proc netlink-readable {which} {
+ global ok
+ upvar #0 netlinkfh($which.r) fh
+ read $fh; # empty the buffer
+ switch -exact $which {
+ outside {
+ puts OK
+ set ok 1; # what a bodge
+ return
+ }
+ inside {
+ error "inside rx'd!"
+ }
+ }
}
spawn-secnet inside
spawn-secnet outside
+
+vwait ok