Browse Source

modules_k/usrloc fixed rebase to master from 3.1

Marius Zbihlei 14 năm trước cách đây
mục cha
commit
592e5b818d
2 tập tin đã thay đổi với 11 bổ sung0 xóa
  1. 9 0
      modules_k/usrloc/dlist.h
  2. 2 0
      modules_k/usrloc/usrloc.h

+ 9 - 0
modules_k/usrloc/dlist.h

@@ -122,6 +122,15 @@ int get_all_ucontacts(void *, int, unsigned int,
 		unsigned int part_idx, unsigned int part_max);
 
 
+/*!
+ * \brief Find and return usrloc domain
+ *
+ * \param _n domain name
+ * \param _d usrloc domain (location table)
+ * \return 0 on success, -1 on failure
+ */
+ int get_udomain(const char* _n, udomain_t** _d);
+
 /*!
  * \brief Loops through all domains summing up the number of users
  * \return the number of users, could be zero

+ 2 - 0
modules_k/usrloc/usrloc.h

@@ -152,6 +152,8 @@ typedef int (*register_udomain_t)(const char* _n, struct udomain** _d);
 typedef int  (*get_all_ucontacts_t) (void* buf, int len, unsigned int flags,
 		unsigned int part_idx, unsigned int part_max);
 
+typedef int (*get_udomain_t)(const char* _n, udomain_t** _d);
+
 /*! usrloc API export structure */
 typedef struct usrloc_api {
 	int           use_domain; /*! use_domain module parameter */