3 * Copyright (C) 2008 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
4 * Copyright (C) 2009 Tomas 'ZeXx86' Jedrzejek (zexx86@zexos.org)
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #define NET_NDP_TYPE_RSOL 0x85
26 #define NET_NDP_TYPE_RADVERT 0x86
27 #define NET_NDP_TYPE_NBSOL 0x87
28 #define NET_NDP_TYPE_NBADVERT 0x88
30 typedef struct ndp_cache_context
{
31 struct ndp_cache_context
*next
, *prev
;
37 /* ICMP - NDP layer structure */
38 typedef struct proto_icmp_ndp2_t
{
41 unsigned short checksum
;
42 unsigned char hop_limit
;
44 unsigned short rlifetime
;
48 /* 1. ICMPv6 options */
51 unsigned char prefix_len
;
58 /* 2. ICMPv6 options */
59 unsigned char ll_type
;
60 unsigned char ll_length
;
64 typedef struct proto_ndp_sol_t
{
67 unsigned short checksum
;
72 unsigned char ll_type
;
73 unsigned char ll_length
;
77 typedef struct proto_ndp_adv_t
{
80 unsigned short checksum
;
85 unsigned char ll_type
;
86 unsigned char ll_length
;
90 extern unsigned ndp_cache_add (mac_addr_t mac
, net_ipv6 ip
);
91 extern unsigned ndp_cache_get (net_ipv6 ip
, mac_addr_t
*mac
);
92 extern unsigned init_proto_ndp ();