diff --git a/sys/include/net/ng_ipv6/netif.h b/sys/include/net/ng_ipv6/netif.h index 601d7cdae8..dafc4a4044 100644 --- a/sys/include/net/ng_ipv6/netif.h +++ b/sys/include/net/ng_ipv6/netif.h @@ -47,6 +47,18 @@ extern "C" { #endif #endif +/** + * @brief Default hop limit + * + * @see + * RFC 4861, section 6.3.2 + * + * @see + * IANA, IP TIME TO LIVE PARAMETER + * + */ +#define NG_IPV6_NETIF_DEFAULT_HL (64) + /** * @{ * @name Flags for a registered IPv6 address. @@ -80,6 +92,7 @@ typedef struct { mutex_t mutex; /**< mutex for the interface */ kernel_pid_t pid; /**< PID of the interface */ uint16_t mtu; /**< Maximum Transmission Unit (MTU) of the interface */ + uint8_t cur_hl; /**< current hop limit for the interface */ } ng_ipv6_netif_t; /** diff --git a/sys/net/network_layer/ng_ipv6/netif/ng_ipv6_netif.c b/sys/net/network_layer/ng_ipv6/netif/ng_ipv6_netif.c index a5f488f2af..d2f98f85b1 100644 --- a/sys/net/network_layer/ng_ipv6/netif/ng_ipv6_netif.c +++ b/sys/net/network_layer/ng_ipv6/netif/ng_ipv6_netif.c @@ -99,9 +99,11 @@ void ng_ipv6_netif_add(kernel_pid_t pid) DEBUG("Add IPv6 interface %" PRIkernel_pid " (i = %d)\n", pid, i); ipv6_ifs[i].pid = pid; - DEBUG(" * pid = %" PRIkernel_pid "\n", ipv6_ifs[i].pid); + DEBUG(" * pid = %" PRIkernel_pid " ", ipv6_ifs[i].pid); ipv6_ifs[i].mtu = NG_IPV6_DEFAULT_MTU; - DEBUG(" * mtu = %d\n", ipv6_ifs[i].mtu); + DEBUG("mtu = %d ", ipv6_ifs[i].mtu); + ipv6_ifs[i].cur_hl = NG_IPV6_NETIF_DEFAULT_HL; + DEBUG("cur_hl = %d ", ipv6_ifs[i].cur_hl); _add_addr_to_entry(&ipv6_ifs[i], &addr, NG_IPV6_ADDR_BIT_LEN, 0);