set type of data that is delivered

pull/23/head
Gerard Wagener 2018-12-03 09:39:44 +01:00
parent 35c0c25b7a
commit 423261613b
2 changed files with 4 additions and 3 deletions

View File

@ -91,7 +91,7 @@ void d4_prepare_header(d4_t* d4)
d4->header.version = atoi(d4->conf[VERSION]); d4->header.version = atoi(d4->conf[VERSION]);
//FIXME length handling //FIXME length handling
strncpy((char*)&(d4->header.uuid), d4->conf[UUID], SZUUID); strncpy((char*)&(d4->header.uuid), d4->conf[UUID], SZUUID);
//TODO set type d4->header.type = atoi(d4->conf[TYPE]);
} }
void d4_update_header(d4_t* d4, ssize_t nread) { void d4_update_header(d4_t* d4, ssize_t nread) {

View File

@ -1,7 +1,7 @@
#ifndef D4_H #ifndef D4_H
#define D4_H #define D4_H
#define ND4PARAMS 6 #define ND4PARAMS 7
#define NERRORS 100 #define NERRORS 100
#define SZCONFVALUE 1024 #define SZCONFVALUE 1024
#define SZERRVALUE 1024 #define SZERRVALUE 1024
@ -59,7 +59,7 @@ typedef struct d4_s {
* d4-conf/collector * d4-conf/collector
*/ */
const char* d4params[] = {"uuid", "snaplen", "key", "version", "source", "destination"}; const char* d4params[] = {"uuid", "snaplen", "key", "version", "source", "destination","type"};
#define UUID 0 #define UUID 0
#define SNAPLEN 1 #define SNAPLEN 1
@ -67,5 +67,6 @@ const char* d4params[] = {"uuid", "snaplen", "key", "version", "source", "destin
#define VERSION 3 #define VERSION 3
#define SOURCE 4 #define SOURCE 4
#define DESTINATION 5 #define DESTINATION 5
#define TYPE 6
#endif #endif