#include <sys/version.h>#include <sys/thread.h>#include <sys/socket.h>#include <sys/device.h>#include <sys/event.h>#include <sys/timer.h>#include <net/if_var.h>#include <arpa/inet.h>#include <pro/httpd.h>#include <stdlib.h>#include <stdio.h>#include <stdint.h>#include <string.h>
Go to the source code of this file.
Defines | |
| #define | __MAIN_C__ | 
| #define | UPNP_FULFIL_SPEC 0 | 
| #define | UPNP_SERVICE_STACK ((1024 * NUT_THREAD_STACK_MULT) + NUT_THREAD_STACK_ADD) | 
| #define | UPNP_CGI_NAME "upnp.cgi" | 
| #define | UPNP_UUID_PART1 "56F9C1D5-5083-4ee5-A6B3-" | 
| #define | SSDP_IP 0xfaffffefU | 
| #define | SSDP_PORT 1900 | 
| #define | SSDP_BUFFER_SIZE 512 | 
| #define | SSDP_NOTIFY_TIMEOUT 300000U | 
Functions | |
| void | NotifyTask (void *arg) | 
| void | SSDPTask (void *arg) | 
| void | upnp_Init (void) | 
| #define UPNP_SERVICE_STACK ((1024 * NUT_THREAD_STACK_MULT) + NUT_THREAD_STACK_ADD) | 
Definition at line 72 of file upnp.c.
Referenced by upnp_Init().
| #define UPNP_CGI_NAME "upnp.cgi" | 
Definition at line 75 of file upnp.c.
Referenced by upnp_Init().
| #define UPNP_UUID_PART1 "56F9C1D5-5083-4ee5-A6B3-" | 
Definition at line 76 of file upnp.c.
Referenced by SSDPTask().
| #define SSDP_IP 0xfaffffefU | 
Definition at line 78 of file upnp.c.
Referenced by SSDPTask(), and upnp_Init().
| #define SSDP_PORT 1900 | 
Definition at line 79 of file upnp.c.
Referenced by SSDPTask().
| #define SSDP_BUFFER_SIZE 512 | 
Definition at line 80 of file upnp.c.
Referenced by NotifyTask(), and SSDPTask().
| #define SSDP_NOTIFY_TIMEOUT 300000U | 
Definition at line 81 of file upnp.c.
Referenced by NotifyTask().
| void NotifyTask | ( | void * | arg | ) | 
Definition at line 318 of file upnp.c.
References malloc(), NutSleep(), NutThreadYield(), NutUdpCreateSocket(), SSDP_BUFFER_SIZE, and SSDP_NOTIFY_TIMEOUT.
Referenced by upnp_Init().

| void SSDPTask | ( | void * | arg | ) | 
Definition at line 342 of file upnp.c.
References ifnet::if_local_ip, ifnet::if_mac, inet_ntoa(), malloc(), NUT_VERSION_MAJOR, NUT_VERSION_MINOR, NUT_WAIT_INFINITE, NutSleep(), NutThreadYield(), NutUdpCreateSocket(), NutUdpReceiveFrom(), NutUdpSendTo(), sprintf, SSDP_BUFFER_SIZE, SSDP_IP, SSDP_PORT, strstr(), strtol(), and UPNP_UUID_PART1.
Referenced by upnp_Init().

| void upnp_Init | ( | void | ) | 
Definition at line 445 of file upnp.c.
References _NUTDEVICE::dev_icb, NotifyTask(), NutDeviceLookup(), NutNetIfAddMcastAddr(), NutRegisterCgi(), NutThreadCreate(), printf, puts, SSDP_IP, SSDPTask(), UPNP_CGI_NAME, and UPNP_SERVICE_STACK.
Referenced by main().
