SCM_CREDS
.
Which forces the generated code to include "cred.h" (which must be presented from the explode repository as well. In addition the code must be linked with (at least) "credsend.c" exploded from "cred.c".#define SCM_CREDS 1
Returns a socket connected to the given wrapper socket. If SCM_CREDS is defined when compiled the local credentials are sent to the wrapper.
Once PTBClientPort is successful, uOurCount
holds the
number of tokens the enclosing diversion holds, and
uOurSize
the total
space required to hold the list of token names (including any '\000'
string terminators).
Download uNeed
token names from the master instance with
the 'G' command.
Fill ppuList
with the vector of tokens we leased from
the whole list, which is in malloc
'd space.
Release the token allocated by PTBReadTokenList
with
the 'D' command.
The master diversion might give them to some other client process,
so don't lie to it. Subsequent called to PTBReadTokenList
might allocate a wholely different list, or fail.
Send the master a command that must return an ASCII encoded base-10
interger; we return the interger, or -1 for an error with errno
set. The resulting integer cannot have more than 63 digits in it.
The return string may start with "-No" to force an errno of EINVAL
.
An explicit -1 sets errno
to "Protocol not supported" (ENOTSUP
,
EPROTONOSUPPORT
, or ENOPROTOOPT
).
Returns non-zero if the Path
is a socket, which might
represent a master diversion.
Request the source of the token stream with the 'U' command.
If ppcMeta
is not (char **)0
, we also
request the meta-information from the token stream (via 'C' command).
We return the first character of the source; usually a '+' for
success or a '-' for failure or an unknown source.
Build the default token list that all token brokers use: the list of counting numbers from 1 to N. This is returned in the same format the list of tokens from a master would be returned (0 is a valid count which return the empty list).
Send any persistant diversion the 'Q' command. If the reply is a negative ("-No\n") return 0, otherwise 1.
Use the 'M' command to ask the master for her process id. Return 0 for no master as well as any non-numeric reply.
Nothing.
$Id: ptbc.html,v 1.9 2012/03/29 21:14:06 ksb Exp $