SharkSSL™ Embedded SSL/TLS Stack
Minnow Server Helper Functions

Detailed Description

Minnow Server Helper Functions.

Functions

U8 * msCpAndInc (U8 *dest, int *dlen, const U8 *src, int slen)
 Copies 'src' to 'dest'. More...
 
U8 * msB64Encode (U8 *dest, int *dlen, const U8 *src, int slen)
 Encodes 'src' as B64 and adds the string to 'dest'. More...
 
U8 * msi2a (U8 *dest, int *dlen, U32 n)
 Formats 'n' as a string and adds the string to 'dest'. More...
 
U8 * msRespCT (U8 *dest, int *dlen, int contentLen, const U8 *extHeader)
 Adds the following HTTP response to buffer 'dest'. More...
 

Function Documentation

◆ msB64Encode()

U8 * msB64Encode ( U8 *  dest,
int *  dlen,
const U8 *  src,
int  slen 
)

Encodes 'src' as B64 and adds the string to 'dest'.

Parameters
destthe destination buffer
dlendestination buffer length
src(binary) buffer to B64 encode
slen'src' length
Returns
'dest' pointer incremented by amount of data added

◆ msCpAndInc()

U8 * msCpAndInc ( U8 *  dest,
int *  dlen,
const U8 *  src,
int  slen 
)

Copies 'src' to 'dest'.

Parameters
destthe destination buffer
dlendestination buffer length
srcbuffer to copy
slen'src' length
Returns
'dest' pointer incremented by amount of data added

◆ msi2a()

U8 * msi2a ( U8 *  dest,
int *  dlen,
U32  n 
)

Formats 'n' as a string and adds the string to 'dest'.

Parameters
destthe destination buffer
dlendestination buffer length
nthe number to format
Returns
'dest' pointer incremented by amount of data added

◆ msRespCT()

U8 * msRespCT ( U8 *  dest,
int *  dlen,
int  contentLen,
const U8 *  extHeader 
)

Adds the following HTTP response to buffer 'dest'.

HTTP/1.0 200 OK
Content-Length: ['contentLen' converted 2 string]
Parameters
destthe destination buffer
dlendestination buffer length
contentLenthe size of the static HTML page
extHeaderoptional extra headers formatted as '\r\nkey:val'
Returns
'dest' pointer incremented by amount of data added