Skip to content

Commit 0c8e955

Browse files
authored
Merge pull request #76 from CESNET/quic_new
FEATURE: Export of new information elements in QUIC plugin
2 parents ef9c052 + 0f740c3 commit 0c8e955

File tree

9 files changed

+571
-123
lines changed

9 files changed

+571
-123
lines changed

include/ipfixprobe/ipfix-elements.hpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,9 @@ namespace ipxp {
246246
#define S_PHISTS_SIZES(F) F(0, 291, -1, nullptr) // BASIC LIST -- FIELD IS e8057id1060 (uint32*)
247247
#define S_PHISTS_IPT(F) F(0, 291, -1, nullptr) // BASIC LIST -- FIELD IS e8057id1061 (uint32*)
248248

249-
#define QUIC_SNI(F) F(8057, 890, -1, nullptr)
249+
#define QUIC_SNI(F) F(8057, 890, -1, nullptr)
250+
#define QUIC_USER_AGENT(F) F(8057, 891, -1, nullptr)
251+
#define QUIC_VERSION(F) F(8057, 892, 4, nullptr)
250252

251253
#define OSQUERY_PROGRAM_NAME(F) F(8057, 852, -1, nullptr)
252254
#define OSQUERY_USERNAME(F) F(8057, 853, -1, nullptr)
@@ -478,7 +480,9 @@ namespace ipxp {
478480
F(WG_DST_PEER)
479481

480482
#define IPFIX_QUIC_TEMPLATE(F) \
481-
F(QUIC_SNI)
483+
F(QUIC_SNI) \
484+
F(QUIC_USER_AGENT) \
485+
F(QUIC_VERSION)
482486

483487
#define IPFIX_OSQUERY_TEMPLATE(F) \
484488
F(OSQUERY_PROGRAM_NAME) \

pcaps/more_initial_samples.pcapng

83.2 KB
Binary file not shown.

pcaps/more_initial_samples2.pcapng

93.5 KB
Binary file not shown.

process/http.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,37 +137,37 @@ struct RecordExtHTTP : public RecordExt {
137137
uint32_t total_length = 0;
138138

139139
length = strlen(user_agent);
140-
if (uint32_t (length + 1) > (uint32_t) size) {
140+
if ((uint32_t) (length + 3) > (uint32_t) size) {
141141
return -1;
142142
}
143143
total_length += variable2ipfix_buffer(buffer + total_length, (uint8_t*) user_agent, length);
144144

145145
length = strlen(method);
146-
if (total_length + length + 3 > (uint32_t)size) {
146+
if (total_length + length + 3 > (uint32_t) size) {
147147
return -1;
148148
}
149149
total_length += variable2ipfix_buffer(buffer + total_length, (uint8_t*) method, length);
150150

151151
length = strlen(host);
152-
if (total_length + length + 3 > (uint32_t)size) {
152+
if (total_length + length + 3 > (uint32_t) size) {
153153
return -1;
154154
}
155155
total_length += variable2ipfix_buffer(buffer + total_length, (uint8_t*) host, length);
156156

157157
length = strlen(referer);
158-
if (total_length + length + 3 > (uint32_t)size) {
158+
if (total_length + length + 3 > (uint32_t) size) {
159159
return -1;
160160
}
161161
total_length += variable2ipfix_buffer(buffer + total_length, (uint8_t*) referer, length);
162162

163163
length = strlen(uri);
164-
if (total_length + length + 4 > (uint32_t)size) {
164+
if (total_length + length + 3 > (uint32_t) size) {
165165
return -1;
166166
}
167167
total_length += variable2ipfix_buffer(buffer + total_length, (uint8_t*) uri, length);
168168

169169
length = strlen(content_type);
170-
if (total_length + length + 3 > (uint32_t)size) {
170+
if (total_length + length + 3 > (uint32_t) size) {
171171
return -1;
172172
}
173173
total_length += variable2ipfix_buffer(buffer + total_length, (uint8_t*) content_type, length);

0 commit comments

Comments
 (0)