Manage "Step 1: Discovery" of the UPnP+™ specification for Control Points with SSDP. More...
#include <ssdp_ctrlpt.hpp>
#include "SSDPResultDataCallback.hpp"
#include <statcodes.hpp>
#include <upnpapi.hpp>
#include <umock/sys_socket.hpp>
#include <umock/pupnp_sock.hpp>
Go to the source code of this file.
Functions | |
void | ssdp_handle_ctrlpt_msg (http_message_t *hmsg, struct sockaddr_storage *dest_addr, int timeout) |
This function handles the ssdp messages from the devices. | |
int | SearchByTarget (int Hnd, int Mx, char *St, void *Cookie) |
Creates and send the search request for a specific URL. | |
int | create_ssdp_sock_reqv4 (SOCKET *ssdpReqSock) |
Creates the SSDP IPv4 socket to be used by the control point. | |
int | create_ssdp_sock_reqv6 (SOCKET *ssdpReqSock) |
Creates the SSDP IPv6 socket to be used by the control point. | |
Scope restricted to file | |
void | anonymous_namespace{ssdp_ctrlpt.cpp}::send_search_result (void *data) |
Sends a callback to the control point application with a SEARCH result. | |
int | anonymous_namespace{ssdp_ctrlpt.cpp}::CreateClientRequestPacket (char *RqstBuf, size_t RqstBufSize, int Mx, char *SearchTarget, int AddressFamily) |
Creates a HTTP search request packet depending on the input parameter. | |
int | anonymous_namespace{ssdp_ctrlpt.cpp}::CreateClientRequestPacketUlaGua (char *RqstBuf, size_t RqstBufSize, int Mx, char *SearchTarget, int AddressFamily) |
Creates a HTTP search request packet for IPv6 UlaGua depending on the input parameter. | |
void | anonymous_namespace{ssdp_ctrlpt.cpp}::searchExpired (void *arg) |
Remove search Target from list and call client back. | |
Manage "Step 1: Discovery" of the UPnP+™ specification for Control Points with SSDP.
Definition in file ssdp_ctrlpt.cpp.
int SearchByTarget | ( | int | Hnd, |
int | Mx, | ||
char * | St, | ||
void * | Cookie | ||
) |
Creates and send the search request for a specific URL.
This function implements the search request of the discovery phase. A M-SEARCH request is sent on the SSDP channel for both IPv4 and IPv6 addresses. The search target(ST) is required and must be one of the following:
[in] | Hnd | The handle of the client performing the search. |
[in] | Mx | Number of seconds to wait, to collect all the responses. |
[in] | St | Search target. |
[in] | Cookie | Cookie provided by control point application. This cokie will be returned to application in the callback. |
Definition at line 546 of file ssdp_ctrlpt.cpp.
int create_ssdp_sock_reqv4 | ( | SOCKET * | ssdpReqSock | ) |
Creates the SSDP IPv4 socket to be used by the control point.
[out] | ssdpReqSock | SSDP IPv4 request socket to be created. |
Definition at line 719 of file ssdp_ctrlpt.cpp.
int create_ssdp_sock_reqv6 | ( | SOCKET * | ssdpReqSock | ) |
Creates the SSDP IPv6 socket to be used by the control point.
[out] | ssdpReqSock | SSDP IPv6 request socket to be created. |
Definition at line 748 of file ssdp_ctrlpt.cpp.