2 * Smart Traffic Control (STC)
4 * Copyright (c) 2017 Samsung Electronics Co., Ltd. All rights reserved.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 #ifndef __TIZEN_STC_IPT_INTERNAL_H__
21 #define __TIZEN_STC_IPT_INTERNAL_H__
28 * @file stc_internal.h
31 /*****************************************************************************
33 *****************************************************************************/
38 /*****************************************************************************
40 *****************************************************************************/
42 /*****************************************************************************
44 *****************************************************************************/
46 /*****************************************************************************
48 *****************************************************************************/
50 /*****************************************************************************
52 *****************************************************************************/
55 * @addtogroup CAPI_NETWORK_STC_IPTABLES_MODULE
60 * @brief Commits iptables rule.
63 * @privilege %http://tizen.org/privilege/firewall.common
64 * @remarks You must release @a err_str using free().
66 * @param[in] stc The stc handle
67 * @param[in] option The option of iptables rule
68 * @param[out] err_num The error number
69 * @param[out] err_str The error string
71 * @return 0 on success, otherwise a negative error value
72 * @retval #STC_ERROR_NONE Successful
73 * @retval #STC_ERROR_OPERATION_FAILED General error
74 * @retval #STC_ERROR_OUT_OF_MEMORY Out of memory
75 * @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter
76 * @retval #STC_ERROR_INVALID_OPERATION Invalid operation
77 * @retval #STC_ERROR_NOT_INITIALIZED Not initialized
78 * @retval #STC_ERROR_NOT_SUPPORTED Not supported
79 * @retval #STC_ERROR_PERMISSION_DENIED Permission denied
81 * @see stc_initialize()
83 int stc_iptables_commit(stc_h stc, const char *option,
84 int *err_num, char **err_str);
87 * @brief Commits ip6tables rule.
90 * @privilege %http://tizen.org/privilege/firewall.common
91 * @remarks You must release @a err_str using free().
93 * @param[in] stc The stc handle
94 * @param[in] option The option of iptables rule
95 * @param[out] err_num The error number
96 * @param[out] err_str The error string
98 * @return 0 on success, otherwise a negative error value
99 * @retval #STC_ERROR_NONE Successful
100 * @retval #STC_ERROR_OPERATION_FAILED General error
101 * @retval #STC_ERROR_OUT_OF_MEMORY Out of memory
102 * @retval #STC_ERROR_INVALID_PARAMETER Invalid parameter
103 * @retval #STC_ERROR_INVALID_OPERATION Invalid operation
104 * @retval #STC_ERROR_NOT_INITIALIZED Not initialized
105 * @retval #STC_ERROR_NOT_SUPPORTED Not supported
106 * @retval #STC_ERROR_PERMISSION_DENIED Permission denied
108 * @see stc_initialize()
110 int stc_ip6tables_commit(stc_h stc, const char *option,
111 int *err_num, char **err_str);
121 #endif /* __TIZEN_STC_IPT_INTERNAL_H__ */