forked from dosgo/ngrok-c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.h
52 lines (45 loc) · 817 Bytes
/
config.h
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
#ifndef __CONFIG_H__
#define __CONFIG_H__
#ifndef OPENSSL
#define OPENSSL 1
#endif
#ifndef OPENSSLDL
#define OPENSSLDL 1
#endif
#ifndef ISMBEDTLS
#define ISMBEDTLS 0
#endif
#define MAXBUF 2048
#define DEBUG 0
#define UDPCMD 1
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
inline int echo(const char* format, ...)
{
int n=0;
va_list ap;
va_start(ap, format);
n = vprintf(format,ap);
fflush(stdout);
va_end(ap);
return n;
}
inline int hex(char *xx,int len){
printf("buf:");
for(int i=0;i<len;i++)
{
unsigned char c = xx[i]; // must use unsigned char to print >128 value
if( c< 16)
{
printf("0%x", c);
}
else
{
printf("%x", c);
}
}
printf("\r\n");
return 0;
}
#endif