1 /******************************************************************************
2 * Copyright (c) 2013 IBM Corporation
4 * This program and the accompanying materials
5 * are made available under the terms of the BSD License
6 * which accompanies this distribution, and is available at
7 * http://www.opensource.org/licenses/bsd-license.php
10 * IBM Corporation - initial implementation
11 *****************************************************************************/
16 #include <netlib/ipv6.h>
21 #define NDP_DEBUG_PRINT(format, ...) do { printf(format, ## __VA_ARGS__); } while (0)
23 #define NDP_DEBUG_PRINT(format, ...)
26 #define ND_OPTION_SOURCE_LL_ADDR 1
27 #define ND_OPTION_TARGET_LL_ADDR 2
28 #define ND_OPTION_PREFIX_INFO 3
29 #define ND_OPTION_REDIRECT_HDR 4
30 #define ND_OPTION_MTU 5
32 /* Default Router List */
37 uint32_t reachable_time;
38 uint32_t retrans_timer;
50 struct neighbor *next;
51 uint8_t eth_frame[1500]; //FIXME
54 #define NB_INCOMPLETE 1
55 #define NB_REACHABLE 2
61 /******************** FUNCTIONS *********************************************/
63 int8_t neighbor_add (struct neighbor *);
64 void * neighbor_create (uint8_t *packet, struct packeth *headers);
65 struct neighbor * find_neighbor (ip6_addr_t *);
67 int8_t router_add(struct router*);
68 void * router_create(uint8_t *mac, ip6_addr_t *ip);
69 struct router * find_router(ip6_addr_t *);