Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _RDS_INFO_H
0003 #define _RDS_INFO_H
0004 
0005 struct rds_info_lengths {
0006     unsigned int    nr;
0007     unsigned int    each;
0008 };
0009 
0010 struct rds_info_iterator;
0011 
0012 /*
0013  * These functions must fill in the fields of @lens to reflect the size
0014  * of the available info source.  If the snapshot fits in @len then it
0015  * should be copied using @iter.  The caller will deduce if it was copied
0016  * or not by comparing the lengths.
0017  */
0018 typedef void (*rds_info_func)(struct socket *sock, unsigned int len,
0019                   struct rds_info_iterator *iter,
0020                   struct rds_info_lengths *lens);
0021 
0022 void rds_info_register_func(int optname, rds_info_func func);
0023 void rds_info_deregister_func(int optname, rds_info_func func);
0024 int rds_info_getsockopt(struct socket *sock, int optname, char __user *optval,
0025             int __user *optlen);
0026 void rds_info_copy(struct rds_info_iterator *iter, void *data,
0027            unsigned long bytes);
0028 void rds_info_iter_unmap(struct rds_info_iterator *iter);
0029 
0030 
0031 #endif