original files of m241

This commit is contained in:
neelimap
2026-07-30 11:19:44 +05:30
parent 170c2b3f3a
commit afc7070c1f
12254 changed files with 7655111 additions and 0 deletions
@@ -0,0 +1,56 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/common/backstop/common.h,v 1.1.1.1 2001/11/05 17:47:18 tneale Exp $ */
/*
* Copyright (C) 1999-2005 Wind River Systems, Inc.
* All rights reserved. Provided under license only.
* Distribution or other use of this software is only
* permitted pursuant to the terms of a license agreement
* from Wind River Systems (and is otherwise prohibited).
* Refer to that license agreement for terms of use.
*/
/****************************************************************************
* Copyright 1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: common.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:18 tneale
* Tornado shuffle
*
* Revision 1.5 2001/01/19 22:21:24 paul
* Update copyright.
*
* Revision 1.4 2000/03/17 00:16:12 meister
* Update copyright message
*
* Revision 1.3 1998/02/25 04:43:22 sra
* Update copyrights.
*
* Revision 1.2 1998/02/05 22:01:27 josh
* moved top-level backstop include files into common/backstop
*
* Revision 1.1 1997/08/21 17:23:40 sra
* Begin moving configuration stuff that's common to all products to common.h
* Minor cleanups to common/lib/prng.c. Add pnrg seed function to snarkbsd.
*
*/
/*
* Backstop common.h.
*/
/* [clearcase]
modification history
-------------------
01a,20apr05,job update copyright notices
*/
#ifdef CONFIG_PREAMBLE
#else /* CONFIG_PREAMBLE */
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,68 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/common/backstop/oemtypes.h,v 1.1.1.1 2001/11/05 17:47:19 tneale Exp $ */
/*
* Copyright (C) 1999-2005 Wind River Systems, Inc.
* All rights reserved. Provided under license only.
* Distribution or other use of this software is only
* permitted pursuant to the terms of a license agreement
* from Wind River Systems (and is otherwise prohibited).
* Refer to that license agreement for terms of use.
*/
/****************************************************************************
* Copyright 1993-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* Backstop type definitions file. Just gets size_t from the standard place.
*/
/*
* $Log: oemtypes.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:19 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:21:24 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:16:12 meister
* Update copyright message
*
* Revision 1.2 1998/02/25 04:43:23 sra
* Update copyrights.
*
* Revision 1.1 1998/02/05 22:01:28 josh
* moved top-level backstop include files into common/backstop
*
* Revision 1.3 1997/03/20 06:58:18 sra
* DFARS-safe copyright text. Zap!
*
* Revision 1.2 1997/02/25 10:57:29 sra
* Update copyright notice, dust under the bed.
*
* Revision 1.1 1993/06/17 16:21:50 dab
* Initial revision
*
*/
/* [clearcase]
modification history
-------------------
01a,20apr05,job update copyright notices
*/
/*
* The now standard place to find size_t's definition.
*/
#include <stddef.h>
+302
View File
@@ -0,0 +1,302 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/common/bug.h,v 1.3 2003/01/16 18:20:10 josh Exp $ */
/*
* Copyright (C) 1999-2005 Wind River Systems, Inc.
* All rights reserved. Provided under license only.
* Distribution or other use of this software is only
* permitted pursuant to the terms of a license agreement
* from Wind River Systems (and is otherwise prohibited).
* Refer to that license agreement for terms of use.
*/
/****************************************************************************
* Copyright 1995-1997 Epilogue Technology Corporation.
* Copyright 1998-1999 Integrated Systems, Inc.
* All rights reserved.
*****************************************************************************/
/*
* $Log: bug.h,v $
* Revision 1.3 2003/01/16 18:20:10 josh
* directory structure shifting
*
* Revision 1.2 2001/11/07 00:07:08 meister
* Rework pathnames again
*
* Revision 1.1.1.1 2001/11/05 17:47:17 tneale
* Tornado shuffle
*
* Revision 1.7 2001/01/19 22:21:26 paul
* Update copyright.
*
* Revision 1.6 2000/03/17 00:16:33 meister
* Update copyright message
*
* Revision 1.5 2000/03/09 17:15:38 tneale
* Added #idef C++ to declare extern C if needed
*
* Revision 1.4 1999/03/08 22:12:52 paul
* added BUG_TRACE
*
* Revision 1.3 1998/02/25 04:43:23 sra
* Update copyrights.
*
* Revision 1.2 1998/02/05 22:34:41 josh
* have to make sure bug.h includes common/h/bugdef.h
*
* Revision 1.1 1998/02/05 22:19:27 josh
* moving commonly used include files into common/h from top-level directory
*
* Revision 3.11 1997/05/30 16:58:59 lowell
* spelling nit that's been bothering me for months
*
* Revision 3.10 1997/03/20 06:58:17 sra
* DFARS-safe copyright text. Zap!
*
* Revision 3.9 1997/03/19 04:11:35 sra
* BUG() now common to all products, so move the associated .h files.
*
* Revision 3.8 1996/03/22 10:04:12 sra
* Update copyrights prior to Attache 3.2 release.
*
* Revision 3.7 1996/03/14 20:16:39 sra
* Get rid of default definition of BUG_OUT, I had it right the first
* time....
*
* Revision 3.6 1996/03/11 20:07:33 sra
* Add default definition of BUG_OUT to avoid preprocessor problems.
*
* Revision 3.5 1995/11/24 23:21:04 sra
* Add BUG_OUT token to BUG() macros.
*
* Revision 3.4 1995/06/28 19:43:16 sra
* Add cookie argument to BUG() macro.
*
* Revision 3.3 1995/06/27 06:20:23 sra
* Add some debugging code to catch botched packet buffer allocs/frees.
*
* Revision 3.2 1995/06/26 21:50:52 sra
* Soup up a few of the macros. Change the include-protection macro name
* to ATTACHE_BUG_H (this file never had anything to do with a certain
* DOS network software package, but my fingers slipped and the old macro
* name might have confused people...).
*
* Revision 3.1 1995/06/26 05:12:25 sra
* Invert test in BUG_ASSERT().
*
* Revision 3.0 1995/05/10 22:36:18 sra
* Release 3.0.
*
* Revision 2.2 1995/04/26 01:05:13 sra
* Move bug definitions themselves to separate file bugdef.h.
*
* Revision 2.1 1995/04/10 23:40:30 sra
* Initial revision.
*
*/
/* [clearcase]
modification history
-------------------
01a,20apr05,job update copyright notices
*/
#ifndef EPILOGUE_BUG_H
#define EPILOGUE_BUG_H
#ifdef __cplusplus
extern"C" {
#endif
/*
* This file defines the framework of the BUG() macro mechanism.
*
* This is intended to be an extremely general way of handling code
* tracing, exception processing, and debugging code, with support
* both for arbitrary documentation strings and for making the entire
* business go away if you want to save space in production code. The
* format is a little strange, mostly because of the relative
* weaknesses of C (in particular, of its macro processor).
*
* There are some sample BUG() macro definitions at the end of this file.
*
* The general form of an invocation of the BUG() macro is
*
* BUG( <bug-code>, <fatal-flag>, <cookie>, ( BUG_OUT, <printf-stuff> ));
*
* <bug-code> (enum bug_codes) indicates the bug that occurred
*
* <fatal-flag> (enum bug_actions) indicates "fatal" errors
*
* <cookie> (void *) is for bug-specific useful data, if any
*
* <printf-stuff> is a parenthesised list of arguments suitable
* for passing to a printf()-like function if you want a debugging log.
*
* In general, bug codes should be unique. The only case where it makes
* sense to use the same bug code in multiple places is if both the failure
* and any recovery action are identical among the multiple invocations.
* The bug codes themselves are defined in a separate file, bugdef.h.
*
* "fatal" errors means errors serious enough that Attache's attempts
* to clean up after the problem may not be sufficent. Attache will
* always -try- to continue operation, but you may want to consider
* just restarting your system if a "fatal" error occurs.
*
* The <cookie> is to allow particular BUG() invocations to pass
* useful information up to your bug handler code. Most BUG()
* invocations will probably just pass a zero (null pointer).
* NB: We make no promises whatsoever about consistancy of data passed
* in this pointer between releases unless explictly documented in our
* manuals. So, in most cases, you should just ignore this field.
*
* <printf-stuff> has to be handled by in-line code if it's handled at all,
* due to limitations of the C macro preprocessor. It should probably
* be ignored in a production system, it's just there to ease debugging.
*
* BUG_OUT is sort of a macro-level cookie; all invocations of BUG()
* include this token, you can define it as a macro or an automatic
* variable or whatever's convenient. If you're just trying to get
* basic output to work in a normal C environment, defining BUG_OUT
* as a macro that expands to "stderr" might be a good choice.
*/
/*
* <fatal-flag> values.
*/
enum bug_actions {
BUG_FATAL, /* serious bug, consider rebooting now */
BUG_CONTINUABLE, /* normal operation can continue, we think */
BUG_TRACE /* not a bug, execution trace information */
};
/*
* <bug-code> values. Check these with a switch() or if() statement,
* don't depend on specific numeric values.
*/
enum bug_codes {
#define BUGDEF(x) x ,
#include <wrn/wm/common/bugdef.h>
#undef BUGDEF
BUG_MAX /* Number of bugs currently defined */
};
/*
* I haven't figured out yet whether BUG() should be under a makmak
* installation option or not. This will do the right thing for now.
*/
#ifndef INSTALL_BUG
#ifdef BUG
#define INSTALL_BUG 1
#else
#define INSTALL_BUG 0
#endif
#endif
/*
* Variant on BUG() which includes a test condition.
*/
#ifndef BUG_IF
#if INSTALL_BUG
#define BUG_IF(v,w,x,y,z) \
do { if (v) BUG(w,x,y,z); } while (0)
#else
#define BUG_IF(v,w,x,y,z)
#endif
#endif
/*
* Variant on standard C "assert()" mechanism.
*/
#ifndef BUG_ASSERT
#if INSTALL_BUG
#define BUG_ASSERT(x) \
BUG_IF((!(x)), BUG_ASSERTION_FAILED, BUG_FATAL, 0,\
(BUG_OUT, "Assertion \"%s\" failed, file %s line %d",\
#x, __FILE__, __LINE__))
#else
#define BUG_ASSERT(x)
#endif
#endif
/*
* Wrapper for support code for things like BUG_ASSERT().
* Useful for declaring variables or adding code that is not itself
* a BUG() statement but that will only be used when debugging is enabled.
*
* Eg:
*
* void foo_init(void)
* {
* BUG_SUPPORT(static count = 0);
* BUG_IF(count++, BUG_HORRIBLE_BOTCH_IN_FOO_INIT, BUG_FATAL, 0,
* (BUG_OUT, "Arg, you called foo_init() again!"));
* ...
* }
*/
#ifndef BUG_SUPPORT
#if INSTALL_BUG
#define BUG_SUPPORT(x) x
#else
#define BUG_SUPPORT(x)
#endif
#endif
/*
* Default definition of BUG() if customer doesn't provide one.
* Does nothing at all.
*/
#ifndef BUG
#define BUG(w,x,y,z)
#endif
/*
* The rest of this file is a couple of sample definitions of the BUG()
* macro that might be useful in your environment.
*/
#if 0
/*
* Sample BUG() that just passes error indication to customer code.
*/
#define BUG(w,x,y,z) \
glue_bug(w,x)
/*
* Sample BUG() that logs errors and handles the fatal flag.
* Logging depends on some POSIX-like features that are available on
* many but not all systems.
* Something like this might be useful in a debugging environment.
*
* NB: "fprintf z;" is not a typo.
*/
#define BUG_OUT stderr
#define BUG(w,x,y,z) \
do {\
char now_[30];\
time_t now_time_ = time(0);\
struct tm *now_tm_ = localtime(&now_time_);\
strftime(now_, sizeof(now_), "%H:%M:%S", now_tm_);\
fprintf(BUG_OUT, "%s: ", now_);\
fprintf z ;\
fputc('\n', BUG_OUT);\
if ((x) == BUG_FATAL)\
fprintf(BUG_OUT, "%s: Fatal error, cannot continue\n", now_);\
fflush(BUG_OUT);\
if ((x) == BUG_FATAL)\
abort();\
} while (0)
#endif /* 0 */
#ifdef __cplusplus
}
#endif
#endif /* EPILOGUE_BUG_H */
+417
View File
@@ -0,0 +1,417 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/common/bugdef.h,v 1.2 2003/01/16 18:20:10 josh Exp $ */
/*
* Copyright (C) 1999-2005 Wind River Systems, Inc.
* All rights reserved. Provided under license only.
* Distribution or other use of this software is only
* permitted pursuant to the terms of a license agreement
* from Wind River Systems (and is otherwise prohibited).
* Refer to that license agreement for terms of use.
*/
/****************************************************************************
* Copyright 1995-1997 Epilogue Technology Corporation.
* Copyright 1998-1999 Integrated Systems, Inc.
* All rights reserved.
*****************************************************************************/
/*
* $Log: bugdef.h,v $
* Revision 1.2 2003/01/16 18:20:10 josh
* directory structure shifting
*
* Revision 1.1.1.1 2001/11/05 17:47:17 tneale
* Tornado shuffle
*
* Revision 1.32 2001/06/12 08:06:02 paul
* Added BUG_SOCKET_UPCALL_BAD_CV, BUG_SOCKET_UPCALL_CLOSING.
*
* Revision 1.31 2001/06/08 19:11:48 paul
* Added BUG_ATTACHE_PSOS_THREAD_INFO.
*
* Revision 1.30 2001/05/31 17:12:18 paul
* Added BUG_MEMPOOL_TRACE.
*
* Revision 1.29 2001/01/19 22:21:27 paul
* Update copyright.
*
* Revision 1.28 2000/12/02 20:23:56 sar
* Added a series of bugdefs for v6 stuff
* Added bug_pkt_dup_alloc_failed as it got lost somewhere
*
* Revision 1.27 2000/10/16 19:21:43 paul
* Restore sockets and mempool code.
*
* Revision 1.26 2000/03/17 07:13:38 paul
* Roll IPv6 back to the last released state.
*
* Revision 1.25 2000/03/17 00:16:34 meister
* Update copyright message
*
* Revision 1.24 2000/03/13 21:21:44 paul
* Removed some code that we are no longer working on.
*
* Revision 1.23 2000/02/01 22:01:14 tneale
* Added BUG_SNMP_RCV_TRACE
*
* Revision 1.22 1999/11/10 21:57:09 paul
* Added BUG_IF_SEND_TRACE
*
* Revision 1.14 1999/03/08 22:12:58 paul
* added a bunch of socket bugdefs
*
* Revision 1.13 1999/02/18 04:41:22 wes
* Sockets merge: Everything Else
* - memory pools
* - thread support
* - port-specific headers
*
* Revision 1.12 1998/11/23 20:52:59 wes
* Make MEDIA_CTL_CHECK_ADDRESS succeed rather than die.
* Die using BUG instead of abort() for unknown media_ctl ops.
*
* Revision 1.11.2.4 1998/10/21 20:22:41 wes
* Correct comments to reflect new usage of SOCKET_{TRACE,INFO}
*
* Revision 1.11.2.3 1998/10/01 22:43:46 wes
* May the Fleas of a Thousand Camels infest the Nether Regions of
* Whoever thought of Trigraphs.
*
* Revision 1.11.2.2 1998/10/01 21:52:05 wes
* Use the BUG macro closer to how it was intended to be used
*
* Revision 1.11.2.1 1998/09/30 22:05:56 wes
* Add THREAD_TRACE bugdef
*
* Revision 1.11 1998/09/06 08:11:05 sra
* Packet filtering hooks in Attache, rudimentary firewall
* implementation in Snark.
*
* Revision 1.10 1998/08/07 23:56:47 meister
* added BUG_ARP_SEND_REQUEST BUG_ARP_SEND BUG_ET_ARP_SEND_TRACE
* BUG_ARP_RCV_TRACE
*
* Revision 1.9 1998/07/30 22:11:49 meister
* added BUG_SNARK_PSOSTTY_INFO
*
* Revision 1.8 1998/07/24 16:53:02 meister
* Added BUG_ATTACHE_PSOS_NIDRV_INFO
*
* Revision 1.7 1998/07/03 18:37:32 sra
* Add trace calls to route_host_lookup().
*
* Revision 1.6 1998/06/29 22:25:56 sra
* More trace symbols.
*
* Revision 1.5 1998/06/29 03:07:46 sra
* Add tracing code to et_rcv().
*
* Revision 1.4 1998/04/24 18:42:37 wes
* Two new bug codes for DHCP
*
* Revision 1.3 1998/04/16 15:57:46 josh
* two new bug definitions for Envoy
*
* Revision 1.2 1998/02/25 04:43:24 sra
* Update copyrights.
*
* Revision 1.1 1998/02/05 22:19:28 josh
* moving commonly used include files into common/h from top-level directory
*
* Revision 3.26 1997/11/20 17:33:15 sra
* Clear out a bunch of unused PAP and CHAP bug codes.
*
* Revision 3.25 1997/11/19 21:14:42 josh
* Liaison bug definitions
*
* Revision 3.24 1997/11/18 03:18:24 sra
* Brand new PAP and CHAP code for PPP.
*
* Revision 3.23 1997/10/28 00:51:48 sra
* Convert PPP code to use BUG() macro.
* Bang on CHAP and PAP code some more.
* Create test driver for PPP under Snark/BSD.
*
* Revision 3.22 1997/10/15 19:49:36 sra
* Preliminary cleanup of PPP PAP and CHAP modules.
*
* Revision 3.21 1997/08/15 22:14:57 lowell
* PAP/CHAP polishing
*
* Revision 3.20 1997/08/14 16:04:33 lowell
* boilerplate
*
* Revision 3.19 1997/07/29 00:18:41 lowell
* PAP/CHAP messages for logging already in file
*
* Revision 3.18 1997/07/17 02:15:56 alan
* New errors for a new Decorum
*
* Revision 3.17 1997/06/17 19:00:20 lowell
* more extensive TFTP debugging
*
* Revision 3.16 1997/05/30 17:00:18 lowell
* TFTP (got rid of old TFTP_DEBUG)
*
* Revision 3.15 1997/05/23 04:13:32 sra
* Add BUG_IPADDR_TEST_UNKNOWN_CODE.
*
* Revision 3.14 1997/05/22 03:35:25 sra
* Get rid of struct udp_hdr. Change pkt_rcv_info into an array, convert
* receive path to use it instead of passing pointer arguments in upcalls.
*
* Revision 3.13 1997/05/17 07:39:02 sra
* Change IP protocol dispatch to use ip_listener table.
*
* Revision 3.12 1997/03/20 06:58:16 sra
* DFARS-safe copyright text. Zap!
*
* Revision 3.11 1997/03/19 04:11:35 sra
* BUG() now common to all products, so move the associated .h files.
*
* Revision 3.10 1997/02/24 14:43:18 josh
* new bug definitions for Courier RIP and Attache Plus TCP
*
* Revision 3.9 1996/10/28 18:19:01 lowell
* Decorum messages
* Looks like this needs to be freed of its ownership by Attache...
*
* Revision 3.8 1996/03/22 10:04:12 sra
* Update copyrights prior to Attache 3.2 release.
*
* Revision 3.7 1996/03/14 17:51:55 lowell
* DHCP packet dumper code
*
* Revision 3.6 1995/12/02 09:15:04 sra
* Add a bunch of Courier stuff.
*
* Revision 3.5 1995/09/28 23:06:59 sra
* Fix Courier identifiers and copyrights for release packaging.
*
* Revision 3.4 1995/06/30 23:24:10 sra
* Back out hairy interface to RCI TRACE() to a simpler scheme.
*
* Revision 3.3 1995/06/30 22:44:00 sra
* Add RCI trace bug codes.
*
* Revision 3.2 1995/06/30 16:10:40 lowell
* first few ARP and DHCP bug definitions (more to come)
*
* Revision 3.1 1995/06/27 06:20:23 sra
* Add some debugging code to catch botched packet buffer allocs/frees.
*
* Revision 3.0 1995/05/10 22:36:18 sra
* Release 3.0.
*
* Revision 1.1 1995/04/25 21:39:43 sra
* Initial revision
*
*/
/* [clearcase]
modification history
-------------------
01a,20apr05,job update copyright notices
*/
/*
* BUGDEF() table (see bug.h)
*
* NB: This file intentionally does NOT protect against multiple inclusion.
*
* Bug symbol definitions. This file is included by bug.h,
* and may be included by other modules as necessary. It's a separate
* file to make it easy to build a translation tables, bitvectors, and
* so forth.
*
* There should not be anything in this file except comments and
* invocations of the BUGDEF() macro.
*
* We'll probably add more of these in every release. Check these
* with a switch() or if() statement, don't depend on specific numeric
* values.
*/
BUGDEF(BUG_ASSERTION_FAILED) /* bug.h */
BUGDEF(BUG_RIP_MBZ_WASNT) /* attache/net/rip.c */
BUGDEF(BUG_RIP_BAD_ENTRY) /* attache/net/rip.c */
BUGDEF(BUG_RIP_COULDNT_CREATE_ROUTE) /* attache/net/rip.c */
BUGDEF(BUG_RIP_COULDNT_CREATE_ROUTE_EXT) /* attache/net/rip.c */
BUGDEF(BUG_RIP_DURCV) /* attache/net/rip.c */
BUGDEF(BUG_RIP_NO_BUFFERS) /* attache/net/rip.c */
BUGDEF(BUG_RIP_SKIPPING_ADDRESS) /* attache/net/rip.c */
BUGDEF(BUG_RIP_SKIPPING_BROADCAST_ADDRESS) /* attache/net/rip.c */
BUGDEF(BUG_RIP_ROUTE_CHANGE) /* attache/net/rip.c */
BUGDEF(BUG_RIP_CLEAR_ROUTE_CACHE) /* attache/net/rip.c */
BUGDEF(BUG_RIP_BAD_BROADCAST_ADDRESS) /* attache/net/rip.c */
BUGDEF(BUG_IPOPT_TOO_LONG) /* attache/net/ip_opt.c */
BUGDEF(BUG_PKT_INIT_NO_MEMORY) /* attache/net/packet.c */
BUGDEF(BUG_PKT_ALLOC_ALREADY) /* attache/net/packet.c */
BUGDEF(BUG_PKT_FREE_ALREADY) /* attache/net/packet.c */
BUGDEF(BUG_IP_SEND_FREED) /* attache/net/ip_send.c */
BUGDEF(BUG_ARP_NULL_POINTER) /* attache/net/arp.c */
BUGDEF(BUG_DHCP_BAD_PACKET) /* (unused?) */
BUGDEF(BUG_DHCP_PACKET_DUMP) /* attache/net/dhcp.c */
BUGDEF(BUG_COURIER_TRACE) /* courier/common/trace_ut.h */
BUGDEF(BUG_COURIER_IPI_ENABLE_FAILED) /* courier/common/epilogue.c */
BUGDEF(BUG_COURIER_IPI_INIT_FAILED) /* courier/common/epilogue.c */
BUGDEF(BUG_COURIER_IPI_REENABLE_FAILED) /* courier/common/epilogue.c */
BUGDEF(BUG_COURIER_OSPF_INIT_FAILED) /* courier/common/epilogue.c */
BUGDEF(BUG_COURIER_OSPF_RCV_NO_IFB) /* courier/common/epilogue.c */
BUGDEF(BUG_COURIER_OSPF_RCV_IFB_DOWN) /* courier/common/epilogue.c */
BUGDEF(BUG_COURIER_RIP_RCV_NO_IFB) /* courier/common/udp_ut.c */
BUGDEF(BUG_COURIER_RIP_RCV_IFB_DOWN) /* courier/common/udp_ut.c */
BUGDEF(BUG_IF_ATTACH_IFB_CREATE_FAILED) /* attache/net/if.c */
BUGDEF(BUG_COURIER_TCP_CANT_ALLOCATE_TCB) /* courier/common/tcp_ut.c */
BUGDEF(BUG_COURIER_TCP_CANT_BIND_HOST_PASSIVE) /* courier/common/tcp_ut.c */
BUGDEF(BUG_COURIER_TCP_MULTIPLE_LISTENS) /* courier/common/tcp_ut.c */
BUGDEF(BUG_COURIER_TCP_START_FAILED) /* courier/common/tcp_ut.c */
BUGDEF(BUG_COURIER_FATAL_ERROR) /* courier/sys_incl.h */
BUGDEF(BUG_DECORUM_BAD_DATE_TYPE) /* decorum/http/date.c */
BUGDEF(BUG_DECORUM_BAD_VERSION) /* (unused) */
BUGDEF(BUG_DECORUM_CLIENT_ERROR) /* decorum/http/http.c */
BUGDEF(BUG_DECORUM_ENV_DUPLICATE_NAME) /* decorum/http/envcfg.c */
BUGDEF(BUG_DECORUM_INFO) /* decorum/http/xxx.c */
BUGDEF(BUG_DECORUM_MISSING_INBUF) /* (unused) */
BUGDEF(BUG_DECORUM_NO_DATE) /* decorum/http/date.c */
BUGDEF(BUG_DECORUM_UNEXPECTED_ERR) /* decorum/http/xxx.c */
BUGDEF(BUG_DECORUM_XATTACHE_ERROR) /* decorum/http/xattache.c */
BUGDEF(BUG_DECORUM_XATTACHE_INFO) /* decorum/http/xattache.c */
BUGDEF(BUG_LIAISON_CANT_BIND_OBJECT) /* liaison/xrmon/xsnmp.c */
BUGDEF(BUG_LIAISON_UNKNOWN_OBJECT) /* liaison/xrmon/xsnmp.c */
BUGDEF(BUG_LIAISON_CANT_ENCODE_TRAP) /* liaison/xrmon/xsnmp.c */
BUGDEF(BUG_SNARK_UNEXPECTED_EOF) /* snark/test/main.c */
BUGDEF(BUG_TCP_ACK_DATA_FREEING) /* attache/net/tcp_rcv.c */
BUGDEF(BUG_TCP_ACK_DATA_HUSHING) /* attache/net/tcp_rcv.c */
BUGDEF(BUG_TCP_ACK_DATA_SQUEEZING) /* attache/net/tcp_rcv.c */
BUGDEF(BUG_TCP_ACK_DATA_FAST_RETRANSMIT_DONE) /* attache/net/tcp_rcv.c */
BUGDEF(BUG_TCP_CLOSE_INVALID_CONNECTION) /* attache/net/tcp.c */
BUGDEF(BUG_TCP_CLOSE_INVALID_STATE) /* attache/net/tcp.c */
BUGDEF(BUG_TCP_ENTER_FUNC) /* attache/net/tcpintnl.h */
BUGDEF(BUG_TCP_GET_SND_MSS) /* attache/net/tcp_rcv.c */
BUGDEF(BUG_TCP_HANDLE_ACK_DALLY) /* attache/net/tcp.c */
BUGDEF(BUG_TCP_HANDLE_SWS_DALLY) /* attache/net/tcp.c */
BUGDEF(BUG_TCP_POST_DATA_AHEAD) /* attache/net/tcp_rcv.c */
BUGDEF(BUG_TCP_POST_DATA_OBSOLETE) /* attache/net/tcp_rcv.c */
BUGDEF(BUG_TCP_POST_DATA_POSTING) /* attache/net/tcp_rcv.c */
BUGDEF(BUG_TCP_PRINT_PKTHDR) /* attache/net/tcpintnl.h */
BUGDEF(BUG_TCP_RCV_ACKED_UNSENT_DATA) /* attache/net/tcp_rcv.c */
BUGDEF(BUG_TCP_RCV_ACKING_UNACCEPTABLE) /* attache/net/tcp_rcv.c */
BUGDEF(BUG_TCP_RCV_LOG_PKT) /* attache/net/tcp_rcv.c */
BUGDEF(BUG_TCP_RCV_REUSING_SAVED_PKT) /* attache/net/tcp_rcv.c */
BUGDEF(BUG_TCP_RCV_SAVING_EARLY_PKT) /* attache/net/tcp_rcv.c */
BUGDEF(BUG_TCP_RCV_SCHEDULING_ZERO_WINDOW_PROBE) /* attache/net/tcp_rcv.c */
BUGDEF(BUG_TCP_RCV_FAST_RETRANSMIT_EQUAL) /* attache/net/tcp_rcv.c */
BUGDEF(BUG_TCP_RCV_FAST_RETRANSMIT_GREATER) /* attache/net/tcp_rcv.c */
BUGDEF(BUG_TCP_RETRANSMIT_HANDLER) /* attache/net/tcp_send.c */
BUGDEF(BUG_TCP_RTT_LOG_1) /* attache/net/tcp_rcv.c */
BUGDEF(BUG_TCP_RTT_LOG_2) /* attache/net/tcp_rcv.c */
BUGDEF(BUG_TCP_SEND_COPYING) /* attache/net/tcp_send.c */
BUGDEF(BUG_TCP_SEND_DECIDED_TO_SEND) /* attache/net/tcp_send.c */
BUGDEF(BUG_TCP_SEND_ENTRY_LOG) /* attache/net/tcp_send.c */
BUGDEF(BUG_TCP_SEND_FORBIDDEN_BY_SWS) /* attache/net/tcp_send.c */
BUGDEF(BUG_TCP_SEND_LOG_PKT) /* attache/net/tcp_send.c */
BUGDEF(BUG_TCP_SEND_NEW_DATA_BEYOND_WINDOW) /* attache/net/tcp_send.c */
BUGDEF(BUG_TCP_SEND_NOTHING_TO_DO) /* attache/net/tcp_send.c */
BUGDEF(BUG_TCP_SEND_PKTALLOC_FAILED) /* attache/net/tcp_send.c */
BUGDEF(BUG_TCP_SEND_SCHEDULING_RETRANSMISSION) /* attache/net/tcp_send.c */
BUGDEF(BUG_TCP_SET_ACK_DALLY) /* attache/net/tcp.c */
BUGDEF(BUG_TCP_SET_RCV_MSS) /* attache/net/tcp_send.c */
BUGDEF(BUG_TCP_SET_SWS_DALLY) /* attache/net/tcp.c */
BUGDEF(BUG_TCP_SET_TIME_WAIT) /* attache/net/tcp.c */
BUGDEF(BUG_TFTP_BAD_PORT) /* attache/net/tftpc.c */
BUGDEF(BUG_TFTP_CNXN_NOTFOUND) /* attache/net/tftpc.c */
BUGDEF(BUG_TFTP_ALLOC_PKT_FAIL) /* attache/net/tftpc.c */
BUGDEF(BUG_TFTP_ALLOC_MEM_FAIL) /* attache/net/tftpc.c */
BUGDEF(BUG_TFTP_TIMEOUT) /* attache/net/tftpc.c */
BUGDEF(BUG_TFTP_WRONG_ACK) /* attache/net/tftpc.c */
BUGDEF(BUG_TFTP_WRONG_BLOCK) /* attache/net/tftpc.c */
BUGDEF(BUG_IP_RCV_UNRECOGNIZED_IP_VERSION) /* attache/net/ip_rcv.c */
BUGDEF(BUG_PKT_APPEND_OVERFLOW) /* attache/h/packet.h */
BUGDEF(BUG_IPADDR_TEST_UNKNOWN_CODE) /* attache/net/ipaddr.c */
BUGDEF(BUG_PPP_CHAP_PKT_ALLOC_FAILED) /* attache/net/pppchap.c */
BUGDEF(BUG_ATTACHE_PPP_LCP_BAD_TIMEOUT) /* attache/net/ppp.c */
BUGDEF(BUG_ATTACHE_PPP_IPCP_BAD_TIMEOUT) /* attache/net/ppp.c */
BUGDEF(BUG_ATTACHE_PPP_LCP_EVENT) /* attache/net/ppp.c */
BUGDEF(BUG_ATTACHE_PPP_IPCP_EVENT) /* attache/net/ppp.c */
BUGDEF(BUG_SNARK_PPP_AUTH_STATUS) /* snark/lib/netconf.c */
BUGDEF(BUG_PPP_CHAP_CHALLENGE_TIMEOUT) /* attache/net/pppchap.c */
BUGDEF(BUG_PPP_CHAP_SERVER_UNEXPECTED_STATE) /* attache/net/pppchap.c */
BUGDEF(BUG_PPP_CHAP_CLIENT_UNEXPECTED_STATE) /* attache/net/pppchap.c */
BUGDEF(BUG_PPP_AUTH_ALLOC_FAILED) /* attache/net/pppauth.c */
BUGDEF(BUG_PPP_AUTH_BAD_FLAGS) /* attache/net/pppauth.c */
BUGDEF(BUG_PPP_CHAP_SERVER_ENABLED) /* attache/net/ppplcp.c */
BUGDEF(BUG_PPP_PAP_SERVER_ENABLED) /* attache/net/ppplcp.c */
BUGDEF(BUG_PPP_NEGOTIATING_CHAP) /* attache/net/ppplcp.c */
BUGDEF(BUG_PPP_NEGOTIATING_PAP) /* attache/net/ppplcp.c */
BUGDEF(BUG_PPP_LCP_UNKNOWN_NAK) /* attache/net/ppplcp.c */
BUGDEF(BUG_PPP_LCP_UNKNOWN_REQ) /* attache/net/ppplcp.c */
BUGDEF(BUG_PPP_LCP_RCV) /* attache/net/ppplcp.c */
BUGDEF(BUG_PPP_PAP_CLIENT_UNEXPECTED_STATE) /* attache/net/ppppap.c */
BUGDEF(BUG_PPP_PAP_PKT_ALLOC_FAILED) /* attache/net/ppppap.c */
BUGDEF(BUG_PPP_PAP_REQUEST_TIMEOUT) /* attache/net/ppppap.c */
BUGDEF(BUG_PPP_PAP_SERVER_UNEXPECTED_STATE) /* attache/net/ppppap.c */
BUGDEF(BUG_ENVOY_LOCKING) /* envoy/snmp */
BUGDEF(BUG_ENVOY_INSUFFICIENT_MEMORY) /* envoy/snmp */
BUGDEF(BUG_DHCP_STATE_TRACE) /* attache/net/dhcp.c */
BUGDEF(BUG_DHCP_TIMER_TRACE) /* attache/net/dhcp.c */
BUGDEF(BUG_ET_RCV_TRACE) /* attache/net/et_rcv.c */
BUGDEF(BUG_ET_SEND_TRACE) /* attache/net/et_send.c */
BUGDEF(BUG_IF_SEND_TRACE) /* attache/net/if.c */
BUGDEF(BUG_IP_RCV_TRACE) /* attache/net/ip_rcv.c */
BUGDEF(BUG_IP_SEND_TRACE) /* attache/net/ip_send.c */
BUGDEF(BUG_ICMP_RCV_TRACE) /* attache/net/icmp.c */
BUGDEF(BUG_ICMP_SEND_TRACE) /* attache/net/icmp.c */
BUGDEF(BUG_IP_RTE_TRACE) /* attache/net/ip_rte.c */
BUGDEF(BUG_ATTACHE_PSOS_NIDRV_INFO) /* attache/psos support */
BUGDEF(BUG_SNARK_PSOSTTY_INFO) /* snark/psostty.c */
BUGDEF(BUG_ARP_SEND_REQUEST) /* attache/net/arp.c */
BUGDEF(BUG_ARP_SEND) /* attache/net/arp.c */
BUGDEF(BUG_ET_ARP_SEND_TRACE) /* attache/net/et_send.c*/
BUGDEF(BUG_ARP_RCV_TRACE) /* attache/net/arp.c */
BUGDEF(BUG_SNARK_FIREWALL_CONFIG_ALLOC_FAILED) /* snark/lib/firewall.c */
BUGDEF(BUG_SNARK_FIREWALL_CONFIG_PARSE_ERROR) /* snark/lib/firewall.c */
BUGDEF(BUG_SNARK_FIREWALL_ALLOW_PKT) /* snark/lib/firewall.c */
BUGDEF(BUG_SNARK_FIREWALL_DROP_PKT) /* snark/lib/firewall.c */
BUGDEF(BUG_SNARK_FIREWALL_RESET_PKT) /* snark/lib/firewall.c */
BUGDEF(BUG_SNARK_TUN_ERROR) /* snark/lib/tun.c */
BUGDEF(BUG_THREAD_TRACE) /* common/lib/thread_debug.c */
BUGDEF(BUG_SOCKET_ENTER_FUNC) /* attache/sockets/sockintl.h */
BUGDEF(BUG_SOCKET_TRACE) /* attache/sockets/sockintl.h */
BUGDEF(BUG_SOCKET_ACCEPT_EMFILE) /* attache/sockets/socktcp.c */
BUGDEF(BUG_SOCKET_ALLOC) /* attache/sockets/socktcp.c */
BUGDEF(BUG_SOCKET_LISTEN_BACKLOG) /* attache/sockets/socktcp.c */
BUGDEF(BUG_SOCKET_RCVQ_EMPTY) /* attache/sockets/socktcp.c */
BUGDEF(BUG_SOCKET_UPCALL_BAD_SOCKET) /* attache/sockets/socktcp.c */
BUGDEF(BUG_SOCKET_UPCALL_BAD_STATE) /* attache/sockets/socktcp.c */
BUGDEF(BUG_SOCKET_UPCALL_BAD_CV) /* attache/sockets/socktcp.c */
BUGDEF(BUG_SOCKET_UPCALL_DFQ_FULL) /* attache/sockets/socktcp.c */
BUGDEF(BUG_SOCKET_UPCALL_RCVQ_FULL) /* attache/sockets/socktcp.c */
BUGDEF(BUG_SOCKET_UPCALL_SHUTDOWN) /* attache/sockets/socktcp.c */
BUGDEF(BUG_SOCKET_UPCALL_CLOSING) /* attache/sockets/socktcp.c */
BUGDEF(BUG_SOCKET_IOCTL_ADD_ROUTE) /* attache/sockets/sockif.c */
BUGDEF(BUG_SOCKET_IOCTL_DEL_ROUTE) /* attache/sockets/sockif.c */
BUGDEF(BUG_SNMP_RCV_TRACE) /* attache/net/snmpfunc.c */
BUGDEF(BUG_IPV6_SEND_TRACE) /* attache/net/ip6_send.c */
BUGDEF(BUG_IPV6_SEND_ERROR) /* attache/net/ip6_send.c */
BUGDEF(BUG_IPV6_RCV_TRACE) /* attache/net/ip6_rcv.c */
BUGDEF(BUG_IPV6_RCV_ERROR) /* attache/net/ip6_rcv.c */
BUGDEF(BUG_IPV6_CKSUM_TRACE) /* attache/net/ip6_cksum.c */
BUGDEF(BUG_IPV6_ICMP_TRACE) /* attache/net/icmpv6.c */
BUGDEF(BUG_IPV6_ICMP_ERROR) /* attache/net/icmpv6.c */
BUGDEF(BUG_IPV6_DAD_TRACE) /* attache/net/ip6_cfg.c */
BUGDEF(BUG_IPV6_DAD_ERROR) /* attache/net/ip6_cfg.c */
BUGDEF(BUG_IPV6_ND_TRACE) /* attache/net/ip6_nd.c */
BUGDEF(BUG_IPV6_ND_ERROR) /* attache/net/ip6_nd.c */
BUGDEF(BUG_IPV6_RD_TRACE) /* attache/net/ip6_rd.c */
BUGDEF(BUG_IPV6_RD_ERROR) /* attache/net/ip6_rd.c */
BUGDEF(BUG_IPV6_RDRT_TRACE) /* attache/net/ip6_rdrt.c */
BUGDEF(BUG_IPV6_RDRT_ERROR) /* attache/net/ip6_rdrt.c */
BUGDEF(BUG_IPV6_FRAG_TRACE) /* attache/net/ip6_frag.c */
BUGDEF(BUG_IPV6_FRAG_ERROR) /* attache/net/ip6_frag.c */
BUGDEF(BUG_PKT_DUP_ALLOC_FAILED) /* attache/net/ip_rcv.c */
BUGDEF(BUG_MEMPOOL_TRACE) /* snark/lib/pool.c */
BUGDEF(BUG_ATTACHE_PSOS_THREAD_INFO) /* attache/psos/thread.c */
/* End of bugdef.h */
@@ -0,0 +1,118 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/common/cmn_init.h,v 1.3 2003/01/16 18:20:11 josh Exp $ */
/*
* Copyright (C) 1999-2005 Wind River Systems, Inc.
* All rights reserved. Provided under license only.
* Distribution or other use of this software is only
* permitted pursuant to the terms of a license agreement
* from Wind River Systems (and is otherwise prohibited).
* Refer to that license agreement for terms of use.
*/
/****************************************************************************
* Copyright 1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: cmn_init.h,v $
* Revision 1.3 2003/01/16 18:20:11 josh
* directory structure shifting
*
* Revision 1.2 2001/11/07 00:07:09 meister
* Rework pathnames again
*
* Revision 1.1.1.1 2001/11/05 17:47:18 tneale
* Tornado shuffle
*
* Revision 1.10 2001/01/19 22:21:27 paul
* Update copyright.
*
* Revision 1.9 2000/03/17 00:16:35 meister
* Update copyright message
*
* Revision 1.8 2000/03/09 19:09:22 josh
* changes so we don't shoot ourselves in the foot if we're building
* Emissary or Liaison
*
* Revision 1.7 1998/09/11 16:30:40 paul
* Auto-initialize common library.
*
* Revision 1.6 1998/06/19 20:46:29 sra
* Minor cleanups to crypto code installation options.
*
* Revision 1.5 1998/02/25 04:43:25 sra
* Update copyrights.
*
* Revision 1.4 1997/10/30 16:44:29 sra
* Fix copyright date.
*
* Revision 1.3 1997/10/15 19:45:14 sra
* Cleanup.
*
* Revision 1.2 1997/08/14 16:04:37 lowell
* boilerplate
*
*/
/* [clearcase]
modification history
-------------------
01a,20apr05,job update copyright notices
*/
#ifndef EPILOGUE_INSTALL_H
#include <wrn/wm/common/install.h>
#endif
extern void etc_common_init(void); /* init the common library */
/*
* The purpose of the following incantations is to make sure that exactly
* one Epilogue product initializes the common library. The decision of
* which product should do the initialization is made at compile time,
* according to the following if/else-if/else chain. The intent is to
* keep all of the control of how this happens localized in one place.
*/
#if defined(INSTALL_ATTACHE) && INSTALL_ATTACHE
#define COMMON_INIT_FROM_ATTACHE() etc_common_init()
#elif defined(INSTALL_ENVOY) && INSTALL_ENVOY
#define COMMON_INIT_FROM_ENVOY() etc_common_init()
#elif defined(INSTALL_COURIER) && INSTALL_COURIER
#define COMMON_INIT_FROM_COURIER() etc_common_init()
#elif defined(INSTALL_DECORUM) && INSTALL_DECORUM
#define COMMON_INIT_FROM_DECORUM() etc_common_init()
#elif defined(INSTALL_LIAISON) && INSTALL_LIAISON
#define COMMON_INIT_FROM_LIAISON() etc_common_init()
#elif defined(INSTALL_EMISSARY) && INSTALL_EMISSARY
/* We don't care in this case... */
#else
#error Internal error! Nobody calls etc_common_init()!
#endif
#ifndef COMMON_INIT_FROM_ATTACHE
#define COMMON_INIT_FROM_ATTACHE()
#endif
#ifndef COMMON_INIT_FROM_ENVOY
#define COMMON_INIT_FROM_ENVOY()
#endif
#ifndef COMMON_INIT_FROM_COURIER
#define COMMON_INIT_FROM_COURIER()
#endif
#ifndef COMMON_INIT_FROM_DECORUM
#define COMMON_INIT_FROM_DECORUM()
#endif
#ifndef COMMON_INIT_FROM_LIAISON
#define COMMON_INIT_FROM_LIAISON()
#endif
@@ -0,0 +1,82 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/common/config.h,v 1.3 2003/01/16 18:20:11 josh Exp $ */
/*
* Copyright (C) 1999-2005 Wind River Systems, Inc.
* All rights reserved. Provided under license only.
* Distribution or other use of this software is only
* permitted pursuant to the terms of a license agreement
* from Wind River Systems (and is otherwise prohibited).
* Refer to that license agreement for terms of use.
*/
/****************************************************************************
* Copyright 1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: config.h,v $
* Revision 1.3 2003/01/16 18:20:11 josh
* directory structure shifting
*
* Revision 1.2 2001/11/07 00:07:09 meister
* Rework pathnames again
*
* Revision 1.1.1.1 2001/11/05 17:47:18 tneale
* Tornado shuffle
*
* Revision 1.9 2001/01/19 22:21:27 paul
* Update copyright.
*
* Revision 1.8 2000/03/17 00:16:35 meister
* Update copyright message
*
* Revision 1.7 1998/02/25 04:43:25 sra
* Update copyrights.
*
* Revision 1.6 1998/02/05 22:37:35 josh
* Changing references to types.h so we include common/h/types.h instead
*
* Revision 1.5 1997/08/21 17:23:42 sra
* Begin moving configuration stuff that's common to all products to common.h
* Minor cleanups to common/lib/prng.c. Add pnrg seed function to snarkbsd.
*
* Revision 1.4 1997/08/14 16:04:38 lowell
* boilerplate
*
*/
/* [clearcase]
modification history
-------------------
01a,20apr05,job update copyright notices
*/
#ifndef COMMON_CONFIG_H
#define COMMON_CONFIG_H
/*
* Grab the standard top-level includes.
*/
#ifndef EPILOGUE_INSTALL_H
#include <wrn/wm/common/install.h>
#endif
#ifndef EPILOGUE_TYPES_H
#include <wrn/wm/common/types.h>
#endif
/*
* Load the preamble portion of the customer's common.h file.
*/
#define CONFIG_PREAMBLE 1
#include <common.h>
#undef CONFIG_PREAMBLE
#endif /* COMMON_CONFIG_H */
+93
View File
@@ -0,0 +1,93 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/common/des.h,v 1.3 2003/01/16 18:20:11 josh Exp $ */
/*
* Copyright (C) 1999-2005 Wind River Systems, Inc.
* All rights reserved. Provided under license only.
* Distribution or other use of this software is only
* permitted pursuant to the terms of a license agreement
* from Wind River Systems (and is otherwise prohibited).
* Refer to that license agreement for terms of use.
*/
/****************************************************************************
* Copyright 1988-1997 Epilogue Technology Corporation.
* All rights reserved.
****************************************************************************/
/*
* this DES implementation derived from Phil Karns public domain DES.
*/
/* [clearcase]
modification history
-------------------
01a,20apr05,job update copyright notices
*/
#ifndef EPILOGUE_DES_H
#define EPILOGUE_DES_H
#ifdef __cplusplus
extern"C" {
#endif
#ifndef EPILOGUE_TYPES_H
#include <wrn/wm/common/types.h>
#endif
#ifndef EPILOGUE_INSTALL_H
#include <wrn/wm/common/install.h>
#endif
typedef bits32_t DES_KS[16][2]; /* Single-key DES key schedule */
typedef bits32_t DES3_KS[48][2]; /* Triple-DES key schedule */
typedef struct
{ int decrypt;
DES_KS keysched;
bits8_t iv [8];
} DES_CTX;
#if INSTALL_COMMON_3DES
typedef struct
{ int decrypt;
DES3_KS keysched;
bits8_t iv [8];
} DES3_CTX;
#endif /* INSTALL_COMMON_3DES */
#ifndef _EXCLUDE_PROTOTYPES_
int des_is_real(void);
void deskey (DES_KS, bits8_t *,int);
void des (DES_KS, bits8_t *, bits8_t *);
void desecb_block_encrypt (DES_CTX *ctx, bits8_t *in, bits8_t *out);
void descbc_block_decrypt (DES_CTX *ctx, bits8_t *in, bits8_t *out);
void descbc_block_encrypt (DES_CTX *ctx, bits8_t *in, bits8_t *out);
void descbc_init_context (void *ctx, bits8_t *key, int decrypt);
void descbc_iv_context (void *ctx, bits8_t *iv);
void descbc_crypt (void *ctx, bits8_t *in, bits8_t *out, bits32_t n);
#if INSTALL_COMMON_3DES
void des3key (DES3_KS, bits8_t *,int);
void des3 (DES3_KS, bits8_t *, bits8_t *);
void des3cbc_block_decrypt (DES3_CTX *ctx, bits8_t *in, bits8_t *out);
void des3cbc_block_encrypt (DES3_CTX *ctx, bits8_t *in, bits8_t *out);
void des3cbc_init_context (void *ctx, bits8_t *key, int decrypt);
void des3cbc_iv_context (void *ctx, bits8_t *iv);
void des3cbc_crypt (void *ctx, bits8_t *in, bits8_t *out, bits32_t n);
#endif /* INSTALL_COMMON_3DES */
#endif /* ifndef _EXCLUDE_PROTOTYPES_ */
#ifdef __cplusplus
}
#endif
#endif /* EPILOGUE_DES_H */
+333
View File
@@ -0,0 +1,333 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/common/dyncfg.h,v 1.2 2003/01/16 18:20:11 josh Exp $ */
/*
* Copyright (C) 1999-2005 Wind River Systems, Inc.
* All rights reserved. Provided under license only.
* Distribution or other use of this software is only
* permitted pursuant to the terms of a license agreement
* from Wind River Systems (and is otherwise prohibited).
* Refer to that license agreement for terms of use.
*/
/****************************************************************************
* Copyright 1988-1997 Epilogue Technology Corporation.
* All rights reserved.
****************************************************************************/
/*
* $Log: dyncfg.h,v $
* Revision 1.2 2003/01/16 18:20:11 josh
* directory structure shifting
*
*/
/* [clearcase]
modification history
-------------------
01a,20apr05,job update copyright notices
*/
#ifndef COMMON_DYNCFG_H
# define COMMON_DYNCFG_H 1
/*
* see example of usage at end of file
*/
#if INSTALL_COMMON_DYNAMIC_COMP_CONFIG
/*
* macros for declaring the function pointers which will be used by
* the dynamic component code. Each is of the form
* DYNCFG_FUNCPTR<n_args>(<function_name>,<return_type>,<argtype>,<argtype>...)
*
* Variants for declaring it to be global, static to file, or extern.
* Current code which references a function which may be in a component which
* may not be loaded, must be changed to call the function via a pointer
* dereference, the pointer having been declared via one of these macros.
*
* These macros evaluate to nothing if INSTALL_COMMON_DYNAMIC_COMP_CONFIG
* is turned off.
*/
#define DYNCFG_FUNCPTR0(X,rval) \
rval (*DYN_PTR_##X) ();
#define DYNCFG_STATIC_FUNCPTR0(X,rval) \
static rval (*DYN_PTR_##X) ();
#define DYNCFG_EXTERN_FUNCPTR0(X,rval) \
extern rval (*DYN_PTR_##X) ();
#define DYNCFG_FUNCPTR1(X,rval,a1) \
rval (*DYN_PTR_##X) (a1);
#define DYNCFG_STATIC_FUNCPTR1(X,rval,a1) \
static rval (*DYN_PTR_##X) (a1);
#define DYNCFG_EXTERN_FUNCPTR1(X,rval,a1) \
extern rval (*DYN_PTR_##X) (a1);
#define DYNCFG_FUNCPTR2(X,rval,a1,a2) \
rval (*DYN_PTR_##X) (a1, a2);
#define DYNCFG_STATIC_FUNCPTR2(X,rval,a1,a2) \
static rval (*DYN_PTR_##X) (a1, a2);
#define DYNCFG_EXTERN_FUNCPTR2(X,rval,a1,a2) \
extern rval (*DYN_PTR_##X) (a1, a2);
#define DYNCFG_FUNCPTR3(X,rval,a1,a2,a3) \
rval (*DYN_PTR_##X) (a1, a2, a3);
#define DYNCFG_STATIC_FUNCPTR3(X,rval,a1,a2,a3) \
static rval (*DYN_PTR_##X) (a1, a2, a3);
#define DYNCFG_EXTERN_FUNCPTR3(X,rval,a1,a2,a3) \
extern rval (*DYN_PTR_##X) (a1, a2, a3);
#define DYNCFG_FUNCPTR4(X,rval,a1,a2,a3, a4) \
rval (*DYN_PTR_##X) (a1, a2, a3, a4);
#define DYNCFG_STATIC_FUNCPTR4(X,rval,a1,a2,a3,a4) \
static rval (*DYN_PTR_##X) (a1, a2, a3, a4);
#define DYNCFG_EXTERN_FUNCPTR4(X,rval,a1,a2,a3,a4) \
extern rval (*DYN_PTR_##X) (a1, a2, a3, a4);
#define DYNCFG_FUNCPTR5(X,rval,a1,a2,a3,a4,a5) \
rval (*DYN_PTR_##X) (a1, a2, a3, a4, a5);
#define DYNCFG_STATIC_FUNCPTR5(X,rval,a1,a2,a3,a4,a5) \
static rval (*DYN_PTR_##X) (a1, a2, a3, a4, a5);
#define DYNCFG_EXTERN_FUNCPTR5(X,rval,a1,a2,a3,a4,a5) \
extern rval (*DYN_PTR_##X) (a1, a2, a3, a4, a5);
#define DYNCFG_FUNCPTR6(X,rval,a1,a2,a3,a4,a5,a6) \
rval (*DYN_PTR_##X) (a1, a2, a3, a4, a5, a6);
#define DYNCFG_STATIC_FUNCPTR6(X,rval,a1,a2,a3,a4,a5,a6) \
static rval (*DYN_PTR_##X) (a1, a2, a3, a4, a5, a6);
#define DYNCFG_EXTERN_FUNCPTR6(X,rval,a1,a2,a3,a4,a5,a6) \
extern rval (*DYN_PTR_##X) (a1, a2, a3, a4, a5, a6);
#define DYNCFG_FUNCPTR7(X,rval,a1,a2,a3,a4,a5,a6,a7) \
rval (*DYN_PTR_##X) (a1, a2, a3, a4, a5, a6, a7);
#define DYNCFG_STATIC_FUNCPTR7(X,rval,a1,a2,a3,a4,a5,a6,a7) \
static rval (*DYN_PTR_##X) (a1, a2, a3, a4, a5, a6, a7);
#define DYNCFG_EXTERN_FUNCPTR7(X,rval,a1,a2,a3,a4,a5,a6,a7) \
extern rval (*DYN_PTR_##X) (a1, a2, a3, a4, a5, a6, a7);
#define DYNCFG_FUNCPTR8(X,rval,a1,a2,a3,a4,a5,a6,a7,a8) \
rval (*DYN_PTR_##X) (a1, a2, a3, a4, a5, a6, a7, a8);
#define DYNCFG_STATIC_FUNCPTR8(X,rval,a1,a2,a3,a4,a5,a6,a7,a8) \
static rval (*DYN_PTR_##X) (a1, a2, a3, a4, a5, a6, a7, a8);
#define DYNCFG_EXTERN_FUNCPTR8(X,rval,a1,a2,a3,a4,a5,a6,a7,a8) \
extern rval (*DYN_PTR_##X) (a1, a2, a3, a4, a5, a6, a7, a8);
#define DYNCFG_FUNCPTR9(X,rval,a1,a2,a3,a4,a5,a6,a7,a8,a9) \
rval (*DYN_PTR_##X) (a1, a2, a3, a4, a5, a6, a7, a8, a9);
#define DYNCFG_STATIC_FUNCPTR9(X,rval,a1,a2,a3,a4,a5,a6,a7,a8,a9) \
static rval (*DYN_PTR_##X) (a1, a2, a3, a4, a5, a6, a7, a8, a9);
#define DYNCFG_EXTERN_FUNCPTR9(X,rval,a1,a2,a3,a4,a5,a6,a7,a8,a9) \
extern rval (*DYN_PTR_##X) (a1, a2, a3, a4, a5, a6, a7, a8, a9);
#define DYNCFG_FUNCPTR10(X, rval, a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) \
rval (*DYN_PTR_##X) (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
#define DYNCFG_STATIC_FUNCPTR10(X,rval,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) \
static rval (*DYN_PTR_##X) (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
#define DYNCFG_EXTERN_FUNCPTR10(X,rval,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10) \
extern rval (*DYN_PTR_##X) (a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
/*
* This macro provides the mechanism for calling a function which may be in a
* non-installed component. If INSTALL_COMMON_DYNAMIC_COMP_CONFIG is not
* installed, it evaluates to a normal function call, calling X in the usual
* way.
*/
#define DYNCFG_FUNCALL(X) (*DYN_PTR_##X)
/*
* This macro returns the actual function pointer itself.
*/
#define DYNCFG_FUNCPTR(X) DYN_PTR_##X
/*
* this macro sets a previously declared (by DYNCFG_*_FUNCPTR?()) to its
* most likely default, the name of the function we named it after.
*/
#define DYNCFG_FUNCPTR_SET_DEFAULT(X) DYN_PTR_##X = X
/*
* this macro sets a previously declared (by DYNCFG_*_FUNCPTR?()) to
* something other than the probable default
*/
#define DYNCFG_FUNCPTR_SET(X,Y) DYN_PTR_##X = Y
/*
* these macros are for declaring variable pointers which will be used by
* dynamic component code, which may need to reference a variable which will
* only exist if a specific component is included.
*
* Variants for declaring it to be global, static to file, or extern.
* Current code which references a variable which may be in a component which
* may not be loaded, must be changed to reference the variable via a pointer
* dereference, the pointer having been declared via one of these macros.
*
* These macros evaluate to nothing if INSTALL_COMMON_DYNAMIC_COMP_CONFIG
* is turned off.
*/
#define DYNCFG_VBLPTR(X,type) type *DYNCFG_VPTR_##X;
#define DYNCFG_VBLPTR_STATIC(X,type) static type *DYNCFG_VPTR_##X;
#define DYNCFG_VBLPTR_EXTERN(X,type) extern type *DYNCFG_VPTR_##X;
/*
* This macro provides the mechanism for referring to a variable which may be
* in a non-installed component.
* If INSTALL_COMMON_DYNAMIC_COMP_CONFIG is not
* installed, it evaluates to a normal variable reference.
*/
#define DYNCFG_VREF(X) (*DYNCFG_VPTR_##X)
/*
* these macros are for delimiting blocks of code which are currently delimited
* by #if <install_option> directives. They arrange for the block of code to
* be enclosed by a if (DYNCFG_VBL_label) { } construct. You then compile the
* code for the dynamic component case by turning on both the <install_option>
* and INSTALL_COMMON_DYNAMIC_COMP_CONFIG.
* These macros evaluate to nothing if INSTALL_COMMON_DYNAMIC_COMP_CONFIG is
* turned off.
*
* DYNCFG_IFCFGVBL_END(X) and DYNCFG_IFNOTCFGVBL_END(X) both take an argument
* solely to make the code more readable.
*/
#define DYNCFG_IFCFGVBL_BEGIN(X) if (DYNCFG_VBL_##X) {
#define DYNCFG_IFNOTCFGVBL_BEGIN(X) if (!DYNCFG_VBL_##X) {
#define DYNCFG_IFCFGVBL_ELSE(X) } else {
#define DYNCFG_IFNOTCFGVBL_ELSE(X) } else {
#define DYNCFG_IFCFGVBL_ELSEDEFAULT(X) } else { goto default; }
#define DYNCFG_IFCFGVBL_END(X) }
#define DYNCFG_IFNOTCFGVBL_END(X) }
/*
* These macros provide the mechanism to declare the variables which are
* used in the above code enclusure macros. They evaluate to nothing if
* INSTALL_COMMON_DYNAMIC_COMP_CONFIG is turned off.
*/
#define DYNCFG_VBL_DECLARE_EXTERN(X) extern int DYNCFG_VBL_##X;
#define DYNCFG_VBL_DECLARE_GLOBAL(X) int DYNCFG_VBL_##X;
#define DYNCFG_VBL_DECLARE_STATIC(X) static int DYNCFG_VBL_##X;
/*
* Use this macro to set one of these config variables to some value "val"
*/
#define DYNCFG_VBL_SET(X,val) DYNCFG_VBL_##X = val
/*
* this macro returns the actual variable itself
*/
#define DYNCFG_VBL(X) DYNCFG_VBL_##X
#else
#define DYNCFG_FUNCPTR0(X,rval)
#define DYNCFG_STATIC_FUNCPTR0(X,rval)
#define DYNCFG_EXTERN_FUNCPTR0(X,rval)
#define DYNCFG_FUNCPTR1(X,rval,a1)
#define DYNCFG_STATIC_FUNCPTR1(X,rval,a1)
#define DYNCFG_EXTERN_FUNCPTR1(X,rval,a1)
#define DYNCFG_FUNCPTR2(X,rval,a1,a2)
#define DYNCFG_STATIC_FUNCPTR2(X,rval,a1,a2)
#define DYNCFG_EXTERN_FUNCPTR2(X,rval,a1,a2)
#define DYNCFG_FUNCPTR3(X,rval,a1,a2,a3)
#define DYNCFG_STATIC_FUNCPTR3(X,rval,a1,a2,a3)
#define DYNCFG_EXTERN_FUNCPTR3(X,rval,a1,a2,a3)
#define DYNCFG_FUNCPTR4(X,rval,a1,a2,a3, a4)
#define DYNCFG_STATIC_FUNCPTR4(X,rval,a1,a2,a3, a4)
#define DYNCFG_EXTERN_FUNCPTR4(X,rval,a1,a2,a3, a4)
#define DYNCFG_FUNCPTR5(X,rval,a1,a2,a3, a4, a5)
#define DYNCFG_STATIC_FUNCPTR5(X,rval,a1,a2,a3, a4, a5)
#define DYNCFG_EXTERN_FUNCPTR5(X,rval,a1,a2,a3, a4, a5)
#define DYNCFG_FUNCPTR6(X,rval,a1,a2,a3, a4, a5, a6)
#define DYNCFG_STATIC_FUNCPTR6(X,rval,a1,a2,a3, a4, a5, a6)
#define DYNCFG_EXTERN_FUNCPTR6(X,rval,a1,a2,a3, a4, a5, a6)
#define DYNCFG_FUNCPTR7(X,rval,a1,a2,a3, a4, a5, a6, a7)
#define DYNCFG_STATIC_FUNCPTR7(X,rval,a1,a2,a3, a4, a5, a6, a7)
#define DYNCFG_EXTERN_FUNCPTR7(X,rval,a1,a2,a3, a4, a5, a6, a7)
#define DYNCFG_FUNCPTR8(X,rval,a1,a2,a3, a4, a5, a6, a7, a8)
#define DYNCFG_STATIC_FUNCPTR8(X,rval,a1,a2,a3, a4, a5, a6, a7, a8)
#define DYNCFG_EXTERN_FUNCPTR8(X,rval,a1,a2,a3, a4, a5, a6, a7, a8)
#define DYNCFG_FUNCPTR9(X,rval,a1,a2,a3, a4, a5, a6, a7, a8, a9)
#define DYNCFG_STATIC_FUNCPTR9(X,rval,a1,a2,a3, a4, a5, a6, a7, a8, a9)
#define DYNCFG_EXTERN_FUNCPTR9(X,rval,a1,a2,a3, a4, a5, a6, a7, a8, a9)
#define DYNCFG_FUNCPTR10(X,rval,a1,a2,a3, a4, a5, a6, a7, a8, a9, a10)
#define DYNCFG_STATIC_FUNCPTR10(X,rval,a1,a2,a3, a4, a5, a6, a7, a8, a9, a10)
#define DYNCFG_EXTERN_FUNCPTR10(X,rval,a1,a2,a3, a4, a5, a6, a7, a8, a9, a10)
#define DYNCFG_FUNCALL(X) X
#define DYNCFG_VBLPTR(X,type)
#define DYNCFG_VBLPTR_STATIC(X,type)
#define DYNCFG_VBLPTR_EXTERN(X,type)
#define DYNCFG_VREF(X) X
#define DYNCFG_IFCFGVBL_BEGIN(X)
#define DYNCFG_IFNOTCFGVBL_BEGIN(X)
#define DYNCFG_IFCFGVBL_ELSE(X)
#define DYNCFG_IFNOTCFGVBL_ELSE(X)
#define DYNCFG_IFCFGVBL_ELSEDEFAULT(X)
#define DYNCFG_IFCFGVBL_END(X)
#define DYNCFG_IFNOTCFGVBL_END(X)
#define DYNCFG_VBL_DECLARE_EXTERN(X)
#define DYNCFG_VBL_DECLARE_GLOBAL(X)
#define DYNCFG_VBL_DECLARE_STATIC(X)
#endif
#endif /* COMMON_DYNCFG_H */
/*
* Example of usage: code which looked like:
* #if INSTALL_ENVOY_SNMP_VERSION_3
* case SNMP_VERSION_3:
* Call_Func_In_V3_Component (a, b);
* break;
* #endif
* becomes:
* #if INSTALL_ENVOY_SNMP_VERSION_3
* DYNCFG_IFCFGVBL_BEGIN(snmpv3_component)
* case SNMP_VERSION_3:
* DYN_FUNCALL(Call_Func_In_V3_Component) (a, b);
* break;
* DYNCFG_IFCFGVBL_BEGIN(snmpv3_component)
* #endif
*
* In order for the above to work, earlier in the same file we must have
* declarations for the test variables and function pointers. If
*
* If Call_Function_In_SNMPV3_Component () took 2 args, say, an (SNMP_PKT_T *)
* and an integer, and returns void:
*
* DYNCFG_EXTERN_FUNCPTR2(Call_Func_In_V3_Component,void,SNMP_PKT_T *, int)
* DYNCFG_VBL_DECLARE_EXTERN(snmpv3_component)
*
* Elsewhere in some other module, these must be declared with the non-EXTERN
* form of the macro, and initialized at startup by come component init
* routine.
*/
@@ -0,0 +1,77 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/common/fixed64.h,v 1.3 2003/01/16 18:20:11 josh Exp $ */
/*
* Copyright (C) 1999-2005 Wind River Systems, Inc.
* All rights reserved. Provided under license only.
* Distribution or other use of this software is only
* permitted pursuant to the terms of a license agreement
* from Wind River Systems (and is otherwise prohibited).
* Refer to that license agreement for terms of use.
*/
/****************************************************************************
* Copyright 1999 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* Fixed-point 64-bit math routines, intended primarily for time conversion
* between Attache milliseconds and pSOSystem "ticks". These routines
* are in the common library because they may be useful for other
* applications, but these functions are not a full-fleged 64-bit math
* library.
*/
/*
* $Log: fixed64.h,v $
* Revision 1.3 2003/01/16 18:20:11 josh
* directory structure shifting
*
* Revision 1.2 2001/11/07 00:07:09 meister
* Rework pathnames again
*
* Revision 1.1.1.1 2001/11/05 17:47:18 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:21:27 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:16:36 meister
* Update copyright message
*
* Revision 1.2 2000/03/09 17:15:39 tneale
* Added #idef C++ to declare extern C if needed
*
* Revision 1.1 1999/03/01 20:08:56 sra
* Add fixed-point 64-bit math routines; these are primarily intended for
* converting between Attache and pSOSystem clock values, but the
* functions themselves aren't specific to that.
*
*/
/* [clearcase]
modification history
-------------------
01a,20apr05,job update copyright notices
*/
#ifndef COMMON_FIXED64_H
#define COMMON_FIXED64_H
#ifdef __cplusplus
extern"C" {
#endif
#ifndef EPILOGUE_TYPES_H
#include <wrn/wm/common/types.h>
#endif
extern bits32_t fixed64_mul(bits32_t, bits32_t, bits32_t, bits32_t);
extern void fixed64_div(bits32_t, bits32_t, bits32_t *, bits32_t *);
#ifdef __cplusplus
}
#endif
#endif /* COMMON_FIXED64_H */
@@ -0,0 +1,95 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/common/fldmacro.h,v 1.2 2003/01/16 18:20:12 josh Exp $ */
/*
* Copyright (C) 1999-2005 Wind River Systems, Inc.
* All rights reserved. Provided under license only.
* Distribution or other use of this software is only
* permitted pursuant to the terms of a license agreement
* from Wind River Systems (and is otherwise prohibited).
* Refer to that license agreement for terms of use.
*/
/****************************************************************************
* Copyright 2000-2001 Wind River Systems, Inc.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: fldmacro.h,v $
* Revision 1.2 2003/01/16 18:20:12 josh
* directory structure shifting
*
* Revision 1.1.1.1 2001/11/05 17:47:18 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:21:27 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:16:37 meister
* Update copyright message
*
* Revision 1.2 1998/12/15 05:45:58 sra
* Get new NI interface code working on pSOS/X86.
*
* Revision 1.1 1998/12/09 21:48:44 sra
* Initial revision.
*
*/
/* [clearcase]
modification history
-------------------
01a,20apr05,job update copyright notices
*/
#ifndef COMMON_FLDMACRO_H
#define COMMON_FLDMACRO_H
/*
* Primative macros to get and set bitfields in an array of integers.
* Should work for either signed or unsigned integers, which means that
* these macros have to be very careful about right-shift operations.
*
* Parameters:
*
* _a_: "array" (name of array)
* _i_: "index" (offset into array)
* _w_: "width" (width in bits of the field)
* _p_: "position" (bit offset of field)
* _n_: "new_value" (replacement value, for sets)
*
* Macros:
*
* FLD_MSK() Construct mask _w_ bits wide, left shifted _p_ bits
* FLD_GET() Extract field to right justified value
* FLD_SET() Replace field content with right-justified value
*
* I would have preferred the index-and-mask mechanism we used back
* when all real programmers rode dinosaurs (bareback), because the
* masks are easier to sight-read than this position-and-width values,
* but the mask stuff is just too horrid when coded for the ANSI C
* preprocessor. I miss MIDAS....
*
* These macros are intended primarily for use with IPC mechanisms like
* pSOS message queues. For network packets, see the layout directory.
*/
#define FLD_MAX_WIDTH 32
#define FLD_MSK(_w_, _p_) ((~((~0UL) << (_w_))) << (_p_))
#define FLD_GET(_m_, _i_, _w_, _p_) \
(((_w_) == FLD_MAX_WIDTH) \
? ((_m_)[_i_]) \
: ((((_m_)[_i_]) >> (_p_)) & FLD_MSK(_w_, 0)))
#define FLD_SET(_m_, _i_, _w_, _p_, _n_) \
(((_m_)[_i_]) = (((_w_) == FLD_MAX_WIDTH) \
? (_n_) \
: ((((_m_)[_i_]) & ~FLD_MSK(_w_, _p_)) | \
(((_n_) & FLD_MSK(_w_, 0)) << (_p_)))))
#endif /* COMMON_FLDMACRO_H */
+194
View File
@@ -0,0 +1,194 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/common/glue.h,v 1.3 2003/01/16 18:20:12 josh Exp $ */
/*
* Copyright (C) 1999-2005 Wind River Systems, Inc.
* All rights reserved. Provided under license only.
* Distribution or other use of this software is only
* permitted pursuant to the terms of a license agreement
* from Wind River Systems (and is otherwise prohibited).
* Refer to that license agreement for terms of use.
*/
/****************************************************************************
* Copyright 1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: glue.h,v $
* Revision 1.3 2003/01/16 18:20:12 josh
* directory structure shifting
*
* Revision 1.2 2001/11/07 00:07:09 meister
* Rework pathnames again
*
* Revision 1.1.1.1 2001/11/05 17:47:18 tneale
* Tornado shuffle
*
* Revision 1.11 2001/01/19 22:21:28 paul
* Update copyright.
*
* Revision 1.10 2000/03/17 00:16:37 meister
* Update copyright message
*
* Revision 1.9 2000/03/09 19:09:22 josh
* changes so we don't shoot ourselves in the foot if we're building
* Emissary or Liaison
*
* Revision 1.8 1999/05/21 16:28:06 sra
* Fix snprintf() installation test.
*
* Revision 1.7 1999/05/20 22:14:50 wes
* If we're using the common snprintf, include its declaration here
*
* Revision 1.6 1999/05/20 21:05:54 sra
* Add SNPRINTF and VSNPRINTF.
*
* Revision 1.5 1998/07/03 20:19:22 sra
* Add etc_memcmp().
*
* Revision 1.4 1998/06/05 17:14:11 meister
* STRNICMP takes 3 args, not two.
*
* Revision 1.3 1998/06/03 20:10:33 sar
* Added some common string functions. stdf.h has the externs for them
* while glue.h will use them if the user installs them and doesn't
* specify other functions to use.
*
* Revision 1.2 1998/02/25 04:43:25 sra
* Update copyrights.
*
* Revision 1.1 1997/08/21 17:23:43 sra
* Begin moving configuration stuff that's common to all products to common.h
* Minor cleanups to common/lib/prng.c. Add pnrg seed function to snarkbsd.
*
*/
/* [clearcase]
modification history
-------------------
01a,20apr05,job update copyright notices
*/
#ifndef COMMON_GLUE_H
#define COMMON_GLUE_H
/*
* Load the postamble portion of the customer's common.h file.
*/
#include <common.h>
#include <wrn/wm/common/stdf.h>
#if INSTALL_COMMON_SNPRINTF
#include <wrn/wm/common/snprintf.h>
#endif
/*
* Default definitions for macros that stand in for ANSI functions.
* These may need to be fine-tuned after we've run some compilation tests.
*/
#ifndef MEMCHR
#define MEMCHR(x,y,z) memchr(x,y,z)
#endif
#ifndef MEMCMP
#if INSTALL_COMMON_MEMCMP
#define MEMCMP(x,y,z) etc_memcmp(x,y,z)
#else
#define MEMCMP(x,y,z) memcmp(x,y,z)
#endif
#endif
#ifndef MEMCPY
#define MEMCPY(x,y,z) memcpy(x,y,z)
#endif
#ifndef MEMSET
#define MEMSET(x,y,z) memset(x,y,z)
#endif
#ifndef STRCMP
#define STRCMP(x,y) strcmp(x,y)
#endif
#ifndef STRCPY
#define STRCPY(x,y) strcpy(x,y)
#endif
#ifndef STRLEN
#define STRLEN(x) strlen(x)
#endif
#ifndef STRNCMP
#define STRNCMP(x,y,z) strncmp(x,y,z)
#endif
#ifndef STRTOL
#if (INSTALL_COMMON_STRTOL)
#define STRTOL(S, E, R) etc_strtol(S, E, R)
#else
#define STRTOL(S, E, R) strtol(S, E, R)
#endif
#endif
#ifndef STRTOUL
#if (INSTALL_COMMON_STRTOUL)
#define STRTOUL(S, E, R) etc_strtoul(S, E, R)
#else
#define STRTOUL(S, E, R) strtoul(S, E, R)
#endif
#endif
/*
* These two aren't ANSI functions, but their ANSI equivilents have a
* serious design flaw: there's no way to specify the length of the
* output buffer, so careless use of the ANSI function can ruin your
* whole day. Get a clue, ANSI.
*
* We provide implementations of these in the common library.
*/
#ifndef SNPRINTF
#if INSTALL_COMMON_SNPRINTF
#define SNPRINTF etc_snprintf
#else
#define SNPRINTF snprintf
#endif
#endif
#ifndef VSNPRINTF
#if INSTALL_COMMON_SNPRINTF
#define VSNPRINTF etc_vsnprintf
#else
#define VSNPRINTF vsnprintf
#endif
#endif
/*
* These two aren't ANSI functions, but most systems have equivilents.
* They're case-insensitive versions of the corresponding ANSI functions.
* We provide implementations of these in the common library. */
#ifndef STRICMP
#if (INSTALL_COMMON_STRICMP)
#define STRICMP(x, y) etc_stricmp(x, y)
#else
#define STRICMP(x, y) strcasecmp(x, y)
#endif
#endif
#ifndef STRNICMP
#if (INSTALL_COMMON_STRNICMP)
#define STRNICMP(x, y, z) etc_strnicmp(x, y, z)
#else
#define STRNICMP(x, y, z) strncasecmp(x, y, z)
#endif
#endif
#endif /* COMMON_GLUE_H */
+109
View File
@@ -0,0 +1,109 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/common/hmac.h,v 1.3 2003/01/16 18:20:12 josh Exp $ */
/*
* Copyright (C) 1999-2005 Wind River Systems, Inc.
* All rights reserved. Provided under license only.
* Distribution or other use of this software is only
* permitted pursuant to the terms of a license agreement
* from Wind River Systems (and is otherwise prohibited).
* Refer to that license agreement for terms of use.
*/
/****************************************************************************
* Copyright 1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: hmac.h,v $
* Revision 1.3 2003/01/16 18:20:12 josh
* directory structure shifting
*
* Revision 1.2 2001/11/07 00:07:10 meister
* Rework pathnames again
*
* Revision 1.1.1.1 2001/11/05 17:47:18 tneale
* Tornado shuffle
*
* Revision 1.5 2001/01/19 22:21:28 paul
* Update copyright.
*
* Revision 1.4 2000/03/17 00:16:37 meister
* Update copyright message
*
* Revision 1.3 2000/03/09 17:15:39 tneale
* Added #idef C++ to declare extern C if needed
*
* Revision 1.2 1998/06/18 04:11:24 sar
* clean up some type info, make the lengths be bits32_t
*
* Revision 1.1 1998/05/22 17:59:58 sar
* Adding include files for hmac and sha
*
*/
/* [clearcase]
modification history
-------------------
01a,20apr05,job update copyright notices
*/
#ifndef HMAC_H
#define HMAC_H 1
#ifdef __cplusplus
extern"C" {
#endif
/* get the installation options */
#ifndef EPILOGUE_INSTALL_H
#include <wrn/wm/common/install.h>
#endif /* EPILOGUE_INSTALL_H */
/* get the Epilogue types */
#ifndef EPILOGUE_TYPES_H
#include <wrn/wm/common/types.h>
#endif /* EPILOGUE_TYPES_H */
/* Data structure for HMAC computation */
#define HMAC_STATESIZ_MAX 128
#define HMAC_HASHSIZ_MAX 24 /* keep them 64-bit aligned */
typedef void (*hashfcn_init_t)(void *state);
typedef void (*hashfcn_update_t)(void *state, bits8_t *data, bits32_t datalen);
typedef void (*hashfcn_final_t)(void *state, bits8_t *output);
typedef struct {
bits8_t hmac_state [HMAC_STATESIZ_MAX];
bits8_t hmac_tmp [HMAC_HASHSIZ_MAX];
hashfcn_init_t hmac_hashinit;
hashfcn_update_t hmac_hashupdate;
hashfcn_final_t hmac_hashfinal;
bits32_t hmac_hashlen;
} HMAC_CTX;
/* Initialize an HMAC context. Needs the three hash function interface calls,
the size of the output hash, and the size of the state block needed by the
underlying hash function. */
void InitHmacCTX __((HMAC_CTX *ctx,
hashfcn_init_t init,
hashfcn_update_t update,
hashfcn_final_t final,
bits32_t hashsiz));
void hmac_init __((HMAC_CTX *ctx, bits8_t *key, bits32_t keylen));
void hmac_update __((HMAC_CTX *ctx, bits8_t *data, bits32_t datalen));
void hmac_final __((HMAC_CTX *ctx, bits8_t *key, bits32_t keylen,
bits8_t *output));
#ifdef __cplusplus
}
#endif
#endif /* HMAC_H */
@@ -0,0 +1,83 @@
/*****************************************************************
*
* This file automatically generated - DO NOT EDIT!
*
*****************************************************************/
#ifndef EPILOGUE_INSTALL_H
#define EPILOGUE_INSTALL_H
#define INSTALL_ON_LITTLE_ENDIAN 0
#define INSTALL_ON_BIG_ENDIAN 0
#define INSTALL_OEM_LAYOUT_GLUE_MACROS 0
#define INSTALL_TYPECHECKING_LAYOUT_GLUE_MACROS 0
#define INSTALL_UNALIGNED_BIGENDIAN_LAYOUT_GLUE_MACROS 0
#define INSTALL_COMMON 1
#define INSTALL_COMMON_FIXED64 1
#define INSTALL_COMMON_PRNG 0
#define INSTALL_COMMON_MD4 0
#define INSTALL_COMMON_MD5 1
#define INSTALL_COMMON_SHA 1
#define INSTALL_COMMON_HMAC 1
#define INSTALL_COMMON_DES 1
#define INSTALL_COMMON_3DES 0
#define INSTALL_COMMON_ESP_3DES 0
#define INSTALL_COMMON_DES_TEST 0
#define INSTALL_COMMON_DES_FAKE 0
#define INSTALL_COMMON_STRTOL 0
#define INSTALL_COMMON_STRTOUL 0
#define INSTALL_COMMON_STRICMP 0
#define INSTALL_COMMON_STRNICMP 0
#define INSTALL_COMMON_MEMCMP 0
#define INSTALL_COMMON_SNPRINTF 0
#define INSTALL_COMMON_DYNAMIC_COMP_CONFIG 1
#define INSTALL_ENVOY 1
#define INSTALL_ENVOY_SNMP_GROUP_V1 1
#define INSTALL_ENVOY_SNMP_GROUP_V2 1
#define INSTALL_ENVOY_SNMP_VERSION_1 1
#define INSTALL_ENVOY_SNMP_VERSION_2 1
#define INSTALL_ENVOY_SNMP_VERSION_3 1
#define INSTALL_ENVOY_USE_MIBCOMPILER 1
#define INSTALL_ENVOY_MAIN_AGENT 1
#define INSTALL_ENVOY_SNMP_UTIL_MACROS 0
#define INSTALL_ENVOY_MD5 1
#define INSTALL_ENVOY_SHA 1
#define INSTALL_ENVOY_DES 1
#define INSTALL_ENVOY_AESCFB128 1
#define INSTALL_ENVOY_SNMP_RFC1445_VIEWS 0
#define INSTALL_ENVOY_SNMP_RFC2275_VIEWS 1
#define INSTALL_ENVOY_TWO_CHAR_MACROS 0
#define INSTALL_ENVOY_SNMP_V3_TARGET 1
#define INSTALL_ENVOY_SNMP_V3_NOTIFY 1
#define INSTALL_ENVOY_SNMP_V3_PROXY 1
#define INSTALL_ENVOY_SNMP_COEXISTENCE 1
#define INSTALL_SNMP_V3_DIFFIE_HELLMAN 0
#define INSTALL_ENVOY_SNMP_PROXY 0
#define INSTALL_ENVOY_AGENTX 1
#define INSTALL_ENVOY_AGENTX_MASTER 1
#define INSTALL_ENVOY_AGENTX_SUB 1
#define INSTALL_ENVOY_AGENTX_INDEX 1
#define INSTALL_ENVOY_AGENTX_NEXT_CHECK 1
#define INSTALL_ENVOY_AGENTX_2257_RANGE 0
#define INSTALL_ENVOY_ENTITY_MIB 0
#define INSTALL_ENVOY_SNMP_LOCK 1
#define INSTALL_ENVOY_LOCK_INDEPENDENT 0
#define INSTALL_ENVOY_CONTINUE_REENTRANT 1
#define INSTALL_ENVOY_SNMP_SERIALIZE 0
#define INSTALL_SNMP_VXWORKS_VIRTUAL_STACK 0
#define INSTALL_SNMP_VXWORKS_VS_ENTITY 0
#define INSTALL_SNMP_VXWORKS_MESSAGE_CHANNELS 0
#define INSTALL_ENVOY_HEAP_LARGE_VARS 0
#define INSTALL_ENVOY_SNMP_USE_V2_TYPES 1
#define INSTALL_ENVOY_PSOS 0
#define INSTALL_ENVOY_PSOS_CONFIG 0
#define INSTALL_INETV6 0
#define INSTALL_INETV4 1
#define INSTALL_ENVOY_TEST 0
#define INSTALL_ATTACHE 0
#define INSTALL_ATTACHE_MIB 0
#define INSTALL_ENVOY_VXWORKS_RFC2233 1
#define INSTALL_ENVOY_VXWORKS 1
#define INSTALL_SNARK_LIB 0
#endif /* EPILOGUE_INSTALL_H */
+99
View File
@@ -0,0 +1,99 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/common/md4.h,v 1.3 2003/01/16 18:20:12 josh Exp $ */
/*
* Copyright (C) 1999-2005 Wind River Systems, Inc.
* All rights reserved. Provided under license only.
* Distribution or other use of this software is only
* permitted pursuant to the terms of a license agreement
* from Wind River Systems (and is otherwise prohibited).
* Refer to that license agreement for terms of use.
*/
/****************************************************************************
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: md4.h,v $
* Revision 1.3 2003/01/16 18:20:12 josh
* directory structure shifting
*
* Revision 1.2 2001/11/07 00:07:10 meister
* Rework pathnames again
*
* Revision 1.1.1.1 2001/11/05 17:47:18 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:21:28 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:16:38 meister
* Update copyright message
*
* Revision 1.2 2000/03/09 17:15:40 tneale
* Added #idef C++ to declare extern C if needed
*
* Revision 1.1 1999/08/11 21:16:57 bala
* MD4 functions
*
*/
/* [clearcase]
modification history
-------------------
01a,20apr05,job update copyright notices
*/
/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
rights reserved.
License to copy and use this software is granted provided that it
is identified as the "RSA Data Security, Inc. MD4 Message-Digest
Algorithm" in all material mentioning or referencing this software
or this function.
License is also granted to make and use derivative works provided
that such works are identified as "derived from the RSA Data
Security, Inc. MD4 Message-Digest Algorithm" in all material
mentioning or referencing the derived work.
RSA Data Security, Inc. makes no representations concerning either
the merchantability of this software or the suitability of this
software for any particular purpose. It is provided "as is"
without express or implied warranty of any kind.
These notices must be retained in any copies of any part of this
documentation and/or software.
*/
#ifndef __MD4_INCLUDE__
#define __MD4_INCLUDE__
#ifdef __cplusplus
extern"C" {
#endif
/* get the Epilogue types */
#ifndef EPILOGUE_TYPES_H
#include <wrn/wm/common/types.h>
#endif /* EPILOGUE_TYPES_H */
/* MD4 context. */
typedef struct {
bits32_t state[4]; /* state (ABCD) */
bits32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */
bits8_t buffer[64]; /* input buffer */
} MD4_CTX;
void MD4Init __((MD4_CTX *));
void MD4Update __((MD4_CTX *, bits8_t *, bits32_t));
void MD4Final __((bits8_t *, MD4_CTX *));
#ifdef __cplusplus
}
#endif
#endif /* __MD4_INCLUDE__ */
+131
View File
@@ -0,0 +1,131 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/common/md5.h,v 1.3 2003/01/16 18:20:13 josh Exp $ */
/*
* Copyright (C) 1999-2005,2007 Wind River Systems, Inc.
* All rights reserved. Provided under license only.
* Distribution or other use of this software is only
* permitted pursuant to the terms of a license agreement
* from Wind River Systems (and is otherwise prohibited).
* Refer to that license agreement for terms of use.
*/
/****************************************************************************
* Copyright 1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: md5.h,v $
* Revision 1.3 2003/01/16 18:20:13 josh
* directory structure shifting
*
* Revision 1.2 2001/11/07 00:07:10 meister
* Rework pathnames again
*
* Revision 1.1.1.1 2001/11/05 17:47:18 tneale
* Tornado shuffle
*
* Revision 1.8 2001/01/19 22:21:28 paul
* Update copyright.
*
* Revision 1.7 2000/03/17 00:16:38 meister
* Update copyright message
*
* Revision 1.6 2000/03/09 17:15:40 tneale
* Added #idef C++ to declare extern C if needed
*
* Revision 1.5 1998/02/25 04:43:26 sra
* Update copyrights.
*
* Revision 1.4 1998/02/05 22:37:35 josh
* Changing references to types.h so we include common/h/types.h instead
*
* Revision 1.3 1997/10/30 16:44:29 sra
* Fix copyright date.
*
* Revision 1.2 1997/08/14 16:04:38 lowell
* boilerplate
*
*/
/* [clearcase]
modification history
-------------------
01b,31aug07,jbl fix symbol conflicts
01a,20apr05,job update copyright notices
*/
/*
***********************************************************************
** md5.h -- header file for implementation of MD5 **
** RSA Data Security, Inc. MD5 Message-Digest Algorithm **
** Created: 2/17/90 RLR **
** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version **
** Revised (for MD5): RLR 4/27/91 **
** -- G modified to have y&~z instead of y&z **
** -- FF, GG, HH modified to add in last register done **
** -- Access pattern: round 2 works mod 5, round 3 works mod 3 **
** -- distinct additive constant for each step **
** -- round 4 added, working mod 7 **
***********************************************************************
*/
/*
***********************************************************************
** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
** **
** License to copy and use this software is granted provided that **
** it is identified as the "RSA Data Security, Inc. MD5 Message- **
** Digest Algorithm" in all material mentioning or referencing this **
** software or this function. **
** **
** License is also granted to make and use derivative works **
** provided that such works are identified as "derived from the RSA **
** Data Security, Inc. MD5 Message-Digest Algorithm" in all **
** material mentioning or referencing the derived work. **
** **
** RSA Data Security, Inc. makes no representations concerning **
** either the merchantability of this software or the suitability **
** of this software for any particular purpose. It is provided "as **
** is" without express or implied warranty of any kind. **
** **
** These notices must be retained in any copies of any part of this **
** documentation and/or software. **
***********************************************************************
*/
#ifndef __MD5_INCLUDE__
#ifdef __cplusplus
extern"C" {
#endif
/* get the Epilogue types */
#ifndef EPILOGUE_TYPES_H
#include <wrn/wm/common/types.h>
#endif /* EPILOGUE_TYPES_H */
/* Data structure for MD5 (Message-Digest) computation */
typedef struct {
bits32_t i[2]; /* number of _bits_ handled mod 2^64 */
bits32_t buf[4]; /* scratch buffer */
bits8_t in[64]; /* input buffer */
bits8_t digest[16]; /* actual digest after MD5Final call */
} MD5_CTX;
void WrsnmpCommonMD5Init __((MD5_CTX *));
void WrsnmpCommonMD5Update __((MD5_CTX *, bits8_t *, bits32_t));
void WrsnmpCommonMD5Final __((MD5_CTX *));
#define MD5Init WrsnmpCommonMD5Init
#define MD5Update WrsnmpCommonMD5Update
#define MD5Final WrsnmpCommonMD5Final
#ifdef __cplusplus
}
#endif
#define __MD5_INCLUDE__
#endif /* __MD5_INCLUDE__ */
+80
View File
@@ -0,0 +1,80 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/common/prng.h,v 1.3 2003/01/16 18:20:13 josh Exp $ */
/*
* Copyright (C) 1999-2005 Wind River Systems, Inc.
* All rights reserved. Provided under license only.
* Distribution or other use of this software is only
* permitted pursuant to the terms of a license agreement
* from Wind River Systems (and is otherwise prohibited).
* Refer to that license agreement for terms of use.
*/
/****************************************************************************
* Copyright 1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: prng.h,v $
* Revision 1.3 2003/01/16 18:20:13 josh
* directory structure shifting
*
* Revision 1.2 2001/11/07 00:07:10 meister
* Rework pathnames again
*
* Revision 1.1.1.1 2001/11/05 17:47:18 tneale
* Tornado shuffle
*
* Revision 1.9 2001/01/19 22:21:28 paul
* Update copyright.
*
* Revision 1.8 2000/03/17 00:16:39 meister
* Update copyright message
*
* Revision 1.7 2000/03/09 17:15:41 tneale
* Added #idef C++ to declare extern C if needed
*
* Revision 1.6 1998/02/25 04:43:26 sra
* Update copyrights.
*
* Revision 1.5 1998/02/05 22:37:35 josh
* Changing references to types.h so we include common/h/types.h instead
*
* Revision 1.4 1997/10/30 16:44:29 sra
* Fix copyright date.
*
* Revision 1.3 1997/08/14 16:04:38 lowell
* boilerplate
*
*/
/* [clearcase]
modification history
-------------------
01a,20apr05,job update copyright notices
*/
#ifndef COMMON_PRNG_H
#define COMMON_PRNG_H
#ifdef __cplusplus
extern"C" {
#endif
#ifndef EPILOGUE_TYPES_H
#include <wrn/wm/common/types.h>
#endif /* EPILOGUE_TYPES_H */
void prng_get_seed(bits8_t **buffer, int * bufsize);
void prng_random(bits8_t *buffer, int length);
void prng_inject_random8(bits8_t newdata );
bits8_t prng_random8(void );
void prng_init(void );
#ifdef __cplusplus
}
#endif
#endif /* COMMON_PRNG_H */
+97
View File
@@ -0,0 +1,97 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/common/sha.h,v 1.3 2003/01/16 18:20:13 josh Exp $ */
/*
* Copyright (C) 1999-2005 Wind River Systems, Inc.
* All rights reserved. Provided under license only.
* Distribution or other use of this software is only
* permitted pursuant to the terms of a license agreement
* from Wind River Systems (and is otherwise prohibited).
* Refer to that license agreement for terms of use.
*/
/****************************************************************************
* Copyright 2000-2001 Wind River Systems, Inc.
* Copyright 1998 Integrated Systems Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: sha.h,v $
* Revision 1.3 2003/01/16 18:20:13 josh
* directory structure shifting
*
* Revision 1.2 2001/11/07 00:07:11 meister
* Rework pathnames again
*
* Revision 1.1.1.1 2001/11/05 17:47:18 tneale
* Tornado shuffle
*
* Revision 1.5 2001/01/19 22:21:29 paul
* Update copyright.
*
* Revision 1.4 2000/03/17 00:16:40 meister
* Update copyright message
*
* Revision 1.3 2000/03/09 17:15:41 tneale
* Added #idef C++ to declare extern C if needed
*
* Revision 1.2 1998/06/16 05:12:27 sar
* Clean up some type questions
*
* Revision 1.1 1998/05/22 17:59:58 sar
* Adding include files for hamc and sha
*
*/
/* [clearcase]
modification history
-------------------
01a,20apr05,job update copyright notices
*/
/* NIST Secure Hash Algorithm */
/* heavily modified by Uwe Hollerbach <uh@alumni.caltech edu> */
/* from Peter C. Gutmann's implementation as found in */
/* Applied Cryptography by Bruce Schneier */
/* This code is in the public domain */
#ifndef EPILOGUE_SHA_H
#define EPILOGUE_SHA_H
#ifdef __cplusplus
extern"C" {
#endif
/* get the installation options */
#ifndef EPILOGUE_INSTALL_H
#include <wrn/wm/common/install.h>
#endif /* EPILOGUE_INSTALL_H */
/* get the Epilogue types */
#ifndef EPILOGUE_TYPES_H
#include <wrn/wm/common/types.h>
#endif /* EPILOGUE_TYPES_H */
#define SHA_BLOCKSIZE 64
#define SHA_DIGESTSIZE 20
typedef struct {
bits32_t count_lo, count_hi; /* 64-bit bit count */
bits32_t buf[5]; /* scratch buffer */
bits8_t data[SHA_BLOCKSIZE]; /* SHA data (input) buffer */
bits8_t digest[20]; /* message digest after sha_final call */
size_t local; /* unprocessed amount in data */
} SHA_CTX;
void sha_init __((SHA_CTX *));
void sha_update __((SHA_CTX *, bits8_t *, bits32_t));
void sha_final __((SHA_CTX *));
#ifdef __cplusplus
}
#endif
#endif /* EPILOGUE_SHA_H */
@@ -0,0 +1,77 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/common/snprintf.h,v 1.3 2003/01/16 18:20:13 josh Exp $ */
/*
* Copyright (C) 1999-2005 Wind River Systems, Inc.
* All rights reserved. Provided under license only.
* Distribution or other use of this software is only
* permitted pursuant to the terms of a license agreement
* from Wind River Systems (and is otherwise prohibited).
* Refer to that license agreement for terms of use.
*/
/****************************************************************************
* Copyright 1988-1997 Epilogue Technology Corporation.
* Copyright 1999 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: snprintf.h,v $
* Revision 1.3 2003/01/16 18:20:13 josh
* directory structure shifting
*
* Revision 1.2 2001/11/07 00:07:11 meister
* Rework pathnames again
*
* Revision 1.1.1.1 2001/11/05 17:47:18 tneale
* Tornado shuffle
*
* Revision 1.5 2001/01/19 22:21:29 paul
* Update copyright.
*
* Revision 1.4 2000/03/17 00:16:40 meister
* Update copyright message
*
* Revision 1.3 2000/03/09 17:15:42 tneale
* Added #idef C++ to declare extern C if needed
*
* Revision 1.2 1999/05/21 14:46:33 sra
* Include <stdarg.h>.
*
* Revision 1.1 1999/05/20 20:28:14 sra
* Add etc_snprintf() and etc_vsnprintf().
*
*/
/* [clearcase]
modification history
-------------------
01a,20apr05,job update copyright notices
*/
#ifndef COMMON_SNPRINTF_H
#ifndef EPILOGUE_TYPES_H
#ifdef __cplusplus
extern"C" {
#endif
#include <wrn/wm/common/types.h>
#endif
/*
* If va_arg exists, it's a macro (can't be a function).
*/
#ifndef va_arg
#include <stdarg.h>
#endif
int etc_snprintf (char *str, size_t count, const char *fmt, ...);
int etc_vsnprintf (char *str, size_t count, const char *fmt, va_list arg);
#ifdef __cplusplus
}
#endif
#endif /* COMMON_SNPRINTF_H */
+87
View File
@@ -0,0 +1,87 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/common/stdf.h,v 1.3 2003/01/16 18:20:13 josh Exp $ */
/*
* Copyright (C) 1999-2005 Wind River Systems, Inc.
* All rights reserved. Provided under license only.
* Distribution or other use of this software is only
* permitted pursuant to the terms of a license agreement
* from Wind River Systems (and is otherwise prohibited).
* Refer to that license agreement for terms of use.
*/
/****************************************************************************
* Copyright 2000-2001 Wind River Systems, Inc.
* Copyright 1993-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: stdf.h,v $
* Revision 1.3 2003/01/16 18:20:13 josh
* directory structure shifting
*
* Revision 1.2 2001/11/07 00:13:33 meister
* rework pathnames
*
* Revision 1.1.1.1 2001/11/05 17:47:18 tneale
* Tornado shuffle
*
* Revision 1.7 2001/02/09 20:13:33 paul
* Added our own version of strncpy(), just in case the user doesn't have one.
*
* Revision 1.6 2001/01/19 22:21:29 paul
* Update copyright.
*
* Revision 1.5 2000/03/17 00:16:41 meister
* Update copyright message
*
* Revision 1.4 2000/03/09 17:15:42 tneale
* Added #idef C++ to declare extern C if needed
*
* Revision 1.3 1999/04/09 20:33:47 wes
* re-constify. let's see what, if anything, blows up
*
* Revision 1.2 1998/07/03 20:19:20 sra
* Add etc_memcmp().
*
* Revision 1.1 1998/06/03 20:10:34 sar
* Added some common string functions. stdf.h has the externs for them
* while glue.h will use them if the user installs them and doesn't
* specify other functions to use.
*
*/
/* [clearcase]
modification history
-------------------
01a,20apr05,job update copyright notices
*/
#ifndef COMMON_STDF_H
#define COMMON_STDF_H
#ifdef __cplusplus
extern"C" {
#endif
/* pick up size_t (via oemtypes.h and sttdef.h) */
#ifndef EPILOGUE_TYPES_H
#include <wrn/wm/common/types.h>
#endif
long etc_strtol (char *string, char **endptr, int radix);
unsigned long etc_strtoul (char *string, char **endptr, int radix);
int etc_stricmp (const char *s, const char *t);
int etc_strnicmp (const char *s, const char *t, size_t len);
int etc_memcmp (const void *x, const void *y, size_t len);
char * etc_strncpy (char *dst, const char *src, size_t n);
#ifdef __cplusplus
}
#endif
#endif /* COMMON_STDF_H */
+258
View File
@@ -0,0 +1,258 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/common/thread.h,v 1.2 2003/01/16 18:20:14 josh Exp $ */
/*
* Copyright (C) 1999-2005 Wind River Systems, Inc.
* All rights reserved. Provided under license only.
* Distribution or other use of this software is only
* permitted pursuant to the terms of a license agreement
* from Wind River Systems (and is otherwise prohibited).
* Refer to that license agreement for terms of use.
*/
/****************************************************************************
* Copyright 2000-2001 Wind River Systems, Inc.
* Copyright 1998-1999 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: thread.h,v $
* Revision 1.2 2003/01/16 18:20:14 josh
* directory structure shifting
*
* Revision 1.1.1.1 2001/11/05 17:47:18 tneale
* Tornado shuffle
*
* Revision 1.13 2001/06/12 08:06:07 paul
* Mutex priorities are unsigned.
* Added debugging to condition variable routines.
*
* Revision 1.12 2001/03/22 20:29:38 paul
* The diab compiler is pickier than gcc.
*
* Revision 1.11 2001/03/22 16:54:08 paul
* Mutex and condition variable functions now return errors.
*
* Revision 1.10 2001/03/20 17:11:14 paul
* Removed unused timeout macros.
*
* Revision 1.9 2001/01/19 22:21:29 paul
* Update copyright.
*
* Revision 1.8 2000/10/16 19:21:43 paul
* Restore sockets and mempool code.
*
* Revision 1.6 2000/03/17 00:16:41 meister
* Update copyright message
*
* Revision 1.5 2000/03/09 17:15:43 tneale
* Added #idef C++ to declare extern C if needed
*
* Revision 1.4 1999/12/20 23:21:33 qli
* added ETC_GET_SEL_CONDVAR and ETC_REL_SEL_CONDVAR
*
* Revision 1.3 1999/04/28 23:53:24 sra
* Clean up various minor installation option glitches.
*
* Revision 1.2 1999/02/18 04:41:22 wes
* Sockets merge: Everything Else
* - memory pools
* - thread support
* - port-specific headers
*
* Revision 1.1.6.12 1999/01/25 21:08:01 paul
* added the first half of the copyright notice (oops)
*
* Revision 1.1.6.11 1999/01/22 19:48:50 paul
* Added this_thread(), copyright notice.
*
*/
/* [clearcase]
modification history
-------------------
01a,20apr05,job update copyright notices
*/
#ifndef COMMON_THREAD_H
#define COMMON_THREAD_H
#ifdef __cplusplus
extern"C" {
#endif
#include <thdport.h>
#define ETC_MUTEX_PRIO_MIN GLUE_MUTEX_PRIO_MIN
#define ETC_MUTEX_PRIO_LOW GLUE_MUTEX_PRIO_LOW
#define ETC_MUTEX_PRIO_MID GLUE_MUTEX_PRIO_MID
#define ETC_MUTEX_PRIO_HIGH GLUE_MUTEX_PRIO_HIGH
#define ETC_MUTEX_PRIO_MAX GLUE_MUTEX_PRIO_MAX
#if defined(INSTALL_THREAD_DEBUG) && INSTALL_THREAD_DEBUG
/*
* See the non-debug side of this #ifdef of this for documentation on
* what the various functions do.
*/
/*
* other things to consider..
* mutex names. __FILE__, __LINE__; last-lock/last-unlock info
* thread names, cond names.
* yield before/after lock/unlock, signal, cond wait,
* per thread storage for current lock prio, chain of held locks..
* How the heck do we deal with META_LOCK/UNLOCK() after cond_wait?
* (release user lock, take meta_lock, retake user lock?)
*/
typedef struct etc_mutex_t
{
int magic;
glue_mutex_t m;
char *lock_name;
void *lock_owner;
unsigned lock_prio;
struct etc_mutex_t *next_lock;
char *last_lock_file;
int last_lock_line;
char *last_unlock_file;
int last_unlock_line;
} etc_mutex_t;
typedef struct
{
glue_cond_t c;
etc_mutex_t *m;
} etc_cond_t;
extern glue_mutex_t etc_meta_mutex;
int etc_mutex_init(etc_mutex_t *lock, unsigned prio, char *name);
int etc_mutex_lock(etc_mutex_t *lock, unsigned prio, char *file, int line);
int etc_mutex_unlock(etc_mutex_t *lock, unsigned prio, char *file, int line);
void etc_mutex_lock_assert (etc_mutex_t *lock, unsigned prio, char *file, int line);
int etc_mutex_destroy (etc_mutex_t *lock, char *file, int line);
int etc_cond_init(etc_cond_t *cond, etc_mutex_t *mutex, char *file, int line);
int etc_cond_wait(etc_cond_t *cond, etc_mutex_t *mutex, char *file, int line);
int etc_cond_wakeup(etc_cond_t *cond, etc_mutex_t *mutex, char *file, int line);
int etc_cond_broadcast(etc_cond_t *cond, etc_mutex_t *mutex, char *file, int line);
int etc_cond_destroy(etc_cond_t *cond, char *file, int line);
#define ETC_LOCK_MAGIC 0x19661008
#define ETC_META_LOCK() \
GLUE_MUTEX_LOCK(&etc_meta_mutex, GLUE_MUTEX_PRIO_MIN);
#define ETC_META_UNLOCK() \
GLUE_MUTEX_UNLOCK(&etc_meta_mutex, GLUE_MUTEX_PRIO_MIN);
#define ETC_MUTEX_INIT(lock, prio, name) \
etc_mutex_init(lock, prio, name)
#define ETC_MUTEX_LOCK(lock, prio) \
etc_mutex_lock(lock, prio, __FILE__, __LINE__)
#define ETC_MUTEX_UNLOCK(lock, prio) \
etc_mutex_unlock(lock, prio, __FILE__, __LINE__)
#define ETC_MUTEX_LOCK_ASSERT(lock, prio) \
etc_mutex_lock_assert(lock, prio, __FILE__, __LINE__)
#define ETC_MUTEX_DESTROY(lock) \
etc_mutex_destroy(lock, __FILE__, __LINE__)
#define ETC_COND_INIT(cond, mutex) \
etc_cond_init(cond, mutex, __FILE__, __LINE__)
#define ETC_COND_WAIT(cond, mutex) \
etc_cond_wait(cond, mutex, __FILE__, __LINE__)
#define ETC_COND_WAKEUP(cond, mutex) \
etc_cond_wakeup(cond, mutex, __FILE__, __LINE__)
#define ETC_COND_BROADCAST(cond, mutex) \
etc_cond_broadcast(cond, mutex, __FILE__, __LINE__)
#define ETC_COND_DESTROY(cond) \
etc_cond_destroy(cond, __FILE__, __LINE__)
/* Initialize thread system (if necessary) */
extern void common_thread_init(void);
#define ETC_THREAD_INIT() common_thread_init()
void *this_thread(void);
#else /* INSTALL_THREAD_DEBUG */
/* Initialize thread system (if necessary) */
#define ETC_THREAD_INIT() GLUE_THREAD_INIT()
/*
* Mutex locks.
*/
typedef glue_mutex_t etc_mutex_t;
/* Initialize mutex */
#define ETC_MUTEX_INIT(lock, prio, name) GLUE_MUTEX_INIT(lock, prio)
/* Lock, unlock mutex */
#define ETC_MUTEX_LOCK(lock, prio) GLUE_MUTEX_LOCK(lock, prio)
#define ETC_MUTEX_UNLOCK(lock, prio) GLUE_MUTEX_UNLOCK(lock, prio)
/* Destroy mutex */
#define ETC_MUTEX_DESTROY(lock) GLUE_MUTEX_DESTROY(lock)
/* Try to lock a mutex; return 1 if successful, 0 if not (already locked) */
#define ETC_MUTEX_TRYLOCK(lock, prio) GLUE_MUTEX_TRYLOCK(lock)
/* Bug-check if we don't hold the mutex */
#define ETC_MUTEX_LOCK_ASSERT(lock, prio)
/*
* Condition variables:
*/
typedef glue_cond_t etc_cond_t;
/* initialize condition variable */
#define ETC_COND_INIT(cond, mutex) GLUE_COND_INIT(cond, mutex)
/* wait for condition to happen */
#define ETC_COND_WAIT(cond, mutex) GLUE_COND_WAIT(cond, mutex)
#define ETC_COND_DESTROY(cond) GLUE_COND_DESTROY(cond)
#define ETC_COND_WAKEUP(cond, mutex) GLUE_COND_WAKEUP(cond, mutex)
#define ETC_COND_BROADCAST(cond, mutex) GLUE_COND_BROADCAST(cond, mutex)
#endif
typedef glue_thread_t etc_thread_t;
/* Return a per-thread cookie */
#define ETC_THD_SELF() GLUE_THD_SELF()
/* Yield the processor */
#define ETC_THD_YIELD() GLUE_THD_YIELD()
/*
* the following are mostly for the benefit of snark and similar test code.
*/
/* Create a thread */
#define ETC_THD_CREATE(thread, func, arg) GLUE_THD_CREATE(thread, func, arg)
#define ETC_THD_WAIT(thread) GLUE_THD_WAIT(thread)
/* Cause the current thread to go poof */
#define ETC_THD_EXIT() GLUE_THD_EXIT()
#define ETC_GET_SEL_CONDVAR(cookie) (etc_cond_t *)GLUE_GET_SEL_CONDVAR(cookie)
#define ETC_REL_SEL_CONDVAR(cond, cookie) GLUE_REL_SEL_CONDVAR(cond, cookie)
#ifdef __cplusplus
}
#endif
#endif
+175
View File
@@ -0,0 +1,175 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/common/types.h,v 1.2 2003/01/16 18:20:14 josh Exp $ */
/*
* Copyright (C) 1999-2010 Wind River Systems, Inc.
* All rights reserved. Provided under license only.
* Distribution or other use of this software is only
* permitted pursuant to the terms of a license agreement
* from Wind River Systems (and is otherwise prohibited).
* Refer to that license agreement for terms of use.
*/
/****************************************************************************
* Copyright 1988-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: types.h,v $
* Revision 1.2 2003/01/16 18:20:14 josh
* directory structure shifting
*
* Revision 1.1.1.1 2001/11/05 17:47:18 tneale
* Tornado shuffle
*
* Revision 1.9 2001/01/19 22:21:29 paul
* Update copyright.
*
* Revision 1.8 2000/03/17 00:16:42 meister
* Update copyright message
*
* Revision 1.7 2000/03/13 21:21:46 paul
* Removed some code that we are no longer working on.
*
* Revision 1.4 1999/05/12 21:41:33 niqbal
* Changes for Redefinition protection
*
* Revision 1.3 1998/03/11 22:40:02 josh
* epilogue_char_t is now a char instead of bits8_t
*
* Revision 1.2 1998/02/25 04:43:27 sra
* Update copyrights.
*
* Revision 1.1 1998/02/05 22:19:28 josh
* moving commonly used include files into common/h from top-level directory
*
* Revision 1.9 1997/04/20 01:32:00 alan
* Add ldb_int{8,16,32}_t types for the benefit of layout/ldbglue.h.
*
* Revision 1.8 1997/03/20 06:58:18 sra
* DFARS-safe copyright text. Zap!
*
* Revision 1.7 1997/02/25 10:57:03 sra
* Update copyright notice, dust under the bed.
*
* Revision 1.6 1996/10/28 22:52:57 sar
* correction added epilogue_size_t and epilogue_char_t
*
* Revision 1.5 1996/10/28 22:51:08 sar
* Added epilogue_types_h epilogue_char_h
*
* Revision 1.4 1993/04/21 15:39:23 dab
* No longer have cookie_t and renamed cardinal_t to fastint_t.
*
* Revision 1.3 1993/03/20 19:09:52 dab
* changed pvoid_t to ptr_t
*
* Revision 1.2 1993/02/26 16:54:21 dab
* Changed htypes.h to porttype.h
*
* Revision 1.1 1993/02/19 22:28:01 dab
* Initial revision
*
*/
/* [clearcase]
modification history
-------------------
01b,08jun10,y_t update for LP64
01a,20apr05,job update copyright notices
*/
#ifndef EPILOGUE_TYPES_H
#define EPILOGUE_TYPES_H
/* <porttype.h> is defined in the hardware specific part of the port.
* It must supply a typedef for size_t since we can't do that one
* portably. It can override any typedef here by defining
* __TYPES_HAVE_<type-name>_t_.
*/
#include <oemtypes.h>
/* Internal data types
*/
#ifndef __TYPES_HAVE_bits8_t_
#define __TYPES_HAVE_bits8_t_ 1
typedef unsigned char bits8_t; /* 8 bits */
#endif
#ifndef __TYPES_HAVE_bits16_t_
#define __TYPES_HAVE_bits16_t_ 1
typedef unsigned short bits16_t; /* 16 bits */
#endif
#ifndef __TYPES_HAVE_bits32_t_
#define __TYPES_HAVE_bits32_t_ 1
typedef unsigned int bits32_t; /* 32 bits */
#endif
#ifndef __TYPES_HAVE_sbits8_t_
#define __TYPES_HAVE_sbits8_t_ 1
typedef signed char sbits8_t; /* signed 8 bits */
#endif
#ifndef __TYPES_HAVE_sbits16_t_
#define __TYPES_HAVE_sbits16_t_ 1
typedef signed short sbits16_t; /* signed 16 bits */
#endif
#ifndef __TYPES_HAVE_sbits32_t_
#define __TYPES_HAVE_sbits32_t_ 1
typedef signed int sbits32_t; /* signed 32 bits */
#endif
#ifndef __TYPES_HAVE_inaddr_t_
#define __TYPES_HAVE_inaddr_t_ 1
typedef bits32_t inaddr_t; /* IP address */
#endif
#ifndef __TYPES_HAVE_ptr_t_
#define __TYPES_HAVE_ptr_t_ 1
typedef void * ptr_t; /* generic pointer */
#endif
#ifndef __TYPES_HAVE_fastint_t_
#define __TYPES_HAVE_fastint_t_ 1
typedef int fastint_t; /* a loop counter (should be at least 15 bits) */
#endif
#ifndef __TYPES_HAVE_boolean_t_
#define __TYPES_HAVE_boolean_t_ 1
typedef int boolean_t; /* an efficient boolean variable */
#endif
/* These next three types are needed by the layout glue macros.
* These are the unsigned integer types that your C implementation
* normally converts 8, 16 and 32 bit quantities into in expressions.
* The following typedefs are correct for most C implementations
* (with 16 or 32 bit integers), but may need to be changed in sufficiently
* unusual environments.
*/
#ifndef __TYPES_HAVE_ldb_int8_t_
typedef unsigned char ldb_int8_t; /* 8 bits */
#endif
#ifndef __TYPES_HAVE_ldb_int16_t_
typedef unsigned short ldb_int16_t; /* 16 bits */
#endif
#ifndef __TYPES_HAVE_ldb_int32_t_
typedef unsigned int ldb_int32_t; /* 32 bits */
#endif
/* yes, we know these two types are not what they should be
they are here to make some of the code happy and will be
updated when that code is fixed. */
#ifndef __TYPES_HAVE_epilogue_size_t_
typedef sbits16_t epilogue_size_t;
#endif
#ifndef __TYPES_HAVE_epilogue_char_t_
typedef char epilogue_char_t;
#endif
#if !defined(NO_PP)
#define __(x) x
#else
#define __(x) ()
#endif
#endif /* EPILOGUE_TYPES_H */
@@ -0,0 +1,87 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/common/weakprng.h,v 1.3 2003/01/16 18:20:14 josh Exp $ */
/*
* Copyright (C) 1999-2005 Wind River Systems, Inc.
* All rights reserved. Provided under license only.
* Distribution or other use of this software is only
* permitted pursuant to the terms of a license agreement
* from Wind River Systems (and is otherwise prohibited).
* Refer to that license agreement for terms of use.
*/
/****************************************************************************
* Copyright 1988-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: weakprng.h,v $
* Revision 1.3 2003/01/16 18:20:14 josh
* directory structure shifting
*
* Revision 1.2 2001/11/07 00:07:11 meister
* Rework pathnames again
*
* Revision 1.1.1.1 2001/11/05 17:47:18 tneale
* Tornado shuffle
*
* Revision 1.7 2001/01/19 22:21:29 paul
* Update copyright.
*
* Revision 1.6 2000/03/17 00:16:42 meister
* Update copyright message
*
* Revision 1.5 2000/03/09 17:15:43 tneale
* Added #idef C++ to declare extern C if needed
*
* Revision 1.4 1998/02/25 22:08:28 mrf
* Correct copyright dates.
*
* Revision 1.3 1998/02/25 04:43:27 sra
* Update copyrights.
*
* Revision 1.2 1998/02/21 23:38:33 sra
* Minor changes to WeakPRNG module.
*
* Revision 1.1 1998/02/21 22:05:35 mrf
* Added weak random number generator.
*
*/
/* [clearcase]
modification history
-------------------
01a,20apr05,job update copyright notices
*/
#ifdef __cplusplus
extern"C" {
#endif
#ifndef EPILOGUE_INSTALL_H
#include <wrn/wm/common/install.h>
#endif
#ifndef COMMON_CONFIG_H
#include <wrn/wm/common/config.h>
#endif
#ifndef COMMON_GLUE_H
#include <wrn/wm/common/glue.h>
#endif
/*
* Include file for cryptographically weak random number generator
* found in common/lib/weakprng.c.
*/
/* Function prototypes */
void ep_seed_weak_prng(bits8_t *, size_t);
bits32_t ep_weak_prng(bits32_t);
#ifdef __cplusplus
}
#endif