non-modified payload arguments are pointer-to-const
[platform/upstream/libnetfilter_queue.git] / include / libnetfilter_queue / libnetfilter_queue.h
index 6695c3d..2e2ca8b 100644 (file)
 
 #include <libnetfilter_queue/linux_nfnetlink_queue.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct nfq_handle;
 struct nfq_q_handle;
 struct nfq_data;
@@ -56,14 +60,22 @@ extern int nfq_set_verdict(struct nfq_q_handle *qh,
                             u_int32_t id,
                             u_int32_t verdict,
                             u_int32_t data_len,
-                            unsigned char *buf);
-
-extern int nfq_set_verdict_mark(struct nfq_q_handle *qh, 
-                                 u_int32_t id,
-                                 u_int32_t verdict, 
-                                 u_int32_t mark,
-                                 u_int32_t datalen,
-                                 unsigned char *buf);
+                            const unsigned char *buf);
+
+extern int nfq_set_verdict2(struct nfq_q_handle *qh,
+                           u_int32_t id,
+                           u_int32_t verdict, 
+                           u_int32_t mark,
+                           u_int32_t datalen,
+                           const unsigned char *buf);
+
+extern __attribute__((deprecated))
+int nfq_set_verdict_mark(struct nfq_q_handle *qh, 
+                        u_int32_t id,
+                        u_int32_t verdict, 
+                        u_int32_t mark,
+                        u_int32_t datalen,
+                        const unsigned char *buf);
 
 /* message parsing function */
 
@@ -94,6 +106,8 @@ extern struct nfqnl_msg_packet_hw *nfq_get_packet_hw(struct nfq_data *nfad);
 /* return -1 if problem, length otherwise */
 extern int nfq_get_payload(struct nfq_data *nfad, char **data);
 
-
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
 
 #endif /* __LIBNFQNETLINK_H */