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

Subversion Repositories or1k

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1254 phoenix
//==========================================================================
2
//
3
//      include/netinet/ip_ip4.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: ip_ip4.h,v 1.16 1999/12/09 09:02:59 angelos Exp $     */
34
 
35
/*
36
 * The authors of this code are John Ioannidis (ji@tla.org),
37
 * Angelos D. Keromytis (kermit@csd.uch.gr) and
38
 * Niels Provos (provos@physnet.uni-hamburg.de).
39
 *
40
 * This code was written by John Ioannidis for BSD/OS in Athens, Greece,
41
 * in November 1995.
42
 *
43
 * Ported to OpenBSD and NetBSD, with additional transforms, in December 1996,
44
 * by Angelos D. Keromytis.
45
 *
46
 * Additional transforms and features in 1997 and 1998 by Angelos D. Keromytis
47
 * and Niels Provos.
48
 *
49
 * Additional features in 1999 by Angelos D. Keromytis.
50
 *
51
 * Copyright (C) 1995, 1996, 1997, 1998, 1999 by John Ioannidis,
52
 * Angelos D. Keromytis and Niels Provos.
53
 *
54
 * Permission to use, copy, and modify this software without fee
55
 * is hereby granted, provided that this entire notice is included in
56
 * all copies of any software which is or includes a copy or
57
 * modification of this software.
58
 * You may use this code under the GNU public license if you so wish. Please
59
 * contribute changes back to the authors under this freer than GPL license
60
 * so that we may further the use of strong encryption without limitations to
61
 * all.
62
 *
63
 * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR
64
 * IMPLIED WARRANTY. IN PARTICULAR, NONE OF THE AUTHORS MAKES ANY
65
 * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE
66
 * MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR
67
 * PURPOSE.
68
 */
69
 
70
#ifndef _NETINET_IP_IP4_H_
71
#define _NETINET_IP_IP4_H_
72
 
73
/*
74
 * IP-inside-IP processing.
75
 * Not quite all the functionality of RFC-1853, but the main idea is there.
76
 */
77
 
78
struct ip4stat
79
{
80
    u_int32_t   ip4s_ipackets;          /* total input packets */
81
    u_int32_t   ip4s_opackets;          /* total output packets */
82
    u_int32_t   ip4s_hdrops;            /* packet shorter than header shows */
83
    u_int32_t   ip4s_qfull;
84
    u_int64_t   ip4s_ibytes;
85
    u_int64_t   ip4s_obytes;
86
    u_int32_t   ip4s_pdrops;            /* packet dropped due to policy */
87
    u_int32_t   ip4s_spoof;             /* IP spoofing attempts */
88
    u_int32_t   ip4s_family;            /* Protocol family mismatch */
89
    u_int32_t   ip4s_unspec;            /* Missing tunnel endpoint address */
90
};
91
 
92
#define IP4_DEFAULT_TTL    0
93
#define IP4_SAME_TTL      -1
94
 
95
/*
96
 * Names for IP4 sysctl objects
97
 */
98
#define IP4CTL_ALLOW    1               /* accept incoming IP4 packets */
99
#define IP4CTL_MAXID    2
100
 
101
#define IP4CTL_NAMES { \
102
        { 0, 0 }, \
103
        { "allow", CTLTYPE_INT }, \
104
}
105
 
106
#ifdef _KERNEL
107
int     ip4_sysctl __P((int *, u_int, void *, size_t *, void *, size_t));
108
 
109
extern int ip4_allow;
110
extern struct ip4stat ip4stat;
111
#endif
112
 
113
#endif // _NETINET_IP_IP4_H_

powered by: WebSVN 2.1.0

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