Webserver+3d print

Dependents:   Nucleo

Committer:
Sergunb
Date:
Sat Feb 04 18:15:49 2017 +0000
Revision:
0:8918a71cdbe9
nothing else

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Sergunb 0:8918a71cdbe9 1 /**
Sergunb 0:8918a71cdbe9 2 * @file ipv6_misc.h
Sergunb 0:8918a71cdbe9 3 * @brief Helper functions for IPv6
Sergunb 0:8918a71cdbe9 4 *
Sergunb 0:8918a71cdbe9 5 * @section License
Sergunb 0:8918a71cdbe9 6 *
Sergunb 0:8918a71cdbe9 7 * Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.
Sergunb 0:8918a71cdbe9 8 *
Sergunb 0:8918a71cdbe9 9 * This file is part of CycloneTCP Open.
Sergunb 0:8918a71cdbe9 10 *
Sergunb 0:8918a71cdbe9 11 * This program is free software; you can redistribute it and/or
Sergunb 0:8918a71cdbe9 12 * modify it under the terms of the GNU General Public License
Sergunb 0:8918a71cdbe9 13 * as published by the Free Software Foundation; either version 2
Sergunb 0:8918a71cdbe9 14 * of the License, or (at your option) any later version.
Sergunb 0:8918a71cdbe9 15 *
Sergunb 0:8918a71cdbe9 16 * This program is distributed in the hope that it will be useful,
Sergunb 0:8918a71cdbe9 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Sergunb 0:8918a71cdbe9 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Sergunb 0:8918a71cdbe9 19 * GNU General Public License for more details.
Sergunb 0:8918a71cdbe9 20 *
Sergunb 0:8918a71cdbe9 21 * You should have received a copy of the GNU General Public License
Sergunb 0:8918a71cdbe9 22 * along with this program; if not, write to the Free Software Foundation,
Sergunb 0:8918a71cdbe9 23 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Sergunb 0:8918a71cdbe9 24 *
Sergunb 0:8918a71cdbe9 25 * @author Oryx Embedded SARL (www.oryx-embedded.com)
Sergunb 0:8918a71cdbe9 26 * @version 1.7.6
Sergunb 0:8918a71cdbe9 27 **/
Sergunb 0:8918a71cdbe9 28
Sergunb 0:8918a71cdbe9 29 #ifndef _IPV6_MISC_H
Sergunb 0:8918a71cdbe9 30 #define _IPV6_MISC_H
Sergunb 0:8918a71cdbe9 31
Sergunb 0:8918a71cdbe9 32 //Dependencies
Sergunb 0:8918a71cdbe9 33 #include "core/net.h"
Sergunb 0:8918a71cdbe9 34 #include "ipv6/ipv6.h"
Sergunb 0:8918a71cdbe9 35
Sergunb 0:8918a71cdbe9 36 //IPv6 related functions
Sergunb 0:8918a71cdbe9 37 Ipv6AddrState ipv6GetAddrState(NetInterface *interface, const Ipv6Addr *addr);
Sergunb 0:8918a71cdbe9 38
Sergunb 0:8918a71cdbe9 39 error_t ipv6SetAddr(NetInterface *interface, uint_t index, const Ipv6Addr *addr,
Sergunb 0:8918a71cdbe9 40 Ipv6AddrState state, systime_t validLifetime, systime_t preferredLifetime, bool_t permanent);
Sergunb 0:8918a71cdbe9 41
Sergunb 0:8918a71cdbe9 42 void ipv6AddAddr(NetInterface *interface, const Ipv6Addr *addr,
Sergunb 0:8918a71cdbe9 43 uint32_t validLifetime, uint32_t preferredLifetime);
Sergunb 0:8918a71cdbe9 44
Sergunb 0:8918a71cdbe9 45 void ipv6RemoveAddr(NetInterface *interface, const Ipv6Addr *addr);
Sergunb 0:8918a71cdbe9 46
Sergunb 0:8918a71cdbe9 47 void ipv6AddPrefix(NetInterface *interface, const Ipv6Addr *prefix,
Sergunb 0:8918a71cdbe9 48 uint_t length, uint32_t validLifetime, uint32_t preferredLifetime);
Sergunb 0:8918a71cdbe9 49
Sergunb 0:8918a71cdbe9 50 void ipv6RemovePrefix(NetInterface *interface, const Ipv6Addr *prefix, uint_t length);
Sergunb 0:8918a71cdbe9 51
Sergunb 0:8918a71cdbe9 52 void ipv6AddDefaultRouter(NetInterface *interface,
Sergunb 0:8918a71cdbe9 53 const Ipv6Addr *addr, uint16_t lifetime);
Sergunb 0:8918a71cdbe9 54
Sergunb 0:8918a71cdbe9 55 void ipv6RemoveDefaultRouter(NetInterface *interface, const Ipv6Addr *addr);
Sergunb 0:8918a71cdbe9 56
Sergunb 0:8918a71cdbe9 57 void ipv6FlushAddrList(NetInterface *interface);
Sergunb 0:8918a71cdbe9 58 void ipv6FlushPrefixList(NetInterface *interface);
Sergunb 0:8918a71cdbe9 59 void ipv6FlushDefaultRouterList(NetInterface *interface);
Sergunb 0:8918a71cdbe9 60 void ipv6FlushDnsServerList(NetInterface *interface);
Sergunb 0:8918a71cdbe9 61
Sergunb 0:8918a71cdbe9 62 error_t ipv6CheckSourceAddr(NetInterface *interface, const Ipv6Addr *ipAddr);
Sergunb 0:8918a71cdbe9 63 error_t ipv6CheckDestAddr(NetInterface *interface, const Ipv6Addr *ipAddr);
Sergunb 0:8918a71cdbe9 64
Sergunb 0:8918a71cdbe9 65 error_t ipv6SelectSourceAddr(NetInterface **interface,
Sergunb 0:8918a71cdbe9 66 const Ipv6Addr *destAddr, Ipv6Addr *srcAddr);
Sergunb 0:8918a71cdbe9 67
Sergunb 0:8918a71cdbe9 68 bool_t ipv6IsOnLink(NetInterface *interface, const Ipv6Addr *ipAddr);
Sergunb 0:8918a71cdbe9 69 bool_t ipv6IsTentativeAddr(NetInterface *interface, const Ipv6Addr *ipAddr);
Sergunb 0:8918a71cdbe9 70 bool_t ipv6IsAnycastAddr(NetInterface *interface, const Ipv6Addr *ipAddr);
Sergunb 0:8918a71cdbe9 71
Sergunb 0:8918a71cdbe9 72 bool_t ipv6CompPrefix(const Ipv6Addr *ipAddr1, const Ipv6Addr *ipAddr2, size_t length);
Sergunb 0:8918a71cdbe9 73
Sergunb 0:8918a71cdbe9 74 uint_t ipv6GetAddrScope(const Ipv6Addr *ipAddr);
Sergunb 0:8918a71cdbe9 75 uint_t ipv6GetMulticastAddrScope(const Ipv6Addr *ipAddr);
Sergunb 0:8918a71cdbe9 76 uint_t ipv6GetCommonPrefixLength(const Ipv6Addr *ipAddr1, const Ipv6Addr *ipAddr2);
Sergunb 0:8918a71cdbe9 77
Sergunb 0:8918a71cdbe9 78 error_t ipv6ComputeSolicitedNodeAddr(const Ipv6Addr *ipAddr,
Sergunb 0:8918a71cdbe9 79 Ipv6Addr *solicitedNodeAddr);
Sergunb 0:8918a71cdbe9 80
Sergunb 0:8918a71cdbe9 81 error_t ipv6MapMulticastAddrToMac(const Ipv6Addr *ipAddr, MacAddr *macAddr);
Sergunb 0:8918a71cdbe9 82
Sergunb 0:8918a71cdbe9 83 void ipv6GenerateLinkLocalAddr(const Eui64* interfaceId, Ipv6Addr *ipAddr);
Sergunb 0:8918a71cdbe9 84
Sergunb 0:8918a71cdbe9 85 #endif
Sergunb 0:8918a71cdbe9 86