From: Daniel Mack Date: Tue, 27 Jan 2015 16:49:35 +0000 (+0100) Subject: doc: more work on kdbus.endpoint.xml X-Git-Tag: upstream/0.20150129.081441utc~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=46a5e990970a29d7ea6819ab26712eefe7ab8b84;p=platform%2Fcore%2Fsystem%2Fkdbus-bus.git doc: more work on kdbus.endpoint.xml Signed-off-by: Daniel Mack --- diff --git a/doc/kdbus.endpoint.xml b/doc/kdbus.endpoint.xml index f48bccb..7007ae4 100644 --- a/doc/kdbus.endpoint.xml +++ b/doc/kdbus.endpoint.xml @@ -68,7 +68,13 @@ Creating custom endpoints To create a new endpoint, the KDBUS_CMD_ENDPOINT_MAKE - command is used. It takes a struct kdbus_cmd_make argument. + command is used. Along with the endpoint's name, which will be used to + expose the endpoint in the + kdbus.fs7, + the command also optionally takes items to set up the endpoint's + kdbus.policy7. + KDBUS_CMD_ENDPOINT_MAKE takes a + struct kdbus_cmd_make argument. struct kdbus_cmd_make { @@ -140,6 +146,18 @@ struct kdbus_cmd_make { Contains a string to identify the endpoint name. + + + KDBUS_ITEM_NAME + KDBUS_ITEM_POLICY_ACCESS + + + These items are used to set the policy attached to the + endpoint. For more details on bus and endpoint policies, see + kdbus.policy7. + + + Unrecognized items are rejected, and the ioctl will fail with @@ -153,8 +171,86 @@ struct kdbus_cmd_make { Updating endpoints - TODO!! Document KDBUS_CMD_ENPOINT_UPDATE + To update an existing endpoint, the + KDBUS_CMD_ENDPOINT_UPDATE command is used on the file + descriptor that was used to create the update, using + KDBUS_CMD_ENDPOINT_MAKE. The only relevant detail of + the endpoint that can be updated is the policy. When the command is + employed, the policy of the endpoint is replaced + atomically with the new set of rules. + The command takes a struct kdbus_cmd_update argument. + +struct kdbus_cmd_make { + __u64 size; + __u64 flags; + __u64 kernel_flags; + __u64 return_flags; + struct kdbus_item items[0]; +}; + + + The fields in this struct are described below. + + + + size + + The overall size of the struct, including its items. + + + + + flags + + Unused for this command. + + + + + kernel_flags + + Valid flags for this command, returned by the kernel upon each call. + + + + + return_flags + + Flags returned by the kernel. Currently unused and always set to + zero by the kernel. + + + + + items + + + The following items are expected for + KDBUS_CMD_ENDPOINT_UPDATE. + + + + KDBUS_ITEM_NAME + KDBUS_ITEM_POLICY_ACCESS + + + These items are used to set the policy attached to the + endpoint. For more details on bus and endpoint policies, see + kdbus.policy7. + Existing policy is atomically replaced with the new rules + provided. + + + + + + Unrecognized items are rejected, and the ioctl will fail with + -EINVAL. + + + +