1 #ifndef _SEMANAGE_PORT_INTERNAL_H_
2 #define _SEMANAGE_PORT_INTERNAL_H_
3 
4 #include <semanage/port_record.h>
5 #include <semanage/ports_local.h>
6 #include <semanage/ports_policy.h>
7 #include "database.h"
8 #include "handle.h"
9 #include "dso.h"
10 
11 hidden_proto(semanage_port_create)
12     hidden_proto(semanage_port_compare)
13     hidden_proto(semanage_port_compare2)
14     hidden_proto(semanage_port_clone)
15     hidden_proto(semanage_port_free)
16     hidden_proto(semanage_port_key_extract)
17     hidden_proto(semanage_port_key_free)
18     hidden_proto(semanage_port_get_high)
19     hidden_proto(semanage_port_get_low)
20     hidden_proto(semanage_port_set_port)
21     hidden_proto(semanage_port_set_range)
22     hidden_proto(semanage_port_get_proto)
23     hidden_proto(semanage_port_set_proto)
24     hidden_proto(semanage_port_get_proto_str)
25     hidden_proto(semanage_port_get_con)
26     hidden_proto(semanage_port_set_con)
27     hidden_proto(semanage_port_list_local)
28 
29 /* PORT RECORD: method table */
30 extern record_table_t SEMANAGE_PORT_RTABLE;
31 
32 extern int port_file_dbase_init(semanage_handle_t * handle,
33 				const char *path_ro,
34 				const char *path_rw,
35 				dbase_config_t * dconfig);
36 
37 extern void port_file_dbase_release(dbase_config_t * dconfig);
38 
39 extern int port_policydb_dbase_init(semanage_handle_t * handle,
40 				    dbase_config_t * dconfig);
41 
42 extern void port_policydb_dbase_release(dbase_config_t * dconfig);
43 
44 extern int hidden semanage_port_validate_local(semanage_handle_t * handle);
45 
46 /* ==== Internal (to ports) API === */
47 
48 hidden int semanage_port_compare2_qsort(const semanage_port_t ** port,
49 					const semanage_port_t ** port2);
50 
51 #endif
52