FreeBSD Manual Pages
HTTP_MIME(3) Library Functions Manual HTTP_MIME(3) NAME http_mime -- multi-part MIME suport LIBRARY PDEL Library (libpdel, -lpdel) SYNOPSIS #include <sys/types.h> #include <stdio.h> #include <netinet/in.h> #include <openssl/ssl.h> #include <pdel/http/http_defs.h> #include <pdel/http/http_server.h> u_int http_mime_multipart_get_count(struct mime_multipart *mp); struct mime_part * http_mime_multipart_get_part(struct mime_multipart *mp, int index); void http_mime_multipart_free(struct mime_multipart **mpp); const char * http_mime_part_get_header(struct mime_part *part, const char *name); u_int http_mime_part_get_length(struct mime_part *part); u_char * http_mime_part_get_data(struct mime_part *part); DESCRIPTION These functions handle multi-part MIME document data as returned by http_request_read_mime_multipart(3). A struct mime_multipart represents an entire multi-part document, while a struct mime_part represents a single part. http_mime_multipart_get_count() returns the number of parts in mp. http_mime_multipart_get_part() retrieves the part with index index, which must be less than the value returned by http_mime_multipart_get_count(). http_mime_multipart_free() frees a multi-part document. Upon return. *mpp will be set to NULL. If *mpp is already NULL when http_mime_multipart_free() is invoked, nothing happens. http_mime_part_get_header() retrieves a header having name name associ- ated with the part part. http_mime_part_get_length() returns the length in bytes of part. http_mime_part_get_data() returns a pointer to the data of part. RETURN VALUES http_mime_multipart_get_part() return NULL with errno set to EINVAL if index is out of range. http_mime_part_get_header() returns NULL with errno set to ENOENT if the header is not found. SEE ALSO http_client(3), http_request(3), http_response(3), http_server(3), libpdel(3) N. Freed and N. Borenstein, Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types, RFC 2046. HISTORY The PDEL library was developed at Packet Design, LLC. http://www.packetdesign.com/ AUTHORS Archie Cobbs <archie@freebsd.org> FreeBSD ports 15.0 April 22, 2002 HTTP_MIME(3)
NAME | LIBRARY | SYNOPSIS | DESCRIPTION | RETURN VALUES | SEE ALSO | HISTORY | AUTHORS
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=http_mime_multipart_get_part&sektion=3&manpath=FreeBSD+Ports+15.0>
