You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pccrd.h 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef _IPXE_PCCRD_H
  2. #define _IPXE_PCCRD_H
  3. /** @file
  4. *
  5. * Peer Content Caching and Retrieval: Discovery Protocol [MS-PCCRD]
  6. *
  7. */
  8. FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  9. /** PeerDist discovery port */
  10. #define PEERDIST_DISCOVERY_PORT 3702
  11. /** PeerDist discovery IPv4 address (239.255.255.250) */
  12. #define PEERDIST_DISCOVERY_IPV4 \
  13. ( ( 239 << 24 ) | ( 255 << 16 ) | ( 255 << 8 ) | ( 250 << 0 ) )
  14. /** PeerDist discovery IPv6 address (ff02::c) */
  15. #define PEERDIST_DISCOVERY_IPV6 \
  16. { 0xff, 0x02, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xc }
  17. /** A PeerDist discovery reply block count */
  18. struct peerdist_discovery_block_count {
  19. /** Count (as an eight-digit hex value) */
  20. char hex[8];
  21. } __attribute__ (( packed ));
  22. /** A PeerDist discovery reply */
  23. struct peerdist_discovery_reply {
  24. /** List of segment ID strings
  25. *
  26. * The list is terminated with a zero-length string.
  27. */
  28. char *ids;
  29. /** List of peer locations
  30. *
  31. * The list is terminated with a zero-length string.
  32. */
  33. char *locations;
  34. };
  35. extern char * peerdist_discovery_request ( const char *uuid, const char *id );
  36. extern int peerdist_discovery_reply ( char *data, size_t len,
  37. struct peerdist_discovery_reply *reply );
  38. #endif /* _IPXE_PCCRD_H */