http_static: fix memory hss_session using after be freed
[vpp.git] / src / vcl / vppcom.h
index 7826076..164dc37 100644 (file)
@@ -16,6 +16,9 @@
 #ifndef included_vppcom_h
 #define included_vppcom_h
 
+#ifdef __FreeBSD__
+#include <sys/types.h>
+#endif /* __FreeBSD__ */
 #include <netdb.h>
 #include <errno.h>
 #include <fcntl.h>
@@ -55,6 +58,7 @@ typedef enum vppcom_proto_
   VPPCOM_PROTO_QUIC,
   VPPCOM_PROTO_DTLS,
   VPPCOM_PROTO_SRTP,
+  VPPCOM_PROTO_HTTP,
 } vppcom_proto_t;
 
 typedef enum
@@ -116,7 +120,11 @@ typedef enum
   VPPCOM_EFAULT = -EFAULT,
   VPPCOM_ENOMEM = -ENOMEM,
   VPPCOM_EINVAL = -EINVAL,
+#ifdef __linux__
   VPPCOM_EBADFD = -EBADFD,
+#else
+  VPPCOM_EBADFD = -EBADF,
+#endif /* __linux__ */
   VPPCOM_EAFNOSUPPORT = -EAFNOSUPPORT,
   VPPCOM_ECONNABORTED = -ECONNABORTED,
   VPPCOM_ECONNRESET = -ECONNRESET,
@@ -177,6 +185,7 @@ typedef enum
   VPPCOM_ATTR_SET_IP_PKTINFO,
   VPPCOM_ATTR_GET_IP_PKTINFO,
   VPPCOM_ATTR_GET_ORIGINAL_DST,
+  VPPCOM_ATTR_GET_NWRITEQ,
 } vppcom_attr_op_t;
 
 typedef struct _vcl_poll
@@ -251,6 +260,9 @@ extern int vppcom_session_read_segments (uint32_t session_handle,
                                         vppcom_data_segment_t * ds,
                                         uint32_t n_segments,
                                         uint32_t max_bytes);
+extern int vppcom_session_write_segments (uint32_t session_handle,
+                                        vppcom_data_segment_t * ds,
+                                        uint32_t n_segments);
 extern void vppcom_session_free_segments (uint32_t session_handle,
                                          uint32_t n_bytes);
 extern int vppcom_add_cert_key_pair (vppcom_cert_key_pair_t *ckpair);