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