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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [net/] [snmp/] [lib/] [current/] [include/] [system.h] - Blame information for rev 844

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

Line No. Rev Author Line
1 786 skrzyp
//==========================================================================
2
//
3
//      ./lib/current/include/system.h
4
//
5
//
6
//==========================================================================
7
// ####ECOSGPLCOPYRIGHTBEGIN####                                            
8
// -------------------------------------------                              
9
// This file is part of eCos, the Embedded Configurable Operating System.   
10
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
11
//
12
// eCos is free software; you can redistribute it and/or modify it under    
13
// the terms of the GNU General Public License as published by the Free     
14
// Software Foundation; either version 2 or (at your option) any later      
15
// version.                                                                 
16
//
17
// eCos is distributed in the hope that it will be useful, but WITHOUT      
18
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or    
19
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License    
20
// for more details.                                                        
21
//
22
// You should have received a copy of the GNU General Public License        
23
// along with eCos; if not, write to the Free Software Foundation, Inc.,    
24
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.            
25
//
26
// As a special exception, if other files instantiate templates or use      
27
// macros or inline functions from this file, or you compile this file      
28
// and link it with other works to produce a work based on this file,       
29
// this file does not by itself cause the resulting work to be covered by   
30
// the GNU General Public License. However the source code for this file    
31
// must still be made available in accordance with section (3) of the GNU   
32
// General Public License v2.                                               
33
//
34
// This exception does not invalidate any other reasons why a work based    
35
// on this file might be covered by the GNU General Public License.         
36
// -------------------------------------------                              
37
// ####ECOSGPLCOPYRIGHTEND####                                              
38
//####UCDSNMPCOPYRIGHTBEGIN####
39
//
40
// -------------------------------------------
41
//
42
// Portions of this software may have been derived from the UCD-SNMP
43
// project,  <http://ucd-snmp.ucdavis.edu/>  from the University of
44
// California at Davis, which was originally based on the Carnegie Mellon
45
// University SNMP implementation.  Portions of this software are therefore
46
// covered by the appropriate copyright disclaimers included herein.
47
//
48
// The release used was version 4.1.2 of May 2000.  "ucd-snmp-4.1.2"
49
// -------------------------------------------
50
//
51
//####UCDSNMPCOPYRIGHTEND####
52
//==========================================================================
53
//#####DESCRIPTIONBEGIN####
54
//
55
// Author(s):    hmt
56
// Contributors: hmt
57
// Date:         2000-05-30
58
// Purpose:      Port of UCD-SNMP distribution to eCos.
59
// Description:  
60
//              
61
//
62
//####DESCRIPTIONEND####
63
//
64
//==========================================================================
65
/********************************************************************
66
       Copyright 1989, 1991, 1992 by Carnegie Mellon University
67
 
68
                          Derivative Work -
69
Copyright 1996, 1998, 1999, 2000 The Regents of the University of California
70
 
71
                         All Rights Reserved
72
 
73
Permission to use, copy, modify and distribute this software and its
74
documentation for any purpose and without fee is hereby granted,
75
provided that the above copyright notice appears in all copies and
76
that both that copyright notice and this permission notice appear in
77
supporting documentation, and that the name of CMU and The Regents of
78
the University of California not be used in advertising or publicity
79
pertaining to distribution of the software without specific written
80
permission.
81
 
82
CMU AND THE REGENTS OF THE UNIVERSITY OF CALIFORNIA DISCLAIM ALL
83
WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
84
WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL CMU OR
85
THE REGENTS OF THE UNIVERSITY OF CALIFORNIA BE LIABLE FOR ANY SPECIAL,
86
INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
87
FROM THE LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
88
CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
89
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
90
*********************************************************************/
91
#ifndef SNMP_SYSTEM_H
92
#define SNMP_SYSTEM_H
93
 
