LIBSSDP
 All Classes Files Functions Variables Typedefs Macros
Macros | Functions | Variables
main.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include "configuration.h"
#include "common_definitions.h"
#include "daemon.h"
#include "log.h"
#include "ssdp_common.h"
#include "ssdp_listener.h"
#include "ssdp_prober.h"
#include "string_utils.h"
Include dependency graph for main.c:

Go to the source code of this file.

Macros

#define DEBUG_MSG_FREQ___   0.5
 
#define DEBUG_MSG_LOCATION_HEADER   "http://127.0.0.1:80/udhisapi.xml"
 

Functions

static void cleanup (void)
 
static void exit_sig (int param)
 
static void verify_running_states (configuration_s *conf)
 
int main (int argc, char **argv)
 

Variables

static ssdp_listener_s ssdp_listener
 
static ssdp_prober_s ssdp_prober
 
static configuration_s conf
 

Detailed Description

The main file for the 'ssdpscan' tool.

Definition in file main.c.

Macro Definition Documentation

#define DEBUG_MSG_FREQ___   0.5

Set the frequency at which the messages will be received

Definition at line 38 of file main.c.

#define DEBUG_MSG_LOCATION_HEADER   "http://127.0.0.1:80/udhisapi.xml"

When using simulated messages it is mandatory to specify a UPnP device url in DEBUG_MSG_DEVICE___. This "UPnP device" can be emulated with a http server (e.g. Apache) serving the UPnP-descriptive XML file included in the abused repository (<repo>/udhisapi.xml)

Definition at line 47 of file main.c.

Function Documentation

static void cleanup ( void  )
static

Frees all global allocations.

Definition at line 78 of file main.c.

static void exit_sig ( int  param)
static

The exit callback function called on any exit signal.

Parameters
paramThe signal handler parameter (ignored).

Definition at line 89 of file main.c.

static void verify_running_states ( configuration_s conf)
static

Decides what the program will run as and does the neccessary deamonizing and forking.

Parameters
confThe global configuration to use.

Definition at line 99 of file main.c.

Variable Documentation

configuration_s conf
static

The program configuration

Definition at line 73 of file main.c.

ssdp_listener_s ssdp_listener
static

The SSDP listener

Definition at line 67 of file main.c.

ssdp_prober_s ssdp_prober
static

The SSDP prober

Definition at line 70 of file main.c.