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_var.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_var.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_var.h,v 1.3 1997/02/05 15:48:22 deraadt Exp $    */
34
/*      $NetBSD: igmp_var.h,v 1.9 1996/02/13 23:41:31 christos 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_var.h  8.1 (Berkeley) 7/19/93
73
 */
74
 
75
#ifndef _NETINET_IGMP_VAR_H_
76
#define _NETINET_IGMP_VAR_H_
77
 
78
/*
79
 * Internet Group Management Protocol (IGMP),
80
 * implementation-specific definitions.
81
 *
82
 * Written by Steve Deering, Stanford, May 1988.
83
 * Modified by Rosen Sharma, Stanford, Aug 1994.
84
 * Modified by Bill Fenner, Xerox PARC, Feb 1995.
85
 *
86
 * MULTICAST 1.3
87
 */
88
 
89
struct igmpstat {
90
        u_long  igps_rcv_total;         /* total IGMP messages received */
91
        u_long  igps_rcv_tooshort;      /* received with too few bytes */
92
        u_long  igps_rcv_badsum;        /* received with bad checksum */
93
        u_long  igps_rcv_queries;       /* received membership queries */
94
        u_long  igps_rcv_badqueries;    /* received invalid queries */
95
        u_long  igps_rcv_reports;       /* received membership reports */
96
        u_long  igps_rcv_badreports;    /* received invalid reports */
97
        u_long  igps_rcv_ourreports;    /* received reports for our groups */
98
        u_long  igps_snd_reports;       /* sent membership reports */
99
};
100
 
101
#ifdef _KERNEL
102
struct igmpstat igmpstat;
103
 
104
/*
105
 * Macro to compute a random timer value between 1 and (IGMP_MAX_REPORTING_
106
 * DELAY * countdown frequency).  We assume that the routine random()
107
 * is defined somewhere (and that it returns a positive number).
108
 */
109
#define IGMP_RANDOM_DELAY(X)    (arc4random() % (X) + 1)
110
 
111
void    igmp_init __P((void));
112
void    igmp_input __P((struct mbuf *, ...));
113
void    igmp_joingroup __P((struct in_multi *));
114
void    igmp_leavegroup __P((struct in_multi *));
115
void    igmp_fasttimo __P((void));
116
void    igmp_slowtimo __P((void));
117
#endif
118
 
119
#endif // _NETINET_IGMP_VAR_H_

powered by: WebSVN 2.1.0

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