|
| #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...
|
| |
Peer Content Caching and Retrieval: Discovery Protocol [MS-PCCRD].
Definition in file pccrd.h.
Parse discovery reply.
- Parameters
-
| data | Reply data (not NUL-terminated, will be modified) |
| len | Length of reply data |
| reply | Discovery reply to fill in |
- Return values
-
The discovery reply includes pointers to strings within the modified reply data.
Definition at line 217 of file pccrd.c.
235 DBGC ( reply,
"PCCRD %p missing <wsd:Scopes> tag\n", reply );
242 DBGC ( reply,
"PCCRD %p missing <wsd:XAddrs> tag\n", reply );
248 "PeerDist:BlockCount" );
249 if ( ! blockcount ) {
250 DBGC ( reply,
"PCCRD %p missing <PeerDist:BlockCount> tag\n",
258 max = (
strlen ( blockcount ) /
sizeof ( *count ) );
263 for ( i = 0,
in = scopes,
out = scopes ; *
in ; i++,
in += skip ) {
267 DBGC ( reply,
"PCCRD %p too many segment IDs\n",
275 sizeof ( zcount.
hex ) ) == 0 )
A PeerDist discovery reply block count.
#define ENOENT
No such file or directory.
char hex[8]
Count (as an eight-digit hex value)
#define container_of(ptr, type, field)
Get containing structure.
static unsigned int count
Number of entries.
char * strcpy(char *dest, const char *src)
Copy string.
char * locations
List of peer locations.
#define EPROTO
Protocol error.
size_t strlen(const char *src)
Get length of string.
char hex[8]
Count (as an eight-digit hex value)
char * ids
List of segment ID strings.
uint8_t data[48]
Additional event data.
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
static char * peerdist_discovery_reply_values(char *data, size_t len, const char *name)
Locate discovery reply values.
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().