MS X.400 API
X400 MA/MS (P3/P7) Interface. More...
Go to the source code of this file.
Macros | |
#define | X400_DE_SECURITY_ERROR 12 |
#define | X400_DE_DELIVERY_CONTROL_VIOLATED 1 |
#define | X400_DE_UNSUPPORTED_CRITICAL_FUNCTION 13 |
#define | X400_DE_REMOTE_BIND_ERROR 15 |
#define | X400_SP_ASSEMBLY_INSTRUCTIONS_CONFLICT_WITH_SECURITY_SERVICES 0 |
#define | X400_SP_AUTHENTICATION_PROBLEM 1 |
#define | X400_SP_AUTHENTICATION_FAILURE_ON_SUBJECT_MESSAGE 2 |
#define | X400_SP_CONFIDENTIALITY_ASSOCIATION_PROBLEM 3 |
#define | X400_SP_DECRYPTION_FAILED 4 |
#define | X400_SP_DECRYPTION_KEY_UNOBTAINABLE 5 |
#define | X400_SP_FAILURE_OF_PROOF_OF_MESSAGE 6 |
#define | X400_SP_FORBIDDEN_USER_SECURITY_LABEL_REGISTER 7 |
#define | X400_SP_INCOMPATIBLE_CHANGE_WITH_ORIGINAL_SECURITY_CONTEXT 8 |
#define | X400_SP_INTEGRITY_FAILURE_ON_SUBJECT_MESSAGE 9 |
#define | X400_SP_INVALID_SECURITY_LABEL 10 |
#define | X400_SP_INVALID_SECURITY_LABEL_UPDATE 11 |
#define | X400_SP_KEY_FAILURE 12 |
#define | X400_SP_MANDATORY_PARAMETER_ABSENCE 13 |
#define | X400_SP_OPERATION_SECURITY_FAILURE 14 |
#define | X400_SP_REDIRECTION_PROHIBITED 15 |
#define | X400_SP_REFUSED_ALTERNATE_RECIPIENT_NAME 16 |
#define | X400_SP_REPUDIATION_FAILURE_OF_MESSAGE 17 |
#define | X400_SP_RESPONDER_CREDENTIALS_CHECKING_PROBLEM 18 |
#define | X400_SP_SECURITY_CONTEXT_FAILURE 19 |
#define | X400_SP_SECURITY_CONTEXT_PROBLEM 20 |
#define | X400_SP_SECURITY_POLICY_VIOLATION 21 |
#define | X400_SP_SECURITY_SERVICES_REFUSAL 22 |
#define | X400_SP_TOKEN_DECRYPTION_FAILED 23 |
#define | X400_SP_TOKEN_ERROR 24 |
#define | X400_SP_UNABLE_TO_AGGREGATE_SECURITY_LABELS 25 |
#define | X400_SP_UNAUTHORISED_DL_NAME 26 |
#define | X400_SP_UNAUTHORISED_ENTRY_CLASS 27 |
#define | X400_SP_UNAUTHORISED_ORIGINALLY_INTENDED_RECIPIENT_NAME 28 |
#define | X400_SP_UNAUTHORISED_ORIGINATOR_NAME 29 |
#define | X400_SP_UNAUTHORISED_RECIPIENT_NAME 30 |
#define | X400_SP_UNAUTHORISED_SECURITY_LABEL_UPDATE 31 |
#define | X400_SP_UNAUTHORISED_USER_NAME 32 |
#define | X400_SP_UNKNOWN_SECURITY_LABEL 33 |
#define | X400_SP_UNSUPPORTED_ALGORITHM_IDENTIFIER 34 |
#define | X400_SP_UNSUPPORTED_SECURITY_POLICY 35 |
#define | X400_TYPE_MS 0 |
#define | X400_TYPE_MTA_SUBMIT 1 |
#define | X400_TYPE_MTA_BOTH 2 |
#define | X400_EVENT_READ 1 |
#define | X400_EVENT_WRITE 2 |
#define | X400_EVENT_ERROR 4 |
#define | X400_EVENT_ALL (X400_EVENT_READ | X400_EVENT_WRITE | X400_EVENT_ERROR) |
#define | MS_ENTRY_CLASS_STORED_MESSAGES 0 |
#define | MS_ENTRY_CLASS_SUBMITTED_MESSAGES 1 |
#define | MS_ENTRY_STATUS_ANY -1 |
#define | MS_ENTRY_STATUS_NEW 0 |
#define | MS_ENTRY_STATUS_LISTED 1 |
#define | MS_ENTRY_STATUS_FETCHED 2 |
#define | MS_ENTRY_STATUS_NEW_OR_LISTED 3 |
#define | MS_ENTRY_STATUS_LISTED_OR_FETCHED 4 |
Typedefs | |
typedef void | X400msConnEstablishedCb(struct X400msSession *session, int errorcode, int alert) |
A callback which will be invoked when a P7 bind completes asynchronously, whether the completion is successful or unsuccessful. More... | |
typedef void | X400msConnDroppedCb(struct X400msSession *session, int reason_code, char *diagnostic) |
A callback which will be invoked when a P7 connection is lost. More... | |
typedef void | X400msMsgSubmittedCb(struct X400msSession *session, struct X400msMessage *message, int errorcode) |
A callback which will be invoked when a P7 Submission operation completes asynchronously, whether the completion is successful or unsuccessful. More... | |
typedef void | X400msMsgFetchedCb(struct X400msSession *session, struct X400msMessage *message, int type, int seqno, int errorcode) |
A callback which will be invoked when a P7 Fetch operation completes asynchronously, whether the completion is successful or unsuccessful. More... | |
typedef void | X400msMsgDeletedCb(struct X400msSession *session, int seqno, int errorcode) |
A callback which will be invoked when a P7 Delete operation completes asynchronously, whether the completion is successful or unsuccessful. More... | |
typedef void | X400msMsgWaitingCb(struct X400msSession *session, int num_messages_waiting, int errorcode) |
A callback which will be invoked when a P7 Summarize operation (invoked via X400msWait) completes asynchronously, whether the completion is successful or unsuccessful. More... | |
typedef void | X400msListCb(struct X400msSession *session, struct X400msListResult *lrp, int errorcode) |
A callback which will be invoked when a P7 List operation completes asynchronously, whether the completion is successful or unsuccessful. More... | |
typedef void | X400msRegisterCb(struct X400msSession *session, int errorcode) |
A callback which will be invoked when a P7 Register operation completes asynchronously, whether the completion is successful or unsuccessful. More... | |
typedef void | X400msAlertCb(struct X400msSession *session) |
A callback which will be invoked when a P7 Alert invoke is received. More... | |
typedef int | X400msManageCb(struct X400msSession *session, int fd, int event_mask) |
A callback which will be invoked when a particular file descriptor either needs to be monitored for a given set of event types, or no longer needs to be monitored for the specified event types. More... | |
Functions | |
const char * | X400msError (int error) |
Obtain a string describing the meaning of the given error code. More... | |
int | X400msOpenAsync (int type, const char *oraddr, const char *dirname, const char *credentials, const char *pa, const char *ret_psw, X400msConnEstablishedCb *conupcb, X400msConnDroppedCb *condowncb, X400msMsgSubmittedCb *msgsubcb, X400msMsgFetchedCb *msgfetchcb, X400msMsgDeletedCb *msgdelcb, X400msMsgWaitingCb *msgwaitcb, X400msListCb *listcb, X400msRegisterCb *registercb, X400msAlertCb *alertcb, X400msManageCb *managecb, X400msManageCb *unmanagecb, struct X400msSession **spp) |
Initiate an asynchronous opening of a session to a Message Store (P7) More... | |
int | X400msOpenAsyncSession (struct X400msSession *sp, const char *addr, const char *dn, const char *credentials, const char *pa, const char *ret_psw, X400msConnEstablishedCb *conupcb, X400msConnDroppedCb *condowncb, X400msMsgSubmittedCb *msgsubcb, X400msMsgFetchedCb *msgfetchcb, X400msMsgDeletedCb *msgdelcb, X400msMsgWaitingCb *msgwaitcb, X400msListCb *listcb, X400msRegisterCb *registercb, X400msAlertCb *alertcb, X400msManageCb *managecb, X400msManageCb *unmanagecb) |
Initiate an asynchronous opening of a session to a Message Store (P7) using an existing session object. More... | |
struct X400msSession * | X400msNewAsyncSession (int type) |
Create a new X400msSession object of the specified type. More... | |
int | X400msGetHandle (struct X400msSession *session) |
Get a handle suitable for use in a call to select() More... | |
void | X400msSetUserPointer (struct X400msSession *session, void *ptr) |
Set a user pointer value in a session object. More... | |
void * | X400msGetUserPointer (struct X400msSession *session) |
Get a user pointer value from a session object. More... | |
int | X400msGetGeneric (struct X400msMessage *mp, struct X400Message **genp) |
Generate an X400Message from an X400msMessage. More... | |
int | X400msOpen (int type, const char *oraddr, const char *dirname, const char *credentials, const char *pa, int *messages, struct X400msSession **spp) |
Open a session to a Message Store (P7) or MTA (P3) in synchronous mode. More... | |
int | X400msOpenCheck (int type, const char *oraddr, const char *dirname, const char *credentials, const char *pa, const char *ret_psw, int *messages, struct X400msSession **spp) |
Open a session to a Message Store (P7) or MTA (P3) in synchronous mode, checking the password which the Message Store or MTA returns. More... | |
void | X400msSetConfigRequest (int val) |
Disable and enable configuration requests in MS Bind operations. More... | |
void | X400msCancelWait (void) |
Signal any threads waiting in X400msWait() function calls to return. More... | |
void | X400msEnableWait (void) |
Enable X400msWait() function to work normally again. More... | |
void | X400msCancelWaitSession (struct X400msSession *sp) |
Signal the thread waiting in an X400msWait() function call for the specified MS Session to return. More... | |
void | X400msEnableWaitSession (struct X400msSession *sp) |
Enable X400msWait() function to work normally again for an individual session. More... | |
int | X400msClose (struct X400msSession *sp) |
Close a X400 Session. More... | |
int | X400msList (struct X400msSession *sp, char *since_time, struct X400msListResult **lrp) |
List messages in the P7 Message Store. More... | |
int | X400msListEx (struct X400msSession *sp, char *since_time, int entryclass, struct X400msListResult **lrp) |
List messages in the P7 Message Store, specifying entryclass. More... | |
int | X400msListExAux (struct X400msSession *sp, char *since_time, int entryclass, int entrystatus, struct X400msListResult **lrp) |
List messages in the P7 Message Store, specifying entryclass and entrystatus. More... | |
int | X400msListExAuxPri (struct X400msSession *sp, char *since_time, int entryclass, int entrystatus, int priority, struct X400msListResult **lrp) |
List messages in the P7 Message Store, specifying entryclass entrystatus and priority. More... | |
int | X400msListExAuxPriBefore (struct X400msSession *sp, char *since_time, char *before_time, int entryclass, int entrystatus, int priority, struct X400msListResult **lrp) |
List messages in the P7 Message Store, specifying entryclass, entrystatus and priority, with before time. More... | |
int | X400msListGetIntParam (struct X400msListResult *lr, int paramtype, int number, int *valp) |
Get an integer attribute value from an element of a ListResult. More... | |
int | X400msListGetStrParam (struct X400msListResult *lr, int paramtype, int number, char *buffer, size_t buflen, size_t *paramlenp) |
Get a string attribute value from an element of a ListResult. More... | |
void | X400msListFree (struct X400msListResult *lr) |
Free the memory occupied by a ListResult. More... | |
int | X400msMsgNew (struct X400msSession *sp, int type, struct X400msMessage **mpp) |
Creates new message. More... | |
int | X400msMsgCountRecip (struct X400msMessage *mp, int type, int *cp) |
Returns count of addresses of given type in message object. More... | |
int | X400msMsgSend (struct X400msMessage *mp) |
Send message object. More... | |
int | X400msMsgDelete (struct X400msMessage *mp, int retain) |
Delete message object. More... | |
int | X400msMsgAddStrParam (struct X400msMessage *mp, int paramtype, const char *value, size_t length) |
Add string-valued parameter to the message. More... | |
int | X400msMsgAddIntParam (struct X400msMessage *mp, int paramtype, int value) |
Add integer-valued parameter to the message. More... | |
int | X400msMsgAddAttachment (struct X400msMessage *mp, int type, const char *string, size_t length) |
Add attachment to the message. More... | |
int | X400msMsgAddBodypart (struct X400msMessage *mp, struct X400Bodypart *bp) |
int | X400msMsgAddMessageBodyWType (struct X400msMessage *mp, struct X400Message *mbp, int type) |
Add a message body part object to a message. More... | |
int | X400msMsgAddMessageBody (struct X400msMessage *mp, struct X400Message *mbp) |
int | X400msRecipNew (struct X400msMessage *mp, int type, struct X400Recipient **rpp) |
Add new recipient to a message. More... | |
int | X400msRecipAddStrParam (struct X400Recipient *rp, int paramtype, const char *value, size_t length) |
Add string-valued parameter to the message. More... | |
int | X400msRecipAddIntParam (struct X400Recipient *rp, int paramtype, int value) |
Add integer-valued parameter to the message. More... | |
int | X400msWait (struct X400msSession *sp, int seconds, int *count) |
Wait for messages to be ready to be read. More... | |
int | X400msWaitNew (struct X400msSession *sp, int seconds, int *count) |
Wait for new messages to be ready to be read. More... | |
int | X400msMsgGet (struct X400msSession *sp, int number, struct X400msMessage **mpp, int *typep, int *seqp) |
Get message object for transfer out from MS or MTA via P3. More... | |
int | X400msMsgGetEx (struct X400msSession *sp, int number, int entryclass, struct X400msMessage **mpp, int *typep, int *seqp) |
Get message object for transfer out from MS or MTA via P3. More... | |
int | X400msMsgGetStart (struct X400msSession *sp, int number, struct X400msMessage **mpp, int *typep, int *seqp) |
Get message object for transfer out from MS or MTA via P3. More... | |
int | X400msMsgGetStartEx (struct X400msSession *sp, int number, int entryclass, struct X400msMessage **mpp, int *typep, int *seqp) |
Get message object for transfer out from MS or MTA via P3. More... | |
int | X400msMsgGetFinish (struct X400msMessage *mp, int errnum, int problem) |
Generate delivery result or error for a message. More... | |
int | X400msMsgGetStrParam (struct X400msMessage *mp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp) |
Return a string-valued parameter from the message object. More... | |
int | X400msMsgGetIntParam (struct X400msMessage *mp, int paramtype, int *valp) |
Return a integer-valued parameter from the message object. More... | |
int | X400msMsgGetAttachment (struct X400msMessage *mp, int number, int *typep, char *buffer, size_t buflen, size_t *lengthp) |
Return the data of an attachment (=bodypart) from the message object. More... | |
int | X400msMsgGetBodypart (struct X400msMessage *mp, int number, int *typep, struct X400Bodypart **bpp) |
Return a pointer to a body part object. More... | |
int | X400msMsgGetMessageBody (struct X400msMessage *mp, int number, struct X400Message **mpp) |
Return a pointer to a message part object. More... | |
int | X400msMsgGetCert (struct X400msMessage *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... | |
int | X400msMakeIPN (struct X400msMessage *mp, int non_receipt_reason, struct X400msMessage **mpp) |
Make an IPN based on the subject IPM. More... | |
int | X400msRecipGet (struct X400msMessage *mp, int type, int number, struct X400Recipient **rpp) |
Get recipient object from message. More... | |
int | X400msRecipGetStrParam (struct X400Recipient *rp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp) |
Return a string-valued parameter from the recipient object. More... | |
int | X400msRecipGetIntParam (struct X400Recipient *rp, int paramtype, int *valp) |
Return a integer-valued parameter from the recipient object. More... | |
int | X400msSetIntDefault (struct X400msSession *sp, int paramtype, int value) |
Set a default integer parameter value in a session. More... | |
int | X400msSetStrDefault (struct X400msSession *sp, int paramtype, const char *value, size_t length) |
Set a default string parameter value in a session. More... | |
int | X400msTestSecurityEnv (struct X400msSession *sp) |
Test the default Security Environment. More... | |
int | X400msRegisterAutoAction (struct X400msSession *sp, int type, int id, struct X400msAutoActionParameter *aa_param) |
Register an autoaction with the Message Store. More... | |
int | X400msDeregisterAutoAction (struct X400msSession *sp, int type, int id) |
Deregister an autoaction from the Message Store. More... | |
struct X400msAutoActionParameter * | X400msNewAutoActionParameter (void) |
Create a new (empty) autoaction parameter structure. More... | |
void | X400msFreeAutoActionParameter (struct X400msAutoActionParameter *aa_param) |
Free an autoaction parameter. More... | |
int | X400msAutoActionParameterAddRecip (struct X400msAutoActionParameter *aap, int reciptype, struct X400Recipient *recip) |
Add a receipient to the autoaction parameter. More... | |
int | X400msAutoActionParameterAddIntParam (struct X400msAutoActionParameter *aap, int paramtype, int value) |
Add integer-valued parameter to the autoaction parameter. More... | |
int | X400msAutoActionParameterAddStrParam (struct X400msAutoActionParameter *aap, int paramtype, const char *value, size_t length) |
Add string-valued parameter to the autoaction parameter. More... | |
int | X400msCheckConnection (struct X400msSession *sp) |
Check that a connection is still active. More... | |
int | X400msDLExpHistGet (struct X400msMessage *mp, int entry, struct X400DLExpHist **hist) |
Create a new DL Expansion History object from the message object. More... | |
int | X400msDLExpHistNew (struct X400msMessage *mp, struct X400DLExpHist **histp) |
Create a new DL Expansion History object, and associate it with the existing message. More... | |
int | X400msALINew (struct X400msMessage *mp, struct X400ALI **ali) |
Create a new Address List Indicator Object, and associate it with the existing message. More... | |
int | X400msALIGet (struct X400msMessage *mp, int entry, struct X400ALI **info) |
Get a Address List Indicator Object for a message object. More... | |
int | X400msPSSNew (struct X400msMessage *mp, struct X400PSS **pss, int type) |
Create a new Printable String Syntax Object, and associate it with the existing message. More... | |
int | X400msPSSGet (struct X400msMessage *mp, int type, int entry, struct X400PSS **pss) |
Get a Printable String Syntax Object for a message object. More... | |
int | X400msDistFieldNew (struct X400msMessage *mp, struct X400DistField **pss) |
Create a new P772 Distribution Field object for a message object. More... | |
int | X400msDistFieldGet (struct X400msMessage *mp, int entry, struct X400DistField **pss) |
Get a new P772 Distribution Field object for a message object. More... | |
int | X400msOtherRecipNew (struct X400msMessage *mp, struct X400OtherRecip **otherrecip) |
Create a new P772 Other Recipient object for a message object. More... | |
int | X400msOtherRecipGet (struct X400msMessage *mp, int entry, struct X400OtherRecip **otherrecip) |
Get a new P772 Other Recipient object for a message object. More... | |
int | X400msRediHistGetEnv (struct X400msMessage *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... | |
int | X400msTraceInfoGet (struct X400msMessage *mp, int entry, struct X400TraceInfo **info, int type) |
Get a Trace Info object for a message object. More... | |
int | X400msInternalTraceInfoGet (struct X400msMessage *mp, int entry, struct X400InternalTraceInfo **info) |
Get an Internal Trace Info object for a message object. More... | |
int | X400msORandDLGet (struct X400msMessage *msg, int entry, struct X400ORandDL **or_and_dl) |
Get Originator and DL expansion history object. More... | |
int | X400msGetContentOctets (struct X400msMessage *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... | |
int | X400msSetContentOctets (struct X400msMessage *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... | |
int | X400msACP127RespGet (struct X400msMessage *mp, struct X400ACP127Resp **respp) |
Get the ACP127 Notification Response object from a message. More... | |
int | X400msACP127RespNew (struct X400msMessage *mp, struct X400ACP127Resp **respp) |
Create an ACP127 Notification Response object. More... | |
struct X400ACP127Resp * | X400msACP127RespDeepCopy (struct X400msMessage *mp, struct X400ACP127Resp *orig) |
Copy an ACP127 Notification Response object. More... | |
int | X400msMsgGetRaw (struct X400msSession *sp, struct X400msMessage *mp, char *buffer, size_t buflen, size_t *buflenp) |
Get a binary representation of a message which can be subsequently be used to reconstruct the message. More... | |
int | X400msMsgFromRaw (struct X400msSession *sp, char *buffer, size_t buflen, struct X400msMessage **mpp, int *typep) |
Reconstruct a message from a binary representation. More... | |
Detailed Description
X400 MA/MS (P3/P7) Interface.
This is an API for interfacing either to an X400 MTA with P3 or an X400 MS with P7. It is suitable for building the functionality of a user agent or access unit.
It provides mechanisms for building and examining X400 message, probes and reports. It also provides mechanisms for submitting such objects into the X400, and receiving such objects on delivery.
Definition in file x400_msapi.h.