GNUnet  0.10.x
Data Structures | Macros | Functions
plugin_transport_http.h File Reference

http transport service plugin More...

#include "platform.h"
#include "gnunet_common.h"
#include "gnunet_constants.h"
#include "gnunet_protocols.h"
#include "gnunet_connection_lib.h"
#include "gnunet_service_lib.h"
#include "gnunet_statistics_service.h"
#include "gnunet_transport_service.h"
#include "gnunet_resolver_service.h"
#include "gnunet_server_lib.h"
#include "gnunet_container_lib.h"
#include "gnunet_transport_plugin.h"
#include "gnunet_os_lib.h"
#include "gnunet_nat_lib.h"
#include "microhttpd.h"
#include "gnunet_curl_lib.h"
Include dependency graph for plugin_transport_http.h:

Go to the source code of this file.

Data Structures

struct  Plugin
 Handle for a plugin. More...
 
struct  HttpAddress
 HTTP addresses including a full URI. More...
 
struct  IPv4HttpAddress
 IPv4 addresses. More...
 
struct  IPv6HttpAddress
 IPv4 addresses. More...
 
struct  ServerRequest
 Information we keep with MHD for an HTTP request. More...
 
struct  GNUNET_ATS_Session
 Information about ongoing sessions of the transport client. More...
 
struct  HTTP_Message
 Message to send using http. More...
 

Macros

#define DEBUG_HTTP   GNUNET_EXTRA_LOGGING
 
#define VERBOSE_SERVER   GNUNET_EXTRA_LOGGING
 
#define VERBOSE_CLIENT   GNUNET_EXTRA_LOGGING
 
#define VERBOSE_CURL   GNUNET_NO
 
#define LIBGNUNET_PLUGIN_TRANSPORT_INIT   libgnunet_plugin_transport_http_init
 
#define LIBGNUNET_PLUGIN_TRANSPORT_DONE   libgnunet_plugin_transport_http_done
 
#define INBOUND   GNUNET_YES
 
#define OUTBOUND   GNUNET_NO
 
#define HTTP_NOT_VALIDATED_TIMEOUT   GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15)
 

Functions

struct GNUNET_ATS_Sessioncreate_session (struct Plugin *plugin, const struct GNUNET_PeerIdentity *target, const void *addr, size_t addrlen)
 
int exist_session (struct Plugin *plugin, struct GNUNET_ATS_Session *s)
 
void delete_session (struct GNUNET_ATS_Session *s)
 
struct GNUNET_TIME_Relative http_plugin_receive (void *cls, const struct GNUNET_PeerIdentity *peer, const struct GNUNET_MessageHeader *message, struct GNUNET_ATS_Session *session, const char *sender_address, uint16_t sender_address_len)
 
const char * http_plugin_address_to_string (void *cls, const void *addr, size_t addrlen)
 
int client_disconnect (struct GNUNET_ATS_Session *s)
 
int client_connect (struct GNUNET_ATS_Session *s)
 
int client_send (struct GNUNET_ATS_Session *s, struct HTTP_Message *msg)
 
int client_start (struct Plugin *plugin)
 
void client_stop (struct Plugin *plugin)
 
int server_disconnect (struct GNUNET_ATS_Session *s)
 
int server_send (struct GNUNET_ATS_Session *s, struct HTTP_Message *msg)
 
int server_start (struct Plugin *plugin)
 
void server_stop (struct Plugin *plugin)
 
void notify_session_end (void *cls, const struct GNUNET_PeerIdentity *peer, struct GNUNET_ATS_Session *s)
 

Detailed Description

http transport service plugin

Author
Matthias Wachs

Definition in file plugin_transport_http.h.

Macro Definition Documentation

◆ DEBUG_HTTP

#define DEBUG_HTTP   GNUNET_EXTRA_LOGGING

Definition at line 48 of file plugin_transport_http.h.

◆ VERBOSE_SERVER

#define VERBOSE_SERVER   GNUNET_EXTRA_LOGGING

Definition at line 49 of file plugin_transport_http.h.

Referenced by run_mhd_start_daemon().

◆ VERBOSE_CLIENT

#define VERBOSE_CLIENT   GNUNET_EXTRA_LOGGING

Definition at line 50 of file plugin_transport_http.h.

◆ VERBOSE_CURL

#define VERBOSE_CURL   GNUNET_NO

Definition at line 51 of file plugin_transport_http.h.

◆ LIBGNUNET_PLUGIN_TRANSPORT_INIT

#define LIBGNUNET_PLUGIN_TRANSPORT_INIT   libgnunet_plugin_transport_http_init

Definition at line 57 of file plugin_transport_http.h.

◆ LIBGNUNET_PLUGIN_TRANSPORT_DONE

#define LIBGNUNET_PLUGIN_TRANSPORT_DONE   libgnunet_plugin_transport_http_done

Definition at line 58 of file plugin_transport_http.h.

◆ INBOUND

#define INBOUND   GNUNET_YES

Definition at line 61 of file plugin_transport_http.h.

◆ OUTBOUND

#define OUTBOUND   GNUNET_NO

Definition at line 62 of file plugin_transport_http.h.

◆ HTTP_NOT_VALIDATED_TIMEOUT

#define HTTP_NOT_VALIDATED_TIMEOUT   GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 15)

Definition at line 65 of file plugin_transport_http.h.

Function Documentation

◆ create_session()

struct GNUNET_ATS_Session* create_session ( struct Plugin plugin,
const struct GNUNET_PeerIdentity target,
const void *  addr,
size_t  addrlen 
)

◆ exist_session()

int exist_session ( struct Plugin plugin,
struct GNUNET_ATS_Session s 
)

◆ delete_session()

void delete_session ( struct GNUNET_ATS_Session s)

◆ http_plugin_receive()

struct GNUNET_TIME_Relative http_plugin_receive ( void *  cls,
const struct GNUNET_PeerIdentity peer,
const struct GNUNET_MessageHeader message,
struct GNUNET_ATS_Session session,
const char *  sender_address,
uint16_t  sender_address_len 
)

◆ http_plugin_address_to_string()

const char* http_plugin_address_to_string ( void *  cls,
const void *  addr,
size_t  addrlen 
)

◆ client_disconnect()

int client_disconnect ( struct GNUNET_ATS_Session s)

◆ client_connect()

int client_connect ( struct GNUNET_ATS_Session s)

◆ client_send()

int client_send ( struct GNUNET_ATS_Session s,
struct HTTP_Message msg 
)

Referenced by run().

Here is the caller graph for this function:

◆ client_start()

int client_start ( struct Plugin plugin)

Referenced by run().

Here is the caller graph for this function:

◆ client_stop()

void client_stop ( struct Plugin plugin)

◆ server_disconnect()

int server_disconnect ( struct GNUNET_ATS_Session s)

◆ server_send()

int server_send ( struct GNUNET_ATS_Session s,
struct HTTP_Message msg 
)

◆ server_start()

int server_start ( struct Plugin plugin)

◆ server_stop()

void server_stop ( struct Plugin plugin)

◆ notify_session_end()

void notify_session_end ( void *  cls,
const struct GNUNET_PeerIdentity peer,
struct GNUNET_ATS_Session s 
)