diff options
author | Valery Ivanov <ivalery111@gmail.com> | 2021-05-08 13:32:54 +0300 |
---|---|---|
committer | Valery Ivanov <ivalery111@gmail.com> | 2021-05-08 13:32:54 +0300 |
commit | 01151165fa29dc6eb4223700e21ffab78a67972f (patch) | |
tree | 1216133a39e0e36c6d38085ae48d26caad6d034a /include/libnet | |
parent | 0d135ed2225db11cb65bfa08b824195ad00cf244 (diff) | |
download | libnet-01151165fa29dc6eb4223700e21ffab78a67972f.tar.gz |
feat(functions): add libnet_build_lldp_ttl function
Diffstat (limited to 'include/libnet')
-rw-r--r-- | include/libnet/libnet-functions.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/libnet/libnet-functions.h b/include/libnet/libnet-functions.h index 8baf47e..28ec4eb 100644 --- a/include/libnet/libnet-functions.h +++ b/include/libnet/libnet-functions.h @@ -762,6 +762,18 @@ const uint8_t *const value, const uint8_t value_s, libnet_t *l, libnet_ptag_t ptag); /** + * Builds a LLDP TTL TLV. The TTL TLV is the _third_ mandatory TLV in the LLDPDU. + * @param ttl number of seconds + * @param l pointer to a libnet context + * @param ptag protocol tag to modify an existing header, 0 to build a new one + * @return protocol tag value on success + * @retval -1 on error + */ +LIBNET_API +libnet_ptag_t libnet_build_lldp_ttl(const uint16_t ttl, +libnet_t *l, libnet_ptag_t ptag); + +/** * Builds an IP version 4 RFC 792 Internet Control Message Protocol (ICMP) * echo request/reply header * @param type type of ICMP packet (should be ICMP_ECHOREPLY or ICMP_ECHO) |