94
#ifdef __cplusplus
95
extern "C" {
96
#endif
97
 
98
/***********************************************************
99
        Copyright 1993 by Carnegie Mellon University
100
 
101
                      All Rights Reserved
102
 
103
Permission to use, copy, modify, and distribute this software and its
104
documentation for any purpose and without fee is hereby granted,
105
provided that the above copyright notice appear in all copies and that
106
both that copyright notice and this permission notice appear in
107
supporting documentation, and that the name of CMU not be
108
used in advertising or publicity pertaining to distribution of the
109
software without specific, written prior permission.
110
 
111
CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
112
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
113
CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
114
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
115
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
116
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
117
SOFTWARE.
118
******************************************************************/
119
/*
120
 * Definitions for the system dependent library file
121
 */
122
#ifdef WIN32
123
#include <sys/timeb.h>
124
#include <time.h>
125
/* structure of a directory entry */
126
typedef struct direct
127
{
128
        long    d_ino;          /* inode number (not used by MS-DOS) */
129
        int     d_namlen;               /* Name length */
130
        char    d_name[257];/* file name */
131
} _DIRECT;
132
 
133
/* structure for dir operations */
134
typedef struct _dir_struc
135
{
136
        char    *start;                 /* Starting position */
137
        char    *curr;                  /* Current position */
138
        long    size;                   /* Size of string table */
139
        long    nfiles;                 /* number if filenames in table */
140
        struct direct dirstr;   /* Directory structure to return */
141
} DIR;
142
 
143
DIR *opendir (const char *filename);
144
struct direct *readdir (DIR *dirp);
145
int closedir (DIR *dirp);
146
 
147
#ifndef HAVE_GETTIMEOFDAY
148
int gettimeofday (struct timeval *, struct timezone *tz);
149
#endif
150
#ifndef HAVE_STRCASECMP
151
int strcasecmp(const char *s1, const char *s2);
152
#endif
153
#ifndef HAVE_STRNCASECMP
154
int strncasecmp(const char *s1, const char *s2, size_t n);
155
#endif
156
 
157
char * winsock_startup (void);
158
void winsock_cleanup (void);
159
 
160
#define SOCK_STARTUP winsock_startup()
161
#define SOCK_CLEANUP winsock_cleanup()
162
#else
163
#define SOCK_STARTUP
164
#define SOCK_CLEANUP
165
#endif
166
 
167
in_addr_t get_myaddr (void);
168
long get_uptime (void);
169
 
170
#if HAVE_STDARG_H
171
void DEBUGP (const char *, ...);
172
#else
173
void DEBUGP (va_alist);
174
#endif
175
 
176
#ifdef  HAVE_CPP_UNDERBAR_FUNCTION_DEFINED
177
#define DEBUGPL(x)      \
178
            DEBUGP("%s():%s,%d: ",__FUNCTION__,__FILE__,__LINE__); DEBUGP x ;
179
#else
180
#define DEBUGPL(x)      \
181
            DEBUGP("():%s,%d: ",__FILE__,__LINE__); DEBUGP x ;
182
#endif
183
 
184
#ifndef HAVE_STRDUP
185
char *strdup (const char *);
186
#endif
187
#ifndef HAVE_SETENV
188
int setenv (const char *, const char *, int);
189
#endif
190
 
191
#ifdef __ECOS
192
#include <pkgconf/system.h>
193
#ifdef CYGPKG_NET_FREEBSD_STACK
194
#include <sys/param.h>
195
#undef printf
196
#endif //CYGPKG_NET_FREEBSD_STACK
197
#endif // __ECOS
198
 
199
#if TIME_WITH_SYS_TIME  
200
#       ifdef WIN32
201
#               include <sys/timeb.h>
202
#       else
203
#               include <sys/time.h>
204
#       endif
205
#       include <time.h>
206
#else
207
#       if HAVE_SYS_TIME_H
208
#               include <sys/time.h>
209
#       else
210
#               include <time.h>
211
#       endif
212
#endif
213
 
214
int calculate_time_diff(struct timeval *, struct timeval *);
215
 
216
#ifndef HAVE_STRCASESTR
217
char *strcasestr(const char *, const char *);
218
#endif
219
 
220
int mkdirhier(const char *pathname, mode_t mode, int skiplast);
221
 
222
#ifdef __cplusplus
223
}
224
#endif
225
 
226
#ifndef HAVE_GETTIMEOFDAY
227
int gettimeofday (struct timeval *, struct timezone *tz);
228
#endif
229
#ifndef HAVE_STRCASECMP
230
int strcasecmp(const char *s1, const char *s2);
231
#endif
232
#ifndef HAVE_STRNCASECMP
233
int strncasecmp(const char *s1, const char *s2, size_t n);
234
#endif
235
 
236
#endif /* SNMP_SYSTEM_H */

powered by: WebSVN 2.1.0

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