aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/packet.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/charon/packet.h')
-rw-r--r--Source/charon/packet.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/Source/charon/packet.h b/Source/charon/packet.h
index b5e73e095..c56e859b2 100644
--- a/Source/charon/packet.h
+++ b/Source/charon/packet.h
@@ -42,26 +42,29 @@
typedef struct packet_s packet_t;
struct packet_s {
/**
- * senders address and port
+ * Address family, such as AF_INET
*/
- struct {
- struct sockaddr_in addr;
- size_t len;
- } sender;
+ int family;
+ size_t sockaddr_len;
+
+ /**
+ * source address structure
+ */
+ struct sockaddr source;
/**
- * receivers address and port
+ * destination address structure
*/
- struct {
- struct sockaddr_in addr;
- size_t len;
- } receiver;
+ struct sockaddr destination;
/**
* message data
*/
chunk_t data;
+ status_t (*set_destination) (packet_t *packet, char *address, u_int16_t port);
+ status_t (*set_source) (packet_t *packet, char *address, u_int16_t port);
+
/**
* @brief
*
@@ -77,6 +80,6 @@ struct packet_s {
* @param
* @return
*/
-packet_t *packet_create();
+packet_t *packet_create(int family);
#endif /*PACKET_H_*/