- NetBSD Manual Pages
LIBBOZOHTTPD(3) NetBSD Library Functions Manual LIBBOZOHTTPD(3)
Powered by man-cgi (2021-06-01).
Maintained for NetBSD
by Kimmo Suominen.
Based on man-cgi by Panagiotis Christias.
libbozohttpd -- embedded web server library
bozo_set_pref(bozohttpd_t *httpd, bozoprefs_t *prefs, char *name,
bozo_get_pref(bozoprefs_t *prefs, char *name);
bozo_set_defaults(bozohttpd_t *httpd, bozoprefs_t *prefs);
bozo_setup(bozohttpd_t *httpd, bozoprefs_t *prefs, const char *vhost,
bozo_cleanup(bozohttpd_t *httpd, bozoprefs_t *prefs);
libbozohttpd is a library interface to the bozohttpd(8) web server. The
libbozohttpd library can be used to embed a webserver in your applica-
Normal operation sees the libbozohttpd process be initialised using the
bozo_set_defaults() function, which will set up the default port and
other internal settings, allocating any necessary space as needed. The
bozo_set_defaults() function returns 1 on sucess, 0 on failure.
The bozo_setup() function is used to specify the virtual host name for
the web server. A NULL host name will mean that libbozohttpd will use
the local value for the host name, as returned by gethostname(3). This
virtual hostname should be a fully qualified domain name. The final
argument to bozo_setup() is the name of the directory to serve as the
root directory of the web server tree.
Once the server has been set up, it serves requests by using the
bozo_read_request() function, which returns a pointer to a request struc-
ture, and bozo_process_request(), which deals with the request, and
answers the client. The request space is de-allocated using the
Preferences are set using the function bozo_set_pref() function and
queried using the two bozo_get_pref() function. This is the main inter-
face for selecting options, and for setting preferences. The memory
allocated by bozo_setup() for both the httpd structure and the prefer-
ences will be freed.
gethostname(3), ssl(3), services(5), httpd(8)
The libbozohttpd library first appeared in NetBSD 6.0.
Matthew R. Green <email@example.com>
Alistair Crooks <agc@NetBSD.org> wrote this high-level interface.
This manual page was written by
NetBSD 9.99 February 11, 2021 NetBSD 9.99