OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [packages/] [net/] [tcpip/] [v2_0/] [include/] [netinet6/] [nd6_protocol.h] - Blame information for rev 773

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 unneback
//==========================================================================
2
//
3
//      include/netinet6_nd6_protocol.h
4
//
5
//      
6
//
7
//==========================================================================
8
//####BSDCOPYRIGHTBEGIN####
9
//
10
// -------------------------------------------
11
//
12
// Portions of this software may have been derived from OpenBSD or other sources,
13
// and are covered by the appropriate copyright disclaimers included herein.
14
//
15
// -------------------------------------------
16
//
17
//####BSDCOPYRIGHTEND####
18
//==========================================================================
19
//#####DESCRIPTIONBEGIN####
20
//
21
// Author(s):    gthomas
22
// Contributors: gthomas
23
// Date:         2000-01-10
24
// Purpose:      
25
// Description:  
26
//              
27
//
28
//####DESCRIPTIONEND####
29
//
30
//==========================================================================
31
 
32
 
33
/*
34
%%% portions-copyright-nrl-97
35
Portions of this software are Copyright 1997-1998 by Randall Atkinson,
36
Ronald Lee, Daniel McDonald, Bao Phan, and Chris Winters. All Rights
37
Reserved. All rights under this copyright have been assigned to the US
38
Naval Research Laboratory (NRL). The NRL Copyright Notice and License
39
Agreement Version 1.1 (January 17, 1995) applies to these portions of the
40
software.
41
You should have received a copy of the license with this software. If you
42
didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>.
43
 
44
*/
45
 
46
#ifndef _NETINET6_ND6_PROTOCOL_H
47
#define _NETINET6_ND6_PROTOCOL_H 1
48
 
49
#include <netinet6/icmpv6.h>
50
 
51
#define ND6_ROUTER_SOLICITATION         133
52
#define ND6_ROUTER_ADVERTISEMENT        134
53
#define ND6_NEIGHBOR_SOLICITATION       135
54
#define ND6_NEIGHBOR_ADVERTISEMENT      136
55
#define ND6_REDIRECT                    137
56
 
57
enum nd6_option {
58
        ND6_OPT_SOURCE_LINKADDR=1,
59
        ND6_OPT_TARGET_LINKADDR=2,
60
        ND6_OPT_PREFIX_INFORMATION=3,
61
        ND6_OPT_REDIRECTED_HEADER=4,
62
        ND6_OPT_MTU=5,
63
        ND6_OPT_ENDOFLIST=256
64
};
65
 
66
struct nd_router_solicit {     /* router solicitation */
67
        struct icmpv6hdr rsol_hdr;
68
};
69
 
70
#define rsol_type               rsol_hdr.icmpv6_type
71
#define rsol_code               rsol_hdr.icmpv6_code
72
#define rsol_cksum              rsol_hdr.icmpv6_cksum
73
#define rsol_reserved           rsol_hdr.icmpv6_data32[0]
74
 
75
struct nd_router_advert {       /* router advertisement */
76
        struct icmpv6hdr radv_hdr;
77
        uint32_t   radv_reachable;   /* reachable time */
78
        uint32_t   radv_retransmit;  /* reachable retransmit time */
79
};
80
 
81
#define radv_type               radv_hdr.icmpv6_type
82
#define radv_code               radv_hdr.icmpv6_code
83
#define radv_cksum              radv_hdr.icmpv6_cksum
84
#define radv_maxhoplimit        radv_hdr.icmpv6_data8[0]
85
#define radv_m_o_res            radv_hdr.icmpv6_data8[1]
86
#define ND6_RADV_M_BIT          0x80
87
#define ND6_RADV_O_BIT          0x40
88
#define radv_router_lifetime    radv_hdr.icmpv6_data16[1]
89
 
90
struct nd6_nsolicitation {      /* neighbor solicitation */
91
        struct icmpv6hdr  nsol6_hdr;
92
        struct in6_addr   nsol6_target;
93
};
94
 
95
struct nd6_nadvertisement {     /* neighbor advertisement */
96
        struct icmpv6hdr  nadv6_hdr;
97
        struct in6_addr   nadv6_target;
98
};
99
 
100
#define nadv6_flags nadv6_hdr.icmpv6_data32[0]
101
#define ND6_NADVERFLAG_ISROUTER      0x80
102
#define ND6_NADVERFLAG_SOLICITED     0x40
103
#define ND6_NADVERFLAG_OVERRIDE      0x20
104
 
105
struct nd6_redirect {           /* redirect */
106
        struct icmpv6hdr  redirect_hdr;
107
        struct in6_addr   redirect_target;
108
        struct in6_addr   redirect_destination;
109
};
110
 
111
struct nd6_opt_prefix_info {    /* prefix information */
112
        uint8_t    opt_type;
113
        uint8_t    opt_length;
114
        uint8_t    opt_prefix_length;
115
        uint8_t    opt_l_a_res;
116
        uint32_t   opt_valid_life;
117
        uint32_t   opt_preferred_life;
118
        uint32_t   opt_reserved2;
119
        struct in6_addr  opt_prefix;
120
};
121
 
122
#define ND6_OPT_PI_L_BIT        0x80
123
#define ND6_OPT_PI_A_BIT        0x40
124
 
125
struct nd6_opt_mtu {            /* MTU option */
126
        uint8_t   opt_type;
127
        uint8_t   opt_length;
128
        uint16_t  opt_reserved;
129
        uint32_t  opt_mtu;
130
};
131
 
132
#endif /* _NETINET6_ND6_PROTOCOL_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.