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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [ecos-2.0/] [packages/] [net/] [tcpip/] [v2_0/] [include/] [netinet6/] [in6_prefix.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1254 phoenix
//==========================================================================
2
//
3
//      include/netinet6_in6_prefix.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
/*      $OpenBSD: in6_prefix.h,v 1.1 1999/12/08 06:50:21 itojun Exp $   */
34
 
35
/*
36
 * Copyright (C) 1995, 1996, 1997, 1998 and 1999 WIDE Project.
37
 * All rights reserved.
38
 *
39
 * Redistribution and use in source and binary forms, with or without
40
 * modification, are permitted provided that the following conditions
41
 * are met:
42
 * 1. Redistributions of source code must retain the above copyright
43
 *    notice, this list of conditions and the following disclaimer.
44
 * 2. Redistributions in binary form must reproduce the above copyright
45
 *    notice, this list of conditions and the following disclaimer in the
46
 *    documentation and/or other materials provided with the distribution.
47
 * 3. Neither the name of the project nor the names of its contributors
48
 *    may be used to endorse or promote products derived from this software
49
 *    without specific prior written permission.
50
 *
51
 * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
52
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
53
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
54
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
55
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
56
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
57
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
58
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
59
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
60
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
61
 * SUCH DAMAGE.
62
 */
63
 
64
#ifndef _NETINET6_IN6_PREFIX_H_
65
#define _NETINET6_IN6_PREFIX_H_
66
 
67
struct rr_prefix {
68
        struct ifprefix rp_ifpr;
69
        LIST_ENTRY(rr_prefix) rp_entry;
70
        LIST_HEAD(rp_addrhead, rp_addr) rp_addrhead;
71
        struct sockaddr_in6 rp_prefix;  /* prefix */
72
        u_int32_t rp_vltime;    /* advertised valid lifetime */
73
        u_int32_t rp_pltime;    /* advertised preferred lifetime */
74
        time_t rp_expire;       /* expiration time of the prefix */
75
        time_t rp_preferred;    /* preferred time of the prefix */
76
        struct in6_prflags rp_flags;
77
        u_char  rp_origin; /* from where this prefix info is obtained */
78
        struct  rp_stateflags {
79
                /* if some prefix should be added to this prefix */
80
                u_char addmark : 1;
81
                u_char delmark : 1; /* if this prefix will be deleted */
82
        } rp_stateflags;
83
};
84
 
85
#define rp_type         rp_ifpr.ifpr_type
86
#define rp_ifp          rp_ifpr.ifpr_ifp
87
#define rp_plen         rp_ifpr.ifpr_plen
88
 
89
#define rp_raf          rp_flags.prf_ra
90
#define rp_raf_onlink           rp_flags.prf_ra.onlink
91
#define rp_raf_auto             rp_flags.prf_ra.autonomous
92
 
93
#define rp_statef_addmark       rp_stateflags.addmark
94
#define rp_statef_delmark       rp_stateflags.delmark
95
 
96
#define rp_rrf          rp_flags.prf_rr
97
#define rp_rrf_decrvalid        rp_flags.prf_rr.decrvalid
98
#define rp_rrf_decrprefd        rp_flags.prf_rr.decrprefd
99
 
100
struct rp_addr {
101
        LIST_ENTRY(rp_addr)     ra_entry;
102
        struct in6_addr         ra_ifid;
103
        struct in6_ifaddr       *ra_addr;
104
        struct ra_flags {
105
                u_char anycast : 1;
106
        } ra_flags;
107
};
108
 
109
#define ifpr2rp(ifpr)   ((struct rr_prefix *)(ifpr))
110
#define rp2ifpr(rp)     ((struct ifprefix *)(rp))
111
 
112
#define RP_IN6(rp)      (&(rp)->rp_prefix.sin6_addr)
113
 
114
#define RR_INFINITE_LIFETIME            0xffffffff
115
 
116
 
117
LIST_HEAD(rr_prhead, rr_prefix);
118
 
119
extern struct rr_prhead rr_prefix;
120
 
121
void in6_rr_timer __P((void *));
122
int delete_each_prefix  __P((struct socket *so, struct rr_prefix *rpp,
123
                             u_char origin));
124
#endif // _NETINET6_IN6_PREFIX_H_

powered by: WebSVN 2.1.0

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