33 #define TESTING GNUNET_NO
36 #define HTTP_SERVER_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply ( \
37 GNUNET_TIME_UNIT_SECONDS, 3)
38 #define HTTP_CLIENT_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply ( \
39 GNUNET_TIME_UNIT_SECONDS, 3)
40 #define HTTP_CLIENT_SESSION_TIMEOUT GNUNET_TIME_relative_multiply ( \
41 GNUNET_TIME_UNIT_SECONDS, 7)
42 #define SERVER_SESSION_TIMEOUT GNUNET_TIME_relative_multiply ( \
43 GNUNET_TIME_UNIT_SECONDS, 7)
44 #define TIMEOUT_LOG GNUNET_ERROR_TYPE_DEBUG
49 #define PROTOCOL "https"
51 #define PROTOCOL "http"
54 #define HTTP_SERVER_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply ( \
55 GNUNET_TIME_UNIT_SECONDS, 15)
56 #define HTTP_CLIENT_NOT_VALIDATED_TIMEOUT GNUNET_TIME_relative_multiply ( \
57 GNUNET_TIME_UNIT_SECONDS, 15)
58 #define HTTP_CLIENT_SESSION_TIMEOUT GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT
59 #define HTTP_SERVER_SESSION_TIMEOUT GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT
60 #define TIMEOUT_LOG GNUNET_ERROR_TYPE_DEBUG
64 #define HTTP_DEFAULT_PORT 80
65 #define HTTPS_DEFAULT_PORT 443
205 const struct sockaddr *
addr,
struct GNUNET_MQ_Envelope * env
static struct GNUNET_TIME_Relative timeout
Desired timeout for the lookup (default is no timeout).
struct TestcasePlugin * plugin
The process handle to the testbed service.
static char * address
GNS address for this phone.
static int numeric
Option -n.
commonly used definitions; globals in this file are exempt from the rule that the module name ("commo...
Transport service plugin API.
#define GNUNET_NETWORK_STRUCT_BEGIN
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32.
#define GNUNET_NETWORK_STRUCT_END
Define as empty, GNUNET_PACKED should suffice, but this won't work on W32;.
#define GNUNET_PACKED
gcc-ism to get packed structs.
GNUNET_NetworkType
Types of networks (with separate quotas) we support.
void(* GNUNET_TRANSPORT_AddressStringCallback)(void *cls, const char *address, int res)
Function called by the pretty printer for the resolved address for each human-readable address obtain...
const char * http_common_plugin_address_to_string(const char *plugin, const void *addr, size_t addrlen)
Function called for a quick conversion of the binary address to a numeric address.
size_t http_common_address_get_size(const struct HttpAddress *addr)
Get the length of an address.
size_t http_common_cmp_addresses(const void *addr1, size_t addrlen1, const void *addr2, size_t addrlen2)
Compare addr1 to addr2.
HttpAddressOptions
Bits in the options field of HTTP addresses.
@ HTTP_OPTIONS_NONE
No bits set.
@ HTTP_OPTIONS_VERIFY_CERTIFICATE
Verify X509 server certificate, it should be valid.
@ HTTP_OPTIONS_TCP_STEALTH
Enable TCP Stealth-style port knocking.
int http_common_plugin_string_to_address(void *cls, const char *addr, uint16_t addrlen, void **buf, size_t *added)
Function called to convert a string address to a binary address.
void http_common_plugin_address_pretty_printer(void *cls, const char *type, const void *addr, size_t addrlen, int numeric, struct GNUNET_TIME_Relative timeout, GNUNET_TRANSPORT_AddressStringCallback asc, void *asc_cls)
Convert the transports address to a nice, human-readable format.
struct HttpAddress * http_common_address_from_socket(const char *protocol, const struct sockaddr *addr, socklen_t addrlen)
Create a HTTP address from a socketaddr.
struct SplittedHTTPAddress * http_split_address(const char *addr)
Split an HTTP address into protocol, hostname, port and path components.
const char * http_common_plugin_address_to_url(void *cls, const void *addr, size_t addrlen)
FIXME.
enum GNUNET_NetworkType http_common_get_network_for_address(struct GNUNET_TRANSPORT_PluginEnvironment *env, const struct GNUNET_HELLO_Address *address)
Function obtain the network type for an address.
struct sockaddr * http_common_socket_from_address(const void *addr, size_t addrlen, int *res)
Create a socketaddr from a HTTP address.
An address for communicating with a peer.
Time for relative time used by GNUnet, in microseconds.
The transport service will pass a pointer to a struct of this type as the first and only argument to ...
HTTP addresses including a full URI.
void * addr
Address following.
uint32_t urlen
Length of URL located after struct.
uint32_t options
Address options see enum HttpAddressOptions
Representation of HTTP URL split into its components.
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model