Dependents:   Nucleo

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ndp.h Source File

ndp.h

Go to the documentation of this file.
00001 /**
00002  * @file ndp.h
00003  * @brief NDP (Neighbor Discovery Protocol)
00004  *
00005  * @section License
00006  *
00007  * Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.
00008  *
00009  * This file is part of CycloneTCP Open.
00010  *
00011  * This program is free software; you can redistribute it and/or
00012  * modify it under the terms of the GNU General Public License
00013  * as published by the Free Software Foundation; either version 2
00014  * of the License, or (at your option) any later version.
00015  *
00016  * This program is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU General Public License
00022  * along with this program; if not, write to the Free Software Foundation,
00023  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00024  *
00025  * @author Oryx Embedded SARL (www.oryx-embedded.com)
00026  * @version 1.7.6
00027  **/
00028 
00029 #ifndef _NDP_H
00030 #define _NDP_H
00031 
00032 //Dependencies
00033 #include "core/net.h"
00034 
00035 //NDP support
00036 #ifndef NDP_SUPPORT
00037    #define NDP_SUPPORT ENABLED
00038 #elif (NDP_SUPPORT != ENABLED && NDP_SUPPORT != DISABLED)
00039    #error NDP_SUPPORT parameter is not valid
00040 #endif
00041 
00042 //NDP tick interval
00043 #ifndef NDP_TICK_INTERVAL
00044    #define NDP_TICK_INTERVAL 200
00045 #elif (NDP_TICK_INTERVAL < 10)
00046    #error NDP_TICK_INTERVAL parameter is not valid
00047 #endif
00048 
00049 //Neighbor cache size
00050 #ifndef NDP_NEIGHBOR_CACHE_SIZE
00051    #define NDP_NEIGHBOR_CACHE_SIZE 8
00052 #elif (NDP_NEIGHBOR_CACHE_SIZE < 1)
00053    #error NDP_NEIGHBOR_CACHE_SIZE parameter is not valid
00054 #endif
00055 
00056 //Destination cache size
00057 #ifndef NDP_DEST_CACHE_SIZE
00058    #define NDP_DEST_CACHE_SIZE 8
00059 #elif (NDP_DEST_CACHE_SIZE < 1)
00060    #error NDP_DEST_CACHE_SIZE parameter is not valid
00061 #endif
00062 
00063 //Maximum number of packets waiting for address resolution to complete
00064 #ifndef NDP_MAX_PENDING_PACKETS
00065    #define NDP_MAX_PENDING_PACKETS 2
00066 #elif (NDP_MAX_PENDING_PACKETS < 1)
00067    #error NDP_MAX_PENDING_PACKETS parameter is not valid
00068 #endif
00069 
00070 //Maximum time interval between Router Advertisements
00071 #ifndef NDP_MAX_RTR_ADVERT_INTERVAL
00072    #define NDP_MAX_RTR_ADVERT_INTERVAL 600000
00073 #elif (NDP_MAX_RTR_ADVERT_INTERVAL < 1000)
00074    #error NDP_MAX_RTR_ADVERT_INTERVAL parameter is not valid
00075 #endif
00076 
00077 //Maximum time interval between initial Router Advertisements
00078 #ifndef NDP_MAX_INITIAL_RTR_ADVERT_INTERVAL
00079    #define NDP_MAX_INITIAL_RTR_ADVERT_INTERVAL 16000
00080 #elif (NDP_MAX_INITIAL_RTR_ADVERT_INTERVAL < 1000)
00081    #error NDP_MAX_INITIAL_RTR_ADVERT_INTERVAL parameter is not valid
00082 #endif
00083 
00084 //Maximum number of initial Router Advertisements
00085 #ifndef NDP_MAX_INITIAL_RTR_ADVERTISEMENTS
00086    #define NDP_MAX_INITIAL_RTR_ADVERTISEMENTS 3
00087 #elif (NDP_MAX_INITIAL_RTR_ADVERTISEMENTS < 1)
00088    #error NDP_MAX_INITIAL_RTR_ADVERTISEMENTS parameter is not valid
00089 #endif
00090 
00091 //Maximum number of final Router Advertisements
00092 #ifndef NDP_MAX_FINAL_RTR_ADVERTISEMENTS
00093    #define NDP_MAX_FINAL_RTR_ADVERTISEMENTS 3
00094 #elif (NDP_MAX_FINAL_RTR_ADVERTISEMENTS < 1)
00095    #error NDP_MAX_FINAL_RTR_ADVERTISEMENTS parameter is not valid
00096 #endif
00097 
00098 //Minimum delay between Router Advertisements
00099 #ifndef NDP_MIN_DELAY_BETWEEN_RAS
00100    #define NDP_MIN_DELAY_BETWEEN_RAS 3000
00101 #elif (NDP_MIN_DELAY_BETWEEN_RAS < 1000)
00102    #error NDP_MIN_DELAY_BETWEEN_RAS parameter is not valid
00103 #endif
00104 
00105 //Maximum delay for Router Advertisements sent in response to a Router Solicitation
00106 #ifndef NDP_MAX_RA_DELAY_TIME
00107    #define NDP_MAX_RA_DELAY_TIME 500
00108 #elif (NDP_MAX_RA_DELAY_TIME < 100)
00109    #error NDP_MAX_RA_DELAY_TIME parameter is not valid
00110 #endif
00111 
00112 //Minimum delay before transmitting the first Router Solicitation message
00113 #ifndef NDP_MIN_RTR_SOLICITATION_DELAY
00114    #define NDP_MIN_RTR_SOLICITATION_DELAY 0
00115 #elif (NDP_MIN_RTR_SOLICITATION_DELAY < 0)
00116    #error NDP_MIN_RTR_SOLICITATION_DELAY parameter is not valid
00117 #endif
00118 
00119 //Maximum delay before transmitting the first Router Solicitation message
00120 #ifndef NDP_MAX_RTR_SOLICITATION_DELAY
00121    #define NDP_MAX_RTR_SOLICITATION_DELAY 1000
00122 #elif (NDP_MAX_RTR_SOLICITATION_DELAY < 0)
00123    #error NDP_MAX_RTR_SOLICITATION_DELAY parameter is not valid
00124 #endif
00125 
00126 //The time between retransmissions of Router Solicitation messages
00127 #ifndef NDP_RTR_SOLICITATION_INTERVAL
00128    #define NDP_RTR_SOLICITATION_INTERVAL 4000
00129 #elif (NDP_RTR_SOLICITATION_INTERVAL < 1000)
00130    #error NDP_RTR_SOLICITATION_INTERVAL parameter is not valid
00131 #endif
00132 
00133 //Number of retransmissions for Router Solicitation messages
00134 #ifndef NDP_MAX_RTR_SOLICITATIONS
00135    #define NDP_MAX_RTR_SOLICITATIONS 3
00136 #elif (NDP_MAX_RTR_SOLICITATIONS < 1)
00137    #error NDP_MAX_RTR_SOLICITATIONS parameter is not valid
00138 #endif
00139 
00140 //Number of retransmissions for multicast Neighbor Solicitation messages
00141 #ifndef NDP_MAX_MULTICAST_SOLICIT
00142    #define NDP_MAX_MULTICAST_SOLICIT 3
00143 #elif (NDP_MAX_MULTICAST_SOLICIT < 1)
00144    #error NDP_MAX_MULTICAST_SOLICIT parameter is not valid
00145 #endif
00146 
00147 //Number of retransmissions for unicast Neighbor Solicitation messages
00148 #ifndef NDP_MAX_UNICAST_SOLICIT
00149    #define NDP_MAX_UNICAST_SOLICIT 3
00150 #elif (NDP_MAX_UNICAST_SOLICIT < 1)
00151    #error NDP_MAX_UNICAST_SOLICIT parameter is not valid
00152 #endif
00153 
00154 //Maximum number of Neighbor Solicitation messages sent while performing DAD
00155 #ifndef NDP_DUP_ADDR_DETECT_TRANSMITS
00156    #define NDP_DUP_ADDR_DETECT_TRANSMITS 1
00157 #elif (NDP_DUP_ADDR_DETECT_TRANSMITS < 0)
00158    #error NDP_DUP_ADDR_DETECT_TRANSMITS parameter is not valid
00159 #endif
00160 
00161 //Delay before sending Neighbor Advertisements if the target address is an anycast address
00162 #ifndef NDP_MAX_ANYCAST_DELAY_TIME
00163    #define NDP_MAX_ANYCAST_DELAY_TIME 1000
00164 #elif (NDP_MAX_ANYCAST_DELAY_TIME < 100)
00165    #error NDP_MAX_ANYCAST_DELAY_TIME parameter is not valid
00166 #endif
00167 
00168 //Maximum number of unsolicited Neighbor Advertisements
00169 #ifndef NDP_MAX_NEIGHBOR_ADVERTISEMENT
00170    #define NDP_MAX_NEIGHBOR_ADVERTISEMENT 3
00171 #elif (NDP_MAX_NEIGHBOR_ADVERTISEMENT < 0)
00172    #error NDP_MAX_NEIGHBOR_ADVERTISEMENT parameter is not valid
00173 #endif
00174 
00175 //The time a neighbor is considered reachable after receiving a reachability confirmation
00176 #ifndef NDP_REACHABLE_TIME
00177    #define NDP_REACHABLE_TIME 30000
00178 #elif (NDP_REACHABLE_TIME < 1000)
00179    #error NDP_REACHABLE_TIME parameter is not valid
00180 #endif
00181 
00182 //The time between retransmissions of Neighbor Solicitation messages
00183 #ifndef NDP_RETRANS_TIMER
00184    #define NDP_RETRANS_TIMER 1000
00185 #elif (NDP_RETRANS_TIMER < 100)
00186    #error NDP_RETRANS_TIMER parameter is not valid
00187 #endif
00188 
00189 //Delay before sending the first probe
00190 #ifndef NDP_DELAY_FIRST_PROBE_TIME
00191    #define NDP_DELAY_FIRST_PROBE_TIME 5000
00192 #elif (NDP_DELAY_FIRST_PROBE_TIME < 1000)
00193    #error NDP_DELAY_FIRST_PROBE_TIME parameter is not valid
00194 #endif
00195 
00196 //Hop Limit used by NDP messages
00197 #define NDP_HOP_LIMIT 255
00198 
00199 //Infinite lifetime
00200 #define NDP_INFINITE_LIFETIME 0xFFFFFFFF
00201 
00202 
00203 /**
00204  * @brief Neighbor Discovery options
00205  **/
00206 
00207 typedef enum
00208 {
00209    NDP_OPT_SOURCE_LINK_LAYER_ADDR = 1,
00210    NDP_OPT_TARGET_LINK_LAYER_ADDR = 2,
00211    NDP_OPT_PREFIX_INFORMATION     = 3,
00212    NDP_OPT_REDIRECTED_HEADER      = 4,
00213    NDP_OPT_MTU                    = 5,
00214    NDP_OPT_ROUTE_INFORMATION      = 24,
00215    NDP_OPT_RECURSIVE_DNS_SERVER   = 25,
00216    NDP_OPT_DNS_SEARCH_LIST        = 31,
00217    NDP_OPT_6LOWPAN_CONTEXT        = 34,
00218    NDP_OPT_ANY                    = 255
00219 } NdpOptionType;
00220 
00221 
00222 /**
00223  * @brief Router selection preferences
00224  **/
00225 
00226 typedef enum
00227 {
00228    NDP_ROUTER_SEL_PREFERENCE_MEDIUM   = 0,
00229    NDP_ROUTER_SEL_PREFERENCE_HIGH     = 1,
00230    NDP_ROUTER_SEL_PREFERENCE_RESERVED = 2,
00231    NDP_ROUTER_SEL_PREFERENCE_LOW      = 3
00232 } NdpRouterSelPreference;
00233 
00234 
00235 /**
00236  * @brief Neighbor cache entry states
00237  **/
00238 
00239 typedef enum
00240 {
00241    NDP_STATE_NONE       = 0,
00242    NDP_STATE_INCOMPLETE = 1,
00243    NDP_STATE_REACHABLE  = 2,
00244    NDP_STATE_STALE      = 3,
00245    NDP_STATE_DELAY      = 4,
00246    NDP_STATE_PROBE      = 5,
00247    NDP_STATE_PERMANENT  = 6
00248 } NdpState;
00249 
00250 
00251 //CodeWarrior or Win32 compiler?
00252 #if defined(__CWCC__) || defined(_WIN32)
00253    #pragma pack(push, 1)
00254 #endif
00255 
00256 
00257 /**
00258  * @brief Router Solicitation message
00259  **/
00260 
00261 typedef __start_packed struct
00262 {
00263    uint8_t type;      //0
00264    uint8_t code;      //1
00265    uint16_t checksum; //2-3
00266    uint32_t reserved; //4-7
00267    uint8_t options[]; //8
00268 } __end_packed NdpRouterSolMessage;
00269 
00270 
00271 /**
00272  * @brief Router Advertisement message
00273  **/
00274 
00275 typedef __start_packed struct
00276 {
00277    uint8_t type;                  //0
00278    uint8_t code;                  //1
00279    uint16_t checksum;             //2-3
00280    uint8_t curHopLimit;           //4
00281 #ifdef _CPU_BIG_ENDIAN
00282    uint8_t m : 1;                 //5
00283    uint8_t o : 1;
00284    uint8_t h : 1;
00285    uint8_t prf : 2;
00286    uint8_t p : 1;
00287    uint8_t reserved : 2;
00288 #else
00289    uint8_t reserved : 2;          //5
00290    uint8_t p : 1;
00291    uint8_t prf : 2;
00292    uint8_t h : 1;
00293    uint8_t o : 1;
00294    uint8_t m : 1;
00295 #endif
00296    uint16_t routerLifetime;       //6-7
00297    uint32_t reachableTime;        //8-11
00298    uint32_t retransTimer;         //12-15
00299    uint8_t options[];             //16
00300 } __end_packed NdpRouterAdvMessage;
00301 
00302 
00303 /**
00304  * @brief Neighbor Solicitation message
00305  **/
00306 
00307 typedef __start_packed struct
00308 {
00309    uint8_t type;        //0
00310    uint8_t code;        //1
00311    uint16_t checksum;   //2-3
00312    uint32_t reserved;   //4-7
00313    Ipv6Addr targetAddr; //8-23
00314    uint8_t options[];   //24
00315 } __end_packed NdpNeighborSolMessage;
00316 
00317 
00318 /**
00319  * @brief Neighbor Advertisement message
00320  **/
00321 
00322 typedef __start_packed struct
00323 {
00324    uint8_t type;            //0
00325    uint8_t code;            //1
00326    uint16_t checksum;       //2-3
00327 #ifdef _CPU_BIG_ENDIAN
00328    uint32_t r : 1;          //4
00329    uint32_t s : 1;
00330    uint32_t o : 1;
00331    uint32_t reserved1 : 5;
00332    uint32_t reserved2 : 24; //5-7
00333 #else
00334    uint32_t reserved1 : 5;  //4
00335    uint32_t o : 1;
00336    uint32_t s : 1;
00337    uint32_t r : 1;
00338    uint32_t reserved2 : 24; //5-7
00339 #endif
00340    Ipv6Addr targetAddr;     //8-23
00341    uint8_t options[];       //24
00342 } __end_packed NdpNeighborAdvMessage;
00343 
00344 
00345 /**
00346  * @brief Redirect message
00347  **/
00348 
00349 typedef __start_packed struct
00350 {
00351    uint8_t type;        //0
00352    uint8_t code;        //1
00353    uint16_t checksum;   //2-3
00354    uint32_t reserved;   //4-7
00355    Ipv6Addr targetAddr; //8-23
00356    Ipv6Addr destAddr;   //24-39
00357    uint8_t options[];   //40
00358 } __end_packed NdpRedirectMessage;
00359 
00360 
00361 /**
00362  * @brief Neighbor Discovery option general format
00363  **/
00364 
00365 typedef __start_packed struct
00366 {
00367    uint8_t type;    //0
00368    uint8_t length;  //1
00369    uint8_t value[]; //2
00370 } __end_packed NdpOption;
00371 
00372 
00373 /**
00374  * @brief Source/Target Link-Layer Address option
00375  **/
00376 
00377 typedef __start_packed struct
00378 {
00379    uint8_t type;          //0
00380    uint8_t length;        //1
00381    MacAddr linkLayerAddr; //2-7
00382 } __end_packed NdpLinkLayerAddrOption;
00383 
00384 
00385 /**
00386  * @brief Prefix Information option (PIO)
00387  **/
00388 
00389 typedef __start_packed struct
00390 {
00391    uint8_t type;               //0
00392    uint8_t length;             //1
00393    uint8_t prefixLength;       //2
00394 #ifdef _CPU_BIG_ENDIAN
00395    uint8_t l : 1;              //3
00396    uint8_t a : 1;
00397    uint8_t reserved1 : 6;
00398 #else
00399    uint8_t reserved1 : 6;      //3
00400    uint8_t a : 1;
00401    uint8_t l : 1;
00402 #endif
00403    uint32_t validLifetime;     //4-7
00404    uint32_t preferredLifetime; //8-11
00405    uint32_t reserved2;         //12-15
00406    Ipv6Addr prefix;            //16-31
00407 } __end_packed NdpPrefixInfoOption;
00408 
00409 
00410 /**
00411  * @brief Redirected Header option (RHO)
00412  **/
00413 
00414 typedef __start_packed struct
00415 {
00416    uint8_t type;       //0
00417    uint8_t length;     //1
00418    uint16_t reserved1; //2-3
00419    uint32_t reserved2; //4-7
00420    uint8_t ipPacket[]; //8
00421 } __end_packed NdpRedirectedHeaderOption;
00422 
00423 
00424 /**
00425  * @brief MTU option
00426  **/
00427 
00428 typedef __start_packed struct
00429 {
00430    uint8_t type;      //0
00431    uint8_t length;    //1
00432    uint16_t reserved; //2-3
00433    uint32_t mtu;      //4-7
00434 } __end_packed NdpMtuOption;
00435 
00436 
00437 /**
00438  * @brief Route Information option (RIO)
00439  **/
00440 
00441 typedef __start_packed struct
00442 {
00443    uint8_t type;           //0
00444    uint8_t length;         //1
00445    uint8_t prefixLength;   //2
00446 #ifdef _CPU_BIG_ENDIAN
00447    uint8_t reserved1 : 3;  //3
00448    uint8_t prf : 2;
00449    uint8_t reserved2 : 3;
00450 #else
00451    uint8_t reserved2 : 3;  //3
00452    uint8_t prf : 2;
00453    uint8_t reserved1 : 3;
00454 #endif
00455    uint32_t routeLifetime; //4-7
00456    Ipv6Addr prefix;        //8
00457 } __end_packed NdpRouteInfoOption;
00458 
00459 
00460 /**
00461  * @brief Recursive DNS Server option (RDNSS)
00462  **/
00463 
00464 typedef __start_packed struct
00465 {
00466    uint8_t type;       //0
00467    uint8_t length;     //1
00468    uint16_t reserved;  //2-3
00469    uint32_t lifetime;  //4-7
00470    Ipv6Addr address[]; //8
00471 } __end_packed NdpRdnssOption;
00472 
00473 
00474 /**
00475  * @brief DNS Search List option (DNSSL)
00476  **/
00477 
00478 typedef __start_packed struct
00479 {
00480    uint8_t type;          //0
00481    uint8_t length;        //1
00482    uint16_t reserved;     //2-3
00483    uint32_t lifetime;     //4-7
00484    uint8_t domainNames[]; //8
00485 } __end_packed NdpDnsslOption;
00486 
00487 
00488 /**
00489  * @brief 6LoWPAN Context option (6CO)
00490  **/
00491 
00492 typedef __start_packed struct
00493 {
00494    uint8_t type;           //0
00495    uint8_t length;         //1
00496    uint8_t contextLength;  //2
00497 #ifdef _CPU_BIG_ENDIAN
00498    uint8_t reserved1 : 3;  //3
00499    uint8_t c : 1;
00500    uint8_t cid : 4;
00501 #else
00502    uint8_t cid : 4;        //3
00503    uint8_t c : 1;
00504    uint8_t reserved1 : 3;
00505 #endif
00506    uint16_t reserved2;     //4-5
00507    uint16_t validLifetime; //6-7
00508    Ipv6Addr contextPrefix; //8
00509 } __end_packed NdpContextOption;
00510 
00511 
00512 //CodeWarrior or Win32 compiler?
00513 #if defined(__CWCC__) || defined(_WIN32)
00514    #pragma pack(pop)
00515 #endif
00516 
00517 
00518 /**
00519  * @brief NDP queue item
00520  **/
00521 
00522 typedef struct
00523 {
00524    NetInterface *srcInterface; //<Interface from which the packet has been received
00525    NetBuffer *buffer;          ///<Packet waiting for address resolution
00526    size_t offset;              ///<Offset to the first byte of the packet
00527 } NdpQueueItem;
00528 
00529 
00530 /**
00531  * @brief Neighbor cache entry
00532  **/
00533 
00534 typedef struct
00535 {
00536    NdpState state;                              ///<Reachability state
00537    Ipv6Addr ipAddr;                             ///<Unicast IPv6 address
00538    MacAddr macAddr;                             ///<Link layer address associated with the IPv6 address
00539    bool_t isRouter;                             ///<A flag indicating whether the neighbor is a router or a host
00540    systime_t timestamp;                         ///<Timestamp to manage entry lifetime
00541    systime_t timeout;                           ///<Timeout value
00542    uint_t retransmitCount;                      ///<Retransmission counter
00543    NdpQueueItem queue[NDP_MAX_PENDING_PACKETS]; ///<Packets waiting for address resolution to complete
00544    uint_t queueSize;                            ///<Number of queued packets
00545 } NdpNeighborCacheEntry;
00546 
00547 
00548 /**
00549  * @brief Destination cache entry
00550  **/
00551 
00552 typedef struct
00553 {
00554    Ipv6Addr destAddr;   ///<Destination IPv6 address
00555    Ipv6Addr nextHop;    ///<IPv6 address of the next-hop neighbor
00556    size_t pathMtu;      ///<Path MTU
00557    systime_t timestamp; ///<Timestamp to manage entry lifetime
00558 } NdpDestCacheEntry;
00559 
00560 
00561 /**
00562  * @brief NDP context
00563  **/
00564 
00565 typedef struct
00566 {
00567    uint32_t reachableTime;                                       ///<The time a node assumes a neighbor is reachable
00568    uint32_t retransTimer;                                        ///<The time between retransmissions of NS messages
00569    uint_t dupAddrDetectTransmits;                                ///<Maximum number of NS messages sent while performing DAD
00570    systime_t minRtrSolicitationDelay;                            ///<Minimum delay before transmitting the first RS message
00571    systime_t maxRtrSolicitationDelay;                            ///<Maximum delay before transmitting the first RS message
00572    systime_t rtrSolicitationInterval;                            ///<Time interval between retransmissions of RS messages
00573    uint_t maxRtrSolicitations;                                   ///<Number of retransmissions for RS messages
00574    uint_t rtrSolicitationCount;                                  ///<Retransmission counter for RS messages
00575    bool_t rtrAdvReceived;                                        ///<Valid RA message received
00576    systime_t timestamp;                                          ///<Timestamp to manage retransmissions
00577    systime_t timeout;                                            ///<Timeout value
00578    NdpNeighborCacheEntry neighborCache[NDP_NEIGHBOR_CACHE_SIZE]; ///<Neighbor cache
00579    NdpDestCacheEntry destCache[NDP_DEST_CACHE_SIZE];             ///<Destination cache
00580 } NdpContext;
00581 
00582 
00583 //Tick counter to handle periodic operations
00584 extern systime_t ndpTickCounter;
00585 
00586 //NDP related functions
00587 error_t ndpInit(NetInterface *interface);
00588 
00589 error_t ndpResolve(NetInterface *interface, const Ipv6Addr *ipAddr, MacAddr *macAddr);
00590 
00591 error_t ndpEnqueuePacket(NetInterface *srcInterface, NetInterface *destInterface,
00592    const Ipv6Addr *ipAddr, NetBuffer *buffer, size_t offset);
00593 
00594 void ndpTick(NetInterface *interface);
00595 void ndpLinkChangeEvent(NetInterface *interface);
00596 
00597 void ndpProcessRouterAdv(NetInterface *interface, Ipv6PseudoHeader *pseudoHeader,
00598    const NetBuffer *buffer, size_t offset, uint8_t hopLimit);
00599 
00600 void ndpProcessNeighborSol(NetInterface *interface, Ipv6PseudoHeader *pseudoHeader,
00601    const NetBuffer *buffer, size_t offset, uint8_t hopLimit);
00602 
00603 void ndpProcessNeighborAdv(NetInterface *interface, Ipv6PseudoHeader *pseudoHeader,
00604    const NetBuffer *buffer, size_t offset, uint8_t hopLimit);
00605 
00606 void ndpProcessRedirect(NetInterface *interface, Ipv6PseudoHeader *pseudoHeader,
00607    const NetBuffer *buffer, size_t offset, uint8_t hopLimit);
00608 
00609 error_t ndpSendRouterSol(NetInterface *interface);
00610 
00611 error_t ndpSendNeighborSol(NetInterface *interface,
00612    const Ipv6Addr *targetIpAddr, bool_t multicast);
00613 
00614 error_t ndpSendNeighborAdv(NetInterface *interface,
00615    const Ipv6Addr *targetIpAddr, const Ipv6Addr *destIpAddr);
00616 
00617 error_t ndpSendRedirect(NetInterface *interface, const Ipv6Addr *targetAddr,
00618    const NetBuffer *ipPacket, size_t ipPacketOffset);
00619 
00620 void ndpDumpRouterSolMessage(const NdpRouterSolMessage *message);
00621 void ndpDumpRouterAdvMessage(const NdpRouterAdvMessage *message);
00622 void ndpDumpNeighborSolMessage(const NdpNeighborSolMessage *message);
00623 void ndpDumpNeighborAdvMessage(const NdpNeighborAdvMessage *message);
00624 void ndpDumpRedirectMessage(const NdpRedirectMessage *message);
00625 
00626 #endif
00627