ipv6_netif: add current hop limit to interface
This commit is contained in:
parent
7273d5c9ad
commit
c6eaeb4366
@ -47,6 +47,18 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Default hop limit
|
||||||
|
*
|
||||||
|
* @see <a href="https://tools.ietf.org/html/rfc4861#section-6.3.2">
|
||||||
|
* RFC 4861, section 6.3.2
|
||||||
|
* </a>
|
||||||
|
* @see <a href="http://www.iana.org/assignments/ip-parameters/ip-parameters.xhtml#ip-parameters-2">
|
||||||
|
* IANA, IP TIME TO LIVE PARAMETER
|
||||||
|
* </a>
|
||||||
|
*/
|
||||||
|
#define NG_IPV6_NETIF_DEFAULT_HL (64)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @{
|
* @{
|
||||||
* @name Flags for a registered IPv6 address.
|
* @name Flags for a registered IPv6 address.
|
||||||
@ -80,6 +92,7 @@ typedef struct {
|
|||||||
mutex_t mutex; /**< mutex for the interface */
|
mutex_t mutex; /**< mutex for the interface */
|
||||||
kernel_pid_t pid; /**< PID of the interface */
|
kernel_pid_t pid; /**< PID of the interface */
|
||||||
uint16_t mtu; /**< Maximum Transmission Unit (MTU) 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;
|
} ng_ipv6_netif_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -99,9 +99,11 @@ void ng_ipv6_netif_add(kernel_pid_t pid)
|
|||||||
|
|
||||||
DEBUG("Add IPv6 interface %" PRIkernel_pid " (i = %d)\n", pid, i);
|
DEBUG("Add IPv6 interface %" PRIkernel_pid " (i = %d)\n", pid, i);
|
||||||
ipv6_ifs[i].pid = pid;
|
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;
|
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);
|
_add_addr_to_entry(&ipv6_ifs[i], &addr, NG_IPV6_ADDR_BIT_LEN, 0);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user