Monero
Loading...
Searching...
No Matches
Functions | Variables
upnphttp.c File Reference
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/param.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <syslog.h>
#include <ctype.h>
#include <errno.h>
#include "config.h"
#include "upnphttp.h"
#include "upnpdescgen.h"
#include "miniupnpdpath.h"
#include "upnpsoap.h"
#include "upnpevents.h"
#include "upnputils.h"
Include dependency graph for upnphttp.c:

Functions

struct upnphttpNew_upnphttp (int s)
 
void CloseSocket_upnphttp (struct upnphttp *h)
 
void Delete_upnphttp (struct upnphttp *h)
 
static void ParseHttpHeaders (struct upnphttp *h)
 
static void Send404 (struct upnphttp *h)
 
static void Send405 (struct upnphttp *h)
 
static void Send501 (struct upnphttp *h)
 
static const char * findendheaders (const char *s, int len)
 
static void sendXMLdesc (struct upnphttp *h, char *(f)(int *))
 
static void ProcessHTTPPOST_upnphttp (struct upnphttp *h)
 
static void ProcessHttpQuery_upnphttp (struct upnphttp *h)
 
void Process_upnphttp (struct upnphttp *h)
 
int BuildHeader_upnphttp (struct upnphttp *h, int respcode, const char *respmsg, int bodylen)
 
void BuildResp2_upnphttp (struct upnphttp *h, int respcode, const char *respmsg, const char *body, int bodylen)
 
void BuildResp_upnphttp (struct upnphttp *h, const char *body, int bodylen)
 
int SendResp_upnphttp (struct upnphttp *h)
 
void SendRespAndClose_upnphttp (struct upnphttp *h)
 

Variables

static const char httpresphead []
 

Function Documentation

◆ BuildHeader_upnphttp()

int BuildHeader_upnphttp ( struct upnphttp * h,
int respcode,
const char * respmsg,
int bodylen )

◆ BuildResp2_upnphttp()

void BuildResp2_upnphttp ( struct upnphttp * h,
int respcode,
const char * respmsg,
const char * body,
int bodylen )

◆ BuildResp_upnphttp()

void BuildResp_upnphttp ( struct upnphttp * h,
const char * body,
int bodylen )

◆ CloseSocket_upnphttp()

void CloseSocket_upnphttp ( struct upnphttp * h)

◆ Delete_upnphttp()

void Delete_upnphttp ( struct upnphttp * h)

◆ findendheaders()

static const char * findendheaders ( const char * s,
int len )
static

◆ New_upnphttp()

struct upnphttp * New_upnphttp ( int s)

◆ ParseHttpHeaders()

static void ParseHttpHeaders ( struct upnphttp * h)
static

◆ Process_upnphttp()

void Process_upnphttp ( struct upnphttp * h)

◆ ProcessHTTPPOST_upnphttp()

static void ProcessHTTPPOST_upnphttp ( struct upnphttp * h)
static

◆ ProcessHttpQuery_upnphttp()

static void ProcessHttpQuery_upnphttp ( struct upnphttp * h)
static

◆ Send404()

static void Send404 ( struct upnphttp * h)
static

◆ Send405()

static void Send405 ( struct upnphttp * h)
static

◆ Send501()

static void Send501 ( struct upnphttp * h)
static

◆ SendResp_upnphttp()

int SendResp_upnphttp ( struct upnphttp * h)

◆ SendRespAndClose_upnphttp()

void SendRespAndClose_upnphttp ( struct upnphttp * h)

◆ sendXMLdesc()

static void sendXMLdesc ( struct upnphttp * h,
char * f)(int * )
static

Variable Documentation

◆ httpresphead

const char httpresphead[]
static
Initial value:
=
"%s %d %s\r\n"
"Content-Type: %s\r\n"
"Connection: close\r\n"
"Content-Length: %d\r\n"
"Server: " MINIUPNPD_SERVER_STRING "\r\n"
"Ext:\r\n"
#define MINIUPNPD_SERVER_STRING
Definition upnphttp.h:24