Free: Some(cipservice_free),
flags: 0,
};
- unsafe {
- G_ENIP_CIPSERVICE_KW_ID = DetectHelperKeywordRegister(&kw);
- G_ENIP_CIPSERVICE_BUFFER_ID = DetectHelperBufferRegister(
- b"cip\0".as_ptr() as *const libc::c_char,
- ALPROTO_ENIP,
- true,
- true,
- );
- }
+ G_ENIP_CIPSERVICE_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_ENIP_CIPSERVICE_BUFFER_ID = DetectHelperBufferRegister(
+ b"cip\0".as_ptr() as *const libc::c_char,
+ ALPROTO_ENIP,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"enip.capabilities\0".as_ptr() as *const libc::c_char,
desc: b"rules for detecting EtherNet/IP capabilities\0".as_ptr() as *const libc::c_char,
Free: Some(capabilities_free),
flags: 0,
};
- unsafe {
- G_ENIP_CAPABILITIES_KW_ID = DetectHelperKeywordRegister(&kw);
- G_ENIP_CAPABILITIES_BUFFER_ID = DetectHelperBufferRegister(
- b"enip.capabilities\0".as_ptr() as *const libc::c_char,
- ALPROTO_ENIP,
- true,
- true,
- );
- }
+ G_ENIP_CAPABILITIES_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_ENIP_CAPABILITIES_BUFFER_ID = DetectHelperBufferRegister(
+ b"enip.capabilities\0".as_ptr() as *const libc::c_char,
+ ALPROTO_ENIP,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"enip.cip_attribute\0".as_ptr() as *const libc::c_char,
desc: b"rules for detecting EtherNet/IP cip_attribute\0".as_ptr() as *const libc::c_char,
Free: Some(cip_attribute_free),
flags: 0,
};
- unsafe {
- G_ENIP_CIP_ATTRIBUTE_KW_ID = DetectHelperKeywordRegister(&kw);
- G_ENIP_CIP_ATTRIBUTE_BUFFER_ID = DetectHelperBufferRegister(
- b"enip.cip_attribute\0".as_ptr() as *const libc::c_char,
- ALPROTO_ENIP,
- true,
- true,
- );
- }
+ G_ENIP_CIP_ATTRIBUTE_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_ENIP_CIP_ATTRIBUTE_BUFFER_ID = DetectHelperBufferRegister(
+ b"enip.cip_attribute\0".as_ptr() as *const libc::c_char,
+ ALPROTO_ENIP,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"enip.cip_class\0".as_ptr() as *const libc::c_char,
desc: b"rules for detecting EtherNet/IP cip_class\0".as_ptr() as *const libc::c_char,
Free: Some(cip_class_free),
flags: 0,
};
- unsafe {
- G_ENIP_CIP_CLASS_KW_ID = DetectHelperKeywordRegister(&kw);
- G_ENIP_CIP_CLASS_BUFFER_ID = DetectHelperBufferRegister(
- b"enip.cip_class\0".as_ptr() as *const libc::c_char,
- ALPROTO_ENIP,
- true,
- true,
- );
- }
+ G_ENIP_CIP_CLASS_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_ENIP_CIP_CLASS_BUFFER_ID = DetectHelperBufferRegister(
+ b"enip.cip_class\0".as_ptr() as *const libc::c_char,
+ ALPROTO_ENIP,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"enip.vendor_id\0".as_ptr() as *const libc::c_char,
desc: b"rules for detecting EtherNet/IP vendor_id\0".as_ptr() as *const libc::c_char,
Free: Some(vendor_id_free),
flags: 0,
};
- unsafe {
- G_ENIP_VENDOR_ID_KW_ID = DetectHelperKeywordRegister(&kw);
- G_ENIP_VENDOR_ID_BUFFER_ID = DetectHelperBufferRegister(
- b"enip.vendor_id\0".as_ptr() as *const libc::c_char,
- ALPROTO_ENIP,
- true,
- true,
- );
- }
+ G_ENIP_VENDOR_ID_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_ENIP_VENDOR_ID_BUFFER_ID = DetectHelperBufferRegister(
+ b"enip.vendor_id\0".as_ptr() as *const libc::c_char,
+ ALPROTO_ENIP,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"enip.status\0".as_ptr() as *const libc::c_char,
desc: b"rules for detecting EtherNet/IP status\0".as_ptr() as *const libc::c_char,
Free: Some(status_free),
flags: 0,
};
- unsafe {
- G_ENIP_STATUS_KW_ID = DetectHelperKeywordRegister(&kw);
- G_ENIP_STATUS_BUFFER_ID = DetectHelperBufferRegister(
- b"enip.status\0".as_ptr() as *const libc::c_char,
- ALPROTO_ENIP,
- true,
- true,
- );
- }
+ G_ENIP_STATUS_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_ENIP_STATUS_BUFFER_ID = DetectHelperBufferRegister(
+ b"enip.status\0".as_ptr() as *const libc::c_char,
+ ALPROTO_ENIP,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"enip.state\0".as_ptr() as *const libc::c_char,
desc: b"rules for detecting EtherNet/IP state\0".as_ptr() as *const libc::c_char,
Free: Some(state_free),
flags: 0,
};
- unsafe {
- G_ENIP_STATE_KW_ID = DetectHelperKeywordRegister(&kw);
- G_ENIP_STATE_BUFFER_ID = DetectHelperBufferRegister(
- b"enip.state\0".as_ptr() as *const libc::c_char,
- ALPROTO_ENIP,
- true,
- true,
- );
- }
+ G_ENIP_STATE_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_ENIP_STATE_BUFFER_ID = DetectHelperBufferRegister(
+ b"enip.state\0".as_ptr() as *const libc::c_char,
+ ALPROTO_ENIP,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"enip.serial\0".as_ptr() as *const libc::c_char,
desc: b"rules for detecting EtherNet/IP serial\0".as_ptr() as *const libc::c_char,
Free: Some(serial_free),
flags: 0,
};
- unsafe {
- G_ENIP_SERIAL_KW_ID = DetectHelperKeywordRegister(&kw);
- G_ENIP_SERIAL_BUFFER_ID = DetectHelperBufferRegister(
- b"enip.serial\0".as_ptr() as *const libc::c_char,
- ALPROTO_ENIP,
- true,
- true,
- );
- }
+ G_ENIP_SERIAL_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_ENIP_SERIAL_BUFFER_ID = DetectHelperBufferRegister(
+ b"enip.serial\0".as_ptr() as *const libc::c_char,
+ ALPROTO_ENIP,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"enip.revision\0".as_ptr() as *const libc::c_char,
desc: b"rules for detecting EtherNet/IP revision\0".as_ptr() as *const libc::c_char,
Free: Some(revision_free),
flags: 0,
};
- unsafe {
- G_ENIP_REVISION_KW_ID = DetectHelperKeywordRegister(&kw);
- G_ENIP_REVISION_BUFFER_ID = DetectHelperBufferRegister(
- b"enip.revision\0".as_ptr() as *const libc::c_char,
- ALPROTO_ENIP,
- true,
- true,
- );
- }
+ G_ENIP_REVISION_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_ENIP_REVISION_BUFFER_ID = DetectHelperBufferRegister(
+ b"enip.revision\0".as_ptr() as *const libc::c_char,
+ ALPROTO_ENIP,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"enip.protocol_version\0".as_ptr() as *const libc::c_char,
desc: b"rules for detecting EtherNet/IP protocol_version\0".as_ptr() as *const libc::c_char,
Free: Some(protocol_version_free),
flags: 0,
};
- unsafe {
- G_ENIP_PROTOCOL_VERSION_KW_ID = DetectHelperKeywordRegister(&kw);
- G_ENIP_PROTOCOL_VERSION_BUFFER_ID = DetectHelperBufferRegister(
- b"enip.protocol_version\0".as_ptr() as *const libc::c_char,
- ALPROTO_ENIP,
- true,
- true,
- );
- }
+ G_ENIP_PROTOCOL_VERSION_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_ENIP_PROTOCOL_VERSION_BUFFER_ID = DetectHelperBufferRegister(
+ b"enip.protocol_version\0".as_ptr() as *const libc::c_char,
+ ALPROTO_ENIP,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"enip.product_code\0".as_ptr() as *const libc::c_char,
desc: b"rules for detecting EtherNet/IP product_code\0".as_ptr() as *const libc::c_char,
Free: Some(product_code_free),
flags: 0,
};
- unsafe {
- G_ENIP_PRODUCT_CODE_KW_ID = DetectHelperKeywordRegister(&kw);
- G_ENIP_PRODUCT_CODE_BUFFER_ID = DetectHelperBufferRegister(
- b"enip.product_code\0".as_ptr() as *const libc::c_char,
- ALPROTO_ENIP,
- true,
- true,
- );
- }
+ G_ENIP_PRODUCT_CODE_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_ENIP_PRODUCT_CODE_BUFFER_ID = DetectHelperBufferRegister(
+ b"enip.product_code\0".as_ptr() as *const libc::c_char,
+ ALPROTO_ENIP,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"enip_command\0".as_ptr() as *const libc::c_char,
desc: b"rules for detecting EtherNet/IP command\0".as_ptr() as *const libc::c_char,
Free: Some(command_free),
flags: 0,
};
- unsafe {
- G_ENIP_COMMAND_KW_ID = DetectHelperKeywordRegister(&kw);
- G_ENIP_COMMAND_BUFFER_ID = DetectHelperBufferRegister(
- b"enip.command\0".as_ptr() as *const libc::c_char,
- ALPROTO_ENIP,
- true,
- true,
- );
- }
+ G_ENIP_COMMAND_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_ENIP_COMMAND_BUFFER_ID = DetectHelperBufferRegister(
+ b"enip.command\0".as_ptr() as *const libc::c_char,
+ ALPROTO_ENIP,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"enip.identity_status\0".as_ptr() as *const libc::c_char,
desc: b"rules for detecting EtherNet/IP identity_status\0".as_ptr() as *const libc::c_char,
Free: Some(identity_status_free),
flags: 0,
};
- unsafe {
- G_ENIP_IDENTITY_STATUS_KW_ID = DetectHelperKeywordRegister(&kw);
- G_ENIP_IDENTITY_STATUS_BUFFER_ID = DetectHelperBufferRegister(
- b"enip.identity_status\0".as_ptr() as *const libc::c_char,
- ALPROTO_ENIP,
- true,
- true,
- );
- }
+ G_ENIP_IDENTITY_STATUS_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_ENIP_IDENTITY_STATUS_BUFFER_ID = DetectHelperBufferRegister(
+ b"enip.identity_status\0".as_ptr() as *const libc::c_char,
+ ALPROTO_ENIP,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"enip.device_type\0".as_ptr() as *const libc::c_char,
desc: b"rules for detecting EtherNet/IP device_type\0".as_ptr() as *const libc::c_char,
Free: Some(device_type_free),
flags: 0,
};
- unsafe {
- G_ENIP_DEVICE_TYPE_KW_ID = DetectHelperKeywordRegister(&kw);
- G_ENIP_DEVICE_TYPE_BUFFER_ID = DetectHelperBufferRegister(
- b"enip.device_type\0".as_ptr() as *const libc::c_char,
- ALPROTO_ENIP,
- true,
- true,
- );
- }
+ G_ENIP_DEVICE_TYPE_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_ENIP_DEVICE_TYPE_BUFFER_ID = DetectHelperBufferRegister(
+ b"enip.device_type\0".as_ptr() as *const libc::c_char,
+ ALPROTO_ENIP,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"enip_command\0".as_ptr() as *const libc::c_char,
desc: b"rules for detecting EtherNet/IP command\0".as_ptr() as *const libc::c_char,
Free: Some(command_free),
flags: 0,
};
- unsafe {
- G_ENIP_COMMAND_KW_ID = DetectHelperKeywordRegister(&kw);
- G_ENIP_COMMAND_BUFFER_ID = DetectHelperBufferRegister(
- b"enip.command\0".as_ptr() as *const libc::c_char,
- ALPROTO_ENIP,
- true,
- true,
- );
- }
+ G_ENIP_COMMAND_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_ENIP_COMMAND_BUFFER_ID = DetectHelperBufferRegister(
+ b"enip.command\0".as_ptr() as *const libc::c_char,
+ ALPROTO_ENIP,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"enip.cip_status\0".as_ptr() as *const libc::c_char,
desc: b"rules for detecting EtherNet/IP cip_status\0".as_ptr() as *const libc::c_char,
Free: Some(cip_status_free),
flags: 0,
};
- unsafe {
- G_ENIP_CIP_STATUS_KW_ID = DetectHelperKeywordRegister(&kw);
- G_ENIP_CIP_STATUS_BUFFER_ID = DetectHelperBufferRegister(
- b"enip.cip_status\0".as_ptr() as *const libc::c_char,
- ALPROTO_ENIP,
- true,
- true,
- );
- }
+ G_ENIP_CIP_STATUS_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_ENIP_CIP_STATUS_BUFFER_ID = DetectHelperBufferRegister(
+ b"enip.cip_status\0".as_ptr() as *const libc::c_char,
+ ALPROTO_ENIP,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"enip.cip_instance\0".as_ptr() as *const libc::c_char,
desc: b"rules for detecting EtherNet/IP cip_instance\0".as_ptr() as *const libc::c_char,
Free: Some(cip_instance_free),
flags: 0,
};
- unsafe {
- G_ENIP_CIP_INSTANCE_KW_ID = DetectHelperKeywordRegister(&kw);
- G_ENIP_CIP_INSTANCE_BUFFER_ID = DetectHelperBufferRegister(
- b"enip.cip_instance\0".as_ptr() as *const libc::c_char,
- ALPROTO_ENIP,
- true,
- true,
- );
- }
+ G_ENIP_CIP_INSTANCE_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_ENIP_CIP_INSTANCE_BUFFER_ID = DetectHelperBufferRegister(
+ b"enip.cip_instance\0".as_ptr() as *const libc::c_char,
+ ALPROTO_ENIP,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"enip.cip_extendedstatus\0".as_ptr() as *const libc::c_char,
desc: b"rules for detecting EtherNet/IP cip_extendedstatus\0".as_ptr()
Free: Some(cip_extendedstatus_free),
flags: 0,
};
- unsafe {
- G_ENIP_CIP_EXTENDEDSTATUS_KW_ID = DetectHelperKeywordRegister(&kw);
- G_ENIP_CIP_EXTENDEDSTATUS_BUFFER_ID = DetectHelperBufferRegister(
- b"enip.cip_extendedstatus\0".as_ptr() as *const libc::c_char,
- ALPROTO_ENIP,
- true,
- true,
- );
- }
+ G_ENIP_CIP_EXTENDEDSTATUS_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_ENIP_CIP_EXTENDEDSTATUS_BUFFER_ID = DetectHelperBufferRegister(
+ b"enip.cip_extendedstatus\0".as_ptr() as *const libc::c_char,
+ ALPROTO_ENIP,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"enip.product_name\0".as_ptr() as *const libc::c_char,
desc: b"sticky buffer to match EtherNet/IP product name\0".as_ptr() as *const libc::c_char,
AppLayerTxMatch: None,
Free: None,
};
- unsafe {
- let _g_enip_product_name_kw_id = DetectHelperKeywordRegister(&kw);
- G_ENIP_PRODUCT_NAME_BUFFER_ID = DetectHelperBufferMpmRegister(
- b"enip.product_name\0".as_ptr() as *const libc::c_char,
- b"ENIP product name\0".as_ptr() as *const libc::c_char,
- ALPROTO_ENIP,
- true,
- true,
- product_name_get_data,
- );
- }
+ let _g_enip_product_name_kw_id = DetectHelperKeywordRegister(&kw);
+ G_ENIP_PRODUCT_NAME_BUFFER_ID = DetectHelperBufferMpmRegister(
+ b"enip.product_name\0".as_ptr() as *const libc::c_char,
+ b"ENIP product name\0".as_ptr() as *const libc::c_char,
+ ALPROTO_ENIP,
+ true,
+ true,
+ product_name_get_data,
+ );
let kw = SCSigTableElmt {
name: b"enip.service_name\0".as_ptr() as *const libc::c_char,
desc: b"sticky buffer to match EtherNet/IP service name\0".as_ptr() as *const libc::c_char,
AppLayerTxMatch: None,
Free: None,
};
- unsafe {
- let _g_enip_service_name_kw_id = DetectHelperKeywordRegister(&kw);
- G_ENIP_SERVICE_NAME_BUFFER_ID = DetectHelperBufferMpmRegister(
- b"enip.service_name\0".as_ptr() as *const libc::c_char,
- b"ENIP service name\0".as_ptr() as *const libc::c_char,
- ALPROTO_ENIP,
- true,
- true,
- service_name_get_data,
- );
- }
+ let _g_enip_service_name_kw_id = DetectHelperKeywordRegister(&kw);
+ G_ENIP_SERVICE_NAME_BUFFER_ID = DetectHelperBufferMpmRegister(
+ b"enip.service_name\0".as_ptr() as *const libc::c_char,
+ b"ENIP service name\0".as_ptr() as *const libc::c_char,
+ ALPROTO_ENIP,
+ true,
+ true,
+ service_name_get_data,
+ );
}
#[cfg(test)]
Free: Some(snmp_detect_version_free),
flags: 0,
};
- unsafe {
- G_SNMP_VERSION_KW_ID = DetectHelperKeywordRegister(&kw);
- G_SNMP_VERSION_BUFFER_ID = DetectHelperBufferRegister(
- b"snmp.version\0".as_ptr() as *const libc::c_char,
- ALPROTO_SNMP,
- true,
- true,
- );
- }
+ G_SNMP_VERSION_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_SNMP_VERSION_BUFFER_ID = DetectHelperBufferRegister(
+ b"snmp.version\0".as_ptr() as *const libc::c_char,
+ ALPROTO_SNMP,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"snmp.pdu_type\0".as_ptr() as *const libc::c_char,
Free: Some(snmp_detect_pdutype_free),
flags: 0,
};
- unsafe {
- G_SNMP_PDUTYPE_KW_ID = DetectHelperKeywordRegister(&kw);
- G_SNMP_PDUTYPE_BUFFER_ID = DetectHelperBufferRegister(
- b"snmp.pdu_type\0".as_ptr() as *const libc::c_char,
- ALPROTO_SNMP,
- true,
- true,
- );
- }
+ G_SNMP_PDUTYPE_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_SNMP_PDUTYPE_BUFFER_ID = DetectHelperBufferRegister(
+ b"snmp.pdu_type\0".as_ptr() as *const libc::c_char,
+ ALPROTO_SNMP,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"snmp.usm\0".as_ptr() as *const libc::c_char,
AppLayerTxMatch: None,
Free: None,
};
- unsafe {
- let _g_snmp_usm_kw_id = DetectHelperKeywordRegister(&kw);
- G_SNMP_USM_BUFFER_ID = DetectHelperBufferMpmRegister(
- b"snmp.usm\0".as_ptr() as *const libc::c_char,
- b"SNMP USM\0".as_ptr() as *const libc::c_char,
- ALPROTO_SNMP,
- true,
- true,
- snmp_detect_usm_get_data,
- );
- }
+ let _g_snmp_usm_kw_id = DetectHelperKeywordRegister(&kw);
+ G_SNMP_USM_BUFFER_ID = DetectHelperBufferMpmRegister(
+ b"snmp.usm\0".as_ptr() as *const libc::c_char,
+ b"SNMP USM\0".as_ptr() as *const libc::c_char,
+ ALPROTO_SNMP,
+ true,
+ true,
+ snmp_detect_usm_get_data,
+ );
let kw = SCSigTableElmt {
name: b"snmp.community\0".as_ptr() as *const libc::c_char,
AppLayerTxMatch: None,
Free: None,
};
- unsafe {
- let _g_snmp_community_kw_id = DetectHelperKeywordRegister(&kw);
- G_SNMP_COMMUNITY_BUFFER_ID = DetectHelperBufferMpmRegister(
- b"snmp.community\0".as_ptr() as *const libc::c_char,
- b"SNMP Community identifier\0".as_ptr() as *const libc::c_char,
- ALPROTO_SNMP,
- true,
- true,
- snmp_detect_community_get_data,
- );
- }
+ let _g_snmp_community_kw_id = DetectHelperKeywordRegister(&kw);
+ G_SNMP_COMMUNITY_BUFFER_ID = DetectHelperBufferMpmRegister(
+ b"snmp.community\0".as_ptr() as *const libc::c_char,
+ b"SNMP Community identifier\0".as_ptr() as *const libc::c_char,
+ ALPROTO_SNMP,
+ true,
+ true,
+ snmp_detect_community_get_data,
+ );
}
Free: Some(websocket_detect_opcode_free),
flags: 0,
};
- unsafe {
- G_WEBSOCKET_OPCODE_KW_ID = DetectHelperKeywordRegister(&kw);
- G_WEBSOCKET_OPCODE_BUFFER_ID = DetectHelperBufferRegister(
- b"websocket.opcode\0".as_ptr() as *const libc::c_char,
- ALPROTO_WEBSOCKET,
- true,
- true,
- );
- }
+ G_WEBSOCKET_OPCODE_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_WEBSOCKET_OPCODE_BUFFER_ID = DetectHelperBufferRegister(
+ b"websocket.opcode\0".as_ptr() as *const libc::c_char,
+ ALPROTO_WEBSOCKET,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"websocket.mask\0".as_ptr() as *const libc::c_char,
desc: b"match WebSocket mask\0".as_ptr() as *const libc::c_char,
Free: Some(websocket_detect_mask_free),
flags: 0,
};
- unsafe {
- G_WEBSOCKET_MASK_KW_ID = DetectHelperKeywordRegister(&kw);
- G_WEBSOCKET_MASK_BUFFER_ID = DetectHelperBufferRegister(
- b"websocket.mask\0".as_ptr() as *const libc::c_char,
- ALPROTO_WEBSOCKET,
- true,
- true,
- );
- }
+ G_WEBSOCKET_MASK_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_WEBSOCKET_MASK_BUFFER_ID = DetectHelperBufferRegister(
+ b"websocket.mask\0".as_ptr() as *const libc::c_char,
+ ALPROTO_WEBSOCKET,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"websocket.flags\0".as_ptr() as *const libc::c_char,
desc: b"match WebSocket flags\0".as_ptr() as *const libc::c_char,
Free: Some(websocket_detect_flags_free),
flags: 0,
};
- unsafe {
- G_WEBSOCKET_FLAGS_KW_ID = DetectHelperKeywordRegister(&kw);
- G_WEBSOCKET_FLAGS_BUFFER_ID = DetectHelperBufferRegister(
- b"websocket.flags\0".as_ptr() as *const libc::c_char,
- ALPROTO_WEBSOCKET,
- true,
- true,
- );
- }
+ G_WEBSOCKET_FLAGS_KW_ID = DetectHelperKeywordRegister(&kw);
+ G_WEBSOCKET_FLAGS_BUFFER_ID = DetectHelperBufferRegister(
+ b"websocket.flags\0".as_ptr() as *const libc::c_char,
+ ALPROTO_WEBSOCKET,
+ true,
+ true,
+ );
let kw = SCSigTableElmt {
name: b"websocket.payload\0".as_ptr() as *const libc::c_char,
desc: b"match WebSocket payload\0".as_ptr() as *const libc::c_char,
AppLayerTxMatch: None,
Free: None,
};
- unsafe {
- let _g_ws_payload_kw_id = DetectHelperKeywordRegister(&kw);
- G_WEBSOCKET_PAYLOAD_BUFFER_ID = DetectHelperBufferMpmRegister(
- b"websocket.payload\0".as_ptr() as *const libc::c_char,
- b"WebSocket payload\0".as_ptr() as *const libc::c_char,
- ALPROTO_WEBSOCKET,
- true,
- true,
- websocket_detect_payload_get_data,
- );
- }
+ let _g_ws_payload_kw_id = DetectHelperKeywordRegister(&kw);
+ G_WEBSOCKET_PAYLOAD_BUFFER_ID = DetectHelperBufferMpmRegister(
+ b"websocket.payload\0".as_ptr() as *const libc::c_char,
+ b"WebSocket payload\0".as_ptr() as *const libc::c_char,
+ ALPROTO_WEBSOCKET,
+ true,
+ true,
+ websocket_detect_payload_get_data,
+ );
}