75 if (h2s == NULL || h1tx == NULL) {
78 if (htp_tx_request_method(h1tx) == NULL) {
83 SCHttp2TxSetMethod(h2s, bstr_ptr(htp_tx_request_method(h1tx)),
84 (uint32_t)bstr_len(htp_tx_request_method(h1tx)));
85 if (htp_tx_request_uri(h1tx) != NULL) {
88 SCHttp2TxSetUri(h2s, bstr_ptr(htp_tx_request_uri(h1tx)),
89 (uint32_t)bstr_len(htp_tx_request_uri(h1tx)));
91 size_t nbheaders = htp_tx_request_headers_size(h1tx);
92 for (
size_t i = 0; i < nbheaders; i++) {
93 const htp_header_t *h = htp_tx_request_header_index(h1tx, i);
94 SCHttp2TxAddHeader(h2s, htp_header_name_ptr(h), (uint32_t)htp_header_name_len(h),
95 htp_header_value_ptr(h), (uint32_t)htp_header_value_len(h));
int SCAppLayerProtoDetectConfProtoDetectionEnabledDefault(const char *ipproto, const char *alproto, bool default_enabled)
Given a protocol name, checks if proto detection is enabled in the conf file.
int SCAppLayerProtoDetectPMRegisterPatternCI(uint8_t ipproto, AppProto alproto, const char *pattern, uint16_t depth, uint16_t offset, uint8_t direction)
Registers a case-insensitive pattern for protocol detection.