CAPS IPC started

Matt Dillon has placed inital IPC support, using a message structure that is described in the extended entry here, taken from his commit message:

“Initial CAPS IPC structural encoding and decoding support. Note that the kernel is uninvolved (other then in supplying the IPC mechanism). After careful consideration I decided that XML was just too much overkill but that a human-readable format is still desireable. The encoding format supports integers, strings, opaque data, arrays, and is extensible and structural.

An example encoding of the struct passwd record for user ‘nobody’:

Spasswd{F1D”nobody”,F2D”%2a”,F3Dfffe,F4Dfffe,F5D0,F6D””,F7D”Unprivileged%20user”,F8D”/nonexistent”,F9D”/sbin/nologin”,FaD0}

Class elements include (S)tructure, (F)ield, (D)ata, (A)rray. Data types are free-form numeric (stored as hex), with the source responsible for encoding negative numbers with a ‘-‘, and quoted opaque data (e.g. strings). Any class element may recurse using {}. Structures and Arrays always recurse. Unknown recursions are ignored by the decoder (for future backwards compatibility). Whitespace is allowed but most non-alpha-numeric characters must be %-hex-escaped.

The decoder understands simple integer types, arrays, buffers, embedded sub-structures, and string pointer structural elements. It does not (yet) understand multi-dimensional arrays, sparse element notation, or ** pointers.

This is a nice, compact encoding format that can be used for both packetized messages and persistently-connected streams. The initial commit only supports full-messages, however.”

One Reply to “CAPS IPC started”

Comments are closed.

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)

Mentions

  • passwd