Zephyr Project API 4.0.99
A Scalable Open Source RTOS
|
Data Structures | |
struct | http_resource_desc |
HTTP resource description. More... | |
Macros | |
#define | HTTP_RESOURCE_DEFINE(_name, _service, _resource, _detail) |
Define a static HTTP resource. | |
#define | HTTP_SERVICE_DEFINE_EMPTY(_name, _host, _port, _concurrent, _backlog, _detail) __z_http_service_define(_name, _host, _port, _concurrent, _backlog, _detail, NULL, NULL) |
Define an HTTP service without static resources. | |
#define | HTTPS_SERVICE_DEFINE_EMPTY(_name, _host, _port, _concurrent, _backlog, _detail, _sec_tag_list, _sec_tag_list_size) |
Define an HTTPS service without static resources. | |
#define | HTTP_SERVICE_DEFINE(_name, _host, _port, _concurrent, _backlog, _detail) |
Define an HTTP service with static resources. | |
#define | HTTPS_SERVICE_DEFINE(_name, _host, _port, _concurrent, _backlog, _detail, _sec_tag_list, _sec_tag_list_size) |
Define an HTTPS service with static resources. | |
#define | HTTP_SERVICE_COUNT(_dst) STRUCT_SECTION_COUNT(http_service_desc, _dst) |
Count the number of HTTP services. | |
#define | HTTP_SERVICE_RESOURCE_COUNT(_service) ((_service)->res_end - (_service)->res_begin) |
Count HTTP service static resources. | |
#define | HTTP_SERVICE_FOREACH(_it) STRUCT_SECTION_FOREACH(http_service_desc, _it) |
Iterate over all HTTP services. | |
#define | HTTP_RESOURCE_FOREACH(_service, _it) STRUCT_SECTION_FOREACH_ALTERNATE(http_resource_desc_##_service, http_resource_desc, _it) |
Iterate over static HTTP resources associated with a given _service . | |
#define | HTTP_SERVICE_FOREACH_RESOURCE(_service, _it) |
Iterate over all static resources associated with _service . | |
#define HTTP_RESOURCE_DEFINE | ( | _name, | |
_service, | |||
_resource, | |||
_detail | |||
) |
#include <include/zephyr/net/http/service.h>
Define a static HTTP resource.
A static HTTP resource is one that is known prior to system initialization. In contrast, dynamic resources may be discovered upon system initialization. Dynamic resources may also be inserted, or removed by events originating internally or externally to the system at runtime.
_resource
is the URL without the associated protocol, host, or URL parameters. E.g. the resource for http://www.foo.com/bar/baz.html#param1=value1
would be /bar/baz.html
. It is often referred to as the "path" of the URL. Every (service, resource)
pair should be unique. The _resource
must be non-NULL._name | Name of the resource. |
_service | Name of the associated service. |
_resource | Pathname-like string identifying the resource. |
_detail | Implementation-specific detail associated with the resource. |
#define HTTP_RESOURCE_FOREACH | ( | _service, | |
_it | |||
) | STRUCT_SECTION_FOREACH_ALTERNATE(http_resource_desc_##_service, http_resource_desc, _it) |
#include <include/zephyr/net/http/service.h>
Iterate over static HTTP resources associated with a given _service
.
_service
is defined with HTTP_SERVICE_DEFINE._service | Name of HTTP service |
_it | Name of iterator (of type http_resource_desc) |
#define HTTP_SERVICE_COUNT | ( | _dst | ) | STRUCT_SECTION_COUNT(http_service_desc, _dst) |
#include <include/zephyr/net/http/service.h>
Count the number of HTTP services.
[out] | _dst | Pointer to location where result is written. |
#define HTTP_SERVICE_DEFINE | ( | _name, | |
_host, | |||
_port, | |||
_concurrent, | |||
_backlog, | |||
_detail | |||
) |
#include <include/zephyr/net/http/service.h>
Define an HTTP service with static resources.
_host
parameter is used to specify an IP address either in IPv4 or IPv6 format a fully-qualified hostname or a virtual host. If left NULL, the listening port will listen on all addresses._port
parameter must be non-NULL
. It points to a location that specifies the port number to use for the service. If the specified port number is zero, then an ephemeral port number will be used and the actual port number assigned will be written back to memory. For ephemeral port numbers, the memory pointed to by _port
must be writeable._name | Name of the service. | |
_host | IP address or hostname associated with the service. | |
[in,out] | _port | Pointer to port associated with the service. |
_concurrent | Maximum number of concurrent clients. | |
_backlog | Maximum number queued connections. | |
_detail | Implementation-specific detail associated with the service. |
#define HTTP_SERVICE_DEFINE_EMPTY | ( | _name, | |
_host, | |||
_port, | |||
_concurrent, | |||
_backlog, | |||
_detail | |||
) | __z_http_service_define(_name, _host, _port, _concurrent, _backlog, _detail, NULL, NULL) |
#include <include/zephyr/net/http/service.h>
Define an HTTP service without static resources.
_host
parameter is used to specify an IP address either in IPv4 or IPv6 format a fully-qualified hostname or a virtual host. If left NULL, the listening port will listen on all addresses._port
parameter must be non-NULL
. It points to a location that specifies the port number to use for the service. If the specified port number is zero, then an ephemeral port number will be used and the actual port number assigned will be written back to memory. For ephemeral port numbers, the memory pointed to by _port
must be writeable._name | Name of the service. | |
_host | IP address or hostname associated with the service. | |
[in,out] | _port | Pointer to port associated with the service. |
_concurrent | Maximum number of concurrent clients. | |
_backlog | Maximum number queued connections. | |
_detail | Implementation-specific detail associated with the service. |
#define HTTP_SERVICE_FOREACH | ( | _it | ) | STRUCT_SECTION_FOREACH(http_service_desc, _it) |
#include <include/zephyr/net/http/service.h>
Iterate over all HTTP services.
_it | Name of http_service_desc iterator |
#define HTTP_SERVICE_FOREACH_RESOURCE | ( | _service, | |
_it | |||
) |
#include <include/zephyr/net/http/service.h>
Iterate over all static resources associated with _service
.
_service
defined with either HTTP_SERVICE_DEFINE or HTTP_SERVICE_DEFINE_EMPTY._service | Pointer to HTTP service |
_it | Name of iterator (of type http_resource_desc) |
#define HTTP_SERVICE_RESOURCE_COUNT | ( | _service | ) | ((_service)->res_end - (_service)->res_begin) |
#include <include/zephyr/net/http/service.h>
Count HTTP service static resources.
_service | Pointer to a service. |
#define HTTPS_SERVICE_DEFINE | ( | _name, | |
_host, | |||
_port, | |||
_concurrent, | |||
_backlog, | |||
_detail, | |||
_sec_tag_list, | |||
_sec_tag_list_size | |||
) |
#include <include/zephyr/net/http/service.h>
Define an HTTPS service with static resources.
_host
parameter is used to specify an IP address either in IPv4 or IPv6 format a fully-qualified hostname or a virtual host. If left NULL, the listening port will listen on all addresses._port
parameter must be non-NULL
. It points to a location that specifies the port number to use for the service. If the specified port number is zero, then an ephemeral port number will be used and the actual port number assigned will be written back to memory. For ephemeral port numbers, the memory pointed to by _port
must be writeable._name | Name of the service. | |
_host | IP address or hostname associated with the service. | |
[in,out] | _port | Pointer to port associated with the service. |
_concurrent | Maximum number of concurrent clients. | |
_backlog | Maximum number queued connections. | |
_detail | Implementation-specific detail associated with the service. | |
_sec_tag_list | TLS security tag list used to setup a HTTPS socket. | |
_sec_tag_list_size | TLS security tag list size used to setup a HTTPS socket. |
#define HTTPS_SERVICE_DEFINE_EMPTY | ( | _name, | |
_host, | |||
_port, | |||
_concurrent, | |||
_backlog, | |||
_detail, | |||
_sec_tag_list, | |||
_sec_tag_list_size | |||
) |
#include <include/zephyr/net/http/service.h>
Define an HTTPS service without static resources.
_host
parameter is used to specify an IP address either in IPv4 or IPv6 format a fully-qualified hostname or a virtual host. If left NULL, the listening port will listen on all addresses._port
parameter must be non-NULL
. It points to a location that specifies the port number to use for the service. If the specified port number is zero, then an ephemeral port number will be used and the actual port number assigned will be written back to memory. For ephemeral port numbers, the memory pointed to by _port
must be writeable._name | Name of the service. | |
_host | IP address or hostname associated with the service. | |
[in,out] | _port | Pointer to port associated with the service. |
_concurrent | Maximum number of concurrent clients. | |
_backlog | Maximum number queued connections. | |
_detail | Implementation-specific detail associated with the service. | |
_sec_tag_list | TLS security tag list used to setup a HTTPS socket. | |
_sec_tag_list_size | TLS security tag list size used to setup a HTTPS socket. |