aboutsummaryrefslogtreecommitdiffstats
path: root/lib/src/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'lib/src/protocol')
-rw-r--r--lib/src/protocol/ah.c8
-rw-r--r--lib/src/protocol/icmp.c4
-rw-r--r--lib/src/protocol/ipv4.c7
-rw-r--r--lib/src/protocol/ipv6.c7
-rw-r--r--lib/src/protocol/tcp.c7
5 files changed, 32 insertions, 1 deletions
diff --git a/lib/src/protocol/ah.c b/lib/src/protocol/ah.c
index 3711a3f95..c1395dee8 100644
--- a/lib/src/protocol/ah.c
+++ b/lib/src/protocol/ah.c
@@ -144,6 +144,14 @@ ah_get_header_length (hicn_type_t type, const hicn_protocol_t * h,
}
int
+ah_get_signature (hicn_type_t type, hicn_protocol_t * h,
+ uint8_t ** signature)
+{
+ *signature = h->ah.validationPayload;
+ return HICN_LIB_ERROR_NONE;
+}
+
+int
ah_get_signature_size (hicn_type_t type, const hicn_protocol_t * h,
size_t * signature_size)
{
diff --git a/lib/src/protocol/icmp.c b/lib/src/protocol/icmp.c
index 44b646fb2..45a28959c 100644
--- a/lib/src/protocol/icmp.c
+++ b/lib/src/protocol/icmp.c
@@ -39,7 +39,9 @@ DECLARE_set_lifetime (icmp, UNEXPECTED)
DECLARE_get_length (icmp, UNEXPECTED)
DECLARE_get_payload_length (icmp, UNEXPECTED)
DECLARE_set_payload_length (icmp, UNEXPECTED)
- int icmp_init_packet_header (hicn_type_t type, hicn_protocol_t * h)
+DECLARE_get_signature (icmp, UNEXPECTED)
+
+int icmp_init_packet_header (hicn_type_t type, hicn_protocol_t * h)
{
h->icmp = (_icmp_header_t)
{
diff --git a/lib/src/protocol/ipv4.c b/lib/src/protocol/ipv4.c
index c0b2aaa8c..4e4c47f5b 100644
--- a/lib/src/protocol/ipv4.c
+++ b/lib/src/protocol/ipv4.c
@@ -443,6 +443,13 @@ ipv4_get_key_id (hicn_type_t type, hicn_protocol_t * h,
return CHILD_OPS (get_key_id, type, h, key_id, key_id_size);
}
+int
+ipv4_get_signature (hicn_type_t type, hicn_protocol_t * h,
+ uint8_t ** signature)
+{
+ return CHILD_OPS (get_signature, type, h, signature);
+}
+
DECLARE_HICN_OPS (ipv4);
/*
diff --git a/lib/src/protocol/ipv6.c b/lib/src/protocol/ipv6.c
index 41b00ec92..1cdcc75c0 100644
--- a/lib/src/protocol/ipv6.c
+++ b/lib/src/protocol/ipv6.c
@@ -401,6 +401,13 @@ ipv6_get_key_id (hicn_type_t type, hicn_protocol_t * h,
return CHILD_OPS (get_key_id, type, h, key_id, key_id_size);
}
+int
+ipv6_get_signature (hicn_type_t type, hicn_protocol_t * h,
+ uint8_t ** signature)
+{
+ return CHILD_OPS (get_signature, type, h, signature);
+}
+
DECLARE_HICN_OPS (ipv6);
/*
diff --git a/lib/src/protocol/tcp.c b/lib/src/protocol/tcp.c
index 2afc4f6f4..08a1c73ef 100644
--- a/lib/src/protocol/tcp.c
+++ b/lib/src/protocol/tcp.c
@@ -359,6 +359,13 @@ tcp_get_key_id (hicn_type_t type, hicn_protocol_t * h,
return CHILD_OPS (get_key_id, type, h, key_id, key_id_size);
}
+int
+tcp_get_signature (hicn_type_t type, hicn_protocol_t * h,
+ uint8_t ** signature)
+{
+ return CHILD_OPS (get_signature, type, h, signature);
+}
+
DECLARE_HICN_OPS (tcp);
/*