iPXE
|
Peer Content Caching and Retrieval (PeerDist) protocol. More...
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static int | http_peerdist_supported (struct http_transaction *http) |
Check whether or not to support PeerDist encoding for this request. More... | |
static int | http_format_p2p_peerdist (struct http_transaction *http, char *buf, size_t len) |
Format HTTP "X-P2P-PeerDist" header. More... | |
static int | http_format_p2p_peerdistex (struct http_transaction *http, char *buf, size_t len) |
Format HTTP "X-P2P-PeerDistEx" header. More... | |
static int | http_peerdist_init (struct http_transaction *http) |
Initialise PeerDist content encoding. More... | |
const struct setting peerdist_setting | __setting (SETTING_MISC, peerdist) |
PeerDist enabled setting. More... | |
static int | apply_peerdist_settings (void) |
Apply PeerDist settings. More... | |
Variables | |
static long | peerdist_enabled = 1 |
PeerDist is globally enabled. More... | |
struct http_request_header http_request_p2p_peerdist | __http_request_header |
HTTP "X-P2P-PeerDist" header. More... | |
struct http_content_encoding peerdist_encoding | __http_content_encoding |
PeerDist HTTP content encoding. More... | |
struct settings_applicator peerdist_applicator | __settings_applicator |
PeerDist settings applicator. More... | |
Peer Content Caching and Retrieval (PeerDist) protocol.
This is quite possibly the ugliest protocol I have ever had the misfortune to encounter, and I've encountered multicast TFTP.
Definition in file peerdist.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Check whether or not to support PeerDist encoding for this request.
http | HTTP transaction |
supported | PeerDist encoding is supported for this request |
Definition at line 48 of file peerdist.c.
References NULL, peerdist_enabled, and http_transaction::xfer.
Referenced by http_format_p2p_peerdist(), and http_format_p2p_peerdistex().
|
static |
Format HTTP "X-P2P-PeerDist" header.
http | HTTP transaction |
buf | Buffer |
len | Length of buffer |
len | Length of header value, or negative error |
Definition at line 78 of file peerdist.c.
References http_peerdist_supported(), len, http_request_range::len, http_request::range, http_transaction::request, snprintf(), and supported.
|
static |
Format HTTP "X-P2P-PeerDistEx" header.
http | HTTP transaction |
buf | Buffer |
len | Length of buffer |
len | Length of header value, or negative error |
Definition at line 118 of file peerdist.c.
References http_peerdist_supported(), len, snprintf(), and supported.
|
static |
Initialise PeerDist content encoding.
http | HTTP transaction |
rc | Return status code |
Definition at line 143 of file peerdist.c.
References http_transaction::content, peermux_filter(), http_transaction::transfer, and http_transaction::uri.
const struct setting peerdist_setting __setting | ( | SETTING_MISC | , |
peerdist | |||
) |
PeerDist enabled setting.
|
static |
Apply PeerDist settings.
rc | Return status code |
Definition at line 167 of file peerdist.c.
References DBGC, fetch_int_setting(), NULL, and peerdist_enabled.
|
static |
PeerDist is globally enabled.
Definition at line 40 of file peerdist.c.
Referenced by apply_peerdist_settings(), and http_peerdist_supported().
struct http_request_header http_request_p2p_peerdistex __http_request_header |
HTTP "X-P2P-PeerDist" header.
Definition at line 105 of file peerdist.c.
struct http_content_encoding peerdist_encoding __http_content_encoding |
PeerDist HTTP content encoding.
Definition at line 149 of file peerdist.c.
struct settings_applicator peerdist_applicator __settings_applicator |
PeerDist settings applicator.
Definition at line 181 of file peerdist.c.