Sophie

Sophie

distrib > Fedora > 20 > x86_64 > media > updates > by-pkgid > c579c38484b8ffa244858626df1128ca > files > 278

libhtp-doc-0.5.6-3.fc20.noarch.rpm

\hypertarget{structhtp__mpartp__t}{\section{htp\-\_\-mpartp\-\_\-t Struct Reference}
\label{structhtp__mpartp__t}\index{htp\-\_\-mpartp\-\_\-t@{htp\-\_\-mpartp\-\_\-t}}
}


{\ttfamily \#include $<$htp\-\_\-multipart\-\_\-private.\-h$>$}

\subsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
\hyperlink{structhtp__multipart__t}{htp\-\_\-multipart\-\_\-t} \hyperlink{structhtp__mpartp__t_a1280461a09929f729c0b5e031dc32cf1}{multipart}
\item 
\hyperlink{structhtp__cfg__t}{htp\-\_\-cfg\-\_\-t} $\ast$ \hyperlink{structhtp__mpartp__t_aebcb74f1ef2edc68aea5ab75292a68cb}{cfg}
\item 
int \hyperlink{structhtp__mpartp__t_afc7e51f47a82bcb8ffa0781c40f5fa94}{extract\-\_\-files}
\item 
int \hyperlink{structhtp__mpartp__t_ad46b0f9389e164b88cf5940311b8607a}{extract\-\_\-limit}
\item 
char $\ast$ \hyperlink{structhtp__mpartp__t_a4d654d176e4016b2a51d80901880f594}{extract\-\_\-dir}
\item 
int \hyperlink{structhtp__mpartp__t_a5addc201a361b8bd928795c62e4f7019}{file\-\_\-count}
\item 
int($\ast$ \hyperlink{structhtp__mpartp__t_a9c7f201a205000e663d83f6142ccc485}{handle\-\_\-data} )(\hyperlink{structhtp__mpartp__t}{htp\-\_\-mpartp\-\_\-t} $\ast$mpartp, const unsigned char $\ast$data, size\-\_\-t len, int line\-\_\-end)
\item 
int($\ast$ \hyperlink{structhtp__mpartp__t_a077a9e8584cdebecf0d6d7bbbe8c90d3}{handle\-\_\-boundary} )(\hyperlink{structhtp__mpartp__t}{htp\-\_\-mpartp\-\_\-t} $\ast$mpartp)
\item 
enum \hyperlink{htp__multipart__private_8h_a6cd627720a18a525cbc0da80bbb457e3}{htp\-\_\-multipart\-\_\-state\-\_\-t} \hyperlink{structhtp__mpartp__t_a748d47d47fc5efa6dbd0c5531ee4dada}{parser\-\_\-state}
\item 
size\-\_\-t \hyperlink{structhtp__mpartp__t_a0b0fc08efc45aa608b0fad63763f525a}{boundary\-\_\-match\-\_\-pos}
\item 
\hyperlink{structhtp__multipart__part__t}{htp\-\_\-multipart\-\_\-part\-\_\-t} $\ast$ \hyperlink{structhtp__mpartp__t_a6c565934083e7c12d1034b540192ede1}{current\-\_\-part}
\item 
enum \hyperlink{htp__multipart__private_8h_ab028c14c6696b021fa4d0897ab1d0c5a}{htp\-\_\-part\-\_\-mode\-\_\-t} \hyperlink{structhtp__mpartp__t_aef5013ee0d5b012aa95ed62453d1dcc0}{current\-\_\-part\-\_\-mode}
\item 
\hyperlink{structbstr__builder__t}{bstr\-\_\-builder\-\_\-t} $\ast$ \hyperlink{structhtp__mpartp__t_aad3c4f1ece7479554b7fa55c840ba823}{boundary\-\_\-pieces}
\item 
\hyperlink{structbstr__builder__t}{bstr\-\_\-builder\-\_\-t} $\ast$ \hyperlink{structhtp__mpartp__t_a4e6a7a45f36871ec9b44b9dc09dfa36b}{part\-\_\-header\-\_\-pieces}
\item 
\hyperlink{bstr_8h_ad24e3759c8d17c13ae2f05d9dde4d0b6}{bstr} $\ast$ \hyperlink{structhtp__mpartp__t_a7b83618f368ff1e190a847d1296a6ecc}{pending\-\_\-header\-\_\-line}
\item 
\hyperlink{structbstr__builder__t}{bstr\-\_\-builder\-\_\-t} $\ast$ \hyperlink{structhtp__mpartp__t_a4984a55fc49dd68483e674e72b6c9ece}{part\-\_\-data\-\_\-pieces}
\item 
size\-\_\-t \hyperlink{structhtp__mpartp__t_a14a4a9222e8511a872380dfa75dd4a46}{boundary\-\_\-candidate\-\_\-pos}
\item 
int \hyperlink{structhtp__mpartp__t_a56da3e0c079a4a75a94251f716a9c6ee}{cr\-\_\-aside}
\item 
int \hyperlink{structhtp__mpartp__t_a06bb613acf5b4b3dbaa0ae5c15a15336}{gave\-\_\-up\-\_\-data}
\end{DoxyCompactItemize}


\subsection{Field Documentation}
\hypertarget{structhtp__mpartp__t_a14a4a9222e8511a872380dfa75dd4a46}{\index{htp\-\_\-mpartp\-\_\-t@{htp\-\_\-mpartp\-\_\-t}!boundary\-\_\-candidate\-\_\-pos@{boundary\-\_\-candidate\-\_\-pos}}
\index{boundary\-\_\-candidate\-\_\-pos@{boundary\-\_\-candidate\-\_\-pos}!htp_mpartp_t@{htp\-\_\-mpartp\-\_\-t}}
\subsubsection[{boundary\-\_\-candidate\-\_\-pos}]{\setlength{\rightskip}{0pt plus 5cm}size\-\_\-t htp\-\_\-mpartp\-\_\-t\-::boundary\-\_\-candidate\-\_\-pos}}\label{structhtp__mpartp__t_a14a4a9222e8511a872380dfa75dd4a46}
The offset of the current boundary candidate, relative to the most recent data chunk (first unprocessed chunk of data). \hypertarget{structhtp__mpartp__t_a0b0fc08efc45aa608b0fad63763f525a}{\index{htp\-\_\-mpartp\-\_\-t@{htp\-\_\-mpartp\-\_\-t}!boundary\-\_\-match\-\_\-pos@{boundary\-\_\-match\-\_\-pos}}
\index{boundary\-\_\-match\-\_\-pos@{boundary\-\_\-match\-\_\-pos}!htp_mpartp_t@{htp\-\_\-mpartp\-\_\-t}}
\subsubsection[{boundary\-\_\-match\-\_\-pos}]{\setlength{\rightskip}{0pt plus 5cm}size\-\_\-t htp\-\_\-mpartp\-\_\-t\-::boundary\-\_\-match\-\_\-pos}}\label{structhtp__mpartp__t_a0b0fc08efc45aa608b0fad63763f525a}
Keeps track of the current position in the boundary matching progress. When this field reaches boundary\-\_\-len, we have a boundary match. \hypertarget{structhtp__mpartp__t_aad3c4f1ece7479554b7fa55c840ba823}{\index{htp\-\_\-mpartp\-\_\-t@{htp\-\_\-mpartp\-\_\-t}!boundary\-\_\-pieces@{boundary\-\_\-pieces}}
\index{boundary\-\_\-pieces@{boundary\-\_\-pieces}!htp_mpartp_t@{htp\-\_\-mpartp\-\_\-t}}
\subsubsection[{boundary\-\_\-pieces}]{\setlength{\rightskip}{0pt plus 5cm}{\bf bstr\-\_\-builder\-\_\-t}$\ast$ htp\-\_\-mpartp\-\_\-t\-::boundary\-\_\-pieces}}\label{structhtp__mpartp__t_aad3c4f1ece7479554b7fa55c840ba823}
Used for buffering when a potential boundary is fragmented across many input data buffers. On a match, the data stored here is discarded. When there is no match, the buffer is processed as data (belonging to the currently active part). \hypertarget{structhtp__mpartp__t_aebcb74f1ef2edc68aea5ab75292a68cb}{\index{htp\-\_\-mpartp\-\_\-t@{htp\-\_\-mpartp\-\_\-t}!cfg@{cfg}}
\index{cfg@{cfg}!htp_mpartp_t@{htp\-\_\-mpartp\-\_\-t}}
\subsubsection[{cfg}]{\setlength{\rightskip}{0pt plus 5cm}{\bf htp\-\_\-cfg\-\_\-t}$\ast$ htp\-\_\-mpartp\-\_\-t\-::cfg}}\label{structhtp__mpartp__t_aebcb74f1ef2edc68aea5ab75292a68cb}
\hypertarget{structhtp__mpartp__t_a56da3e0c079a4a75a94251f716a9c6ee}{\index{htp\-\_\-mpartp\-\_\-t@{htp\-\_\-mpartp\-\_\-t}!cr\-\_\-aside@{cr\-\_\-aside}}
\index{cr\-\_\-aside@{cr\-\_\-aside}!htp_mpartp_t@{htp\-\_\-mpartp\-\_\-t}}
\subsubsection[{cr\-\_\-aside}]{\setlength{\rightskip}{0pt plus 5cm}int htp\-\_\-mpartp\-\_\-t\-::cr\-\_\-aside}}\label{structhtp__mpartp__t_a56da3e0c079a4a75a94251f716a9c6ee}
When we encounter a C\-R as the last byte in a buffer, we don't know if the byte is part of a C\-R\-L\-F combination. If it is, then the C\-R might be a part of a boundary. But if it is not, it's current part's data. Because we know how to handle everything before the C\-R, we do, and we use this flag to indicate that a C\-R byte is effectively being buffered. This is probably a case of premature optimization, but I am going to leave it in for now. \hypertarget{structhtp__mpartp__t_a6c565934083e7c12d1034b540192ede1}{\index{htp\-\_\-mpartp\-\_\-t@{htp\-\_\-mpartp\-\_\-t}!current\-\_\-part@{current\-\_\-part}}
\index{current\-\_\-part@{current\-\_\-part}!htp_mpartp_t@{htp\-\_\-mpartp\-\_\-t}}
\subsubsection[{current\-\_\-part}]{\setlength{\rightskip}{0pt plus 5cm}{\bf htp\-\_\-multipart\-\_\-part\-\_\-t}$\ast$ htp\-\_\-mpartp\-\_\-t\-::current\-\_\-part}}\label{structhtp__mpartp__t_a6c565934083e7c12d1034b540192ede1}
Pointer to the part that is currently being processed. \hypertarget{structhtp__mpartp__t_aef5013ee0d5b012aa95ed62453d1dcc0}{\index{htp\-\_\-mpartp\-\_\-t@{htp\-\_\-mpartp\-\_\-t}!current\-\_\-part\-\_\-mode@{current\-\_\-part\-\_\-mode}}
\index{current\-\_\-part\-\_\-mode@{current\-\_\-part\-\_\-mode}!htp_mpartp_t@{htp\-\_\-mpartp\-\_\-t}}
\subsubsection[{current\-\_\-part\-\_\-mode}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf htp\-\_\-part\-\_\-mode\-\_\-t} htp\-\_\-mpartp\-\_\-t\-::current\-\_\-part\-\_\-mode}}\label{structhtp__mpartp__t_aef5013ee0d5b012aa95ed62453d1dcc0}
This parser consists of two layers\-: the outer layer is charged with finding parts, and the internal layer handles part data. There is an interesting interaction between the two parsers. Because the outer layer is seeing every line (it has to, in order to test for boundaries), it also effectively also splits input into lines. The inner parser deals with two areas\-: first is the headers, which are line based, followed by binary data. When parsing headers, the inner parser can reuse the lines identified by the outer parser. In this variable we keep the current parsing mode of the part, which helps us process input data more efficiently. The possible values are M\-U\-L\-T\-I\-P\-A\-R\-T\-\_\-\-M\-O\-D\-E\-\_\-\-L\-I\-N\-E and M\-U\-L\-T\-I\-P\-A\-R\-T\-\_\-\-M\-O\-D\-E\-\_\-\-D\-A\-T\-A. \hypertarget{structhtp__mpartp__t_a4d654d176e4016b2a51d80901880f594}{\index{htp\-\_\-mpartp\-\_\-t@{htp\-\_\-mpartp\-\_\-t}!extract\-\_\-dir@{extract\-\_\-dir}}
\index{extract\-\_\-dir@{extract\-\_\-dir}!htp_mpartp_t@{htp\-\_\-mpartp\-\_\-t}}
\subsubsection[{extract\-\_\-dir}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ htp\-\_\-mpartp\-\_\-t\-::extract\-\_\-dir}}\label{structhtp__mpartp__t_a4d654d176e4016b2a51d80901880f594}
\hypertarget{structhtp__mpartp__t_afc7e51f47a82bcb8ffa0781c40f5fa94}{\index{htp\-\_\-mpartp\-\_\-t@{htp\-\_\-mpartp\-\_\-t}!extract\-\_\-files@{extract\-\_\-files}}
\index{extract\-\_\-files@{extract\-\_\-files}!htp_mpartp_t@{htp\-\_\-mpartp\-\_\-t}}
\subsubsection[{extract\-\_\-files}]{\setlength{\rightskip}{0pt plus 5cm}int htp\-\_\-mpartp\-\_\-t\-::extract\-\_\-files}}\label{structhtp__mpartp__t_afc7e51f47a82bcb8ffa0781c40f5fa94}
\hypertarget{structhtp__mpartp__t_ad46b0f9389e164b88cf5940311b8607a}{\index{htp\-\_\-mpartp\-\_\-t@{htp\-\_\-mpartp\-\_\-t}!extract\-\_\-limit@{extract\-\_\-limit}}
\index{extract\-\_\-limit@{extract\-\_\-limit}!htp_mpartp_t@{htp\-\_\-mpartp\-\_\-t}}
\subsubsection[{extract\-\_\-limit}]{\setlength{\rightskip}{0pt plus 5cm}int htp\-\_\-mpartp\-\_\-t\-::extract\-\_\-limit}}\label{structhtp__mpartp__t_ad46b0f9389e164b88cf5940311b8607a}
\hypertarget{structhtp__mpartp__t_a5addc201a361b8bd928795c62e4f7019}{\index{htp\-\_\-mpartp\-\_\-t@{htp\-\_\-mpartp\-\_\-t}!file\-\_\-count@{file\-\_\-count}}
\index{file\-\_\-count@{file\-\_\-count}!htp_mpartp_t@{htp\-\_\-mpartp\-\_\-t}}
\subsubsection[{file\-\_\-count}]{\setlength{\rightskip}{0pt plus 5cm}int htp\-\_\-mpartp\-\_\-t\-::file\-\_\-count}}\label{structhtp__mpartp__t_a5addc201a361b8bd928795c62e4f7019}
\hypertarget{structhtp__mpartp__t_a06bb613acf5b4b3dbaa0ae5c15a15336}{\index{htp\-\_\-mpartp\-\_\-t@{htp\-\_\-mpartp\-\_\-t}!gave\-\_\-up\-\_\-data@{gave\-\_\-up\-\_\-data}}
\index{gave\-\_\-up\-\_\-data@{gave\-\_\-up\-\_\-data}!htp_mpartp_t@{htp\-\_\-mpartp\-\_\-t}}
\subsubsection[{gave\-\_\-up\-\_\-data}]{\setlength{\rightskip}{0pt plus 5cm}int htp\-\_\-mpartp\-\_\-t\-::gave\-\_\-up\-\_\-data}}\label{structhtp__mpartp__t_a06bb613acf5b4b3dbaa0ae5c15a15336}
When set, indicates that this parser no longer owns names and values of M\-U\-L\-T\-I\-P\-A\-R\-T\-\_\-\-P\-A\-R\-T\-\_\-\-T\-E\-X\-T parts. It is used to avoid data duplication when the parser is used by Lib\-H\-T\-P internally. \hypertarget{structhtp__mpartp__t_a077a9e8584cdebecf0d6d7bbbe8c90d3}{\index{htp\-\_\-mpartp\-\_\-t@{htp\-\_\-mpartp\-\_\-t}!handle\-\_\-boundary@{handle\-\_\-boundary}}
\index{handle\-\_\-boundary@{handle\-\_\-boundary}!htp_mpartp_t@{htp\-\_\-mpartp\-\_\-t}}
\subsubsection[{handle\-\_\-boundary}]{\setlength{\rightskip}{0pt plus 5cm}int($\ast$ htp\-\_\-mpartp\-\_\-t\-::handle\-\_\-boundary)({\bf htp\-\_\-mpartp\-\_\-t} $\ast$mpartp)}}\label{structhtp__mpartp__t_a077a9e8584cdebecf0d6d7bbbe8c90d3}
\hypertarget{structhtp__mpartp__t_a9c7f201a205000e663d83f6142ccc485}{\index{htp\-\_\-mpartp\-\_\-t@{htp\-\_\-mpartp\-\_\-t}!handle\-\_\-data@{handle\-\_\-data}}
\index{handle\-\_\-data@{handle\-\_\-data}!htp_mpartp_t@{htp\-\_\-mpartp\-\_\-t}}
\subsubsection[{handle\-\_\-data}]{\setlength{\rightskip}{0pt plus 5cm}int($\ast$ htp\-\_\-mpartp\-\_\-t\-::handle\-\_\-data)({\bf htp\-\_\-mpartp\-\_\-t} $\ast$mpartp, const unsigned char $\ast$data, size\-\_\-t len, int line\-\_\-end)}}\label{structhtp__mpartp__t_a9c7f201a205000e663d83f6142ccc485}
\hypertarget{structhtp__mpartp__t_a1280461a09929f729c0b5e031dc32cf1}{\index{htp\-\_\-mpartp\-\_\-t@{htp\-\_\-mpartp\-\_\-t}!multipart@{multipart}}
\index{multipart@{multipart}!htp_mpartp_t@{htp\-\_\-mpartp\-\_\-t}}
\subsubsection[{multipart}]{\setlength{\rightskip}{0pt plus 5cm}{\bf htp\-\_\-multipart\-\_\-t} htp\-\_\-mpartp\-\_\-t\-::multipart}}\label{structhtp__mpartp__t_a1280461a09929f729c0b5e031dc32cf1}
\hypertarget{structhtp__mpartp__t_a748d47d47fc5efa6dbd0c5531ee4dada}{\index{htp\-\_\-mpartp\-\_\-t@{htp\-\_\-mpartp\-\_\-t}!parser\-\_\-state@{parser\-\_\-state}}
\index{parser\-\_\-state@{parser\-\_\-state}!htp_mpartp_t@{htp\-\_\-mpartp\-\_\-t}}
\subsubsection[{parser\-\_\-state}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf htp\-\_\-multipart\-\_\-state\-\_\-t} htp\-\_\-mpartp\-\_\-t\-::parser\-\_\-state}}\label{structhtp__mpartp__t_a748d47d47fc5efa6dbd0c5531ee4dada}
Parser state; one of M\-U\-L\-T\-I\-P\-A\-R\-T\-\_\-\-S\-T\-A\-T\-E\-\_\-$\ast$ constants. \hypertarget{structhtp__mpartp__t_a4984a55fc49dd68483e674e72b6c9ece}{\index{htp\-\_\-mpartp\-\_\-t@{htp\-\_\-mpartp\-\_\-t}!part\-\_\-data\-\_\-pieces@{part\-\_\-data\-\_\-pieces}}
\index{part\-\_\-data\-\_\-pieces@{part\-\_\-data\-\_\-pieces}!htp_mpartp_t@{htp\-\_\-mpartp\-\_\-t}}
\subsubsection[{part\-\_\-data\-\_\-pieces}]{\setlength{\rightskip}{0pt plus 5cm}{\bf bstr\-\_\-builder\-\_\-t}$\ast$ htp\-\_\-mpartp\-\_\-t\-::part\-\_\-data\-\_\-pieces}}\label{structhtp__mpartp__t_a4984a55fc49dd68483e674e72b6c9ece}
Stores text part pieces until the entire part is seen, at which point the pieces are assembled into a single buffer, and the builder cleared. \hypertarget{structhtp__mpartp__t_a4e6a7a45f36871ec9b44b9dc09dfa36b}{\index{htp\-\_\-mpartp\-\_\-t@{htp\-\_\-mpartp\-\_\-t}!part\-\_\-header\-\_\-pieces@{part\-\_\-header\-\_\-pieces}}
\index{part\-\_\-header\-\_\-pieces@{part\-\_\-header\-\_\-pieces}!htp_mpartp_t@{htp\-\_\-mpartp\-\_\-t}}
\subsubsection[{part\-\_\-header\-\_\-pieces}]{\setlength{\rightskip}{0pt plus 5cm}{\bf bstr\-\_\-builder\-\_\-t}$\ast$ htp\-\_\-mpartp\-\_\-t\-::part\-\_\-header\-\_\-pieces}}\label{structhtp__mpartp__t_a4e6a7a45f36871ec9b44b9dc09dfa36b}
\hypertarget{structhtp__mpartp__t_a7b83618f368ff1e190a847d1296a6ecc}{\index{htp\-\_\-mpartp\-\_\-t@{htp\-\_\-mpartp\-\_\-t}!pending\-\_\-header\-\_\-line@{pending\-\_\-header\-\_\-line}}
\index{pending\-\_\-header\-\_\-line@{pending\-\_\-header\-\_\-line}!htp_mpartp_t@{htp\-\_\-mpartp\-\_\-t}}
\subsubsection[{pending\-\_\-header\-\_\-line}]{\setlength{\rightskip}{0pt plus 5cm}{\bf bstr}$\ast$ htp\-\_\-mpartp\-\_\-t\-::pending\-\_\-header\-\_\-line}}\label{structhtp__mpartp__t_a7b83618f368ff1e190a847d1296a6ecc}


The documentation for this struct was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
\hyperlink{htp__multipart__private_8h}{htp\-\_\-multipart\-\_\-private.\-h}\end{DoxyCompactItemize}