* \brief UTHBuildPacketReal is a function that create tcp/udp packets for unittests
* specifying ip and port sources and destinations (IPV6)
*
- * \param payload pointer to the payloadd buffer
+ * \param payload pointer to the payload buffer
* \param payload_len pointer to the length of the payload
* \param ipproto Protocols allowed atm are IPPROTO_TCP and IPPROTO_UDP
* \param src pointer to a string containing the ip source
* \brief UTHBuildPacketReal is a function that create tcp/udp packets for unittests
* specifying ip and port sources and destinations
*
- * \param payload pointer to the payloadd buffer
+ * \param payload pointer to the payload buffer
* \param payload_len pointer to the length of the payload
* \param ipproto Protocols allowed atm are IPPROTO_TCP and IPPROTO_UDP
* \param src pointer to a string containing the ip source
* \brief UTHBuildPacket is a wrapper that build packets with default ip
* and port fields
*
- * \param payload pointer to the payloadd buffer
+ * \param payload pointer to the payload buffer
* \param payload_len pointer to the length of the payload
* \param ipproto Protocols allowed atm are IPPROTO_TCP and IPPROTO_UDP
*
* \brief UTHBuildPacketSrcDst is a wrapper that build packets specifying IPs
* and defaulting ports
*
- * \param payload pointer to the payloadd buffer
+ * \param payload pointer to the payload buffer
* \param payload_len pointer to the length of the payload
* \param ipproto Protocols allowed atm are IPPROTO_TCP and IPPROTO_UDP
*
* \brief UTHBuildPacketSrcDstPorts is a wrapper that build packets specifying
* src and dst ports and defaulting IPs
*
- * \param payload pointer to the payloadd buffer
+ * \param payload pointer to the payload buffer
* \param payload_len pointer to the length of the payload
* \param ipproto Protocols allowed atm are IPPROTO_TCP and IPPROTO_UDP
*
}
/**
- * \brief UTHGenericTest: function that perfom a generic check taking care of
+ * \brief UTHGenericTest: function that perform a generic check taking care of
* as maximum common unittest elements as possible.
* It will create a detection engine, append an array
- * of signatures an check the spected results for each
+ * of signatures an check the expected results for each
* of them, it check matches for an array of packets
*
* \param pkt pointer to the array of packets
* \retval int 1 if the match of all the sids is the specified has the
* specified results; 0 if not
*/
-int UTHCheckPacketMatchResults(Packet *p, uint32_t sids[],
- uint32_t results[], int numsids)
+int UTHCheckPacketMatchResults(Packet *p, uint32_t sids[], uint32_t results[], int numsigs)
{
if (p == NULL || sids == NULL) {
SCLogError("Arguments invalid, check if the "
int i = 0;
int res = 1;
- for (; i < numsids; i++) {
+ for (; i < numsigs; i++) {
uint32_t r = PacketAlertCheck(p, sids[i]);
if (r != results[i]) {
SCLogInfo("Sid %" PRIu32 " matched %" PRIu32 " times, and not %" PRIu32 " as expected",
* \param numsigs number of signatures to load from the array
* (size of the array)
*
- * \retval int 0 if we have errors; 1 if all the signatures loaded succesfuly
+ * \retval int 0 if we have errors; 1 if all the signatures loaded successfully
*/
int UTHAppendSigs(DetectEngineCtx *de_ctx, const char *sigs[], int numsigs)
{
/**
* \test UTHMatchPacketsWithResults Match a packet or a array of packets against sigs
- * of a de_ctx, checking that each signature match match X times for certain packets
+ * of a de_ctx, checking that each signature matches X times for certain packets
*
* \param de_ctx pointer with the signatures loaded
* \param p pointer to the array of packets
FLOWLOCK_UNLOCK(p->flow);
}
- /* Now the queues shoul be updated */
+ /* Now the queues should be updated */
UTHFreePacket(p);
}