#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"
Go to the source code of this file.
The main file for the 'ssdpscan' tool.
- Copyright
- 2017 Andreas Bank, andre.nosp@m.as.m.nosp@m.ikael.nosp@m..ban.nosp@m.k@gma.nosp@m.il.c.nosp@m.om
Definition in file main.c.
| #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.
| 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
-
| param | The signal handler parameter (ignored). |
Definition at line 89 of file main.c.
Decides what the program will run as and does the neccessary deamonizing and forking.
- Parameters
-
| conf | The global configuration to use. |
Definition at line 99 of file main.c.
The program configuration
Definition at line 73 of file main.c.
The SSDP listener
Definition at line 67 of file main.c.
The SSDP prober
Definition at line 70 of file main.c.