mUPnP for C
http_packet.c File Reference
#include <mupnp/http/http.h>
#include <mupnp/util/log.h>
#include <mupnp/net/interface.h>
#include <limits.h>

Macros

#define READBUF_LENGTH   1024
 

Functions

mUpnpHttpPacketmupnp_http_packet_new ()
 
void mupnp_http_packet_delete (mUpnpHttpPacket *httpPkt)
 
void mupnp_http_packet_init (mUpnpHttpPacket *httpPkt)
 
void mupnp_http_packet_clean (mUpnpHttpPacket *httpPkt)
 
void mupnp_http_packet_clear (mUpnpHttpPacket *httpPkt)
 
void mupnp_http_packet_setheadervalue (mUpnpHttpPacket *httpPkt, const char *name, const char *value)
 
void mupnp_http_packet_setheaderinteger (mUpnpHttpPacket *httpPkt, const char *name, int value)
 
void mupnp_http_packet_setheaderlong (mUpnpHttpPacket *httpPkt, const char *name, long value)
 
void mupnp_http_packet_setheadersizet (mUpnpHttpPacket *httpPkt, const char *name, size_t value)
 
void mupnp_http_packet_setheaderssizet (mUpnpHttpPacket *httpPkt, const char *name, ssize_t value)
 
const char * mupnp_http_packet_getheadervalue (mUpnpHttpPacket *httpPkt, const char *name)
 
int mupnp_http_packet_getheaderinteger (mUpnpHttpPacket *httpPkt, const char *name)
 
long mupnp_http_packet_getheaderlong (mUpnpHttpPacket *httpPkt, const char *name)
 
size_t mupnp_http_packet_getheadersizet (mUpnpHttpPacket *httpPkt, const char *name)
 
ssize_t mupnp_http_packet_getheaderssizet (mUpnpHttpPacket *httpPkt, const char *name)
 
void mupnp_http_packet_sethost (mUpnpHttpPacket *httpPkt, const char *addr, int port)
 
void mupnp_http_packet_post (mUpnpHttpPacket *httpPkt, mUpnpSocket *sock)
 
void mupnp_http_packet_read_headers (mUpnpHttpPacket *httpPkt, mUpnpSocket *sock, char *lineBuf, size_t lineBufSize)
 
size_t mupnp_http_packet_read_chunk (mUpnpHttpPacket *httpPkt, mUpnpSocket *sock, char *lineBuf, size_t lineBufSize)
 
bool mupnp_http_packet_read_body (mUpnpHttpPacket *httpPkt, mUpnpSocket *sock, char *lineBuf, size_t lineBufSize)
 
bool mupnp_http_packet_read (mUpnpHttpPacket *httpPkt, mUpnpSocket *sock, bool onlyHeader, char *lineBuf, size_t lineBufSize)
 
size_t mupnp_http_packet_getheadersize (mUpnpHttpPacket *httpPkt)
 
void mupnp_http_packet_copy (mUpnpHttpPacket *destHttpPkt, mUpnpHttpPacket *srcHttpPkt)
 
void mupnp_http_packet_print (mUpnpHttpPacket *httpPkt)
 

Macro Definition Documentation

◆ READBUF_LENGTH

#define READBUF_LENGTH   1024

Function Documentation

◆ mupnp_http_packet_clean()

void mupnp_http_packet_clean ( mUpnpHttpPacket * httpPkt)

◆ mupnp_http_packet_clear()

void mupnp_http_packet_clear ( mUpnpHttpPacket * httpPkt)

◆ mupnp_http_packet_copy()

void mupnp_http_packet_copy ( mUpnpHttpPacket * destHttpPkt,
mUpnpHttpPacket * srcHttpPkt )

◆ mupnp_http_packet_delete()

void mupnp_http_packet_delete ( mUpnpHttpPacket * httpPkt)

◆ mupnp_http_packet_getheaderinteger()

int mupnp_http_packet_getheaderinteger ( mUpnpHttpPacket * httpPkt,
const char * name )

◆ mupnp_http_packet_getheaderlong()

long mupnp_http_packet_getheaderlong ( mUpnpHttpPacket * httpPkt,
const char * name )

◆ mupnp_http_packet_getheadersize()

size_t mupnp_http_packet_getheadersize ( mUpnpHttpPacket * httpPkt)

◆ mupnp_http_packet_getheadersizet()

size_t mupnp_http_packet_getheadersizet ( mUpnpHttpPacket * httpPkt,
const char * name )

◆ mupnp_http_packet_getheaderssizet()

ssize_t mupnp_http_packet_getheaderssizet ( mUpnpHttpPacket * httpPkt,
const char * name )

◆ mupnp_http_packet_getheadervalue()

const char * mupnp_http_packet_getheadervalue ( mUpnpHttpPacket * httpPkt,
const char * name )

◆ mupnp_http_packet_init()

void mupnp_http_packet_init ( mUpnpHttpPacket * httpPkt)

◆ mupnp_http_packet_new()

mUpnpHttpPacket * mupnp_http_packet_new ( void )

◆ mupnp_http_packet_post()

void mupnp_http_packet_post ( mUpnpHttpPacket * httpPkt,
mUpnpSocket * sock )

◆ mupnp_http_packet_print()

void mupnp_http_packet_print ( mUpnpHttpPacket * httpPkt)

◆ mupnp_http_packet_read()

bool mupnp_http_packet_read ( mUpnpHttpPacket * httpPkt,
mUpnpSocket * sock,
bool onlyHeader,
char * lineBuf,
size_t lineBufSize )

◆ mupnp_http_packet_read_body()

bool mupnp_http_packet_read_body ( mUpnpHttpPacket * httpPkt,
mUpnpSocket * sock,
char * lineBuf,
size_t lineBufSize )

◆ mupnp_http_packet_read_chunk()

size_t mupnp_http_packet_read_chunk ( mUpnpHttpPacket * httpPkt,
mUpnpSocket * sock,
char * lineBuf,
size_t lineBufSize )

◆ mupnp_http_packet_read_headers()

void mupnp_http_packet_read_headers ( mUpnpHttpPacket * httpPkt,
mUpnpSocket * sock,
char * lineBuf,
size_t lineBufSize )

◆ mupnp_http_packet_setheaderinteger()

void mupnp_http_packet_setheaderinteger ( mUpnpHttpPacket * httpPkt,
const char * name,
int value )

◆ mupnp_http_packet_setheaderlong()

void mupnp_http_packet_setheaderlong ( mUpnpHttpPacket * httpPkt,
const char * name,
long value )

◆ mupnp_http_packet_setheadersizet()

void mupnp_http_packet_setheadersizet ( mUpnpHttpPacket * httpPkt,
const char * name,
size_t value )

◆ mupnp_http_packet_setheaderssizet()

void mupnp_http_packet_setheaderssizet ( mUpnpHttpPacket * httpPkt,
const char * name,
ssize_t value )

◆ mupnp_http_packet_setheadervalue()

void mupnp_http_packet_setheadervalue ( mUpnpHttpPacket * httpPkt,
const char * name,
const char * value )

◆ mupnp_http_packet_sethost()

void mupnp_http_packet_sethost ( mUpnpHttpPacket * httpPkt,
const char * addr,
int port )