aboutsummaryrefslogtreecommitdiffstats
path: root/src/libipsec/ip_packet.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libipsec/ip_packet.h')
-rw-r--r--src/libipsec/ip_packet.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libipsec/ip_packet.h b/src/libipsec/ip_packet.h
index 73721cfd1..fa38eac2c 100644
--- a/src/libipsec/ip_packet.h
+++ b/src/libipsec/ip_packet.h
@@ -115,4 +115,15 @@ ip_packet_t *ip_packet_create(chunk_t packet);
ip_packet_t *ip_packet_create_from_data(host_t *src, host_t *dst,
u_int8_t next_header, chunk_t data);
+/**
+ * Encode a UDP packet from the given data.
+ *
+ * @param src source address and port (cloned)
+ * @param dst destination address and port (cloned)
+ * @param data UDP data (cloned)
+ * @return ip_packet_t instance, or NULL if invalid
+ */
+ip_packet_t *ip_packet_create_udp_from_data(host_t *src, host_t *dst,
+ chunk_t data);
+
#endif /** IP_PACKET_H_ @}*/