From 7ce7502e1ae23766ba40105327de787c2d1cef9d Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Fri, 25 Feb 2005 22:03:30 +0000 Subject: 2005-02-25 Havoc Pennington * doc/dbus-specification.xml: document the GUID thing * dbus/dbus-server.c (_dbus_server_init_base): initialize a globally unique ID for the server, and put a "guid=hexencoded" field in the address * dbus/dbus-bus.c: fix missing #include of dbus-threads-internal.h * dbus/dbus-message.c: ditto * dbus/dbus-dataslot.c: ditto * dbus/dbus-list.c: ditto * dbus/dbus-internals.h: wait, just include dbus-threads-internal.h here * dbus/dbus-string.c (_dbus_string_copy_to_buffer): move back for use in main library * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes_buffer): new function --- doc/dbus-specification.xml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'doc') diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml index 1d47733c..ff625447 100644 --- a/doc/dbus-specification.xml +++ b/doc/dbus-specification.xml @@ -2165,6 +2165,28 @@ The set of optionally-escaped bytes is intended to preserve address readability and convenience. + + + A server may specify a key-value pair with the key guid + and the value a hex-encoded 16-byte sequence. This globally unique ID must + be created by filling the first 4 bytes with a 32-bit UNIX time since the + epoch, and the remaining 12 bytes with random bytes. If present, the GUID + may be used to distinguish one server from another. A server should use a + different GUID for each address it listens on. For example, if a message + bus daemon offers both UNIX domain socket and TCP connections, but treats + clients the same regardless of how they connect, those two connections are + equivalent post-connection but should have distinct GUIDs to distinguish + the kinds of connection. + + + + The intent of the GUID feature is to allow a client to avoid opening + multiple identical connections to the same server, by allowing the client + to check whether an address corresponds to an already-existing connection. + Comparing two addresses is insufficient, because addresses can be recycled + by distinct servers. + + [FIXME clarify if attempting to connect to each is a requirement or just a suggestion] -- cgit