• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright (C) 2017 Mellanox Technologies Inc */
2 
3 struct semanage_ibendport;
4 struct semanage_ibendport_key;
5 typedef struct semanage_ibendport_key record_key_t;
6 typedef struct semanage_ibendport record_t;
7 #define DBASE_RECORD_DEFINED
8 
9 #include "ibendport_internal.h"
10 #include "handle.h"
11 #include "database.h"
12 
semanage_ibendport_query(semanage_handle_t * handle,const semanage_ibendport_key_t * key,semanage_ibendport_t ** response)13 int semanage_ibendport_query(semanage_handle_t *handle,
14 			     const semanage_ibendport_key_t *key,
15 			     semanage_ibendport_t **response)
16 {
17 	dbase_config_t *dconfig = semanage_ibendport_dbase_policy(handle);
18 
19 	return dbase_query(handle, dconfig, key, response);
20 }
21 
semanage_ibendport_exists(semanage_handle_t * handle,const semanage_ibendport_key_t * key,int * response)22 int semanage_ibendport_exists(semanage_handle_t *handle,
23 			      const semanage_ibendport_key_t *key,
24 			      int *response)
25 {
26 	dbase_config_t *dconfig = semanage_ibendport_dbase_policy(handle);
27 
28 	return dbase_exists(handle, dconfig, key, response);
29 }
30 
semanage_ibendport_count(semanage_handle_t * handle,unsigned int * response)31 int semanage_ibendport_count(semanage_handle_t *handle,
32 			     unsigned int *response)
33 {
34 	dbase_config_t *dconfig = semanage_ibendport_dbase_policy(handle);
35 
36 	return dbase_count(handle, dconfig, response);
37 }
38 
semanage_ibendport_iterate(semanage_handle_t * handle,int (* handler)(const semanage_ibendport_t * record,void * varg),void * handler_arg)39 int semanage_ibendport_iterate(semanage_handle_t *handle,
40 			       int (*handler)(const semanage_ibendport_t *record,
41 					      void *varg), void *handler_arg)
42 {
43 	dbase_config_t *dconfig = semanage_ibendport_dbase_policy(handle);
44 
45 	return dbase_iterate(handle, dconfig, handler, handler_arg);
46 }
47 
semanage_ibendport_list(semanage_handle_t * handle,semanage_ibendport_t *** records,unsigned int * count)48 int semanage_ibendport_list(semanage_handle_t *handle,
49 			    semanage_ibendport_t ***records,
50 			    unsigned int *count)
51 {
52 	dbase_config_t *dconfig = semanage_ibendport_dbase_policy(handle);
53 
54 	return dbase_list(handle, dconfig, records, count);
55 }
56