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 
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 FILE_SECBOOT ( PERMITTED );
12 
13 /** PeerDist discovery port */
14 #define PEERDIST_DISCOVERY_PORT 3702
15 
16 /** PeerDist discovery IPv4 address (239.255.255.250) */
17 #define PEERDIST_DISCOVERY_IPV4 \
18  ( ( 239 << 24 ) | ( 255 << 16 ) | ( 255 << 8 ) | ( 250 << 0 ) )
19 
20 /** PeerDist discovery IPv6 address (ff02::c) */
21 #define PEERDIST_DISCOVERY_IPV6 \
22  { 0xff, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xc }
23 
24 /** A PeerDist discovery reply block count */
26  /** Count (as an eight-digit hex value) */
27  char hex[8];
28 } __attribute__ (( packed ));
29 
30 /** A PeerDist discovery reply */
32  /** List of segment ID strings
33  *
34  * The list is terminated with a zero-length string.
35  */
36  char *ids;
37  /** List of peer locations
38  *
39  * The list is terminated with a zero-length string.
40  */
41  char *locations;
42 };
43 
44 extern char * peerdist_discovery_request ( const char *uuid, const char *id );
45 extern int peerdist_discovery_reply ( char *data, size_t len,
46  struct peerdist_discovery_reply *reply );
47 
48 #endif /* _IPXE_PCCRD_H */
A PeerDist discovery reply block count.
Definition: pccrd.h:25
A universally unique ID.
Definition: uuid.h:16
struct peerdist_discovery_reply __attribute__
int peerdist_discovery_reply(char *data, size_t len, struct peerdist_discovery_reply *reply)
Parse discovery reply.
Definition: pccrd.c:217
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
ring len
Length.
Definition: dwmac.h:231
A PeerDist discovery reply.
Definition: pccrd.h:31
char * locations
List of peer locations.
Definition: pccrd.h:41
FILE_SECBOOT(PERMITTED)
char * peerdist_discovery_request(const char *uuid, const char *id)
Construct discovery request.
Definition: pccrd.c:107
char hex[8]
Count (as an eight-digit hex value)
Definition: pccrd.h:27
char * ids
List of segment ID strings.
Definition: pccrd.h:36
uint8_t data[48]
Additional event data.
Definition: ena.h:22