2 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __TABLE_FIREWALL_H__
18 #define __TABLE_FIREWALL_H__
20 #include <arpa/inet.h>
21 #include "helper-firewall.h"
24 (*firewall_chain_cb)(const firewall_chain_s *info, void *user_data);
27 (*firewall_rule_cb)(const firewall_rule_s *info, void *user_data);
29 stc_error_e table_firewall_insert_lock(char *name, int state);
30 stc_error_e table_firewall_update_lock(char *name, int state);
31 stc_error_e table_firewall_get_lock(char *name, int *state);
33 stc_error_e table_firewall_insert_chain(firewall_chain_s *info);
34 stc_error_e table_firewall_delete_chain(firewall_chain_s *info);
35 stc_error_e table_firewall_flush_chain(firewall_chain_s *info);
36 stc_error_e table_firewall_update_chain(firewall_chain_s *info);
37 stc_error_e table_firewall_foreach_chain(firewall_chain_cb info_cb,
40 stc_error_e table_firewall_insert_rule(firewall_rule_s *info);
41 stc_error_e table_firewall_delete_rule(firewall_rule_s *info);
42 stc_error_e table_firewall_update_rule(firewall_rule_s *info, guint key);
43 stc_error_e table_firewall_foreach_rule(firewall_rule_cb info_cb,
46 stc_error_e table_firewall_prepare(sqlite3 *db);
47 void table_firewall_finalize(void);
49 #endif /*__TABLE_FIREWALL_H__ */