diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/icmpv6.c | 2 | ||||
-rw-r--r-- | lib/icmpv6.h | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/icmpv6.c b/lib/icmpv6.c index 1bddf65..ac1474d 100644 --- a/lib/icmpv6.c +++ b/lib/icmpv6.c @@ -42,7 +42,7 @@ const struct in6_addr all_router_mcast_addr = { }; /* Prepends the ipv6 header and returns checksum content */ -static uint16_t icmpv6_prepend_ip6hdr(struct msgb *msg, const struct in6_addr *saddr, +uint16_t icmpv6_prepend_ip6hdr(struct msgb *msg, const struct in6_addr *saddr, const struct in6_addr *daddr) { uint32_t len; diff --git a/lib/icmpv6.h b/lib/icmpv6.h index 44b9b73..4b4dc37 100644 --- a/lib/icmpv6.h +++ b/lib/icmpv6.h @@ -22,6 +22,13 @@ struct icmpv6_hdr { uint16_t csum; } __attribute__ ((packed)); +struct icmpv6_echo_hdr { + struct icmpv6_hdr hdr; + uint16_t ident; /* Identifier */ + uint16_t seq; /* Sequence number */ + uint8_t data[0]; /* Data */ +} __attribute__ ((packed)); + /* RFC4861 Section 4.1 */ struct icmpv6_rsol_hdr { struct icmpv6_hdr hdr; @@ -76,6 +83,9 @@ struct icmpv6_opt_prefix { uint8_t prefix[16]; } __attribute__ ((packed)); +uint16_t icmpv6_prepend_ip6hdr(struct msgb *msg, const struct in6_addr *saddr, + const struct in6_addr *daddr); + struct msgb *icmpv6_construct_rs(const struct in6_addr *saddr); int handle_router_mcast(struct gsn_t *gsn, struct pdp_t *pdp, |