UPnPsdk 0.1
Universal Plug and Play +, Software Development Kit
 
Loading...
Searching...
No Matches
SSDP Control Point Functions

Functions to manage SSDP for UPnP Control Points. More...

void ssdp_handle_ctrlpt_msg (http_message_t *hmsg, 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.
 

Detailed Description

Functions to manage SSDP for UPnP Control Points.

Function Documentation

◆ ssdp_handle_ctrlpt_msg()

void ssdp_handle_ctrlpt_msg ( http_message_t hmsg,
sockaddr_storage *  dest_addr,
int  timeout 
)

This function handles the ssdp messages from the devices.

These messages includes the search replies, advertisement of device coming alive and bye byes.

Parameters
[in]hmsgSSDP message from the device.
[in]dest_addrAddress of the device.
[in]timeouttimeout kept by the control point while sending search message. Only in search reply.

Definition at line 286 of file ssdp_ctrlpt.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SearchByTarget()

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:

  • "ssdp:all" : Search for all devices and services.
  • "ssdp:rootdevice" : Search for root devices only.
  • "uuid:<device-uuid>" : Search for a particular device.
  • "urn:schemas-upnp-org:device:<deviceType:v>"
  • "urn:schemas-upnp-org:service:<serviceType:v>"
  • "urn:<domain-name>:device:<deviceType:v>"
  • "urn:<domain-name>:service:<serviceType:v>"
Returns
On success: 1
On error:
  • UPNP_E_INVALID_PARAM
  • UPNP_E_INTERNAL_ERROR
  • UPNP_E_INVALID_ARGUMENT
  • UPNP_E_BUFFER_TOO_SMALL
Parameters
[in]HndThe handle of the client performing the search.
[in]MxNumber of seconds to wait, to collect all the responses.
[in]StSearch target.
[in]CookieCookie provided by control point application. This cokie will be returned to application in the callback.

Definition at line 546 of file ssdp_ctrlpt.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create_ssdp_sock_reqv4()

int create_ssdp_sock_reqv4 ( SOCKET *  ssdpReqSock)

Creates the SSDP IPv4 socket to be used by the control point.

Returns
On success: UPNP_E_SUCCESS
On error:
  • UPNP_E_OUTOF_SOCKET
Parameters
[out]ssdpReqSockSSDP IPv4 request socket to be created.

Definition at line 719 of file ssdp_ctrlpt.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create_ssdp_sock_reqv6()

int create_ssdp_sock_reqv6 ( SOCKET *  ssdpReqSock)

Creates the SSDP IPv6 socket to be used by the control point.

Returns
On success: UPNP_E_SUCCESS
On error:
  • UPNP_E_OUTOF_SOCKET
Parameters
[out]ssdpReqSockSSDP IPv6 request socket to be created.

Definition at line 748 of file ssdp_ctrlpt.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: