Update.
[gnutls.git] / src / common.h
blob966077146a380db9948405b815eb9b241ea6bfee
1 #define PORT 5556
2 #define SERVER "127.0.0.1"
4 #include <config.h>
5 #include <gnutls/gnutls.h>
7 #include <sys/socket.h>
8 #include <arpa/inet.h>
9 #ifdef _WIN32
10 # include <io.h>
11 # include <winbase.h>
12 # define close closesocket
13 #else
14 # include <netinet/in.h>
15 # include <unistd.h>
16 # include <netdb.h>
17 # include <signal.h>
18 #endif
20 /* the number of elements in the priority structures.
22 #define PRI_MAX 16
24 extern const char str_unknown[];
26 int print_info (gnutls_session state, const char *hostname);
27 void print_cert_info (gnutls_session state, const char *hostname);
28 void print_list (int verbose);
30 void parse_comp (char **comp, int ncomp, int *comp_priority);
31 void parse_kx (char **kx, int nkx, int *kx_priority);
32 void parse_ctypes (char **ctype, int nctype, int *cert_type_priority);
33 void parse_macs (char **macs, int nmacs, int *mac_priority);
34 void parse_ciphers (char **ciphers, int nciphers, int *cipher_priority);
35 void parse_protocols (char **protocols, int protocols_size,
36 int *protocol_priority);
37 const char *raw_to_string (const unsigned char *raw, size_t raw_size);
38 int service_to_port (const char *service);
40 void sockets_init (void);