iPXE
pccrd.h
Go to the documentation of this file.
1#ifndef _IPXE_PCCRD_H
2#define _IPXE_PCCRD_H
3
4/** @file
5 *
6 * Peer Content Caching and Retrieval: Discovery Protocol [MS-PCCRD]
7 *
8 */
9
10FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11FILE_SECBOOT ( PERMITTED );
12
13#include <ipxe/ip.h>
14
15/** PeerDist discovery port */
16#define PEERDIST_DISCOVERY_PORT 3702
17
18/** PeerDist discovery IPv4 address (239.255.255.250) */
19#define PEERDIST_DISCOVERY_IPV4 IPV4 ( 239, 255, 255, 250 )
20
21/** PeerDist discovery IPv6 address (ff02::c) */
22#define PEERDIST_DISCOVERY_IPV6 \
23 { 0xff, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xc }
24
25/** A PeerDist discovery reply block count */
27 /** Count (as an eight-digit hex value) */
28 char hex[8];
29} __attribute__ (( packed ));
30
31/** A PeerDist discovery reply */
33 /** List of segment ID strings
34 *
35 * The list is terminated with a zero-length string.
36 */
37 char *ids;
38 /** List of peer locations
39 *
40 * The list is terminated with a zero-length string.
41 */
42 char *locations;
43};
44
45extern char * peerdist_discovery_request ( const char *uuid, const char *id );
46extern int peerdist_discovery_reply ( char *data, size_t len,
47 struct peerdist_discovery_reply *reply );
48
49#endif /* _IPXE_PCCRD_H */
ring len
Length.
Definition dwmac.h:226
uint8_t data[48]
Additional event data.
Definition ena.h:11
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:921
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:951
#define __attribute__(x)
Definition compiler.h:10
IP protocol.
int peerdist_discovery_reply(char *data, size_t len, struct peerdist_discovery_reply *reply)
Parse discovery reply.
Definition pccrd.c:217
char * peerdist_discovery_request(const char *uuid, const char *id)
Construct discovery request.
Definition pccrd.c:107
A PeerDist discovery reply block count.
Definition pccrd.h:26
char hex[8]
Count (as an eight-digit hex value).
Definition pccrd.h:28
A PeerDist discovery reply.
Definition pccrd.h:32
char * ids
List of segment ID strings.
Definition pccrd.h:37
char * locations
List of peer locations.
Definition pccrd.h:42
A universally unique ID.
Definition uuid.h:16