Skip to content

Commit 4484f4e

Browse files
committed
Core: add ipx_msg_set_raw_size function
1 parent f5e20e9 commit 4484f4e

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

include/ipfixcol2/message_ipfix.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,15 @@ ipx_msg_ipfix_add_set_ref(struct ipx_msg_ipfix *msg);
225225
IPX_API struct ipx_ipfix_record *
226226
ipx_msg_ipfix_add_drec_ref(struct ipx_msg_ipfix **msg_ref);
227227

228+
/**
229+
* \brief Set the raw size of an IPFIX message.
230+
*
231+
* \param[in] msg IPFIX Message wrapper.
232+
* \param[in] new_raw_size The new raw_size value.
233+
*/
234+
IPX_API void
235+
ipx_msg_ipfix_set_raw_size(ipx_msg_ipfix_t *msg, uint16_t new_raw_size);
236+
228237
/**@}*/
229238
#ifdef __cplusplus
230239
}

src/core/message_ipfix.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,3 +192,9 @@ ipx_msg_ipfix_add_drec_ref(struct ipx_msg_ipfix **msg_ref)
192192
msg->rec_info.cnt_valid++;
193193
return ((struct ipx_ipfix_record *) (((uint8_t *) msg->recs) + offset));
194194
}
195+
196+
void
197+
ipx_msg_ipfix_set_raw_size(ipx_msg_ipfix_t *msg, uint16_t new_raw_size)
198+
{
199+
msg->raw_size = new_raw_size;
200+
}

0 commit comments

Comments
 (0)