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

Functions that are commonly used for SSDP Discovery. More...

int unique_service_name (char *cmd, SsdpEvent *Evt)
 Fills the fields of the event structure like DeviceType, Device UDN and Service Type.
 
SsdpSearchType ssdp_request_type1 (char *cmd)
 This function figures out the type of the SSDP search in the request.
 
int ssdp_request_type (char *cmd, SsdpEvent *Evt)
 Starts filling the SSDP event structure based upon the request received.
 
int readFromSSDPSocket (SOCKET socket)
 This function reads the data from the ssdp socket.
 
int get_ssdp_sockets (MiniServerSockArray *out)
 Creates the IPv4 and IPv6 ssdp sockets required by the control point and device operation.
 
SSDPResultDataSSDPResultData_new ()
 Constructor.
 
void SSDPResultData_delete (SSDPResultData *p)
 Destructor.
 
SSDPResultDataSSDPResultData_dup (const SSDPResultData *p)
 Copy Constructor.
 
int SSDPResultData_assign (SSDPResultData *p, const SSDPResultData *q)
 Assignment operator.
 
const UpnpDiscoverySSDPResultData_get_Param (const SSDPResultData *p)
 SSDPResultData_get_Param.
 
int SSDPResultData_set_Param (SSDPResultData *p, const UpnpDiscovery *n)
 SSDPResultData_set_Param.
 
void * SSDPResultData_get_Cookie (const SSDPResultData *p)
 SSDPResultData_get_Cookie.
 
int SSDPResultData_set_Cookie (SSDPResultData *p, void *n)
 SSDPResultData_set_Cookie.
 
Upnp_FunPtr SSDPResultData_get_CtrlptCallback (const SSDPResultData *p)
 SSDPResultData_get_CtrlptCallback.
 
int SSDPResultData_set_CtrlptCallback (SSDPResultData *p, Upnp_FunPtr n)
 SSDPResultData_set_CtrlptCallback.
 

Detailed Description

Functions that are commonly used for SSDP Discovery.

These functions are needed for both SSDP Devices and SSDP Control Points, for example to network read or write to/from an SSDP socket. They are conditional compiled with
#if INCLUDE_DEVICE_APIS == 1 || INCLUDE_CLIENT_APIS == 1

Function Documentation

◆ unique_service_name()

int unique_service_name ( char *  cmd,
SsdpEvent Evt 
)

Fills the fields of the event structure like DeviceType, Device UDN and Service Type.

Returns
On success: 0
On error: -1
Parameters
[in]cmdService Name string.
[out]EvtThe SSDP event structure partially filled by all the function.

Definition at line 585 of file ssdp_common.cpp.

+ Here is the caller graph for this function:

◆ SSDPResultData_new()

SSDPResultData * SSDPResultData_new ( )

Constructor.

Definition at line 25 of file SSDPResultData.cpp.

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

◆ ssdp_request_type1()

SsdpSearchType ssdp_request_type1 ( char *  cmd)

This function figures out the type of the SSDP search in the request.

Returns
On success: Returns appropriate search type.
On error: SSDP_ERROR
Parameters
[in]cmdcommand came in the ssdp request.

Definition at line 667 of file ssdp_common.cpp.

+ Here is the caller graph for this function:

◆ ssdp_request_type()

int ssdp_request_type ( char *  cmd,
SsdpEvent Evt 
)

Starts filling the SSDP event structure based upon the request received.

Returns
On success: 0
On error: -1
Parameters
[in]cmdcommand came in the ssdp request.
[out]EvtThe event structure partially filled by this function.

Definition at line 681 of file ssdp_common.cpp.

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

◆ readFromSSDPSocket()

int readFromSSDPSocket ( SOCKET  socket)

This function reads the data from the ssdp socket.

Returns
On success: 0
On error: -1
Parameters
[in]socketSSDP socket.

Definition at line 694 of file ssdp_common.cpp.

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

◆ get_ssdp_sockets()

int get_ssdp_sockets ( MiniServerSockArray out)

Creates the IPv4 and IPv6 ssdp sockets required by the control point and device operation.

Returns
On success: UPNP_E_SUCCESS
On error:
  • UPNP_E_OUTOF_SOCKET
  • UPNP_E_SOCKET_ERROR
  • UPNP_E_SOCKET_BIND
  • UPNP_E_NETWORK_ERROR
Parameters
[out]outArray of SSDP sockets.

Definition at line 782 of file ssdp_common.cpp.

+ Here is the call graph for this function:

◆ SSDPResultData_delete()

void SSDPResultData_delete ( SSDPResultData p)

Destructor.

Definition at line 39 of file SSDPResultData.cpp.

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

◆ SSDPResultData_dup()

SSDPResultData * SSDPResultData_dup ( const SSDPResultData p)

Copy Constructor.

Definition at line 66 of file SSDPResultData.cpp.

+ Here is the call graph for this function:

◆ SSDPResultData_assign()

int SSDPResultData_assign ( SSDPResultData p,
const SSDPResultData q 
)

Assignment operator.

Definition at line 53 of file SSDPResultData.cpp.

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

◆ SSDPResultData_get_Param()

const UpnpDiscovery * SSDPResultData_get_Param ( const SSDPResultData p)

SSDPResultData_get_Param.

Definition at line 77 of file SSDPResultData.cpp.

+ Here is the caller graph for this function:

◆ SSDPResultData_set_Param()

int SSDPResultData_set_Param ( SSDPResultData p,
const UpnpDiscovery n 
)

SSDPResultData_set_Param.

Definition at line 81 of file SSDPResultData.cpp.

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

◆ SSDPResultData_get_Cookie()

void * SSDPResultData_get_Cookie ( const SSDPResultData p)

SSDPResultData_get_Cookie.

Definition at line 91 of file SSDPResultData.cpp.

+ Here is the caller graph for this function:

◆ SSDPResultData_set_Cookie()

int SSDPResultData_set_Cookie ( SSDPResultData p,
void *  n 
)

SSDPResultData_set_Cookie.

Definition at line 93 of file SSDPResultData.cpp.

+ Here is the caller graph for this function:

◆ SSDPResultData_get_CtrlptCallback()

Upnp_FunPtr SSDPResultData_get_CtrlptCallback ( const SSDPResultData p)

SSDPResultData_get_CtrlptCallback.

Definition at line 99 of file SSDPResultData.cpp.

+ Here is the caller graph for this function:

◆ SSDPResultData_set_CtrlptCallback()

int SSDPResultData_set_CtrlptCallback ( SSDPResultData p,
Upnp_FunPtr  n 
)

SSDPResultData_set_CtrlptCallback.

Definition at line 103 of file SSDPResultData.cpp.

+ Here is the caller graph for this function: