Pure X.400 API

Description of the function calls for the X.400 object access interface. More...

Macros

#define X400DLGetStrParam   X400DLExpHistGetStrParam
 

Functions

X400COMMON_CDECL int X400Initialize (char *myname)
 Initialize X.400 API. More...
 
X400COMMON_CDECL int X400InitializeLogging (const char *myname, const char *xmlfile)
 Initialize X.400 API logging. If just the name of the logging configuration file is provided, it will be searched for first in $ETCDIR and then in $SHAREDIR. More...
 
X400COMMON_CDECL int X400MsgNew (int type, struct X400Message **mpp)
 Creates new message. More...
 
X400COMMON_CDECL int X400MsgCountRecip (struct X400Message *mp, int recipient_type, int *number)
 Returns count of addresses of given type in message object. More...
 
X400COMMON_CDECL int X400MsgFree (struct X400Message *mp)
 Frees a message. More...
 
X400COMMON_CDECL int X400MsgAddAttachment (struct X400Message *mp, int type, const char *string, size_t length)
 Add an attachment to the message. More...
 
X400COMMON_CDECL int X400MsgAddBodypart (struct X400Message *mp, struct X400Bodypart *bp)
 Add a body part object to a message. More...
 
X400COMMON_CDECL int X400MsgAddMessageBody (struct X400Message *mp, struct X400Message *mbp)
 
X400COMMON_CDECL int X400MsgAddMessageBodyWType (struct X400Message *mp, struct X400Message *mbp, int type)
 Add a message body part object to a message. More...
 
X400COMMON_CDECL int X400MsgAddIntParam (struct X400Message *mp, int paramtype, int value)
 Add integer-valued parameter to the message. More...
 
X400COMMON_CDECL int X400MsgAddStrParam (struct X400Message *mp, int paramtype, const char *value, size_t length)
 Add string-valued parameter to the message. More...
 
X400COMMON_CDECL int X400MsgAddRecip (struct X400Message *mp, int reciptype, struct X400Recipient *recip)
 Add a recipient object to the message. More...
 
X400COMMON_CDECL int X400MsgGetIntParam (struct X400Message *mp, int paramtype, int *valuep)
 Return a integer-valued parameter from the message object. More...
 
