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

Subversion Repositories or1k

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1254 phoenix
//==========================================================================
2
//
3
//      include/netinet/igmp.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: igmp.h,v 1.3 1999/08/08 00:43:00 niklas Exp $ */
34
/*      $NetBSD: igmp.h,v 1.6 1995/05/31 06:08:21 mycroft Exp $ */
35
 
36
/*
37
 * Copyright (c) 1988 Stephen Deering.
38
 * Copyright (c) 1992, 1993
39
 *      The Regents of the University of California.  All rights reserved.
40
 *
41
 * This code is derived from software contributed to Berkeley by
42
 * Stephen Deering of Stanford University.
43
 *
44
 * Redistribution and use in source and binary forms, with or without
45
 * modification, are permitted provided that the following conditions
46
 * are met:
47
 * 1. Redistributions of source code must retain the above copyright
48
 *    notice, this list of conditions and the following disclaimer.
49
 * 2. Redistributions in binary form must reproduce the above copyright
50
 *    notice, this list of conditions and the following disclaimer in the
51
 *    documentation and/or other materials provided with the distribution.
52
 * 3. All advertising materials mentioning features or use of this software
53
 *    must display the following acknowledgement:
54
 *      This product includes software developed by the University of
55
 *      California, Berkeley and its contributors.
56
 * 4. Neither the name of the University nor the names of its contributors
57
 *    may be used to endorse or promote products derived from this software
58
 *    without specific prior written permission.
59
 *
60
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
61
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
62
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
63
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
64
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
65
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
66
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
67
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
68
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
69
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
70
 * SUCH DAMAGE.
71
 *
72
 *      @(#)igmp.h      8.1 (Berkeley) 6/10/93
73
 */
74
 
75
#ifndef _NETINET_IGMP_H_
76
#define _NETINET_IGMP_H_
77
 
78
/*
79
 * Internet Group Management Protocol (IGMP) definitions.
80
 *
81
 * MULTICAST 1.3
82
 */
83
 
84
/*
85
 * IGMP packet format.
86
 */
87
struct igmp {
88
        u_int8_t        igmp_type;      /* version & type of IGMP message  */
89
        u_int8_t        igmp_code;      /* code for routing sub-messages   */
90
        u_int16_t       igmp_cksum;     /* IP-style checksum               */
91
        struct in_addr  igmp_group;     /* group address being reported    */
92
};                                      /*  (zero for queries)             */
93
 
94
#define IGMP_MINLEN                  8
95
 
96
#define IGMP_HOST_MEMBERSHIP_QUERY      0x11  /* membership query      */
97
#define IGMP_v1_HOST_MEMBERSHIP_REPORT  0x12  /* v1 membership report  */
98
#define IGMP_DVMRP                      0x13  /* DVMRP routing message */
99
#define IGMP_PIM                        0x14  /* PIM routing message   */
100
#define IGMP_v2_HOST_MEMBERSHIP_REPORT  0x16  /* v2 membership report  */
101
#define IGMP_HOST_LEAVE_MESSAGE         0x17  /* leave-group message   */
102
#define IGMP_MTRACE_REPLY               0x1e  /* traceroute reply      */
103
#define IGMP_MTRACE_QUERY               0x1f  /* traceroute query      */
104
 
105
#define IGMP_MAX_HOST_REPORT_DELAY      10    /* max delay for response to */
106
                                              /*  query (in seconds)       */
107
 
108
#define IGMP_TIMER_SCALE                10    /* denominator for igmp_timer */
109
 
110
/*
111
 * States for the IGMP v2 state table.
112
 */
113
#define IGMP_DELAYING_MEMBER    1
114
#define IGMP_IDLE_MEMBER        2
115
#define IGMP_LAZY_MEMBER        3
116
#define IGMP_SLEEPING_MEMBER    4
117
#define IGMP_AWAKENING_MEMBER   5
118
 
119
/*
120
 * States for IGMP router version cache.
121
 */
122
#define IGMP_v1_ROUTER          1
123
#define IGMP_v2_ROUTER          2
124
 
125
/*
126
 * Revert to v2 if we haven't heard from the router in this amount of time.
127
 */
128
#define IGMP_AGE_THRESHOLD      540
129
 
130
#ifdef _KERNEL
131
void    rti_delete __P((struct ifnet *));
132
#endif
133
 
134
#endif // _NETINET_IGMP_H_

powered by: WebSVN 2.1.0

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