Tizen 2.0 Release
[external/libgnutls26.git] / src / common.h
1 #define PORT 5556
2 #define SERVER "127.0.0.1"
3
4 #include <gnutls/gnutls.h>
5
6 #include <sys/socket.h>
7 #include <netdb.h>
8 #include <unistd.h>
9 #include <netinet/in.h>
10 #include <signal.h>
11 #ifdef _WIN32
12 #include <io.h>
13 #include <winbase.h>
14 #endif
15
16 #ifndef __attribute__
17 #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
18 #define __attribute__(Spec)     /* empty */
19 #endif
20 #endif
21
22 /* the number of elements in the priority structures.
23  */
24 #define PRI_MAX 16
25
26 extern const char str_unknown[];
27
28 int print_info (gnutls_session_t state, const char *hostname, int insecure);
29 void print_cert_info (gnutls_session_t state, const char *hostname,
30                       int insecure);
31 void print_list (int verbose);
32
33 const char *raw_to_string (const unsigned char *raw, size_t raw_size);
34 int service_to_port (const char *service);
35 void pkcs11_common (void);
36 void sockets_init (void);