X400COMMON_CDECL int X400MsgGetStrParam (struct X400Message *mp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
 Return a string-valued parameter from the message object. More...
 
X400COMMON_CDECL int X400MsgGetAttachment (struct X400Message *mp, int number, int *typep, char *buffer, size_t buflen, size_t *lengthp)
 Return data from a simple attachment. More...
 
X400COMMON_CDECL int X400MsgGetBodypart (struct X400Message *mp, int number, int *typep, struct X400Bodypart **bpp)
 Return a pointer to a body part object. More...
 
X400COMMON_CDECL int X400MsgGetMessageBody (struct X400Message *mp, int number, struct X400Message **mbpp)
 Return a pointer to a body part object. More...
 
X400COMMON_CDECL int X400MsgGetRecip (struct X400Message *mp, int recip_type, int number, struct X400Recipient **rpp)
 Get recipient object from message. More...
 
X400COMMON_CDECL int X400MsgGetCert (struct X400Message *mp, int certtype, struct X400Certificate **certp)
 Get certificate object from message This returns a certificate which was used to sign an object in the message. The attribute type indicates which object type. More...
 
X400COMMON_CDECL int X400RecipNew (int type, struct X400Recipient **rpp)
 Create a new recipient object. More...
 
X400COMMON_CDECL int X400RecipFree (struct X400Recipient *rpp)
 Free a recipient object. More...
 
X400COMMON_CDECL int X400RecipAddIntParam (struct X400Recipient *rp, int paramtype, int value)
 Add integer-valued parameter to the recipient. More...
 
X400COMMON_CDECL int X400RecipAddStrParam (struct X400Recipient *rp, int paramtype, const char *value, size_t length)
 Add string-valued parameter to the recipient. More...
 
X400COMMON_CDECL int X400RecipGetStrParam (struct X400Recipient *rp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
 Return a string-valued parameter from the recipient object. More...
 
X400COMMON_CDECL int X400RecipGetIntParam (struct X400Recipient *rp, int paramtype, int *valp)
 Return a integer-valued parameter from the recipient object. More...
 
X400COMMON_CDECL int X400RecipGetCert (struct X400Recipient *rp, int certtype, struct X400Certificate **certp)
 Get certificate object from recipient This returns a certificate which was used to sign an object in the recipient. The attribute type indicates which object type. More...
 
X400COMMON_CDECL int X400BodypartNew (int type, struct X400Bodypart **bpp)
 Create a new body part object. More...
 
X400COMMON_CDECL int X400BodypartFree (struct X400Bodypart *bpp)
 Free a body part object. More...
 
X400COMMON_CDECL int X400BodypartAddIntParam (struct X400Bodypart *bp, int paramtype, int value)
 Add integer-valued parameter to the body part. More...
 
X400COMMON_CDECL int X400BodypartAddStrParam (struct X400Bodypart *bp, int paramtype, const char *value, size_t length)
 Add string-valued parameter to the body part. More...
 
X400COMMON_CDECL int X400BodypartGetStrParam (struct X400Bodypart *bp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
 Return a string-valued parameter from the body part object. More...
 
X400COMMON_CDECL int X400BodypartGetIntParam (struct X400Bodypart *bp, int paramtype, int *valp)
 Return a integer-valued parameter from the body part object. More...
 
X400COMMON_CDECL int X400DefaultsNew (struct x400_attribute **ap)
 Return a new defaults object. More...
 
X400COMMON_CDECL int X400DefaultsFree (struct x400_attribute *ap)
 Free a defaults object. More...
 
X400COMMON_CDECL int X400SetStrDefault (struct x400_attribute *ap, int paramtype, const char *value, size_t length)
 Set a string value in a defaults object. More...
 
X400COMMON_CDECL int X400SetIntDefault (struct x400_attribute *ap, int paramtype, int value)
 Set an integer value in a defaults object. More...
 
const X400COMMON_CDECL char * X400Error (int error)
 Return string for error code. More...
 
X400COMMON_CDECL int X400DLExpHistGet (struct X400Message *mp, int entry, struct X400DLExpHist **hist)
 Create a new DL Expansion History object from the message object. More...
 
X400COMMON_CDECL int X400DLExpHistDelete (struct X400DLExpHist *hist)
 Delete the DL Expansion History object. More...
 
X400COMMON_CDECL int X400DLExpHistGetStrParam (struct X400DLExpHist *hist, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
 Return a string parameter from the DL Expansion History object. More...
 
X400COMMON_CDECL int X400DLExpHistNew (struct X400DLExpHist **histp)
 Create a new X400DLExpHist object. More...
 
X400COMMON_CDECL int X400MsgAddDLExpHist (struct X400Message *mp, struct X400DLExpHist *histp)
 Associates a X400DLExpHist object with a X400Message object. More...
 
X400COMMON_CDECL int X400DLExpHistAddStrParam (struct X400DLExpHist *hist, int paramtype, const char *value, size_t length)
 Add string-valued parameter to the X400DLExpHist object. More...
 
X400COMMON_CDECL struct X400DLExpHist * X400DLExpHistDeepCopy (struct X400DLExpHist *original)
 Copy an existing DL Expansion History object. More...
 
X400COMMON_CDECL int X400TraceInfoGet (struct X400Message *mp, int entry, struct X400TraceInfo **info, int trace_info_type)
 Get the Trace information object from a message. More...
 
X400COMMON_CDECL int X400TraceInfoGetStrParam (struct X400TraceInfo *info, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
 Get string parameter from Trace Information object. More...
 
X400COMMON_CDECL int X400TraceInfoGetIntParam (struct X400TraceInfo *info, int paramtype, int *valuep)
 Get int parameter from Trace Information object. More...
 
X400COMMON_CDECL int X400TraceInfoNew (struct X400Message *msg, struct X400TraceInfo **info, int type)
 Create a new Trace information object. More...
 
X400COMMON_CDECL struct X400TraceInfo * X400TraceInfoDeepCopy (struct X400Message *mp, struct X400TraceInfo *original, int type)
 Copy an existing Trace information object. More...
 
X400COMMON_CDECL int X400MsgAddTraceInfo (struct X400Message *mp, struct X400TraceInfo *info, int type)
 Create a new Trace information object. More...
 
X400COMMON_CDECL int X400TraceInfoAddStrParam (struct X400TraceInfo *info, int paramtype, const char *value, size_t length)
 Add string-valued parameter to the X400TraceInfo object. More...
 
X400COMMON_CDECL int X400TraceInfoAddIntParam (struct X400TraceInfo *info, int paramtype, int value)
 Set an integer value in a Trace Info object. More...
 
X400COMMON_CDECL int X400RediHistAddStrParam (struct X400RediHist *hist, int paramtype, const char *value, size_t length)
 Add string-valued parameter to the X400RediHist object. More...
 
X400COMMON_CDECL int X400RediHistAddIntParam (struct X400RediHist *hist, int paramtype, int value)
 Set an integer value in a Redirection History object. More...
 
X400COMMON_CDECL int X400RediHistGetStrParam (struct X400RediHist *hist, int paramtype, char *value, size_t length, size_t *lengthp)
 Get string-valued parameter from the X400RediHist object. More...
 
X400COMMON_CDECL int X400RediHistGetIntParam (struct X400RediHist *info, int paramtype, int *valuep)
 Get int parameter from Redirection History object. More...
 
X400COMMON_CDECL int X400RediHistGet (struct X400Recipient *recip, int entry, struct X400RediHist **hist)
 Get the Redirection History object from a recipient. More...
 
X400COMMON_CDECL int X400RediHistNew (struct X400Recipient *recip, struct X400RediHist **hist)
 Create a new Redirection History object. More...
 
X400COMMON_CDECL int X400RediHistGetEnv (struct X400Message *msg, int entry, struct X400RediHist **hist)
 Get the Redirection History object from a message envelope this is represented by 8.3.1.2.1.5 in X.411. More...
 
X400COMMON_CDECL int X400RediHistNewEnv (struct X400Message *msg, struct X400RediHist **hist)
 Create a new Redirection History object for a message envelope this is represented by 8.3.1.2.1.5 in X.411. More...
 
X400COMMON_CDECL struct X400RediHist * X400RediHistDeepCopyEnv (struct X400Message *msg, struct X400RediHist *original)
 Copy an existing Redirection History object into a message. More...
 
X400COMMON_CDECL struct X400RediHist * X400RediHistDeepCopy (struct X400Recipient *recip, struct X400RediHist *original)
 Copy an existing Redirection History object into a recipient. More...
 
const X400COMMON_CDECL char * X400RediReason (int redirection_reason)
 Return a human readable string based on a redirection reason. More...
 
X400COMMON_CDECL int X400InternalTraceInfoGet (struct X400Message *mp, int entry, struct X400InternalTraceInfo **info)
 Get the Trace information object from a message. More...
 
X400COMMON_CDECL struct X400InternalTraceInfo * X400InternalTraceInfoDeepCopy (struct X400Message *mp, struct X400InternalTraceInfo *original)
 Copy an existing Internal Trace information object. More...
 
X400COMMON_CDECL int X400InternalTraceInfoNew (struct X400Message *msg, struct X400InternalTraceInfo **info)
 Create a new Trace information object. More...
 
X400COMMON_CDECL int X400MsgAddInternalTraceInfo (struct X400Message *mp, struct X400InternalTraceInfo *info)
 Create a new Trace information object. More...
 
X400COMMON_CDECL int X400InternalTraceInfoGetStrParam (struct X400InternalTraceInfo *info, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
 Get string parameter from Internal Trace Information object. More...
 
X400COMMON_CDECL int X400InternalTraceInfoGetIntParam (struct X400InternalTraceInfo *info, int paramtype, int *valuep)
 Get int parameter from Internal Trace Information object. More...
 
X400COMMON_CDECL int X400InternalTraceInfoAddStrParam (struct X400InternalTraceInfo *info, int paramtype, const char *value, size_t length)
 Add string-valued parameter to the Internal Trace info object. More...
 
X400COMMON_CDECL int X400InternalTraceInfoAddIntParam (struct X400InternalTraceInfo *info, int paramtype, int value)
 Set an integer value in an Internal Trace Info object. More...
 
X400COMMON_CDECL int X400ALIGet (struct X400Message *mp, int entry, struct X400ALI **ali)
 Get the Address List Indicator information object from a message. More...
 
X400COMMON_CDECL int X400ALINew (struct X400Message *msg, struct X400ALI **ali)
 Create an Address List Indicator object. More...
 
X400COMMON_CDECL struct X400ALI * X400ALIDeepCopy (struct X400Message *mp, struct X400ALI *ali)
 Copy an Address List Indicator object. More...
 
X400COMMON_CDECL int X400ALIGetStrParam (struct X400ALI *ALI, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
 Get string parameter from Address List Indicator object. More...
 
X400COMMON_CDECL int X400ALIGetIntParam (struct X400ALI *ALI, int paramtype, int *valuep)
 Get int parameter from Address List Indicator object. More...
 
X400COMMON_CDECL int X400ALIAddStrParam (struct X400ALI *info, int paramtype, const char *value, size_t length)
 Add string-valued parameter to the ALI info object. More...
 
X400COMMON_CDECL int X400ALIAddIntParam (struct X400ALI *info, int paramtype, int value)
 Set an integer value in an Address List Indicator object. More...
 
X400COMMON_CDECL int X400PSSGet (struct X400Message *mp, int type, int entry, struct X400PSS **pss)
 Get the Printable String Sequence object from a message. More...
 
X400COMMON_CDECL struct X400PSS * X400PSSDeepCopy (struct X400Message *mp, struct X400PSS *pss, int type)
 Copy a Printable String Sequence object. More...
 
X400COMMON_CDECL int X400PSSNew (struct X400Message *msg, struct X400PSS **pss, int type)
 Create a Printable String Sequence object. More...
 
X400COMMON_CDECL int X400PSSGetStrParam (struct X400PSS *pss, char *buffer, size_t buflen, size_t *paramlenp)
 Get string parameter from Printable String Sequence object. More...
 
X400COMMON_CDECL int X400PSSAddStrParam (struct X400PSS *pss, const char *value, size_t length)
 Add string-valued parameter to the PSS info object. More...
 
X400COMMON_CDECL int X400DistFieldGet (struct X400Message *mp, int entry, struct X400DistField **distfield)
 Get the Distribution Code extension Field object from a message. More...
 
X400COMMON_CDECL struct X400DistField * X400DistFieldDeepCopy (struct X400Message *mp, struct X400DistField *original)
 Copy a P772 Distribution Code extension Field object. More...
 
X400COMMON_CDECL int X400DistFieldNew (struct X400Message *msg, struct X400DistField **distfield)
 Create a P772 Distribution Code extension Field object. More...
 
X400COMMON_CDECL int X400DistFieldGetStrParam (struct X400DistField *distfield, int type, char *buffer, size_t buflen, size_t *paramlenp)
 Get string parameter from Distribution Code extension Field object. More...
 
X400COMMON_CDECL int X400DistFieldAddStrParam (struct X400DistField *distfield, int type, const char *value, size_t length)
 Add string-valued parameter to the DistField info object. More...
 
X400COMMON_CDECL int X400OtherRecipGet (struct X400Message *mp, int entry, struct X400OtherRecip **otherrecip)
 Get a new P772 Other Recipient object for a message object. More...
 
X400COMMON_CDECL struct X400OtherRecip * X400OtherRecipDeepCopy (struct X400Message *mp, struct X400OtherRecip *original)
 Copy a P772 Other Recipient object. More...
 
X400COMMON_CDECL int X400OtherRecipNew (struct X400Message *mp, struct X400OtherRecip **otherrecip)
 Create a new P772 Other Recipient object for a message object. More...
 
X400COMMON_CDECL int X400OtherRecipGetStrParam (struct X400OtherRecip *otherrecip, char *buffer, size_t buflen, size_t *paramlenp)
 Get string parameter from Other Recipient object. More...
 
X400COMMON_CDECL int X400OtherRecipAddStrParam (struct X400OtherRecip *otherrecip, const char *value, size_t length)
 Add string-valued parameter to the Other Recipient Indicator object. More...
 
X400COMMON_CDECL int X400OtherRecipAddIntParam (struct X400OtherRecip *otherrecip, int value)
 Add integer parameter to the Other Recipient Indicator object. More...
 
X400COMMON_CDECL int X400OtherRecipGetIntParam (struct X400OtherRecip *otherrecip, int *value)
 Get integer parameter from the Other Recipient Indicator object. More...
 
X400COMMON_CDECL int X400ACP127RespGet (struct X400Message *mp, struct X400ACP127Resp **resp)
 Get the ACP127 Notification Response object from a message. More...
 
X400COMMON_CDECL struct X400ACP127Resp * X400ACP127RespDeepCopy (struct X400Message *mp, struct X400ACP127Resp *original)
 Copy an ACP127 Notification Response object. More...
 
X400COMMON_CDECL int X400ACP127RespNew (struct X400Message *mp, struct X400ACP127Resp **resp)
 Create an ACP127 Notification Response object. More...
 
X400COMMON_CDECL int X400ACP127RespGetStrParam (struct X400ACP127Resp *resp, int type, char *buffer, size_t buflen, size_t *paramlenp)
 Get string parameter from ACP127 Notification Response object. More...
 
X400COMMON_CDECL int X400ACP127RespAddStrParam (struct X400ACP127Resp *resp, int type, const char *value, size_t length)
 Add string-valued parameter to the ACP127 Notification Response object. More...
 
X400COMMON_CDECL int X400ACP127RespAddIntParam (struct X400ACP127Resp *resp, int value)
 Add integer parameter to the ACP127 Notification Response object. More...
 
X400COMMON_CDECL int X400ACP127RespGetIntParam (struct X400ACP127Resp *resp, int *value)
 Get integer parameter from the ACP127 Notification Response object. More...
 
X400COMMON_CDECL int X400ACP127RespNewALI (struct X400ACP127Resp *resp, struct X400ALI **ali)
 Create new Address List Indicator object associated with the X400ACP127 Resp. More...
 
X400COMMON_CDECL int X400ACP127RespGetALI (struct X400ACP127Resp *resp, struct X400ALI **ali, int entry)
 Get an Address List Indicator object associated with the X400ACP127 object. More...
 
X400COMMON_CDECL int X400ORandDLAddStrParam (struct X400ORandDL *or_and_dl, int type, const char *value, size_t length)
 Add string parameter for a Originator and DL Expansion History object. More...
 
X400COMMON_CDECL struct X400ORandDL * X400ORandDLDeepCopy (struct X400Message *msg, struct X400ORandDL *orig)
 Copy Originator and DL Expansion history object. More...
 
X400COMMON_CDECL int X400ORandDLNew (struct X400Message *msg, struct X400ORandDL **or_and_dl)
 Create new Originator and DL Expansion history object. More...
 
X400COMMON_CDECL int X400MsgORandDLGet (struct X400Message *msg, int entry, struct X400ORandDL **or_and_dl)
 Get Originator and DL expansion history object. More...
 
X400COMMON_CDECL int X400ORandDLGetStrParam (struct X400ORandDL *or_and_dl, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
 Get string parameter from ACP127 Response object. More...
 
X400COMMON_CDECL int X400CertGetStrParam (struct X400Certificate *cp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
 Return a string-valued parameter from the certificate object. More...
 
X400COMMON_CDECL int X400CertGetIntParam (struct X400Certificate *cp, int paramtype, int *valp)
 Return a integer-valued parameter from the certificate object. More...
 
X400COMMON_CDECL int X400GetContentOctets (struct X400Message *mp, char *buf, size_t buflen, size_t *lenp)
 Obtains the bytes containing the ASN.1 encoding of the Content of a message. The Content is obtained by building an IPM from the attributes of the message and then encoding it. More...
 
X400COMMON_CDECL int X400SetContentOctets (struct X400Message *mp, char *buf, size_t len)
 Takes a byte stream containing the ASN.1 encoding of a P22 (or P772) content, decodes it and sets it into a message, so that attributes can be extracted from it. More...
 
X400COMMON_CDECL int X400SetupSecEnv (struct X400SecurityEnv **envp, struct x400_attribute *attrs, int allow_no_id)
 Test that the default (sessions) security environment has been initialised with valid values, ie P12 filename and trusted CA certificate directory. More...
 
X400COMMON_CDECL int X400SetupMessageSecEnv (struct X400SecurityEnv **msgenvp, struct x400_attribute *msg_attrs, struct x400_attribute *default_attrs)
 Test that the message security environment has been initialised with valid values, ie P12 filename and trusted CA certificate directory. More...
 
X400COMMON_CDECL int X400SetupRecipSecenv (struct X400SecurityEnv **recipenvp, struct x400_attribute *recip_attrs, struct x400_attribute *msg_attrs, struct x400_attribute *default_attrs)
 Test that the message security environment has been initialised with valid values, ie P12 filename and trusted CA certificate directory. More...
 
X400COMMON_CDECL int X400MsgGetCriticality (struct X400Message *mp, int paramtype, int *critp)
 Get the criticality value for a parameter which comes from an extension field within a message's envelope. Sets a *critp as a bitmask with X400_CRITICAL_NONE, X400_CRITICAL_SUBMISSION, X400_CRITICAL_TRANSFER, X400_CRITICAL_DELIVERY. More...
 

Detailed Description

Description of the function calls for the X.400 object access interface.

Function Documentation

◆ X400Initialize()

X400COMMON_CDECL int X400Initialize ( char *  myname)

Initialize X.400 API.

Parameters
myname[in] Name of application
Returns
zero on success or non-zero error code

◆ X400InitializeLogging()

X400COMMON_CDECL int X400InitializeLogging ( const char *  myname,
const char *  xmlfile 
)

Initialize X.400 API logging. If just the name of the logging configuration file is provided, it will be searched for first in $ETCDIR and then in $SHAREDIR.

Parameters
myname[in] Name of application
xmlfile[in] Name of logging configuration XML file or full path
Returns
zero on success or non-zero error code

◆ X400MsgNew()

X400COMMON_CDECL int X400MsgNew ( int  type,
struct X400Message **  mpp 
)

Creates new message.

Parameters
type[in] Type of message object
mpp[out] pointer to receive pointer to message object
Returns
zero on success or non-zero error code

Message types are

  • X400_MSG_MESSAGE A Message object
  • X400_MSG_REPORT A Report object
  • X400_MSG_PROBE A Probe object
Examples
examples/x400_mtsend.c.

◆ X400MsgCountRecip()

X400COMMON_CDECL int X400MsgCountRecip ( struct X400Message *  mp,
int  recipient_type,
int *  number 
)

Returns count of addresses of given type in message object.

Parameters
mp[in] X400 message
recipient_type[in] Type of address to count
number[out] pointer integer to receive count of addresses
Returns
zero on success or non-zero error code

◆ X400MsgFree()

X400COMMON_CDECL int X400MsgFree ( struct X400Message *  mp)

Frees a message.

Parameters
mp[in] message object to free
Returns
zero on success or non-zero error code

◆ X400MsgAddAttachment()

X400COMMON_CDECL int X400MsgAddAttachment ( struct X400Message *  mp,
int  type,
const char *  string,
size_t  length 
)

Add an attachment to the message.

Parameters
mp[in] Message pointer
type[in] Type of attachment
string[in] String value for attachment
length[in] Length of string
Returns
Zero on success or non-zero error code

Not all X.400 body part types can be added to a message in this way. If the type is such that a X400Bodypart is needed, then the error X400_E_COMPLEX_BODY is returned.

◆ X400MsgAddBodypart()

X400COMMON_CDECL int X400MsgAddBodypart ( struct X400Message *  mp,
struct X400Bodypart *  bp 
)

Add a body part object to a message.

Parameters
mp[in] Message pointer
bp[in] Bodypart pointer
Returns
Zero on success or non-zero error code

◆ X400MsgAddMessageBody()

X400COMMON_CDECL int X400MsgAddMessageBody ( struct X400Message *  mp,
struct X400Message *  mbp 
)
Deprecated:
Use X400MsgAddMessageBodyWType instead.

◆ X400MsgAddMessageBodyWType()

X400COMMON_CDECL int X400MsgAddMessageBodyWType ( struct X400Message *  mp,
struct X400Message *  mbp,
int  type 
)

Add a message body part object to a message.

Parameters
mp[in] Message pointer
mbp[in] Message body part pointer
type[in] BodyPart type (E.G X400_T_MESSAGE)
Returns
Zero on success or non-zero error code

The message body part must be a message delivery object for forwarded-message body part.

If the message object being created has an IPN content, then any envelope information is ignored.

◆ X400MsgAddIntParam()

X400COMMON_CDECL int X400MsgAddIntParam ( struct X400Message *  mp,
int  paramtype,
int  value 
)

Add integer-valued parameter to the message.

Parameters
mp[in] Message pointer
paramtype[in] Type of parameter
value[in] Value of parameter
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400MsgAddStrParam()

X400COMMON_CDECL int X400MsgAddStrParam ( struct X400Message *  mp,
int  paramtype,
const char *  value,
size_t  length 
)

Add string-valued parameter to the message.

Parameters
mp[in] Message pointer
paramtype[in] Type of parameter
value[in] Value of parameter
length[in] Length of parameter, -1 if NUL terminated
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400MsgAddRecip()

X400COMMON_CDECL int X400MsgAddRecip ( struct X400Message *  mp,
int  reciptype,
struct X400Recipient *  recip 
)

Add a recipient object to the message.

Parameters
mp[in] Message pointer
reciptype[in] Type of recipient
recip[in] Recipient object to add
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400MsgGetIntParam()

X400COMMON_CDECL int X400MsgGetIntParam ( struct X400Message *  mp,
int  paramtype,
int *  valuep 
)

Return a integer-valued parameter from the message object.

Parameters
mp[in] message object pointer
paramtype[in] type of parameter
valuep[out] Pointer to receive value
Returns
Zero on success or non-zero error code

◆ X400MsgGetStrParam()

X400COMMON_CDECL int X400MsgGetStrParam ( struct X400Message *  mp,
int  paramtype,
char *  buffer,
size_t  buflen,
size_t *  paramlenp 
)

Return a string-valued parameter from the message object.

Parameters
mp[in] message object pointer
paramtype[in] type of parameter
buffer[in/out] address for result
buflen[in] length of buffer provided
paramlenp[out] Pointer to receive actual length
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400MsgGetAttachment()

X400COMMON_CDECL int X400MsgGetAttachment ( struct X400Message *  mp,
int  number,
int *  typep,
char *  buffer,
size_t  buflen,
size_t *  lengthp 
)

Return data from a simple attachment.

Parameters
mp[in] message object pointer
number[in] Attachment number
typep[out] Pointer to receive attachment type
buffer[in] Buffer to receive string
buflen[in] Buffer length
lengthp[out] Pointer to receive length of string
Returns
Zero on success or non-zero error code

Not all X.400 body part types can be returned from a message in this way. If the type is such that a X400Bodypart is needed, then the error X400_E_COMPLEX_BODY is returned. If the type is a forwarded message or returned IPM, then X400_E_MESSAGE_BODY is returned.

◆ X400MsgGetBodypart()

X400COMMON_CDECL int X400MsgGetBodypart ( struct X400Message *  mp,
int  number,
int *  typep,
struct X400Bodypart **  bpp 
)

Return a pointer to a body part object.

                        int number,
                    int *typep,
                    struct X400Bodypart **bpp)
Parameters
mp[in] message object pointer
number[in] Bodypart number
typep[out] Pointer to receive attachment type
bpp[out] Pointer to pointer to object
Returns
Zero on success or non-zero error code

If the body part is a forwarded message body part or a returned IPM then the error X400_E_MESSAGE_BODY is returned.

◆ X400MsgGetMessageBody()

X400COMMON_CDECL int X400MsgGetMessageBody ( struct X400Message *  mp,
int  number,
struct X400Message **  mbpp 
)

Return a pointer to a body part object.

Parameters
mp[in] message object pointer
number[in] Bodypart number
mbpp[out] Pointer to address of BodyPart
Returns
Zero on success or non-zero error code

◆ X400MsgGetRecip()

X400COMMON_CDECL int X400MsgGetRecip ( struct X400Message *  mp,
int  recip_type,
int  number,
struct X400Recipient **  rpp 
)

Get recipient object from message.

Parameters
mp[in] Message object pointer
recip_type[in] Type of recipient
number[in] Ordinal number of recipient
rpp[out] Pointer to receive recipient object pointer
Returns
Zero on success, non-zero on failure

◆ X400MsgGetCert()

X400COMMON_CDECL int X400MsgGetCert ( struct X400Message *  mp,
int  certtype,
struct X400Certificate **  certp 
)

Get certificate object from message This returns a certificate which was used to sign an object in the message. The attribute type indicates which object type.

Parameters
mp[in] Message object pointer
certtype[in] Attribute type for certificate
certp[out] Pointer to receive certificate object pointer
Returns
Zero on success, non-zero on failure

◆ X400RecipNew()

X400COMMON_CDECL int X400RecipNew ( int  type,
struct X400Recipient **  rpp 
)

Create a new recipient object.

Parameters
type[in] type of recipient
rpp[out] Pointer to place for pointer to recipient information
Returns
Zero on success or non-zero error code

Creates a recipient object. There are several different types for recipient object. Normal recipients can be specified separately for the envelope (i.e. controlling where the message actually goes) and the header which is part of the content. They can also be specified together. A separate type of recipient is the reported recipient which appears in a report content.

  • X400_RECIP_PRIMARY Primary recipient in header
  • X400_RECIP_CC Carbon copy recipient in header
  • X400_RECIP_BCC Blind copy recipient in header
  • X400_RECIP_REPLY Reply-recipient in header
  • X400_RECIP_ENVELOPE Actual recipient in envelope
  • X400_RECIP_REPORT Reported recipient in report content
  • X400_RECIP_INTENDED Originally intended recipient in report content
  • X400_ORIGINATOR Originator address in IPM header
  • X400_AUTH_ORIG Authorizing originator address in IPM header

To set a given recipient in both envelope and header, add together the values, e.g. X400_RECIP_PRIMARY + X400_RECIP_ENVELOPE. The value X400_RECIP_STANDARD is a shorthand for this combination.

Examples
examples/x400_mtsend.c.

◆ X400RecipFree()

X400COMMON_CDECL int X400RecipFree ( struct X400Recipient *  rpp)

Free a recipient object.

Parameters
rpp[out] Recipient object to free
Returns
Zero on success or non-zero error code

◆ X400RecipAddIntParam()

X400COMMON_CDECL int X400RecipAddIntParam ( struct X400Recipient *  rp,
int  paramtype,
int  value 
)

Add integer-valued parameter to the recipient.

Parameters
rp[in] Message pointer
paramtype[in] Type of parameter
value[in] Value of parameter
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400RecipAddStrParam()

X400COMMON_CDECL int X400RecipAddStrParam ( struct X400Recipient *  rp,
int  paramtype,
const char *  value,
size_t  length 
)

Add string-valued parameter to the recipient.

Parameters
rp[in] Recipient pointer
paramtype[in] Type of parameter
value[in] Value of parameter
length[in] Length of parameter, -1 if NUL terminated
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400RecipGetStrParam()

X400COMMON_CDECL int X400RecipGetStrParam ( struct X400Recipient *  rp,
int  paramtype,
char *  buffer,
size_t  buflen,
size_t *  paramlenp 
)

Return a string-valued parameter from the recipient object.

Parameters
rp[in] recipient object pointer
paramtype[in] type of parameter
buffer[in/out] address for result
buflen[in] length of buffer provided
paramlenp[out] Pointer to receive actual length
Returns
Zero on success or non-zero error code

◆ X400RecipGetIntParam()

X400COMMON_CDECL int X400RecipGetIntParam ( struct X400Recipient *  rp,
int  paramtype,
int *  valp 
)

Return a integer-valued parameter from the recipient object.

Parameters
rp[in] recipient object pointer
paramtype[in] type of parameter
valp[out] Pointer to receive value
Returns
Zero on success or non-zero error code

◆ X400RecipGetCert()

X400COMMON_CDECL int X400RecipGetCert ( struct X400Recipient *  rp,
int  certtype,
struct X400Certificate **  certp 
)

Get certificate object from recipient This returns a certificate which was used to sign an object in the recipient. The attribute type indicates which object type.

Parameters
mp[in] Recipient object pointer
certtype[in] Attribute type for certificate
certp[out] Pointer to receive certificate object pointer
Returns
Zero on success, non-zero on failure
Examples
examples/x400_mtrcv.c.

◆ X400BodypartNew()

X400COMMON_CDECL int X400BodypartNew ( int  type,
struct X400Bodypart **  bpp 
)

Create a new body part object.

Parameters
type[in] type of bodypart
bpp[out] Pointer to place for pointer to body part object
Returns
Zero on success or non-zero error code

Creates a body part object. There are several different types for body part object.

Examples
examples/x400_mtsend.c.

◆ X400BodypartFree()

X400COMMON_CDECL int X400BodypartFree ( struct X400Bodypart *  bpp)

Free a body part object.

Parameters
bpp[out] body part object to free
Returns
Zero on success or non-zero error code

◆ X400BodypartAddIntParam()

X400COMMON_CDECL int X400BodypartAddIntParam ( struct X400Bodypart *  bp,
int  paramtype,
int  value 
)

Add integer-valued parameter to the body part.

Parameters
bp[in] Body part pointer
paramtype[in] Type of parameter
value[in] Value of parameter
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400BodypartAddStrParam()

X400COMMON_CDECL int X400BodypartAddStrParam ( struct X400Bodypart *  bp,
int  paramtype,
const char *  value,
size_t  length 
)

Add string-valued parameter to the body part.

Parameters
bp[in] Body part pointer
paramtype[in] Type of parameter
value[in] Value of parameter
length[in] Length of parameter, -1 if NUL terminated
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400BodypartGetStrParam()

X400COMMON_CDECL int X400BodypartGetStrParam ( struct X400Bodypart *  bp,
int  paramtype,
char *  buffer,
size_t  buflen,
size_t *  paramlenp 
)

Return a string-valued parameter from the body part object.

Parameters
bp[in] body part object pointer
paramtype[in] type of parameter
buffer[in/out] address for result
buflen[in] length of buffer provided
paramlenp[out] Pointer to receive actual length
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400BodypartGetIntParam()

X400COMMON_CDECL int X400BodypartGetIntParam ( struct X400Bodypart *  bp,
int  paramtype,
int *  valp 
)

Return a integer-valued parameter from the body part object.

Parameters
bp[in] bodypart object pointer
paramtype[in] type of parameter
valp[out] Pointer to receive value
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400DefaultsNew()

X400COMMON_CDECL int X400DefaultsNew ( struct x400_attribute **  ap)

Return a new defaults object.

Parameters
ap[out] Address of pointer to receive defaults object
Returns
Zero on success or non-zero error code

◆ X400DefaultsFree()

X400COMMON_CDECL int X400DefaultsFree ( struct x400_attribute *  ap)

Free a defaults object.

Parameters
ap[in] Address of defaults object to free
Returns
Zero on success or non-zero error code

◆ X400SetStrDefault()

X400COMMON_CDECL int X400SetStrDefault ( struct x400_attribute *  ap,
int  paramtype,
const char *  value,
size_t  length 
)

Set a string value in a defaults object.

Parameters
ap[in] Defaults object to operate on
paramtype[in] Type of parameter to set
value[in] String value to set
length[in] Length of value to set
Returns
Zero on success or non-zero error code

◆ X400SetIntDefault()

X400COMMON_CDECL int X400SetIntDefault ( struct x400_attribute *  ap,
int  paramtype,
int  value 
)

Set an integer value in a defaults object.

Parameters
ap[in] Defaults object to operate on
paramtype[in] Type of parameter to set
value[in] Integer value to set
Returns
Zero on success or non-zero error code

◆ X400Error()

const X400COMMON_CDECL char* X400Error ( int  error)

Return string for error code.

Parameters
error[in] error code
Returns
Pointer to NUL terminated string for error

◆ X400DLExpHistGet()

X400COMMON_CDECL int X400DLExpHistGet ( struct X400Message *  mp,
int  entry,
struct X400DLExpHist **  hist 
)

Create a new DL Expansion History object from the message object.

Parameters
mp[in] message object pointer
entry[in] DL expansion history element to fetch
hist[out] pointer to receive new DL Expansion History object
Returns
Zero on success, or non-zero error code

◆ X400DLExpHistDelete()

X400COMMON_CDECL int X400DLExpHistDelete ( struct X400DLExpHist *  hist)

Delete the DL Expansion History object.

Parameters
hist[in] DL Expansion History object to be deleted
Returns
Zero on success, or non-zero error code.

◆ X400DLExpHistGetStrParam()

X400COMMON_CDECL int X400DLExpHistGetStrParam ( struct X400DLExpHist *  hist,
int  paramtype,
char *  buffer,
size_t  buflen,
size_t *  paramlenp 
)

Return a string parameter from the DL Expansion History object.

Parameters
hist[in] DL Expansion History object pointer
paramtype[in] type of parameter
buffer[in/out] pointer to receive value
buflen[in] Size of buffer
paramlenp[out] pointer to receive actual length
Returns
Zero on success, or non-zero error code

◆ X400DLExpHistNew()

X400COMMON_CDECL int X400DLExpHistNew ( struct X400DLExpHist **  histp)

Create a new X400DLExpHist object.

Parameters
histp[out] pointer to receive object
Returns
Zero on success, or non-zero error code

◆ X400MsgAddDLExpHist()

X400COMMON_CDECL int X400MsgAddDLExpHist ( struct X400Message *  mp,
struct X400DLExpHist *  histp 
)

Associates a X400DLExpHist object with a X400Message object.

Parameters
mp[in] Pointer to X400Message object
histp[in] Pointer to X400DLExpHist object.
Returns
Zero on success, or non-zero error code

◆ X400DLExpHistAddStrParam()

X400COMMON_CDECL int X400DLExpHistAddStrParam ( struct X400DLExpHist *  hist,
int  paramtype,
const char *  value,
size_t  length 
)

Add string-valued parameter to the X400DLExpHist object.

Parameters
hist[in] X400DLExpHist pointer
paramtype[in] Type of parameter
value[in] Value of parameter
length[in] Length of parameter, -1 if NULL terminated
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400DLExpHistDeepCopy()

X400COMMON_CDECL struct X400DLExpHist* X400DLExpHistDeepCopy ( struct X400DLExpHist *  original)

Copy an existing DL Expansion History object.

Parameters
original[in] X.400 DL Expansion History to copy
Returns
Copy of DL Expansion History or NULL on error

◆ X400TraceInfoGet()

X400COMMON_CDECL int X400TraceInfoGet ( struct X400Message *  mp,
int  entry,
struct X400TraceInfo **  info,
int  trace_info_type 
)

Get the Trace information object from a message.

Parameters
mp[in] X.400 Message pointer
entry[in] Trace Info object to use
info[out] Pointer to trace info object
trace_info_type[in] Type of trace info object.
Returns
Zero on success or non-zero error code

◆ X400TraceInfoGetStrParam()

X400COMMON_CDECL int X400TraceInfoGetStrParam ( struct X400TraceInfo *  info,
int  paramtype,
char *  buffer,
size_t  buflen,
size_t *  paramlenp 
)

Get string parameter from Trace Information object.

Parameters
info[in] Trace Info object
paramtype[in] Type of parameter
buffer[out] Buffer to contain string value
buflen[in] Length of buffer
paramlenp[out] Length of require buffer
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400TraceInfoGetIntParam()

X400COMMON_CDECL int X400TraceInfoGetIntParam ( struct X400TraceInfo *  info,
int  paramtype,
int *  valuep 
)

Get int parameter from Trace Information object.

Parameters
info[in] Trace Info object
paramtype[in] Type of parameter
valuep[out] pointer to integer to return
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400TraceInfoNew()

X400COMMON_CDECL int X400TraceInfoNew ( struct X400Message *  msg,
struct X400TraceInfo **  info,
int  type 
)

Create a new Trace information object.

Parameters
msg[in] X400 message pointer
info[out] Pointer to trace info object
type[in] Type info object X400_TRACE_INFO or X400_SUBJECT_TRACE_INFO
Returns
Zero on success or non-zero error code

◆ X400TraceInfoDeepCopy()

X400COMMON_CDECL struct X400TraceInfo* X400TraceInfoDeepCopy ( struct X400Message *  mp,
struct X400TraceInfo *  original,
int  type 
)

Copy an existing Trace information object.

Parameters
mp[in] X400 message pointer (destination of copy object)
info[in] Pointer to original trace info object
type[in] Either X400_TRACE_INFO or X400_SUBJECT_TRACE_INFO
Returns
Copy of object or NULL on error

◆ X400MsgAddTraceInfo()

X400COMMON_CDECL int X400MsgAddTraceInfo ( struct X400Message *  mp,
struct X400TraceInfo *  info,
int  type 
)

Create a new Trace information object.

Parameters
mp[in] X400 message pointer
info[in] Pointer to trace info object
type[in] Either X400_TRACE_INFO or X400_SUBJECT_TRACE_INFO
Returns
Zero on success or non-zero error code

◆ X400TraceInfoAddStrParam()

X400COMMON_CDECL int X400TraceInfoAddStrParam ( struct X400TraceInfo *  info,
int  paramtype,
const char *  value,
size_t  length 
)

Add string-valued parameter to the X400TraceInfo object.

Parameters
info[in] X400TraceInfo pointer
paramtype[in] Type of parameter
value[in] Value of parameter
length[in] Length of parameter, -1 if NULL terminated
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c, and examples/x400_mtsend_rep.c.

◆ X400TraceInfoAddIntParam()

X400COMMON_CDECL int X400TraceInfoAddIntParam ( struct X400TraceInfo *  info,
int  paramtype,
int  value 
)

Set an integer value in a Trace Info object.

Parameters
info[in] Trace Info object to operate on
paramtype[in] Type of parameter to set
value[in] Integer value to set
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400RediHistAddStrParam()

X400COMMON_CDECL int X400RediHistAddStrParam ( struct X400RediHist *  hist,
int  paramtype,
const char *  value,
size_t  length 
)

Add string-valued parameter to the X400RediHist object.

Parameters
hist[in] X400RediHist pointer
paramtype[in] Type of parameter
value[in] Value of parameter
length[in] Length of parameter, -1 if NULL terminated
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c, and examples/x400_mtsend_rep.c.

◆ X400RediHistAddIntParam()

X400COMMON_CDECL int X400RediHistAddIntParam ( struct X400RediHist *  hist,
int  paramtype,
int  value 
)

Set an integer value in a Redirection History object.

Parameters
hist[in] Redirection History object to operate on
paramtype[in] Type of parameter to set
value[in] Integer value to set
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c, and examples/x400_mtsend_rep.c.

◆ X400RediHistGetStrParam()

X400COMMON_CDECL int X400RediHistGetStrParam ( struct X400RediHist *  hist,
int  paramtype,
char *  value,
size_t  length,
size_t *  lengthp 
)

Get string-valued parameter from the X400RediHist object.

Parameters
hist[in] X400RediHist pointer
paramtype[in] Type of parameter
value[in] Value of parameter
length[in] Length of parameter
lengthp[in] Required length of value
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400RediHistGetIntParam()

X400COMMON_CDECL int X400RediHistGetIntParam ( struct X400RediHist *  info,
int  paramtype,
int *  valuep 
)

Get int parameter from Redirection History object.

Parameters
info[in] Redirection History object
paramtype[in] Type of parameter
valuep[out] pointer to integer to return
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400RediHistGet()

X400COMMON_CDECL int X400RediHistGet ( struct X400Recipient *  recip,
int  entry,
struct X400RediHist **  hist 
)

Get the Redirection History object from a recipient.

Parameters
recip[in] X.400 Recipient
entry[in] Trace Info object to use
hist[out] Pointer to redirection history object
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400RediHistNew()

X400COMMON_CDECL int X400RediHistNew ( struct X400Recipient *  recip,
struct X400RediHist **  hist 
)

Create a new Redirection History object.

Parameters
recip[in] X.400 Recipient history
hist[out] Pointer to redirection history object
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c, and examples/x400_mtsend_rep.c.

◆ X400RediHistGetEnv()

X400COMMON_CDECL int X400RediHistGetEnv ( struct X400Message *  msg,
int  entry,
struct X400RediHist **  hist 
)

Get the Redirection History object from a message envelope this is represented by 8.3.1.2.1.5 in X.411.

Parameters
msg[in] X.400 Message
entry[in] Trace Info object to use
hist[out] Pointer to redirection history object
Returns
Zero on success or non-zero error code

◆ X400RediHistNewEnv()

X400COMMON_CDECL int X400RediHistNewEnv ( struct X400Message *  msg,
struct X400RediHist **  hist 
)

Create a new Redirection History object for a message envelope this is represented by 8.3.1.2.1.5 in X.411.

Parameters
msg[in] X.400 Recipient history
hist[out] Pointer to redirection history object
Returns
Zero on success or non-zero error code

◆ X400RediHistDeepCopyEnv()

X400COMMON_CDECL struct X400RediHist* X400RediHistDeepCopyEnv ( struct X400Message *  msg,
struct X400RediHist *  original 
)

Copy an existing Redirection History object into a message.

Parameters
msg[in] X.400 Message
original[in] X.400 Redirection history to copy
Returns
Copy of Redirection History or NULL on error

◆ X400RediHistDeepCopy()

X400COMMON_CDECL struct X400RediHist* X400RediHistDeepCopy ( struct X400Recipient *  recip,
struct X400RediHist *  original 
)

Copy an existing Redirection History object into a recipient.

Parameters
recip[in] X.400 Recipient
original[in] X.400 Redirection history to copy
Returns
Copy of Redirection History or NULL on error

◆ X400RediReason()

const X400COMMON_CDECL char* X400RediReason ( int  redirection_reason)

Return a human readable string based on a redirection reason.

Parameters
redirection_reason[in] redirection reason
Returns
Pointer to human readable string.
Examples
examples/x400_mtrcv.c.

◆ X400InternalTraceInfoGet()

X400COMMON_CDECL int X400InternalTraceInfoGet ( struct X400Message *  mp,
int  entry,
struct X400InternalTraceInfo **  info 
)

Get the Trace information object from a message.

Parameters
mp[in] X.400 Message pointer
entry[in] Trace Info object to use
info[out] Pointer to trace info object
Returns
Zero on success or non-zero error code

◆ X400InternalTraceInfoDeepCopy()

X400COMMON_CDECL struct X400InternalTraceInfo* X400InternalTraceInfoDeepCopy ( struct X400Message *  mp,
struct X400InternalTraceInfo *  original 
)

Copy an existing Internal Trace information object.

Parameters
mp[in] X400 message pointer (destination of copy object)
info[in] Pointer to original trace info object
Returns
Copy of object or NULL on error

◆ X400InternalTraceInfoNew()

X400COMMON_CDECL int X400InternalTraceInfoNew ( struct X400Message *  msg,
struct X400InternalTraceInfo **  info 
)

Create a new Trace information object.

Parameters
msg[in] X400 message pointer
info[out] Pointer to trace info object
Returns
Zero on success or non-zero error code

◆ X400MsgAddInternalTraceInfo()

X400COMMON_CDECL int X400MsgAddInternalTraceInfo ( struct X400Message *  mp,
struct X400InternalTraceInfo *  info 
)

Create a new Trace information object.

Parameters
mp[in] X400 message pointer
info[in] Type of trace info object to add
Returns
Zero on success or non-zero error code

◆ X400InternalTraceInfoGetStrParam()

X400COMMON_CDECL int X400InternalTraceInfoGetStrParam ( struct X400InternalTraceInfo *  info,
int  paramtype,
char *  buffer,
size_t  buflen,
size_t *  paramlenp 
)

Get string parameter from Internal Trace Information object.

Parameters
info[in] Trace Info object
paramtype[in] Type of parameter
buffer[out] Buffer to contain string value
buflen[in] Length of buffer
paramlenp[out] Length of require buffer
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400InternalTraceInfoGetIntParam()

X400COMMON_CDECL int X400InternalTraceInfoGetIntParam ( struct X400InternalTraceInfo *  info,
int  paramtype,
int *  valuep 
)

Get int parameter from Internal Trace Information object.

Parameters
info[in] Trace Info object
paramtype[in] Type of parameter
valuep[out] pointer to integer to return
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400InternalTraceInfoAddStrParam()

X400COMMON_CDECL int X400InternalTraceInfoAddStrParam ( struct X400InternalTraceInfo *  info,
int  paramtype,
const char *  value,
size_t  length 
)

Add string-valued parameter to the Internal Trace info object.

Parameters
info[in] Internal Trace info pointer
paramtype[in] Type of parameter
value[in] Value of parameter
length[in] Length of parameter, -1 if NULL terminated
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400InternalTraceInfoAddIntParam()

X400COMMON_CDECL int X400InternalTraceInfoAddIntParam ( struct X400InternalTraceInfo *  info,
int  paramtype,
int  value 
)

Set an integer value in an Internal Trace Info object.

Parameters
info[in] Trace Info object to operate on
paramtype[in] Type of parameter to set
value[in] Integer value to set
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400ALIGet()

X400COMMON_CDECL int X400ALIGet ( struct X400Message *  mp,
int  entry,
struct X400ALI **  ali 
)

Get the Address List Indicator information object from a message.

Parameters
mp[in] X.400 Message pointer
entry[in] ALI object being used.
ali[out] Pointer to ALI object
Returns
Zero on success or non-zero error code

◆ X400ALINew()

X400COMMON_CDECL int X400ALINew ( struct X400Message *  msg,
struct X400ALI **  ali 
)

Create an Address List Indicator object.

Parameters
msg[in] X400 message pointer
ali[out] Pointer ALI object
Returns
Zero on success or non-zero error code

◆ X400ALIDeepCopy()

X400COMMON_CDECL struct X400ALI* X400ALIDeepCopy ( struct X400Message *  mp,
struct X400ALI *  ali 
)

Copy an Address List Indicator object.

Parameters
msg[in] X400 message pointer (for copy)
ali[out] ALI object to copy
Returns
Copy of ALI or NULL on error

◆ X400ALIGetStrParam()

X400COMMON_CDECL int X400ALIGetStrParam ( struct X400ALI *  ALI,
int  paramtype,
char *  buffer,
size_t  buflen,
size_t *  paramlenp 
)

Get string parameter from Address List Indicator object.

Parameters
ALI[in] ALI object
paramtype[in] Type of parameter
buffer[out] Buffer to contain string value
buflen[in] Length of Buffer
paramlenp[out] Length of required buffer
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400ALIGetIntParam()

X400COMMON_CDECL int X400ALIGetIntParam ( struct X400ALI *  ALI,
int  paramtype,
int *  valuep 
)

Get int parameter from Address List Indicator object.

Parameters
ALI[in] ALI object
paramtype[in] Type of parameter
valuep[out] pointer to integer to return
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400ALIAddStrParam()

X400COMMON_CDECL int X400ALIAddStrParam ( struct X400ALI *  info,
int  paramtype,
const char *  value,
size_t  length 
)

Add string-valued parameter to the ALI info object.

Parameters
info[in] ALI info pointer
paramtype[in] Type of parameter
value[in] Value of parameter
length[in] Length of parameter, -1 if NULL terminated
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400ALIAddIntParam()

X400COMMON_CDECL int X400ALIAddIntParam ( struct X400ALI *  info,
int  paramtype,
int  value 
)

Set an integer value in an Address List Indicator object.

Parameters
info[in] ALI object to operate on
paramtype[in] Type of parameter to set
value[in] Integer value to set
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400PSSGet()

X400COMMON_CDECL int X400PSSGet ( struct X400Message *  mp,
int  type,
int  entry,
struct X400PSS **  pss 
)

Get the Printable String Sequence object from a message.

Parameters
mp[in] X.400 Message pointer
type[in] type of printable string syntax to fetch
entry[in] PSS object being used.
pss[out] Pointer to PSS object
Returns
Zero on success or non-zero error code

◆ X400PSSDeepCopy()

X400COMMON_CDECL struct X400PSS* X400PSSDeepCopy ( struct X400Message *  mp,
struct X400PSS *  pss,
int  type 
)

Copy a Printable String Sequence object.

Parameters
msg[in] X400 message pointer (for copy)
pss[out] PSS object to copy
type[in] Type of PSS object
Returns
Copy of PSS or NULL on error

◆ X400PSSNew()

X400COMMON_CDECL int X400PSSNew ( struct X400Message *  msg,
struct X400PSS **  pss,
int  type 
)

Create a Printable String Sequence object.

Parameters
msg[in] X400 message pointer
pss[out] Pointer PSS object
type[in] Type of PSS object
Returns
Zero on success or non-zero error code

◆ X400PSSGetStrParam()

X400COMMON_CDECL int X400PSSGetStrParam ( struct X400PSS *  pss,
char *  buffer,
size_t  buflen,
size_t *  paramlenp 
)

Get string parameter from Printable String Sequence object.

Parameters
pss[in] PSS object
buffer[out] Buffer to contain string value
buflen[in] Length of Buffer
paramlenp[out] Length of required buffer
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400PSSAddStrParam()

X400COMMON_CDECL int X400PSSAddStrParam ( struct X400PSS *  pss,
const char *  value,
size_t  length 
)

Add string-valued parameter to the PSS info object.

Parameters
pss[in] pss info pointer
value[in] Value of parameter
length[in] Length of parameter, -1 if NULL terminated
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400DistFieldGet()

X400COMMON_CDECL int X400DistFieldGet ( struct X400Message *  mp,
int  entry,
struct X400DistField **  distfield 
)

Get the Distribution Code extension Field object from a message.

Parameters
mp[in] X.400 Message pointer
entry[in] DistField object being used.
distfield[out] Pointer to Distribution Code extension object
Returns
Zero on success or non-zero error code

◆ X400DistFieldDeepCopy()

X400COMMON_CDECL struct X400DistField* X400DistFieldDeepCopy ( struct X400Message *  mp,
struct X400DistField *  original 
)

Copy a P772 Distribution Code extension Field object.

Parameters
msg[in] X400 message pointer for copy
distfield[out] X400DistField object to copy
Returns
New X400DistField or NULL on error

◆ X400DistFieldNew()

X400COMMON_CDECL int X400DistFieldNew ( struct X400Message *  msg,
struct X400DistField **  distfield 
)

Create a P772 Distribution Code extension Field object.

Parameters
msg[in] X400 message pointer
distfield[out] Pointer X400DistField object
Returns
Zero on success or non-zero error code

◆ X400DistFieldGetStrParam()

X400COMMON_CDECL int X400DistFieldGetStrParam ( struct X400DistField *  distfield,
int  type,
char *  buffer,
size_t  buflen,
size_t *  paramlenp 
)

Get string parameter from Distribution Code extension Field object.

Parameters
distfield[in] DistField object
type[in] The type of distfield object
buffer[out] Buffer to contain string value
buflen[in] Length of Buffer
paramlenp[out] Length of required buffer
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400DistFieldAddStrParam()

X400COMMON_CDECL int X400DistFieldAddStrParam ( struct X400DistField *  distfield,
int  type,
const char *  value,
size_t  length 
)

Add string-valued parameter to the DistField info object.

Parameters
distfield[in] distfield info pointer
type[in] The type of distfield object
value[in] Value of parameter
length[in] Length of parameter, -1 if NULL terminated
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400OtherRecipGet()

X400COMMON_CDECL int X400OtherRecipGet ( struct X400Message *  mp,
int  entry,
struct X400OtherRecip **  otherrecip 
)

Get a new P772 Other Recipient object for a message object.

Parameters
mp[in] message pointer
entry[in] Other Recip object being used.
otherrecip[out] pointer to receive new other recipient object
Returns
Zero on success, or non-zero error code

◆ X400OtherRecipDeepCopy()

X400COMMON_CDECL struct X400OtherRecip* X400OtherRecipDeepCopy ( struct X400Message *  mp,
struct X400OtherRecip *  original 
)

Copy a P772 Other Recipient object.

Parameters
mp[in] message pointer for copy
original[in] object to copy
Returns
Copy of object or NULL on error

◆ X400OtherRecipNew()

X400COMMON_CDECL int X400OtherRecipNew ( struct X400Message *  mp,
struct X400OtherRecip **  otherrecip 
)

Create a new P772 Other Recipient object for a message object.

Parameters
mp[in] message pointer
otherrecip[out] pointer to receive other recipient object
Returns
Zero on success, or non-zero error code

◆ X400OtherRecipGetStrParam()

X400COMMON_CDECL int X400OtherRecipGetStrParam ( struct X400OtherRecip *  otherrecip,
char *  buffer,
size_t  buflen,
size_t *  paramlenp 
)

Get string parameter from Other Recipient object.

Parameters
otherrecip[in] otherrecip object
buffer[out] Buffer to contain string value
buflen[in] Length of Buffer
paramlenp[out] Length of required buffer
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400OtherRecipAddStrParam()

X400COMMON_CDECL int X400OtherRecipAddStrParam ( struct X400OtherRecip *  otherrecip,
const char *  value,
size_t  length 
)

Add string-valued parameter to the Other Recipient Indicator object.

Parameters
otherrecip[in] Other Recipient object pointer
value[in] Value of parameter
length[in] Length of parameter, -1 if NULL terminated
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400OtherRecipAddIntParam()

X400COMMON_CDECL int X400OtherRecipAddIntParam ( struct X400OtherRecip *  otherrecip,
int  value 
)

Add integer parameter to the Other Recipient Indicator object.

Parameters
otherrecip[in] Other Recipient object pointer
value[in] Value of parameter
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400OtherRecipGetIntParam()

X400COMMON_CDECL int X400OtherRecipGetIntParam ( struct X400OtherRecip *  otherrecip,
int *  value 
)

Get integer parameter from the Other Recipient Indicator object.

Parameters
otherrecip[in] Other Recipient object pointer
value[out] address of value integer
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400ACP127RespGet()

X400COMMON_CDECL int X400ACP127RespGet ( struct X400Message *  mp,
struct X400ACP127Resp **  resp 
)

Get the ACP127 Notification Response object from a message.

Parameters
mp[in] X.400 Message Recipient pointer
resp[out] Pointer to ACP127 Notification Response object
Returns
Zero on success or non-zero error code

◆ X400ACP127RespDeepCopy()

X400COMMON_CDECL struct X400ACP127Resp* X400ACP127RespDeepCopy ( struct X400Message *  mp,
struct X400ACP127Resp *  original 
)

Copy an ACP127 Notification Response object.

Parameters
mp[in] message pointer for copy
original[in] object to copy
Returns
Copy of object or NULL on error

◆ X400ACP127RespNew()

X400COMMON_CDECL int X400ACP127RespNew ( struct X400Message *  mp,
struct X400ACP127Resp **  resp 
)

Create an ACP127 Notification Response object.

Parameters
mp[in] X400 message pointer
resp[out] Pointer X400ACP127Resp object
Returns
Zero on success or non-zero error code

◆ X400ACP127RespGetStrParam()

X400COMMON_CDECL int X400ACP127RespGetStrParam ( struct X400ACP127Resp *  resp,
int  type,
char *  buffer,
size_t  buflen,
size_t *  paramlenp 
)

Get string parameter from ACP127 Notification Response object.

Parameters
resp[in] ACP127 Repsonse object
type[in] The type of string element to get
buffer[out] Buffer to contain string value
buflen[in] Length of Buffer
paramlenp[out] Length of required buffer
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400ACP127RespAddStrParam()

X400COMMON_CDECL int X400ACP127RespAddStrParam ( struct X400ACP127Resp *  resp,
int  type,
const char *  value,
size_t  length 
)

Add string-valued parameter to the ACP127 Notification Response object.

Parameters
resp[in] ACP127 Response object pointer
type[in] Type of value to be added
value[in] Value of parameter
length[in] Length of parameter, -1 if NULL terminated
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400ACP127RespAddIntParam()

X400COMMON_CDECL int X400ACP127RespAddIntParam ( struct X400ACP127Resp *  resp,
int  value 
)

Add integer parameter to the ACP127 Notification Response object.

Parameters
resp[in] ACP127 Response object pointer
value[in] Value of parameter
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400ACP127RespGetIntParam()

X400COMMON_CDECL int X400ACP127RespGetIntParam ( struct X400ACP127Resp *  resp,
int *  value 
)

Get integer parameter from the ACP127 Notification Response object.

Parameters
resp[in] ACP127 object pointer
value[out] address of value integer
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400ACP127RespNewALI()

X400COMMON_CDECL int X400ACP127RespNewALI ( struct X400ACP127Resp *  resp,
struct X400ALI **  ali 
)

Create new Address List Indicator object associated with the X400ACP127 Resp.

Parameters
resp[in] ACP127 response object.
ali[out] X400ALI Address List Indicator object
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400ACP127RespGetALI()

X400COMMON_CDECL int X400ACP127RespGetALI ( struct X400ACP127Resp *  resp,
struct X400ALI **  ali,
int  entry 
)

Get an Address List Indicator object associated with the X400ACP127 object.

Parameters
resp[in] ACP127 response object.
ali[out] X400ALI Address List Indicator object
entry[in] The X400ALI object to get.
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400ORandDLAddStrParam()

X400COMMON_CDECL int X400ORandDLAddStrParam ( struct X400ORandDL *  or_and_dl,
int  type,
const char *  value,
size_t  length 
)

Add string parameter for a Originator and DL Expansion History object.

Parameters
or_and_dl[in] X400ORandDL Repsonse object
type[in] The type of string element to add
value[in] The sting to add
length[in] The size of the string to add.
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend_rep.c.

◆ X400ORandDLDeepCopy()

X400COMMON_CDECL struct X400ORandDL* X400ORandDLDeepCopy ( struct X400Message *  msg,
struct X400ORandDL *  orig 
)

Copy Originator and DL Expansion history object.

Parameters
msg[in] Message object pointer for copy
or_and_dl[in] Original to copy
Returns
New object or NULL on error

◆ X400ORandDLNew()

X400COMMON_CDECL int X400ORandDLNew ( struct X400Message *  msg,
struct X400ORandDL **  or_and_dl 
)

Create new Originator and DL Expansion history object.

Parameters
msg[in] Message object pointer
or_and_dl[out] Pointer to receive new DL expansion object
Returns
Zero on success or non-zero error code

◆ X400MsgORandDLGet()

X400COMMON_CDECL int X400MsgORandDLGet ( struct X400Message *  msg,
int  entry,
struct X400ORandDL **  or_and_dl 
)

Get Originator and DL expansion history object.

Parameters
msg[in] X.400 Message
entry[in] The originator and dl expansion history object to use
or_and_dl[out] Pointer to orig and dl expan history object
Returns
Zero on success or non-zero error code

◆ X400ORandDLGetStrParam()

X400COMMON_CDECL int X400ORandDLGetStrParam ( struct X400ORandDL *  or_and_dl,
int  paramtype,
char *  buffer,
size_t  buflen,
size_t *  paramlenp 
)

Get string parameter from ACP127 Response object.

Parameters
or_and_dl[in] X400ORandDL object
paramtype[in] The type of string element to get
buffer[out] Buffer to contain string value
buflen[in] Length of Buffer
paramlenp[out] Length of required buffer
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400CertGetStrParam()

X400COMMON_CDECL int X400CertGetStrParam ( struct X400Certificate *  cp,
int  paramtype,
char *  buffer,
size_t  buflen,
size_t *  paramlenp 
)

Return a string-valued parameter from the certificate object.

Parameters
rp[in] certificate object pointer
paramtype[in] type of parameter
buffer[in/out] address for result
buflen[in] length of buffer provided
paramlenp[out] Pointer to receive actual length
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400CertGetIntParam()

X400COMMON_CDECL int X400CertGetIntParam ( struct X400Certificate *  cp,
int  paramtype,
int *  valp 
)

Return a integer-valued parameter from the certificate object.

Parameters
rp[in] certificate object pointer
paramtype[in] type of parameter
valp[out] Pointer to receive value
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400GetContentOctets()

X400COMMON_CDECL int X400GetContentOctets ( struct X400Message *  mp,
char *  buf,
size_t  buflen,
size_t *  lenp 
)

Obtains the bytes containing the ASN.1 encoding of the Content of a message. The Content is obtained by building an IPM from the attributes of the message and then encoding it.

Parameters
mp[in] Message from which to get Content encoding
buf[in] Buffer for return of content
buflen[in] Length of buffer
lenp[out] Length of data returned
Returns
Zero on success or non-zero error code

◆ X400SetContentOctets()

X400COMMON_CDECL int X400SetContentOctets ( struct X400Message *  mp,
char *  buf,
size_t  len 
)

Takes a byte stream containing the ASN.1 encoding of a P22 (or P772) content, decodes it and sets it into a message, so that attributes can be extracted from it.

Parameters
mp[in] Message into which to put the Content
buf[in] Buffer containing encoding of content
buflen[in] Length of buffer
Returns
Zero on success or non-zero error code

◆ X400SetupSecEnv()

X400COMMON_CDECL int X400SetupSecEnv ( struct X400SecurityEnv **  envp,
struct x400_attribute *  attrs,
int  allow_no_id 
)

Test that the default (sessions) security environment has been initialised with valid values, ie P12 filename and trusted CA certificate directory.

Parameters
envp[in] Structure to fill in with security values and insert into session attributes. Will be freed when the Session is closed.
attrs[in] Session attributes.
allow_no_id[in] Set to true if not passing P12 filename, so that verification only (which only needs a trusted CA cert dir) is to be performed.
Returns
Zero on success or non-zero error code

◆ X400SetupMessageSecEnv()

X400COMMON_CDECL int X400SetupMessageSecEnv ( struct X400SecurityEnv **  msgenvp,
struct x400_attribute *  msg_attrs,
struct x400_attribute *  default_attrs 
)

Test that the message security environment has been initialised with valid values, ie P12 filename and trusted CA certificate directory.

Parameters
envp[in] Structure to fill in with security values and insert into Message attributes. Will be freed when the Message is freed.
msg_attrs[in] Message attributes.
default_attrs[in] Session attributes.
Returns
Zero on success or non-zero error code

◆ X400SetupRecipSecenv()

X400COMMON_CDECL int X400SetupRecipSecenv ( struct X400SecurityEnv **  recipenvp,
struct x400_attribute *  recip_attrs,
struct x400_attribute *  msg_attrs,
struct x400_attribute *  default_attrs 
)

Test that the message security environment has been initialised with valid values, ie P12 filename and trusted CA certificate directory.

Parameters
envp[in] Structure to fill in with security values and insert into recipient attributes. Will be freed when the recipient is freed.
recip_attrs[in] Recipient attributes.
msg_attrs[in] Message attributes.
default_attrs[in] Session attributes.
Returns
Zero on success or non-zero error code

◆ X400MsgGetCriticality()

X400COMMON_CDECL int X400MsgGetCriticality ( struct X400Message *  mp,
int  paramtype,
int *  critp 
)

Get the criticality value for a parameter which comes from an extension field within a message's envelope. Sets a *critp as a bitmask with X400_CRITICAL_NONE, X400_CRITICAL_SUBMISSION, X400_CRITICAL_TRANSFER, X400_CRITICAL_DELIVERY.

Parameters
mp[in] Message
paramtyoe[in] Parameter type
critp[in] Address of int to receive criticality value
Returns
Zero on success or non-zero error code

All rights reserved © 2002 - 2024 Isode Ltd.