1.2.1.12.2 Library Interface

NameDescription
Macros
TCPIP_STACK_USE_BASE64_DECODEAuthentication requires Base64 decoding Enable basic authentication support
HTTP_CONFIG_HThis is macro HTTP_CONFIG_H.
TCPIP_HTTP_CACHE_LENMax lifetime (sec) of static responses as string
TCPIP_HTTP_CONFIG_FLAGSDefine the HTTP module configuration flags Use 0 for default See HTTP_MODULE_FLAGS definition for possible values
TCPIP_HTTP_DEFAULT_FILEIndicate what HTTP file to serve when no specific one is requested
TCPIP_HTTP_DEFAULT_LENFor buffer overrun protection. Set to longest length of above two strings.
TCPIP_HTTP_FILE_UPLOAD_ENABLEConfigure MPFS over HTTP updating Comment this line to disable updating via HTTP
TCPIP_HTTP_FILE_UPLOAD_NAMEThis is macro TCPIP_HTTP_FILE_UPLOAD_NAME.
TCPIP_HTTP_MAX_CONNECTIONSMaximum numbers of simultaneous supported HTTP connections.
TCPIP_HTTP_MAX_DATA_LENDefine the maximum data length for reading cookie and GET/POST arguments (bytes)
TCPIP_HTTP_MAX_HEADER_LENSet to length of longest string above
TCPIP_HTTP_MIN_CALLBACK_FREEDefine the minimum number of bytes free in the TX FIFO before executing callbacks
TCPIP_HTTP_NO_AUTH_WITHOUT_SSLUncomment to require secure connection before requesting a password
TCPIP_HTTP_SKT_RX_BUFF_SIZEDefine the size of the RX buffer for the HTTP socket Use 0 for default TCP socket value The default recommended value for high throughput is > 2MSS (3 KB). The performance of a socket is highly dependent on the size of its buffers so it's a good idea to use as large as possible buffers for the sockets that need high throughput.
TCPIP_HTTP_SKT_TX_BUFF_SIZEDefine the size of the TX buffer for the HTTP socket Use 0 for default TCP socket value The default recommended value for high throughput is > 2MSS (3 KB). The performance of a socket is highly dependent on the size of its buffers so it's a good idea to use as large as possible buffers for the sockets that need high throughput.
TCPIP_HTTP_TASK_RATEThe HTTP task rate, ms The default value is 33 milliseconds. The lower the rate (higher the frequency) the higher the module priority and higher module performance can be obtained The value cannot be lower than the TCPIP_STACK_TICK_RATE.
TCPIP_HTTP_TIMEOUTMax time (sec) to await more data before timing out and disconnecting the socket
TCPIP_HTTP_USE_AUTHENTICATIONEnable basic authentication support
TCPIP_HTTP_USE_COOKIESEnable cookie support
TCPIP_HTTP_USE_POSTDefine which HTTP modules to use If not using a specific module, comment it to save resources Enable POST support
TCPIP_HTTP_FREE_FUNCHTTP corresponding deallocation function, free style This is the function the HTTP will call for freeing the allocated memory Use standard C library 'free' or 0 as a default If it's 0, HTTP will use the allocation functions passed in at the stack initialization
TCPIP_HTTP_MALLOC_FUNCHTTP allocation function, malloc style This is the function the HTTP will call to allocate memory needed for file uploads. Use standard C library 'malloc' or 0 as a default If it's 0, HTTP will use the allocation functions passed in at the stack initialization
Functions
TCPIP_HTTP_ArgGetLocates a form field value in a given data array.
TCPIP_HTTP_FileIncludeWrites a file byte-for-byte to the currently loaded TCP socket.
TCPIP_HTTP_PostNameReadReads a name from a URL encoded string in the TCP buffer.
TCPIP_HTTP_PostValueReadReads a value from a URL encoded string in the TCP buffer.
TCPIP_HTTP_URLDecodeParses a string from URL encoding to plain-text.
TCPIP_HTTP_CurrentConnectionByteCountDecDecrements the connection byte count.
TCPIP_HTTP_CurrentConnectionByteCountGetReturns how many bytes are available to be read.
TCPIP_HTTP_CurrentConnectionByteCountSetSets how many bytes are available to be read.
TCPIP_HTTP_CurrentConnectionCallbackPosGetReturns the callback position indicator.
TCPIP_HTTP_CurrentConnectionCallbackPosSetSets the callback position indicator.
TCPIP_HTTP_CurrentConnectionDataBufferGetReturns pointer to connection general purpose data buffer.
TCPIP_HTTP_CurrentConnectionFileGetGet handle to current connection's file.
TCPIP_HTTP_CurrentConnectionPostSmGetGet the POST state machine state.
TCPIP_HTTP_CurrentConnectionSocketGetGet the socket for the current connection.
TCPIP_HTTP_CurrentConnectionStatusSetSets HTTP status.
TCPIP_HTTP_CurrentConnectionIsAuthorizedGetGets the authorized state for the current connection.
TCPIP_HTTP_CurrentConnectionIsAuthorizedSetSets the authorized state for the current connection.
TCPIP_HTTP_CurrentConnectionUserDataGetGets the user data parameter for the current connection.
TCPIP_HTTP_CurrentConnectionUserDataSetSets the user data parameter for the current connection.
TCPIP_HTTP_CurrentConnectionHasArgsGetChecks whether there are get or cookie arguments.
TCPIP_HTTP_CurrentConnectionPostSmSetSet the POST state machine state.
TCPIP_HTTP_CurrentConnectionStatusGetGets HTTP status.
TCPIP_HTTP_FileAuthenticateDetermines if a given file name requires authentication
TCPIP_HTTP_GetExecuteProcesses GET form field variables and cookies.
TCPIP_HTTP_PostExecuteProcesses POST form variables and data.
TCPIP_HTTP_Print_varnameInserts dynamic content into a web page
TCPIP_HTTP_UserAuthenticatePerforms validation on a specific user name and password.
TCPIP_HTTP_ActiveConnectionCountGetGets the number of active connections.
TCPIP_HTTP_CurrentConnectionHandleGetGets the connection handle of a HTTP connection.
TCPIP_HTTP_CurrentConnectionIndexGetGets the index of the HTTP connection.
TCPIP_HTTP_TaskStandard TCP/IP stack module task function.
TCPIP_HTTP_CurrentConnectionDataBufferSizeGetReturns the size of the connection general purpose data buffer.
TCPIP_HTTP_CurrentConnectionSMSetSet the HTTP current connection state Machine.
TCPIP_HTTP_CurrentConnectionUploadBufferCurrGetGets the current address of current connection upload buffer.
TCPIP_HTTP_CurrentConnectionUploadBufferCurrSetSet the current address of current connection upload buffer.
TCPIP_HTTP_CurrentConnectionUploadBufferEndGetGets the end address of current connection upload buffer.
TCPIP_HTTP_CurrentConnectionUploadBufferEndSetSet the end address of current connection upload buffer.
TCPIP_HTTP_CurrentConnectionUploadBufferStartGetGets the start address of current connection upload buffer.
TCPIP_HTTP_CurrentConnectionUploadBufferStartSetSet the start address of current connection upload buffer.
Data Types and ConstantsEnumerations
HTTP_MODULE_FLAGSHTTP module configuration flags Multiple flags can be OR-ed
HTTP_IO_RESULTResult states for execution callbacks
HTTP_FILE_TYPEFile type definitions
HTTP_READ_STATUSResult states for TCPIP_HTTP_PostNameRead, TCPIP_HTTP_PostValueRead and TCPIP_HTTP_PostReadPair
HTTP_STATUSSupported Commands and Server Response Codes
TCPIP_HTTP_CurrentConnectionHasArgsSetSets whether there are get or cookie arguments.
TCPIP_HTTP_MODULE_CONFIGHTTP module dynamic configuration data
HTTP_CONN_HANDLEHTTP connection identifier, handle of a HTTP connection