File: event.h

package info (click to toggle)
hashcat 7.1.2%2Bds1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 75,920 kB
  • sloc: lisp: 627,107; ansic: 431,312; perl: 30,157; cpp: 11,400; sh: 5,250; python: 2,504; makefile: 1,188
file content (34 lines) | stat: -rw-r--r-- 1,687 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
 * Author......: See docs/credits.txt
 * License.....: MIT
 */

#ifndef HC_EVENT_H
#define HC_EVENT_H

#include <stdio.h>
#include <stdarg.h>

void event_call (const u32 id, hashcat_ctx_t *hashcat_ctx, const void *buf, const size_t len);

#define EVENT(id)              event_call ((id), hashcat_ctx, NULL,  0)
#define EVENT_DATA(id,buf,len) event_call ((id), hashcat_ctx, (buf), (len))

#ifndef __MINGW_PRINTF_FORMAT
#define __MINGW_PRINTF_FORMAT printf
#endif

__attribute__ ((format (__MINGW_PRINTF_FORMAT, 2, 3))) size_t event_log_advice_nn  (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
__attribute__ ((format (__MINGW_PRINTF_FORMAT, 2, 3))) size_t event_log_info_nn    (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
__attribute__ ((format (__MINGW_PRINTF_FORMAT, 2, 3))) size_t event_log_warning_nn (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
__attribute__ ((format (__MINGW_PRINTF_FORMAT, 2, 3))) size_t event_log_error_nn   (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);

__attribute__ ((format (__MINGW_PRINTF_FORMAT, 2, 3))) size_t event_log_advice     (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
__attribute__ ((format (__MINGW_PRINTF_FORMAT, 2, 3))) size_t event_log_info       (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
__attribute__ ((format (__MINGW_PRINTF_FORMAT, 2, 3))) size_t event_log_warning    (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);
__attribute__ ((format (__MINGW_PRINTF_FORMAT, 2, 3))) size_t event_log_error      (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...);

int  event_ctx_init         (hashcat_ctx_t *hashcat_ctx);
void event_ctx_destroy      (hashcat_ctx_t *hashcat_ctx);

#endif // HC_EVENT_H