#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>
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 __MAIN_C__ |
#define UPNP_FULFIL_SPEC 0 |
#define UPNP_SERVICE_STACK ((1024 * NUT_THREAD_STACK_MULT) + NUT_THREAD_STACK_ADD) |
Referenced by upnp_Init().
#define UPNP_CGI_NAME "upnp.cgi" |
Referenced by upnp_Init().
#define UPNP_UUID_PART1 "56F9C1D5-5083-4ee5-A6B3-" |
Referenced by SSDPTask().
#define SSDP_IP 0xfaffffefU |
Referenced by SSDPTask(), and upnp_Init().
#define SSDP_PORT 1900 |
Referenced by SSDPTask().
#define SSDP_BUFFER_SIZE 512 |
Referenced by NotifyTask(), and SSDPTask().
#define SSDP_NOTIFY_TIMEOUT 300000U |
Referenced by NotifyTask().
void NotifyTask | ( | void * | arg | ) |
References malloc(), NutSleep(), NutThreadYield(), NutUdpCreateSocket(), SSDP_BUFFER_SIZE, and SSDP_NOTIFY_TIMEOUT.
Referenced by upnp_Init().
void SSDPTask | ( | void * | arg | ) |
References ifnet::if_local_ip, ifnet::if_mac, inet_ntoa(), malloc(), NULL, 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 | ) |
References _NUTDEVICE::dev_icb, NotifyTask(), NULL, NutDeviceLookup(), NutNetIfAddMcastAddr(), NutRegisterCgi(), NutThreadCreate(), printf, puts, SSDP_IP, SSDPTask(), UPNP_CGI_NAME, and UPNP_SERVICE_STACK.
Referenced by main().