info.h 934 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef _RDS_INFO_H
  2. #define _RDS_INFO_H
  3. struct rds_info_lengths {
  4. unsigned int nr;
  5. unsigned int each;
  6. };
  7. struct rds_info_iterator;
  8. /*
  9. * These functions must fill in the fields of @lens to reflect the size
  10. * of the available info source. If the snapshot fits in @len then it
  11. * should be copied using @iter. The caller will deduce if it was copied
  12. * or not by comparing the lengths.
  13. */
  14. typedef void (*rds_info_func)(struct socket *sock, unsigned int len,
  15. struct rds_info_iterator *iter,
  16. struct rds_info_lengths *lens);
  17. void rds_info_register_func(int optname, rds_info_func func);
  18. void rds_info_deregister_func(int optname, rds_info_func func);
  19. int rds_info_getsockopt(struct socket *sock, int optname, char __user *optval,
  20. int __user *optlen);
  21. void rds_info_copy(struct rds_info_iterator *iter, void *data,
  22. unsigned long bytes);
  23. void rds_info_iter_unmap(struct rds_info_iterator *iter);
  24. #endif