aboutgitcodelistschat:MatrixIRC
path: root/demo
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2023-06-04 08:25:12 +0200
committerStefano Brivio <sbrivio@redhat.com>2023-06-04 08:29:25 +0200
commit15c01cbd4b1fabe929cb93226f6295e88b0c04c4 (patch)
treef4784fc1328763fbbf6b6d6f26da8c9b82ddaa84 /demo
parent37e94bd191701a08e0081b2027cfbede6d76a21c (diff)
downloadseitan-15c01cbd4b1fabe929cb93226f6295e88b0c04c4.tar
seitan-15c01cbd4b1fabe929cb93226f6295e88b0c04c4.tar.gz
seitan-15c01cbd4b1fabe929cb93226f6295e88b0c04c4.tar.bz2
seitan-15c01cbd4b1fabe929cb93226f6295e88b0c04c4.tar.lz
seitan-15c01cbd4b1fabe929cb93226f6295e88b0c04c4.tar.xz
seitan-15c01cbd4b1fabe929cb93226f6295e88b0c04c4.tar.zst
seitan-15c01cbd4b1fabe929cb93226f6295e88b0c04c4.zip
demo: Start with a connect() example
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'demo')
-rw-r--r--demo/connect.hjson13
-rw-r--r--demo/connect.hjson.license2
2 files changed, 15 insertions, 0 deletions
diff --git a/demo/connect.hjson b/demo/connect.hjson
new file mode 100644
index 0000000..91d5af1
--- /dev/null
+++ b/demo/connect.hjson
@@ -0,0 +1,13 @@
+[
+ {
+ "match": [
+ { "connect": { "addr": { "family": "unix", "path": "/var/run/pr-helper.sock" }, "fd": { "tag": "fd" } } }
+ ],
+ "call": [
+ { "socket": { "family": "unix", "type": "stream", "flags": 0, "protocol": 0 }, "ret": "new_fd" },
+ { "connect": { "fd": { "tag": { "get": "new_fd" } }, "addr": { "family": "unix", "path": "/tmp/demo.sock" } }, "ret": "y" }
+ ],
+ "fd": { "src": { "tag": "fd" }, "new": { "tag": "new_fd" }, "close_on_exec": false },
+ "return": 0
+ }
+]
diff --git a/demo/connect.hjson.license b/demo/connect.hjson.license
new file mode 100644
index 0000000..d2abc50
--- /dev/null
+++ b/demo/connect.hjson.license
@@ -0,0 +1,2 @@
+SPDX-FileCopyrightText: 2023 Red Hat GmbH <sbrivio@redhat.com>
+SPDX-License-Identifier: GPL-2.0-or-later