File: ec_strings.h

package info (click to toggle)
ettercap 1:0.8.2-10
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 5,468 kB
  • ctags: 6,333
  • sloc: ansic: 47,337; yacc: 310; lex: 204; makefile: 121; xml: 31; sh: 24
file content (58 lines) | stat: -rw-r--r-- 1,450 bytes parent folder | download | duplicates (3)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef ETTERCAP_STRINGS_H
#define ETTERCAP_STRINGS_H

#ifdef HAVE_CTYPE_H
   #include <ctype.h>
#else
   extern int isprint(int c);
#endif

#ifndef HAVE_STRLCAT_FUNCTION
   #ifndef HAVE_STRLCAT
      #include <missing/strlcat.h>
   #else
      #include <bsd/string.h>
   #endif
#else
   #include <string.h>
#endif
#ifndef HAVE_STRLCPY_FUNCTION
   #ifndef HAVE_STRLCPY
      #include <missing/strlcpy.h>
   #else
      #include <bsd/string.h>
   #endif
#else
   #include <string.h>
#endif
#ifndef HAVE_STRSEP 
   #include <missing/strsep.h>
#endif
#ifndef HAVE_STRCASESTR 
   #include <missing/strcasestr.h>
#endif
#ifndef HAVE_MEMMEM
   #include <missing/memmem.h>
#endif
#ifndef HAVE_BASENAME
   #include <missing/basename.h>
#endif

EC_API_EXTERN int match_pattern(const char *s, const char *pattern);
EC_API_EXTERN int base64_decode(char *bufplain, const char *bufcoded);
EC_API_EXTERN int strescape(char *dst, char *src, size_t len);
EC_API_EXTERN int str_replace(char **text, const char *s, const char *d);   
EC_API_EXTERN size_t strlen_utf8(const char *s);
EC_API_EXTERN char * ec_strtok(char *s, const char *delim, char **ptrptr);
EC_API_EXTERN char getchar_buffer(char **buf);
EC_API_EXTERN int str_hex_to_bytes(char *string, u_char *bytes);
EC_API_EXTERN char * str_tohex(u_char *bin, size_t len, char *dst, size_t dst_len);

#define strtok(x,y) DON_T_USE_STRTOK_DIRECTLY_USE__EC_STRTOK__INSTEAD

#endif

/* EOF */

// vim:ts=3:expandtab