RDK Documentation (Open Sourced RDK Components)
|
DTCP manager manages source/sink DTCP-IP sessions and performs encryption/decryption.
DTCP-IP is a specification for copy protection of copyrighted content that is transferred over digital interfaces in home IP networks.
DTCP Manager sub-system performs data encryption and PCP packet decryption with authenticated DTCP-IP sessions.
dtcp_result_t | DTCPMgrInitialize (void) |
Initializes the DTCP Manager. More... | |
dtcp_result_t | DTCPMgrStartSource (char *ifName, int portNum) |
Starts the DTCP-IP source. More... | |
dtcp_result_t | DTCPMgrStopSource (void) |
Stops the DTCP-IP source. More... | |
dtcp_result_t | DTCPMgrCreateSourceSession (char *sinkIpAddress, int key_label, int PCPPacketSize, int maxPacketSize, DTCP_SESSION_HANDLE *handle) |
Creates a new DTCP-IP source session. More... | |
dtcp_result_t | DTCPMgrCreateSinkSession (char *srcIpAddress, int srcIpPort, BOOLEAN uniqueKey, int maxPacketSize, DTCP_SESSION_HANDLE *handle) |
Creates a new DTCP-IP sink session. More... | |
dtcp_result_t | DTCPMgrProcessPacket (DTCP_SESSION_HANDLE session, DTCPIP_Packet *packet) |
Processes a DTCP-IP packet. More... | |
dtcp_result_t | DTCPMgrReleasePacket (DTCPIP_Packet *packet) |
Releases a processed DTCP-IP packet. More... | |
dtcp_result_t | DTCPMgrDeleteDTCPSession (DTCP_SESSION_HANDLE session) |
Deletes a DTCP-IP session. More... | |
int | DTCPMgrGetNumSessions (DTCPDeviceType deviceType) |
Gets the number of active sessions. More... | |
dtcp_result_t | DTCPMgrGetSessionInfo (DTCP_SESSION_HANDLE handle, DTCPIP_Session *session) |
Gets session information. More... | |
dtcp_result_t | DTCPMgrSetLogLevel (int level) |
Sets log level. More... | |
dtcp_result_t DTCPMgrInitialize | ( | void | ) |
Initializes the DTCP Manager.
This function initializes the DTCP-IP Manager sub-system. It should be called during platform initialization.
None. |
DTCP_SUCCESS | DTCP Manager successfully initialized. |
Definition at line 31 of file dtcpmgr.cpp.
dtcp_result_t DTCPMgrStartSource | ( | char * | ifName, |
int | portNum | ||
) |
Starts the DTCP-IP source.
This function start the DTCP-IP source and begins listening for AKE requests on the specified interface and port number.
[in] | ifName | Interface name (e.g. "eth0"). |
[in] | portNum | TCP/IP port number that the source listens for AKE requests. |
DTCP_SUCCESS | Successfully started the DTCP-IP source and/or added a listener. |
Definition at line 46 of file dtcpmgr.cpp.
dtcp_result_t DTCPMgrStopSource | ( | void | ) |
Stops the DTCP-IP source.
This function stops the DTCP-IP source and removes all AKE request listeners added with DTCPMgrStartSource().
DTCP_SUCCESS | Successfully stopped the DTCP-IP source and removed all listeners. |
Definition at line 53 of file dtcpmgr.cpp.
dtcp_result_t DTCPMgrCreateSourceSession | ( | char * | sinkIpAddress, |
int | key_label, | ||
int | PCPPacketSize, | ||
int | maxPacketSize, | ||
DTCP_SESSION_HANDLE * | handle | ||
) |
Creates a new DTCP-IP source session.
This function creates a new authenticated session with a remote DTCP-IP sink.
[in] | sinkIpAddress | IP address of the remote DTCP-IP sink. |
[in] | key_label | Exchange key label, if available from streaming request. If provided, the stream will be encrypted with the session key. |
[in] | PCPPacketSize | Minimum size of a packet. If the buffer provided in DTCPMgrProcessPacket() is less than PCPPacketSize, then the PCP packet is set to PCPPacketSize and fragmented across multiple DTCPIP_Packets. This is for reducing PCP space and processing overheads for low latency low bit-rate transfers where each buffer can be very small. PCPPacketSize of 0 would return every buffer as a PCP packet. i.e. If PCPPacketSize is 64 KB and if the buffer size in DTCPMgrProcessPacket() is 1 KB, the first decrypted buffer would be a PCP packet. And after first packet, decrypted buffer wouldn't have a PCP header until 64 KB. |
[in] | maxPacketSize | Maximum size of a packet. If the DataLength provided in DTCPMgrProcessPacket() is more than MaxPacketSize, the DTCP library can reject the process request. |
[out] | handle | The address of a location to hold the handle for the specified TCP/IP session on return. |
DTCP_SUCCESS | Successfully created a DTCP-IP source session. |
Definition at line 69 of file dtcpmgr.cpp.
dtcp_result_t DTCPMgrCreateSinkSession | ( | char * | srcIpAddress, |
int | srcIpPort, | ||
BOOLEAN | uniqueKey, | ||
int | maxPacketSize, | ||
DTCP_SESSION_HANDLE * | handle | ||
) |
Creates a new DTCP-IP sink session.
This function creates a new authenticated session with a remote DTCP-IP source.
[in] | srcIpAddress | IP address of the remote DTCP-IP source. |
[in] | srcIpPort | TCP/IP port of the remote DTCP-IP source. |
[in] | uniqueKey | Flag to request unique exchange keys. (Both server and client should have 'session exchange key' support.) |
[in] | maxPacketSize | Maximum size of packet. If DataLength provided in DTCPMgrProcessPacket() is more than MaxPacketSize, the DTCP library can reject the process request. |
[out] | handle | The address of a location to hold the handle for the specified TCP/IP session on return. |
DTCP_SUCCESS | Successfully created a DTCP-IP sink session. |
Definition at line 87 of file dtcpmgr.cpp.
dtcp_result_t DTCPMgrProcessPacket | ( | DTCP_SESSION_HANDLE | session, |
DTCPIP_Packet * | packet | ||
) |
Processes a DTCP-IP packet.
This function processes a DTCP-IP packet - encrypts or decrypts buffers, depending on the session type:
[in] | session | Session handle. |
[in,out] | packet | Address of the location of the of the processed DTCP-IP packet. |
DTCP_SUCCESS | Successfully processed the packet. |
Definition at line 106 of file dtcpmgr.cpp.
dtcp_result_t DTCPMgrReleasePacket | ( | DTCPIP_Packet * | packet | ) |
Releases a processed DTCP-IP packet.
This function releases the DTCP-IP packet. The processed packet may contain DTCP Manager allocated/owned buffers/memory - this call frees up these resources.
[in] | packet | Address of the location of the DTCP-IP packet. |
DTCP_SUCCESS | Successfully released packet. |
Definition at line 115 of file dtcpmgr.cpp.
dtcp_result_t DTCPMgrDeleteDTCPSession | ( | DTCP_SESSION_HANDLE | session | ) |
Deletes a DTCP-IP session.
This function stops an active DTCP-IP session.
[in] | session | Session handle. |
DTCP_SUCCESS | Successfully deleted the session. |
Definition at line 121 of file dtcpmgr.cpp.
int DTCPMgrGetNumSessions | ( | DTCPDeviceType | deviceType | ) |
Gets the number of active sessions.
This function retrieves the total number of active sessions for the specified device type.
[in] | deviceType | DTCP-IP device type (source/sink). DTCP_UNKNOWN returns total number of sessions of all types. |
Definition at line 130 of file dtcpmgr.cpp.
dtcp_result_t DTCPMgrGetSessionInfo | ( | DTCP_SESSION_HANDLE | handle, |
DTCPIP_Session * | session | ||
) |
Gets session information.
This function retrieves information related to an active session.
[in] | handle | DTCP-IP session handle. |
[out] | session | The address of a location of the DTCP-IP session structure to fill on return. |
DTCP_SUCCESS | Successfully returned the session info. |
Definition at line 137 of file dtcpmgr.cpp.
dtcp_result_t DTCPMgrSetLogLevel | ( | int | level | ) |
Sets log level.
This function sets DTCP Manager's logging verbosity level.
[in] | level | Logging level. |
DTCP_SUCCESS | Logging level was set successfully. |
Definition at line 146 of file dtcpmgr.cpp.