iPXE
|
Peer Content Caching and Retrieval: Discovery Protocol [MS-PCCRD]. More...
Go to the source code of this file.
Data Structures | |
struct | peerdist_discovery_block_count |
A PeerDist discovery reply block count. More... | |
struct | peerdist_discovery_reply |
A PeerDist discovery reply. More... | |
Macros | |
#define | PEERDIST_DISCOVERY_PORT 3702 |
PeerDist discovery port. More... | |
#define | PEERDIST_DISCOVERY_IPV4 ( ( 239 << 24 ) | ( 255 << 16 ) | ( 255 << 8 ) | ( 250 << 0 ) ) |
PeerDist discovery IPv4 address (239.255.255.250) More... | |
#define | PEERDIST_DISCOVERY_IPV6 { 0xff, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xc } |
PeerDist discovery IPv6 address (ff02::c) More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
struct peerdist_discovery_block_count | __attribute__ ((packed)) |
char * | peerdist_discovery_request (const char *uuid, const char *id) |
Construct discovery request. More... | |
int | peerdist_discovery_reply (char *data, size_t len, struct peerdist_discovery_reply *reply) |
Parse discovery reply. More... | |
Variables | |
char | hex [8] |
Count (as an eight-digit hex value) More... | |
struct peerdist_discovery_reply | __attribute__ |
Peer Content Caching and Retrieval: Discovery Protocol [MS-PCCRD].
Definition in file pccrd.h.
#define PEERDIST_DISCOVERY_PORT 3702 |
#define PEERDIST_DISCOVERY_IPV4 ( ( 239 << 24 ) | ( 255 << 16 ) | ( 255 << 8 ) | ( 250 << 0 ) ) |
#define PEERDIST_DISCOVERY_IPV6 { 0xff, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xc } |
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
struct peerdist_discovery_block_count __attribute__ | ( | (packed) | ) |
char* peerdist_discovery_request | ( | const char * | uuid, |
const char * | id | ||
) |
Construct discovery request.
uuid | Message UUID string |
id | Segment identifier string |
request | Discovery request, or NULL on failure |
The request is dynamically allocated; the caller must eventually free() the request.
Definition at line 106 of file pccrd.c.
References asprintf(), len, NULL, PEERDIST_DISCOVERY_REQUEST, and request.
Referenced by peerdisc_socket_tx().
int peerdist_discovery_reply | ( | char * | data, |
size_t | len, | ||
struct peerdist_discovery_reply * | reply | ||
) |
Parse discovery reply.
data | Reply data (not NUL-terminated, will be modified) |
len | Length of reply data |
reply | Discovery reply to fill in |
rc | Return status code |
The discovery reply includes pointers to strings within the modified reply data.
Definition at line 216 of file pccrd.c.
References container_of, count, data, DBGC, ENOENT, EPROTO, hex, peerdist_discovery_block_count::hex, peerdist_discovery_reply::ids, in, len, peerdist_discovery_reply::locations, max, memcmp(), out, peerdist_discovery_reply_values(), strcpy(), and strlen().
char hex[8] |
Count (as an eight-digit hex value)
Definition at line 12 of file pccrd.h.
Referenced by peerdist_discovery_reply(), and vcprintf().