isc_nm_accept_cb_t accept;
} isc__nm_cb_t;
-typedef struct isc_nm_httphandler isc_nm_httphandler_t;
-struct isc_nm_httphandler {
- char *path;
- isc_nm_recv_cb_t cb;
- void *cbarg;
- size_t extrahandlesize;
- LINK(isc_nm_httphandler_t) link;
-};
-
/*
* Wrapper around uv_req_t with 'our' fields in it. req->data should
* always point to its parent. Note that we always allocate more than
STATID_ACTIVE = 10
};
+#if HAVE_LIBNGHTTP2
typedef struct isc_nmsocket_tls_send_req {
isc_nmsocket_t *tlssock;
isc_region_t data;
LINK(struct isc_nm_httpcbarg) link;
} isc_nm_httpcbarg_t;
+typedef struct isc_nm_httphandler {
+ char *path;
+ isc_nm_recv_cb_t cb;
+ void *cbarg;
+ size_t extrahandlesize;
+ LINK(struct isc_nm_httphandler) link;
+} isc_nm_httphandler_t;
+
struct isc_nm_http_endpoints {
isc_mem_t *mctx;
void *cstream;
} connect;
} isc_nmsocket_h2_t;
+#endif /* HAVE_LIBNGHTTP2 */
typedef void (*isc_nm_closehandlecb_t)(void *arg);
/*%<
isc__nm_uvreq_t *pending_req;
} tls;
+#if HAVE_LIBNGHTTP2
/*% TLS stuff */
struct tlsstream {
bool server;
} tlsstream;
isc_nmsocket_h2_t h2;
+#endif /* HAVE_LIBNGHTTP2 */
/*%
* quota is the TCP client, attached when a TCP connection
* is established. pquota is a non-attached pointer to the
isc_condition_init(&sock->scond);
isc_refcount_init(&sock->references, 1);
+#if HAVE_LIBNGHTTP2
memset(&sock->tlsstream, 0, sizeof(sock->tlsstream));
+#endif /* HAVE_LIBNGHTTP2 */
NETMGR_TRACE_LOG("isc__nmsocket_init():%p->references = %" PRIuFAST32
"\n",
* information regarding copyright ownership.
*/
-#if HAVE_CMOCKA
+#if defined(HAVE_CMOCKA) && defined(HAVE_LIBNGHTTP2)
#include <inttypes.h>
#include <sched.h> /* IWYU pragma: keep */
#include <setjmp.h>
int
main(void) {
+#if HAVE_LIBNGHTTP2
printf("1..0 # Skipped: cmocka not available\n");
+#else
+ printf("1..0 # Skipped: libnghttp2 is not available\n");
+#endif
return (SKIPPED_TEST_EXIT_CODE);
}