SecBuffer

The SecBuffer structure describes a buffer that is allocated by a transport application to pass to a security package.

typedef struct _SecBuffer {
    ULONG        cbBuffer;
    ULONG        BufferType;
    PVOID        pvBuffer;
} SecBuffer, *PSecBuffer;
 

Members

cbBuffer
Specifies the size, in bytes, of the buffer pointed to by the pvBuffer member.
BufferType
A set of bit flags that indicate the type of buffer. BufferType must be one of the following flags.
Flag Meaning
SECBUFFER_EMPTY This is a placeholder in the buffer array. The caller can supply several such entries in the array, and the security package can return information in them. For more information, see Context Semantics.
SECBUFFER_DATA Used for common data. The security package can read this data, and write it, for example, to encrypt some or all of it.
SECBUFFER_TOKEN This buffer is used to indicate the security token portion of the message. This is "read-only" for input parameters, or "read/write" for output parameters.
SECBUFFER_PKG_PARAMS These are transport-to-package–specific parameters. For example, the Netware redirector may supply the server object identifier, while DCE RPC can supply an association UUID, and so on.
SECBUFFER_MISSING The security package uses this value to indicate the number of missing bytes in a particular message. The pvBuffer member is ignored in this type.
SECBUFFER_EXTRA The security package uses this value to indicate the number of extra, or unprocessed bytes in a message.
SECBUFFER_STREAM_TRAILER Indicates a protocol-specific trailer for a particular record. Not usually of interest to callers.
SECBUFFER_STREAM_HEADER Indicates a protocol-specific header for a particular record. Not usually of interest to callers.

In addition, BufferType can combine the following flag with any of the flags in the preceding table.
Flag Meaning
SECBUFFER_READONLY The buffer is read-only. This flag is intended for sending header information to the security package for checksumming or the like. The package can read this buffer, but cannot modify it.

pvBuffer
Pointer to a buffer.

See Also

SecBufferDesc