LIBSSDP
 All Classes Files Functions Variables Typedefs Macros
Macros | Functions
ssdp_prober.c File Reference
#include <arpa/inet.h>
#include <errno.h>
#include <netdb.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <unistd.h>
#include "common_definitions.h"
#include "configuration.h"
#include "log.h"
#include "net_definitions.h"
#include "net_utils.h"
#include "socket_helpers.h"
#include "ssdp_cache_output_format.h"
#include "ssdp_common.h"
#include "ssdp_filter.h"
#include "ssdp_listener.h"
#include "ssdp_message.h"
#include "ssdp_prober.h"
#include "ssdp_static_defs.h"
Include dependency graph for ssdp_prober.c:

Go to the source code of this file.

Macros

#define PROBE_MSG
 

Functions

const char * ssdp_probe_message_create (void)
 
int ssdp_prober_init (ssdp_prober_s *prober, configuration_s *conf)
 
void ssdp_prober_close (ssdp_prober_s *prober)
 
int ssdp_prober_start (ssdp_prober_s *prober, configuration_s *conf)
 

Detailed Description

Create, manage and delete a SSDP prober.

Definition in file ssdp_prober.c.

Macro Definition Documentation

#define PROBE_MSG
Value:
"M-SEARCH * HTTP/1.1\r\n" \
"Host:239.255.255.250:1900\r\n" \
"ST:urn:axis-com:service:BasicService:1\r\n" \
"Man:\"ssdp:discover\"\r\n" \
"MX:0\r\n\r\n"

A default SSDP probe (SEARCH) message.

Definition at line 31 of file ssdp_prober.c.

Function Documentation

const char* ssdp_probe_message_create ( void  )

Create a standard SSDP probe message.

Returns
A string containing a SSDP search/probe message.

Definition at line 38 of file ssdp_prober.c.

void ssdp_prober_close ( ssdp_prober_s prober)

Close the passed SSDP prober.

Parameters
listenerThe SSDP prober to close.

Definition at line 85 of file ssdp_prober.c.

int ssdp_prober_init ( ssdp_prober_s prober,
configuration_s conf 
)

Create a SSDP prober. It is used to probe/scan the network in order to discover the existing SSDP-capable devices on the network.

Parameters
proberThe prober to init.
confthe global configuration.
Returns
0 on success, non-0 value on error.

Definition at line 42 of file ssdp_prober.c.

int ssdp_prober_start ( ssdp_prober_s prober,
configuration_s conf 
)

Tells the SSDP prober to probe/scan for SSDP-capable nodes.

Parameters
proberThe prober to start.
confThe global configuration to use.
Returns
0 on success, non-0 value on error.

Definition at line 94 of file ssdp_prober.c.