smfi_insheader

Synopsis


int smfi_insheader(
SMFICTX *ctx,
int hdridx,
char *headerf,
char *headerv
);

Prepend a header to the current message.

Description

Called When Called only from xxfi_eom.
Effects Prepends a header to the current message.

Arguments

Argument Description
ctx Opaque context structure.
hdridx The location in the internal header list where this header should be inserted; 0 makes it the topmost header, etc.
headerf The header name, a non-NULL, null-terminated string.
headerv The header value to be added, a non-NULL, null-terminated string. This may be the empty string.

Return Values

smfi_insheader returns MI_FAILURE if:

Otherwise, it returns MI_SUCCESS.

Notes

Example


int ret;
SMFICTX *ctx;

...

ret = smfi_insheader(ctx, 0, "First", "See me?");