aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/http/http.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2022-01-24 12:47:50 -0800
committerDamjan Marion <dmarion@me.com>2022-01-26 16:54:46 +0000
commit1d88fb97bef7dbe998830ea1eb2f8519c6cc9e97 (patch)
tree39fd8552586a0a102aafe51e2fadd14390c3eebf /src/plugins/http/http.h
parentb1c9c048a26a1675311849b7d2595b74911a897f (diff)
http: generalize buffer implementation
And add support for passing of pointers Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ida3e5ae4ff7842366ae92a5f33c5e761355951a6
Diffstat (limited to 'src/plugins/http/http.h')
-rw-r--r--src/plugins/http/http.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/plugins/http/http.h b/src/plugins/http/http.h
index 209fc3236df..a75e6bcdacb 100644
--- a/src/plugins/http/http.h
+++ b/src/plugins/http/http.h
@@ -23,6 +23,7 @@
#include <vnet/session/application_interface.h>
#include <vnet/session/application.h>
+#include <http/http_buffer.h>
#define HTTP_DEBUG 0
@@ -105,11 +106,16 @@ typedef enum http_status_code_
HTTP_N_STATUS
} http_status_code_t;
+typedef enum http_msg_data_type_
+{
+ HTTP_MSG_DATA_INLINE,
+ HTTP_MSG_DATA_PTR
+} http_msg_data_type_t;
+
typedef struct http_msg_data_
{
- http_content_type_t content_type;
+ http_msg_data_type_t type;
u32 len;
- u32 offset;
u8 data[0];
} http_msg_data_t;
@@ -121,18 +127,10 @@ typedef struct http_msg_
http_req_method_t method_type;
http_status_code_t code;
};
+ http_content_type_t content_type;
http_msg_data_t data;
} http_msg_t;
-typedef struct http_buffer_
-{
- svm_fifo_t *src;
- svm_fifo_seg_t *segs;
- u32 len;
- u32 cur_seg;
- u32 offset;
-} http_buffer_t;
-
typedef struct http_tc_
{
union