1
1
# ` unix `
2
2
3
- This protocol encodes a Unix domain socket path to a resource. In the string
3
+ This protocol encodes a UNIX- domain socket path to a resource. In the string
4
4
representation, the path is encoded in a way consistent with a single URI Path
5
5
segment per [ RFC 3986 Section 3.3] ( https://datatracker.ietf.org/doc/html/rfc3986#autoid-23 ) .
6
6
@@ -12,7 +12,7 @@ representation to avoid ambiguities over which characters were escaped.
12
12
13
13
## Examples
14
14
15
- The following is a table of examples converting some common Unix paths to their
15
+ The following is a table of examples converting some common UNIX paths to their
16
16
Multiaddr string form.
17
17
18
18
| Unix Path | Multiaddr string form |
@@ -33,5 +33,29 @@ Multiaddr string form.
33
33
appear anywhere, for example in the case where we route through some sort of
34
34
proxy server or SSH tunnel.
35
35
36
- The absence of a ` / ` character at the start of the decoded address indicates a
37
- relative path, otherwise the path is absolute.
36
+ # ` unix-abstract `
37
+
38
+ This protocol encodes a Linux UNIX-domain abstract socket address,
39
+ which are distinguished by their first byte being 0.
40
+ It is encoded the same way as ` unix ` ;
41
+ the marker byte is not part of the path.
42
+
43
+ ## Examples
44
+
45
+ In the following table, the address column follows the userspace convention
46
+ of 0 bytes in the address being rendered as an ` @ ` for abstract addresses
47
+ for display only.
48
+
49
+ | Rendered Address | multiaddr string form |
50
+ | -------------------------------------------- | ------------------------------------------------------------------ |
51
+ | @f87a1c847a4ecaf3/bus /systemd/bus-api-system | ` /unix-abstract/f87a1c847a4ecaf3%2Fbus%2Fsystemd%2Fbus-api-system ` |
52
+ | @/run/fsid.sock@@@@@@@@@@@@@@@@@@@@@@@@@@... | ` /unix-abstract/%2Frun%2Ffsid.sock%00%00%00%00%00%00%00%00%00... ` |
53
+
54
+ # ` stream ` , ` seqpacket ` , ` dgram `
55
+
56
+ These correspond to the * type* of UNIX-domain socket:
57
+ ` SOCK_STREAM ` , ` SOCK_SEQPACKET ` , ` SOCK_DGRAM ` .
58
+
59
+ Previous versions of this specification did not contain these types;
60
+ for compatibility, their absence should not indicate an error,
61
+ if a default makes sense when decoding.
0 commit comments