* onetwo|EF|three|ED|five
*
* \param buffer Pointer to the src MemBuffer instance to write.
- * \param fp Pointer to the file file instance to write to.
+ * \param fp Pointer to the file instance to write to.
*/
#define MemBufferPrintToFP(buffer, fp) do { \
uint32_t i; \
* \brief Write a buffer to the file pointer as a printable char string.
*
* \param buffer Pointer to the src MemBuffer instance to write.
- * \param fp Pointer to the file file instance to write to.
+ * \param fp Pointer to the file instance to write to.
*/
#define MemBufferPrintToFPAsString(mem_buffer, fp) ({ \
fwrite((mem_buffer)->buffer, sizeof(uint8_t), (mem_buffer)->offset, fp); \
* \brief Write a buffer in hex format.
*
* \param buffer Pointer to the src MemBuffer instance to write.
- * \param fp Pointer to the file file instance to write to.
+ * \param fp Pointer to the file instance to write to.
*/
#define MemBufferPrintToFPAsHex(mem_buffer, fp) do { \
uint32_t i; \
*
* \author Eric Leblond <eric@regit.org>
*
- * Util functions for checskum.
+ * Util functions for checksum.
*/
#include "suricata-common.h"
dumpable = prctl(PR_GET_DUMPABLE, 0, 0, 0, 0);
if (dumpable == -1) {
SCLogNotice("Failed to get dumpable state of process, "
- "core dumps may not be abled: %s", strerror(errno));
+ "core dumps may not be enabled: %s",
+ strerror(errno));
}
else if (unlimited || max_dump > 0) {
/* try to enable core dump for this process */
}
if (errno == EINVAL || errno == EPERM) {
- /* could't increase the hard limit, or the soft limit exceeded the hard
+ /* couldn't increase the hard limit, or the soft limit exceeded the hard
* limit; try to raise the soft limit to the hard limit */
if ((lim.rlim_cur < max_dump && lim.rlim_cur < lim.rlim_max)
#ifdef RLIM_SAVED_CUR
}
}
/* failed to set the coredump limit */
- SCLogInfo ("Could't set coredump size to %s.", dump_size_config);
+ SCLogInfo("Couldn't set coredump size to %s.", dump_size_config);
#endif /* HAVE_SYS_RESOURCE_H */
return 0;
}
if (cpus_online > 0)
SCLogInfo("CPUs/cores online: %"PRIu16, cpus_online);
if (cpus_online == 0 && cpus_conf == 0)
- SCLogInfo("Couldn't retireve any information of CPU's, please, send your operating "
+ SCLogInfo("Couldn't retrieve any information of CPU's, please, send your operating "
"system info and check util-cpu.{c,h}");
}
/**
* Get the current number of ticks from the CPU.
*
- * \todo We'll have to deal with removig ticks from the extra cpuids inbetween
+ * \todo We'll have to deal with removing ticks from the extra cpuids in between
* 2 calls.
*/
uint64_t UtilCpuGetTicks(void)
/* Register the signal handler */
signal(SIGUSR1, SignalHandlerSigusr1);
- /** \todo We should check if wie allow more than 1 instance
+ /** \todo We should check if we allow more than 1 instance
to run simultaneously. Maybe change the behaviour
through conf file */
/**
* \brief Seek the mem file from offset and whence
* \param handler pointer to the memfile
- * \param osffset number of bytes to move from whence
+ * \param offset number of bytes to move from whence
* \param whence SEEK_SET, SEEK_CUR, SEEK_END
* \retval pos the position by the last operation, -1 if sizes are out of bounds
*/
* \param handler pointer to the memfile
* \param buf buffer to write in the handler
* \param number of bytes to write
- * \retval count , the number of bytes writen
+ * \retval count , the number of bytes written
*/
static int WriteFn(void *handler, const char *buf, int size)
{
#ifdef SIOCGIFFLAGS
/**
* \brief Get interface flags.
- * \param ifname Inteface name.
+ * \param ifname Interface name.
* \return Interface flags or -1 on error
*/
int GetIfaceFlags(const char *ifname)
#ifdef SIOCSIFFLAGS
/**
* \brief Set interface flags.
- * \param ifname Inteface name.
+ * \param ifname Interface name.
* \param flags Flags to set.
* \return Zero on success.
*/
/**
* \brief Validates an IPV6 address and returns the network endian arranged
- * version of the IPV6 addresss
+ * version of the IPV6 address
*
* \param addr Pointer to a character string containing an IPV6 address
*
/** \brief wrapper for allocing aligned mem
* \param a size
- * \param b alignement
+ * \param b alignment
*/
void *SCMallocAlignedFunc(const size_t size, const size_t align);
#define SCMallocAligned(size, align) SCMallocAlignedFunc((size), (align))
* Prints in the format "00 AA BB"
*
* \param nbuf buffer into which the output is written
- * \param offset of where to start writting into the buffer
+ * \param offset of where to start writing into the buffer
* \param max_size the size of the output buffer
* \param buf buffer to print from
* \param buflen length of the input buffer
extern int run_mode;
/**
- * \brief Drop the previliges of the main thread
+ * \brief Drop the privileges of the main thread
*/
void SCDropMainThreadCaps(uint32_t userid, uint32_t groupid)
{
#include <cap-ng.h>
#include "threadvars.h"
-/**Drop the previliges of the given thread tv, based on the thread cap_flags
+/**Drop the privileges of the given thread tv, based on the thread cap_flags
* which implies the capability requirement of the given thread. Initially all
* caps are dropped and later, the required caps are set for the given thread
*/
*
* To convert a time in seconds into year, month, day, hours, minutes
* and seconds, call localtime_r(), which uses the current time zone
- * to compute these values. Note, glibc's localtime_r() aquires a lock
+ * to compute these values. Note, glibc's localtime_r() acquires a lock
* each time it is called, which limits parallelism. To call
* localtime_r() less often, the values returned are cached for the
* current and previous minute and then seconds are adjusted to