SSP_MULTICAST

Section: User Manuals (3)
Updated: JULY 2001

 

NAME

SSP_multicast, SSP_scat_multicast - Multicast message to groups  

SYNOPSIS

#include <ssp.h>

int SSP_multicast(mailbox mbox, service service_type, const char *group, int16 mess_type, int mess_len, const char *mess);
int SSP_scat_multicast(mailbox mbox, service service_type, const char *group, int16 mess_type, const scatter scat_mess);


 

DESCRIPTION

SSP_multicast and its variants all can multicast a message to a group. The message is sent on a particular connection and is marked as having come from the connection who sent it. The service_type is a type field that should be set to the service this message requires. The valid flags for messages are:

UNRELIABLE_MESS
RELIABLE_MESS
FIFO_MESS
CAUSAL_MESS
AGREED_MESS
SAFE_MESS

This type can be bit ORed with other flags like SELF_DISCARD or ENCRYPT_MESS if desired. SELF_DISCARD specifies that the message is sent to all the members of the group, but the sender and ENCRYPT_MESS specifies that the message will be encrypted.

The group string should include the name of the group to send to. The group has a string name of no more then MAX_GROUP_NAME chars.

The mess_type is a SHORT int (16 bits) which can be used by the application arbitrarily. The intent is that it could be used to NAME different kinds of data messages so they can be differentiated without looking into the body of the message. This value will be endian corrected before receiving.

If the non-scatter varients are being used then a single buffer is passed to the multicast call specifying the full message to be sent. The mess_len field gives the length in bytes of the message. While the mess field is a pointer to the buffer containing the message. For a scatter call both of these are replaced with one pointer, scat_mess, to a scatter structure, which is just like an iovec. This allows messages made up of several parts to be sent without an extra copy on systems which support scatter-gather.  

RETURN VALUES

Returns the number of bytes sent on success or one of the following errors ( < 0 ):
ILLEGAL_SESSION
The mbox given to multicast on was illegal.
CONNECTION_CLOSED
During communication to send the message errors occured and the send could not be completed.
ILLEGAL_PARAM
A call was made with an illegal size (negative)
ILLEGAL_STATE
A send call was made in a prohibited state: such as sending messages to a group after sending a flush to the group and before receiving a membership in that group, or sending a flush before receiving a flush request or after having already sent a flush.
ILLEGAL_RECEIVERS
A send call to a group with SUBGROUP_CAST set specified receivers that weren't legal for that group.
ILLEGAL_MESSAGE
The message had an illegal structure, like a scatter not filled out correctly, or a send with an illegal scatter (num_elements was illegal (size < 0 || size > FL_MAX_SCATTER_ELEMENTS) or a scatter buffer size was negative.
ILLEGAL_MESSAGE_TYPE
A send call used reserved a message type (see MIN_LEGAL_MESS_TYPE in fl.h)
GROUP_NOT_SECURE
The group that you sent to have not finish yet the key agreement algorithm and there is no group key to be used for encryting data.
 

BUGS

None.  

AUTHOR

Cristina Nita-Rotaru <crisn@cnds.jhu.edu>


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUES
BUGS
AUTHOR
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 21:15:38 GMT, July 06, 2001