Pathname open options

PPS objects support an extended syntax on the pathnames used to open them.

Open options are added as suffixes to the pathname, following a question mark (“?”). That is, the PPS service uses any data that follows a question mark in a pathname to apply open options on the file descriptor used to access the object. Multiple options are separated by commas. For example:

Note: The syntax used for specifying PPS pathname open query options will be easily recognizable to anyone familiar with the getsubopt() library routine.

Supported pathname open options include:

The maximum delta size, in KB, to keep before flushing this OCB (Open Control Block). If you don't specify this option, or you specify a value of 0, then the default backlog value of 256 KB is used; you can override this by specifying the -d option when you start pps. The flow and backlog options are mutually exclusive.

If the total accumulated delta is more than num_kb, then a purge notification is generated, in the form:

Output the credentials for this object. You can use this option only in conjunction with the flow or server option. When a new client connects to a server or flow object, the connect notification also contains the client credentials, in the form:
Designate the publisher as critical to the object. See The critical option.”
Set the crypto domain for this object. In order to use this option, you must start the pps service with a -p option that specifies a location of persistent storage on a mounted Power-Safe ( partition that contains encryption domains.

Assigning a PPS object to a domain means that it will be put into the specified encryption domain when it's saved in persistent storage. For example, this code:

open(“/pps/test_obj?crypt=10”, O_CREAT, 0666)

assigns the test_obj PPS object to encryption domain 10 when it's saved in persistent storage.

If you open multiple file descriptors for the same PPS object with different encryption domains, the last one is used. In the following example, the domain used is 11:

fd1 = open(“/pps/test_obj”, O_RDWR|O_CREAT, 0666);
fd2 = open(“/pps/test_obj?crypt=10”, O_RDWR, 0666);
fd3 = open(“/pps/test_obj?crypt=11”, O_RDWR, 0666);
Open the object in delta mode. See Subscription modes.”
Return the names of all objects (files) in the directory—valid only on the special .all object in a directory.

If any objects in the directory are created or deleted, these changes are indicated by a “+” (created) or a “-” (deleted) sign prefixed to their names. This behavior allows you to effectively perform a readdir() within PPS and to monitor filesystem changes without having to also monitor attribute changes.

See Subscribing to multiple objects.”

f=filter ...
Place a filter on notifications based on changes to the listed attributes. See Filtering notifications.”
Treat the object as a server object, with purge and overflow notifications. The optional num_kb is the maximum backlog size in kilobytes. If you don't specify num_kb, or you specify a value of 0, the default backlog size of 256 KB is used; you can override this by specifying the -d option when you start pps. The format of the overflow notification is:

The flow and backlog options are mutually exclusive. You can use the hiwater option with flow to generate overflow notifications.

See Server Objects.”

Specify the flow high water mark as a percentage of the client backlog. If the backlog exceeds this percentage, overflow notifications are generated. Overflow notifications are generated for each delta buffered while the total accumulated delta size is above hw_percent of the specified backlog. The format of the overflow notification is:

You can specify a value in the range from 1 to 99 percent; if you don't specify this option, the default of 100 percent is used. You can use the hiwater option only in conjunction with the flow option.

See Server Objects.”

Make the object nonpersistent. When the system restarts, the object won't exist. The default setting is for all objects to be persistent and reloaded on restart. See Object and attribute qualifiers.”
Associate the opened file descriptor with the notification group specified by id. This id is returned on the first read from an open() on the .notify file in the root of the PPS mountpoint. The value is an arbitrary string that you want to associate with the group.

Reads of the .notify file return the string id:value whenever data is available on the file descriptor opened with the notify= query.

See Subscribing to multiple objects.”

Update an _opens::rd,wr attribute when the open count changes. This option lets you receive notifications about the number of file descriptors opened for an object for writing and reading. A notification is generated in following format:

Notifications are sent each time that the number of readers or writers changes. These numbers increase each time that open() is called, and decrease when close() is called. O_RDONLY increases the number of readers, O_WRONLY the number of writers, and O_RDWR the number of readers and writers. For example, if you use the following code to create a PPS object:

fd = open(“/pps/test_obj?opens”, O_CREAT|O_RDWR, 0666);

then after reading from this file descriptor, the following notification is received:


If you open the same PPS object with O_WRONLY, then the following notification is generated:

Reflect attribute changes made on this object back to it.
Designate the publisher as a “server” for the object. See Server Objects for more information.
Set the verbosity level for this object. If you specify this option without an argument, the level is 9 (the highest).
Open the file with the O_NONBLOCK flag cleared so that read() calls wait until the object changes or a delta appears. See the Subscribing chapter for more information.