mikroSDK Reference Manual
ipv6_misc.h
Go to the documentation of this file.
1
31#ifndef _IPV6_MISC_H
32#define _IPV6_MISC_H
33
34//Dependencies
35#include "core/net.h"
36#include "ipv6/ipv6.h"
37
38//C++ guard
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43//IPv6 related functions
44Ipv6AddrState ipv6GetAddrState(NetInterface *interface, const Ipv6Addr *addr);
45
46error_t ipv6SetAddr(NetInterface *interface, uint_t index,
47 const Ipv6Addr *addr, Ipv6AddrState state, systime_t validLifetime,
48 systime_t preferredLifetime, bool_t permanent);
49
50void ipv6AddAddr(NetInterface *interface, const Ipv6Addr *addr,
51 uint32_t validLifetime, uint32_t preferredLifetime);
52
53void ipv6RemoveAddr(NetInterface *interface, const Ipv6Addr *addr);
54
55void ipv6AddPrefix(NetInterface *interface, const Ipv6Addr *prefix,
56 uint_t length, bool_t onLinkFlag, bool_t autonomousFlag,
57 uint32_t validLifetime, uint32_t preferredLifetime);
58
59void ipv6RemovePrefix(NetInterface *interface, const Ipv6Addr *prefix,
60 uint_t length);
61
62void ipv6AddDefaultRouter(NetInterface *interface, const Ipv6Addr *addr,
63 uint16_t lifetime, uint8_t preference);
64
65void ipv6RemoveDefaultRouter(NetInterface *interface, const Ipv6Addr *addr);
66
67void ipv6FlushAddrList(NetInterface *interface);
68void ipv6FlushPrefixList(NetInterface *interface);
69void ipv6FlushDefaultRouterList(NetInterface *interface);
70void ipv6FlushDnsServerList(NetInterface *interface);
71
72error_t ipv6CheckSourceAddr(NetInterface *interface, const Ipv6Addr *ipAddr);
73error_t ipv6CheckDestAddr(NetInterface *interface, const Ipv6Addr *ipAddr);
74
75error_t ipv6SelectSourceAddr(NetInterface **interface,
76 const Ipv6Addr *destAddr, Ipv6Addr *srcAddr);
77
78bool_t ipv6IsOnLink(NetInterface *interface, const Ipv6Addr *ipAddr);
79bool_t ipv6IsAnycastAddr(NetInterface *interface, const Ipv6Addr *ipAddr);
80bool_t ipv6IsTentativeAddr(NetInterface *interface, const Ipv6Addr *ipAddr);
81bool_t ipv6IsLocalHostAddr(const Ipv6Addr *ipAddr);
82
83bool_t ipv6CompPrefix(const Ipv6Addr *ipAddr1, const Ipv6Addr *ipAddr2,
84 size_t length);
85
86uint_t ipv6GetAddrScope(const Ipv6Addr *ipAddr);
87uint_t ipv6GetMulticastAddrScope(const Ipv6Addr *ipAddr);
88
89uint_t ipv6GetCommonPrefixLength(const Ipv6Addr *ipAddr1,
90 const Ipv6Addr *ipAddr2);
91
92error_t ipv6ComputeSolicitedNodeAddr(const Ipv6Addr *ipAddr,
93 Ipv6Addr *solicitedNodeAddr);
94
95error_t ipv6MapMulticastAddrToMac(const Ipv6Addr *ipAddr, MacAddr *macAddr);
96
97void ipv6GenerateLinkLocalAddr(const Eui64 *interfaceId, Ipv6Addr *ipAddr);
98
99void ipv6UpdateInStats(NetInterface *interface, const Ipv6Addr *destIpAddr,
100 size_t length);
101
102void ipv6UpdateOutStats(NetInterface *interface, const Ipv6Addr *destIpAddr,
103 size_t length);
104
105//C++ guard
106#ifdef __cplusplus
107}
108#endif
109
110#endif
error_t
Error codes.
Definition error.h:43
IPv6 (Internet Protocol Version 6)
Ipv6AddrState
IPv6 address state.
Definition ipv6.h:165
TCP/IP stack core.
uint32_t systime_t
System time.
Definition os_port_none.h:90