These changes are the raw update to qemu-2.6.
[kvmfornfv.git] / qemu / roms / ipxe / src / include / ipxe / pccrd.h
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 */
24 struct peerdist_discovery_block_count {
25         /** Count (as an eight-digit hex value) */
26         char hex[8];
27 } __attribute__ (( packed ));
28
29 /** A PeerDist discovery reply */
30 struct 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 */