![]() |
![]() |
Data Structures | |
struct | Rm_Packet |
RM transport layer packet. More... | |
struct | Rm_TransportCallouts |
RM transport callout functions used by RM to allocate and send RM packets via the application data paths between RM instances. More... | |
struct | Rm_TransportCfg |
RM transport registration configuration structure. More... | |
struct | Rm_TransportReCfg |
RM transport reconfiguration structure. More... | |
Defines | |
#define | RM_TRANSPORT_PACKET_MAX_SIZE_BYTES (256) |
Maximum size of RM transport packet. | |
Typedefs | |
typedef void * | Rm_TransportHandle |
RM transport handle. | |
typedef void * | Rm_AppTransportHandle |
Application transport handle. Void casted application transport data structure. The Rm_AppTransportHandle provided by the application could be anything from a queue number to a pointer to an application transport data structure. RM will provide a Rm_AppTransportHandle to the application any time RM wants to alloc or send a packet via the transport callouts. | |
typedef void * | Rm_PacketHandle |
A void pointer to the start of a registered application transport packet buffer. The Rm_PacketHandle may be different from the Rm_Packet pointer based on the application transport. For example, for a QMSS based transport the Rm_PacketHandle may point to the beginning of a Host descriptor where as the Rm_Packet pointer would point to the beginning of the data buffer linked with the Host descriptor. | |
Enumerations | |
enum | Rm_pktType { Rm_pktType_RESOURCE_REQUEST = 0, Rm_pktType_RESOURCE_RESPONSE, Rm_pktType_NAMESERVER_REQUEST, Rm_pktType_NAMESERVER_RESPONSE } |
RM packet types. More... | |
Functions | |
Rm_TransportHandle | Rm_transportRegister (const Rm_TransportCfg *transportCfg, int32_t *result) |
int32_t | Rm_transportReconfig (Rm_TransportHandle transportHandle, const Rm_TransportReCfg *transportReCfg) |
int32_t | Rm_transportUnregister (Rm_TransportHandle transportHandle) |
int32_t | Rm_receiveGetPktServiceSrcName (const Rm_Packet *pkt, char *serviceInstName, int32_t charBufLen) |
int32_t | Rm_receiveGetPktSrcName (const Rm_Packet *pkt, char *pktInstName, int32_t charBufLen) |
int32_t | Rm_receivePacket (Rm_TransportHandle transportHandle, const Rm_Packet *pkt) |
enum Rm_pktType |
int32_t Rm_receiveGetPktServiceSrcName | ( | const Rm_Packet * | pkt, |
char * | serviceInstName, | ||
int32_t | charBufLen | ||
) |
Description
This function returns the RM instance name from which the service encapsulated within the RM packet originated
Restrictions: This API is only valid for Rm_pktType_RESOURCE_REQUEST and Rm_pktType_NAMESERVER_REQUEST packet types
[in] | pkt | RM packet to extract service source instance name from. |
[out] | serviceInstName | Pointer to a character array that will contain the RM instance name that originated the service request. The character array MUST be RM_NAME_MAX_CHARS bytes in length |
[in] | charBufLen | Length of the provided pktInstName buffer |
Success | - RM_OK |
Failure | - RM_ERROR_PKT_AND_SERVICE_SRC_NOT_AVAIL Failure - RM_ERROR_SRC_NAME_BUF_INVALID_SIZE |
int32_t Rm_receiveGetPktSrcName | ( | const Rm_Packet * | pkt, |
char * | pktInstName, | ||
int32_t | charBufLen | ||
) |
Description
This function returns the RM instance name from which the RM packet originated
Restrictions: This API is only valid for Rm_pktType_RESOURCE_REQUEST and Rm_pktType_NAMESERVER_REQUEST packet types
[in] | pkt | RM packet to extract packet source instance name from. |
[out] | pktInstName | Pointer to a character array that will contain the RM instance name that originated the RM request packet. The character array MUST be RM_NAME_MAX_CHARS bytes in length |
[in] | charBufLen | Length of the provided pktInstName buffer |
Success | - RM_OK |
Failure | - RM_ERROR_PKT_AND_SERVICE_SRC_NOT_AVAIL Failure - RM_ERROR_SRC_NAME_BUF_INVALID_SIZE |
int32_t Rm_receivePacket | ( | Rm_TransportHandle | transportHandle, |
const Rm_Packet * | pkt | ||
) |
Description
This function is called by the application when it has received a RM packet for processing. The application provides the transportHandle associated with the RM instance that should receive the packet and a pointer to the data buffer containing the Rm_Packet.
RM assumes that the application will free the data buffer containing the Rm_Packet after RM has finished processing the packet.
[in] | transportHandle | RM transportHandle containing the instance that should process the received packet. |
[in] | pkt | Pointer to the data buffer containing the Rm_Packet |
int32_t Rm_transportReconfig | ( | Rm_TransportHandle | transportHandle, |
const Rm_TransportReCfg * | transportReCfg | ||
) |
Description
This function reconfigures an existing transport handle using the provided transport configurations
[in] | transportHandle | Transport handle to unregister. The RM instance that the handle will be unregistered from is contained within the transportHandle. |
[in] | transportReCfg | Pointer to the transport registration configuration structure. |
Success | - RM_OK |
Failure | - RM_ERROR_TRANSPORT_HANDLE_DOES_NOT_EXIST |
Rm_TransportHandle Rm_transportRegister | ( | const Rm_TransportCfg * | transportCfg, |
int32_t * | result | ||
) |
Description
This function is used to register transports with RM for sending and receiving packets between RM instances over application transport data paths.
RM Transport Restrictions: a) RM Servers cannot register with other Servers b) RM CDs cannot register with other CDs c) RM Clients cannot register with other Clients d) Clients cannot register with more than one CD or Server e) Clients cannot register with both a CD and Server (either or) f) CDs cannot register with more than one Server
[in] | transportCfg | Pointer to the transport registration configuration structure. |
[out] | result | Pointer to a signed int used to return any errors encountered during the transport registration process. |
Success | - RM_TransportHandle and result = RM_OK |
Failure | - NULL RM_TransportHandle and result = RM_ERROR_INVALID_REMOTE_INST_TYPE |
Failure | - NULL RM_TransportHandle and result = RM_ERROR_ALREADY_REGD_SERVER_OR_CD |
Failure | - NULL RM_TransportHandle and result = RM_ERROR_TRANSPORT_ALLOC_PKT_NOT_REGD |
Failure | - NULL RM_TransportHandle and result = RM_ERROR_TRANSPORT_SEND_NOT_REGD |
int32_t Rm_transportUnregister | ( | Rm_TransportHandle | transportHandle | ) |
Description
This function unregisters the provided transportHandle from the RM instance
[in] | transportHandle | Transport handle to unregister. The RM instance that the handle will be unregistered from is contained within the transportHandle. |
Success | - RM_OK |
Failure | - RM_ERROR_TRANSPORT_HANDLE_DOES_NOT_EXIST |