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,375 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/bsd44/attache.h,v 1.3 2003/01/15 14:00:25 josh Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: attache.h,v $
* Revision 1.3 2003/01/15 14:00:25 josh
* directory structure shifting
*
* Revision 1.2 2002/02/26 18:22:52 josh
* updating paths in port files
*
* Revision 1.1.1.1 2001/11/05 17:47:08 tneale
* Tornado shuffle
*
* Revision 1.20 2001/01/19 22:22:53 paul
* Update copyright.
*
* Revision 1.19 2000/11/16 21:29:38 paul
* Moved glue_set_deferred_io_handler to sockport.h.
*
* Revision 1.18 2000/10/16 19:21:44 paul
* Restore sockets and mempool code.
*
* Revision 1.17 2000/03/17 00:08:56 meister
* Update copyright message
*
* Revision 1.16 2000/03/15 19:39:49 paul
* Whoops, we actually needed one of those revs.
*
* Revision 1.15 2000/03/13 21:21:52 paul
* Removed some code that we are no longer working on.
*
* Revision 1.14 1999/06/13 19:38:20 mrf
* Add attache/h/packet.h include for glue function with packet parameter
*
* Revision 1.13 1999/03/31 23:18:40 wes
* Minimal hooks for pool sanity checking..
*
* Revision 1.12 1999/02/18 04:41:25 wes
* Sockets merge: Everything Else
* - memory pools
* - thread support
* - port-specific headers
*
* Revision 1.11.4.3 1999/02/01 23:15:34 paul
* added GLUE_ALLOC_FROM_POOL, GLUE_FREE_TO_POOL
*
* Revision 1.11.4.2 1998/10/22 21:09:55 wes
* Change glue_set_deferred_io_handler prototype; add it to other ports.
* (oops, missed this the other day).
*
* Revision 1.11.4.1 1998/09/23 19:16:56 wes
* Merge socket-branch-1 changes to socket-branch-2
*
* Revision 1.11 1998/09/06 08:11:06 sra
* Packet filtering hooks in Attache, rudimentary firewall
* implementation in Snark.
*
* Revision 1.10 1998/03/12 18:23:43 meister
* GLUE_IPSEC_RCV_SA_NOTUNNEL()
*
* Revision 1.9 1998/03/10 00:36:59 meister
* Added back all my IPSEC glue functions which seem to have disappeared
* when Mrf made her last update.
*
* Revision 1.8 1998/03/03 20:37:52 mrf
* Change GLUE_SNTP_SET_TIME macro to take packet pointer
*
* Revision 1.7 1998/03/03 15:26:16 mrf
* Comment out PRINTF declarations.
*
* Revision 1.6 1998/02/25 04:56:45 sra
* Update copyrights.
*
* Revision 1.5 1998/02/18 22:34:58 sra
* Add ip_loopback(), eradicate glue_pkt_handle().
*
* Revision 1.4 1998/02/13 00:42:46 mrf
* Add conditionalized SNTP Client macro
*
* Revision 1.3 1997/09/15 15:48:26 sra
* GLUE_NOW() migration version skew.
*
* Revision 1.2 1997/08/21 17:23:44 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.1 1997/08/13 15:17:29 mrf
* added def for MAX_HW_ADDRESS_LEN for ipv6 nd
*
* Revision 1.0 1997/08/08 22:11:10 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.8 1997/08/07 23:01:26 meister
* Added a do-nothing comment to attache.h
*
* Revision 0.7 1997/07/01 04:37:59 mrf
* add commented-out PRINTF definition
*
* Revision 0.6 1997/05/14 06:22:12 sra
* Enable inline byteswapping to silence some warnings.
*
* Revision 0.5 1997/04/15 06:00:14 sra
* Update debugging code, add default TCP timeout handler.
*
* Revision 0.4 1997/03/20 06:57:57 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.3 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.2 1996/10/30 04:51:35 sra
* Move glue stuff down to postamble section.
*
* Revision 0.1 1996/10/23 00:18:21 sar
* *** empty log message ***
*
*/
/* [clearcase]
modification history
-------------------
*/
/* previous revision history when this was netbsd/attache.h
*
* Revision 2.7 1996/10/16 16:44:02 sar
* Added ifndefs around the memory and string functions so we
* don't get compiler warnings.
*
* Revision 2.6 1996/03/22 10:05:39 sra
* Update copyrights prior to Attache 3.2 release.
*
* Revision 2.5 1996/02/13 21:07:54 sra
* Fun with BUG() macros.
*
* Revision 2.4 1995/07/20 11:24:01 sra
* More fun and games with optimized byte swapping.
*
* Revision 2.3 1995/06/28 19:41:56 sra
* Add cookie argument to BUG() macro. Change inline byteswap macros to
* use GCC expression statements.
*
* Revision 2.2 1995/06/27 23:57:33 sra
* Add BUG() definition for testing.
*
* Revision 2.1 1995/06/22 05:29:06 sra
* Preliminary changes for multicast and OSPF.
*
* Revision 2.0 1995/05/10 22:38:15 sra
* Attache release 3.0.
*
* Revision 1.6 1995/05/01 20:59:29 sra
* Have to test CONFIG_PREAMBLE with #ifdef, not #if.
*
* Revision 1.5 1995/01/06 00:52:48 sra
* Update copyright notice for 2.1 release.
*
* Revision 1.4 1994/12/20 22:13:08 sra
* Fix signature for crufty glue_pkt_handle() declaration.
*
* Revision 1.3 1994/09/04 23:55:50 sra
* Get rid of most of the ancient NO_PP cruft.
*
* Revision 1.2 1994/09/04 06:13:38 sra
* Clean up antique type names and install macros.
*
* Revision 1.1 1993/07/05 21:54:24 sra
* Initial revision
*
*/
/* comment to test CVS */
#ifdef CONFIG_PREAMBLE
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define MAX_PACKETS 20
#define IP_MAX_PKTSIZE 1536
#define TCP_MAXCONN 128
#define TCP_DEFAULT_MAX_RETRANSMISSIONS 0
/* include PRINTF definition to enable printing/debugging code
#ifndef PRINTF
#define PRINTF printf
#endif
*/
/*
* Fun with our new run-time debugging facility.
* This is still experimental, and defaults to uninstalled.
*/
#if defined(INSTALL_SNARK_BUG_CONF) && INSTALL_SNARK_BUG_CONF
#include <wrn/wm/util/demo/bug_conf.h>
#endif
/*
* Backwards compatability with old braindamage can be a real pain.
* Since this port file is strictly for debugging, we set a couple
* of configuration parameters to more reasonable values here.
*/
/* Please do install a retransmission timeout handler */
#define TCP_DEFAULT_MAX_RETRANSMISSIONS 0
/* Please buffer a reasonable number of ahead-of-sequence segments */
#define TCP_AHEAD_Q_MAX_DEFAULT 25
/* Maximum hardware address length, in bytes */
#define ATTACHE_MAX_HW_ADDRESS_LEN 6
#else /* CONFIG_PREAMBLE */
#include <wrn/wm/common/install.h>
#include <wrn/wm/attache/packet.h>
#ifndef GLUE_NOW
#define GLUE_NOW() glue_now()
extern bits32_t glue_now (void);
#endif
#ifndef GLUE_ALLOC
#define GLUE_ALLOC(x) ((void *) malloc(x))
#endif
#ifndef GLUE_FREE
#define GLUE_FREE(x) free((char *) (x))
#endif
#define GLUE_CKSUM(x, y) glue_cksum((bits16_t *)(x), (y))
#define GLUE_CALLIN(x, y) glue_callin(x, y)
/* define the GLUE_SNTP_SET_TIME macro if using SNTP Client */
#if INSTALL_ATTACHE_MULTICAST && INSTALL_ATTACHE_SNTP_CLIENT
#ifndef GLUE_SNTP_SET_TIME
#define GLUE_SNTP_SET_TIME(p, s, f) glue_set_time((p),(s),(f))
#endif
#endif
/*
* Fun with optimized ways of swapping bytes in GCC.
*/
#if 1
/*
* "Safe" inline swap expressions using GCC "statement expressions".
* Don't try these unless you're using GCC...
*/
#define GLUE_SWAP32(x) \
({ bits32_t _x_ = (x);\
((((_x_ & 0x000000ff) << 24) & 0xff000000)|\
(((_x_ & 0x0000ff00) << 8) & 0x00ff0000)|\
(((_x_ & 0x00ff0000) >> 8) & 0x0000ff00)|\
(((_x_ & 0xff000000) >> 24) & 0x000000ff)); })
#define GLUE_SWAP16(x) \
({ bits16_t _x_ = (x);\
((((_x_ & 0x00ff) << 8) & 0xff00)|\
(((_x_ & 0xff00) >> 8) & 0x00ff)); })
#else
static __inline__ bits32_t GLUE_SWAP32(bits32_t x)
{
return ((((x & 0x000000ff) << 24) & 0xff000000)|
(((x & 0x0000ff00) << 8) & 0x00ff0000)|
(((x & 0x00ff0000) >> 8) & 0x0000ff00)|
(((x & 0xff000000) >> 24) & 0x000000ff));
}
static __inline__ bits16_t GLUE_SWAP16(bits16_t x)
{
return ((((x & 0x00ff) << 8) & 0xff00)|
(((x & 0xff00) >> 8) & 0x00ff));
}
#endif
extern int glue_intlock (int);
extern bits16_t glue_cksum (bits16_t *, unsigned);
extern void glue_callin (bits32_t, void (*)(void));
extern void glue_set_time(packet *, bits32_t, bits32_t);
#ifndef PRINTF
#define PRINTF printf
#endif
#ifdef ATTACHE_IPSEC_H
#define GLUE_IPSEC_SA_EXPIRED(W,X,Y,Z) \
glue_ipsec_sa_expired(W,X,Y,Z)
extern void glue_ipsec_sa_expired (ipsec_sa_dir_t, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_SND_PKT_DENIED(W,X,Y,Z) \
glue_ipsec_snd_pkt_denied((W),(X),(Y),(Z))
extern void glue_ipsec_snd_pkt_denied(packet *, ipaddr_t *, ipaddr_t *, int);
#define GLUE_IPSEC_RCV_PKT_BADSPI(V,W,X,Y,Z) \
glue_ipsec_rcv_pkt_badspi((V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_pkt_badspi(packet *, ipaddr_t *, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_PKT_NOTPARTY(V,W,X,Y,Z) \
glue_ipsec_rcv_pkt_notparty((V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_pkt_notparty(packet *, ipaddr_t *, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_SA_NOTUNNEL(V,W,X,Y,Z) \
glue_ipsec_rcv_sa_notunnel((V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_sa_notunnel(packet *, ipaddr_t *, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_TUNPKT_NOTIP(U,V,W,X,Y,Z) \
glue_ipsec_rcv_tunpkt_notip((U),(V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_tunpkt_notip(packet *, packet *, ipaddr_t *,
ipaddr_t *, bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_TUNPKT_NOTPARTY(S,T,U,V,W,X,Y,Z) \
glue_ipsec_rcv_tunpkt_notparty((S),(T),(U),(V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_tunpkt_notparty(packet *, ipaddr_t *, ipaddr_t *,
packet *, ipaddr_t *, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_PKT_BADAH(V,W,X,Y) \
glue_ipsec_rcv_pkt_badah((V),(W),(X),(Y))
extern void glue_ipsec_rcv_pkt_badah(packet *, ipaddr_t *, ipaddr_t *,
bits32_t);
#define GLUE_IPSEC_RCV_PKT_DENIED(V,W,X,Y,Z) \
glue_ipsec_rcv_pkt_denied((V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_pkt_denied(packet *, ipaddr_t *, ipaddr_t *,
ipsec_policy_flags_t, bits16_t);
#endif /* ATTACHE_IPSEC_H */
/*
* Fun with our new firewall toy. This is experimental and defaults to uninstalled.
*/
#if defined(INSTALL_SNARK_FIREWALL) && INSTALL_SNARK_FIREWALL
#include <wrn/wm/demo/firewall.h>
#endif
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,73 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/bsd44/common.h,v 1.1.1.1 2001/11/05 17:47:08 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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:08 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:22:53 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:08:56 meister
* Update copyright message
*
* Revision 1.2 1998/02/25 04:56:46 sra
* Update copyrights.
*
* Revision 1.1 1997/08/21 17:23:45 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
-------------------
*/
/*
* Common definitions for all Epilogue products on 4.4-BSD derived systems.
*/
#ifdef CONFIG_PREAMBLE
#include <string.h>
#ifndef STRICMP
#define STRICMP(x, y) strcasecmp(x, y)
#endif
#ifndef STRNICMP
#define STRNICMP(x, y, z) strncasecmp(x, y, z)
#endif
#else /* CONFIG_PREAMBLE */
#ifndef GLUE_NOW
#define GLUE_NOW() glue_now()
extern bits32_t glue_now (void);
#endif
#ifndef GLUE_SEED_PRNG
#define GLUE_SEED_PRNG(x,y) glue_seed_prng(x,y)
extern unsigned glue_seed_prng(bits8_t *, unsigned);
#endif
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,195 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/bsd44/decorum.h,v 1.3 2003/01/15 14:00:25 josh Exp $ */
/*
* Copyright (C) 1999-2004 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 1996-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: decorum.h,v $
* Revision 1.3 2003/01/15 14:00:25 josh
* directory structure shifting
*
* Revision 1.2 2002/02/26 18:22:52 josh
* updating paths in port files
*
* Revision 1.1.1.1 2001/11/05 17:47:08 tneale
* Tornado shuffle
*
* Revision 2.4 2001/01/19 22:22:54 paul
* Update copyright.
*
* Revision 2.3 2000/03/17 00:08:56 meister
* Update copyright message
*
* Revision 2.2 1998/02/25 04:56:46 sra
* Update copyrights.
*
* Revision 2.1 1998/02/16 21:33:42 josh
* decorum port file now uses epilogue_char_t where appropriate
*
* Revision 2.0 1997/09/11 15:06:30 josh
* updating version numbers for release
*
* Revision 1.0 1997/08/08 22:11:11 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.12 1997/08/07 23:03:46 meister
* added do-nothing comment to decorum.h
*
* Revision 0.11 1997/07/27 19:41:56 alan
* Add ETC_STDIO_WRITE.
*
* Revision 0.10 1997/07/24 21:15:11 alan
* Decorum now has: DECORUM_MAX_PACKET_SIZE, DECORUM_DEFAULT_RECEIVE_BUFLEN
*
* Revision 0.9 1997/07/23 07:10:49 alan
* Add support for ETC_STDIO_LAST_MODIFIED_TIME().
*
* Revision 0.8 1997/07/17 04:46:48 alan
* New in here: DECORUM_ALLOC, DECORUM_FREE
* New conditionalization: INSTALL_DECORUM_PROXY
*
* Revision 0.7 1997/03/20 06:57:58 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.6 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.5 1996/10/29 23:01:55 sar
* added some includes to keep the compilers happy
*
* Revision 0.4 1996/10/28 17:49:31 sar
* added use of decorum_size_t
*
* Revision 0.3 1996/10/27 16:49:10 lowell
* ETC_STDIO_SIZE
*
* Revision 0.3 1996/10/17 18:00:17 sar
* Added read mode for etc stdio
*
* Revision 0.2 1996/10/16 16:44:56 sar
* Added decorum_get_rawtime
*
* Revision 0.1 1996/10/15 17:26:43 sar
* initial version
*
*/
/*
/* [clearcase]
modification history
-------------------
*/
/* do-nothing comment to test CVS */
#if (!defined(decorum_inc))
#define decorum_inc
#include <stdlib.h>
#include <string.h>
#include <wrn/wm/common/types.h>
#include <stdio.h>
#include <unistd.h>
#ifndef DECORUM_ALLOC
#define DECORUM_ALLOC(x) ((void *) malloc(x))
#endif
#ifndef DECORUM_FREE
#define DECORUM_FREE(x) (free((char *) (x)))
#endif
/* This first should be the same as SNMP_MAX_PACKET_SIZE in envoy.h */
#define DECORUM_MAX_PACKET_SIZE (1400)
#define DECORUM_DEFAULT_RECEIVE_BUFLEN (512)
/* needed for OIDC_T definition */
#if INSTALL_DECORUM_PROXY && (!defined(asn1conf_inc))
#include <wrn/wm/snmp/engine/asn1conf.h>
#endif
/* Some input routines, these are provided but may be replaced with
more efficient implentations if desired */
extern sbits16_t decorum_parse_sbits32 (epilogue_char_t *,
epilogue_char_t **,
sbits32_t *);
extern sbits16_t decorum_parse_bits32 (epilogue_char_t *,
epilogue_char_t **,
bits32_t *);
extern sbits16_t decorum_parse_hexstring (epilogue_char_t *,
epilogue_char_t *,
decorum_size_t);
#define ETC_STRING_GET_SBITS32 decorum_parse_sbits32
#define ETC_STRING_GET_BITS32 decorum_parse_bits32
#define ETC_STRING_GET_HEXSTRING decorum_parse_hexstring
/* a routine to output a number to a byte string, used to create
file/stream names */
#define ETC_STDIO_SPRINTF(buf, num, str) sprintf(buf, "%lu%s", num, str)
/* Define the structure that will be used for holding output
until we are done */
typedef FILE etc_stdio_t;
/* Macros for opening, closing and removing a stream */
#define ETC_STDIO_MODE_READ "r"
#define ETC_STDIO_MODE_WRITE "w+"
#define ETC_STDIO_OPEN(fname, how) fopen(fname, how)
#define ETC_STDIO_CLOSE(outstream) fclose(outstream)
#define ETC_STDIO_REMOVE(fname) unlink(fname)
/* READ returns number of bytes read */
#define ETC_STDIO_READ(instream, size, buf) \
fread((buf), 1, (size), (instream))
#define ETC_STDIO_WRITE(outstream, size, buf) \
fwrite((buf), 1, (size), (outstream))
extern bits32_t file_size_32(char * fname);
#define ETC_STDIO_SIZE(fname) (file_size_32(fname))
struct decorum_rawtime;
extern void file_last_modified_time(char *, struct decorum_rawtime *);
#define ETC_STDIO_LAST_MODIFIED_TIME(fname, tvp) \
(file_last_modified_time((fname), (tvp)))
/* Define the base output routines */
extern sbits16_t decorum_put_string (etc_stdio_t *, epilogue_char_t *,
decorum_size_t);
extern sbits16_t decorum_put_sbits32 (etc_stdio_t *, sbits32_t);
extern sbits16_t decorum_put_bits32 (etc_stdio_t *, bits32_t);
extern sbits16_t decorum_put_hex_string (etc_stdio_t *, bits8_t *,
decorum_size_t);
#define ETC_STDIO_PUT_STRING decorum_put_string
#define ETC_STDIO_PUT_SBITS32 decorum_put_sbits32
#define ETC_STDIO_PUT_BITS32 decorum_put_bits32
#define ETC_STDIO_PUT_HEX_STRING decorum_put_hex_string
#if INSTALL_DECORUM_PROXY
/* Define a more complex output routine, this may use the
base routines (as the example code does) or may be more direct */
extern sbits16_t decorum_put_oid (etc_stdio_t *, OIDC_T *, decorum_size_t);
#define ETC_STDIO_PUT_OID decorum_put_oid
#endif /* INSTALL_DECORUM_PROXY */
/* Define a string comparison routine */
#define ETC_STRING_STRCASECMP strcasecmp
/* Define a string length routine */
#define ETC_STRING_STRLEN strlen
/* Define a routine that gets the current time. */
#define DECORUM_GET_RAWTIME(timeval_p) unix_glue_getime ((timeval_p));
/* Define a routine that figgers out how big a buffer to use for a chunk
* of outgoing data. */
#define DECORUM_SENDBUF_LEN(http_sb) (512)
#endif /* #if (!defined(decorum_inc)) */
@@ -0,0 +1,109 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/bsd44/emissary.h,v 1.3 2003/01/15 14:00:26 josh Exp $ */
/*
* Copyright (C) 1999-2004 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 1996-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: emissary.h,v $
* Revision 1.3 2003/01/15 14:00:26 josh
* directory structure shifting
*
* Revision 1.2 2002/02/26 18:22:52 josh
* updating paths in port files
*
* Revision 1.1.1.1 2001/11/05 17:47:08 tneale
* Tornado shuffle
*
* Revision 1.7 2001/01/19 22:22:54 paul
* Update copyright.
*
* Revision 1.6 2000/10/16 19:21:44 paul
* Restore sockets and mempool code.
*
* Revision 1.5 2000/03/17 00:08:56 meister
* Update copyright message
*
* Revision 1.4 2000/03/13 21:21:53 paul
* Removed some code that we are no longer working on.
*
* Revision 1.3 1999/04/09 15:43:11 wes
* Call a kludge a kludge..
*
* Revision 1.2 1999/02/18 04:41:25 wes
* Sockets merge: Everything Else
* - memory pools
* - thread support
* - port-specific headers
*
* Revision 1.1.10.2 1998/11/17 20:12:57 wes
* one more SNARK->ATTACHE_THREADS change..
*
* Revision 1.1.10.1 1998/09/23 19:16:57 wes
* Merge socket-branch-1 changes to socket-branch-2
*
* Revision 1.1.8.1 1998/08/19 13:25:51 wes
* Merge sockets-pthreads work to shared branch
*
* Revision 1.1.2.1 1998/08/04 19:47:39 wes
* XXX XXX work around bug in mit-pthreads on NetBSD
*
* Revision 1.1 1998/02/25 04:56:47 sra
* Update copyrights.
*
* Revision 1.0 1997/08/08 22:11:11 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.3 1997/03/20 06:57:59 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.1 1996/10/23 00:18:21 sar
* *** empty log message ***
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/file.h>
#include <stddef.h>
#include <stdio.h>
#include <ctype.h>
#include <memory.h>
#include <string.h>
#include <time.h>
#include <errno.h>
#include <assert.h>
#include <limits.h>
#if INSTALL_EMISSARY_THREAD_KLUDGE
/*
* Work around bug in mit-pthreads on NetBSD which requires
* threads library to be inited even if they're not in use..
*/
#include <wrn/wm/common/thread.h>
#define EMISSARY_OS_DEPENDENT_INIT(argc,argv) GLUE_THREAD_INIT()
#endif
@@ -0,0 +1,209 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/bsd44/envoy.h,v 1.2 2002/02/26 18:22:52 josh Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: envoy.h,v $
* Revision 1.2 2002/02/26 18:22:52 josh
* updating paths in port files
*
* Revision 1.1.1.1 2001/11/05 17:47:08 tneale
* Tornado shuffle
*
* Revision 1.11 2001/01/19 22:22:54 paul
* Update copyright.
*
* Revision 1.10 2000/03/17 00:08:57 meister
* Update copyright message
*
* Revision 1.9 1998/06/21 21:53:04 sar
* Moved the porting stuff that is common to all of our demos to generic/envoy.h
* and included that file here.
*
* Revision 1.8 1998/06/17 04:58:43 sar
* Restore the 1445 view macos
* Tidy up the rest of the file to bring it in line with the
* other envoy.h files
*
* Revision 1.7 1998/06/07 02:05:34 sar
* Remove attache specific define for ENVOY_NOW, instead we expect
* envoy_now() to be defined, if using attache just make it call
* glue_now().
*
* Revision 1.6 1998/06/03 20:20:19 sar
* Moved nvutils.h to snark/h to allow it to be shared.
* Changed the style for the string routines. They are now hidden
* behind a macro that the user can define. If the user doesn't
* have them they can install them in the common library using makmak
*
* Revision 1.5 1998/05/28 18:39:28 sar
* Added options for v3
*
* Revision 1.4 1998/02/25 04:56:47 sra
* Update copyrights.
*
* Revision 1.3 1997/11/04 00:29:35 sar
* Changed the agentx sub agent timeout period from 10000 (10 seconds)
* which was used for testing to 1000 (1 second).
*
* Revision 1.2 1997/10/22 03:01:21 sar
* Changed ENVOY_MASTER_AGENT to ENVOY_EPI_MASTER for clarity,
*
* Started using ENVOY_AGENTX_MASTER & ENVOY_AGENTX_SUB for better
* granularity
*
* Revision 1.1 1997/10/21 03:00:28 sar
* Added agentx macro defintions
*
* Revision 1.0 1997/08/08 22:11:12 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.5 1997/07/24 21:15:13 alan
* Decorum now has: DECORUM_MAX_PACKET_SIZE, DECORUM_DEFAULT_RECEIVE_BUFLEN
*
* Revision 0.4 1997/03/20 06:57:59 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.3 1997/03/18 23:30:10 sar
* Made use of glue_now or envoy_now depend on Attache being
* installed.
*
* Revision 0.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.1 1996/10/23 00:18:21 sar
* *** empty log message ***
*
*/
/* [clearcase]
modification history
-------------------
*/
/* previous revision history when this was netbsd/envoy.h
*
* Revision 2.6 1996/10/16 00:10:00 sar
* Corrected proxy_release_private to use a pointer.
*
* Revision 2.5 1996/10/15 20:13:59 sar
* Added declaration for proxy release
*
* Revision 2.4 1996/10/15 17:37:53 sar
* Added proxy release and timer routine definitions.
*
* Revision 2.3 1996/03/22 10:05:39 sra
* Update copyrights prior to Attache 3.2 release.
*
* Revision 2.2 1996/02/27 00:04:18 sar
* removed validate_address, made v2 use validate_community and
* updated partytime to be usectime.
*
* Revision 2.1 1995/05/23 23:22:33 sar
* Added some more lock macros.
*
* Revision 2.0 1995/05/10 22:38:15 sra
* Attache release 3.0.
*
* Revision 1.10 1995/05/03 01:00:11 sar
* Added default envoy timer macros.
*
* Revision 1.9 1995/05/01 21:27:13 sar
* Put ifdef statements around the example lock macros
*
* Revision 1.8 1995/05/01 20:59:29 sra
* Have to test CONFIG_PREAMBLE with #ifdef, not #if.
*
* Revision 1.7 1995/04/26 08:03:12 sra
* Back out to pre-NVutil version until the NVutil changes
* compile correctly in this configuration. Sorry, SAR.
*
* Revision 1.6 1995/03/24 17:01:35 sar
* Updated to have definitions for the nvutils code and the timer code.
*
* Revision 1.5 1995/01/06 00:52:48 sra
* Update copyright notice for 2.1 release.
*
* Revision 1.4 1994/10/20 19:21:21 sar
* Added resetsysuptime and a simple lock scheme to allow the lock code
* to be compiled.
*
* Revision 1.3 1994/09/04 23:55:50 sra
* Get rid of most of the ancient NO_PP cruft.
*
* Revision 1.2 1993/08/03 22:03:39 sra
* Don't use defined() to test install options.
*
* Revision 1.1 1993/07/05 21:54:24 sra
* Initial revision
*
*/
/*****************************************************************
This is the platform specific part of envoy.h for use with the
example code. It contains only the platform specific pieces of
the port code. The common porting code is in generic/envoy.h.
In general customers will have one envoy.h file per platform
that combines this file and the platform specific information,
we use two files as there is a lot of shared code between our
demos.
*****************************************************************/
#ifdef CONFIG_PREAMBLE
/*****************************************************************
System Includes:
Envoy uses memcpy(), memset(), and strlen(). The appropriate
include file should be put here to see that these routines are
properly declared. If no such include file exists on the system
then declare memcpy() and memset() here directly. Envoy also
uses min() and max(). Include the system's definition or use the
macros supplied below.
*****************************************************************/
#include <string.h>
/*****************************************************************
Memory allocation routines. Envoy needs to allocate memory to
decode the packet into and also to store the response data
Make sure that the routines used by the SNMP_memory_alloc() and
SNMP_memory_free() macros are declared. If system memory routines
are used (e.g. malloc() and free()) then include the appropriate
system header file here.
*****************************************************************/
/* Get malloc and free declarations */
#include <stdlib.h>
#define SNMP_memory_alloc(need) malloc(need)
#define SNMP_memory_free(buf) free(buf)
#include <wrn/wm/util/port/generic/envoy.h>
#else /* config preamble */
#include <wrn/wm/util/port/generic/envoy.h>
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,48 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/bsd44/liaison.h,v 1.1.1.1 2001/11/05 17:47:08 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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 1996-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: liaison.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:08 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:22:54 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:08:57 meister
* Update copyright message
*
* Revision 1.2 1998/02/25 04:56:48 sra
* Update copyrights.
*
* Revision 1.1 1997/11/18 19:59:33 josh
* liaison.h is a dummy file for now, but it will probably have stuff
* in the future
*
*/
/* [clearcase]
modification history
-------------------
*/
#if (!defined(liaison_inc))
#define liaison_inc
#endif /* #if (!defined(liaison_inc)) */
@@ -0,0 +1,61 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/bsd44/oemtypes.h,v 1.1.1.1 2001/11/05 17:47:08 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: oemtypes.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:08 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:22:54 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:08:57 meister
* Update copyright message
*
* Revision 1.2 1999/05/13 00:31:06 wes
* kludge around some header-ordering issues.
*
* Revision 1.1 1998/02/25 04:56:49 sra
* Update copyrights.
*
* Revision 1.0 1997/08/08 22:11:12 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.3 1997/03/20 06:58:00 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
*/
/* [clearcase]
modification history
-------------------
*/
/*
* We need to supply size_t. Everything else in <types.h> works on NetBSD.
*/
#include <sys/types.h>
#ifdef __NetBSD__
#include <sys/time.h>
#endif
@@ -0,0 +1,83 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/bsd44/snark.h,v 1.2 2002/02/27 21:41:34 josh Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: snark.h,v $
* Revision 1.2 2002/02/27 21:41:34 josh
* a little hack for BSD/OS
*
* Revision 1.1.1.1 2001/11/05 17:47:08 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:22:55 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:08:57 meister
* Update copyright message
*
* Revision 1.2 1998/02/25 04:56:49 sra
* Update copyrights.
*
* Revision 1.1 1997/08/21 17:23:45 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.0 1997/08/08 22:11:13 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.4 1997/03/20 06:58:00 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.3 1997/03/09 18:37:03 sra
* Add STRICMP().
*
* Revision 0.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.1 1996/10/23 00:18:21 sar
* *** empty log message ***
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <string.h>
#include <stdlib.h>
#ifndef GLUE_ALLOC
#define GLUE_ALLOC(x) ((void *) malloc(x))
#endif
#ifndef GLUE_FREE
#define GLUE_FREE(x) free((char *) (x))
#endif
#ifndef STRICMP
#define STRICMP(x, y) strcasecmp(x, y)
#endif
#ifndef STRNICMP
#define STRNICMP(x, y, z) strncasecmp(x, y, z)
#endif
#if INSTALL_on_bsdos
#define NO_ETHADDR_STRUCT 1
#endif
@@ -0,0 +1,71 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/bsd44/snmptalk.h,v 1.1.1.1 2001/11/05 17:47:08 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: snmptalk.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:08 tneale
* Tornado shuffle
*
* Revision 1.5 2001/01/19 22:22:55 paul
* Update copyright.
*
* Revision 1.4 2000/03/17 00:08:57 meister
* Update copyright message
*
* Revision 1.3 1998/06/07 02:06:34 sar
* Add include of unistd.h
*
* Revision 1.2 1998/06/03 20:20:20 sar
* Moved nvutils.h to snark/h to allow it to be shared.
* Changed the style for the string routines. They are now hidden
* behind a macro that the user can define. If the user doesn't
* have them they can install them in the common library using makmak
*
* Revision 1.1 1998/02/25 04:56:49 sra
* Update copyrights.
*
* Revision 1.0 1997/08/08 22:11:14 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.4 1997/03/20 06:58:01 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.3 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <stdlib.h>
#include <strings.h>
#include <unistd.h>
/* defines for nvutils for file manipulation */
#define SNMP_READONLY "r"
#define SNMP_READPLUS "r+"
#define SNMP_WRITEPLUS "w+"
#define SNMP_REMOVE_FILE(fname) unlink(fname)
#include <sys/param.h>
@@ -0,0 +1,152 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/bsd44/sockport.h,v 1.1.1.1 2001/11/05 17:47:08 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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-1999 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: sockport.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:08 tneale
* Tornado shuffle
*
* Revision 1.12 2001/05/24 20:35:12 paul
* Include errno.h if needed.
*
* Revision 1.11 2001/05/17 19:10:32 paul
* Added SOCKTABLE_MIN_FD.
*
* Revision 1.10 2001/01/19 22:22:55 paul
* Update copyright.
*
* Revision 1.9 2000/11/16 21:30:04 paul
* Moved glue_set_deferred_io_handler from attache.h.
* Removed stuff that is now defaulted in attache/sockets/sockintl.h.
*
* Revision 1.8 2000/10/16 19:21:45 paul
* Restore sockets and mempool code.
*
* Revision 1.6 2000/03/17 00:08:57 meister
* Update copyright message
*
* Revision 1.5 1999/05/14 20:31:19 paul
* Moved send[to]/recv[from] wrappers from sockets.c to socktop.c. Now
* the mainline sockets code only has entry points for sendmsg/recvmsg.
*
* Revision 1.4 1999/05/12 19:03:17 paul
* Added socktable_iterate.
*
* Revision 1.3 1999/03/04 15:43:32 paul
* added sockets_shutdown, socktable_dump
*
* Revision 1.2 1999/02/18 04:41:26 wes
* Sockets merge: Everything Else
* - memory pools
* - thread support
* - port-specific headers
*
* Revision 1.1.4.10 1999/02/05 20:17:24 paul
* Changed DEFAULT_* to SOCK_DFLT_*, moved fallback definitions to sockintl.h.
* Changed SETERROR to SOCK_SET_ERRNO to reduce possibility of name
* collision with customer code.
*
* Revision 1.1.4.9 1999/02/02 23:44:08 wes
* GLUE_ALLOC is Just Wrong(tm) for GLUE_ALLOC_SOCKPIO since the units are
* wrong. use glue_alloc_sockpio() instead.
*
* Revision 1.1.4.8 1999/02/01 23:12:31 paul
* removed GLUE_ALLOC_SOCKPROTO
* added GLUE_ALLOC_SOCKPIO, GLUE_FREE_SOCKPIO
*
* Revision 1.1.4.7 1999/01/29 06:34:21 paul
* 1) Added a new internal API to facilitate calling through a syscall
* interface; these sock_* functions carry an opaque cookie pointer,
* which may be used to for task- or thread-specific data. This cookie
* is passed to the SOCKTABLE functions.
* 2) Added SETERROR; moved errno here from sockets.h.
* 3) Added GLUE_ALLOC_SOCKPROTO (allocate a protocol-specific
* structure).
*
* Revision 1.1.4.6 1999/01/22 19:49:39 paul
* removed GLUE_SOCKALLOC/GLUE_SOCKFREE
*
* Revision 1.1.4.5 1998/11/09 21:43:31 paul
* Added copyright notice.
*
*/
/* [clearcase]
modification history
-------------------
*/
#ifndef _SOCKPORT_H
#define _SOCKPORT_H
#if !INSTALL_ATTACHE_SOCKETS_DEFINE_ERRORS
#include <errno.h>
#endif
extern int errno; /* needs to be per-thread/per-task */
#define SOCK_SET_ERRNO(x) (errno = (x))
void glue_set_deferred_io_handler (void (*first)(void), void (*handler)(void));
#define GLUE_SET_DEFERRED_IO_HANDLER(x,y) glue_set_deferred_io_handler(x,y)
/* Other things you can set here:
*
* If you are using the built-in socket table code:
* SOCKTABLE_MIN_FD
* SOCKTABLE_MAX_FDS
* SOCKTABLE_HASH_BUCKETS
*
* If you are supplying your own socket table code:
* SOCKTABLE_INIT
* SOCKTABLE_LOOKUP
* SOCKTABLE_ADD
* SOCKTABLE_DEL
* SOCKTABLE_ITERATE
* SOCKTABLE_DUMP
*
* If you want to insert your own system-call type interface between
* the user socket library and the real sockets code:
* SOCK_SOCKETS_INIT
* SOCK_SOCKETS_SHUTDOWN
* SOCK_SOCKET
* SOCK_BIND
* SOCK_LISTEN
* SOCK_ACCEPT
* SOCK_CONNECT
* SOCK_GETSOCKNAME
* SOCK_GETPEERNAME
* SOCK_SHUTDOWN
* SOCK_CLOSE
* SOCK_SENDMSG
* SOCK_RECVMSG
* SOCK_SELECT
* SOCK_SETSOCKOPT
* SOCK_GETSOCKOPT
* SOCK_IOCTL
*
* Default parameters for sending and receiving:
* SOCK_DFLT_UDP_SNDBUF
* SOCK_DFLT_TCP_SNDBUF
* SOCK_DFLT_RAW_SNDBUF
* SOCK_DFLT_UDP_RCVBUF
* SOCK_DFLT_TCP_RCVBUF
* SOCK_DFLT_RAW_RCVBUF
* SOCK_DFLT_SNDLOWAT
* SOCK_DFLT_RCVLOWAT
*/
#endif /* _SOCKPORT_H */
@@ -0,0 +1,77 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/bsd44/telnet.h,v 1.1.1.1 2001/11/05 17:47:08 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: telnet.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:08 tneale
* Tornado shuffle
*
* Revision 1.3 2001/01/19 22:22:55 paul
* Update copyright.
*
* Revision 1.2 2000/03/17 00:08:57 meister
* Update copyright message
*
* Revision 1.1 1998/02/25 04:56:50 sra
* Update copyrights.
*
* Revision 1.0 1997/08/08 22:11:15 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.3 1997/03/20 06:57:56 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.1 1996/10/23 00:18:21 sar
* *** empty log message ***
*
*/
/* [clearcase]
modification history
-------------------
*/
/*
* Use '\n' for local newline convention in both directions.
*/
#define TN_LOCAL_NEWLINE '\n'
/*
* All the windowing stuff for server telnet connections is controlled
* by the sty code, so shunt the decisions off to the sty_tn interface module.
*
* For client telnet connections we're not buffering output, so we just
* return a constant window size.
*/
#define TN_INITIAL_ACTIVE_WINDOW_SIZE (4096)
#define TN_INITIAL_PASSIVE_WINDOW_SIZE (stytn_space_initial)
#define GLUE_TN_WINDOW_SIZE(_tn_) \
(tn_get_flags((_tn_), TN_FLG_ACT_AS_SERVER) \
? stytn_space_left((_tn_)) \
: TN_INITIAL_ACTIVE_WINDOW_SIZE)
extern unsigned stytn_space_initial, stytn_space_left();
@@ -0,0 +1,93 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/bsd44/thdport.h,v 1.1.1.1 2001/11/05 17:47:08 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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-1999 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: thdport.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:08 tneale
* Tornado shuffle
*
* Revision 1.9 2001/03/22 16:54:16 paul
* Removed GLUE_COND_TIMEDWAIT().
*
* Revision 1.8 2001/03/20 17:11:15 paul
* Removed unused timeout macros.
*
* Revision 1.7 2001/01/19 22:22:56 paul
* Update copyright.
*
* Revision 1.6 2000/10/16 19:21:45 paul
* Restore sockets and mempool code.
*
* Revision 1.4 2000/03/17 00:08:58 meister
* Update copyright message
*
* Revision 1.3 1999/11/08 19:16:06 paul
* Added copyright.
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <pthread.h>
/* !!! checking return codes here? */
#define GLUE_MUTEX_PRIO_MAX 100
#define GLUE_MUTEX_PRIO_HIGH 80
#define GLUE_MUTEX_PRIO_MID 40
#define GLUE_MUTEX_PRIO_LOW 20
#define GLUE_MUTEX_PRIO_MIN 10
typedef pthread_mutex_t glue_mutex_t;
typedef pthread_cond_t glue_cond_t;
typedef pthread_t glue_thread_t;
#define GLUE_MUTEX_INIT(lock, prio) pthread_mutex_init(lock, NULL)
#define GLUE_MUTEX_INIT_MAGIC(lock) pthread_mutex_init(lock, NULL)
#define GLUE_MUTEX_LOCK(lock, prio) pthread_mutex_lock(lock)
#define GLUE_MUTEX_UNLOCK(lock, prio) pthread_mutex_unlock(lock)
#define GLUE_MUTEX_TRYLOCK(lock, prio) pthread_mutex_trylock(lock)
#define GLUE_MUTEX_DESTROY(lock) pthread_mutex_destroy(lock)
#define GLUE_COND_INIT(cond, mutex) pthread_cond_init(cond, NULL)
#define GLUE_COND_WAIT(cond, mutex) pthread_cond_wait(cond, mutex)
#define GLUE_COND_WAKEUP(cond, mutex) pthread_cond_signal(cond)
#define GLUE_COND_BROADCAST(cond, mutex) pthread_cond_broadcast(cond)
#define GLUE_COND_DESTROY(cond) pthread_cond_destroy(cond)
#define GLUE_THD_SELF() pthread_self()
#define GLUE_THD_YIELD() pthread_yield()
#define GLUE_THD_CREATE(thread, func, arg) pthread_create(thread, NULL, func, arg)
#define GLUE_THD_WAIT(thread) pthread_join(thread, NULL)
#define GLUE_THD_EXIT() pthread_exit(NULL)
#define GLUE_THREAD_INIT() pthread_init()
pthread_key_t debug_state_key;
#define GLUE_THD_COOKIE_INIT(freertn) pthread_key_create (&debug_state_key, freertn);
#define GLUE_THD_COOKIE_GET(y) *(y) = pthread_getspecific(debug_state_key)
#define GLUE_THD_COOKIE_SET(x) pthread_setspecific(debug_state_key, x)
@@ -0,0 +1,73 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/cygnusnt/common.h,v 1.1.1.1 2001/11/05 17:47:08 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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:08 tneale
* Tornado shuffle
*
* Revision 1.1 2000/07/10 15:55:14 mrf
* Add configuration for Cygnus NT environment with associated changes.
*
* Revision 1.3 2000/03/17 00:08:56 meister
* Update copyright message
*
* Revision 1.2 1998/02/25 04:56:46 sra
* Update copyrights.
*
* Revision 1.1 1997/08/21 17:23:45 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
-------------------
*/
/*
* Common definitions for all Epilogue products on 4.4-BSD derived systems.
*/
#ifdef CONFIG_PREAMBLE
#include <string.h>
#ifndef STRICMP
#define STRICMP(x, y) strcasecmp(x, y)
#endif
#ifndef STRNICMP
#define STRNICMP(x, y, z) strncasecmp(x, y, z)
#endif
#else /* CONFIG_PREAMBLE */
#ifndef GLUE_NOW
#define GLUE_NOW() glue_now()
extern bits32_t glue_now (void);
#endif
#ifndef GLUE_SEED_PRNG
#define GLUE_SEED_PRNG(x,y) glue_seed_prng(x,y)
extern unsigned glue_seed_prng(bits8_t *, unsigned);
#endif
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,70 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/cygnusnt/emissary.h,v 1.1.1.1 2001/11/05 17:47:08 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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 1996-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: emissary.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:08 tneale
* Tornado shuffle
*
* Revision 1.1 2000/07/10 15:55:14 mrf
* Add configuration for Cygnus NT environment with associated changes.
*
* Revision 1.5 2000/03/17 00:08:56 meister
* Update copyright message
*
* Revision 1.4 2000/03/13 21:21:53 paul
* Removed some code that we are no longer working on.
*
* Revision 1.1 1998/02/25 04:56:47 sra
* Update copyrights.
*
* Revision 1.0 1997/08/08 22:11:11 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.3 1997/03/20 06:57:59 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.1 1996/10/23 00:18:21 sar
* *** empty log message ***
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/file.h>
#include <stddef.h>
#include <stdio.h>
#include <ctype.h>
#include <memory.h>
#include <string.h>
#include <time.h>
#include <errno.h>
#include <assert.h>
#include <limits.h>
@@ -0,0 +1,206 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/cygnusnt/envoy.h,v 1.1.1.1 2001/11/05 17:47:09 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: envoy.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:09 tneale
* Tornado shuffle
*
* Revision 1.1 2000/07/10 15:55:14 mrf
* Add configuration for Cygnus NT environment with associated changes.
*
* Revision 1.10 2000/03/17 00:08:57 meister
* Update copyright message
*
* Revision 1.9 1998/06/21 21:53:04 sar
* Moved the porting stuff that is common to all of our demos to generic/envoy.h
* and included that file here.
*
* Revision 1.8 1998/06/17 04:58:43 sar
* Restore the 1445 view macos
* Tidy up the rest of the file to bring it in line with the
* other envoy.h files
*
* Revision 1.7 1998/06/07 02:05:34 sar
* Remove attache specific define for ENVOY_NOW, instead we expect
* envoy_now() to be defined, if using attache just make it call
* glue_now().
*
* Revision 1.6 1998/06/03 20:20:19 sar
* Moved nvutils.h to snark/h to allow it to be shared.
* Changed the style for the string routines. They are now hidden
* behind a macro that the user can define. If the user doesn't
* have them they can install them in the common library using makmak
*
* Revision 1.5 1998/05/28 18:39:28 sar
* Added options for v3
*
* Revision 1.4 1998/02/25 04:56:47 sra
* Update copyrights.
*
* Revision 1.3 1997/11/04 00:29:35 sar
* Changed the agentx sub agent timeout period from 10000 (10 seconds)
* which was used for testing to 1000 (1 second).
*
* Revision 1.2 1997/10/22 03:01:21 sar
* Changed ENVOY_MASTER_AGENT to ENVOY_EPI_MASTER for clarity,
*
* Started using ENVOY_AGENTX_MASTER & ENVOY_AGENTX_SUB for better
* granularity
*
* Revision 1.1 1997/10/21 03:00:28 sar
* Added agentx macro defintions
*
* Revision 1.0 1997/08/08 22:11:12 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.5 1997/07/24 21:15:13 alan
* Decorum now has: DECORUM_MAX_PACKET_SIZE, DECORUM_DEFAULT_RECEIVE_BUFLEN
*
* Revision 0.4 1997/03/20 06:57:59 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.3 1997/03/18 23:30:10 sar
* Made use of glue_now or envoy_now depend on Attache being
* installed.
*
* Revision 0.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.1 1996/10/23 00:18:21 sar
* *** empty log message ***
*
*/
/* previous revision history when this was netbsd/envoy.h
*
* Revision 2.6 1996/10/16 00:10:00 sar
* Corrected proxy_release_private to use a pointer.
*
* Revision 2.5 1996/10/15 20:13:59 sar
* Added declaration for proxy release
*
* Revision 2.4 1996/10/15 17:37:53 sar
* Added proxy release and timer routine definitions.
*
* Revision 2.3 1996/03/22 10:05:39 sra
* Update copyrights prior to Attache 3.2 release.
*
* Revision 2.2 1996/02/27 00:04:18 sar
* removed validate_address, made v2 use validate_community and
* updated partytime to be usectime.
*
* Revision 2.1 1995/05/23 23:22:33 sar
* Added some more lock macros.
*
* Revision 2.0 1995/05/10 22:38:15 sra
* Attache release 3.0.
*
* Revision 1.10 1995/05/03 01:00:11 sar
* Added default envoy timer macros.
*
* Revision 1.9 1995/05/01 21:27:13 sar
* Put ifdef statements around the example lock macros
*
* Revision 1.8 1995/05/01 20:59:29 sra
* Have to test CONFIG_PREAMBLE with #ifdef, not #if.
*
* Revision 1.7 1995/04/26 08:03:12 sra
* Back out to pre-NVutil version until the NVutil changes
* compile correctly in this configuration. Sorry, SAR.
*
* Revision 1.6 1995/03/24 17:01:35 sar
* Updated to have definitions for the nvutils code and the timer code.
*
* Revision 1.5 1995/01/06 00:52:48 sra
* Update copyright notice for 2.1 release.
*
* Revision 1.4 1994/10/20 19:21:21 sar
* Added resetsysuptime and a simple lock scheme to allow the lock code
* to be compiled.
*
* Revision 1.3 1994/09/04 23:55:50 sra
* Get rid of most of the ancient NO_PP cruft.
*
* Revision 1.2 1993/08/03 22:03:39 sra
* Don't use defined() to test install options.
*
* Revision 1.1 1993/07/05 21:54:24 sra
* Initial revision
*
*/
/* [clearcase]
modification history
-------------------
*/
/*****************************************************************
This is the platform specific part of envoy.h for use with the
example code. It contains only the platform specific pieces of
the port code. The common porting code is in generic/envoy.h.
In general customers will have one envoy.h file per platform
that combines this file and the platform specific information,
we use two files as there is a lot of shared code between our
demos.
*****************************************************************/
#ifdef CONFIG_PREAMBLE
/*****************************************************************
System Includes:
Envoy uses memcpy(), memset(), and strlen(). The appropriate
include file should be put here to see that these routines are
properly declared. If no such include file exists on the system
then declare memcpy() and memset() here directly. Envoy also
uses min() and max(). Include the system's definition or use the
macros supplied below.
*****************************************************************/
#include <string.h>
/*****************************************************************
Memory allocation routines. Envoy needs to allocate memory to
decode the packet into and also to store the response data
Make sure that the routines used by the SNMP_memory_alloc() and
SNMP_memory_free() macros are declared. If system memory routines
are used (e.g. malloc() and free()) then include the appropriate
system header file here.
*****************************************************************/
/* Get malloc and free declarations */
#include <stdlib.h>
#define SNMP_memory_alloc(need) malloc(need)
#define SNMP_memory_free(buf) free(buf)
#include <port/generic/envoy.h>
#else /* config preamble */
#include <port/generic/envoy.h>
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,61 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/cygnusnt/oemtypes.h,v 1.1.1.1 2001/11/05 17:47:09 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: oemtypes.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:09 tneale
* Tornado shuffle
*
* Revision 1.1 2000/07/10 15:55:15 mrf
* Add configuration for Cygnus NT environment with associated changes.
*
* Revision 1.3 2000/03/17 00:08:57 meister
* Update copyright message
*
* Revision 1.2 1999/05/13 00:31:06 wes
* kludge around some header-ordering issues.
*
* Revision 1.1 1998/02/25 04:56:49 sra
* Update copyrights.
*
* Revision 1.0 1997/08/08 22:11:12 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.3 1997/03/20 06:58:00 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
*/
/* [clearcase]
modification history
-------------------
*/
/*
* We need to supply size_t. Everything else in <types.h> works on NetBSD.
*/
#include <sys/types.h>
#ifdef __NetBSD__
#include <sys/time.h>
#endif
@@ -0,0 +1,78 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/cygnusnt/snark.h,v 1.1.1.1 2001/11/05 17:47:09 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: snark.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:09 tneale
* Tornado shuffle
*
* Revision 1.1 2000/07/10 15:55:15 mrf
* Add configuration for Cygnus NT environment with associated changes.
*
* Revision 1.3 2000/03/17 00:08:57 meister
* Update copyright message
*
* Revision 1.2 1998/02/25 04:56:49 sra
* Update copyrights.
*
* Revision 1.1 1997/08/21 17:23:45 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.0 1997/08/08 22:11:13 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.4 1997/03/20 06:58:00 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.3 1997/03/09 18:37:03 sra
* Add STRICMP().
*
* Revision 0.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.1 1996/10/23 00:18:21 sar
* *** empty log message ***
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <string.h>
#include <stdlib.h>
#ifndef GLUE_ALLOC
#define GLUE_ALLOC(x) ((void *) malloc(x))
#endif
#ifndef GLUE_FREE
#define GLUE_FREE(x) free((char *) (x))
#endif
#ifndef STRICMP
#define STRICMP(x, y) strcasecmp(x, y)
#endif
#ifndef STRNICMP
#define STRNICMP(x, y, z) strncasecmp(x, y, z)
#endif
#define NO_ETHADDR_STRUCT 1
@@ -0,0 +1,71 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/cygnusnt/snmptalk.h,v 1.1.1.1 2001/11/05 17:47:09 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: snmptalk.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:09 tneale
* Tornado shuffle
*
* Revision 1.1 2000/07/10 15:55:15 mrf
* Add configuration for Cygnus NT environment with associated changes.
*
* Revision 1.4 2000/03/17 00:08:57 meister
* Update copyright message
*
* Revision 1.3 1998/06/07 02:06:34 sar
* Add include of unistd.h
*
* Revision 1.2 1998/06/03 20:20:20 sar
* Moved nvutils.h to snark/h to allow it to be shared.
* Changed the style for the string routines. They are now hidden
* behind a macro that the user can define. If the user doesn't
* have them they can install them in the common library using makmak
*
* Revision 1.1 1998/02/25 04:56:49 sra
* Update copyrights.
*
* Revision 1.0 1997/08/08 22:11:14 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.4 1997/03/20 06:58:01 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.3 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <stdlib.h>
#include <strings.h>
#include <unistd.h>
/* defines for nvutils for file manipulation */
#define SNMP_READONLY "r"
#define SNMP_READPLUS "r+"
#define SNMP_WRITEPLUS "w+"
#define SNMP_REMOVE_FILE(fname) unlink(fname)
#include <sys/param.h>
@@ -0,0 +1,332 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/envtest/envoy.h,v 1.1.1.1 2001/11/05 17:47:09 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* Configuration for Envoy on MSDOS with Attache.
*/
/*
* $Log: envoy.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:09 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:22:56 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:09:53 meister
* Update copyright message
*
* Revision 1.2 1998/02/25 04:56:50 sra
* Update copyrights.
*
* Revision 1.1 1997/10/29 01:31:28 sar
* Updated the master agent installation option.
*
* Revision 1.0 1997/08/08 22:11:15 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.3 1997/03/20 06:58:09 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.1 1996/10/28 19:57:20 sar
* Initial Version
*
* Revision 7.0 1996/03/18 20:25:57 sar
* Updated rev to 7.0 and copyright to 96
*
* Revision 6.1 1995/11/06 20:05:58 sar
* removed validate_community's dependency on install v1
*
* Revision 6.0 1995/05/31 22:00:34 sra
* Release 6.0.
*
* Revision 5.4 1995/05/22 19:39:49 sar
* Modified the lock code to add some new macros.
*
* Revision 5.3 1995/05/05 22:30:05 sar
* Added some default macros for the timer code.
*
* Revision 5.2 1995/05/01 21:57:42 sar
* Put the example lock macros in an if def block.
*
* Revision 5.1 1994/10/25 20:03:13 sar
* Added some simple lock code for testing and as an example, also
* added a definition for snmpresetsysuptime.
*
* Revision 5.0 1994/05/16 17:24:02 sar
* Updated revision to 5.0 and copyright to include 1994
*
* Revision 4.0 1993/06/24 17:47:40 sar
* Updated rev to 4.0 and copyright to 93
*
* Revision 1.1 1993/06/09 20:37:06 sar
* Initial revision
*/
/* [clearcase]
modification history
-------------------
*/
#if defined(CONFIG_PREAMBLE)
/*****************************************************************
*
* System Includes:
*
* The SNMP uses memcpy(), memset(), and strlen(). The appropriate
* include file should be put here to see that these routines are
* properly declared. If no such include file exists on the system
* then declare memcpy() and memset() here directly.
*****************************************************************/
/* zortech, watcom and intel 960 don't have a memory.h so away it goes */
#if (!defined(INSTALL_on_ztc) && !defined(INSTALL_on_watcom) && !defined(INSTALL_on_i960))
#include <memory.h>
#endif /* INSTALL_on_ztc */
#include <string.h>
/*****************************************************************
* Memory allocation routines. The SNMP needs to allocate memory to
* decode the packet into and also to store the response data for GET's
* and GET-NEXT's.
*****************************************************************/
/* Fix up mach 386's improper declaration of the mem* routines */
#if defined(INSTALL_on_mach386)
#define MEMCPY(dst, src, n) memcpy((char *)(dst), (char *)(src), n)
#define MEMSET(dst, val, n) memset((char *)(dst), val, n)
#define MEMCMP(dst, src, n) memcmp((char *)(dst), (char *)(src), n)
#endif
/*----------------------------------------------------------------
* Make sure that the routines used by the SNMP_memory_alloc() and
* SNMP_memory_free() macros are declared. If system memory routines
* are used (e.g. malloc() and free()) then include the appropriate
* system header file here.
----------------------------------------------------------------*/
/* The memory allocation macros */
#if defined(INSTALL_on_unix)
extern void *malloc __((unsigned));
extern void free __((void *));
#endif
#if defined(INSTALL_on_msdos)
#include <stdlib.h>
#endif
#define SNMP_memory_alloc(need) malloc(need)
#define SNMP_memory_free(buf) free(buf)
/* Define the maximum packet size this implementation will accept. */
/* There is no hard upper limit. SNMP_MAX_PACKET_SIZE should not be */
/* reduced below the value of SNMP_MIN_PACKET_SIZE. */
#define SNMP_MAX_PACKET_SIZE 1400
#define SNMP_MIN_PACKET_SIZE 484 /* shouldn't change */
/* Say what is the maximum number of components of an object identifer */
/* which we can handle, including those in the instance. */
#define MAX_OID_COUNT 32
#if (INSTALL_ENVOY_SNMP_LOCK)
typedef struct ENVOY_LOCK_S
{
int readers;
int writers;
} ENVOY_LOCK_T;
#endif
#else /* CONFIG_PREAMBLE */
/*
* Here goes all the user exit macro definitions and function declarations
* to match.
*/
/*****************************************************************
*
* The following macro definitions allow access to the user configurable
* part of the SNMP code.
*
*****************************************************************/
/*****************************************************************
* Include any declarations needed for the routines specified below
* by the macros.
*****************************************************************/
extern int validate_SNMP_community __((SNMP_PKT_T *, SNMPADDR_T *,
SNMPADDR_T *));
/*----------------------------------------------------------------
SNMP_validate_community -- Check an operation against the community name.
Parameters:
SNMP_PKT_T *pkt The received packet (decoded format)
SNMPADDR_T *src Source of the packet
SNMPADDR_T *dst Destination of the packet (most likely
the address of the machine on which this
code is running.)
Returns:
This procedure should return 0 if happy with the community string
and 1 if not.
This routine should fill in the packet structure with the mib
view mask associated with the community string.
This routine may hang additional data onto the "private" field of
the packet structure. The user will be given the opportinity to
release that memory via SNMP_release_private().
----------------------------------------------------------------*/
#define SNMP_validate_community(pkt, src, dst) \
validate_SNMP_community(pkt, src, dst)
#if defined(INSTALL_ENVOY_SNMP_VERSION_2)
/* The time routine, this must be defined */
#define SNMP_PARTYTIME (UINT_32_T)0L
#endif /* INSTALL_ENVOY_SNMP_VERSION_2 */
#if (INSTALL_ENVOY_EPI_MASTER)
#define SNMP_RESETSYSUPTIME
#endif
/*----------------------------------------------------------------
SNMP_release_private -- Get rid of a any private data attached to the packet
structure. May be left undefined in which case nothing
is done with the private field when the SNMP packet
structure is freed.
Parameters:
SNMP_PKT_T *pkt The packet itself
Returns: Nothing
----------------------------------------------------------------*/
/* #define SNMP_release_private(pkt) release_private(pkt) */
/*----------------------------------------------------------------
SNMP_user_get_encode_buffer -- Allows the user the opportunity to get the
buffer that the SNMP packet will be encoded into.
If not used then leave undefined.
Parameters:
SNMP_PKT_T *pkt The packet being encoded.
unsigned int need The amount of storage needed.
EBUFFER_T *ebuffp The ebuffer to fill in with the actual
buffer.
Returns:
0 successful
1 not successful
----------------------------------------------------------------*/
/* #define SNMP_user_get_encode_buffer(pkt, need, ebuffp) 0 */
/*----------------------------------------------------------------
SNMP_trace_input
SNMP_trace_output
-- for implementing packet tracing through the
SNMP code. If not used then define as nothing.
Parameters:
SNMP_PKT_T *pkt The packet being traced
Returns: Nothing
----------------------------------------------------------------*/
#define SNMP_TRACE_INPUT(pkt)
#define SNMP_TRACE_OUTPUT(pkt)
/*****************************************************************
* The next series of macros are hooks into the processing of SET PDUs.
* For most uses you should be able to leave these undefined.
*****************************************************************/
/*----------------------------------------------------------------
SNMP_validate_set_pdu -- Perform a global validation of a SET PDU.
May be left undefined.
Parameters:
SNMP_PKT_T *pkt The packet itself
Returns:
-1 If the PDU is bad and should be rejected with a GEN_ERR.
0 If the PDU is good and normal handling should proceed.
+1 If the PDU is good and this routine has performed all of
the set operations internally.
----------------------------------------------------------------*/
/* #define SNMP_validate_set_pdu(pkt) validate_set_pdu(pkt) */
/*----------------------------------------------------------------
SNMP_user_pre_set -- Perform a global validation of a SET PDU after all of the
test procedures have been called and given the "go ahead".
May be left undefined.
Parameters:
SNMP_PKT_T *pkt The packet itself
Returns:
-1 If the PDU is bad and should be rejected with a GEN_ERR.
0 If the PDU is good and normal handling should proceed.
+1 If the PDU is good and this routine has performed all of
the set operations internally.
----------------------------------------------------------------*/
/* #define SNMP_user_pre_set(pkt) user_pre_set(pkt) */
/*----------------------------------------------------------------
SNMP_user_post_set -- Perform any final activities after all of the set
procedures have been called. May be left undefined.
Parameters:
SNMP_PKT_T *pkt The packet itself
Returns: Nothing
----------------------------------------------------------------*/
/* #define SNMP_user_post_set(pkt) user_post_set(pkt) */
#if (INSTALL_ENVOY_SNMP_LOCK)
/* Here's a simple example to test the locking code, a lock is 2 uints
one for reading, one for writing. When a routine gets a lock the
value is incremented by 1, when a routine frees a lock it is decremented
by 1. We are allowed multiple readers and 1 writer. This code
won't block so if a lock can't be an error is returned */
#define ENVOY_SNMP_LOCK(name) ENVOY_LOCK_T name = {0, 0}
#define ENVOY_SNMP_LOCK_EXTERN(name) extern ENVOY_LOCK_T name
#define ENVOY_SNMP_INIT_LOCK(name) ((name).readers = 0, (name).writers = 0)
#define ENVOY_SNMP_GET_READ_LOCK(name) \
(((name).writers) ? 1 : ((name).readers++, 0))
#define ENVOY_SNMP_RELEASE_READ_LOCK(name) ((name).readers--)
#define ENVOY_SNMP_GET_WRITE_LOCK(name) \
(((name).readers || (name).writers) ? 1 : ((name).writers++, 0))
#define ENVOY_SNMP_RELEASE_WRITE_LOCK(name) ((name).writers--)
#endif /* (INSTALL_ENVOY_SNMP_LOCK) */
#define ENVOY_CALL_TIMER(T, H)
#define ENVOY_NOW() 0
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,77 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/envtest/oemtypes.h,v 1.1.1.1 2001/11/05 17:47:09 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: oemtypes.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:09 tneale
* Tornado shuffle
*
* Revision 1.3 2001/01/19 22:22:56 paul
* Update copyright.
*
* Revision 1.2 2000/03/17 00:09:53 meister
* Update copyright message
*
* Revision 1.1 1998/02/25 04:56:51 sra
* Update copyrights.
*
* Revision 1.0 1997/08/08 22:11:15 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.3 1997/03/20 06:58:09 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.1 1996/10/28 19:57:20 sar
* Initial Version
*
* Revision 7.0 1996/03/18 20:25:57 sar
* Updated rev to 7.0 and copyright to 96
*
* Revision 6.0 1995/05/31 21:51:00 sra
* Release 6.0.
*
* Revision 5.0 1994/05/16 17:24:02 sar
* Updated revision to 5.0 and copyright to include 1994
*
* Revision 4.0 1993/06/24 17:47:40 sar
* Updated rev to 4.0 and copyright to 93
*
* Revision 1.1 1993/06/09 20:37:06 sar
* Initial revision
*/
/* [clearcase]
modification history
-------------------
*/
/* We need to supply size_t. Everything else in <types.h> will
* work fine on with MSDOS compilers.
*/
#if defined(INSTALL_on_unix)
#include <sys/types.h>
#endif
#if defined(INSTALL_on_msdos)
#include <stddef.h>
#endif
@@ -0,0 +1,667 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/generic/envoy.h,v 1.3 2002/05/23 18:51:11 josh Exp $ */
/*
* Copyright (C) 1999-2004 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: envoy.h,v $
* Revision 1.3 2002/05/23 18:51:11 josh
* code modifications to support the entity MIB
*
* Revision 1.2 2001/11/07 15:58:50 tneale
* Update for newest file layout
*
* Revision 1.1.1.1 2001/11/05 17:47:09 tneale
* Tornado shuffle
*
* Revision 1.10.4.3 2001/09/21 18:30:05 josh
* updating porting files with new information for proxy and
* coexistence
*
* Revision 1.10.4.2 2001/08/24 15:35:19 josh
* add nonvolatile access definitions for proxy and community tables
*
* Revision 1.10.4.1 2001/08/24 14:59:45 josh
* definition for generic (unix) proxy send routine
*
* Revision 1.10 2001/01/19 22:22:57 paul
* Update copyright.
*
* Revision 1.9 2000/06/09 14:57:34 josh
* updating header files to correspond with new installation options and
* new code
*
* Revision 1.8 2000/03/17 00:09:56 meister
* Update copyright message
*
* Revision 1.7 1999/11/10 22:16:33 josh
* adding prototype for envoy_ax_translate_context()
*
* Revision 1.6 1999/10/19 15:15:28 josh
* added NV macros for Notify code
*
* Revision 1.5 1999/05/27 16:16:30 josh
* added context translation userexit, ENVOY_AX_TRANSLATE_CONTEXT
*
* Revision 1.4 1998/07/20 01:49:37 sar
* Add () to the FINISHED and ENVOY_TIME macros
*
* Revision 1.3 1998/07/06 01:06:53 sar
* Add a void to make compilers happy
*
* Revision 1.2 1998/07/01 17:06:55 josh
* include snark/h/bug_conf.h when appropriate
*
* Revision 1.1 1998/06/21 21:48:47 sar
* first revision
*
*/
/* [clearcase]
modification history
-------------------
*/
/*
* Fun with our new run-time debugging facility.
* This is still experimental, and defaults to uninstalled.
*/
#if defined(INSTALL_SNARK_BUG_CONF) && INSTALL_SNARK_BUG_CONF
#include <wrn/wm/demo/bug_conf.h>
#endif
/*****************************************************************
This is a generic version of envoy.h for use with the example
code. It contains all the macros and definitions that are
common to all of the demo code. Any platform specific information
should be placed in the platforme specific files. The platform
specific files should include this file twice, once when the
preamble flag is on and once when it isn't.
In general customers will have one envoy.h file per platform
that combines this file and the platform specific information,
we use two files as there is a lot of shared code between our
demos.
*****************************************************************/
#ifdef CONFIG_PREAMBLE
/*****************************************************************
System Includes:
Envoy uses memcpy(), memset(), and strlen(). The appropriate
include file should be put here to see that these routines are
properly declared. If no such include file exists on the system
then declare memcpy() and memset() here directly. Envoy also
uses min() and max(). Include the system's definition or use the
macros supplied below.
If necessary these should be in the platform specific files
*****************************************************************/
/*****************************************************************
Memory allocation routines. Envoy needs to allocate memory to
decode the packet into and also to store the response data
Make sure that the routines used by the SNMP_memory_alloc() and
SNMP_memory_free() macros are declared. If system memory routines
are used (e.g. malloc() and free()) then include the appropriate
system header file here.
If necessary these should be defined in the platform specific files.
*****************************************************************/
/*****************************************************************
Size limitations.
Define the maximum packet size this implementation will accept.
There is no hard upper limit. SNMP_MAX_PACKET_SIZE should not
be reduced below the value of SNMP_MIN_PACKET_SIZE, and
SNMP_MIN_PACKET_SIZE shouldn't be changed.
Also define the maximum number of components for an object identifer
which we should be able to handle, including those in the instance.
The first, MAX, should be the same as DECORUM_MAX_PACKET_SIZE in decorum.h
*****************************************************************/
#define SNMP_MAX_PACKET_SIZE 8192
#define SNMP_MIN_PACKET_SIZE 484
#define MAX_OID_COUNT 32
/*****************************************************************
Demo lock structure. This lock is for testing purposes only.
You will probably want to change this to suit your system.
*****************************************************************/
#if (INSTALL_ENVOY_SNMP_LOCK)
typedef struct ENVOY_LOCK_S
{
int readers;
int writers;
} ENVOY_LOCK_T;
#endif
#else /* config preamble */
/*****************************************************************
The following macro definitions allow access to the user configurable
part of the SNMP code.
Include any declarations needed for the routines specified below
by the macros. Don't put <snmp.h> here because this file is
included by that one.
We start with the more generic macros and then get into macros
required by specific options.
*****************************************************************/
/****************************************************************
SNMP_release_private
Get rid of a any private data attached to the packet
structure. May be left undefined in which case nothing
is done with the private field when the SNMP packet
structure is freed.
proxy_release_private is part of the code for demoing
proxies
Parameters: SNMP_PKT_T *pkt The packet itself
Returns: Nothing
#define SNMP_release_private(pkt) release_private(pkt)
*****************************************************************/
#if (INSTALL_ENVOY_SNMP_PROXY)
extern void proxy_release_private __((SNMP_PKT_T *));
#define SNMP_release_private(pkt) proxy_release_private(pkt)
#endif
/*****************************************************************
SNMP_user_get_encode_buffer
Allows the user the opportunity to get the buffer that the SNMP
packet will be encoded into. If not used then leave undefined.
Parameters:
SNMP_PKT_T *pkt The packet being encoded.
unsigned int need The amount of storage needed.
EBUFFER_T *ebuffp The ebuffer to fill in with the actual
buffer.
Returns:
0 successful
1 not successful
#define SNMP_user_get_encode_buffer(pkt, need, ebuffp) 0
****************************************************************/
/*****************************************************************
SNMP_trace_input
SNMP_trace_output
for implementing packet tracing through the SNMP code.
May not be left undefined but may instead be defined as nothing.
Parameters:
SNMP_PKT_T *pkt The packet being traced
Returns: Nothing
****************************************************************/
#define SNMP_TRACE_INPUT(pkt)
#define SNMP_TRACE_OUTPUT(pkt)
/*****************************************************************
The next series of macros are hooks into the processing of SET PDUs.
For most uses you should be able to leave these undefined.
SNMP_validate_set_pdu -- Perform a global validation of a SET PDU.
SNMP_user_pre_set -- Perform a global validation of a SET PDU
after all of the test procedures have been
called and given the "go ahead".
SNMP_user_post_set -- Perform any final activities after all
the set procedures have been called.
Parameters: SNMP_PKT_T *pkt The packet itself
Returns for SNMP_Validate_set_pdu and SNMP_user_pre_set:
-1 If the PDU is bad and should be rejected with a GEN_ERR.
0 If the PDU is good and normal handling should proceed.
+1 If the PDU is good and this routine has performed all of
the set operations internally.
Returns for SNMP_user_post_set: nothing
#define SNMP_validate_set_pdu(pkt) validate_set_pdu(pkt)
#define SNMP_user_pre_set(pkt) user_pre_set(pkt)
#define SNMP_user_post_set(pkt) user_post_set(pkt)
*****************************************************************/
/*****************************************************************
Timer routines. These connect the Envoy timer routines to the
system. These are required for some of the options.
ENVOY_CALL_TIMER - this routine should cause the system to call
the handler routine in the specified number
of milliseconds.
ENVOY_NOW - this routine returns a clock with millisecond
granularity. If attache is installed it can
be defined to be glue_now. We don't do that
here so that this file can be used by multiple
demos. Instead we define envoy_now() which
may be the real function or may simply be a shim.
*****************************************************************/
extern void envoy_call_timer __((bits32_t, void (*)(void)));
#define ENVOY_CALL_TIMER(T, H) envoy_call_timer(T, H)
extern bits32_t envoy_now __((void));
#define ENVOY_NOW() envoy_now()
/******************************************************************
SNMP_validate_community
Check an operation against the community name. If the community
is accepted this routine must set the view mask, number or name
(depending on the view scheme in use) and attach the source and
destination addresses to the packet. It may attach proxy information
to the packet or choose a non-default mib tree for use with the
give community.
This routine may hang additional data onto the "private" field of
the packet structure. The user will be given the opportinity to
release that memory via SNMP_release_private().
Parameters:
SNMP_PKT_T *pkt The received packet (decoded format)
SNMPADDR_T *src Source of the packet
SNMPADDR_T *dst Destination of the packet (most likely
the address of the machine on which this
code is running.)
Returns:
0 - community is ok and processing should continue
1 - community isn't okay, drop the packet, any stats have been updated
2 - community isn't okay, drop the packet, update BadCommunityNames
3 - community isn't okay, drop the packet, update BadCommunityUses
*****************************************************************/
extern int validate_SNMP_community __((SNMP_PKT_T *,
SNMPADDR_T *,
SNMPADDR_T *));
#define SNMP_validate_community(p, s, d) validate_SNMP_community(p, s, d)
/*****************************************************************
The following are a series of macros that will connect the method
routines we supplied for the RFC1445 or RFC2275 view schemes to
your non-volatile storage areas. You should consult the manuals
for more information about these macros.
*****************************************************************/
#if (INSTALL_ENVOY_SNMP_RFC1445_VIEWS)
#include <wrn/wm/demo/nvutils.h>
#define SNMP_VIEW_CREATE_TEST(PKT, NEW) SNMP_NV_View_Add_Mod(NEW, 0)
#define SNMP_VIEW_UPDATE_TEST(PKT, OLD, NEW) SNMP_NV_View_Add_Mod(NEW, 0)
#define SNMP_VIEW_DESTROY_TEST(PKT, OLD) SNMP_NV_View_Add_Mod(OLD, 1)
#define SNMP_VIEW_BACKOUT_HOOK(NEW) SNMP_NV_Clean()
#define SNMP_VIEW_CREATE_UNDO(NEW) (SNMP_NV_Clean(), 0)
#define SNMP_VIEW_UPDATE_UNDO(OLD, NEW) (SNMP_NV_Clean(), 0)
#define SNMP_VIEW_DESTROY_UNDO(OLD) (SNMP_NV_Clean(), 0)
#define SNMP_VIEW_DESTROY_BACKOUT(OLD) SNMP_NV_Clean()
#define SNMP_VIEW_FINISHED SNMP_NV_Doit()
#endif /* #if (INSTALL_ENVOY_SNMP_RFC1445_VIEWS) */
#if (INSTALL_ENVOY_SNMP_RFC2275_VIEWS)
#include <wrn/wm/demo/nvutils.h>
#define SNMP_VIEW_2275_DESTROY_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_View_2275_Add_Mod(CUR, NEW, NV_MOD_DESTROY)
#define SNMP_VIEW_2275_CREATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_View_2275_Add_Mod(CUR, NEW, 0)
#define SNMP_VIEW_2275_UPDATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_View_2275_Add_Mod(CUR, NEW, 0)
#define SNMP_VIEW_2275_DESTROY_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_VIEW_2275_CREATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_VIEW_2275_UPDATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_VIEW_2275_CREATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_VIEW_2275_UPDATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_VIEW_2275_DESTROY_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_VIEW_2275_FINISHED() SNMP_NV_Doit()
#endif /* #if (INSTALL_ENVOY_SNMP_RFC2275_VIEWS) */
/*****************************************************************
If version 3 is installed we may need the following macros.
ENVOY_TIME - returns a clock with a granularity of seconds
PARAMETERS: none
returns: bits32_t
SNMP_validate_address
This routine gives the user a chance to examine the address
information as well as most of the packet itself before a v3
packet is processed. The routine must attach the address
information to the packet. It may attach a non-default mib
tree if desired. Note: in some error cases the packet will
not be decoded when this routine is called.
Parameters:
SNMP_PKT_T *pkt The received packet (decoded format)
SNMPADDR_T *src Source of the packet
SNMPADDR_T *dst Destination of the packet (most likely
the address of the machine on which this
code is running.)
returns:
0 - ok
1 - failure, drop the packet
Lastly are are a series of macros that will connect the method
routines we supplied for the v3 tables to your non-volatile
storage areas. You should consult the manuals for more information
about these macros.
*****************************************************************/
#if INSTALL_ENVOY_SNMP_VERSION_3
#include <wrn/wm/demo/nvutils.h>
extern long time(long *);
#define ENVOY_TIME() (time((long *) 0))
extern int validate_SNMP_V3_address __((SNMP_PKT_T *,
SNMPADDR_T *,
SNMPADDR_T *));
#define SNMP_validate_address(p, s, d) validate_SNMP_V3_address(p, s, d)
#define SNMP_V3_GROUP_DESTROY_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_Group_Add_Mod(CUR, NEW, NV_MOD_DESTROY)
#define SNMP_V3_GROUP_CREATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_Group_Add_Mod(CUR, NEW, 0)
#define SNMP_V3_GROUP_UPDATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_Group_Add_Mod(CUR, NEW, 0)
#define SNMP_V3_GROUP_DESTROY_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_GROUP_CREATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_GROUP_UPDATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_GROUP_CREATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_GROUP_UPDATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_GROUP_DESTROY_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_GROUP_FINISHED() SNMP_NV_Doit()
#define SNMP_V3_ACCESS_DESTROY_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_Access_Add_Mod(CUR, NEW, NV_MOD_DESTROY)
#define SNMP_V3_ACCESS_CREATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_Access_Add_Mod(CUR, NEW, 0)
#define SNMP_V3_ACCESS_UPDATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_Access_Add_Mod(CUR, NEW, 0)
#define SNMP_V3_ACCESS_DESTROY_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_ACCESS_CREATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_ACCESS_UPDATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_ACCESS_CREATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_ACCESS_UPDATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_ACCESS_DESTROY_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_ACCESS_FINISHED() SNMP_NV_Doit()
#define SNMP_V3_USER_DESTROY_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_User_Add_Mod(CUR, NEW, NV_MOD_DESTROY)
#define SNMP_V3_USER_CREATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_User_Add_Mod(CUR, NEW, 0)
#define SNMP_V3_USER_UPDATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_User_Add_Mod(CUR, NEW, 0)
#define SNMP_V3_USER_DESTROY_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_USER_CREATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_USER_UPDATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_USER_CREATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_USER_UPDATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_USER_DESTROY_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_USER_FINISHED() SNMP_NV_Doit()
#define SNMP_V3_TADDR_DESTROY_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_TAddr_Add_Mod(CUR, NEW, NV_MOD_DESTROY)
#define SNMP_V3_TADDR_CREATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_TAddr_Add_Mod(CUR, NEW, 0)
#define SNMP_V3_TADDR_UPDATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_TAddr_Add_Mod(CUR, NEW, 0)
#define SNMP_V3_TADDR_DESTROY_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_TADDR_CREATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_TADDR_UPDATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_TADDR_CREATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_TADDR_UPDATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_TADDR_DESTROY_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_TADDR_FINISHED() SNMP_NV_Doit()
#define SNMP_V3_TPARAM_DESTROY_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_TParam_Add_Mod(CUR, NEW, NV_MOD_DESTROY)
#define SNMP_V3_TPARAM_CREATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_TParam_Add_Mod(CUR, NEW, 0)
#define SNMP_V3_TPARAM_UPDATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_TParam_Add_Mod(CUR, NEW, 0)
#define SNMP_V3_TPARAM_DESTROY_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_TPARAM_CREATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_TPARAM_UPDATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_TPARAM_CREATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_TPARAM_UPDATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_TPARAM_DESTROY_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_TPARAM_FINISHED() SNMP_NV_Doit()
#define SNMP_V3_NOTIFY_DESTROY_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_Notify_Add_Mod(CUR, NEW, NV_MOD_DESTROY)
#define SNMP_V3_NOTIFY_CREATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_Notify_Add_Mod(CUR, NEW, 0)
#define SNMP_V3_NOTIFY_UPDATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_Notify_Add_Mod(CUR, NEW, 0)
#define SNMP_V3_NOTIFY_DESTROY_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_NOTIFY_CREATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_NOTIFY_UPDATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_NOTIFY_CREATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_NOTIFY_UPDATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_NOTIFY_DESTROY_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_NOTIFY_FINISHED() SNMP_NV_Doit()
#define SNMP_V3_NPROF_DESTROY_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_NProf_Add_Mod(CUR, NEW, NV_MOD_DESTROY)
#define SNMP_V3_NPROF_CREATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_NProf_Add_Mod(CUR, NEW, 0)
#define SNMP_V3_NPROF_UPDATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_NProf_Add_Mod(CUR, NEW, 0)
#define SNMP_V3_NPROF_DESTROY_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_NPROF_CREATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_NPROF_UPDATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_NPROF_CREATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_NPROF_UPDATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_NPROF_DESTROY_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_NPROF_FINISHED() SNMP_NV_Doit()
#define SNMP_V3_NFILT_DESTROY_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_NFilt_Add_Mod(CUR, NEW, NV_MOD_DESTROY)
#define SNMP_V3_NFILT_CREATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_NFilt_Add_Mod(CUR, NEW, 0)
#define SNMP_V3_NFILT_UPDATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_NFilt_Add_Mod(CUR, NEW, 0)
#define SNMP_V3_NFILT_DESTROY_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_NFILT_CREATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_NFILT_UPDATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_NFILT_CREATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_NFILT_UPDATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_NFILT_DESTROY_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_NFILT_FINISHED() SNMP_NV_Doit()
#define SNMP_V3_PROXY_DESTROY_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_Proxy_Add_Mod(CUR, NEW, NV_MOD_DESTROY)
#define SNMP_V3_PROXY_CREATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_Proxy_Add_Mod(CUR, NEW, 0)
#define SNMP_V3_PROXY_UPDATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_V3_Proxy_Add_Mod(CUR, NEW, 0)
#define SNMP_V3_PROXY_DESTROY_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_PROXY_CREATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_PROXY_UPDATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_PROXY_CREATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_PROXY_UPDATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_PROXY_DESTROY_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_PROXY_FINISHED() SNMP_NV_Doit()
#define SNMP_V3_COMM_DESTROY_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_Community_Add_Mod(CUR, NEW, NV_MOD_DESTROY)
#define SNMP_V3_COMM_CREATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_Community_Add_Mod(CUR, NEW, 0)
#define SNMP_V3_COMM_UPDATE_TEST(PKT, VBP, CUR, NEW) \
SNMP_NV_Community_Add_Mod(CUR, NEW, 0)
#define SNMP_V3_COMM_DESTROY_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_COMM_CREATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_COMM_UPDATE_BACKOUT(CUR, NEW) SNMP_NV_Clean()
#define SNMP_V3_COMM_CREATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_COMM_UPDATE_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_COMM_DESTROY_UNDO(PKT, VBP, CUR, SAV) (SNMP_NV_Clean(), 0)
#define SNMP_V3_COMM_FINISHED() SNMP_NV_Doit()
#if INSTALL_ENVOY_SNMP_V3_PROXY
#if INSTALL_ATTACHE
void envoy_snmp_send_proxy __((SNMPADDR_T *, SNMPADDR_T *,
PTR_T, ALENGTH_T));
#define ENVOY_SNMP_SEND_PROXY(FOR, LOC, PKT, SIZ) \
envoy_snmp_send_proxy((FOR), (LOC), (PKT), (SIZ))
#endif
#endif /* #if INSTALL_ENVOY_SNMP_V3_PROXY */
#endif /* #if INSTALL_ENVOY_SNMP_VERSION_3 */
/*****************************************************************
If usec is installed we may need the following macros.
NOTE WELL: usec was an experimental protocol for providing security
to snmp. It has been superseeded by v3. It should not be used and
will be removed in a future release.
SNMP_USECTIME - returns a clock with a granularity of seconds
*****************************************************************/
#if (INSTALL_ENVOY_SNMP_VERSION_USEC)
typedef long USECTIME_T;
extern long time(long *);
#define SNMP_USECTIME ((USECTIME_T)time((long *)0))
#endif /* INSTALL_ENVOY_SNMP_VERSION_USEC */
/*****************************************************************
A macro for use with the epilogue master agent.
*****************************************************************/
#if (INSTALL_ENVOY_EPI_MASTER)
#define SNMP_RESETSYSUPTIME
#endif
#if (INSTALL_ENVOY_AGENTX_MASTER) || (INSTALL_ENVOY_ENTITY_MIB)
extern bits32_t envoy_get_sysuptime(void);
#define ENVOY_GET_SYSUPTIME(CON) envoy_get_sysuptime()
#endif /* #if (INSTALL_ENVOY_AGENTX_MASTER) || (INSTALL_ENVOY_ENTITY_MIB) */
/*****************************************************************
AgentX routines and macros for the master
Defaults are fine for the following macros:
#define ENVOY_AX_DEFAULT_TIMEOUT 1
#define ENVOY_AX_FIND_MIB(CONTEXT) (EBufferUsed(CONTEXT) ? 0 : &mib_root_node)
#define ENVOY_AX_MA_AC_ADD(PKTP, MIBROOT) GEN_ERR
#define ENVOY_AX_MA_AC_REMOVE(PKTP, MIBROOT) GEN_ERR
#define ENVOY_AX_MA_AC_CLEAN(SESS_ID)
*****************************************************************/
#if INSTALL_ENVOY_AGENTX_MASTER
extern sbits32_t envoy_ax_transport_type(ptr_t);
extern int envoy_ax_transport_string(ptr_t, ALENGTH_T *,
bits8_t **, int *);
extern void envoy_ax_translate_context(SNMP_PKT_T *pktp,
struct ENVOY_AX_PKT_S *query_pkt);
#define ENVOY_AX_TRANSPORT_TYPE(COOKIE) envoy_ax_transport_type(COOKIE)
#define ENVOY_AX_TRANSPORT_STRING(COOKIE, NEED, BUF, DYN) \
envoy_ax_transport_string(COOKIE, NEED, BUF, DYN)
#define ENVOY_AX_TRANSPORTS_SUPPORTED {0}
#define ENVOY_AX_TRANSLATE_CONTEXT(PKT, AX_PKT) \
envoy_ax_translate_context(PKT, AX_PKT)
#endif /* #if INSTALL_ENVOY_AGENTX_MASTER */
/*****************************************************************
AgentX routines and macros for the sub agent
Defaults are fine for the following macros:
#define ENVOY_AX_SA_MIB_ROOT_NODE(CKE, PKT) 0
#define ENVOY_AX_SA_TIMEOUT 1000
*****************************************************************/
/*****************************************************************
Lock Test Code:
The following macros define a simple example to test the locking
code. NOTE WELL: this code doesn't block and so is not acceptable
for use as the locking code, it is only here for test purposes.
A lock is 2 uints one for reading and one for writing. When a
routine gets a lock the value is incremented by 1, when a routine
frees a lock it is decremented by 1. We are allowing multiple
readers and one writer. As this code can't block we simply return
an error if we can't get a lock, real locking code must block in
that case.
*****************************************************************/
#if (INSTALL_ENVOY_SNMP_LOCK)
#define ENVOY_SNMP_LOCK(name) ENVOY_LOCK_T name = {0, 0}
#define ENVOY_SNMP_LOCK_EXTERN(name) extern ENVOY_LOCK_T name
#define ENVOY_SNMP_INIT_LOCK(name) ((name).readers = 0, (name).writers = 0)
#define ENVOY_SNMP_GET_READ_LOCK(name) \
(((name).writers) ? 1 : ((name).readers++, 0))
#define ENVOY_SNMP_RELEASE_READ_LOCK(name) ((name).readers--)
#define ENVOY_SNMP_GET_WRITE_LOCK(name) \
(((name).readers || (name).writers) ? 1 : ((name).writers++, 0))
#define ENVOY_SNMP_RELEASE_WRITE_LOCK(name) ((name).writers--)
#endif /* (INSTALL_ENVOY_SNMP_LOCK) */
#endif /* CONFIG_PREAMBLE */
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,56 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/isisnmp/common.h,v 1.1.1.1 2001/11/05 17:47:09 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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:09 tneale
* Tornado shuffle
*
* Revision 1.3 2001/01/19 22:22:57 paul
* Update copyright.
*
* Revision 1.2 2000/03/17 00:10:00 meister
* Update copyright message
*
* Revision 1.1 1998/06/28 21:18:27 josh
* updating/bugfixing for SNMp
*
*/
/* [clearcase]
modification history
-------------------
*/
/*
* NIY....
*/
#ifdef CONFIG_PREAMBLE
#if INSTALL_BUG
#define BUG_OUT stdout
#define BUG(w,x,y,z) fprintf z; fprintf (stdout, "\n");
#endif
#else /* CONFIG_PREAMBLE */
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,815 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/isisnmp/envoy.h,v 1.2 2001/11/09 17:45:08 josh Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: envoy.h,v $
* Revision 1.2 2001/11/09 17:45:08 josh
* pSOS-related path fixes
*
* Revision 1.1.1.1 2001/11/05 17:47:09 tneale
* Tornado shuffle
*
* Revision 1.13.4.1 2001/09/21 18:30:06 josh
* updating porting files with new information for proxy and
* coexistence
*
* Revision 1.13 2001/01/19 22:22:57 paul
* Update copyright.
*
* Revision 1.12 2000/06/09 14:57:35 josh
* updating header files to correspond with new installation options and
* new code
*
* Revision 1.11 2000/04/05 19:40:51 josh
* clearing up some additional warnings for pSOS+ 3.0
*
* Revision 1.10 2000/03/17 00:10:01 meister
* Update copyright message
*
* Revision 1.9 1999/11/10 22:15:31 josh
* adding support for the envoy_ax_translate_context userexit
*
* Revision 1.8 1999/11/10 18:28:05 josh
* adding notification support to pSOS Envoy and fixing a few bugs
*
* Revision 1.7 1998/09/22 03:28:35 sar
* correct a typo in a type
*
* Revision 1.6 1998/09/16 19:54:30 sar
* Fixed up some user exits to allow binary customers a standard api
*
* Revision 1.5 1998/08/19 20:03:16 josh
* removing extraneous () from things
*
* Revision 1.4 1998/08/13 22:56:05 josh
* bringing in line with latest code changes
*
* Revision 1.3 1998/08/13 20:11:31 josh
* updates for pSOS
*
* Revision 1.2 1998/06/28 21:18:28 josh
* updating/bugfixing for SNMp
*
* Revision 1.1 1998/06/19 16:09:05 josh
* port files for building SNMp
*
*/
/* [clearcase]
modification history
-------------------
*/
#if INSTALL_ON_ISIX86
#ifndef NVRAM_START
#define NVRAM_START 0xf000
#endif
#ifndef P386
#define P386 1
#endif
#endif
#ifdef CONFIG_PREAMBLE
#include <string.h>
extern void * SNMP_memory_alloc(int );
extern void SNMP_memory_free(void *);
/* pSOS port */
extern int max_packet_size;
extern int max_oid_count;
extern int protect_critical_section;
/*----------------------------------------------------------------------*/
/* To tailor snmp for different applications */
/*----------------------------------------------------------------------*/
typedef struct snmp_cfg
{
/*--------------------------------------------------------------------*/
/* Maximum snmp packet size this entity allows. */
/*--------------------------------------------------------------------*/
int max_packet_size;
/*--------------------------------------------------------------------*/
/* Maximum number of oid components allowed in a valid object id. */
/*--------------------------------------------------------------------*/
int max_oid_count;
/*--------------------------------------------------------------------*/
/* snmp enters critical section before the testproc and leaves it */
/* after it has returned from the setproc/getproc. Application should*/
/* indicate whether to turn off task preemption globally when entering*/
/* the critical section and to turn it back on at exit. If this is */
/* set to FALSE, then the testproc/setproc/getproc for each individual*/
/* mib object should properly implement the necessary locking */
/* mechanism to ensure the atomicity of the GET/SET operations. */
/*--------------------------------------------------------------------*/
int protect_critical_section; /* TRUE/FALSE */
} snmp_cfg;
extern void SNMP_Init(snmp_cfg *);
/* pSOS port */
/*----------------------------------------------------------------------*/
/* locks for local databases access */
/*----------------------------------------------------------------------*/
typedef struct
{
unsigned char type; /* READLOCK or WRITELOCK */
#define NO_LOCK 0x0
#define READLOCK 0x1
#define WRITELOCK 0x2
unsigned long sema; /* Semaphore id */
int count; /* how many readlocks obtained */
} LOCK_T;
#define ENVOY_LOCK_T LOCK_T
#else
/* This first should be the same as DECORUM_MAX_PACKET_SIZE in decorum.h */
#define SNMP_MAX_PACKET_SIZE max_packet_size
#define SNMP_MIN_PACKET_SIZE 484
#define MAX_OID_COUNT max_oid_count
#define validate_SNMP_version(x) ((x) == SNMP_VERSION_1)
extern int validate_SNMP_community
__((SNMP_PKT_T *, SNMPADDR_T *, SNMPADDR_T *));
/*----------------------------------------------------------------
SNMP_validate_community -- Check an operation against the community name.
Parameters:
SNMP_PKT_T *pkt The received packet (decoded format)
SNMPADDR_T *src Source of the packet
SNMPADDR_T *dst Destination of the packet (most likely
the address of the machine on which this
code is running.)
Returns:
This procedure should return 0 if happy with the community and
1 if not.
This routine should fill in the packet structure with the mib
view mask associated with the community string.
This routine may hang additional data onto the "private" field of
the packet structure. The user will be given the opportinity to
release that memory via SNMP_release_private().
----------------------------------------------------------------*/
#define SNMP_validate_community(x, y, z) validate_SNMP_community(x,y,z)
/*----------------------------------------------------------------
SNMP_release_private -- Get rid of a any private data attached to the packet
structure. May be left undefined in which case nothing
is done with the private field when the SNMP packet
structure is freed.
Parameters:
SNMP_PKT_T *pkt The packet itself
Returns: Nothing
----------------------------------------------------------------*/
extern void release_private __((SNMP_PKT_T *));
#define SNMP_release_private(pkt) release_private(pkt)
/*----------------------------------------------------------------
SNMP_user_get_encode_buffer -- Allows the user the opportunity to get the
buffer that the SNMP packet will be encoded into.
If not used then leave undefined.
Parameters:
SNMP_PKT_T *pkt The packet being encoded.
unsigned int need The amount of storage needed.
EBUFFER_T *ebuffp The ebuffer to fill in with the actual
buffer.
Returns:
0 successful
1 not successful
----------------------------------------------------------------*/
extern int user_get_encode_buffer(SNMP_PKT_T *, unsigned int, EBUFFER_T *);
#define SNMP_user_get_encode_buffer(pkt, need, ebuffp) \
user_get_encode_buffer(pkt, need, ebuffp)
/*----------------------------------------------------------------
SNMP_trace_input
SNMP_trace_output
-- for implementing packet tracing through the
SNMP code. May not be left undefined but may
instead be defined as nothing.
Parameters:
SNMP_PKT_T *pkt The packet being traced
Returns: Nothing
----------------------------------------------------------------*/
extern void TRACE_INPUT(SNMP_PKT_T *pkt);
extern void TRACE_OUTPUT(SNMP_PKT_T *pkt);
#define SNMP_TRACE_INPUT(pkt) TRACE_INPUT(pkt)
#define SNMP_TRACE_OUTPUT(pkt) TRACE_OUTPUT(pkt)
/*****************************************************************
* The next series of macros are hooks into the processing of SET PDUs.
* For most uses you should be able to leave these undefined.
*****************************************************************/
/*----------------------------------------------------------------
SNMP_validate_set_pdu -- Perform a global validation of a SET PDU.
Parameters:
SNMP_PKT_T *pkt The packet itself
Returns:
-1 If the PDU is bad and should be rejected with a GEN_ERR.
0 If the PDU is good and normal handling should proceed.
+1 If the PDU is good and this routine has performed all of
the set operations internally.
----------------------------------------------------------------*/
extern int validate_set_pdu(SNMP_PKT_T *pkt);
#define SNMP_validate_set_pdu(pkt) validate_set_pdu(pkt)
/*----------------------------------------------------------------
SNMP_user_pre_set -- Perform a global validation of a SET PDU after all of the
test procedures have been called and given the "go ahead".
Parameters:
SNMP_PKT_T *pkt The packet itself
Returns:
-1 If the PDU is bad and should be rejected with a GEN_ERR.
0 If the PDU is good and normal handling should proceed.
+1 If the PDU is good and this routine has performed all of
the set operations internally.
----------------------------------------------------------------*/
extern int user_pre_set(SNMP_PKT_T *pkt);
#define SNMP_user_pre_set(pkt) user_pre_set(pkt)
/*----------------------------------------------------------------
SNMP_user_post_set -- Perform any final activities after all of the set
procedures have been called.
Parameters:
SNMP_PKT_T *pkt The packet itself
Returns: Nothing
----------------------------------------------------------------*/
extern void user_post_set(SNMP_PKT_T *pkt);
#define SNMP_user_post_set(pkt) user_post_set(pkt)
/*****************************************************************
The following are a series of macros that will connect the method
routines we supplied for the RFC1445 or RFC2275 view schemes to
your non-volatile storage areas. You should consult the manuals
for more information about these macros.
*****************************************************************/
#if (INSTALL_ENVOY_SNMP_RFC1445_VIEWS)
#include <wrn/wm/demo/nvutils.h>
#define SNMP_VIEW_CREATE_TEST(PKT, NEW) SNMP_NV_View_Add_Mod(NEW, 0)
#define SNMP_VIEW_UPDATE_TEST(PKT, OLD, NEW) SNMP_NV_View_Add_Mod(NEW, 0)
#define SNMP_VIEW_DESTROY_TEST(PKT, OLD) SNMP_NV_View_Add_Mod(OLD, 1)
#define SNMP_VIEW_BACKOUT_HOOK(NEW) SNMP_NV_Clean()
#define SNMP_VIEW_CREATE_UNDO(NEW) (SNMP_NV_Clean(), 0)
#define SNMP_VIEW_UPDATE_UNDO(OLD, NEW) (SNMP_NV_Clean(), 0)
#define SNMP_VIEW_DESTROY_UNDO(OLD) (SNMP_NV_Clean(), 0)
#define SNMP_VIEW_DESTROY_BACKOUT(OLD) SNMP_NV_Clean()
#define SNMP_VIEW_FINISHED SNMP_NV_Doit()
#endif /* #if (INSTALL_ENVOY_SNMP_RFC1445_VIEWS) */
#if (INSTALL_ENVOY_SNMP_RFC2275_VIEWS)
#include <wrn/wm/demo/nvutils.h>
#define SNMP_VIEW_2275_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_view_2275_test(PKT, VBP, CUR, NEW)
#define SNMP_VIEW_2275_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_view_2275_test(PKT, VBP, CUR, NEW)
#define SNMP_VIEW_2275_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_view_2275_test(PKT, VBP, CUR, NEW)
#define SNMP_VIEW_2275_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_view_2275_set(PKT, VBP, CUR, NEW)
#define SNMP_VIEW_2275_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_view_2275_set(PKT, VBP, CUR, NEW)
#define SNMP_VIEW_2275_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_view_2275_set(PKT, VBP, CUR, NEW)
#define SNMP_VIEW_2275_DESTROY_BACKOUT(CUR, NEW) \
snmp_view_2275_backout(CUR, NEW)
#define SNMP_VIEW_2275_CREATE_BACKOUT(CUR, NEW) \
snmp_view_2275_backout(CUR, NEW)
#define SNMP_VIEW_2275_UPDATE_BACKOUT(CUR, NEW) \
snmp_view_2275_backout(CUR, NEW)
#define SNMP_VIEW_2275_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_view_2275_undo(PKT, VBP, CUR, SAV)
#define SNMP_VIEW_2275_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_view_2275_undo(PKT, VBP, CUR, SAV)
#define SNMP_VIEW_2275_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_view_2275_undo(PKT, VBP, CUR, SAV)
#define SNMP_VIEW_2275_FINISHED() snmp_view_2275_finished()
#endif /* #if (INSTALL_ENVOY_SNMP_RFC2275_VIEWS) */
/*****************************************************************
If version 3 is installed we may need the following macros.
ENVOY_TIME - returns a clock with a granularity of seconds
PARAMETERS: none
returns: bits32_t
SNMP_validate_address
This routine gives the user a chance to examine the address
information as well as most of the packet itself before a v3
packet is processed. The routine must attach the address
information to the packet. It may attach a non-default mib
tree if desired. Note: in some error cases the packet will
not be decoded when this routine is called.
Parameters:
SNMP_PKT_T *pkt The received packet (decoded format)
SNMPADDR_T *src Source of the packet
SNMPADDR_T *dst Destination of the packet (most likely
the address of the machine on which this
code is running.)
returns:
0 - ok
1 - failure, drop the packet
Lastly are are a series of macros that will connect the method
routines we supplied for the v3 tables to your non-volatile
storage areas. You should consult the manuals for more information
about these macros.
*****************************************************************/
#if INSTALL_ENVOY_SNMP_VERSION_3
#include <wrn/wm/demo/nvutils.h>
extern bits32_t get_curtime(void);
#define ENVOY_TIME() get_curtime()
extern int validate_SNMP_address __((SNMP_PKT_T *,
SNMPADDR_T *,
SNMPADDR_T *));
#define SNMP_validate_address(p, s, d) validate_SNMP_address(p, s, d)
#if INSTALL_ENVOY_SNMP_V3_TARGET
extern int envoy_snmpaddr_to_taddress __((SNMPADDR_T *, OBJ_ID_T *,
EBUFFER_T *));
extern int envoy_taddress_to_snmpaddr __((SNMPADDR_T *, OBJ_ID_T *,
EBUFFER_T *));
#define ENVOY_TADDRESS_TO_SNMPADDR(A, D, T) \
envoy_taddress_to_snmpaddr(A, D, T)
#define ENVOY_SNMPADDR_TO_TADDRESS(A, D, T) \
envoy_snmpaddr_to_taddress(A, D, T)
#endif
#define SNMP_V3_GROUP_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_group_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_GROUP_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_group_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_GROUP_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_group_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_GROUP_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_v3_group_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_GROUP_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_group_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_GROUP_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_group_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_GROUP_DESTROY_BACKOUT(CUR, NEW) \
snmp_v3_group_backout(CUR, NEW)
#define SNMP_V3_GROUP_CREATE_BACKOUT(CUR, NEW) \
snmp_v3_group_backout(CUR, NEW)
#define SNMP_V3_GROUP_UPDATE_BACKOUT(CUR, NEW) \
snmp_v3_group_backout(CUR, NEW)
#define SNMP_V3_GROUP_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_group_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_GROUP_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_group_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_GROUP_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_group_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_GROUP_FINISHED() snmp_v3_group_finished()
#define SNMP_V3_ACCESS_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_access_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_ACCESS_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_access_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_ACCESS_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_access_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_ACCESS_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_v3_access_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_ACCESS_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_access_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_ACCESS_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_access_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_ACCESS_DESTROY_BACKOUT(CUR, NEW) \
snmp_v3_access_backout(CUR, NEW)
#define SNMP_V3_ACCESS_CREATE_BACKOUT(CUR, NEW) \
snmp_v3_access_backout(CUR, NEW)
#define SNMP_V3_ACCESS_UPDATE_BACKOUT(CUR, NEW) \
snmp_v3_access_backout(CUR, NEW)
#define SNMP_V3_ACCESS_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_access_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_ACCESS_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_access_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_ACCESS_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_access_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_ACCESS_FINISHED() snmp_v3_access_finished()
#define SNMP_V3_USER_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_user_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_USER_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_user_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_USER_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_user_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_USER_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_v3_user_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_USER_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_user_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_USER_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_user_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_USER_DESTROY_BACKOUT(CUR, NEW) \
snmp_v3_user_backout(CUR, NEW)
#define SNMP_V3_USER_CREATE_BACKOUT(CUR, NEW) \
snmp_v3_user_backout(CUR, NEW)
#define SNMP_V3_USER_UPDATE_BACKOUT(CUR, NEW) \
snmp_v3_user_backout(CUR, NEW)
#define SNMP_V3_USER_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_user_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_USER_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_user_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_USER_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_user_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_USER_FINISHED() snmp_v3_user_finished()
#define SNMP_V3_TADDR_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_taddr_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_TADDR_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_taddr_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_TADDR_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_taddr_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_TADDR_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_v3_taddr_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_TADDR_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_taddr_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_TADDR_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_taddr_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_TADDR_DESTROY_BACKOUT(CUR, NEW) \
snmp_v3_taddr_backout(CUR, NEW)
#define SNMP_V3_TADDR_CREATE_BACKOUT(CUR, NEW) \
snmp_v3_taddr_backout(CUR, NEW)
#define SNMP_V3_TADDR_UPDATE_BACKOUT(CUR, NEW) \
snmp_v3_taddr_backout(CUR, NEW)
#define SNMP_V3_TADDR_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_taddr_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_TADDR_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_taddr_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_TADDR_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_taddr_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_TADDR_FINISHED() snmp_v3_taddr_finished()
#define SNMP_V3_TPARAM_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_tparam_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_TPARAM_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_tparam_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_TPARAM_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_tparam_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_TPARAM_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_v3_tparam_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_TPARAM_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_tparam_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_TPARAM_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_tparam_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_TPARAM_DESTROY_BACKOUT(CUR, NEW) \
snmp_v3_tparam_backout(CUR, NEW)
#define SNMP_V3_TPARAM_CREATE_BACKOUT(CUR, NEW) \
snmp_v3_tparam_backout(CUR, NEW)
#define SNMP_V3_TPARAM_UPDATE_BACKOUT(CUR, NEW) \
snmp_v3_tparam_backout(CUR, NEW)
#define SNMP_V3_TPARAM_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_tparam_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_TPARAM_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_tparam_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_TPARAM_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_tparam_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_TPARAM_FINISHED() snmp_v3_tparam_finished()
#define SNMP_V3_NOTIFY_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_notify_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_NOTIFY_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_notify_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_NOTIFY_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_notify_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_NOTIFY_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_v3_notify_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_NOTIFY_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_notify_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_NOTIFY_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_notify_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_NOTIFY_DESTROY_BACKOUT(CUR, NEW) \
snmp_v3_notify_backout(CUR, NEW)
#define SNMP_V3_NOTIFY_CREATE_BACKOUT(CUR, NEW) \
snmp_v3_notify_backout(CUR, NEW)
#define SNMP_V3_NOTIFY_UPDATE_BACKOUT(CUR, NEW) \
snmp_v3_notify_backout(CUR, NEW)
#define SNMP_V3_NOTIFY_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_notify_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_NOTIFY_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_notify_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_NOTIFY_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_notify_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_NOTIFY_FINISHED() snmp_v3_notify_finished()
#define SNMP_V3_NPROF_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_nprof_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_NPROF_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_nprof_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_NPROF_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_nprof_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_NPROF_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_v3_nprof_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_NPROF_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_nprof_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_NPROF_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_nprof_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_NPROF_DESTROY_BACKOUT(CUR, NEW) \
snmp_v3_nprof_backout(CUR, NEW)
#define SNMP_V3_NPROF_CREATE_BACKOUT(CUR, NEW) \
snmp_v3_nprof_backout(CUR, NEW)
#define SNMP_V3_NPROF_UPDATE_BACKOUT(CUR, NEW) \
snmp_v3_nprof_backout(CUR, NEW)
#define SNMP_V3_NPROF_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_nprof_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_NPROF_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_nprof_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_NPROF_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_nprof_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_NPROF_FINISHED() snmp_v3_nprof_finished()
#define SNMP_V3_NFILT_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_nfilt_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_NFILT_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_nfilt_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_NFILT_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_nfilt_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_NFILT_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_v3_nfilt_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_NFILT_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_nfilt_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_NFILT_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_nfilt_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_NFILT_DESTROY_BACKOUT(CUR, NEW) \
snmp_v3_nfilt_backout(CUR, NEW)
#define SNMP_V3_NFILT_CREATE_BACKOUT(CUR, NEW) \
snmp_v3_nfilt_backout(CUR, NEW)
#define SNMP_V3_NFILT_UPDATE_BACKOUT(CUR, NEW) \
snmp_v3_nfilt_backout(CUR, NEW)
#define SNMP_V3_NFILT_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_nfilt_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_NFILT_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_nfilt_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_NFILT_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_nfilt_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_NFILT_FINISHED() snmp_v3_nfilt_finished()
#define SNMP_V3_PROXY_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_proxy_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_PROXY_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_proxy_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_PROXY_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_proxy_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_PROXY_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_v3_proxy_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_PROXY_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_proxy_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_PROXY_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_proxy_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_PROXY_DESTROY_BACKOUT(CUR, NEW) \
snmp_v3_proxy_backout(CUR, NEW)
#define SNMP_V3_PROXY_CREATE_BACKOUT(CUR, NEW) \
snmp_v3_proxy_backout(CUR, NEW)
#define SNMP_V3_PROXY_UPDATE_BACKOUT(CUR, NEW) \
snmp_v3_proxy_backout(CUR, NEW)
#define SNMP_V3_PROXY_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_proxy_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_PROXY_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_proxy_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_PROXY_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_proxy_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_PROXY_FINISHED() snmp_v3_proxy_finished()
#define SNMP_V3_COMM_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_community_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_COMM_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_community_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_COMM_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_community_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_COMM_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_community_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_COMM_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_community_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_COMM_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_community_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_COMM_DESTROY_BACKOUT(CUR, NEW) \
snmp_community_backout(CUR, NEW)
#define SNMP_V3_COMM_CREATE_BACKOUT(CUR, NEW) \
snmp_community_backout(CUR, NEW)
#define SNMP_V3_COMM_UPDATE_BACKOUT(CUR, NEW) \
snmp_community_backout(CUR, NEW)
#define SNMP_V3_COMM_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_community_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_COMM_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_community_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_COMM_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_community_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_COMM_FINISHED() snmp_community_finished()
#endif /* #if INSTALL_ENVOY_SNMP_VERSION_3 */
#if (INSTALL_ENVOY_EPI_MASTER)
#define SNMP_RESETSYSUPTIME
#endif
/*****************************************************************
AgentX routines and macros for the master
Defaults are fine for the following macros:
#define ENVOY_AX_DEFAULT_TIMEOUT 1
#define ENVOY_AX_FIND_MIB(CONTEXT) (EBufferUsed(CONTEXT) ? 0 : &mib_root_node)
#define ENVOY_AX_MA_AC_ADD(PKTP, MIBROOT) GEN_ERR
#define ENVOY_AX_MA_AC_REMOVE(PKTP, MIBROOT) GEN_ERR
#define ENVOY_AX_MA_AC_CLEAN(SESS_ID)
*****************************************************************/
#if INSTALL_ENVOY_AGENTX_MASTER
#if 0
extern bits32_t envoy_get_sysuptime();
extern sbits32_t envoy_ax_transport_type(ptr_t);
extern int envoy_ax_transport_string(ptr_t, ALENGTH_T *,
bits8_t **, int *);
#define ENVOY_GET_SYSUPTIME(CON) envoy_get_sysuptime()
#define ENVOY_AX_TRANSPORT_TYPE(COOKIE) envoy_ax_transport_type(COOKIE)
#define ENVOY_AX_TRANSPORT_STRING(COOKIE, NEED, BUF, DYN) \
envoy_ax_transport_string(COOKIE, NEED, BUF, DYN)
#define ENVOY_AX_TRANSPORTS_SUPPORTED {0}
#endif
extern bits32_t ENVOY_GET_SYSUPTIME(EBUFFER_T *);
extern sbits32_t ENVOY_AX_TRANSPORT_TYPE(ptr_t);
extern int ENVOY_AX_TRANSPORT_STRING(ptr_t, ALENGTH_T *,
bits8_t **, int *);
#define ENVOY_AX_TRANSPORTS_SUPPORTED {0}
extern struct MIBNODE_S * ENVOY_AX_FIND_MIB(EBUFFER_T *);
extern bits16_t ENVOY_AX_MA_AC_ADD(struct ENVOY_AX_PKT_S *,
struct MIBNODE_S *);
extern bits16_t ENVOY_AX_MA_AC_REMOVE(struct ENVOY_AX_PKT_S *,
struct MIBNODE_S *);
extern void ENVOY_AX_MA_AC_CLEAN(bits32_t);
extern void envoy_ax_translate_context(SNMP_PKT_T *,
struct ENVOY_AX_PKT_S *query_pkt);
#define ENVOY_AX_TRANSLATE_CONTEXT(PKT, AX_PKT) \
envoy_ax_translate_context((PKT), (AX_PKT))
#endif /* #if INSTALL_ENVOY_AGENTX_MASTER */
/*****************************************************************
AgentX routines and macros for the sub agent
Defaults are fine for the following macros:
#define ENVOY_AX_SA_MIB_ROOT_NODE(CKE, PKT) 0
#define ENVOY_AX_SA_TIMEOUT 1000
*****************************************************************/
#if (INSTALL_ENVOY_SNMP_LOCK)
/* Implemented as user exit routines */
extern int get_read_lock(LOCK_T *);
extern void release_lock(LOCK_T *, unsigned char );
extern int get_write_lock(LOCK_T *);
extern int init_rw_lock(LOCK_T *, char *);
/* Don't use the lock stuff if the user doesn't define it */
#define ENVOY_SNMP_LOCK(lock) LOCK_T lock = {0,0,0}
#define ENVOY_SNMP_LOCK_EXTERN(lock) extern LOCK_T lock
#define ENVOY_SNMP_INIT_LOCK_TAG(lock,str) init_rw_lock(&lock, str)
#define ENVOY_SNMP_GET_READ_LOCK(lock) get_read_lock(&lock)
#define ENVOY_SNMP_RELEASE_READ_LOCK(lock) release_lock(&lock, READLOCK)
#define ENVOY_SNMP_GET_WRITE_LOCK(lock) get_write_lock(&lock)
#define ENVOY_SNMP_RELEASE_WRITE_LOCK(lock) release_lock(&lock, WRITELOCK)
#define ENVOY_SNMP_LOCK_AND_1ARGS(get, lock, com1) \
if (get(lock)) { com1; }
#define ENVOY_SNMP_LOCK_AND_2ARGS(get, lock, com1, com2) \
if (get(lock)) { com1; com2; }
#define ENVOY_SNMP_LOCK_AND_3ARGS(get, lock, com1, com2, com3) \
if (get(lock)) { com1; com2; com3; }
#define ENVOY_SNMP_LOCK_AND_4ARGS(get, lock, com1, com2, com3, com4) \
if (get(lock)) { com1; com2; com3; com4; }
/*
* declare all Lock externs here
*/
ENVOY_SNMP_LOCK_EXTERN(SNMP_CoarseLock);
ENVOY_SNMP_LOCK_EXTERN(SNMP_SubagentLock);
#if INSTALL_ENVOY_SNMP_VERSION_2
ENVOY_SNMP_LOCK_EXTERN(SNMP_TimeStampLock);
#endif
#if INSTALL_ENVOY_SNMP_PROXY
ENVOY_SNMP_LOCK_EXTERN(SNMP_ProxyLock);
#endif
ENVOY_SNMP_LOCK_EXTERN(SNMP_TimerLock);
#endif /* (INSTALL_ENVOY_SNMP_LOCK) */
/* Prototypes for these functions, just to keep things clear. */
extern bits32_t ENVOY_NOW(void);
extern void ENVOY_CALL_TIMER(bits32_t when, void (*what)());
/* If SC_SOCAKDDR hasn't been defined by now, define it. */
#ifndef SC_SOCKADDR
#define SC_SOCKADDR sockaddr_in
#endif
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,444 @@
#* @(#) pSOSystem PowerPC/V2.5.0-BETA2: configs/ppc/config.mk 4.2 98/07/01 08:29:48 *
#***********************************************************************
#* *
#* MODULE: configs/std/config.mk *
#* DATE: 98/07/01 *
#* PURPOSE: Macro definitions, linker commands, etc, for "make" *
#* *
#*---------------------------------------------------------------------*
#* *
#* Copyright 1991 - 1998, Integrated Systems, Inc. *
#* ALL RIGHTS RESERVED *
#* *
#* Permission is hereby granted to licensees of Integrated Systems, *
#* Inc. products to use or abstract this computer program for the *
#* sole purpose of implementing a product based on Integrated *
#* Systems, Inc. products. No other rights to reproduce, use, *
#* or disseminate this computer program, whether in part or in *
#* whole, are granted. *
#* *
#* Integrated Systems, Inc. makes no representation or warranties *
#* with respect to the performance of this computer program, and *
#* specifically disclaims any responsibility for any damages, *
#* special or consequential, connected with the use of this program. *
#* *
#*---------------------------------------------------------------------*
#***********************************************************************
#
#------------------------------------------------------------------------
# Compiler commands and command-line options
#------------------------------------------------------------------------
# Add following option to COPTS_FILE2 to generate listing files
# -W:as:,-l -Xpass-source
#------------------------------------------------------------------------
CC = dcc
CXX = dplus
COMP_OPTS1 = -O -t$(DTARGET)E$(DFP):psos -Xstruct-best-align=0
COMP_OPTS2 = -Xstrict-ansi $(PSS_APPCOPTS) -D__DIAB -DPPC
COPTS_FILE1 = -I. $(PSS_APPINCS) -I$(PSS_ROOT)/include -I$(PSS_BSP)
COPTS_FILE2 = -I$(PSS_ROOT)/bsps/devices $(PSS_VINCLUDE) -I@ -c
CXX_OPTS = -Xexception
COPTS = -@c.opt
CXXOPTS = -@cxx.opt
#------------------------------------------------------------------------
# Assembler command-line options
#------------------------------------------------------------------------
AS = das
#------------------------------------------------------------------------
# Added target switch for the assembler
# The target definition is located in bsp.mk of the bsp you are using
#------------------------------------------------------------------------
# Add following option to AOPTS_FILE1 to generate listing files -l
#------------------------------------------------------------------------
AOPTS_FILE1 = -I. $(PSS_APPINCS) -I$(PSS_ROOT)/include -I$(PSS_BSP)
AOPTS_FILE2 = -I$(PSS_ROOT)/bsps/devices $(PSS_VINCLUDE) -I@
AOPTS_FILE3 = -t$(DTARGET)E$(DFP)
AOPTS = -@a.opt
#------------------------------------------------------------------------
# Linker command name
#------------------------------------------------------------------------
LD = dld
LOPTS = -t$(DTARGET)E$(DFP) -Xsupress-dot -Xreloc-bug -m2 $(PSS_APPLOPTS)
#------------------------------------------------------------------------
# Librarian command name and options
#------------------------------------------------------------------------
LIB = dar
LIBOPTS = -qf
LIBOPTS_SORT = -sR
#========================================================================
# Link everything together
#========================================================================
CFG1_OBJS= bspcfg.o philecfg.o pnacfg.o prepccfg.o dialog.o rarp.o
CFG2_OBJS= probecfg.o prpccfg.o psecfg.o psoscfg.o pmontcfg.o
CFG3_OBJS= pollio.o sysinit.o gsblkcfg.o plmcfg.o pnetcfg.o ldcfg.o
ram.elf: cxx.opt c.opt a.opt ill.opt begin.o \
makefile \
$(CFG1_OBJS) \
$(CFG2_OBJS) \
$(CFG3_OBJS) \
$(PSS_DRVOBJS) \
$(PSS_APPOBJS) \
$(PSS_BSP)/libbsp.a \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_ROOT)/sys/libc/libprepc$(DFP).a \
$(PSS_ROOT)/sys/libc/libpnet.a \
$(PSS_BSP)/anchor.lnk \
$(PSS_BSP)/ram.lnk
@cat $(PSS_BSP)/ram.lnk >cmd.lnk
@cat $(PSS_BSP)/anchor.lnk >>cmd.lnk
@echo $(LOPTS) -o ram.elf -Wm cmd.lnk begin.o > l.opt
@echo -L $(PSS_BSP) -L $(PSS_ROOT)/sys/os >> l.opt
@echo -L $(PSS_ROOT)/sys/libc $(PSS_APPLINKS) >> l.opt
@echo $(PSS_VLINK) >> l.opt
@echo $(CFG1_OBJS) >> l.opt
@echo $(CFG2_OBJS) >> l.opt
@echo $(CFG3_OBJS) >> l.opt
@echo $(PSS_APPOBJS) >> l.opt
@echo -m3 $(APP_LIB1) >> l.opt
@echo -m3 $(APP_LIB2) >> l.opt
@echo -m3 $(APP_LIB3) >> l.opt
@echo -m3 $(APP_LIB4) >> l.opt
@echo -m3 $(APP_LIB5) >> l.opt
@echo $(PSS_DRVOBJS) >> l.opt
@echo -m3 $(DRV_LIB1) >> l.opt
@echo -m3 $(DRV_LIB2) >> l.opt
@echo -m3 $(DRV_LIB3) >> l.opt
@echo -m3 $(DRV_LIB4) >> l.opt
@echo -m3 $(DRV_LIB5) >> l.opt
@echo -lbsp >> l.opt
@echo -lsys >> l.opt
@echo -lprepc$(DFP) -lpnet -lquery >> l.opt
@echo -m3 $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > ram.map
ddump -tv ram.elf >> ram.map
ram.hex: ram.elf
ddump -Rv ram.elf -o ram.hex
rom.elf: cxx.opt c.opt a.opt ill.opt begin.o \
makefile \
$(CFG1_OBJS) \
$(CFG2_OBJS) \
$(CFG3_OBJS) \
$(PSS_DRVOBJS) \
$(PSS_BSP)/libbsp.a \
$(PSS_APPOBJS) \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_ROOT)/sys/libc/libprepc$(DFP).a \
$(PSS_ROOT)/sys/libc/libpnet.a \
$(PSS_BSP)/anchor.lnk \
$(PSS_BSP)/rom.lnk
@cat $(PSS_BSP)/rom.lnk >cmd.lnk
@cat $(PSS_BSP)/anchor.lnk >>cmd.lnk
@echo $(LOPTS) -o rom.elf -Wm cmd.lnk begin.o > l.opt
@echo -L $(PSS_BSP) -L $(PSS_ROOT)/sys/os >> l.opt
@echo -L $(PSS_ROOT)/sys/libc $(PSS_APPLINKS) >> l.opt
@echo $(PSS_VLINK) >> l.opt
@echo $(CFG1_OBJS) >> l.opt
@echo $(CFG2_OBJS) >> l.opt
@echo $(CFG3_OBJS) >> l.opt
@echo $(PSS_APPOBJS) >> l.opt
@echo -m3 $(APP_LIB1) >> l.opt
@echo -m3 $(APP_LIB2) >> l.opt
@echo -m3 $(APP_LIB3) >> l.opt
@echo -m3 $(APP_LIB4) >> l.opt
@echo -m3 $(APP_LIB5) >> l.opt
@echo $(PSS_DRVOBJS) >> l.opt
@echo -m3 $(DRV_LIB1) >> l.opt
@echo -m3 $(DRV_LIB2) >> l.opt
@echo -m3 $(DRV_LIB3) >> l.opt
@echo -m3 $(DRV_LIB4) >> l.opt
@echo -m3 $(DRV_LIB5) >> l.opt
@echo -lbsp >> l.opt
@echo -lsys >> l.opt
@echo -lprepc$(DFP) -lpnet -lquery >> l.opt
@echo -m3 $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > rom.map
ddump -tv rom.elf >> rom.map
rom.hex: rom.elf
ddump -Rv rom.elf -o rom.hex
os.elf: cxx.opt c.opt a.opt ill.opt begin.o \
makefile \
$(CFG1_OBJS) \
$(CFG2_OBJS) \
$(CFG3_OBJS) \
$(PSS_DRVOBJS) \
$(PSS_BSP)/libbsp.a \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_ROOT)/sys/libc/libprepc$(DFP).a \
$(PSS_ROOT)/sys/libc/libpnet.a \
$(PSS_BSP)/anchor.lnk \
$(PSS_BSP)/os.lnk
@cat $(PSS_BSP)/os.lnk >cmd.lnk
@cat $(PSS_BSP)/anchor.lnk >>cmd.lnk
@echo $(LOPTS) -o os.elf -Wm cmd.lnk begin.o > l.opt
@echo -L $(PSS_BSP) -L $(PSS_ROOT)/sys/os >> l.opt
@echo -L $(PSS_ROOT)/sys/libc $(PSS_APPLINKS) >> l.opt
@echo $(PSS_VLINK) >> l.opt
@echo $(CFG1_OBJS) >> l.opt
@echo $(CFG2_OBJS) >> l.opt
@echo $(CFG3_OBJS) >> l.opt
@echo $(PSS_DRVOBJS) >> l.opt
@echo -m3 $(DRV_LIB1) >> l.opt
@echo -m3 $(DRV_LIB2) >> l.opt
@echo -m3 $(DRV_LIB3) >> l.opt
@echo -m3 $(DRV_LIB4) >> l.opt
@echo -m3 $(DRV_LIB5) >> l.opt
@echo -lbsp >> l.opt
@echo -lsys >> l.opt
@echo -lprepc$(DFP) -lpnet -lquery >> l.opt
@echo -m3 $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > os.map
ddump -tv os.elf >> os.map
os.hex: os.elf
ddump -Rv os.elf -o os.hex
app.elf: cxx.opt c.opt a.opt ill.opt beginapp.o bspcalls.o \
makefile \
$(PSS_APPOBJS) \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_ROOT)/sys/libc/libprepc$(DFP).a \
$(PSS_BSP)/anchor.lnk \
$(PSS_BSP)/app.lnk
@cat $(PSS_BSP)/app.lnk >cmd.lnk
@cat $(PSS_BSP)/anchor.lnk >>cmd.lnk
@echo $(LOPTS) -o app.elf -Wm cmd.lnk beginapp.o > l.opt
@echo bspcalls.o >> l.opt
@echo -L $(PSS_BSP) -L $(PSS_ROOT)/sys/os >> l.opt
@echo -L $(PSS_ROOT)/sys/libc $(PSS_APPLINKS) >> l.opt
@echo $(PSS_VLINK) >> l.opt
@echo $(PSS_APPOBJS) >> l.opt
@echo -m3 $(APP_LIB1) >> l.opt
@echo -m3 $(APP_LIB2) >> l.opt
@echo -m3 $(APP_LIB3) >> l.opt
@echo -m3 $(APP_LIB4) >> l.opt
@echo -m3 $(APP_LIB5) >> l.opt
@echo -lsys >> l.opt
@echo -lprepc$(DFP) -lquery >> l.opt
@echo -m3 $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > app.map
ddump -tv app.elf >> app.map
app_ld.elf: app.elf
@echo $(PSS_LDBOPTS) -p 180 -n LDBL -mAT -u 1024 -s 4096 > ld_prep.def
@ld_prep -v -d ld_prep.def -o app_ld.elf app.elf
@rm -f ld_prep.def
app.hex: app.elf
ddump -Rv app.elf -o app.hex
app_ld.hex: app.hex
@echo $(PSS_LDBOPTS) -p 180 -n LDBL -mAT -u 1024 -s 4096 > ld_prep.def
@ld_prep -v -d ld_prep.def -o app_ld.hex app.hex
@rm -f ld_prep.def
driver.elf: cxx.opt c.opt a.opt ill.opt lddriver.o bspcalls.o \
ldblcfg.o \
makefile \
$(PSS_APPOBJS) \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_ROOT)/sys/libc/libprepc$(DFP).a \
$(PSS_BSP)/anchor.lnk \
$(PSS_BSP)/app.lnk
@cat $(PSS_BSP)/app.lnk >cmd.lnk
@cat $(PSS_BSP)/anchor.lnk >>cmd.lnk
@echo $(LOPTS) -o driver.elf cmd.lnk lddriver.o > l.opt
@echo bspcalls.o >> l.opt
@echo -L $(PSS_BSP) -L $(PSS_ROOT)/sys/os >> l.opt
@echo -L $(PSS_ROOT)/sys/libc $(PSS_APPLINKS) >> l.opt
@echo $(PSS_VLINK) >> l.opt
@echo $(PSS_APPOBJS) >> l.opt
@echo -m3 $(APP_LIB1) >> l.opt
@echo -m3 $(APP_LIB2) >> l.opt
@echo -m3 $(APP_LIB3) >> l.opt
@echo -m3 $(APP_LIB4) >> l.opt
@echo -m3 $(APP_LIB5) >> l.opt
@echo -lsys >> l.opt
@echo -lprepc$(DFP) >> l.opt
@echo -m3 $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > driver.map
@ddump -tv driver.elf >> driver.map
lddriver.elf: driver.elf
@echo $(PSS_LDBOPTS) -p 180 -n LDBL -mAT -u 1024 -s 4096 > ld_prep.def
@ld_prep -v -d ld_prep.def -o lddriver.elf driver.elf
@rm -f ld_prep.def
lib.elf: cxx.opt c.opt a.opt ill.opt bspcalls.o \
makefile \
$(PSS_APPOBJS) \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_ROOT)/sys/libc/libprepc$(DFP).a \
$(PSS_BSP)/anchor.lnk \
$(PSS_BSP)/app.lnk
@cat $(PSS_BSP)/app.lnk >cmd.lnk
@cat $(PSS_BSP)/anchor.lnk >>cmd.lnk
@echo $(LOPTS) -o lib.elf cmd.lnk > l.opt
@echo bspcalls.o >> l.opt
@echo -L $(PSS_BSP) -L $(PSS_ROOT)/sys/os >> l.opt
@echo -L $(PSS_ROOT)/sys/libc $(PSS_APPLINKS) >> l.opt
@echo $(PSS_VLINK) >> l.opt
@echo $(PSS_APPOBJS) >> l.opt
@echo -m3 $(APP_LIB1) >> l.opt
@echo -m3 $(APP_LIB2) >> l.opt
@echo -m3 $(APP_LIB3) >> l.opt
@echo -m3 $(APP_LIB4) >> l.opt
@echo -m3 $(APP_LIB5) >> l.opt
@echo -lsys >> l.opt
@echo -lprepc$(DFP) -lquery >> l.opt
@echo -m3 $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > lib.map
@ddump -tv lib.elf >> lib.map
lib_ld.elf: lib.elf
@echo $(PSS_LDBOPTS) > ld_prep.def
@ld_prep -v -d ld_prep.def -o lib_ld.elf lib.elf
@rm -f ld_prep.def
lib.hex: lib.elf
ddump -Rv lib.elf -o lib.hex
lib_ld.hex: lib.hex
@echo $(PSS_LDBOPTS) > ld_prep.def
@ld_prep -v -d ld_prep.def -o lib_ld.hex lib.hex
@rm -f ld_prep.def
#------------------------------------------------------------------------
# Compile or assemble modules which are always used.
#------------------------------------------------------------------------
begin.o: makefile $(PSS_CONFIG)/config.mk
begin.o: $(PSS_CONFIG)/begin.s
$(AS) $(AOPTS) -o $@ $<
beginapp.o: makefile $(PSS_CONFIG)/config.mk
beginapp.o: $(PSS_CONFIG)/beginapp.s
$(AS) $(AOPTS) -o $@ $<
lddriver.o: makefile $(PSS_CONFIG)/config.mk
lddriver.o: $(PSS_CONFIG)/lddriver.s
$(AS) $(AOPTS) -o $@ $<
bspcalls.o: makefile $(PSS_CONFIG)/config.mk
bspcalls.o: $(PSS_BSP)/bspcalls.s
$(AS) $(AOPTS) -o $@ $<
gsblkcfg.o: makefile $(PSS_CONFIG)/config.mk sys_conf.h
gsblkcfg.o: $(PSS_CONFIG)/gsblkcfg.c
$(CC) $(COPTS) -o $@ $<
sysinit.o: qpsos.tmp \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
sysinit.o: $(PSS_CONFIG)/sysinit.c
$(CC) $(COPTS) -o sysinit.tmp $<
@$(LD) $(LOPTS) -r -Xsupress-dot -Xreloc-bug -o sysinit.o sysinit.tmp qpsos.tmp > qpsos.map
@rm -f sysinit.tmp qpsos.o qpsos.map
qpsos.tmp: $(PSS_ROOT)/sys/os/qpsos.s
@$(AS) $(AOPTS) -o qpsos.o $<
@$(LIB) r qpsos.tmp qpsos.o
philecfg.o: makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
philecfg.o: $(PSS_CONFIG)/philecfg.c
$(CC) $(COPTS) -o $@ $<
pnacfg.o: makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
pnacfg.o: $(PSS_CONFIG)/pnacfg.c
$(CC) $(COPTS) -o $@ $<
pnetcfg.o: makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
pnetcfg.o: $(PSS_CONFIG)/pnetcfg.c
$(CC) $(COPTS) -o $@ $<
prepccfg.o: makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
prepccfg.o: $(PSS_CONFIG)/prepccfg.c
$(CC) $(COPTS) -o $@ $<
probecfg.o: makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
probecfg.o: $(PSS_CONFIG)/probecfg.c
$(CC) $(COPTS) -o $@ $<
prpccfg.o: makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
prpccfg.o: $(PSS_CONFIG)/prpccfg.c
$(CC) $(COPTS) -o $@ $<
psecfg.o: makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
psecfg.o: $(PSS_CONFIG)/psecfg.c
$(CC) $(COPTS) -o $@ $<
psoscfg.o: makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
psoscfg.o: $(PSS_CONFIG)/psoscfg.c
$(CC) $(COPTS) -o $@ $<
pmontcfg.o: makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
pmontcfg.o: $(PSS_CONFIG)/pmontcfg.c
$(CC) $(COPTS) -o $@ $<
dialog.o: makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
dialog.o: $(PSS_CONFIG)/dialog.c
$(CC) $(COPTS) -o $@ $<
pollio.o: makefile $(PSS_CONFIG)/config.mk \
$(PSS_BSP)/bsp.h
pollio.o: $(PSS_CONFIG)/pollio.c
$(CC) $(COPTS) -o $@ $<
bspcfg.o: makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
bspcfg.o: $(PSS_BSP)/bspcfg.c
$(CC) $(COPTS) -o $@ $<
plmcfg.o: makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
plmcfg.o: $(PSS_CONFIG)/plmcfg.c
$(CC) $(COPTS) -o $@ $<
ldcfg.o: makefile $(PSS_CONFIG)/config.mk sys_conf.h
ldcfg.o: $(PSS_CONFIG)/ldcfg.c
$(CC) $(COPTS) -o $@ $<
c.opt: makefile $(PSS_CONFIG)/config.mk
@echo $(COMP_OPTS1) > c.opt
@echo $(COMP_OPTS2) >> c.opt
@echo $(COPTS_FILE1) >> c.opt
@echo $(COPTS_FILE2) >> c.opt
cxx.opt: makefile $(PSS_CONFIG)/config.mk
@echo $(COMP_OPTS1) > cxx.opt
@echo $(COMP_OPTS2) >> cxx.opt
@echo $(COPTS_FILE1) >> cxx.opt
@echo $(COPTS_FILE2) >> cxx.opt
@echo $(CXX_OPTS) >> cxx.opt
a.opt: makefile $(PSS_CONFIG)/config.mk
@echo $(AOPTS_FILE1) > a.opt
@echo $(AOPTS_FILE2) >> a.opt
@echo $(AOPTS_FILE3) >> a.opt
ill.opt: makefile $(PSS_CONFIG)/config.mk
@echo $(LOPTS) > ill.opt
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,979 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/isisnmp/mcf250/sys_conf.h,v 1.1.1.1 2001/11/05 17:47:10 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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: sys_conf.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:10 tneale
* Tornado shuffle
*
* Revision 1.1 2000/02/24 16:05:56 josh
* configuration files for pSOS for ColdFire
*
*
*/
/* [clearcase]
modification history
-------------------
*/
/* @(#) pSOSystem PowerPC/V2.5.0-BETA1: apps.v22/xxxx/sys_conf.h (snmpsa ppc) 3.72 98/06/05 11:02:22 */
/***********************************************************************/
/* */
/* MODULE: sys_conf.h */
/* DATE: 98/06/05 */
/* PURPOSE: pSOSystem configuration definitions */
/* */
/*---------------------------------------------------------------------*/
/* */
/* Copyright 1991 - 1997, Integrated Systems, Inc. */
/* ALL RIGHTS RESERVED */
/* */
/* Permission is hereby granted to licensees of Integrated Systems, */
/* Inc. products to use or abstract this computer program for the */
/* sole purpose of implementing a product based on Integrated */
/* Systems, Inc. products. No other rights to reproduce, use, */
/* or disseminate this computer program, whether in part or in */
/* whole, are granted. */
/* */
/* Integrated Systems, Inc. makes no representation or warranties */
/* with respect to the performance of this computer program, and */
/* specifically disclaims any responsibility for any damages, */
/* special or consequential, connected with the use of this program. */
/* */
/*---------------------------------------------------------------------*/
/* */
/* This is a header file which defines all of the system-level */
/* parameters that are likely to need changing. */
/* */
/* It has been set up to be as close as possible to the settings */
/* which are appropriate for this application. However, you may */
/* need to make some changes to parameters to reflect your */
/* environment, such as IP addresses, etc. */
/* */
/* Chapter 7 of the pSOSystem Getting Started manual contains a */
/* complete description of the symbols that are defined in this */
/* file. */
/* */
/***********************************************************************/
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _SYS_CONF_H
#define _SYS_CONF_H
/***********************************************************************/
/* */
/* SC_APP_PARMS Must be defined before you include sysvars.h file. */
/* Since "sysvars.h" file depends on SC_APP_PARMS and BSP_PARMS */
/* to define the Storage Parms Structure. */
/* */
/* Defining this variable to a Non-Zero Value will create a space in */
/* the Storage Parms. structure for your application use. */
/* */
/***********************************************************************/
#define SC_APP_PARMS 0
#define SC_APP_NAME "snmpsa Application"
/*---------------------------------------------------------------------*/
/* types.h contains common definitions for example YES and NO */
/*---------------------------------------------------------------------*/
#include <types.h>
/***********************************************************************/
/* sysvars.h contains the structures and definitions for the system */
/* variables that are stored in NVRAM. These structures and */
/* definitions are also used when creating the boot rom for the */
/* target system. By using the same sysvars.h file it will insure the */
/* consistency of the values stored by the boot rom and later read by */
/* the downloaded application. */
/***********************************************************************/
#include <sysvars.h>
/*---------------------------------------------------------------------*/
/* include psos.h for defines IO_AUTOINIT and IO_NOAUTOINIT */
/*---------------------------------------------------------------------*/
#include <psos.h>
/***********************************************************************/
/* */
/* These symbols are used to define other symbols in this file. */
/* They should never be changed. */
/* */
/***********************************************************************/
#define USE_RARP 0
/***********************************************************************/
/* */
/* B A S I C P A R A M E T E R S */
/* */
/* The parameters in this section determine the fashion in which */
/* many of the other parameters in this file will be used. */
/* */
/* Many of the parameters in this file have names beginning with */
/* either "SC_" or "SD_". Those beginning with "SC_" are ALWAYS */
/* controlled by the values you set in this file. The values of */
/* the "SD_" parameters can be determined either by the definitions */
/* given in this file, or by the data found in the target board's */
/* parameter storage area. SC_SD_PARAMETERS determines this. If */
/* SC_SD_PARAMETERS is "SYS_CONF", then the values given in this */
/* file will be used for the SD_ parameters. If SC_SD_PARAMETERS */
/* is "STORAGE", then pSOSystem will attempt to use the values found */
/* in the board's parameter storage area for the SD_ variables. If */
/* the parameter storage area has not been initialized or has been */
/* corrupted, then the values given in this file will be used. They */
/* will also be written to the storage area. */
/* */
/* If SC_SD_PARAMETERS is STORAGE, you may enable a "startup dialog" */
/* which will allow you to view, and optionally change, the */
/* parameter values found in the storage area. The dialog is enabled */
/* by setting SC_STARTUP_DIALOG to YES. In this case, */
/* SD_STARTUP_DELAY specifies the number of seconds that the dialog */
/* will wait for input before proceeding to boot the system. */
/* */
/* SC_SD_DEBUG_MODE determines how the system will operate, as follows:*/
/* */
/* DBG_SA: Boot pROBE+ in standalone mode. */
/* */
/* DBG_XS: Boot into pROBE+ and wait for the host debugger */
/* via a serial connection */
/* */
/* DBG_XN: Boot into pROBE+ and wait for the host debugger */
/* via a network connection */
/* */
/* DBG_AP: Same as DBG_SA, but also does a pROBE+ "silent startup",*/
/* meaning that pROBE+ initializes itself without */
/* printing a startup banner. pROBE+ then initializes */
/* pSOS+ and starts the application running. This mode */
/* was created to simplify implementation of the pSOSystem */
/* Boot ROMs. Note that when this mode is used, the value */
/* you specify for RC_SMODE (see "pROBE+ Configuration */
/* Parameters", below) is overridden. */
/* */
/* STORAGE: Use the mode (DBG_SA, DBG_XS, or DBG_XN) found in the */
/* parameter storage area. If a valid mode is not found, */
/* then use DBG_SA. */
/* */
/* An important consequence of using SC_SD_DEBUG_MODE=STORAGE should */
/* be noted. If you use the TFTP bootloader in the pSOSystem ROMs */
/* to download and start your system, you will be setting */
/* SC_SD_DEBUG_MODE = DBG_AP in your target board's parameter storage */
/* area. Thus, if you have left SC_SD_DEBUG_MODE set to STORAGE in */
/* this file, your downloaded system will also use DBG_AP, meaning */
/* that the application will begin running immediately after the */
/* TFTP bootloader has loaded and started your system. */
/* */
/***********************************************************************/
#define SC_SD_PARAMETERS STORAGE
#define SC_STARTUP_DIALOG NO
#define SC_BOOT_ROM NO
#define SD_STARTUP_DELAY 60
#define SC_SD_DEBUG_MODE STORAGE
/***********************************************************************/
/* */
/* O P E R A T I N G S Y S T E M C O M P O N E N T S */
/* */
/* Setting the definition line to YES will cause that component to */
/* be built into the system. NO means the component will NOT be */
/* put into the system. It is an error to specify both SC_PSOS */
/* and SC_PSOSM as present! */
/* */
/***********************************************************************/
#define SC_PSOS YES /* pSOS+ real-time kernel */
#define SC_PSOSM NO /* pSOS+ real-time multiproc kernel */
#define SC_PSOS_QUERY NO /* pSOS+ Query Services */
#define SC_PROBE NO /* pROBE+ (processor svcs) */
#define SC_PROBE_DISASM NO /* pROBE+ (disassembler) */
#define SC_PROBE_CIE NO /* pROBE+ (console executive) */
#define SC_PROBE_QUERY NO /* pROBE+ (query services) */
#define SC_PROBE_DEBUG NO /* pROBE+ (debug interface executive) */
#define SC_PROBE_HELP NO /* pROBE+ Help command Handler. */
#define SC_PHILE YES /* pHILE+ file system manager */
#define SC_PHILE_PHILE YES /* pHILE+ (pHILE+ real-time file sys) */
#define SC_PHILE_MSDOS NO /* pHILE+ (MS-DOS FAT file system) */
#define SC_PHILE_NFS NO /* pHILE+ (NFS client) */
#define SC_PHILE_CDROM NO /* pHILE+ (ISO 9660 CD-ROM file sys) */
#define SC_PREPC YES /* pREPC+ C run-time library */
#define SC_PNA YES /* pNA+ TCP/IP networking manager */
#define SC_PNET NO /* pNET Library for BOOT ROMS */
#define SC_PRPC NO /* pRPC+ RPC component */
#define SC_PSE_PRPC NO /* pRPC+ RPC component Over pSE+ */
#define SC_PSE NO /* pSE+ streams component */
#define SC_PSKT NO /* pSKT+ SKT library component */
#define SC_PTLI NO /* pTLI+ TLI library component */
#define SC_PMONT NO /* pMONT+ */
#define SC_PLM NO /* pLM+ Shared library manager */
#define SC_PROFILER NO /* Profiler is enabled/Disabled */
#define SC_RTEC NO /* Diab's Run time error checker */
/*---------------------------------------------------------------------*/
/* If SC_QBIND is set to YES then the Quick bindings for pSOS+ System */
/* calls will be used. If it is set to NO then the normal bindings */
/* will be used. */
/* */
/* Quick bindings will not be supported for the applications with */
/* USER mode Tasks. So make sure your Application does not have any */
/* USER mode Tasks. */
/*---------------------------------------------------------------------*/
#define SC_QBIND NO /* Quick bindings for pSOSystem calls*/
/*---------------------------------------------------------------------*/
/* If set to IO_AUTOINIT device drivers that are installed be the */
/* InstallDriver function will have their autoinit field set. This */
/* will cause pSOS+ call the drivers initialization function when */
/* pSOS+ starts up. The de_init call will not have to be called for */
/* each driver if this is done. */
/* */
/* NOTE: This Auto Initialization will not work on all drivers. */
/* Setting IO_AUTOINIT only effects drivers that can use the Auto */
/* Initialization feature. */
/* */
/* If set to IO_NOAUTOINIT no automatic driver initialization will */
/* happen. */
/*---------------------------------------------------------------------*/
#define SC_AUTOINIT IO_AUTOINIT
/*---------------------------------------------------------------------*/
/* If SC_PMONT SC_AUTOINIT will always be set to 1 because pMONT needs */
/* drivers to be automatically initialized. */
/*---------------------------------------------------------------------*/
#if SC_PMONT
#undef SC_AUTOINIT
#define SC_AUTOINIT IO_AUTOINIT
#endif
/*---------------------------------------------------------------------*/
/* If set to YES, an initial devices name table is set-up to contain */
/* Deivce names for all the Drivers configured in the system. */
/* */
/* NOTE: Any initial device name table enteries are in addition to the */
/* KC_MAXDNTENT value specified below in pSOS+ configuration params. */
/*---------------------------------------------------------------------*/
#define SC_INIT_DNTABLE YES
/***********************************************************************/
/* */
/* S E R I A L C H A N N E L C O N F I G U R A T I O N */
/* */
/* * SD_DEF_BAUD specifies the default baud rate to be used for the */
/* serial channels */
/* * SC_APP_CONSOLE specifies the serial channel number (starting */
/* from 1) which should be used for the application's "console". */
/* * SC_PROBE_CONSOLE specifies the serial channel number (starting */
/* from 1) which pROBE+ should use to display output and receive */
/* commands, or to communicate with the host debugger. */
/* * SC_RBUG_PORT specifies the serial channel number (starting */
/* from 1) which should be used for the pROBE+ REMOTE channel. */
/* This is not normally required, so it can be disabled by */
/* using a value of 0. */
/* */
/* Above three macros SC_PROBE_CONSOLE, SC_APP_CONSOLE and */
/* SC_RBUG_PORT uses SERIAL_DRVRNUM(0) as default. This means that */
/* the Low-Level Serial Driver 0 (1) is being used default. */
/* */
/* If you need to use another driver for any of the above macros */
/* and another macro for pMONT PM_DEV, You need to change "0" to */
/* the driver number you want. Consult the "README" file in BSP */
/* directory for number of different drivers supported and for the */
/* SERIAL_DRVRNUM mapping for those drivers. */
/* */
/***********************************************************************/
#define SD_DEF_BAUD 9600
#define SC_APP_CONSOLE (1 + SERIAL_DRVRNUM(0))
#define SC_PROBE_CONSOLE (1 + SERIAL_DRVRNUM(0))
#define SC_RBUG_PORT (0 + SERIAL_DRVRNUM(0))
/***********************************************************************/
/* SC_NumNon_pSOSChan is the number of non pSOS users of serial */
/* channels. These are users that will be initiated before pSOS */
/* such as pROBE. */
/* NOTE: These channels will not be closed on a soft reset. */
/***********************************************************************/
#if (SC_RBUG_PORT && SC_PROBE_CONSOLE && (SC_PROBE_CONSOLE != PCCON))
#define SC_NumNon_pSOSChan 2
#else
#define SC_NumNon_pSOSChan 1
#endif
/***********************************************************************/
/* */
/* L A N C O N F I G U R A T I O N */
/* */
/* */
/***********************************************************************/
#define SD_LAN1 YES /* Disable the LAN interface */
#define SD_LAN1_IP 0x80E0C1A3 /* (REC) IP address of the node */
#define SD_LAN1_SUBNET_MASK 0xFFFFFF00
/*---------------------------------------------------------------------*/
/* Maximum number of multicast addresses to be used by the lan */
/* interface. Must not exceed maximum supported by the lan driver. */
/*---------------------------------------------------------------------*/
#define SC_LAN1_NMCAST 0
/***********************************************************************/
/* */
/* S H A R E D M E M O R Y C O N F I G U R A T I O N */
/* */
/* */
/***********************************************************************/
/***********************************************************************/
/* */
/* B U S C O N F I G U R A T I O N */
/* */
/* */
/***********************************************************************/
#define SD_VME_BASE_ADDR 0x01000000
/*---------------------------------------------------------------------*/
/* If you want to build a Shared Memory Interface for the network or */
/* multi-processing pSOS+m, set SD_SM_NODE (a non-zero value) to the */
/* node number of THIS node. */
/*---------------------------------------------------------------------*/
#define SD_SM_NODE 0
/*---------------------------------------------------------------------*/
/* Shared memory network interface - SC_NISM_LEVEL should be 1 if this */
/* will be the FIRST system to use the SMNI on this board. It should */
/* be 2 if this will not be the first system to use the SMNI on this */
/* board. Usually this means that SC_NISM_LEVEL should be 1 if you */
/* are building Boot ROMs, and 2 for a system that will be downloaded */
/* and started using the Boot ROMs. See the comments at the beginning */
/* of drivers/ni_smem.c for more explanation. */
/*---------------------------------------------------------------------*/
#define SD_NISM NO
#define SD_NISM_IP 0x00000000
#define SD_NISM_DIRADDR 0x00000400
#define SC_NISM_BUFFS 30
#define SC_NISM_LEVEL 2
#define SD_NISM_SUBNET_MASK 0x00000000
/*---------------------------------------------------------------------*/
/* If you want to build a multi-node pSOS+m system, set SD_KISM */
/* to the number of nodes in the system. */
/*---------------------------------------------------------------------*/
#define SD_KISM 0
#define SD_KISM_DIRADDR 0x00000580
#define SC_KISM_BUFFS 100
/***********************************************************************/
/* */
/* M I S C E L L A N E O U S N E T W O R K I N G */
/* P A R A M E T E R S */
/* */
/***********************************************************************/
#define SD_DEF_GTWY_IP 0x80E0C105
/***********************************************************************/
/* SC_RAM_SIZE */
/* */
/* Normally, pSOSystem uses ALL of the memory remaining on a board for */
/* dynamic allocation ("region 0"). You may override this by setting */
/* SC_RAM_SIZE to a non-zero value. If you do, pSOSystem will not */
/* touch any memory after address (BSP_RAM_BASE + SC_RAM_SIZE - 1). */
/* */
/* NOTE: This is useful when making a BOOT ROM and you want to ensure */
/* that the ROM's RAM area does not overflow the space alloted for it. */
/***********************************************************************/
#define SC_RAM_SIZE 0
/***********************************************************************/
/* */
/* I / O D E V I C E S */
/* */
/* Each device may be included in the system by specifying a major */
/* number for it, which determines its slot in the pSOS+ I/O switch */
/* table. To leave a device driver out of the system, use NO for */
/* the major number. */
/* */
/* Note the following: */
/* * Major device 0 is reserved and cannot be used for any of these */
/* devices. Setting a device number to 0 here is the same as NO. */
/* * No device number may be higher than SC_DEVMAX (SC_DEVMAX may */
/* be increased, if desired) */
/* * The lines defining the symbols DEV_SERIAL, DEV_TIMER, etc, */
/* should not be changed. These are for use by application */
/* programs as the "device number" parameter on de_* calls. */
/* */
/***********************************************************************/
#define SC_DEV_SERIAL 1 /* Serial driver */
#define SC_DEV_TIMER 2 /* Periodic tick timer */
#define SC_DEV_RAMDISK NO /* RAM disk */
#define SC_DEV_CONSOLE NO /* PC-Console driver */
#define SC_DEV_SCSI NO /* SCSI bus */
#define SC_DEV_SCSI_TAPE NO /* SCSI bus, tape device */
#define SC_DEV_IDE NO /* IDE Driver */
#define SC_DEV_FLOPPY NO /* Floppy Driver */
#define SC_DEV_TFTP NO /* TFTP pseudo driver */
#define SC_DEV_SPI NO /* SPI driver */
#define SC_DEV_DLPI NO /* DLPI pseudo driver */
#define SC_DEV_OTCP NO /* 12 TCP/IP for OpEN */
#define SC_IP SC_DEV_OTCP /* 12 IP */
#define SC_ARP NO /* 13 ARP */
#define SC_TCP NO /* 14 TCP */
#define SC_UDP NO /* 15 UDP */
#define SC_RAW NO /* 16 RAW */
#define SC_LOOP NO /* 17 LOOP = (SC_DEV_OTCP + 5) */
#define SC_DEV_SOSI NO /* 18 OSI for OpEN */
#define SC_DEV_PSCONSOLE NO /* Pseudo Console driver */
#define SC_DEV_NULL NO /* Null Device Driver */
#define SC_DEV_PARALLEL NO /* Parallel Port Driver */
#define SC_DEV_CMOS NO /* CMOS Driver */
#define SC_DEV_WATCHDOG NO /* Watchdog Driver */
#define SC_DEV_OLAP NO /* LAP Drivers */
#define SC_PHPI (SC_DEV_OLAP) /* Phpi driver */
#define SC_LAPB (SC_DEV_OLAP + 0)/* LAPB driver Change 0 to 1 */
#define SC_DEV_OX25 NO /* X25 Drivers */
#define SC_X25 (SC_DEV_OX25) /* X.25 plp driver */
#define SC_SNDCF NO /* sndcf driver */
#define SC_IPCONV NO /* ip convergence driver */
#define SC_DEV_ISDN NO /* ISDN Drivers */
#define SC_PH (SC_DEV_ISDN) /* PH driver */
#define SC_LAPD (SC_DEV_ISDN + 0)/* LAPD driver Change 0 to 1 */
#define SC_IPCD (SC_DEV_ISDN + 0)/* IPCD driver Change 0 to 2 */
#define SC_DEV_MLPP NO /* MultiLink PPP Drivers */
#define SC_FRMUX (SC_DEV_MLPP) /* FRMUX driver */
#define SC_PPP (SC_DEV_MLPP + 0)/* PPP driver Change 0 to 1 */
#define SC_PIM (SC_DEV_MLPP + 0)/* PIM driver Change 0 to 2 */
#define SC_DEV_LOG NO
#define SC_DEV_PSMUX NO /* Sample Mux driver */
#define SC_DEV_PSLWR NO /* Sample loopback driver */
#define SC_DEV_SLLWR NO /* Sample loopback driver */
#define SC_DEVMAX 39 /* Maximum device number */
#define DEV_SERIAL (SC_DEV_SERIAL << 16)
#define DEV_PARALLEL (SC_DEV_PARALLEL << 16)
#define DEV_TIMER (SC_DEV_TIMER << 16)
#define DEV_RAMDISK (SC_DEV_RAMDISK << 16)
#define DEV_SCSI (SC_DEV_SCSI << 16)
#define DEV_SCSI_TAPE (SC_DEV_SCSI_TAPE << 16)
#define DEV_PSCONSOLE (SC_DEV_PSCONSOLE << 16)
#define DEV_NULL (SC_DEV_NULL << 16)
#define DEV_SYSCONSOLE ((SC_DEV_PSCONSOLE << 16) + SYSCONSOLE_DEV)
#define DEV_PSEUDO ((SC_DEV_PSCONSOLE << 16) + PSEUDO_DEV)
#define DEV_DLPI (SC_DEV_DLPI << 16)
#define DEV_TFTP (SC_DEV_TFTP << 16)
#define DEV_SPI (SC_DEV_SPI << 16)
#define DEV_WATCHDOG (SC_DEV_WATCHDOG << 16)
#define DEV_FLOPPY (SC_DEV_FLOPPY << 16)
#define DEV_IDE (SC_DEV_IDE << 16)
#define DEV_CMOS (SC_DEV_CMOS << 16)
#define DEV_CONSOLE (SC_DEV_CONSOLE << 16)
#define DEV_IP (SC_IP << 16)
#define DEV_ARP (SC_ARP << 16)
#define DEV_TCP (SC_TCP << 16)
#define DEV_UDP (SC_UDP << 16)
#define DEV_RAW (SC_RAW << 16)
#define DEV_LOOP (SC_LOOP << 16)
#define DEV_PHPI (SC_PHPI << 16)
#define DEV_LAPB (SC_LAPB << 16)
#define DEV_X25 (SC_X25 << 16)
#define DEV_SNDCF (SC_SNDCF << 16)
#define DEV_IPCONV (SC_IPCONV << 16)
#define DEV_PH (SC_PH << 16)
#define DEV_LAPD (SC_LAPD << 16)
#define DEV_IPCD (SC_IPCD << 16)
#define DEV_FRMUX (SC_FRMUX << 16)
#define DEV_PIM (SC_PIM << 16)
#define DEV_PPP (SC_PPP << 16)
#define DEV_LOG (SC_DEV_LOG << 16)
#define DEV_PSMUX (SC_DEV_PSMUX << 16)
#define DEV_PSLWR (SC_DEV_PSLWR << 16)
#define DEV_SLLWR (SC_DEV_SLLWR << 16)
#if (BSP_CPUFAMILY == FAMILY_X86) && (SC_APP_CONSOLE == PCCON)
#define CONSOLE DEV_CONSOLE
#else
#define CONSOLE DEV_SERIAL
#endif
/***********************************************************************/
/* TFTP Configuration Parameters. */
/***********************************************************************/
#if DEV_TFTP
#define SC_MAX_TFTP_CHAN 1
#endif
/***********************************************************************/
/* */
/* M E M O R Y M A N A G E M E N T L I B R A R Y P A R A M S */
/* */
/***********************************************************************/
#define SC_MMULIB NO
/***********************************************************************/
/* */
/* C O M P O N E N T C O N F I G U R A T I O N P A R A M E T E R S */
/* */
/* These parameters should work as is for this application. You */
/* may want to change some of them if you start customizing this */
/* application. */
/* */
/***********************************************************************/
/*---------------------------------------------------------------------*/
/* pSOS+ configuration parameters */
/*---------------------------------------------------------------------*/
#define KC_RN0USIZE 0x100 /* region 0 unit size */
#define KC_NTASK 25 /* max number of tasks */
#define KC_NQUEUE 10 /* max number of message queues */
#define KC_NSEMA4 30 /* max number of semaphores */
#define KC_NMSGBUF 256 /* max number of message buffers */
#define KC_NTIMER 10 /* max number of timers */
#define KC_NLOCOBJ 50 /* max number of local objects */
#define KC_TICKS2SEC 100 /* clock tick interrupt frequency */
#define KC_TICKS2SLICE 10 /* time slice quantum, in ticks */
#define KC_SYSSTK 0x1000 /* pSOS+ system stack size (bytes) */
#define KC_ROOTSSTK 0x2000 /* ROOT supervisor stack size */
#define KC_ROOTUSTK 0 /* ROOT user stack size */
#define KC_ROOTMODE (T_SUPV | T_ISR) /* ROOT initial mode */
#define KC_ROOTPRI 230 /* ROOT task priority */
#define KC_NMUTEX 0 /* Max number of Mutex's */
#define KC_NCVAR 0 /* Max number of condition variables */
#define KC_NTVAR 0 /* Max number of task variable */
#define KC_NCOCB 1 /* Max number of callouts */
#define KC_IDLESTK 0x1000 /* IDLE stack size */
#define KC_MAXDNTENT 0 /* max number of device names in DNT */
#define KC_DNLEN 10 /* max length of a device name in DNT */
#define KC_NTSD 0 /* Max # of TSD entries */
#define KC_MAXIO (SC_DEVMAX+1) /* Max # of devices in the system */
/*---------------------------------------------------------------------*/
/* The following are examples for modifying the following defines */
/* */
/* Using a pSOSystem routine as a fatal error handler */
/* #define KC_FATAL ((void (*)()) SysInitFail) */
/* */
/* Using a user written routine as a fatal error handler */
/* extern void MyHandler (void); */
/* #define KC_FATAL ((void (*)()) MyHandler) */
/* */
/*---------------------------------------------------------------------*/
#define KC_STARTCO 0 /* callout at task activation */
#define KC_DELETECO 0 /* callout at task deletion */
#define KC_SWITCHCO 0 /* callout at task switch */
#define KC_FATAL 0 /* fatal error handler address */
#define KC_IDLECO 0 /* Idle Task Callout */
#define KC_RTCINITCO 0 /* RTC INIT Callout */
/*---------------------------------------------------------------------*/
/* pSOS+m configuration parameters */
/*---------------------------------------------------------------------*/
#define MC_NGLBOBJ 8 /* size of gbl obj table */
#define MC_NAGENT 10 /* number of RPC agents in this node */
#define MC_FLAGS SEQWRAP_ON /* operating mode flags */
/*---------------------------------------------------------------------*/
/* The following are examples for modifying the following definition */
/* */
/* Using a pSOSystem routine as a roster change handler */
/* #define MC_ROSTER ((void (*)()) SysInitFail) */
/* */
/* Using a user written routine as a roster change handler */
/* extern void MyHandler (void); */
/* #define MC_ROSTER ((void (*)()) MyHandler) */
/* */
/*---------------------------------------------------------------------*/
#define MC_ROSTER 0 /* addr of user roster change callout */
#define MC_KIMAXBUF 100 /* maximum KI packet buffer length */
#define MC_ASYNCERR 0 /* asynchronous calls error callout */
/*---------------------------------------------------------------------*/
/* pROBE configuration parameters - note that the SMODE flag bits are */
/* irrelevant if SC_SD_DEBUG_MODE = DBG_AP. */
/*---------------------------------------------------------------------*/
#define TD_BRKOPC 0 /* Instruction break opcode */
#define TD_ILEV (MAX_ILEV << 12) /* pROBE+ interrupt mask */
#define TD_FLAGS (NODOTS_MASK | TD_ILEV | NOTUPD_MASK)/* flags */
#define TD_DBGPRI 244 /* Debugger task priority */
/*---------------------------------------------------------------------*/
/* The variable defined down should be set to the Starting address for */
/* for pROBE+ DATA AREA. This is required by all the smaller boards. */
/* NOTE: */
/* Setting of this value should have atleast 0x4400 bytes Free */
/* Space from that location. */
/*---------------------------------------------------------------------*/
#define TD_DATASTART 0x0
/*---------------------------------------------------------------------*/
/* pHILE+ configuration parameters */
/*---------------------------------------------------------------------*/
#define FC_LOGBSIZE 9 /* Block size (base-2 exponent) */
#define FC_NBUF 6 /* Number of cache buffers */
#define FC_NMOUNT 3 /* Max # of mounted volumes */
#define FC_NFCB 10 /* Max # of opened files per system */
#define FC_NCFILE 2 /* Max # of opened files per task */
#define FC_NDNLC 0 /* Max # of cached directory entries */
/*---------------------------------------------------------------------*/
/* Set the value for FC_ERRCO. It will be called if there is an error */
/* during IO operation on the Volume */
/* */
/* Sample call-out is defined below (fc_errco). */
/*---------------------------------------------------------------------*/
#if SC_PHILE
#include <phile.h> /* pHILE+ types definitions for FC_ERRCO */
extern ULONG
fc_errco(int direction, ULONG err_code, const struct buffer_header *buffer);
#define FC_ERRCO 0 /* I/O error call-out */
#endif /* SC_PHILE */
/*---------------------------------------------------------------------*/
/* pLM+ configuration parameters */
/*---------------------------------------------------------------------*/
#if SC_PLM
#include <plm.h> /* pLM+ type definitions */
#define LM_MAXREG 8 /* Max # of registered libraries */
#define LM_DATA 0 /* pLM+ data area */
#define LM_DATASIZE 0 /* pLM+ data area size */
/***********************************************************************/
/* Setting the LM_DEFAULT_COUTS to YES will use the default Callout */
/* mechanism provided by pSOSystem. Else */
/* It needs to be defined by the User. */
/* If User is not defining the call outs then pLM+ will jump to ZERO */
/* Address for execution. */
/***********************************************************************/
#define LM_DEFAULT_COUTS YES
#if LM_DEFAULT_COUTS
extern ULONG lm_loadco(const char *libname, ULONG scope, ULONG version,
const void *libinfo, /* Out */ sl_attrib *attr);
extern ULONG lm_unloadco(const sl_attrib *attr);
#define LM_LOADCO lm_loadco /* sl_acquire() Load call-out */
#define LM_UNLOADCO lm_unloadco /* sl_release() Unload call-out */
#else /* LM_DEFAULT_COUTS == NO */
#define LM_LOADCO 0
#define LM_UNLOADCO 0
#endif
#endif
/*---------------------------------------------------------------------*/
/* pREPC+ configuration parameters */
/*---------------------------------------------------------------------*/
#define LC_BUFSIZ (1 << FC_LOGBSIZE) /* I/O buffer size */
#define LC_NUMFILES 5 /* Max number of open files per task */
#define LC_WAITOPT 0 /* Wait option for memory allocation */
#define LC_TIMEOPT 0 /* Timeout option for mem allocation */
#define LC_SSIZE 512 /* Size of print buffer */
/*---------------------------------------------------------------------*/
/* pREPC+ stdin, stdout and stderr device mapping. */
/*---------------------------------------------------------------------*/
#if (SC_DEV_PSCONSOLE)
#define LC_STDIN "///dev/stdin" /* The default STDIN device */
#define LC_STDOUT "///dev/stdout" /* The default STDOUT device */
#define LC_STDERR "///dev/stderr" /* The default STDERR device */
#elif (BSP_CPUFAMILY == FAMILY_X86) && (SC_APP_CONSOLE == PCCON)
#define LC_STDIN "///dev/pcconsole" /* Make PCCON as STDIN device */
#define LC_STDOUT "///dev/pcconsole" /* Make PCCON as STDOUT device */
#define LC_STDERR "///dev/pcconsole" /* Make PCCON as STDERR device */
#elif (SC_DEV_SERIAL)
#define LC_STDIN "///dev/tty" /* Make TTY the STDIN device */
#define LC_STDOUT "///dev/tty" /* Make TTY the STDOUT device */
#define LC_STDERR "///dev/tty" /* Make TTY the STDERR device */
#elif (SC_DEV_SIMCONSOLE)
#define LC_STDIN "///dev/simconsole" /* Make simconsole STDIN */
#define LC_STDOUT "///dev/simconsole" /* Make simconsole STDOUT */
#define LC_STDERR "///dev/simconsole" /* Make simconsole STDERR */
#else
#define LC_STDIN "///dev/null" /* Make NULL the STDIN device */
#define LC_STDOUT "///dev/null" /* Make NULL the STDOUT device */
#define LC_STDERR "///dev/null" /* Make NULL the STDERR device */
#endif
#if (SC_DEV_RAMDISK)
#define LC_TEMPDIR DEV_RAMDISK /* The default TEMPDIR device */
#elif (SC_DEV_SCSI)
#define LC_TEMPDIR DEV_SCSI /* The default TEMPDIR device */
#elif (SC_DEV_IDE)
#define LC_TEMPDIR DEV_IDE /* The default TEMPDIR device */
#elif (SC_DEV_FLOPPY)
#define LC_TEMPDIR DEV_FLOPPY /* The default TEMPDIR device */
#else
#define LC_TEMPDIR 0 /* The default TEMPDIR device */
#endif
/*---------------------------------------------------------------------*/
/* pNA+ configuration parameters */
/* */
/* NOTE: If you get pNA+ errno 5F01 FAT_INSUFFMEM you may need to */
/* decrease the number of buffers allocated here for pNA+. */
/* In general this error means pNA+ could not allocate enough */
/* memory from Region 0 for the number of buffers requested. */
/*---------------------------------------------------------------------*/
#define NC_NNI 5 /* size of pNA NI Table */
#define NC_NROUTE 10 /* size of pNA Routing Table */
#define NC_NARP 20 /* size of pNA ARP table */
#define NC_DEFUID 0 /* Default User ID of a task */
#define NC_DEFGID 0 /* Default Group ID of a task */
#define NC_HOSTNAME "scg" /* Hostname of the node */
#define NC_NHENTRY 8 /* Number of Host table entries */
#define NC_NMCSOCS 0 /* Number of IP multicast sockets */
#define NC_NMCMEMB 0 /* Number of distict IP multicast */
/* group memberships per interface */
#define NC_NNODEID 0 /* Network NODE ID for unnumbered link */
#define NC_NSOCKETS 4 /* Number of sockets in the system */
#define NC_NDESCS 4 /* # of socket descriptors/task */
#define NC_MBLKS 300 /* # of message blocks in the system */
#define NC_BUFS_0 64 /* number of 0 length buffers */
#define NC_BUFS_32 0 /* number of 32 length buffers */
#define NC_BUFS_64 0 /* number of 64 length buffers */
#define NC_BUFS_128 256 /* number of 128 byte buffers */
#define NC_BUFS_256 0 /* number of 256 byte buffers */
#define NC_BUFS_512 0 /* number of 512 byte buffers */
#define NC_BUFS_1024 16 /* number of 1k byte buffers */
#define NC_BUFS_2048 48 /* number of 2k byte buffers */
#define NC_BUFS_4096 0 /* number of 4k byte buffers */
#define NC_MAX_BUFS 9 /* max number of NC_BUFS types */
#define NC_PNAMEM_NEWSCHEME YES /* apply new pNA MEM management scheme*/
#define NC_BUFS_XX_INTERNAL 20 /* # of buffers for internal pNA usage */
#define NC_MBLKS_INT_PERCENT 15 /* % of mblks reserved for pNA internal */
#define NC_MBLKS_TX_PERCENT 40 /* % of mblks reserved for Tx Mem Pool */
#define NC_BUFS_0_TX_PERCENT 50 /* % of 0 length buffers used for Tx */
#define NC_BUFS_32_TX_PERCENT 50 /* % of 32 length buffers used for Tx */
#define NC_BUFS_64_TX_PERCENT 50 /* % of 64 length buffers used for Tx */
#define NC_BUFS_128_TX_PERCENT 50 /* % of 128 byte buffers used for Tx */
#define NC_BUFS_256_TX_PERCENT 50 /* % of 256 byte buffers used for Tx */
#define NC_BUFS_512_TX_PERCENT 50 /* % of 512 byte buffers used for Tx */
#define NC_BUFS_1024_TX_PERCENT 50 /* % of 1k byte buffers used for Tx */
#define NC_BUFS_2048_TX_PERCENT 50 /* % of 2k byte buffers used for Tx */
#define NC_BUFS_4096_TX_PERCENT 50 /* % of 4k byte buffers used for Tx */
/*---------------------------------------------------------------------*/
/* pNA+ daemon task configuration parameters */
/*---------------------------------------------------------------------*/
#define NC_DTASK_STKSZ 0x800 /* pNAD daemon task stack size */
#define NC_DTASK_PRIO 255 /* pNAD daemon task priority */
#define NC_REENTRANT YES /* pNA+ reentrant */
/*---------------------------------------------------------------------*/
/* The following are examples for modifying the following defines */
/* */
/* Using a user written routine as a pNA+ Signal Handler */
/* extern void MySigHandler (void); */
/* #define NC_SIGNAL ((void (*)()) MySigHandler) */
/* */
/*---------------------------------------------------------------------*/
#define NC_SIGNAL 0 /* pNA+ Signal Hdlr */
/*---------------------------------------------------------------------*/
/* pRPC+ configuration parameters */
/*---------------------------------------------------------------------*/
#define NR_PMAP_PRIO 254 /* task priority */
#define NR_PMAP_SSTACK 0x2000 /* supervisor stack size */
#define NR_PMAP_USTACK 0x100 /* user stack size */
#define NR_PMAP_FLAGS T_LOCAL /* t_create flags */
#define NR_PMAP_MODE T_SUPV /* t_start mode */
#define NR_OPEN_SOCKET SC_PSE_PRPC /* open socket, if open rpc */
/*---------------------------------------------------------------------*/
/* User can change these TWO defines to have their own handlers. */
/*---------------------------------------------------------------------*/
#define NR_GETHOSTNAME nr_gethostname /* Function to get local */
/* host name */
#define NR_GET_HENTBYNAME nr_get_hentbyname /* Function to map host */
/* name to it's IP Addr */
/*---------------------------------------------------------------------*/
/* pSE+ configuration parameters */
/*---------------------------------------------------------------------*/
#define SE_NBUFS_0 64 /* number of 0 length buffers */
#define SE_NBUFS_32 128 /* number of 32 byte buffers */
#define SE_NBUFS_64 128 /* number of 64 byte buffers */
#define SE_NBUFS_128 256 /* number of 128 byte buffers */
#define SE_NBUFS_256 32 /* number of 256 byte buffers */
#define SE_NBUFS_512 32 /* number of 512 byte buffers */
#define SE_NBUFS_1024 16 /* number of 1k byte buffers */
#define SE_NBUFS_2048 16 /* number of 2k byte buffers */
#define SE_NBUFS_4096 8 /* number of 4k byte buffers */
#define SE_MAX_BUFS 9 /* max number of stream buffer types */
#define SE_MAX_MODULES 4 /* max number of streams modules */
#define SE_SHARE_NI NO /* LAN-NI with streams? */
#define SE_DATA_SIZE 0x1000 /* size of pSE data area */
/* (must be at least 3K) */
#define SE_TASK_PRIO 250 /* priority for pSE task */
#define SE_STACK_SIZE 0x2000 /* stack size for pSE task */
#define SE_DEF_UID 0 /* default user id */
#define SE_DEF_GID 0 /* default group id */
#define SE_N_FDS 32 /* max # of system-wide */
/* stream descriptors */
#define SE_N_TASKFDS 8 /* max # of per-task stream */
/* descriptors */
#define SE_N_LINKS 32 /* max # of multiplexing links */
#define SE_N_TIMEOUTS 32 /* max # of timeout requests */
#define SE_N_BUFCALLS 32 /* max # of bufcall requests */
#define SE_N_QUEUES 256 /* # of queues */
#define SE_N_QBANDS (SE_N_QUEUES * 2) /* # of qbands */
#define SE_N_MBLKS 512 /* # of message blocks */
#define SE_PRI_BANDS NO /* Whether priority bands are desired */
#define SE_STRLOG YES /* Whether the log facility is cnfgrd */
#define SE_TMO_RES 2 /* pSE Timer resolution in ticks */
#define SE_MAX_AUTOPUSH 10 /* Max # of autopush entries */
#define SE_SIGHANDLER NULL /* pSE global signal handler */
#define SE_PRINTF printf /* pSE printf function */
#define SE_LOG_BUFSIZE 100 /* Maximum size of the log message */
#define SE_NUM_LOG_BUFFERS 25 /* Number of log buffs to be allocated*/
#define SE_BUF_BORROW_LEVEL 0 /* The buffer borrowing level desired */
#define SE_NO_GLOBAL_LOCKING NO /* Whether global locking is desired */
#define SE_PCRASH_BUF_SIZE 8192 /* default pcrash buffer size */
#define SE_HI_BUF_RESVN_PERCENT 12 /* Hi buffer reservation % */
#define SE_MED_BUF_RESVN_PERCENT 13 /* Med buffer reservation % */
/*---------------------------------------------------------------------*/
/* Loader configuration parameters */
/* */
/* YES indicates for each module to be linked in. NO means do not link */
/* object module loader into this application. */
/* */
/*---------------------------------------------------------------------*/
#define LD_MAX_LOAD 8 /* Max. # of active loads */
#define LD_ELF_MODULE NO /* ELF object-load-module */
#define LD_SREC_MODULE NO /* SREC object-load-module */
#define LD_COFF_MODULE NO /* COFF object-load-module */
#define LD_IEEE_MODULE NO /* IEEE object-load-module */
#define LD_IHEX_MODULE NO /* IHEX object-load-module */
/*---------------------------------------------------------------------*/
/* pMONT+ configuration parameters - note that PM_DEV and PM_BAUD are */
/* only relevant to serial communication (PM_CMODE = 2) */
/*---------------------------------------------------------------------*/
#define PM_CMODE 1 /* 1 = networking, 2 = serial */
/*---------------------------------------------------------------------*/
/* PM_DEV down uses a macro to calculate the channel number, which is */
/* SERIAL_DRVRNUM(0). This means Low-Level Driver 0 (1) is used for */
/* default PM_DEV. If you need to change this to another Low-Level */
/* Serial Driver, change "0" in the macro SERIAL_DRVRNUM(0) to the */
/* number of the driver you want. */
/* */
/* Consult the "README" file in BSP directory for number of different */
/* drivers supported and for the SERIAL_DRVRNUM mapping for those */
/* drivers. */
/*---------------------------------------------------------------------*/
#define PM_DEV (2 + SERIAL_DRVRNUM(0))
/* Minor Device number for serial */
/* channel if used */
#define PM_BAUD 9600 /* Baud rate for serial chnl */
#define PM_TRACE_BUFF 0 /* Address of trace buffer -- */
/* Allocated by pSOSystem if 0 */
#define PM_TRACE_SIZE 0x6000 /* Size of trace buffer */
#define PM_TIMER YES /* 2nd timer for finer time */
/* within data collection */
/*---------------------------------------------------------------------*/
/* General Serial Block Configuration Parameters */
/*---------------------------------------------------------------------*/
#define GS_BUFS_0 64 /* number of 0 length buffers */
#define GS_BUFS_32 128 /* number of 32 byte buffers */
#define GS_BUFS_64 128 /* number of 64 byte buffers */
#define GS_BUFS_128 256 /* number of 128 byte buffers */
#define GS_BUFS_256 32 /* number of 256 byte buffers */
#define GS_BUFS_512 32 /* number of 512 byte buffers */
#define GS_BUFS_1024 16 /* number of 1k byte buffers */
#define GS_BUFS_2048 16 /* number of 2k byte buffers */
#define GS_BUFS_4096 8 /* number of 4k byte buffers */
#define GS_MBLKS 680
#define GS_MAX_BUFS 9 /* max number of serial buffer types */
/*---------------------------------------------------------------------*/
/* TCP/IP for OpEN configuration parameters */
/*---------------------------------------------------------------------*/
/*---------------------------------------------------------------------*/
/* Configurable parameters for the Network layer (IP) */
/*---------------------------------------------------------------------*/
#define OTCP_IPMAX 8 /* Max # of open IP device */
#define OTCP_IPNINTERFACES 4 /* Max # of network interfaces */
#define OTCP_IPNROUTES 64 /* Max #of routing tbl entries */
/*---------------------------------------------------------------------*/
/* Configurable parameters for ARP */
/*---------------------------------------------------------------------*/
#define OTCP_ARPMAX 8 /* Max # of open ARP device */
#define OTCP_ARPNINTERFACES 4 /* Max # of ARP interfaces */
#define OTCP_ARPNENTRIES 32 /* Max # of ARP table entries */
/*---------------------------------------------------------------------*/
/* Configurable parameters for TCP */
/*---------------------------------------------------------------------*/
#define OTCP_TCPMAX 64 /* Max # of open TCP device */
/*---------------------------------------------------------------------*/
/* Configurable parameters for UDP */
/*---------------------------------------------------------------------*/
#define OTCP_UDPMAX 32 /* Max # of open UDP device */
/*---------------------------------------------------------------------*/
/* Configurable parameters for RAW */
/*---------------------------------------------------------------------*/
#define OTCP_RAWMAX 32 /* Max # of open RAW device */
/*---------------------------------------------------------------------*/
/* Configurable parameters for LOOP */
/*---------------------------------------------------------------------*/
#define OTCP_LOOPMAX 2 /* Max # of open LOOP device */
#endif /* _SYS_CONF_H */
#ifdef __cplusplus
}
#endif
@@ -0,0 +1,53 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/isisnmp/oemtypes.h,v 1.1.1.1 2001/11/05 17:47:09 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: oemtypes.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:09 tneale
* Tornado shuffle
*
* Revision 1.6 2001/01/19 22:22:58 paul
* Update copyright.
*
* Revision 1.5 2000/03/17 00:10:01 meister
* Update copyright message
*
* Revision 1.4 2000/02/17 16:38:08 josh
* removing obsolete definitions
*
* Revision 1.3 1998/08/13 20:11:31 josh
* updates for pSOS
*
* Revision 1.2 1998/06/28 21:18:28 josh
* updating/bugfixing for SNMp
*
* Revision 1.1 1998/06/19 16:09:06 josh
* port files for building SNMp
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <stddef.h>
@@ -0,0 +1,376 @@
#* @(#) pSOSystem PowerPC/V2.2.2: configs/ppc/config.mk 1.59 97/09/12 10:00:37 *
#***********************************************************************
#* *
#* MODULE: config.mk *
#* DATE: 97/09/12 *
#* PURPOSE: Macro definitions, linker commands, etc, for "make" *
#* *
#*---------------------------------------------------------------------*
#* *
#* Copyright 2000-2001 Wind River Systems, Inc.
#* Copyright 1991 - 1997, Integrated Systems, Inc. *
#* ALL RIGHTS RESERVED *
#* *
#* Permission is hereby granted to licensees of Integrated Systems, *
#* Inc. products to use or abstract this computer program for the *
#* sole purpose of implementing a product based on Integrated *
#* Systems, Inc. products. No other rights to reproduce, use, *
#* or disseminate this computer program, whether in part or in *
#* whole, are granted. *
#* *
#* Integrated Systems, Inc. makes no representation or warranties *
#* with respect to the performance of this computer program, and *
#* specifically disclaims any responsibility for any damages, *
#* special or consequential, connected with the use of this program. *
#* *
#*---------------------------------------------------------------------*
#***********************************************************************
#
#------------------------------------------------------------------------
# Compiler commands and command-line options
#------------------------------------------------------------------------
# Add following option to COPTS_FILE2 to generate listing files
# -W:as:,-l -Xpass-source
#------------------------------------------------------------------------
CC = dcc
COMP_OPTS1 = -O -t$(DTARGET)E$(DFP):psos -Xsmall-data=8
COMP_OPTS2 = -Xstruct-best-align=0 -Xansi -D__DIAB -DPPC
COPTS_FILE1 = -I. -I$(PSS_BSP) -I$(PSS_ROOT)/include
COPTS_FILE2 = $(PSS_APPINCS) -c
COPTS = -@c.opt
#------------------------------------------------------------------------
# Assembler command-line options
#------------------------------------------------------------------------
AS = das
#------------------------------------------------------------------------
# Added target switch for the assembler
# The target definition is located in bsp.mk of the bsp you are using
#------------------------------------------------------------------------
# Add following option to AOPTS_FILE1 to generate listing files -l
#------------------------------------------------------------------------
AOPTS_FILE1 = -I. -I$(PSS_BSP) -I$(PSS_ROOT)/include
AOPTS_FILE2 = $(PSS_APPINCS) -t$(DTARGET)E$(DFP)
AOPTS = -@a.opt
#------------------------------------------------------------------------
# Linker command name
#------------------------------------------------------------------------
LD = dcc
LOPTS = -Ws -t$(DTARGET)E$(DFP) -Wl,-Xsupress-dot -Xreloc-bug -m2
#------------------------------------------------------------------------
# Librarian command name and options
#------------------------------------------------------------------------
LIB = dar
LIBOPTS = -qf
LIBOPTS_SORT = -sR
#========================================================================
# Link everything together
#========================================================================
CFG1_OBJS= sysinit.o philecfg.o pnacfg.o prepccfg.o dialog.o
CFG2_OBJS= probecfg.o prpccfg.o psecfg.o psoscfg.o pmontcfg.o
CFG3_OBJS= pollio.o bspcfg.o gsblkcfg.o rdi_ser.o
ram.elf: c.opt a.opt begin.o \
makefile \
$(CFG1_OBJS) \
$(CFG2_OBJS) \
$(CFG3_OBJS) \
prepcv.o \
$(PSS_DRVOBJS) \
$(DRV_LIB1) $(DRV_LIB2) $(DRV_LIB3) $(DRV_LIB4) $(DRV_LIB5) \
$(PSS_APPOBJS) \
$(APP_LIB1) $(APP_LIB2) $(APP_LIB3) $(APP_LIB4) $(APP_LIB5) \
$(PSS_BSP)/libbsp.a \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_BSP)/ram_di.lnk
@cat $(PSS_BSP)/ram_di.lnk >cmd.lnk
@echo $(LOPTS) -o ram.elf -Wm cmd.lnk begin.o > l.opt
@echo $(CFG1_OBJS) >> l.opt
@echo $(CFG2_OBJS) >> l.opt
@echo $(CFG3_OBJS) >> l.opt
@echo prepcv.o >> l.opt
@echo $(PSS_APPOBJS) >> l.opt
@echo -m3 $(APP_LIB1) >> l.opt
@echo -m3 $(APP_LIB2) >> l.opt
@echo -m3 $(APP_LIB3) >> l.opt
@echo -m3 $(APP_LIB4) >> l.opt
@echo -m3 $(APP_LIB5) >> l.opt
@echo $(PSS_DRVOBJS) >> l.opt
@echo -m3 $(DRV_LIB1) >> l.opt
@echo -m3 $(DRV_LIB2) >> l.opt
@echo -m3 $(DRV_LIB3) >> l.opt
@echo -m3 $(DRV_LIB4) >> l.opt
@echo -m3 $(DRV_LIB5) >> l.opt
@echo $(PSS_BSP)/libbsp.a >> l.opt
@echo $(PSS_ROOT)/sys/os/libsys.a >> l.opt
@echo -L $(PSS_ROOT)/sys/libc -lprepc >> l.opt
@echo -m3 $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > ram.map
ddump -tv ram.elf >> ram.map
ram.hex: ram.elf
ddump -Rv ram.elf -o ram.hex
rom.elf: c.opt a.opt begin.o \
makefile \
$(CFG1_OBJS) \
$(CFG2_OBJS) \
$(CFG3_OBJS) \
prepcv.o \
$(PSS_DRVOBJS) \
$(DRV_LIB1) $(DRV_LIB2) $(DRV_LIB3) $(DRV_LIB4) $(DRV_LIB5) \
$(APP_LIB1) $(APP_LIB2) $(APP_LIB3) $(APP_LIB4) $(APP_LIB5) \
$(PSS_BSP)/libbsp.a \
$(PSS_APPOBJS) \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_BSP)/rom_di.lnk
@cat $(PSS_BSP)/rom_di.lnk >cmd.lnk
@echo $(LOPTS) -o rom.elf -Wm cmd.lnk begin.o > l.opt
@echo $(CFG1_OBJS) >> l.opt
@echo $(CFG2_OBJS) >> l.opt
@echo $(CFG3_OBJS) >> l.opt
@echo prepcv.o >> l.opt
@echo $(PSS_APPOBJS) >> l.opt
@echo -m3 $(APP_LIB1) >> l.opt
@echo -m3 $(APP_LIB2) >> l.opt
@echo -m3 $(APP_LIB3) >> l.opt
@echo -m3 $(APP_LIB4) >> l.opt
@echo -m3 $(APP_LIB5) >> l.opt
@echo $(PSS_DRVOBJS) >> l.opt
@echo -m3 $(DRV_LIB1) >> l.opt
@echo -m3 $(DRV_LIB2) >> l.opt
@echo -m3 $(DRV_LIB3) >> l.opt
@echo -m3 $(DRV_LIB4) >> l.opt
@echo -m3 $(DRV_LIB5) >> l.opt
@echo $(PSS_BSP)/libbsp.a >> l.opt
@echo $(PSS_ROOT)/sys/os/libsys.a >> l.opt
@echo -L $(PSS_ROOT)/sys/libc -lprepc >> l.opt
@echo -m3 $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > rom.map
ddump -tv rom.elf >> rom.map
rom.hex: rom.elf
ddump -Rv rom.elf -o rom.hex
os.elf: c.opt a.opt begin.o \
makefile \
$(CFG1_OBJS) \
$(CFG2_OBJS) \
$(CFG3_OBJS) \
prepcv.o \
$(PSS_DRVOBJS) \
$(DRV_LIB1) $(DRV_LIB2) $(DRV_LIB3) $(DRV_LIB4) $(DRV_LIB5) \
$(PSS_BSP)/libbsp.a \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_BSP)/os.lnk
@cat $(PSS_BSP)/os.lnk >cmd.lnk
@echo $(LOPTS) -o os.elf -Wm cmd.lnk begin.o > l.opt
@echo $(CFG1_OBJS) >> l.opt
@echo $(CFG2_OBJS) >> l.opt
@echo $(CFG3_OBJS) >> l.opt
@echo prepcv.o >> l.opt
@echo $(PSS_DRVOBJS) >> l.opt
@echo -m3 $(DRV_LIB1) >> l.opt
@echo -m3 $(DRV_LIB2) >> l.opt
@echo -m3 $(DRV_LIB3) >> l.opt
@echo -m3 $(DRV_LIB4) >> l.opt
@echo -m3 $(DRV_LIB5) >> l.opt
@echo $(PSS_BSP)/libbsp.a >> l.opt
@echo $(PSS_ROOT)/sys/os/libsys.a >> l.opt
@echo -L $(PSS_ROOT)/sys/libc -lprepc >> l.opt
@echo -m3 $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > os.map
ddump -tv os.elf >> os.map
os.hex: os.elf
ddump -Rv os.elf -o os.hex
app.elf: c.opt a.opt begina.o \
makefile \
$(PSS_APPOBJS) \
$(APP_LIB1) $(APP_LIB2) $(APP_LIB3) $(APP_LIB4) $(APP_LIB5) \
prepcv.o \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_BSP)/app.lnk
@cat $(PSS_BSP)/app.lnk >cmd.lnk
@echo $(LOPTS) -o app.elf -Wm cmd.lnk begina.o > l.opt
@echo $(PSS_APPOBJS) >> l.opt
@echo -m3 $(APP_LIB1) >> l.opt
@echo -m3 $(APP_LIB2) >> l.opt
@echo -m3 $(APP_LIB3) >> l.opt
@echo -m3 $(APP_LIB4) >> l.opt
@echo -m3 $(APP_LIB5) >> l.opt
@echo prepcv.o >> l.opt
@echo $(PSS_ROOT)/sys/os/libsys.a >> l.opt
@echo -L $(PSS_ROOT)/sys/libc -lprepc >> l.opt
@echo -m3 $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > app.map
ddump -tv app.elf >> app.map
app.hex: app.elf
ddump -Rv app.elf -o app.hex
#------------------------------------------------------------------------
# Compile or assemble modules which are always used.
#------------------------------------------------------------------------
begin.o: $(PSS_CONFIG)/begin.s makefile \
$(PSS_CONFIG)/config.mk
$(AS) $(AOPTS) -o begin.o $(PSS_CONFIG)/begin.s
begina.o: $(PSS_CONFIG)/begina.s makefile \
$(PSS_CONFIG)/config.mk
$(AS) $(AOPTS) -o begina.o $(PSS_CONFIG)/begina.s
gsblkcfg.o: $(PSS_CONFIG)/gsblkcfg.c \
makefile \
$(PSS_ROOT)/include/gsblk.h \
$(PSS_CONFIG)/config.mk \
sys_conf.h
$(CC) $(COPTS) $(PSS_CONFIG)/gsblkcfg.c
sysinit.o: $(PSS_CONFIG)/sysinit.c \
makefile \
sys_conf.h \
$(PSS_BSP)/bsp.h \
$(PSS_ROOT)/include/bspfuncs.h \
$(PSS_ROOT)/include/apdialog.h \
$(PSS_ROOT)/include/pna.h \
$(PSS_ROOT)/include/configs.h \
$(PSS_ROOT)/include/sysvars.h \
$(PSS_CONFIG)/config.mk
$(CC) $(COPTS) $(PSS_CONFIG)/sysinit.c
philecfg.o: $(PSS_CONFIG)/philecfg.c \
makefile \
sys_conf.h \
$(PSS_ROOT)/include/configs.h \
$(PSS_BSP)/bsp.h \
$(PSS_ROOT)/include/bspfuncs.h \
$(PSS_CONFIG)/config.mk
$(CC) $(COPTS) $(PSS_CONFIG)/philecfg.c
pnacfg.o: $(PSS_CONFIG)/pnacfg.c \
makefile \
sys_conf.h \
$(PSS_BSP)/bsp.h \
$(PSS_ROOT)/include/bspfuncs.h \
$(PSS_ROOT)/include/pna.h \
$(PSS_ROOT)/include/configs.h \
$(PSS_ROOT)/include/sysvars.h \
$(PSS_CONFIG)/config.mk
$(CC) $(COPTS) $(PSS_CONFIG)/pnacfg.c
prepccfg.o: $(PSS_CONFIG)/prepccfg.c \
makefile \
sys_conf.h \
$(PSS_BSP)/bsp.h \
$(PSS_ROOT)/include/bspfuncs.h \
$(PSS_ROOT)/include/configs.h \
$(PSS_CONFIG)/config.mk
$(CC) $(COPTS) $(PSS_CONFIG)/prepccfg.c
probecfg.o: $(PSS_CONFIG)/probecfg.c \
makefile \
sys_conf.h \
$(PSS_BSP)/bsp.h \
$(PSS_ROOT)/include/bspfuncs.h \
$(PSS_ROOT)/include/configs.h \
$(PSS_ROOT)/include/sysvars.h \
$(PSS_CONFIG)/config.mk
$(CC) $(COPTS) $(PSS_CONFIG)/probecfg.c
prpccfg.o: $(PSS_CONFIG)/prpccfg.c \
makefile \
sys_conf.h \
$(PSS_BSP)/bsp.h \
$(PSS_ROOT)/include/bspfuncs.h \
$(PSS_ROOT)/include/configs.h \
$(PSS_CONFIG)/config.mk
$(CC) $(COPTS) $(PSS_CONFIG)/prpccfg.c
psecfg.o: $(PSS_CONFIG)/psecfg.c \
makefile \
sys_conf.h \
$(PSS_BSP)/bsp.h \
$(PSS_ROOT)/include/bspfuncs.h \
$(PSS_ROOT)/include/configs.h \
$(PSS_CONFIG)/config.mk
$(CC) $(COPTS) $(PSS_CONFIG)/psecfg.c
psoscfg.o: $(PSS_CONFIG)/psoscfg.c \
makefile \
sys_conf.h \
$(PSS_BSP)/bsp.h \
$(PSS_ROOT)/include/bspfuncs.h \
$(PSS_ROOT)/include/configs.h \
$(PSS_ROOT)/include/sysvars.h \
$(PSS_CONFIG)/config.mk
$(CC) $(COPTS) $(PSS_CONFIG)/psoscfg.c
pmontcfg.o: $(PSS_CONFIG)/pmontcfg.c \
makefile \
sys_conf.h \
$(PSS_BSP)/bsp.h \
$(PSS_ROOT)/include/bspfuncs.h \
$(PSS_ROOT)/include/configs.h \
$(PSS_CONFIG)/config.mk
$(CC) $(COPTS) $(PSS_CONFIG)/pmontcfg.c
dialog.o: $(PSS_CONFIG)/dialog.c \
makefile \
sys_conf.h \
$(PSS_BSP)/bsp.h \
$(PSS_ROOT)/include/bspfuncs.h \
$(PSS_ROOT)/include/apdialog.h \
$(PSS_ROOT)/include/sysvars.h \
$(PSS_ROOT)/include/version.h \
$(PSS_ROOT)/include/stdarg.h \
$(PSS_ROOT)/include/pna.h \
$(PSS_CONFIG)/config.mk
$(CC) $(COPTS) $(PSS_CONFIG)/dialog.c
pollio.o: $(PSS_CONFIG)/pollio.c makefile \
$(PSS_BSP)/bsp.h \
$(PSS_ROOT)/include/stdarg.h \
$(PSS_CONFIG)/config.mk
$(CC) $(COPTS) $(PSS_CONFIG)/pollio.c
prepcv.o: $(PSS_ROOT)/sys/os/prepcv.c makefile \
$(PSS_CONFIG)/config.mk
$(CC) $(COPTS) $(PSS_ROOT)/sys/os/prepcv.c
bspcfg.o: $(PSS_BSP)/bspcfg.c makefile \
$(PSS_CONFIG)/config.mk \
sys_conf.h \
$(PSS_BSP)/bsp.h
@echo -I$(PSS_ROOT)/bsps/devices > bsp.opt
$(CC) $(COPTS) -@bsp.opt $(PSS_BSP)/bspcfg.c
@rm bsp.opt
rdi_ser.o: $(PSS_CONFIG)/rdi_ser.c makefile \
sys_conf.h \
$(PSS_BSP)/bsp.h \
$(PSS_ROOT)/include/bspfuncs.h \
$(PSS_ROOT)/include/configs.h \
$(PSS_ROOT)/include/sysvars.h \
$(PSS_CONFIG)/config.mk
$(CC) $(COPTS) $(PSS_CONFIG)/rdi_ser.c
c.opt: makefile
@echo $(COMP_OPTS1) > c.opt
@echo $(COMP_OPTS2) >> c.opt
@echo $(COPTS_FILE1) >> c.opt
@echo $(COPTS_FILE2) >> c.opt
a.opt: makefile
@echo $(AOPTS_FILE1) > a.opt
@echo $(AOPTS_FILE2) >> a.opt
@@ -0,0 +1,536 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/isisnmp/ppc222/drv_conf.h,v 1.1.1.1 2001/11/05 17:47:10 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: drv_conf.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:10 tneale
* Tornado shuffle
*
* Revision 1.5 2001/01/19 22:22:58 paul
* Update copyright.
*
* Revision 1.4 2000/03/17 00:10:04 meister
* Update copyright message
*
* Revision 1.3 1998/08/20 18:01:19 josh
* sys_conf.h cleanup
*
* Revision 1.2 1998/08/19 21:38:31 josh
* adding copyright stuff.
*
*
*/
/* [clearcase]
modification history
-------------------
*/
/* @(#) pSOSystem x86/V2.2.6: apps.v22/xxxx/drv_conf.c 3.3 (snmpv2) 98/01/09 12:28:00 */
/***********************************************************************/
/* */
/* MODULE: drv_conf.c */
/* DATE: 98/01/09 */
/* PURPOSE: pSOSystem driver configuration and initialization */
/* */
/* There are two functions in this file: */
/* */
/* SetUpDrivers to setup drivers except for Network drivers */
/* SetUpNI to setup Network drivers */
/* */
/*---------------------------------------------------------------------*/
/* */
/* Copyright 1993 - 1997, Integrated Systems, Inc. */
/* ALL RIGHTS RESERVED */
/* */
/* Permission is hereby granted to licensees of Integrated Systems, */
/* Inc. products to use or abstract this computer program for the */
/* sole purpose of implementing a product based on Integrated */
/* Systems, Inc. products. No other rights to reproduce, use, */
/* or disseminate this computer program, whether in part or in */
/* whole, are granted. */
/* */
/* Integrated Systems, Inc. makes no representation or warranties */
/* with respect to the performance of this computer program, and */
/* specifically disclaims any responsibility for any damages, */
/* special or consequential, connected with the use of this program. */
/* */
/*---------------------------------------------------------------------*/
/* */
/* */
/* */
/***********************************************************************/
#include <sys_conf.h>
#include "bsp.h"
#include <bspfuncs.h>
#include <configs.h>
#include <sysvars.h>
#include <pna.h>
#if SC_DEV_SPI
#include "spi.h"
#endif
#if (SC_PSE)
#include <psecfg.h>
#include <sys/stream.h>
#endif
#if (SC_DEV_DLPI)
extern long DlpiEnet();
#endif
#define NULLF (ULONG) ((void (*)()) 0)
void InstallNi(int (*entry)(), int, int, int, int, int, int);
static const char RarpErrTimeout[] =
"RARP request failed: Check for a RARP server";
static const char RarpErrNet[] =
"RARP request failed: Network Error";
#if SC_PSOS || SC_PSOSM
/***********************************************************************/
/* SetUpDrivers: installs drivers in PsosIO table via a call to */
/* InstallDriver and then calls driver setup function if */
/* needed. NOTE: If the driver is to be part of the */
/* Network Interface then it should be placed in the */
/* SetUpNI function. */
/* */
/* INPUT: FreeMemPtr = A pointer to unused memory that can be */
/* used to allocate space for a driver. */
/* NOTE: Be sure to advance FreeMemPtr if */
/* memory is allocates! */
/* */
/* RETURNS: The new address of free memory after the drivers have */
/* allocated space. */
/* */
/* NOTE: This function does many precompile checks so errors */
/* can be found during compile-time rather then at run- */
/* time. */
/* */
/* To add a non-Network driver to pSOSystem, call InstallDriver(). */
/* This adds a device driver to the PsosIO table. InstallDriver() */
/* takes the following arguments: */
/* */
/* unsigned short major_number device major number */
/* void (*dev_init)(), device init procedure */
/* void (*dev_open)(), device open procedure */
/* void (*dev_close)(), device close procedure */
/* void (*dev_read)(), device read procedure */
/* void (*dev_write)(), device write procedure */
/* void (*dev_ioctl)(), device control procedure */
/* unsigned long rsvd1, reserved */
/* unsigned short rsvd2) reserved */
/* unsigned short flags; If set to IO_AUTOINIT pSOS will */
/* automatically call the */
/* drivers initialization */
/* function. The SC_AUTOINIT */
/* #define which is set in */
/* sys_conf.h can be used to set */
/* this element. */
/* */
/* InstallDriver() does not return a value. InstallDriver() assumes */
/* SC_DEVMAX is defined in sys_conf.h and is useful only before pSOS+ */
/* has been initialized. */
/* */
/* If you are adding a driver that needs to be initialized before */
/* either pSOS+ is initialized or the driver's init function is */
/* called, then you can call a setup function (that you create) for */
/* the driver (for example, see the CnslSetup call for the serial */
/* device driver). If your initialization function needs to allocate */
/* memory, you may pass it the FreeMemPtr. The function should return */
/* a new FreeMemPtr which points to the end of the memory it has */
/* allocated. */
/* */
/* When adding code to install a new driver, it is a good idea to add */
/* precompile checks so errors can be found during compile-time rather */
/* then at run-time. Precompile checks are used, for example, in the */
/* code that installs the pSOSystem serial device driver below. */
/* */
/***********************************************************************/
UCHAR *SetUpDrivers(UCHAR *FreeMemPtr)
{
/*---------------------------------------------------------------------*/
/* Install the pSOSystem serial device driver. */
/*---------------------------------------------------------------------*/
#if (SC_DEV_SERIAL && BSP_SERIAL)
#if(SC_DEV_SERIAL > SC_DEVMAX)
#error "SC_DEV_SERIAL cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_SERIAL, CnslInit, NULLF, NULLF,CnslRead,
CnslWrite, CnslCntrl, 0, 0, SC_AUTOINIT);
FreeMemPtr = CnslSetup(FreeMemPtr, SysVars.DefBaud,
SC_APP_CONSOLE);
#endif
/*---------------------------------------------------------------------*/
/* Install Pseudo driver */
/* NOTE: This driver must be called from a task it cannot use the */
/* auto initialization freature of pSOS+ */
/*---------------------------------------------------------------------*/
#if (SC_DEV_PSEUDO)
InstallDriver(SC_DEV_PSEUDO, PseudoIOInit, NULLF, NULLF,
PseudoIORead, PseudoIOWrite, PseudoIOCntrl, 0, 0, 0);
#endif
/*--------------------------------------------------------------------*/
/* Setup pSOSystem PC console device driver */
/*--------------------------------------------------------------------*/
#if (SC_DEV_CONSOLE && BSP_CONSOLE)
#if (SC_DEV_CONSOLE >SC_DEVMAX)
#error "SC_DEV_CONSOLE cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_CONSOLE, PcCnslInit, NULLF, NULLF,
PcCnslRead, PcCnslWrite, PcCnslCntrl, 0, 0,
SC_AUTOINIT);
#endif
/*---------------------------------------------------------------------*/
/* Install the pSOSystem tick timer. */
/*---------------------------------------------------------------------*/
#if SC_DEV_TIMER
#if(SC_DEV_TIMER > SC_DEVMAX)
#error "SC_DEV_TIMER cannot be > SC_DEVMAX"
#endif
#if (!SC_PSOS && !SC_PSOSM)
#error "Must have pSOS+ or pSOS+m in system to use tick timer!"
#endif
InstallDriver(SC_DEV_TIMER, RtcInit, NULLF, NULLF, NULLF, NULLF,
NULLF, 0, 0, SC_AUTOINIT);
#endif
/*---------------------------------------------------------------------*/
/* Install the pSOSystem ramdisk driver. */
/* NOTE: This driver must be called from a task it cannot use the */
/* auto initialization freature of pSOS+ */
/*---------------------------------------------------------------------*/
#if SC_DEV_RAMDISK
#if(SC_DEV_RAMDISK > SC_DEVMAX)
#error "SC_DEV_RAMDISK cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_RAMDISK, RdskInit, NULLF, NULLF, RdskRead,
RdskWrite, NULLF, 0, 0, 0);
#endif
/*---------------------------------------------------------------------*/
/* Install the pSOSystem SCSI driver. */
/* NOTE: This driver must be called from a task it cannot use the */
/* auto initialization freature of pSOS+ */
/*---------------------------------------------------------------------*/
#if (SC_DEV_SCSI && BSP_SCSI)
#if(SC_DEV_SCSI > SC_DEVMAX)
#error "SC_DEV_SCSI cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_SCSI, SdrvInit, NULLF, NULLF, SdskRead,
SdskWrite, SdrvCntrl, 0, 0, 0);
#endif
/*---------------------------------------------------------------------*/
/* Install the pSOSystem SCSI Tape driver. */
/* NOTE: This driver must be called from a task it cannot use the */
/* auto initialization freature of pSOS+ */
/*---------------------------------------------------------------------*/
#if (SC_DEV_SCSI_TAPE && BSP_SCSI_TAPE)
#if(SC_DEV_SCSI_TAPE > SC_DEVMAX)
#error "SC_DEV_SCSI_TAPE cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_SCSI_TAPE, SdrvInit, StapeOpen, StapeClose,
StapeRead, StapeWrite, SdrvCntrl, 0, 0, 0);
/*-----------------------------------------------------------------*/
/* Don't need to call SdrvSetup this time since it was done before */
/*-----------------------------------------------------------------*/
/* SdrvSetup(); */
#endif
/*---------------------------------------------------------------------*/
/* Setup pSOSystem CMOS clock driver */
/*---------------------------------------------------------------------*/
#if (SC_DEV_CMOS && BSP_CLOCK)
#if (SC_DEV_CMOS >SC_DEVMAX)
#error "SC_DEV_CMOS cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_CMOS, NULLF, NULLF, NULLF, CmcRead,
CmcWrite, NULLF, 0, 0, 0);
#endif
/*---------------------------------------------------------------------*/
/* Setup pSOSystem printer driver */
/*---------------------------------------------------------------------*/
#if (SC_DEV_PARALLEL && BSP_PARALLEL)
#if (SC_DEV_PARALLEL >SC_DEVMAX)
#error "SC_DEV_PARALLEL cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_PARALLEL, ParInit, ParOpen, ParClose, NULLF,
ParWrite, ParCntrl, 0, 0, 0);
#endif
/*---------------------------------------------------------------------*/
/* Setup pSOSystem floppy diskette driver */
/* NOTE: This driver must be called from a task it cannot use the */
/* auto initialization freature of pSOS+ */
/*---------------------------------------------------------------------*/
#if (SC_DEV_FLOPPY && BSP_FLOPPY)
#if (SC_DEV_FLOPPY >SC_DEVMAX)
#error "SC_DEV_FLOPPY cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_FLOPPY, FlpInit, NULLF, NULLF, FlpRead,
FlpWrite, NULLF, 0, 0, 0);
#endif
/*---------------------------------------------------------------------*/
/* Setup pSOSystem IDE disk driver */
/* NOTE: This driver must be called from a task it cannot use the */
/* auto initialization freature of pSOS+ */
/*---------------------------------------------------------------------*/
#if (SC_DEV_IDE && BSP_IDE)
#if (SC_DEV_IDE >SC_DEVMAX)
#error "SC_DEV_IDE cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_IDE, IDEInit, NULLF, NULLF, IDERead,
IDEWrite, IDECntrl, 0, 0, 0);
#endif
/*---------------------------------------------------------------------*/
/* Install the pSOSystem TFTP driver. */
/* NOTE: This driver must be called from a task it cannot use the */
/* auto initialization freature of pSOS+ */
/*---------------------------------------------------------------------*/
#if (SC_DEV_TFTP)
#if(SC_DEV_TFTP > SC_DEVMAX)
#error "SC_DEV_TFTP cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_TFTP, TftpInit, TftpOpen, TftpClose, TftpRead,
NULLF, TftpCntl, 0, 0, 0);
#endif
/*---------------------------------------------------------------------*/
/* Install the SPI driver */
/* NOTE: This driver must be called from a task it cannot use the */
/* auto initialization freature of pSOS+ */
/*---------------------------------------------------------------------*/
#if (SC_DEV_SPI)
#if(SC_DEV_SPI > SC_DEVMAX)
#error "SC_DEV_SPI cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_SPI, SPI_init, SPI_open, SPI_close, NULLF,
NULLF, SPI_io, 0, 0, 0);
#endif
/*---------------------------------------------------------------------*/
/* Install pSE DLPI driver */
/* NOTE: This driver must be called from a task it cannot use the */
/* auto initialization freature of pSOS+ */
/*---------------------------------------------------------------------*/
#if (SC_DEV_DLPI)
{
#if(SC_DEV_DLPI > SC_DEVMAX)
#error "SC_DEV_DLPI cannot be > SC_DEVMAX"
#endif
extern long DlpiNullNI();
extern UCHAR *DlpiInit(UCHAR *, long, long);
extern int DlpiAddNI(long, long(*)(), long, long, char *, long);
extern void enetinit();
extern struct streamtab enetinfo;
char *DlpiErrMsg = "DlpiAddNI failed: NI Error";
static const psedrvparam_t eth0param = {"eth0", DT_CLONE,
&enetinfo, 0, 0};
InstallDriver(SC_DEV_DLPI, enetinit, NULLF, NULLF, NULLF,
NULLF, NULLF, (long)&eth0param, 0, 0);
/*-------------------------------------------------------------*/
/* Call DlpiInit to initialize the Streams DLPI driver */
/* Arguments passed to DlpiInit are: */
/* 1. Free memory address */
/* 2. Maximum NI interface number */
/* 3. Maximum number of streams per interface */
/*-------------------------------------------------------------*/
FreeMemPtr = DlpiInit(FreeMemPtr, 1, 6);
/*-------------------------------------------------------------*/
/* Call DlpiAddNI to add an NI interface to the Streams DLPI */
/* driver. DlpiAddNI must be called for each NI driver */
/* interface used with the Streams DLPI driver. */
/* Arguments passed to DlpiAddNI are: */
/* 1. NI interface number (should correspond to the pNA+ */
/* interface number if driver is shared with pNA+) */
/* 2. NI entry point */
/* 3. NI flags */
/* IFF_SELFLOOP 0x0001 loopback for self-address */
/* IFF_POLL_NI 0x0002 driver must be polled */
/* IFF_RAWMEM 0x2000 driver accepts mblk link list */
/* 4. NI major device number */
/* 5. NI multicast address */
/* 6. NI poll frequency (every # of elapsed ticks) */
/*-------------------------------------------------------------*/
#if (BSP_LAN1 && SE_SHARE_NI)
if (DlpiAddNI(1, (long(*)())BSP_LAN1_ENTRY, 0x2000,
SC_DEV_DLPI, 0, 0))
SysInitFail(DlpiErrMsg);
#else
if (DlpiAddNI(0, (long(*)())DlpiNullNI, 0, SC_DEV_DLPI, 0, 0))
SysInitFail(DlpiErrMsg);
#endif
}
#endif
/*-------------------------------------------------------------------*/
/* Install pSOSystem Watchdog driver */
/*-------------------------------------------------------------------*/
#if (SC_DEV_WATCHDOG)
#if(SC_DEV_WATCHDOG > SC_DEVMAX)
#error "SC_DEV_WATCHDOG cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_WATCHDOG, WdtInit, NULLF, NULLF, NULLF,
NULLF, NULLF, 0, 0, 0);
#endif
/*---------------------------------------------------------------------*/
/* Additional drivers may be installed here. */
/*---------------------------------------------------------------------*/
return FreeMemPtr;
}
#endif /* SC_PSOS || SC_PSOSM */
#if SC_PNA
/***********************************************************************/
/* SetUpNI: Set up Network Interfaces for pNA+ */
/* */
/* INPUT: FreeMemPtr = A pointer to unused memory that can be */
/* used to allocate space for a driver. */
/* NOTE: Be sure to advance FreeMemPtr if */
/* memory is allocates! */
/* */
/* RETURNS: The new address of free memory after the drivers have */
/* allocated space. */
/* */
/* NOTES: This function does many precompile checks so errors */
/* can be found during compile-time rather then at run- */
/* time. */
/* */
/* Also, the Network Interface Table must be allocated */
/* before this function can be called. There cannot be */
/* more then NC_NNI entries in this table. NC_NNI is set */
/* in sys_conf.h. Before adding another interface, be */
/* sure to check sys_conf.h to see if NC_NNI is set to */
/* accommodate another one! */
/* */
/* See the pSOSystem Programmers Reference Manual */
/* for more information. */
/* */
/* To add a Network driver to pSOSystem, call InstallNi(). This adds */
/* the Network Interface to the pNA+ Network Interface Table. */
/* InstallNi() takes the following arguments: */
/* */
/* int (*entry)(); address of NI entry point */
/* int ipadd; IP address */
/* int mtu; maximum transmission length */
/* int hwalen; length of hardware address */
/* int flags; intErface flags */
/* int subnetaddr; subnet mask */
/* int dstipaddr; destination ip address */
/* */
/* See pSOSystem Programmer`s Reference Manual, Configuration Tables */
/* Section, for more information about the Network Interface Table. */
/* InstallNi() does not return a value. */
/* */
/* If you are adding a driver that needs to be initialized before */
/* either pSOS+ is initialized or the driver's init function is */
/* called, then you can call a setup function (that you create) for */
/* the driver (for example, see the CnslSetup call for the serial */
/* device driver). If your initialization function needs to allocate */
/* memory, you may pass it the FreeMemPtr. The function should return */
/* a new FreeMemPtr which points to the end of the memory it has */
/* allocated. */
/* */
/* When adding code to install a new driver, it is a good idea to add */
/* precompile checks so errors can be found during compile-time rather */
/* then at run-time. Precompile checks are used, for example, in the */
/* code that installs the pSOSystem serial device driver below. */
/* */
/***********************************************************************/
UCHAR *SetUpNI(UCHAR *FreeMemPtr)
{
int IPaddr;
/*---------------------------------------------------------------------*/
/* Install the pSOSystem NI. */
/*---------------------------------------------------------------------*/
#if BSP_LAN1
if (SysVars.Lan1)
{
/*-------------------------------------------------------------*/
/* If RARP is specified for the IP address, use it now to */
/* obtain the IP address for this interface. */
/*-------------------------------------------------------------*/
if (SysVars.Lan1IP == USE_RARP)
{
#if (SC_DEV_DLPI && SE_SHARE_NI)
IPaddr = RarpEth((long (*)())DlpiEnet);
#else
IPaddr = RarpEth((long (*)())BSP_LAN1_ENTRY);
#endif
if (IPaddr == 0)
SysInitFail(RarpErrTimeout);
if (IPaddr == -1)
SysInitFail(RarpErrNet);
}
else
IPaddr = SysVars.Lan1IP;
#if (SC_DEV_DLPI && SE_SHARE_NI)
InstallNi((int (*)())DlpiEnet, IPaddr,
#else
InstallNi((int (*)())BSP_LAN1_ENTRY, IPaddr,
#endif
BSP_LAN1_MTU, BSP_LAN1_HWALEN, BSP_LAN1_FLAGS,
SysVars.Lan1SubnetMask, 0);
}
#endif
/*---------------------------------------------------------------------*/
/* Install the shared memory NI. */
/*---------------------------------------------------------------------*/
#if BSP_SMEM
#if ((SC_NISM_LEVEL != 1) && (SC_NISM_LEVEL != 2))
#error "Illegal value for SC_NISM_LEVEL"
#endif
if (SysVars.Nism)
{
InstallNi((int (*)())NiSmem, SysVars.NismIP, NISM_MTU, 4, 0x8002,
SysVars.NismSubnetMask, 0);
/*-------------------------------------------------------------*/
/* Set up the NI Shared Memory driver by calling its function */
/* "NiSmemSetup". */
/*-------------------------------------------------------------*/
FreeMemPtr = NiSmemSetup(SC_NISM_BUFFS, FreeMemPtr,
SC_NISM_LEVEL);
}
#endif
/*---------------------------------------------------------------------*/
/* Additional Network drivers may be installed here. */
/*---------------------------------------------------------------------*/
return FreeMemPtr;
}
#endif
@@ -0,0 +1,734 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/isisnmp/ppc222/sys_conf.h,v 1.1.1.1 2001/11/05 17:47:10 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: sys_conf.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:10 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:22:59 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:10:05 meister
* Update copyright message
*
* Revision 1.2 1998/08/19 21:38:32 josh
* adding copyright stuff.
*
*
*/
/* [clearcase]
modification history
-------------------
*/
/* @(#) pSOSystem x86/V2.2.6: apps.v22/xxxx/sys_conf.h (snmpv2 386) 3.21 98/01/12 10:03:13 */
/***********************************************************************/
/* */
/* MODULE: sys_conf.h */
/* DATE: 98/01/12 */
/* PURPOSE: pSOSystem configuration definitions */
/* */
/*---------------------------------------------------------------------*/
/* */
/* Copyright 1991 - 1997, Integrated Systems, Inc. */
/* ALL RIGHTS RESERVED */
/* */
/* Permission is hereby granted to licensees of Integrated Systems, */
/* Inc. products to use or abstract this computer program for the */
/* sole purpose of implementing a product based on Integrated */
/* Systems, Inc. products. No other rights to reproduce, use, */
/* or disseminate this computer program, whether in part or in */
/* whole, are granted. */
/* */
/* Integrated Systems, Inc. makes no representation or warranties */
/* with respect to the performance of this computer program, and */
/* specifically disclaims any responsibility for any damages, */
/* special or consequential, connected with the use of this program. */
/* */
/*---------------------------------------------------------------------*/
/* */
/* This is a header file which defines all of the system-level */
/* parameters that are likely to need changing. */
/* */
/* It has been set up to be as close as possible to the settings */
/* which are appropriate for this application. However, you may */
/* need to make some changes to parameters to reflect your */
/* environment, such as IP addresses, etc. */
/* */
/* Chapter 7 of the pSOSystem Getting Started manual contains a */
/* complete description of the symbols that are defined in this */
/* file. */
/* */
/***********************************************************************/
#if __cplusplus
extern "C" {
#endif
#ifndef _SYS_CONF_H
#define _SYS_CONF_H
/***********************************************************************/
/* */
/* SC_APP_PARMS Must be defined before you include sysvars.h file. */
/* Since "sysvars.h" file depends on SC_APP_PARMS and BSP_PARMS */
/* to define the Storage Parms Structure. */
/* */
/* Defining this variable to a Non-Zero Value will create a space in */
/* the Storage Parms. structure for your application use. */
/* */
/***********************************************************************/
#define SC_APP_PARMS 0
#define SC_APP_NAME "snmpv2 Application"
/*---------------------------------------------------------------------*/
/* types.h contains common definitions for example YES and NO */
/*---------------------------------------------------------------------*/
#include <types.h>
/***********************************************************************/
/* sysvars.h contains the structures and definitions for the system */
/* variables that are stored in NVRAM. These structures and */
/* definitions are also used when creating the boot rom for the */
/* target system. By using the same sysvars.h file it will insure the */
/* consistency of the values stored by the boot rom and later read by */
/* the downloaded application. */
/***********************************************************************/
#include <sysvars.h>
/*---------------------------------------------------------------------*/
/* include psos.h for defines IO_AUTOINIT and IO_NOAUTOINIT */
/*---------------------------------------------------------------------*/
#include <psos.h>
/***********************************************************************/
/* */
/* These symbols are used to define other symbols in this file. */
/* They should never be changed. */
/* */
/***********************************************************************/
#define USE_RARP 0
/***********************************************************************/
/* */
/* B A S I C P A R A M E T E R S */
/* */
/* The parameters in this section determine the fashion in which */
/* many of the other parameters in this file will be used. */
/* */
/* Many of the parameters in this file have names beginning with */
/* either "SC_" or "SD_". Those beginning with "SC_" are ALWAYS */
/* controlled by the values you set in this file. The values of */
/* the "SD_" parameters can be determined either by the definitions */
/* given in this file, or by the data found in the target board's */
/* parameter storage area. SC_SD_PARAMETERS determines this. If */
/* SC_SD_PARAMETERS is "SYS_CONF", then the values given in this */
/* file will be used for the SD_ parameters. If SC_SD_PARAMETERS */
/* is "STORAGE", then pSOSystem will attempt to use the values found */
/* in the board's parameter storage area for the SD_ variables. If */
/* the parameter storage area has not been initialized or has been */
/* corrupted, then the values given in this file will be used. They */
/* will also be written to the storage area. */
/* */
/* If SC_SD_PARAMETERS is STORAGE, you may enable a "startup dialog" */
/* which will allow you to view, and optionally change, the */
/* parameter values found in the storage area. The dialog is enabled */
/* by setting SC_STARTUP_DIALOG to YES. In this case, */
/* SD_STARTUP_DELAY specifies the number of seconds that the dialog */
/* will wait for input before proceeding to boot the system. */
/* */
/* SC_SD_DEBUG_MODE determines how the system will operate, as follows:*/
/* */
/* DBG_SA: Boot pROBE+ in standalone mode. */
/* */
/* DBG_XS: Boot into pROBE+ and wait for the host debugger */
/* via a serial connection */
/* */
/* DBG_XN: Boot into pROBE+ and wait for the host debugger */
/* via a network connection */
/* */
/* DBG_AP: Same as DBG_SA, but also does a pROBE+ "silent startup",*/
/* meaning that pROBE+ initializes itself without */
/* printing a startup banner. pROBE+ then initializes */
/* pSOS+ and starts the application running. This mode */
/* was created to simplify implementation of the pSOSystem */
/* Boot ROMs. Note that when this mode is used, the value */
/* you specify for RC_SMODE (see "pROBE+ Configuration */
/* Parameters", below) is overridden. */
/* */
/* STORAGE: Use the mode (DBG_SA, DBG_XS, or DBG_XN) found in the */
/* parameter storage area. If a valid mode is not found, */
/* then use DBG_SA. */
/* */
/* An important consequence of using SC_SD_DEBUG_MODE=STORAGE should */
/* be noted. If you use the TFTP bootloader in the pSOSystem ROMs */
/* to download and start your system, you will be setting */
/* SC_SD_DEBUG_MODE = DBG_AP in your target board's parameter storage */
/* area. Thus, if you have left SC_SD_DEBUG_MODE set to STORAGE in */
/* this file, your downloaded system will also use DBG_AP, meaning */
/* that the application will begin running immediately after the */
/* TFTP bootloader has loaded and started your system. */
/* */
/***********************************************************************/
#define SC_SD_PARAMETERS STORAGE
#define SC_STARTUP_DIALOG NO
#define SC_BOOT_ROM NO
#define SD_STARTUP_DELAY 60
#define SC_SD_DEBUG_MODE STORAGE
/***********************************************************************/
/* */
/* O P E R A T I N G S Y S T E M C O M P O N E N T S */
/* */
/* Setting the definition line to YES will cause that component to */
/* be built into the system. NO means the component will NOT be */
/* put into the system. It is an error to specify both SC_PSOS */
/* and SC_PSOSM as present! */
/* */
/***********************************************************************/
#define SC_PSOS YES /* pSOS+ real-time kernel */
#define SC_PSOSM NO /* pSOS+ real-time multiproc kernel */
#define SC_PROBE YES /* pROBE+ (processor svcs) */
#define SC_PROBE_DISASM YES /* pROBE+ (disassembler) */
#define SC_PROBE_DASM_INTEL NO /* pROBE+ (Intel format disassembler) */
/* for x86 Targets Only */
#define SC_PROBE_CIE YES /* pROBE+ (console executive) */
#define SC_PROBE_QUERY YES /* pROBE+ (query services) */
#define SC_PROBE_DEBUG YES /* pROBE+ (debug interface executive) */
#define SC_PHILE YES /* pHILE+ file system manager */
#define SC_PREPC YES /* pREPC+ C run-time library */
#define SC_PNA YES /* pNA+ TCP/IP networking manager */
#define SC_PRPC YES /* pRPC+ RPC component */
#define SC_PSE NO /* pSE+ streams component */
#define SC_PSKT NO /* pSKT+ SKT library component */
#define SC_PTLI NO /* pTLI+ TLI library component */
#define SC_PMONT NO /* pMONT+ */
#define SC_PROFILER NO /* Profiler is enabled/Disabled */
/*---------------------------------------------------------------------*/
/* If set to IO_AUTOINIT device drivers that are installed be the */
/* InstallDriver function will have their autoinit field set. This */
/* will cause pSOS+ call the drivers initialization function when */
/* pSOS+ starts up. The de_init call will not have to be called for */
/* each driver if this is done. */
/* */
/* NOTE: This Auto Initialization will not work on all drivers. */
/* Setting IO_AUTOINIT only effects drivers that can use the Auto */
/* Initialization feature. */
/* */
/* If set to IO_NOAUTOINIT no automatic driver initialization will */
/* happen. */
/*---------------------------------------------------------------------*/
#define SC_AUTOINIT IO_AUTOINIT
/*---------------------------------------------------------------------*/
/* If SC_PMONT SC_AUTOINIT will always be set to 1 because pMONT needs */
/* drivers to be automatically initialized. */
/*---------------------------------------------------------------------*/
#if SC_PMONT
#undef SC_AUTOINIT
#define SC_AUTOINIT IO_AUTOINIT
#endif
/***********************************************************************/
/* */
/* S E R I A L C H A N N E L C O N F I G U R A T I O N */
/* */
/* * SD_DEF_BAUD specifies the default baud rate to be used for the */
/* serial channels */
/* * SC_APP_CONSOLE specifies the serial channel number (starting */
/* from 1) which should be used for the application's "console". */
/* * SC_PROBE_CONSOLE specifies the serial channel number (starting */
/* from 1) which pROBE+ should use to display output and receive */
/* commands, or to communicate with the host debugger. */
/* * SC_PROBE_HOST specifies the serial channel number (starting */
/* from 1) which should be used for the pROBE+ "host" channel. */
/* This is not normally required, so it can be disabled by */
/* using a value of 0. The host channel is explained in the */
/* pROBE+ User's Manual. */
/* */
/***********************************************************************/
#define SD_DEF_BAUD 9600
#define SC_APP_CONSOLE 1
#define SC_PROBE_CONSOLE 1
#define SC_RBUG_PORT 0
/***********************************************************************/
/* SC_NumNon_pSOSChan is the number of non pSOS users of serial */
/* channels. These are users that will be initiated before pSOS */
/* such as pROBE. */
/* NOTE: These channels will not be closed on a soft reset. */
/***********************************************************************/
#if (SC_RBUG_PORT && SC_PROBE_CONSOLE && (SC_PROBE_CONSOLE != PCCON))
#define SC_NumNon_pSOSChan 2
#else
#define SC_NumNon_pSOSChan 1
#endif
/***********************************************************************/
/* */
/* L A N C O N F I G U R A T I O N */
/* */
/* */
/***********************************************************************/
#define SD_LAN1 YES
#define SD_LAN1_IP 0x80e001b7
#define SD_LAN1_SUBNET_MASK 0xffffff00
/*---------------------------------------------------------------------*/
/* Maximum number of multicast addresses to be used by the lan */
/* interface. Must not exceed maximum supported by the lan driver. */
/*---------------------------------------------------------------------*/
#define SC_LAN1_NMCAST 0
/***********************************************************************/
/* */
/* S H A R E D M E M O R Y C O N F I G U R A T I O N */
/* */
/* */
/***********************************************************************/
/***********************************************************************/
/* */
/* B U S C O N F I G U R A T I O N */
/* */
/* */
/***********************************************************************/
#define SD_VME_BASE_ADDR 0x01000000
/*---------------------------------------------------------------------*/
/* If you want to build a Shared Memory Interface for the network or */
/* multi-processing pSOS+m, set SD_SM_NODE (a non-zero value) to the */
/* node number of THIS node. */
/*---------------------------------------------------------------------*/
#define SD_SM_NODE 0
/*---------------------------------------------------------------------*/
/* Shared memory network interface - SC_NISM_LEVEL should be 1 if this */
/* will be the FIRST system to use the SMNI on this board. It should */
/* be 2 if this will not be the first system to use the SMNI on this */
/* board. Usually this means that SC_NISM_LEVEL should be 1 if you */
/* are building Boot ROMs, and 2 for a system that will be downloaded */
/* and started using the Boot ROMs. See the comments at the beginning */
/* of drivers/ni_smem.c for more explanation. */
/*---------------------------------------------------------------------*/
#define SD_NISM NO
#define SD_NISM_IP 0x00000000
#define SD_NISM_DIRADDR 0x00000400
#define SC_NISM_BUFFS 30
#define SC_NISM_LEVEL 2
#define SD_NISM_SUBNET_MASK 0
/*---------------------------------------------------------------------*/
/* If you want to build a multi-node pSOS+m system, set SD_KISM */
/* to the number of nodes in the system. */
/*---------------------------------------------------------------------*/
#define SD_KISM 0
#define SD_KISM_DIRADDR 0x00000580
/***********************************************************************/
/* */
/* M I S C E L L A N E O U S N E T W O R K I N G */
/* P A R A M E T E R S */
/* */
/***********************************************************************/
#define SD_DEF_GTWY_IP 0
/***********************************************************************/
/* SC_RAM_SIZE */
/* */
/* Normally, pSOSystem uses ALL of the memory remaining on a board for */
/* dynamic allocation ("region 0"). You may override this by setting */
/* SC_RAM_SIZE to a non-zero value. If you do, pSOSystem will not */
/* touch any memory after address (BSP_RAM_BASE + SC_RAM_SIZE - 1). */
/* */
/* NOTE: This is useful when making a BOOT ROM and you want to ensure */
/* that the ROM's RAM area does not overflow the space alloted for it. */
/***********************************************************************/
#define SC_RAM_SIZE 0
/***********************************************************************/
/* */
/* I / O D E V I C E S */
/* */
/* Each device may be included in the system by specifying a major */
/* number for it, which determines its slot in the pSOS+ I/O switch */
/* table. To leave a device driver out of the system, use NO for */
/* the major number. */
/* */
/* Note the following: */
/* * Major device 0 is reserved and cannot be used for any of these */
/* devices. Setting a device number to 0 here is the same as NO. */
/* * No device number may be higher than SC_DEVMAX (SC_DEVMAX may */
/* be increased, if desired) */
/* * The lines defining the symbols DEV_SERIAL, DEV_TIMER, etc, */
/* should not be changed. These are for use by application */
/* programs as the "device number" parameter on de_* calls. */
/* */
/***********************************************************************/
#define SC_DEV_SERIAL 1 /* Serial driver */
#define SC_DEV_TIMER 2 /* Periodic tick timer */
#define SC_DEV_RAMDISK NO /* RAM disk */
#define SC_DEV_CONSOLE 4 /* PC-Console driver */
#define SC_DEV_SCSI NO /* SCSI bus */
#define SC_DEV_SCSI_TAPE NO /* SCSI bus, tape device */
#define SC_DEV_IDE NO /* IDE Driver */
#define SC_DEV_FLOPPY NO /* Floppy Driver */
#define SC_DEV_TFTP NO /* TFTP pseudo driver */
#define SC_DEV_SPI NO /* SPI driver */
#define SC_DEV_DLPI NO /* DLPI pseudo driver */
#define SC_DEV_OTCP NO /* 12 TCP/IP for OpEN */
#define SC_IP SC_DEV_OTCP /* 12 IP */
#define SC_ARP NO /* 13 ARP */
#define SC_TCP NO /* 14 TCP */
#define SC_UDP NO /* 15 UDP */
#define SC_RAW NO /* 16 RAW */
#define SC_LOOP NO /* 17 LOOP = (SC_DEV_OTCP + 5) */
#define SC_DEV_SOSI NO /* 18 OSI for OpEN */
#define SC_DEV_PSEUDO NO /* PSEUDO driver */
#define SC_DEV_PARALLEL NO /* Parallel Port Driver */
#define SC_DEV_CMOS NO /* CMOS Driver */
#define SC_DEV_WATCHDOG NO /* Watchdog Driver */
#define SC_DEV_OLAP NO /* LAP Driver */
#define SC_PHPI (SC_DEV_OLAP) /* Phpi driver */
#define SC_LAPB (SC_DEV_OLAP + 0)/* LAPB driver Change 0 to 1 */
#define SC_CLAPB (SC_DEV_OLAP + 0)/* LAPB driver Change 0 to 2 */
#define SC_DEV_OX25 (SC_DEV_OLAP + 0)/* LAPB driver Change 0 to 3 */
#define SC_X25 (SC_DEV_OX25) /* X25 driver */
#define SC_CX25 (SC_DEV_OX25 + 0)/* X25 driver Change 0 to 1 */
#define SC_SNDCF NO /* sndcf driver */
#define SC_CSNDCF NO /* csndcf driver */
#define SC_IPCONV NO
#define SC_CIPCONV NO
#define SC_DEVMAX 32 /* Maximum device number */
#define DEV_SERIAL (SC_DEV_SERIAL << 16)
#define DEV_PARALLEL (SC_DEV_PARALLEL << 16)
#define DEV_TIMER (SC_DEV_TIMER << 16)
#define DEV_RAMDISK (SC_DEV_RAMDISK << 16)
#define DEV_SCSI (SC_DEV_SCSI << 16)
#define DEV_SCSI_TAPE (SC_DEV_SCSI_TAPE << 16)
#define DEV_PSEUDO (SC_DEV_PSEUDO << 16)
#define DEV_DLPI (SC_DEV_DLPI << 16)
#define DEV_TFTP (SC_DEV_TFTP << 16)
#define DEV_SPI (SC_DEV_SPI << 16)
#define DEV_WATCHDOG (SC_DEV_WATCHDOG << 16)
#define DEV_FLOPPY (SC_DEV_FLOPPY << 16)
#define DEV_IDE (SC_DEV_IDE << 16)
#define DEV_CMOS (SC_DEV_CMOS << 16)
#define DEV_CONSOLE (SC_DEV_CONSOLE << 16)
#if (BSP_CPUFAMILY == FAMILY_X86) && (SC_APP_CONSOLE == PCCON)
#define CONSOLE DEV_CONSOLE
#else
#define CONSOLE DEV_SERIAL
#endif
/***********************************************************************/
/* */
/* M E M O R Y M A N A G E M E N T L I B R A R Y P A R A M S */
/* */
/***********************************************************************/
#define SC_MMULIB NO
/***********************************************************************/
/* */
/* C O M P O N E N T C O N F I G U R A T I O N P A R A M E T E R S */
/* */
/* These parameters should work as is for this application. You */
/* may want to change some of them if you start customizing this */
/* application. */
/* */
/***********************************************************************/
/*---------------------------------------------------------------------*/
/* pSOS+ configuration parameters */
/*---------------------------------------------------------------------*/
#define KC_RN0USIZE 0x100 /* region 0 unit size */
#define KC_NTASK 25 /* max number of tasks */
#define KC_NQUEUE 10 /* max number of message queues */
#define KC_NSEMA4 30 /* max number of semaphores */
#define KC_NMSGBUF 256 /* max number of message buffers */
#define KC_NTIMER 10 /* max number of timers */
#define KC_NLOCOBJ 50 /* max number of local objects */
#define KC_TICKS2SEC 100 /* clock tick interrupt frequency */
#define KC_TICKS2SLICE 10 /* time slice quantum, in ticks */
#define KC_INTSTK 0x2000 /* interrupt stack size */
#define KC_SYSSTK 0x2000 /* pSOS+ system stack size (bytes) */
#define KC_ROOTSSTK 0x4000 /* ROOT supervisor stack size */
#define KC_ROOTUSTK 0 /* ROOT user stack size */
#define KC_ROOTMODE (T_SUPV | T_ISR) /* ROOT initial mode */
#define KC_ROOTPRI 230 /* ROOT task priority */
/*---------------------------------------------------------------------*/
/* The following are examples for modifying the following defines */
/* */
/* Using a pSOSystem routine as a fatal error handler */
/* #define KC_FATAL ((void (*)()) SysInitFail) */
/* */
/* Using a user written routine as a fatal error handler */
/* extern void MyHandler (void); */
/* #define KC_FATAL ((void (*)()) MyHandler) */
/* */
/*---------------------------------------------------------------------*/
#define KC_STARTCO 0 /* callout at task activation */
#define KC_DELETECO 0 /* callout at task deletion */
#define KC_SWITCHCO 0 /* callout at task switch */
#define KC_FATAL 0 /* fatal error handler address */
#define KC_IDLECO 0 /* Idle Task Callout */
#define KC_RTCINITCO 0 /* RTC INIT Callout */
/*---------------------------------------------------------------------*/
/* pSOS+m configuration parameters */
/*---------------------------------------------------------------------*/
#define MC_NGLBOBJ 8 /* size of gbl obj table */
#define MC_NAGENT 10 /* number of RPC agents in this node */
#define MC_FLAGS SEQWRAP_ON /* operating mode flags */
/*---------------------------------------------------------------------*/
/* The following are examples for modifying the following definition */
/* */
/* Using a pSOSystem routine as a roster change handler */
/* #define MC_ROSTER ((void (*)()) SysInitFail) */
/* */
/* Using a user written routine as a roster change handler */
/* extern void MyHandler (void); */
/* #define MC_ROSTER ((void (*)()) MyHandler) */
/* */
/*---------------------------------------------------------------------*/
#define MC_ROSTER 0 /* addr of user roster change callout */
#define MC_KIMAXBUF 100 /* maximum KI packet buffer length */
#define MC_ASYNCERR 0 /* asynchronous calls error callout */
/*---------------------------------------------------------------------*/
/* pROBE configuration parameters - note that the SMODE flag bits are */
/* irrelevant if SC_SD_DEBUG_MODE = DBG_AP. */
/*---------------------------------------------------------------------*/
#define TD_BRKOPC 0xCC /* Instruction break opcode */
#define TD_ILEV (1 << 12)/* pROBE+ interrupt mask */
#define TD_FLAGS (NODOTS_MASK | TD_ILEV | NOTUPD_MASK)/* flags */
#define TD_DBGPRI 244 /* Debugger task priority */
/*---------------------------------------------------------------------*/
/* The variable defined down should be set to the Starting address for */
/* for pROBE+ DATA AREA. This is required by all the smaller boards. */
/* NOTE: */
/* Setting of this value should have atleast 0x4400 bytes Free */
/* Space from that location. */
/*---------------------------------------------------------------------*/
#define TD_DATASTART 0x0
/*---------------------------------------------------------------------*/
/* pHILE+ configuration parameters */
/*---------------------------------------------------------------------*/
#define FC_LOGBSIZE 9 /* Block size (base-2 exponent) */
#define FC_NBUF 6 /* Number of cache buffers */
#define FC_NMOUNT 3 /* Max # of mounted volumes */
#define FC_NFCB 10 /* Max # of opened files per system */
#define FC_NCFILE 2 /* Max # of opened files per task */
#define FC_NDNLC 0 /* Max # of cached directory entries */
#define FC_MSDOS 1 /* MS-DOS volume mount flag */
#define FC_CDROM 0 /* CD-ROM volume mount flag */
/*---------------------------------------------------------------------*/
/* pREPC+ configuration parameters */
/*---------------------------------------------------------------------*/
#define LC_BUFSIZ 128 /* I/O buffer size */
#define LC_NUMFILES 5 /* Max number of open files per task */
#define LC_WAITOPT 0 /* Wait option for memory allocation */
#define LC_TIMEOPT 0 /* Timeout option for mem allocation */
#define LC_SSIZE 512 /* Size of print buffer */
/*---------------------------------------------------------------------*/
/* pNA+ configuration parameters */
/* */
/* NOTE: If you get pNA+ errno 5F01 FAT_INSUFFMEM you may need to */
/* decrease the number of buffers allocated here for pNA+. */
/* In general this error means pNA+ could not allocate enough */
/* memory from Region 0 for the number of buffers requested. */
/*---------------------------------------------------------------------*/
#define NC_NNI 5 /* size of pNA NI Table */
#define NC_NROUTE 10 /* size of pNA Routing Table */
#define NC_NARP 20 /* size of pNA ARP table */
#define NC_DEFUID 0 /* Default User ID of a task */
#define NC_DEFGID 0 /* Default Group ID of a task */
#define NC_HOSTNAME "scg" /* Hostname of the node */
#define NC_NHENTRY 8 /* Number of Host table entries */
#define NC_NMCSOCS 0 /* Number of IP multicast sockets */
#define NC_NMCMEMB 0 /* Number of distict IP multicast */
/* group memberships per interface */
#define NC_NNODEID 0 /* Network NODE ID for unnumbered link */
#define NC_NSOCKETS 128 /* Number of sockets in the system */
#define NC_NDESCS 128 /* # of socket descriptors/task */
#define NC_MBLKS 300 /* # of message blocks in the system */
#define NC_BUFS_0 64 /* number of 0 length buffers */
#define NC_BUFS_32 0 /* number of 32 length buffers */
#define NC_BUFS_64 0 /* number of 64 length buffers */
#define NC_BUFS_128 256 /* number of 128 byte buffers */
#define NC_BUFS_256 0 /* number of 256 byte buffers */
#define NC_BUFS_512 0 /* number of 512 byte buffers */
#define NC_BUFS_1024 16 /* number of 1k byte buffers */
#define NC_BUFS_2048 48 /* number of 2k byte buffers */
#define NC_BUFS_4096 0 /* number of 4k byte buffers */
#define NC_MAX_BUFS 9 /* max number of NC_BUFS types */
/*---------------------------------------------------------------------*/
/* The following are examples for modifying the following defines */
/* */
/* Using a user written routine as a pNA+ Signal Handler */
/* extern void MySigHandler (void); */
/* #define NC_SIGNAL ((void (*)()) MySigHandler) */
/* */
/*---------------------------------------------------------------------*/
#define NC_SIGNAL 0 /* pNA+ Signal Hdlr */
/*---------------------------------------------------------------------*/
/* pSE+ configuration parameters */
/*---------------------------------------------------------------------*/
#define SE_NBUFS_0 64 /* number of 0 length buffers */
#define SE_NBUFS_32 128 /* number of 32 byte buffers */
#define SE_NBUFS_64 128 /* number of 64 byte buffers */
#define SE_NBUFS_128 256 /* number of 128 byte buffers */
#define SE_NBUFS_256 32 /* number of 256 byte buffers */
#define SE_NBUFS_512 32 /* number of 512 byte buffers */
#define SE_NBUFS_1024 16 /* number of 1k byte buffers */
#define SE_NBUFS_2048 16 /* number of 2k byte buffers */
#define SE_NBUFS_4096 8 /* number of 4k byte buffers */
#define SE_MAX_BUFS 9 /* max number of stream buffer types */
#define SE_MAX_MODULES 3 /* max number of streams modules */
#define SE_SHARE_NI NO /* LAN-NI with streams? */
#define SE_DATA_SIZE 0x0C00 /* size of pSE data area */
/* (must be at least 3K) */
#define SE_TASK_PRIO 250 /* priority for pSE task */
#define SE_STACK_SIZE 0x2000 /* stack size for pSE task */
#define SE_DEF_UID 0 /* default user id */
#define SE_DEF_GID 0 /* default group id */
#define SE_N_FDS 32 /* max # of system-wide */
/* stream descriptors */
#define SE_N_TASKFDS 8 /* max # of per-task stream */
/* descriptors */
#define SE_N_LINKS 32 /* max # of multiplexing links */
#define SE_N_TIMEOUTS 32 /* max # of timeout requests */
#define SE_N_BUFCALLS 32 /* max # of bufcall requests */
#define SE_N_QUEUES 256 /* # of queues */
#define SE_N_MBLKS 512 /* reserved for future use, must be 0 */
/*---------------------------------------------------------------------*/
/* Loader configuration parameters */
/* */
/* YES indicates for each module to be linked in. NO means do not link */
/* object module loader into this application. */
/* */
/*---------------------------------------------------------------------*/
#define LD_MAX_LOAD 8 /* Max. # of active loads */
#define LD_ELF_MODULE NO /* ELF object-load-module */
#define LD_SREC_MODULE NO /* SREC object-load-module */
#define LD_COFF_MODULE NO /* COFF object-load-module */
#define LD_IEEE_MODULE NO /* IEEE object-load-module */
#define LD_IHEX_MODULE NO /* IHEX object-load-module */
/*---------------------------------------------------------------------*/
/* pMONT+ configuration parameters - note that PM_DEV and PM_BAUD are */
/* only relevant to serial communication (PM_CMODE = 2) */
/*---------------------------------------------------------------------*/
#define PM_CMODE 1 /* 1 = networking, 2 = serial */
#define PM_DEV 2 /* Minor Device number for */
/* serial channel if used */
#define PM_BAUD 9600 /* Baud rate for serial chnl */
#define PM_TRACE_BUFF 0 /* Address of trace buffer -- */
/* Allocated by pSOSystem if 0 */
#define PM_TRACE_SIZE 0x6000 /* Size of trace buffer */
#define PM_TIMER NO /* 2nd timer for finer time */
/* within data collection */
/*---------------------------------------------------------------------*/
/* General Serial Block Configuration Parameters */
/*---------------------------------------------------------------------*/
#define GS_BUFS_0 64 /* number of 0 length buffers */
#define GS_BUFS_32 128 /* number of 32 byte buffers */
#define GS_BUFS_64 128 /* number of 64 byte buffers */
#define GS_BUFS_128 256 /* number of 128 byte buffers */
#define GS_BUFS_256 32 /* number of 256 byte buffers */
#define GS_BUFS_512 32 /* number of 512 byte buffers */
#define GS_BUFS_1024 16 /* number of 1k byte buffers */
#define GS_BUFS_2048 16 /* number of 2k byte buffers */
#define GS_BUFS_4096 8 /* number of 4k byte buffers */
#define GS_MBLKS 680
#define GS_MAX_BUFS 9 /* max number of serial buffer types */
/*---------------------------------------------------------------------*/
/* TCP/IP for OpEN configuration parameters */
/*---------------------------------------------------------------------*/
/*---------------------------------------------------------------------*/
/* Configurable parameters for the Network layer (IP) */
/*---------------------------------------------------------------------*/
#define OTCP_IPMAX 8 /* Max # of open IP device */
#define OTCP_IPNINTERFACES 4 /* Max # of network interfaces */
#define OTCP_IPNROUTES 64 /* Max #of routing tbl entries */
/*---------------------------------------------------------------------*/
/* Configurable parameters for ARP */
/*---------------------------------------------------------------------*/
#define OTCP_ARPMAX 8 /* Max # of open ARP device */
#define OTCP_ARPNINTERFACES 4 /* Max # of ARP interfaces */
#define OTCP_ARPNENTRIES 32 /* Max # of ARP table entries */
/*---------------------------------------------------------------------*/
/* Configurable parameters for TCP */
/*---------------------------------------------------------------------*/
#define OTCP_TCPMAX 64 /* Max # of open TCP device */
/*---------------------------------------------------------------------*/
/* Configurable parameters for UDP */
/*---------------------------------------------------------------------*/
#define OTCP_UDPMAX 32 /* Max # of open UDP device */
/*---------------------------------------------------------------------*/
/* Configurable parameters for RAW */
/*---------------------------------------------------------------------*/
#define OTCP_RAWMAX 32 /* Max # of open RAW device */
/*---------------------------------------------------------------------*/
/* Configurable parameters for LOOP */
/*---------------------------------------------------------------------*/
#define OTCP_LOOPMAX 2 /* Max # of open LOOP device */
#endif /* _SYS_CONF_H */
#if __cplusplus
}
#endif
@@ -0,0 +1,499 @@
#* @(#) pSOSystem PowerPC/V2.5.0: configs/ppc/config.mk 4.23 98/11/11 06:51:23 *
#***********************************************************************
#* *
#* MODULE: configs/std/config.mk *
#* DATE: 98/11/11 *
#* PURPOSE: Macro definitions, linker commands, etc, for "make" *
#* *
#*---------------------------------------------------------------------*
#* *
#* Copyright 2000-2001 Wind River Systems, Inc.
#* Copyright 1991 - 1998, Integrated Systems, Inc. *
#* ALL RIGHTS RESERVED *
#* *
#* Permission is hereby granted to licensees of Integrated Systems, *
#* Inc. products to use or abstract this computer program for the *
#* sole purpose of implementing a product based on Integrated *
#* Systems, Inc. products. No other rights to reproduce, use, *
#* or disseminate this computer program, whether in part or in *
#* whole, are granted. *
#* *
#* Integrated Systems, Inc. makes no representation or warranties *
#* with respect to the performance of this computer program, and *
#* specifically disclaims any responsibility for any damages, *
#* special or consequential, connected with the use of this program. *
#* *
#*---------------------------------------------------------------------*
#***********************************************************************
#
#------------------------------------------------------------------------
# Compiler commands and command-line options
#------------------------------------------------------------------------
# Add following option to COPTS_FILE2 to generate listing files
# -W:as:,-l -Xpass-source
#------------------------------------------------------------------------
CC = @echo "Making $@ \tfrom $<";dcc
CXX = @echo "Making $@ \tfrom $<";dplus
COMP_OPTS1 = -O -t$(DTARGET)E$(DFP):psos -Xstruct-best-align=0
COMP_OPTS2 = -Xstrict-ansi $(PSS_APPCOPTS) -D__DIAB -DPPC
COPTS_FILE1 = -I. -I$(PSS_ROOT)/include -I$(PSS_BSP) $(PSS_APPINCS)
COPTS_FILE2 = -I$(PSS_ROOT)/bsps/devices $(PSS_VINCLUDE) -I@ -c
CXX_OPTS = -Xexception
#------------------------------------------------------------------------
# COPT_PER_FILE is used to provide a convenient way to add per
# file compile options. If a .cop file for a source file exist then
# content of this file is passed as the compile options.
#------------------------------------------------------------------------
COPT_PER_FILE=`if [ -f ./$(*F).cop ]; then cat ./$(*F).cop; fi`
COPTS = -@c.opt $(COPT_PER_FILE)
CXXOPTS = -@cxx.opt $(COPT_PER_FILE)
#------------------------------------------------------------------------
# TARGET_CPU is used in application makefiles to pass on to incremental
# linking and other tools.
#------------------------------------------------------------------------
TARGET_CPU = -t$(DTARGET)E$(DFP):psos
#------------------------------------------------------------------------
# Assembler command-line options
#------------------------------------------------------------------------
AS = @echo "Making $@ \tfrom $<";das
#------------------------------------------------------------------------
# Added target switch for the assembler
# The target definition is located in bsp.mk of the bsp you are using
#------------------------------------------------------------------------
# Add following option to AOPTS_FILE1 to generate listing files -l
#------------------------------------------------------------------------
AOPTS_FILE1 = -I. $(PSS_APPINCS) -I$(PSS_ROOT)/include -I$(PSS_BSP)
AOPTS_FILE2 = -I$(PSS_ROOT)/bsps/devices $(PSS_VINCLUDE) -I@
AOPTS_FILE3 = -t$(DTARGET)E$(DFP)
AOPTS = -@a.opt $(COPT_PER_FILE)
#------------------------------------------------------------------------
# Linker command name
#------------------------------------------------------------------------
LD = dld
LOPTS = -t$(DTARGET)E$(DFP) -Xsuppress-dot -Xreloc-bug -m2 $(PSS_APPLOPTS)
#------------------------------------------------------------------------
# Librarian command name and options
#------------------------------------------------------------------------
LIB = dar
LIBOPTS = -qf
LIBOPTS_SORT = -sR
#========================================================================
# Link everything together
#========================================================================
CFG1_OBJS= sysinit.o bspcfg.o pnacfg.o prepccfg.o dialog.o
CFG2_OBJS= probecfg.o prpccfg.o psecfg.o psoscfg.o pmontcfg.o
CFG3_OBJS= pollio.o philecfg.o gsblkcfg.o plmcfg.o pnetcfg.o
CFG4_OBJS= ldcfg.o posixcfg.o rtacfg.o
ram.elf: cxx.opt c.opt a.opt ill.opt begin.o \
makefile \
ram.dld \
$(CFG1_OBJS) \
$(CFG2_OBJS) \
$(CFG3_OBJS) \
$(CFG4_OBJS) \
$(PSS_DRVOBJS) \
$(PSS_APPOBJS) \
$(PSS_BSP)/libbsp.a \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_ROOT)/sys/libc/libprepc$(DFP).a \
$(PSS_ROOT)/sys/libc/libpnet.a
@echo $(LOPTS) -o ram.elf -Wm ram.dld begin.o > l.opt
@echo -L $(PSS_BSP) -L $(PSS_ROOT)/sys/os >> l.opt
@echo -L $(PSS_ROOT)/sys/libc $(PSS_APPLINKS) >> l.opt
@echo $(PSS_VLINK) >> l.opt
@echo $(CFG1_OBJS) >> l.opt
@echo $(CFG2_OBJS) >> l.opt
@echo $(CFG3_OBJS) >> l.opt
@echo $(CFG4_OBJS) >> l.opt
@echo $(PSS_APPOBJS) >> l.opt
@echo -m3 $(APP_LIB1) >> l.opt
@echo -m3 $(APP_LIB2) >> l.opt
@echo -m3 $(APP_LIB3) >> l.opt
@echo -m3 $(APP_LIB4) >> l.opt
@echo -m3 $(APP_LIB5) >> l.opt
@echo $(PSS_DRVOBJS) >> l.opt
@echo -m3 $(DRV_LIB1) >> l.opt
@echo -m3 $(DRV_LIB2) >> l.opt
@echo -m3 $(DRV_LIB3) >> l.opt
@echo -m3 $(DRV_LIB4) >> l.opt
@echo -m3 $(DRV_LIB5) >> l.opt
@echo -lbsp -ldrv >> l.opt
@echo -lsys >> l.opt
@echo -lprepc$(DFP) -lpnet -lquery >> l.opt
@echo -m3 $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > ram.map
ddump -tv ram.elf >> ram.map
ram.dld: $(PSS_BSP)/anchor.dld \
$(PSS_BSP)/ram.dld
@cat $(PSS_BSP)/ram.dld > ram.dld
@cat $(PSS_BSP)/anchor.dld >> ram.dld
ram.hex: ram.elf
ddump -Rv ram.elf -o ram.hex
rom.elf: cxx.opt c.opt a.opt ill.opt begin.o \
makefile \
rom.dld \
$(CFG1_OBJS) \
$(CFG2_OBJS) \
$(CFG3_OBJS) \
$(CFG4_OBJS) \
$(PSS_DRVOBJS) \
$(PSS_BSP)/libbsp.a \
$(PSS_APPOBJS) \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_ROOT)/sys/libc/libprepc$(DFP).a \
$(PSS_ROOT)/sys/libc/libpnet.a
@echo $(LOPTS) -o rom.elf -Wm rom.dld begin.o > l.opt
@echo -L $(PSS_BSP) -L $(PSS_ROOT)/sys/os >> l.opt
@echo -L $(PSS_ROOT)/sys/libc $(PSS_APPLINKS) >> l.opt
@echo $(PSS_VLINK) >> l.opt
@echo $(CFG1_OBJS) >> l.opt
@echo $(CFG2_OBJS) >> l.opt
@echo $(CFG3_OBJS) >> l.opt
@echo $(CFG4_OBJS) >> l.opt
@echo $(PSS_APPOBJS) >> l.opt
@echo -m3 $(APP_LIB1) >> l.opt
@echo -m3 $(APP_LIB2) >> l.opt
@echo -m3 $(APP_LIB3) >> l.opt
@echo -m3 $(APP_LIB4) >> l.opt
@echo -m3 $(APP_LIB5) >> l.opt
@echo $(PSS_DRVOBJS) >> l.opt
@echo -m3 $(DRV_LIB1) >> l.opt
@echo -m3 $(DRV_LIB2) >> l.opt
@echo -m3 $(DRV_LIB3) >> l.opt
@echo -m3 $(DRV_LIB4) >> l.opt
@echo -m3 $(DRV_LIB5) >> l.opt
@echo -lbsp -ldrv >> l.opt
@echo -lsys >> l.opt
@echo -lprepc$(DFP) -lpnet -lquery >> l.opt
@echo -m3 $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > rom.map
ddump -tv rom.elf >> rom.map
rom.dld: $(PSS_BSP)/anchor.dld \
$(PSS_BSP)/rom.dld
@cat $(PSS_BSP)/rom.dld > rom.dld
@cat $(PSS_BSP)/anchor.dld >> rom.dld
rom.hex: rom.elf
ddump -Rv rom.elf -o rom.hex
os.elf: cxx.opt c.opt a.opt ill.opt begin.o \
makefile \
os.dld \
$(CFG1_OBJS) \
$(CFG2_OBJS) \
$(CFG3_OBJS) \
$(CFG4_OBJS) \
$(PSS_DRVOBJS) \
$(PSS_BSP)/libbsp.a \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_ROOT)/sys/libc/libprepc$(DFP).a \
$(PSS_ROOT)/sys/libc/libpnet.a
@echo $(LOPTS) -o os.elf -Wm os.dld begin.o > l.opt
@echo -L $(PSS_BSP) -L $(PSS_ROOT)/sys/os >> l.opt
@echo -L $(PSS_ROOT)/sys/libc $(PSS_APPLINKS) >> l.opt
@echo $(PSS_VLINK) >> l.opt
@echo $(CFG1_OBJS) >> l.opt
@echo $(CFG2_OBJS) >> l.opt
@echo $(CFG3_OBJS) >> l.opt
@echo $(CFG4_OBJS) >> l.opt
@echo $(PSS_DRVOBJS) >> l.opt
@echo -m3 $(DRV_LIB1) >> l.opt
@echo -m3 $(DRV_LIB2) >> l.opt
@echo -m3 $(DRV_LIB3) >> l.opt
@echo -m3 $(DRV_LIB4) >> l.opt
@echo -m3 $(DRV_LIB5) >> l.opt
@echo -lbsp -ldrv >> l.opt
@echo -lsys >> l.opt
@echo -lprepc$(DFP) -lpnet -lquery >> l.opt
@echo -m3 $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > os.map
ddump -tv os.elf >> os.map
os.dld: $(PSS_BSP)/anchor.dld \
$(PSS_BSP)/os.dld
@cat $(PSS_BSP)/os.dld > os.dld
@cat $(PSS_BSP)/anchor.dld >> os.dld
os.hex: os.elf
ddump -Rv os.elf -o os.hex
app.elf: cxx.opt c.opt a.opt ill.opt beginapp.o bspcalls.o \
makefile \
app.dld \
$(PSS_APPOBJS) \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_ROOT)/sys/libc/libprepc$(DFP).a
@echo $(LOPTS) -o app.elf -Wm app.dld beginapp.o > l.opt
@echo bspcalls.o >> l.opt
@echo -L $(PSS_BSP) -L $(PSS_ROOT)/sys/os >> l.opt
@echo -L $(PSS_ROOT)/sys/libc $(PSS_APPLINKS) >> l.opt
@echo $(PSS_VLINK) >> l.opt
@echo $(PSS_APPOBJS) >> l.opt
@echo -m3 $(APP_LIB1) >> l.opt
@echo -m3 $(APP_LIB2) >> l.opt
@echo -m3 $(APP_LIB3) >> l.opt
@echo -m3 $(APP_LIB4) >> l.opt
@echo -m3 $(APP_LIB5) >> l.opt
@echo -lsys >> l.opt
@echo -lprepc$(DFP) -lquery >> l.opt
@echo -m3 $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > app.map
ddump -tv app.elf >> app.map
app.dld: $(PSS_BSP)/anchor.dld \
$(PSS_BSP)/app.dld
@cat $(PSS_BSP)/app.dld > app.dld
@cat $(PSS_BSP)/anchor.dld >> app.dld
app_ld.elf: app.elf
@echo $(PSS_LDBOPTS) -p 180 -n LDBL -mAT -u 1024 -s 4096 > ld_prep.def
@ld_prep -v -d ld_prep.def -o app_ld.elf app.elf
@rm -f ld_prep.def
app.hex: app.elf
ddump -Rv app.elf -o app.hex
app_ld.hex: app.hex
@echo $(PSS_LDBOPTS) -p 180 -n LDBL -mAT -u 1024 -s 4096 > ld_prep.def
@ld_prep -v -d ld_prep.def -o app_ld.hex app.hex
@rm -f ld_prep.def
driver.elf: cxx.opt c.opt a.opt ill.opt lddriver.o bspcalls.o \
ldblcfg.o \
makefile \
driver.dld \
$(PSS_APPOBJS) \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_ROOT)/sys/libc/libprepc$(DFP).a
@echo $(LOPTS) -o driver.elf driver.dld lddriver.o > l.opt
@echo bspcalls.o >> l.opt
@echo -L $(PSS_BSP) -L $(PSS_ROOT)/sys/os >> l.opt
@echo -L $(PSS_ROOT)/sys/libc $(PSS_APPLINKS) >> l.opt
@echo $(PSS_VLINK) >> l.opt
@echo $(PSS_APPOBJS) >> l.opt
@echo -m3 $(APP_LIB1) >> l.opt
@echo -m3 $(APP_LIB2) >> l.opt
@echo -m3 $(APP_LIB3) >> l.opt
@echo -m3 $(APP_LIB4) >> l.opt
@echo -m3 $(APP_LIB5) >> l.opt
@echo -lsys >> l.opt
@echo -lprepc$(DFP) >> l.opt
@echo -m3 $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > driver.map
@ddump -tv driver.elf >> driver.map
driver.dld: $(PSS_BSP)/anchor.dld \
$(PSS_BSP)/app.dld
@cat $(PSS_BSP)/app.dld > driver.dld
@cat $(PSS_BSP)/anchor.dld >> driver.dld
lddriver.elf: driver.elf
@echo $(PSS_LDBOPTS) -p 180 -n LDBL -mAT -u 1024 -s 4096 > ld_prep.def
@ld_prep -v -d ld_prep.def -o lddriver.elf driver.elf
@rm -f ld_prep.def
lib.elf: cxx.opt c.opt a.opt ill.opt bspcalls.o \
makefile \
lib.dld \
$(PSS_APPOBJS) \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_ROOT)/sys/libc/libprepc$(DFP).a
@echo $(LOPTS) -o lib.elf lib.dld > l.opt
@echo bspcalls.o >> l.opt
@echo -L $(PSS_BSP) -L $(PSS_ROOT)/sys/os >> l.opt
@echo -L $(PSS_ROOT)/sys/libc $(PSS_APPLINKS) >> l.opt
@echo $(PSS_VLINK) >> l.opt
@echo $(PSS_APPOBJS) >> l.opt
@echo -m3 $(APP_LIB1) >> l.opt
@echo -m3 $(APP_LIB2) >> l.opt
@echo -m3 $(APP_LIB3) >> l.opt
@echo -m3 $(APP_LIB4) >> l.opt
@echo -m3 $(APP_LIB5) >> l.opt
@echo -lsys >> l.opt
@echo -lprepc$(DFP) -lquery >> l.opt
@echo -m3 $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > lib.map
@ddump -tv lib.elf >> lib.map
lib.dld: $(PSS_BSP)/anchor.dld \
$(PSS_BSP)/app.dld
@cat $(PSS_BSP)/app.dld > lib.dld
@cat $(PSS_BSP)/anchor.dld >> lib.dld
lib_ld.elf: lib.elf
@echo $(PSS_LDBOPTS) > ld_prep.def
@ld_prep -v -d ld_prep.def -o lib_ld.elf lib.elf
@rm -f ld_prep.def
lib.hex: lib.elf
ddump -Rv lib.elf -o lib.hex
lib_ld.hex: lib.hex
@echo $(PSS_LDBOPTS) > ld_prep.def
@ld_prep -v -d ld_prep.def -o lib_ld.hex lib.hex
@rm -f ld_prep.def
#------------------------------------------------------------------------
# Compile or assemble modules which are always used.
#------------------------------------------------------------------------
begin.o: $(PSS_CONFIG)/begin.s \
makefile $(PSS_CONFIG)/config.mk
$(AS) $(AOPTS) -o $@ $<
beginapp.o: $(PSS_CONFIG)/beginapp.s \
makefile $(PSS_CONFIG)/config.mk
$(AS) $(AOPTS) -o $@ $<
lddriver.o: $(PSS_CONFIG)/lddriver.s \
makefile $(PSS_CONFIG)/config.mk
$(AS) $(AOPTS) -o $@ $<
bspcalls.o: $(PSS_BSP)/bspcalls.s \
makefile $(PSS_CONFIG)/config.mk
$(AS) $(AOPTS) -o $@ $<
gsblkcfg.o: $(PSS_CONFIG)/gsblkcfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h
$(CC) $(COPTS) -o $@ $<
sysinit.o: $(PSS_CONFIG)/sysinit.c \
qpsos.tmp \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o sysinit.tmp $<
@$(LD) $(LOPTS) -r -Xsuppress-dot -Xreloc-bug -o sysinit.o sysinit.tmp qpsos.tmp > qpsos.map
@rm -f qpsos.o qmpsos.o qpsos.map sysinit.tmp
qpsos.tmp: $(PSS_ROOT)/sys/os/qpsos.s
@echo "UNIPROC=1" > qpsos_tmp.s
@cat $< >> qpsos_tmp.s
@$(AS) $(AOPTS) -o qpsos.o qpsos_tmp.s
@echo "UNIPROC=0" > qpsos_tmp.s
@cat $< >> qpsos_tmp.s
@das $(AOPTS) -I$(PSS_ROOT)/sys/os -o qmpsos.o qpsos_tmp.s
@rm -f qpsos.tmp qpsos_tmp.s
@$(LIB) cr qpsos.tmp qpsos.o qmpsos.o
philecfg.o: $(PSS_CONFIG)/philecfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
pnacfg.o: $(PSS_CONFIG)/pnacfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
pnetcfg.o: $(PSS_CONFIG)/pnetcfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
prepccfg.o: $(PSS_CONFIG)/prepccfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
probecfg.o: $(PSS_CONFIG)/probecfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
prpccfg.o: $(PSS_CONFIG)/prpccfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
psecfg.o: $(PSS_CONFIG)/psecfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
psoscfg.o: $(PSS_CONFIG)/psoscfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
pmontcfg.o: $(PSS_CONFIG)/pmontcfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
dialog.o: $(PSS_CONFIG)/dialog.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
pollio.o: $(PSS_CONFIG)/pollio.c \
makefile $(PSS_CONFIG)/config.mk \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
bspcfg.o: $(PSS_BSP)/bspcfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
plmcfg.o: $(PSS_CONFIG)/plmcfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
ldcfg.o: $(PSS_CONFIG)/ldcfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h
$(CC) $(COPTS) -o $@ $<
posixcfg.o: $(PSS_CONFIG)/posixcfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
rtacfg.o: $(PSS_CONFIG)/rtacfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
c.opt: makefile $(PSS_CONFIG)/config.mk
@echo $(COMP_OPTS1) > c.opt
@echo $(COMP_OPTS2) >> c.opt
@echo $(COPTS_FILE1) >> c.opt
@echo $(COPTS_FILE2) >> c.opt
cxx.opt: makefile $(PSS_CONFIG)/config.mk
@echo $(COMP_OPTS1) > cxx.opt
@echo $(COMP_OPTS2) >> cxx.opt
@echo $(COPTS_FILE1) >> cxx.opt
@echo $(COPTS_FILE2) >> cxx.opt
@echo $(CXX_OPTS) >> cxx.opt
a.opt: makefile $(PSS_CONFIG)/config.mk
@echo $(AOPTS_FILE1) > a.opt
@echo $(AOPTS_FILE2) >> a.opt
@echo $(AOPTS_FILE3) >> a.opt
ill.opt: makefile $(PSS_CONFIG)/config.mk
@echo $(LOPTS) > ill.opt
#------------------------------------------------------------------------
# Following target is used in psosmake to ensure that .opt files exist
# when target for a single file is made.
#------------------------------------------------------------------------
create_opt_files: c.opt cxx.opt a.opt $(PSS_APP_OPTFILES)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,51 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/isisnmp/snmptalk.h,v 1.1.1.1 2001/11/05 17:47:09 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: snmptalk.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:09 tneale
* Tornado shuffle
*
* Revision 1.3 2001/01/19 22:22:58 paul
* Update copyright.
*
* Revision 1.2 2000/03/17 00:10:01 meister
* Update copyright message
*
* Revision 1.1 1998/08/17 21:47:13 josh
* adding a new file to the port directory
*
*
*/
/* [clearcase]
modification history
-------------------
*/
/* defines for nvutils for file manipulation */
#define SNMP_READONLY "r"
#define SNMP_READPLUS "r+"
#define SNMP_WRITEPLUS "w+"
#define SNMP_REMOVE_FILE(fname) remove_f(fname)
#define NEEDS_STRDUP
#define NEEDS_STRICMP
@@ -0,0 +1,611 @@
#* @(#) pSOSystem SPL/V2.5.0-F8: configs/spl/config.mk 4.7 00/02/03 14:36:27 *
#***********************************************************************
#* *
#* MODULE: configs/std/config.mk *
#* DATE: 00/02/03 *
#* PURPOSE: Macro definitions, linker commands, etc, for "make" *
#* *
#*---------------------------------------------------------------------*
#* *
#* Copyright 1991 - 2000, Integrated Systems, Inc. *
#* ALL RIGHTS RESERVED *
#* *
#* Permission is hereby granted to licensees of Integrated Systems, *
#* Inc. products to use or abstract this computer program for the *
#* sole purpose of implementing a product based on Integrated *
#* Systems, Inc. products. No other rights to reproduce, use, *
#* or disseminate this computer program, whether in part or in *
#* whole, are granted. *
#* *
#* Integrated Systems, Inc. makes no representation or warranties *
#* with respect to the performance of this computer program, and *
#* specifically disclaims any responsibility for any damages, *
#* special or consequential, connected with the use of this program. *
#* *
#*---------------------------------------------------------------------*
#***********************************************************************
#
#------------------------------------------------------------------------
# Compiler commands and command-line options
#------------------------------------------------------------------------
#------------------------------------------------------------------------
# Note the CC and CXX commands are continued on several lines.
#
# Only echo the "Making..." string if the silent flags was not given.
#
# The command `echo ${MAKEFLAGS} | sed 's/[^s]//g'` echoes the make flags
# to the standard input of the sed command. The sed command replaces
# every character that is not an s with nothing. So if the silent flag
# was given the left side of the equals results in "Xs". If the silent
# flag was not given it would result in "X".
#------------------------------------------------------------------------
CC = @if [ "X`echo ${MAKEFLAGS} | sed 's/[^s]//g'`" = "X" ]; \
then \
echo "Making $@ \tfrom $<"; \
fi; \
dcc
CXX = @if [ "X`echo ${MAKEFLAGS} | sed 's/[^s]//g'`" = "X" ]; \
then \
echo "Making $@ \tfrom $<"; \
fi; \
dplus
#------------------------------------------------------------------------
# Add following option to COPTS_FILE2 to generate listing files
# -W:as:,-l -Xpass-source
#------------------------------------------------------------------------
COMP_OPTS1 = -O -g -t$(DTARGET)E$(DFP):psos -Xstruct-best-align=0
COMP_OPTS2 = -Xforce-prototypes -Xstrict-ansi $(PSS_APPCOPTS) -D__DIAB -DSPL
COPTS_FILE1 = -I. -I$(PSS_ROOT)/include -I$(PSS_BSP) $(PSS_APPINCS)
COPTS_FILE2 = -I$(PSS_ROOT)/bsps/devices $(PSS_VINCLUDE) -I@ -c
CXX_OPTS = -Xexception
#------------------------------------------------------------------------
# COPT_PER_FILE is used to provide a convenient way to add per
# file compile options. If a .cop file for a source file exist then
# content of this file is passed as the compile options.
#------------------------------------------------------------------------
COPT_PER_FILE=`if [ -f ./$(*F).cop ]; then cat ./$(*F).cop; fi`
COPTS = -@c.opt $(COPT_PER_FILE)
CXXOPTS = -@cxx.opt $(COPT_PER_FILE)
#------------------------------------------------------------------------
# TARGET_CPU is used in application makefiles to pass on to incremental
# linking and other tools.
#------------------------------------------------------------------------
TARGET_CPU = -t$(DTARGET)E$(DFP):psos
#------------------------------------------------------------------------
# DEVICES_CPU_DIR is used by application makefiles to make them generic
# across platforms.
#------------------------------------------------------------------------
DEVICES_CPU_DIR = $(PSS_ROOT)/bsps/devices/powerpc
#------------------------------------------------------------------------
# Assembler command-line options
#
# Note the AS command is continued on several lines.
#
# Only echo the "Making..." string if the silent flags was not given.
#
# The command `echo ${MAKEFLAGS} | sed 's/[^s]//g'` echoes the make flags
# to the standard input of the sed command. The sed command replaces
# every character that is not an s with nothing. So if the silent flag
# was given the left side of the equals results in "Xs". If the silent
# flag was not given it would result in "X".
#------------------------------------------------------------------------
AS = @if [ "X`echo ${MAKEFLAGS} | sed 's/[^s]//g'`" = "X" ]; \
then \
echo "Making $@ \tfrom $<"; \
fi; \
das
#------------------------------------------------------------------------
# Added target switch for the assembler
# The target definition is located in bsp.mk of the bsp you are using
#------------------------------------------------------------------------
# Add following option to AOPTS_FILE1 to generate listing files -l
#------------------------------------------------------------------------
AOPTS_FILE1 = -I. $(PSS_APPINCS) -I$(PSS_ROOT)/include -I$(PSS_BSP)
AOPTS_FILE2 = -I$(PSS_ROOT)/bsps/devices $(PSS_VINCLUDE) -I@
AOPTS_FILE3 = -t$(DTARGET)E$(DFP):psos
AOPTS = -@a.opt $(COPT_PER_FILE)
#------------------------------------------------------------------------
# Linker command name
#------------------------------------------------------------------------
LD = dld
LOPTS = -t$(DTARGET)E$(DFP):psos -Xsuppress-dot -Xreloc-bug -m2 $(PSS_APPLOPTS)
#------------------------------------------------------------------------
# Librarian command name and options
#------------------------------------------------------------------------
LIB = dar
LIBOPTS = -qf
LIBOPTS_SORT = -sR
#========================================================================
# Link everything together
#========================================================================
CFG1_OBJS= sysinit.o bspcfg.o pnacfg.o prepccfg.o dialog.o
CFG2_OBJS= probecfg.o prpccfg.o psecfg.o psoscfg.o pmontcfg.o
CFG3_OBJS= pollio.o philecfg.o gsblkcfg.o plmcfg.o pnetcfg.o
CFG4_OBJS= ldcfg.o posixcfg.o rtacfg.o
ram.elf: cxx.opt c.opt a.opt ill.opt begin.o compiler.o \
makefile \
ram.dld \
$(CFG1_OBJS) \
$(CFG2_OBJS) \
$(CFG3_OBJS) \
$(CFG4_OBJS) \
$(PSS_DRVOBJS) \
$(PSS_APPOBJS) \
$(PSS_BSP)/libbsp.a \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_ROOT)/sys/libc/libprepc$(DFP).a \
$(PSS_ROOT)/sys/libc/libpnet.a
@echo $(LOPTS) -o ram.elf -Wm ram.dld begin.o > l.opt
@echo -L $(PSS_BSP) -L $(PSS_ROOT)/sys/os >> l.opt
@echo -L $(PSS_ROOT)/sys/libc $(PSS_APPLINKS) >> l.opt
@echo $(PSS_VLINK) >> l.opt
@echo compiler.o >> l.opt
@echo $(CFG1_OBJS) >> l.opt
@echo $(CFG2_OBJS) >> l.opt
@echo $(CFG3_OBJS) >> l.opt
@echo $(CFG4_OBJS) >> l.opt
@echo $(PSS_APPOBJS) >> l.opt
@echo $(APP_LIB1) >> l.opt
@echo $(APP_LIB2) >> l.opt
@echo $(APP_LIB3) >> l.opt
@echo $(APP_LIB4) >> l.opt
@echo $(APP_LIB5) >> l.opt
@echo $(PSS_DRVOBJS) >> l.opt
@echo $(DRV_LIB1) >> l.opt
@echo $(DRV_LIB2) >> l.opt
@echo $(DRV_LIB3) >> l.opt
@echo $(DRV_LIB4) >> l.opt
@echo $(DRV_LIB5) >> l.opt
@echo -lbsp -ldrv >> l.opt
@echo -lsys >> l.opt
@echo -lprepc$(DFP) -lpnet -lquery >> l.opt
@echo $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > ram.map
ddump -tv ram.elf >> ram.map
ram.dld: $(PSS_BSP)/anchor.dld \
$(PSS_BSP)/ram.dld
@cat $(PSS_BSP)/ram.dld > ram.dld
@cat $(PSS_BSP)/anchor.dld >> ram.dld
ram.hex: ram.elf
ddump -Rv ram.elf -o ram.hex
rom.elf: cxx.opt c.opt a.opt ill.opt rombegin.o compiler.o \
makefile \
rom.dld \
$(CFG1_OBJS) \
$(CFG2_OBJS) \
$(CFG3_OBJS) \
$(CFG4_OBJS) \
$(PSS_DRVOBJS) \
$(PSS_BSP)/libbsp.a \
$(PSS_APPOBJS) \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_ROOT)/sys/libc/libprepc$(DFP).a \
$(PSS_ROOT)/sys/libc/libpnet.a
@echo $(LOPTS) -o rom.elf -Wm rom.dld rombegin.o > l.opt
@echo -L $(PSS_BSP) -L $(PSS_ROOT)/sys/os >> l.opt
@echo -L $(PSS_ROOT)/sys/libc $(PSS_APPLINKS) >> l.opt
@echo $(PSS_VLINK) >> l.opt
@echo compiler.o >> l.opt
@echo $(CFG1_OBJS) >> l.opt
@echo $(CFG2_OBJS) >> l.opt
@echo $(CFG3_OBJS) >> l.opt
@echo $(CFG4_OBJS) >> l.opt
@echo $(PSS_APPOBJS) >> l.opt
@echo $(APP_LIB1) >> l.opt
@echo $(APP_LIB2) >> l.opt
@echo $(APP_LIB3) >> l.opt
@echo $(APP_LIB4) >> l.opt
@echo $(APP_LIB5) >> l.opt
@echo $(PSS_DRVOBJS) >> l.opt
@echo $(DRV_LIB1) >> l.opt
@echo $(DRV_LIB2) >> l.opt
@echo $(DRV_LIB3) >> l.opt
@echo $(DRV_LIB4) >> l.opt
@echo $(DRV_LIB5) >> l.opt
@echo -lbsp -ldrv >> l.opt
@echo -lsys >> l.opt
@echo -lprepc$(DFP) -lpnet -lquery >> l.opt
@echo $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > rom.map
ddump -tv rom.elf >> rom.map
rom.dld: $(PSS_BSP)/anchor.dld \
$(PSS_BSP)/rom.dld
@cat $(PSS_BSP)/rom.dld > rom.dld
@cat $(PSS_BSP)/anchor.dld >> rom.dld
rom.hex: rom.elf
ddump -Rv rom.elf -o rom.hex
os.elf: cxx.opt c.opt a.opt ill.opt begin.o \
makefile \
os.dld \
$(CFG1_OBJS) \
$(CFG2_OBJS) \
$(CFG3_OBJS) \
$(CFG4_OBJS) \
$(PSS_DRVOBJS) \
$(PSS_BSP)/libbsp.a \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_ROOT)/sys/libc/libprepc$(DFP).a \
$(PSS_ROOT)/sys/libc/libpnet.a
@echo $(LOPTS) -o os.elf -Wm os.dld begin.o > l.opt
@echo -L $(PSS_BSP) -L $(PSS_ROOT)/sys/os >> l.opt
@echo -L $(PSS_ROOT)/sys/libc $(PSS_APPLINKS) >> l.opt
@echo $(PSS_VLINK) >> l.opt
@echo $(CFG1_OBJS) >> l.opt
@echo $(CFG2_OBJS) >> l.opt
@echo $(CFG3_OBJS) >> l.opt
@echo $(CFG4_OBJS) >> l.opt
@echo $(PSS_DRVOBJS) >> l.opt
@echo $(DRV_LIB1) >> l.opt
@echo $(DRV_LIB2) >> l.opt
@echo $(DRV_LIB3) >> l.opt
@echo $(DRV_LIB4) >> l.opt
@echo $(DRV_LIB5) >> l.opt
@echo -lbsp -ldrv >> l.opt
@echo -lsys >> l.opt
@echo -lprepc$(DFP) -lpnet -lquery >> l.opt
@echo $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > os.map
ddump -tv os.elf >> os.map
os.dld: $(PSS_BSP)/anchor.dld \
$(PSS_BSP)/os.dld
@cat $(PSS_BSP)/os.dld > os.dld
@cat $(PSS_BSP)/anchor.dld >> os.dld
os.hex: os.elf
ddump -Rv os.elf -o os.hex
app.elf: cxx.opt c.opt a.opt ill.opt beginapp.o bspcalls.o compiler.o \
makefile \
app.dld \
$(PSS_APPOBJS) \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_ROOT)/sys/libc/libprepc$(DFP).a
@echo $(LOPTS) -o app.elf -Wm app.dld beginapp.o > l.opt
@echo bspcalls.o >> l.opt
@echo -L $(PSS_BSP) -L $(PSS_ROOT)/sys/os >> l.opt
@echo -L $(PSS_ROOT)/sys/libc $(PSS_APPLINKS) >> l.opt
@echo $(PSS_VLINK) >> l.opt
@echo compiler.o >> l.opt
@echo $(PSS_APPOBJS) >> l.opt
@echo $(APP_LIB1) >> l.opt
@echo $(APP_LIB2) >> l.opt
@echo $(APP_LIB3) >> l.opt
@echo $(APP_LIB4) >> l.opt
@echo $(APP_LIB5) >> l.opt
@echo -lsys >> l.opt
@echo -lprepc$(DFP) -lquery >> l.opt
@echo $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > app.map
ddump -tv app.elf >> app.map
app.dld: $(PSS_BSP)/anchor.dld \
$(PSS_BSP)/app.dld
@cat $(PSS_BSP)/app.dld > app.dld
@cat $(PSS_BSP)/anchor.dld >> app.dld
app.hex: app.elf
ddump -R app.elf -o app.hex
app_ld.elf: cxx.opt c.opt a.opt ill.opt ldbegin.o bspcalls.o compiler.o \
ldblcfg.o makefile \
app_ld.dld \
$(PSS_APPOBJS) \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_ROOT)/sys/libc/libprepc$(DFP).a
@echo $(LOPTS) -o app_tmp.elf -Wm app_ld.dld > l.opt
@echo ldbegin.o bspcalls.o >> l.opt
@echo -L $(PSS_BSP) -L $(PSS_ROOT)/sys/os >> l.opt
@echo -L $(PSS_ROOT)/sys/libc $(PSS_APPLINKS) >> l.opt
@echo $(PSS_VLINK) >> l.opt
@echo compiler.o >> l.opt
@echo $(PSS_APPOBJS) >> l.opt
@echo $(APP_LIB1) >> l.opt
@echo $(APP_LIB2) >> l.opt
@echo $(APP_LIB3) >> l.opt
@echo $(APP_LIB4) >> l.opt
@echo $(APP_LIB5) >> l.opt
@echo -lsys >> l.opt
@echo -lprepc$(DFP) -lquery >> l.opt
@echo $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > app_ld.map
ddump -tv app_tmp.elf >> app_ld.map
@echo $(PSS_LDBOPTS) -p 180 -n LDBL -mAT -u 1024 -s 8192 > ld_prep.def
@ld_prep -v -d ld_prep.def -o app_ld.elf app_tmp.elf
@rm -f ld_prep.def
app_ld.hex: cxx.opt c.opt a.opt ill.opt ldbegin.o bspcalls.o compiler.o \
ldblcfg.o makefile \
app_ld.dld \
$(PSS_APPOBJS) \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_ROOT)/sys/libc/libprepc$(DFP).a
@echo $(LOPTS) -o app_tmp.elf -Wm app_ld.dld > l.opt
@echo ldbegin.o bspcalls.o >> l.opt
@echo -L $(PSS_BSP) -L $(PSS_ROOT)/sys/os >> l.opt
@echo -L $(PSS_ROOT)/sys/libc $(PSS_APPLINKS) >> l.opt
@echo $(PSS_VLINK) >> l.opt
@echo compiler.o >> l.opt
@echo $(PSS_APPOBJS) >> l.opt
@echo $(APP_LIB1) >> l.opt
@echo $(APP_LIB2) >> l.opt
@echo $(APP_LIB3) >> l.opt
@echo $(APP_LIB4) >> l.opt
@echo $(APP_LIB5) >> l.opt
@echo -lsys >> l.opt
@echo -lprepc$(DFP) -lquery >> l.opt
@echo $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > app_ld.map
ddump -tv app_tmp.elf >> app_ld.map
ddump -R app_tmp.elf -o app_tmp.hex
@echo $(PSS_LDBOPTS) -p 180 -n LDBL -mAT -u 1024 -s 8192 > ld_prep.def
@ld_prep -v -d ld_prep.def -o app_ld.hex app_tmp.hex
@rm -f ld_prep.def
app_ld.dld: $(PSS_BSP)/anchor.dld \
$(PSS_BSP)/app.dld
@cat $(PSS_BSP)/app.dld > app_ld.dld
@cat $(PSS_BSP)/anchor.dld >> app_ld.dld
driver.elf: cxx.opt c.opt a.opt ill.opt lddriver.o bspcalls.o compiler.o \
ldblcfg.o \
makefile \
driver.dld \
$(PSS_APPOBJS) \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_ROOT)/sys/libc/libprepc$(DFP).a
@echo $(LOPTS) -o driver.elf driver.dld lddriver.o > l.opt
@echo bspcalls.o >> l.opt
@echo -L $(PSS_BSP) -L $(PSS_ROOT)/sys/os >> l.opt
@echo -L $(PSS_ROOT)/sys/libc $(PSS_APPLINKS) >> l.opt
@echo $(PSS_VLINK) >> l.opt
@echo compiler.o >> l.opt
@echo $(PSS_APPOBJS) >> l.opt
@echo $(APP_LIB1) >> l.opt
@echo $(APP_LIB2) >> l.opt
@echo $(APP_LIB3) >> l.opt
@echo $(APP_LIB4) >> l.opt
@echo $(APP_LIB5) >> l.opt
@echo -lsys >> l.opt
@echo -lprepc$(DFP) >> l.opt
@echo $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > driver.map
@ddump -tv driver.elf >> driver.map
driver.dld: $(PSS_BSP)/anchor.dld \
$(PSS_BSP)/app.dld
@cat $(PSS_BSP)/app.dld > driver.dld
@cat $(PSS_BSP)/anchor.dld >> driver.dld
lddriver.elf: driver.elf
@echo $(PSS_LDBOPTS) -p 180 -n LDBL -mAT -u 1024 -s 4096 > ld_prep.def
@ld_prep -v -d ld_prep.def -o lddriver.elf driver.elf
@rm -f ld_prep.def
lib.elf: cxx.opt c.opt a.opt ill.opt bspcalls.o compiler.o \
makefile \
lib.dld \
$(PSS_APPOBJS) \
$(PSS_ROOT)/sys/os/libsys.a \
$(PSS_ROOT)/sys/libc/libprepc$(DFP).a
@echo $(LOPTS) -o lib.elf lib.dld > l.opt
@echo bspcalls.o >> l.opt
@echo -L $(PSS_BSP) -L $(PSS_ROOT)/sys/os >> l.opt
@echo -L $(PSS_ROOT)/sys/libc $(PSS_APPLINKS) >> l.opt
@echo $(PSS_VLINK) >> l.opt
@echo compiler.o >> l.opt
@echo $(PSS_APPOBJS) >> l.opt
@echo $(APP_LIB1) >> l.opt
@echo $(APP_LIB2) >> l.opt
@echo $(APP_LIB3) >> l.opt
@echo $(APP_LIB4) >> l.opt
@echo $(APP_LIB5) >> l.opt
@echo -lsys >> l.opt
@echo -lprepc$(DFP) -lquery >> l.opt
@echo $(FIX_LIB) >> l.opt
@echo $(PSS_COMPLIB) >> l.opt
$(LD) -@l.opt > lib.map
@ddump -tv lib.elf >> lib.map
lib.dld: $(PSS_BSP)/anchor.dld \
$(PSS_BSP)/app.dld
@cat $(PSS_BSP)/app.dld > lib.dld
@cat $(PSS_BSP)/anchor.dld >> lib.dld
lib_ld.elf: lib.elf
@echo $(PSS_LDBOPTS) > ld_prep.def
@ld_prep -v -d ld_prep.def -o lib_ld.elf lib.elf
@rm -f ld_prep.def
lib.hex: lib.elf
ddump -R lib.elf -o lib.hex
lib_ld.hex: lib.hex
@echo $(PSS_LDBOPTS) > ld_prep.def
@ld_prep -v -d ld_prep.def -o lib_ld.hex lib.hex
@rm -f ld_prep.def
#------------------------------------------------------------------------
# Compile or assemble modules which are always used.
#------------------------------------------------------------------------
begin.o: $(PSS_CONFIG)/begin.s \
makefile $(PSS_CONFIG)/config.mk
$(AS) $(AOPTS) -o $@ $<
rombegin.o: $(PSS_CONFIG)/rombegin.s \
makefile $(PSS_CONFIG)/config.mk
$(AS) $(AOPTS) -o $@ $<
beginapp.o: $(PSS_CONFIG)/beginapp.s \
makefile $(PSS_CONFIG)/config.mk
$(AS) $(AOPTS) -o $@ $<
ldbegin.o: $(PSS_CONFIG)/ldbegin.s \
makefile $(PSS_CONFIG)/config.mk
$(AS) $(AOPTS) -o $@ $<
lddriver.o: $(PSS_CONFIG)/lddriver.s \
makefile $(PSS_CONFIG)/config.mk
$(AS) $(AOPTS) -o $@ $<
bspcalls.o: $(PSS_BSP)/bspcalls.s \
makefile $(PSS_CONFIG)/config.mk
$(AS) $(AOPTS) -o $@ $<
gsblkcfg.o: $(PSS_CONFIG)/gsblkcfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h
$(CC) $(COPTS) -o $@ $<
sysinit.o: $(PSS_CONFIG)/sysinit.c \
qpsos.tmp \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o sysinit.tmp $<
@$(LD) $(LOPTS) -r -Xsuppress-dot -Xreloc-bug -o sysinit.o sysinit.tmp qpsos.tmp > qpsos.map
@rm -f qpsos.o qmpsos.o qpsos.map sysinit.tmp
qpsos.tmp: $(PSS_ROOT)/sys/os/qpsos.s
@echo "UNIPROC=1" > qpsos_tmp.s
@cat $< >> qpsos_tmp.s
@$(AS) $(AOPTS) -o qpsos.o qpsos_tmp.s
@echo "UNIPROC=0" > qpsos_tmp.s
@cat $< >> qpsos_tmp.s
@das $(AOPTS) -I$(PSS_ROOT)/sys/os -o qmpsos.o qpsos_tmp.s
@rm -f qpsos.tmp qpsos_tmp.s
@$(LIB) cr qpsos.tmp qpsos.o qmpsos.o
philecfg.o: $(PSS_CONFIG)/philecfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
pnacfg.o: $(PSS_CONFIG)/pnacfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
pnetcfg.o: $(PSS_CONFIG)/pnetcfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
prepccfg.o: $(PSS_CONFIG)/prepccfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
probecfg.o: $(PSS_CONFIG)/probecfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
prpccfg.o: $(PSS_CONFIG)/prpccfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
psecfg.o: $(PSS_CONFIG)/psecfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
psoscfg.o: $(PSS_CONFIG)/psoscfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
pmontcfg.o: $(PSS_CONFIG)/pmontcfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
dialog.o: $(PSS_CONFIG)/dialog.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
pollio.o: $(PSS_CONFIG)/pollio.c \
makefile $(PSS_CONFIG)/config.mk \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
bspcfg.o: $(PSS_BSP)/bspcfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
plmcfg.o: $(PSS_CONFIG)/plmcfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
ldcfg.o: $(PSS_CONFIG)/ldcfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h
$(CC) $(COPTS) -o $@ $<
compiler.o: $(PSS_CONFIG)/compiler.c \
makefile $(PSS_CONFIG)/config.mk
$(CC) $(COPTS) -o $@ $<
posixcfg.o: $(PSS_CONFIG)/posixcfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
rtacfg.o: $(PSS_CONFIG)/rtacfg.c \
makefile $(PSS_CONFIG)/config.mk sys_conf.h \
$(PSS_BSP)/bsp.h
$(CC) $(COPTS) -o $@ $<
c.opt: makefile $(PSS_CONFIG)/config.mk
@echo $(COMP_OPTS1) > c.opt
@echo $(COMP_OPTS2) >> c.opt
@echo $(COPTS_FILE1) >> c.opt
@echo $(COPTS_FILE2) >> c.opt
cxx.opt: makefile $(PSS_CONFIG)/config.mk
@echo $(COMP_OPTS1) > cxx.opt
@echo $(COMP_OPTS2) >> cxx.opt
@echo $(COPTS_FILE1) >> cxx.opt
@echo $(COPTS_FILE2) >> cxx.opt
@echo $(CXX_OPTS) >> cxx.opt
a.opt: makefile $(PSS_CONFIG)/config.mk
@echo $(AOPTS_FILE1) > a.opt
@echo $(AOPTS_FILE2) >> a.opt
@echo $(AOPTS_FILE3) >> a.opt
ill.opt: makefile $(PSS_CONFIG)/config.mk
@echo $(LOPTS) > ill.opt
#------------------------------------------------------------------------
# Following target is used in psosmake to ensure that .opt files exist
# when target for a single file is made.
#------------------------------------------------------------------------
create_opt_files: c.opt cxx.opt a.opt $(PSS_APP_OPTFILES)
@@ -0,0 +1,535 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/isisnmp/x86226/drv_conf.h,v 1.1.1.1 2001/11/05 17:47:11 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: drv_conf.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:11 tneale
* Tornado shuffle
*
* Revision 1.5 2001/01/19 22:23:00 paul
* Update copyright.
*
* Revision 1.4 2000/03/17 00:10:13 meister
* Update copyright message
*
* Revision 1.3 1998/08/20 18:01:21 josh
* sys_conf.h cleanup
*
* Revision 1.2 1998/08/19 21:38:34 josh
* adding copyright stuff.
*
*
*/
/* [clearcase]
modification history
-------------------
*/
/* @(#) pSOSystem x86/V2.2.6: apps.v22/xxxx/drv_conf.c 3.3 (snmpv2) 98/01/09 12:28:00 */
/***********************************************************************/
/* */
/* MODULE: drv_conf.c */
/* DATE: 98/01/09 */
/* PURPOSE: pSOSystem driver configuration and initialization */
/* */
/* There are two functions in this file: */
/* */
/* SetUpDrivers to setup drivers except for Network drivers */
/* SetUpNI to setup Network drivers */
/* */
/*---------------------------------------------------------------------*/
/* */
/* Copyright 1993 - 1997, Integrated Systems, Inc. */
/* ALL RIGHTS RESERVED */
/* */
/* Permission is hereby granted to licensees of Integrated Systems, */
/* Inc. products to use or abstract this computer program for the */
/* sole purpose of implementing a product based on Integrated */
/* Systems, Inc. products. No other rights to reproduce, use, */
/* or disseminate this computer program, whether in part or in */
/* whole, are granted. */
/* */
/* Integrated Systems, Inc. makes no representation or warranties */
/* with respect to the performance of this computer program, and */
/* specifically disclaims any responsibility for any damages, */
/* special or consequential, connected with the use of this program. */
/* */
/*---------------------------------------------------------------------*/
/* */
/* */
/* */
/***********************************************************************/
#include <sys_conf.h>
#include "bsp.h"
#include <bspfuncs.h>
#include <configs.h>
#include <sysvars.h>
#include <pna.h>
#if SC_DEV_SPI
#include "spi.h"
#endif
#if (SC_PSE)
#include <psecfg.h>
#include <sys/stream.h>
#endif
#if (SC_DEV_DLPI)
extern long DlpiEnet();
#endif
#define NULLF (ULONG) ((void (*)()) 0)
void InstallNi(int (*entry)(), int, int, int, int, int, int);
static const char RarpErrTimeout[] =
"RARP request failed: Check for a RARP server";
static const char RarpErrNet[] =
"RARP request failed: Network Error";
#if SC_PSOS || SC_PSOSM
/***********************************************************************/
/* SetUpDrivers: installs drivers in PsosIO table via a call to */
/* InstallDriver and then calls driver setup function if */
/* needed. NOTE: If the driver is to be part of the */
/* Network Interface then it should be placed in the */
/* SetUpNI function. */
/* */
/* INPUT: FreeMemPtr = A pointer to unused memory that can be */
/* used to allocate space for a driver. */
/* NOTE: Be sure to advance FreeMemPtr if */
/* memory is allocates! */
/* */
/* RETURNS: The new address of free memory after the drivers have */
/* allocated space. */
/* */
/* NOTE: This function does many precompile checks so errors */
/* can be found during compile-time rather then at run- */
/* time. */
/* */
/* To add a non-Network driver to pSOSystem, call InstallDriver(). */
/* This adds a device driver to the PsosIO table. InstallDriver() */
/* takes the following arguments: */
/* */
/* unsigned short major_number device major number */
/* void (*dev_init)(), device init procedure */
/* void (*dev_open)(), device open procedure */
/* void (*dev_close)(), device close procedure */
/* void (*dev_read)(), device read procedure */
/* void (*dev_write)(), device write procedure */
/* void (*dev_ioctl)(), device control procedure */
/* unsigned long rsvd1, reserved */
/* unsigned short rsvd2) reserved */
/* unsigned short flags; If set to IO_AUTOINIT pSOS will */
/* automatically call the */
/* drivers initialization */
/* function. The SC_AUTOINIT */
/* #define which is set in */
/* sys_conf.h can be used to set */
/* this element. */
/* */
/* InstallDriver() does not return a value. InstallDriver() assumes */
/* SC_DEVMAX is defined in sys_conf.h and is useful only before pSOS+ */
/* has been initialized. */
/* */
/* If you are adding a driver that needs to be initialized before */
/* either pSOS+ is initialized or the driver's init function is */
/* called, then you can call a setup function (that you create) for */
/* the driver (for example, see the CnslSetup call for the serial */
/* device driver). If your initialization function needs to allocate */
/* memory, you may pass it the FreeMemPtr. The function should return */
/* a new FreeMemPtr which points to the end of the memory it has */
/* allocated. */
/* */
/* When adding code to install a new driver, it is a good idea to add */
/* precompile checks so errors can be found during compile-time rather */
/* then at run-time. Precompile checks are used, for example, in the */
/* code that installs the pSOSystem serial device driver below. */
/* */
/***********************************************************************/
UCHAR *SetUpDrivers(UCHAR *FreeMemPtr)
{
/*---------------------------------------------------------------------*/
/* Install the pSOSystem serial device driver. */
/*---------------------------------------------------------------------*/
#if (SC_DEV_SERIAL && BSP_SERIAL)
#if(SC_DEV_SERIAL > SC_DEVMAX)
#error "SC_DEV_SERIAL cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_SERIAL, CnslInit, NULLF, NULLF,CnslRead,
CnslWrite, CnslCntrl, 0, 0, SC_AUTOINIT);
FreeMemPtr = CnslSetup(FreeMemPtr, SysVars.DefBaud,
SC_APP_CONSOLE);
#endif
/*---------------------------------------------------------------------*/
/* Install Pseudo driver */
/* NOTE: This driver must be called from a task it cannot use the */
/* auto initialization freature of pSOS+ */
/*---------------------------------------------------------------------*/
#if (SC_DEV_PSEUDO)
InstallDriver(SC_DEV_PSEUDO, PseudoIOInit, NULLF, NULLF,
PseudoIORead, PseudoIOWrite, PseudoIOCntrl, 0, 0, 0);
#endif
/*--------------------------------------------------------------------*/
/* Setup pSOSystem PC console device driver */
/*--------------------------------------------------------------------*/
#if (SC_DEV_CONSOLE && BSP_CONSOLE)
#if (SC_DEV_CONSOLE >SC_DEVMAX)
#error "SC_DEV_CONSOLE cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_CONSOLE, PcCnslInit, NULLF, NULLF,
PcCnslRead, PcCnslWrite, PcCnslCntrl, 0, 0,
SC_AUTOINIT);
#endif
/*---------------------------------------------------------------------*/
/* Install the pSOSystem tick timer. */
/*---------------------------------------------------------------------*/
#if SC_DEV_TIMER
#if(SC_DEV_TIMER > SC_DEVMAX)
#error "SC_DEV_TIMER cannot be > SC_DEVMAX"
#endif
#if (!SC_PSOS && !SC_PSOSM)
#error "Must have pSOS+ or pSOS+m in system to use tick timer!"
#endif
InstallDriver(SC_DEV_TIMER, RtcInit, NULLF, NULLF, NULLF, NULLF,
NULLF, 0, 0, SC_AUTOINIT);
#endif
/*---------------------------------------------------------------------*/
/* Install the pSOSystem ramdisk driver. */
/* NOTE: This driver must be called from a task it cannot use the */
/* auto initialization freature of pSOS+ */
/*---------------------------------------------------------------------*/
#if SC_DEV_RAMDISK
#if(SC_DEV_RAMDISK > SC_DEVMAX)
#error "SC_DEV_RAMDISK cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_RAMDISK, RdskInit, NULLF, NULLF, RdskRead,
RdskWrite, NULLF, 0, 0, 0);
#endif
/*---------------------------------------------------------------------*/
/* Install the pSOSystem SCSI driver. */
/* NOTE: This driver must be called from a task it cannot use the */
/* auto initialization freature of pSOS+ */
/*---------------------------------------------------------------------*/
#if (SC_DEV_SCSI && BSP_SCSI)
#if(SC_DEV_SCSI > SC_DEVMAX)
#error "SC_DEV_SCSI cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_SCSI, SdrvInit, NULLF, NULLF, SdskRead,
SdskWrite, SdrvCntrl, 0, 0, 0);
#endif
/*---------------------------------------------------------------------*/
/* Install the pSOSystem SCSI Tape driver. */
/* NOTE: This driver must be called from a task it cannot use the */
/* auto initialization freature of pSOS+ */
/*---------------------------------------------------------------------*/
#if (SC_DEV_SCSI_TAPE && BSP_SCSI_TAPE)
#if(SC_DEV_SCSI_TAPE > SC_DEVMAX)
#error "SC_DEV_SCSI_TAPE cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_SCSI_TAPE, SdrvInit, StapeOpen, StapeClose,
StapeRead, StapeWrite, SdrvCntrl, 0, 0, 0);
/*-----------------------------------------------------------------*/
/* Don't need to call SdrvSetup this time since it was done before */
/*-----------------------------------------------------------------*/
/* SdrvSetup(); */
#endif
/*---------------------------------------------------------------------*/
/* Setup pSOSystem CMOS clock driver */
/*---------------------------------------------------------------------*/
#if (SC_DEV_CMOS && BSP_CLOCK)
#if (SC_DEV_CMOS >SC_DEVMAX)
#error "SC_DEV_CMOS cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_CMOS, NULLF, NULLF, NULLF, CmcRead,
CmcWrite, NULLF, 0, 0, 0);
#endif
/*---------------------------------------------------------------------*/
/* Setup pSOSystem printer driver */
/*---------------------------------------------------------------------*/
#if (SC_DEV_PARALLEL && BSP_PARALLEL)
#if (SC_DEV_PARALLEL >SC_DEVMAX)
#error "SC_DEV_PARALLEL cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_PARALLEL, ParInit, ParOpen, ParClose, NULLF,
ParWrite, ParCntrl, 0, 0, 0);
#endif
/*---------------------------------------------------------------------*/
/* Setup pSOSystem floppy diskette driver */
/* NOTE: This driver must be called from a task it cannot use the */
/* auto initialization freature of pSOS+ */
/*---------------------------------------------------------------------*/
#if (SC_DEV_FLOPPY && BSP_FLOPPY)
#if (SC_DEV_FLOPPY >SC_DEVMAX)
#error "SC_DEV_FLOPPY cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_FLOPPY, FlpInit, NULLF, NULLF, FlpRead,
FlpWrite, NULLF, 0, 0, 0);
#endif
/*---------------------------------------------------------------------*/
/* Setup pSOSystem IDE disk driver */
/* NOTE: This driver must be called from a task it cannot use the */
/* auto initialization freature of pSOS+ */
/*---------------------------------------------------------------------*/
#if (SC_DEV_IDE && BSP_IDE)
#if (SC_DEV_IDE >SC_DEVMAX)
#error "SC_DEV_IDE cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_IDE, IDEInit, NULLF, NULLF, IDERead,
IDEWrite, IDECntrl, 0, 0, 0);
#endif
/*---------------------------------------------------------------------*/
/* Install the pSOSystem TFTP driver. */
/* NOTE: This driver must be called from a task it cannot use the */
/* auto initialization freature of pSOS+ */
/*---------------------------------------------------------------------*/
#if (SC_DEV_TFTP)
#if(SC_DEV_TFTP > SC_DEVMAX)
#error "SC_DEV_TFTP cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_TFTP, TftpInit, TftpOpen, TftpClose, TftpRead,
NULLF, TftpCntl, 0, 0, 0);
#endif
/*---------------------------------------------------------------------*/
/* Install the SPI driver */
/* NOTE: This driver must be called from a task it cannot use the */
/* auto initialization freature of pSOS+ */
/*---------------------------------------------------------------------*/
#if (SC_DEV_SPI)
#if(SC_DEV_SPI > SC_DEVMAX)
#error "SC_DEV_SPI cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_SPI, SPI_init, SPI_open, SPI_close, NULLF,
NULLF, SPI_io, 0, 0, 0);
#endif
/*---------------------------------------------------------------------*/
/* Install pSE DLPI driver */
/* NOTE: This driver must be called from a task it cannot use the */
/* auto initialization freature of pSOS+ */
/*---------------------------------------------------------------------*/
#if (SC_DEV_DLPI)
{
#if(SC_DEV_DLPI > SC_DEVMAX)
#error "SC_DEV_DLPI cannot be > SC_DEVMAX"
#endif
extern long DlpiNullNI();
extern UCHAR *DlpiInit(UCHAR *, long, long);
extern int DlpiAddNI(long, long(*)(), long, long, char *, long);
extern void enetinit();
extern struct streamtab enetinfo;
char *DlpiErrMsg = "DlpiAddNI failed: NI Error";
static const psedrvparam_t eth0param = {"eth0", DT_CLONE,
&enetinfo, 0, 0};
InstallDriver(SC_DEV_DLPI, enetinit, NULLF, NULLF, NULLF,
NULLF, NULLF, (long)&eth0param, 0, 0);
/*-------------------------------------------------------------*/
/* Call DlpiInit to initialize the Streams DLPI driver */
/* Arguments passed to DlpiInit are: */
/* 1. Free memory address */
/* 2. Maximum NI interface number */
/* 3. Maximum number of streams per interface */
/*-------------------------------------------------------------*/
FreeMemPtr = DlpiInit(FreeMemPtr, 1, 6);
/*-------------------------------------------------------------*/
/* Call DlpiAddNI to add an NI interface to the Streams DLPI */
/* driver. DlpiAddNI must be called for each NI driver */
/* interface used with the Streams DLPI driver. */
/* Arguments passed to DlpiAddNI are: */
/* 1. NI interface number (should correspond to the pNA+ */
/* interface number if driver is shared with pNA+) */
/* 2. NI entry point */
/* 3. NI flags */
/* IFF_SELFLOOP 0x0001 loopback for self-address */
/* IFF_POLL_NI 0x0002 driver must be polled */
/* IFF_RAWMEM 0x2000 driver accepts mblk link list */
/* 4. NI major device number */
/* 5. NI multicast address */
/* 6. NI poll frequency (every # of elapsed ticks) */
/*-------------------------------------------------------------*/
#if (BSP_LAN1 && SE_SHARE_NI)
if (DlpiAddNI(1, (long(*)())BSP_LAN1_ENTRY, 0x2000,
SC_DEV_DLPI, 0, 0))
SysInitFail(DlpiErrMsg);
#else
if (DlpiAddNI(0, (long(*)())DlpiNullNI, 0, SC_DEV_DLPI, 0, 0))
SysInitFail(DlpiErrMsg);
#endif
}
#endif
/*-------------------------------------------------------------------*/
/* Install pSOSystem Watchdog driver */
/*-------------------------------------------------------------------*/
#if (SC_DEV_WATCHDOG)
#if(SC_DEV_WATCHDOG > SC_DEVMAX)
#error "SC_DEV_WATCHDOG cannot be > SC_DEVMAX"
#endif
InstallDriver(SC_DEV_WATCHDOG, WdtInit, NULLF, NULLF, NULLF,
NULLF, NULLF, 0, 0, 0);
#endif
/*---------------------------------------------------------------------*/
/* Additional drivers may be installed here. */
/*---------------------------------------------------------------------*/
return FreeMemPtr;
}
#endif /* SC_PSOS || SC_PSOSM */
#if SC_PNA
/***********************************************************************/
/* SetUpNI: Set up Network Interfaces for pNA+ */
/* */
/* INPUT: FreeMemPtr = A pointer to unused memory that can be */
/* used to allocate space for a driver. */
/* NOTE: Be sure to advance FreeMemPtr if */
/* memory is allocates! */
/* */
/* RETURNS: The new address of free memory after the drivers have */
/* allocated space. */
/* */
/* NOTES: This function does many precompile checks so errors */
/* can be found during compile-time rather then at run- */
/* time. */
/* */
/* Also, the Network Interface Table must be allocated */
/* before this function can be called. There cannot be */
/* more then NC_NNI entries in this table. NC_NNI is set */
/* in sys_conf.h. Before adding another interface, be */
/* sure to check sys_conf.h to see if NC_NNI is set to */
/* accommodate another one! */
/* */
/* See the pSOSystem Programmers Reference Manual */
/* for more information. */
/* */
/* To add a Network driver to pSOSystem, call InstallNi(). This adds */
/* the Network Interface to the pNA+ Network Interface Table. */
/* InstallNi() takes the following arguments: */
/* */
/* int (*entry)(); address of NI entry point */
/* int ipadd; IP address */
/* int mtu; maximum transmission length */
/* int hwalen; length of hardware address */
/* int flags; intErface flags */
/* int subnetaddr; subnet mask */
/* int dstipaddr; destination ip address */
/* */
/* See pSOSystem Programmer`s Reference Manual, Configuration Tables */
/* Section, for more information about the Network Interface Table. */
/* InstallNi() does not return a value. */
/* */
/* If you are adding a driver that needs to be initialized before */
/* either pSOS+ is initialized or the driver's init function is */
/* called, then you can call a setup function (that you create) for */
/* the driver (for example, see the CnslSetup call for the serial */
/* device driver). If your initialization function needs to allocate */
/* memory, you may pass it the FreeMemPtr. The function should return */
/* a new FreeMemPtr which points to the end of the memory it has */
/* allocated. */
/* */
/* When adding code to install a new driver, it is a good idea to add */
/* precompile checks so errors can be found during compile-time rather */
/* then at run-time. Precompile checks are used, for example, in the */
/* code that installs the pSOSystem serial device driver below. */
/* */
/***********************************************************************/
UCHAR *SetUpNI(UCHAR *FreeMemPtr)
{
int IPaddr;
/*---------------------------------------------------------------------*/
/* Install the pSOSystem NI. */
/*---------------------------------------------------------------------*/
#if BSP_LAN1
if (SysVars.Lan1)
{
/*-------------------------------------------------------------*/
/* If RARP is specified for the IP address, use it now to */
/* obtain the IP address for this interface. */
/*-------------------------------------------------------------*/
if (SysVars.Lan1IP == USE_RARP)
{
#if (SC_DEV_DLPI && SE_SHARE_NI)
IPaddr = RarpEth((long (*)())DlpiEnet);
#else
IPaddr = RarpEth((long (*)())BSP_LAN1_ENTRY);
#endif
if (IPaddr == 0)
SysInitFail(RarpErrTimeout);
if (IPaddr == -1)
SysInitFail(RarpErrNet);
}
else
IPaddr = SysVars.Lan1IP;
#if (SC_DEV_DLPI && SE_SHARE_NI)
InstallNi((int (*)())DlpiEnet, IPaddr,
#else
InstallNi((int (*)())BSP_LAN1_ENTRY, IPaddr,
#endif
BSP_LAN1_MTU, BSP_LAN1_HWALEN, BSP_LAN1_FLAGS,
SysVars.Lan1SubnetMask, 0);
}
#endif
/*---------------------------------------------------------------------*/
/* Install the shared memory NI. */
/*---------------------------------------------------------------------*/
#if BSP_SMEM
#if ((SC_NISM_LEVEL != 1) && (SC_NISM_LEVEL != 2))
#error "Illegal value for SC_NISM_LEVEL"
#endif
if (SysVars.Nism)
{
InstallNi((int (*)())NiSmem, SysVars.NismIP, NISM_MTU, 4, 0x8002,
SysVars.NismSubnetMask, 0);
/*-------------------------------------------------------------*/
/* Set up the NI Shared Memory driver by calling its function */
/* "NiSmemSetup". */
/*-------------------------------------------------------------*/
FreeMemPtr = NiSmemSetup(SC_NISM_BUFFS, FreeMemPtr,
SC_NISM_LEVEL);
}
#endif
/*---------------------------------------------------------------------*/
/* Additional Network drivers may be installed here. */
/*---------------------------------------------------------------------*/
return FreeMemPtr;
}
#endif
@@ -0,0 +1,734 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/isisnmp/x86226/sys_conf.h,v 1.1.1.1 2001/11/05 17:47:11 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: sys_conf.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:11 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:23:00 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:10:13 meister
* Update copyright message
*
* Revision 1.2 1998/08/19 21:38:35 josh
* adding copyright stuff.
*
*
*/
/* [clearcase]
modification history
-------------------
*/
/* @(#) pSOSystem x86/V2.2.6: apps.v22/xxxx/sys_conf.h (snmpv2 386) 3.21 98/01/12 10:03:13 */
/***********************************************************************/
/* */
/* MODULE: sys_conf.h */
/* DATE: 98/01/12 */
/* PURPOSE: pSOSystem configuration definitions */
/* */
/*---------------------------------------------------------------------*/
/* */
/* Copyright 1991 - 1997, Integrated Systems, Inc. */
/* ALL RIGHTS RESERVED */
/* */
/* Permission is hereby granted to licensees of Integrated Systems, */
/* Inc. products to use or abstract this computer program for the */
/* sole purpose of implementing a product based on Integrated */
/* Systems, Inc. products. No other rights to reproduce, use, */
/* or disseminate this computer program, whether in part or in */
/* whole, are granted. */
/* */
/* Integrated Systems, Inc. makes no representation or warranties */
/* with respect to the performance of this computer program, and */
/* specifically disclaims any responsibility for any damages, */
/* special or consequential, connected with the use of this program. */
/* */
/*---------------------------------------------------------------------*/
/* */
/* This is a header file which defines all of the system-level */
/* parameters that are likely to need changing. */
/* */
/* It has been set up to be as close as possible to the settings */
/* which are appropriate for this application. However, you may */
/* need to make some changes to parameters to reflect your */
/* environment, such as IP addresses, etc. */
/* */
/* Chapter 7 of the pSOSystem Getting Started manual contains a */
/* complete description of the symbols that are defined in this */
/* file. */
/* */
/***********************************************************************/
#if __cplusplus
extern "C" {
#endif
#ifndef _SYS_CONF_H
#define _SYS_CONF_H
/***********************************************************************/
/* */
/* SC_APP_PARMS Must be defined before you include sysvars.h file. */
/* Since "sysvars.h" file depends on SC_APP_PARMS and BSP_PARMS */
/* to define the Storage Parms Structure. */
/* */
/* Defining this variable to a Non-Zero Value will create a space in */
/* the Storage Parms. structure for your application use. */
/* */
/***********************************************************************/
#define SC_APP_PARMS 0
#define SC_APP_NAME "snmpv2 Application"
/*---------------------------------------------------------------------*/
/* types.h contains common definitions for example YES and NO */
/*---------------------------------------------------------------------*/
#include <types.h>
/***********************************************************************/
/* sysvars.h contains the structures and definitions for the system */
/* variables that are stored in NVRAM. These structures and */
/* definitions are also used when creating the boot rom for the */
/* target system. By using the same sysvars.h file it will insure the */
/* consistency of the values stored by the boot rom and later read by */
/* the downloaded application. */
/***********************************************************************/
#include <sysvars.h>
/*---------------------------------------------------------------------*/
/* include psos.h for defines IO_AUTOINIT and IO_NOAUTOINIT */
/*---------------------------------------------------------------------*/
#include <psos.h>
/***********************************************************************/
/* */
/* These symbols are used to define other symbols in this file. */
/* They should never be changed. */
/* */
/***********************************************************************/
#define USE_RARP 0
/***********************************************************************/
/* */
/* B A S I C P A R A M E T E R S */
/* */
/* The parameters in this section determine the fashion in which */
/* many of the other parameters in this file will be used. */
/* */
/* Many of the parameters in this file have names beginning with */
/* either "SC_" or "SD_". Those beginning with "SC_" are ALWAYS */
/* controlled by the values you set in this file. The values of */
/* the "SD_" parameters can be determined either by the definitions */
/* given in this file, or by the data found in the target board's */
/* parameter storage area. SC_SD_PARAMETERS determines this. If */
/* SC_SD_PARAMETERS is "SYS_CONF", then the values given in this */
/* file will be used for the SD_ parameters. If SC_SD_PARAMETERS */
/* is "STORAGE", then pSOSystem will attempt to use the values found */
/* in the board's parameter storage area for the SD_ variables. If */
/* the parameter storage area has not been initialized or has been */
/* corrupted, then the values given in this file will be used. They */
/* will also be written to the storage area. */
/* */
/* If SC_SD_PARAMETERS is STORAGE, you may enable a "startup dialog" */
/* which will allow you to view, and optionally change, the */
/* parameter values found in the storage area. The dialog is enabled */
/* by setting SC_STARTUP_DIALOG to YES. In this case, */
/* SD_STARTUP_DELAY specifies the number of seconds that the dialog */
/* will wait for input before proceeding to boot the system. */
/* */
/* SC_SD_DEBUG_MODE determines how the system will operate, as follows:*/
/* */
/* DBG_SA: Boot pROBE+ in standalone mode. */
/* */
/* DBG_XS: Boot into pROBE+ and wait for the host debugger */
/* via a serial connection */
/* */
/* DBG_XN: Boot into pROBE+ and wait for the host debugger */
/* via a network connection */
/* */
/* DBG_AP: Same as DBG_SA, but also does a pROBE+ "silent startup",*/
/* meaning that pROBE+ initializes itself without */
/* printing a startup banner. pROBE+ then initializes */
/* pSOS+ and starts the application running. This mode */
/* was created to simplify implementation of the pSOSystem */
/* Boot ROMs. Note that when this mode is used, the value */
/* you specify for RC_SMODE (see "pROBE+ Configuration */
/* Parameters", below) is overridden. */
/* */
/* STORAGE: Use the mode (DBG_SA, DBG_XS, or DBG_XN) found in the */
/* parameter storage area. If a valid mode is not found, */
/* then use DBG_SA. */
/* */
/* An important consequence of using SC_SD_DEBUG_MODE=STORAGE should */
/* be noted. If you use the TFTP bootloader in the pSOSystem ROMs */
/* to download and start your system, you will be setting */
/* SC_SD_DEBUG_MODE = DBG_AP in your target board's parameter storage */
/* area. Thus, if you have left SC_SD_DEBUG_MODE set to STORAGE in */
/* this file, your downloaded system will also use DBG_AP, meaning */
/* that the application will begin running immediately after the */
/* TFTP bootloader has loaded and started your system. */
/* */
/***********************************************************************/
#define SC_SD_PARAMETERS STORAGE
#define SC_STARTUP_DIALOG NO
#define SC_BOOT_ROM NO
#define SD_STARTUP_DELAY 60
#define SC_SD_DEBUG_MODE STORAGE
/***********************************************************************/
/* */
/* O P E R A T I N G S Y S T E M C O M P O N E N T S */
/* */
/* Setting the definition line to YES will cause that component to */
/* be built into the system. NO means the component will NOT be */
/* put into the system. It is an error to specify both SC_PSOS */
/* and SC_PSOSM as present! */
/* */
/***********************************************************************/
#define SC_PSOS YES /* pSOS+ real-time kernel */
#define SC_PSOSM NO /* pSOS+ real-time multiproc kernel */
#define SC_PROBE YES /* pROBE+ (processor svcs) */
#define SC_PROBE_DISASM YES /* pROBE+ (disassembler) */
#define SC_PROBE_DASM_INTEL NO /* pROBE+ (Intel format disassembler) */
/* for x86 Targets Only */
#define SC_PROBE_CIE YES /* pROBE+ (console executive) */
#define SC_PROBE_QUERY YES /* pROBE+ (query services) */
#define SC_PROBE_DEBUG YES /* pROBE+ (debug interface executive) */
#define SC_PHILE YES /* pHILE+ file system manager */
#define SC_PREPC YES /* pREPC+ C run-time library */
#define SC_PNA YES /* pNA+ TCP/IP networking manager */
#define SC_PRPC YES /* pRPC+ RPC component */
#define SC_PSE NO /* pSE+ streams component */
#define SC_PSKT NO /* pSKT+ SKT library component */
#define SC_PTLI NO /* pTLI+ TLI library component */
#define SC_PMONT NO /* pMONT+ */
#define SC_PROFILER NO /* Profiler is enabled/Disabled */
/*---------------------------------------------------------------------*/
/* If set to IO_AUTOINIT device drivers that are installed be the */
/* InstallDriver function will have their autoinit field set. This */
/* will cause pSOS+ call the drivers initialization function when */
/* pSOS+ starts up. The de_init call will not have to be called for */
/* each driver if this is done. */
/* */
/* NOTE: This Auto Initialization will not work on all drivers. */
/* Setting IO_AUTOINIT only effects drivers that can use the Auto */
/* Initialization feature. */
/* */
/* If set to IO_NOAUTOINIT no automatic driver initialization will */
/* happen. */
/*---------------------------------------------------------------------*/
#define SC_AUTOINIT IO_AUTOINIT
/*---------------------------------------------------------------------*/
/* If SC_PMONT SC_AUTOINIT will always be set to 1 because pMONT needs */
/* drivers to be automatically initialized. */
/*---------------------------------------------------------------------*/
#if SC_PMONT
#undef SC_AUTOINIT
#define SC_AUTOINIT IO_AUTOINIT
#endif
/***********************************************************************/
/* */
/* S E R I A L C H A N N E L C O N F I G U R A T I O N */
/* */
/* * SD_DEF_BAUD specifies the default baud rate to be used for the */
/* serial channels */
/* * SC_APP_CONSOLE specifies the serial channel number (starting */
/* from 1) which should be used for the application's "console". */
/* * SC_PROBE_CONSOLE specifies the serial channel number (starting */
/* from 1) which pROBE+ should use to display output and receive */
/* commands, or to communicate with the host debugger. */
/* * SC_PROBE_HOST specifies the serial channel number (starting */
/* from 1) which should be used for the pROBE+ "host" channel. */
/* This is not normally required, so it can be disabled by */
/* using a value of 0. The host channel is explained in the */
/* pROBE+ User's Manual. */
/* */
/***********************************************************************/
#define SD_DEF_BAUD 9600
#define SC_APP_CONSOLE PCCON
#define SC_PROBE_CONSOLE PCCON
#define SC_RBUG_PORT 0
/***********************************************************************/
/* SC_NumNon_pSOSChan is the number of non pSOS users of serial */
/* channels. These are users that will be initiated before pSOS */
/* such as pROBE. */
/* NOTE: These channels will not be closed on a soft reset. */
/***********************************************************************/
#if (SC_RBUG_PORT && SC_PROBE_CONSOLE && (SC_PROBE_CONSOLE != PCCON))
#define SC_NumNon_pSOSChan 2
#else
#define SC_NumNon_pSOSChan 1
#endif
/***********************************************************************/
/* */
/* L A N C O N F I G U R A T I O N */
/* */
/* */
/***********************************************************************/
#define SD_LAN1 YES
#define SD_LAN1_IP 0x80e001b7
#define SD_LAN1_SUBNET_MASK 0xffffff00
/*---------------------------------------------------------------------*/
/* Maximum number of multicast addresses to be used by the lan */
/* interface. Must not exceed maximum supported by the lan driver. */
/*---------------------------------------------------------------------*/
#define SC_LAN1_NMCAST 0
/***********************************************************************/
/* */
/* S H A R E D M E M O R Y C O N F I G U R A T I O N */
/* */
/* */
/***********************************************************************/
/***********************************************************************/
/* */
/* B U S C O N F I G U R A T I O N */
/* */
/* */
/***********************************************************************/
#define SD_VME_BASE_ADDR 0x01000000
/*---------------------------------------------------------------------*/
/* If you want to build a Shared Memory Interface for the network or */
/* multi-processing pSOS+m, set SD_SM_NODE (a non-zero value) to the */
/* node number of THIS node. */
/*---------------------------------------------------------------------*/
#define SD_SM_NODE 0
/*---------------------------------------------------------------------*/
/* Shared memory network interface - SC_NISM_LEVEL should be 1 if this */
/* will be the FIRST system to use the SMNI on this board. It should */
/* be 2 if this will not be the first system to use the SMNI on this */
/* board. Usually this means that SC_NISM_LEVEL should be 1 if you */
/* are building Boot ROMs, and 2 for a system that will be downloaded */
/* and started using the Boot ROMs. See the comments at the beginning */
/* of drivers/ni_smem.c for more explanation. */
/*---------------------------------------------------------------------*/
#define SD_NISM NO
#define SD_NISM_IP 0x00000000
#define SD_NISM_DIRADDR 0x00000400
#define SC_NISM_BUFFS 30
#define SC_NISM_LEVEL 2
#define SD_NISM_SUBNET_MASK 0
/*---------------------------------------------------------------------*/
/* If you want to build a multi-node pSOS+m system, set SD_KISM */
/* to the number of nodes in the system. */
/*---------------------------------------------------------------------*/
#define SD_KISM 0
#define SD_KISM_DIRADDR 0x00000580
/***********************************************************************/
/* */
/* M I S C E L L A N E O U S N E T W O R K I N G */
/* P A R A M E T E R S */
/* */
/***********************************************************************/
#define SD_DEF_GTWY_IP 0
/***********************************************************************/
/* SC_RAM_SIZE */
/* */
/* Normally, pSOSystem uses ALL of the memory remaining on a board for */
/* dynamic allocation ("region 0"). You may override this by setting */
/* SC_RAM_SIZE to a non-zero value. If you do, pSOSystem will not */
/* touch any memory after address (BSP_RAM_BASE + SC_RAM_SIZE - 1). */
/* */
/* NOTE: This is useful when making a BOOT ROM and you want to ensure */
/* that the ROM's RAM area does not overflow the space alloted for it. */
/***********************************************************************/
#define SC_RAM_SIZE 0
/***********************************************************************/
/* */
/* I / O D E V I C E S */
/* */
/* Each device may be included in the system by specifying a major */
/* number for it, which determines its slot in the pSOS+ I/O switch */
/* table. To leave a device driver out of the system, use NO for */
/* the major number. */
/* */
/* Note the following: */
/* * Major device 0 is reserved and cannot be used for any of these */
/* devices. Setting a device number to 0 here is the same as NO. */
/* * No device number may be higher than SC_DEVMAX (SC_DEVMAX may */
/* be increased, if desired) */
/* * The lines defining the symbols DEV_SERIAL, DEV_TIMER, etc, */
/* should not be changed. These are for use by application */
/* programs as the "device number" parameter on de_* calls. */
/* */
/***********************************************************************/
#define SC_DEV_SERIAL 1 /* Serial driver */
#define SC_DEV_TIMER 2 /* Periodic tick timer */
#define SC_DEV_RAMDISK NO /* RAM disk */
#define SC_DEV_CONSOLE 4 /* PC-Console driver */
#define SC_DEV_SCSI NO /* SCSI bus */
#define SC_DEV_SCSI_TAPE NO /* SCSI bus, tape device */
#define SC_DEV_IDE NO /* IDE Driver */
#define SC_DEV_FLOPPY NO /* Floppy Driver */
#define SC_DEV_TFTP NO /* TFTP pseudo driver */
#define SC_DEV_SPI NO /* SPI driver */
#define SC_DEV_DLPI NO /* DLPI pseudo driver */
#define SC_DEV_OTCP NO /* 12 TCP/IP for OpEN */
#define SC_IP SC_DEV_OTCP /* 12 IP */
#define SC_ARP NO /* 13 ARP */
#define SC_TCP NO /* 14 TCP */
#define SC_UDP NO /* 15 UDP */
#define SC_RAW NO /* 16 RAW */
#define SC_LOOP NO /* 17 LOOP = (SC_DEV_OTCP + 5) */
#define SC_DEV_SOSI NO /* 18 OSI for OpEN */
#define SC_DEV_PSEUDO NO /* PSEUDO driver */
#define SC_DEV_PARALLEL NO /* Parallel Port Driver */
#define SC_DEV_CMOS NO /* CMOS Driver */
#define SC_DEV_WATCHDOG NO /* Watchdog Driver */
#define SC_DEV_OLAP NO /* LAP Driver */
#define SC_PHPI (SC_DEV_OLAP) /* Phpi driver */
#define SC_LAPB (SC_DEV_OLAP + 0)/* LAPB driver Change 0 to 1 */
#define SC_CLAPB (SC_DEV_OLAP + 0)/* LAPB driver Change 0 to 2 */
#define SC_DEV_OX25 (SC_DEV_OLAP + 0)/* LAPB driver Change 0 to 3 */
#define SC_X25 (SC_DEV_OX25) /* X25 driver */
#define SC_CX25 (SC_DEV_OX25 + 0)/* X25 driver Change 0 to 1 */
#define SC_SNDCF NO /* sndcf driver */
#define SC_CSNDCF NO /* csndcf driver */
#define SC_IPCONV NO
#define SC_CIPCONV NO
#define SC_DEVMAX 32 /* Maximum device number */
#define DEV_SERIAL (SC_DEV_SERIAL << 16)
#define DEV_PARALLEL (SC_DEV_PARALLEL << 16)
#define DEV_TIMER (SC_DEV_TIMER << 16)
#define DEV_RAMDISK (SC_DEV_RAMDISK << 16)
#define DEV_SCSI (SC_DEV_SCSI << 16)
#define DEV_SCSI_TAPE (SC_DEV_SCSI_TAPE << 16)
#define DEV_PSEUDO (SC_DEV_PSEUDO << 16)
#define DEV_DLPI (SC_DEV_DLPI << 16)
#define DEV_TFTP (SC_DEV_TFTP << 16)
#define DEV_SPI (SC_DEV_SPI << 16)
#define DEV_WATCHDOG (SC_DEV_WATCHDOG << 16)
#define DEV_FLOPPY (SC_DEV_FLOPPY << 16)
#define DEV_IDE (SC_DEV_IDE << 16)
#define DEV_CMOS (SC_DEV_CMOS << 16)
#define DEV_CONSOLE (SC_DEV_CONSOLE << 16)
#if (BSP_CPUFAMILY == FAMILY_X86) && (SC_APP_CONSOLE == PCCON)
#define CONSOLE DEV_CONSOLE
#else
#define CONSOLE DEV_SERIAL
#endif
/***********************************************************************/
/* */
/* M E M O R Y M A N A G E M E N T L I B R A R Y P A R A M S */
/* */
/***********************************************************************/
#define SC_MMULIB NO
/***********************************************************************/
/* */
/* C O M P O N E N T C O N F I G U R A T I O N P A R A M E T E R S */
/* */
/* These parameters should work as is for this application. You */
/* may want to change some of them if you start customizing this */
/* application. */
/* */
/***********************************************************************/
/*---------------------------------------------------------------------*/
/* pSOS+ configuration parameters */
/*---------------------------------------------------------------------*/
#define KC_RN0USIZE 0x100 /* region 0 unit size */
#define KC_NTASK 25 /* max number of tasks */
#define KC_NQUEUE 10 /* max number of message queues */
#define KC_NSEMA4 30 /* max number of semaphores */
#define KC_NMSGBUF 256 /* max number of message buffers */
#define KC_NTIMER 10 /* max number of timers */
#define KC_NLOCOBJ 50 /* max number of local objects */
#define KC_TICKS2SEC 100 /* clock tick interrupt frequency */
#define KC_TICKS2SLICE 10 /* time slice quantum, in ticks */
#define KC_INTSTK 0x2000 /* interrupt stack size */
#define KC_SYSSTK 0x2000 /* pSOS+ system stack size (bytes) */
#define KC_ROOTSSTK 0x4000 /* ROOT supervisor stack size */
#define KC_ROOTUSTK 0 /* ROOT user stack size */
#define KC_ROOTMODE (T_SUPV | T_ISR) /* ROOT initial mode */
#define KC_ROOTPRI 230 /* ROOT task priority */
/*---------------------------------------------------------------------*/
/* The following are examples for modifying the following defines */
/* */
/* Using a pSOSystem routine as a fatal error handler */
/* #define KC_FATAL ((void (*)()) SysInitFail) */
/* */
/* Using a user written routine as a fatal error handler */
/* extern void MyHandler (void); */
/* #define KC_FATAL ((void (*)()) MyHandler) */
/* */
/*---------------------------------------------------------------------*/
#define KC_STARTCO 0 /* callout at task activation */
#define KC_DELETECO 0 /* callout at task deletion */
#define KC_SWITCHCO 0 /* callout at task switch */
#define KC_FATAL 0 /* fatal error handler address */
#define KC_IDLECO 0 /* Idle Task Callout */
#define KC_RTCINITCO 0 /* RTC INIT Callout */
/*---------------------------------------------------------------------*/
/* pSOS+m configuration parameters */
/*---------------------------------------------------------------------*/
#define MC_NGLBOBJ 8 /* size of gbl obj table */
#define MC_NAGENT 10 /* number of RPC agents in this node */
#define MC_FLAGS SEQWRAP_ON /* operating mode flags */
/*---------------------------------------------------------------------*/
/* The following are examples for modifying the following definition */
/* */
/* Using a pSOSystem routine as a roster change handler */
/* #define MC_ROSTER ((void (*)()) SysInitFail) */
/* */
/* Using a user written routine as a roster change handler */
/* extern void MyHandler (void); */
/* #define MC_ROSTER ((void (*)()) MyHandler) */
/* */
/*---------------------------------------------------------------------*/
#define MC_ROSTER 0 /* addr of user roster change callout */
#define MC_KIMAXBUF 100 /* maximum KI packet buffer length */
#define MC_ASYNCERR 0 /* asynchronous calls error callout */
/*---------------------------------------------------------------------*/
/* pROBE configuration parameters - note that the SMODE flag bits are */
/* irrelevant if SC_SD_DEBUG_MODE = DBG_AP. */
/*---------------------------------------------------------------------*/
#define TD_BRKOPC 0xCC /* Instruction break opcode */
#define TD_ILEV (1 << 12)/* pROBE+ interrupt mask */
#define TD_FLAGS (NODOTS_MASK | TD_ILEV | NOTUPD_MASK)/* flags */
#define TD_DBGPRI 244 /* Debugger task priority */
/*---------------------------------------------------------------------*/
/* The variable defined down should be set to the Starting address for */
/* for pROBE+ DATA AREA. This is required by all the smaller boards. */
/* NOTE: */
/* Setting of this value should have atleast 0x4400 bytes Free */
/* Space from that location. */
/*---------------------------------------------------------------------*/
#define TD_DATASTART 0x0
/*---------------------------------------------------------------------*/
/* pHILE+ configuration parameters */
/*---------------------------------------------------------------------*/
#define FC_LOGBSIZE 9 /* Block size (base-2 exponent) */
#define FC_NBUF 6 /* Number of cache buffers */
#define FC_NMOUNT 3 /* Max # of mounted volumes */
#define FC_NFCB 10 /* Max # of opened files per system */
#define FC_NCFILE 2 /* Max # of opened files per task */
#define FC_NDNLC 0 /* Max # of cached directory entries */
#define FC_MSDOS 1 /* MS-DOS volume mount flag */
#define FC_CDROM 0 /* CD-ROM volume mount flag */
/*---------------------------------------------------------------------*/
/* pREPC+ configuration parameters */
/*---------------------------------------------------------------------*/
#define LC_BUFSIZ 128 /* I/O buffer size */
#define LC_NUMFILES 5 /* Max number of open files per task */
#define LC_WAITOPT 0 /* Wait option for memory allocation */
#define LC_TIMEOPT 0 /* Timeout option for mem allocation */
#define LC_SSIZE 512 /* Size of print buffer */
/*---------------------------------------------------------------------*/
/* pNA+ configuration parameters */
/* */
/* NOTE: If you get pNA+ errno 5F01 FAT_INSUFFMEM you may need to */
/* decrease the number of buffers allocated here for pNA+. */
/* In general this error means pNA+ could not allocate enough */
/* memory from Region 0 for the number of buffers requested. */
/*---------------------------------------------------------------------*/
#define NC_NNI 5 /* size of pNA NI Table */
#define NC_NROUTE 10 /* size of pNA Routing Table */
#define NC_NARP 20 /* size of pNA ARP table */
#define NC_DEFUID 0 /* Default User ID of a task */
#define NC_DEFGID 0 /* Default Group ID of a task */
#define NC_HOSTNAME "scg" /* Hostname of the node */
#define NC_NHENTRY 8 /* Number of Host table entries */
#define NC_NMCSOCS 0 /* Number of IP multicast sockets */
#define NC_NMCMEMB 0 /* Number of distict IP multicast */
/* group memberships per interface */
#define NC_NNODEID 0 /* Network NODE ID for unnumbered link */
#define NC_NSOCKETS 128 /* Number of sockets in the system */
#define NC_NDESCS 128 /* # of socket descriptors/task */
#define NC_MBLKS 300 /* # of message blocks in the system */
#define NC_BUFS_0 64 /* number of 0 length buffers */
#define NC_BUFS_32 0 /* number of 32 length buffers */
#define NC_BUFS_64 0 /* number of 64 length buffers */
#define NC_BUFS_128 256 /* number of 128 byte buffers */
#define NC_BUFS_256 0 /* number of 256 byte buffers */
#define NC_BUFS_512 0 /* number of 512 byte buffers */
#define NC_BUFS_1024 16 /* number of 1k byte buffers */
#define NC_BUFS_2048 48 /* number of 2k byte buffers */
#define NC_BUFS_4096 0 /* number of 4k byte buffers */
#define NC_MAX_BUFS 9 /* max number of NC_BUFS types */
/*---------------------------------------------------------------------*/
/* The following are examples for modifying the following defines */
/* */
/* Using a user written routine as a pNA+ Signal Handler */
/* extern void MySigHandler (void); */
/* #define NC_SIGNAL ((void (*)()) MySigHandler) */
/* */
/*---------------------------------------------------------------------*/
#define NC_SIGNAL 0 /* pNA+ Signal Hdlr */
/*---------------------------------------------------------------------*/
/* pSE+ configuration parameters */
/*---------------------------------------------------------------------*/
#define SE_NBUFS_0 64 /* number of 0 length buffers */
#define SE_NBUFS_32 128 /* number of 32 byte buffers */
#define SE_NBUFS_64 128 /* number of 64 byte buffers */
#define SE_NBUFS_128 256 /* number of 128 byte buffers */
#define SE_NBUFS_256 32 /* number of 256 byte buffers */
#define SE_NBUFS_512 32 /* number of 512 byte buffers */
#define SE_NBUFS_1024 16 /* number of 1k byte buffers */
#define SE_NBUFS_2048 16 /* number of 2k byte buffers */
#define SE_NBUFS_4096 8 /* number of 4k byte buffers */
#define SE_MAX_BUFS 9 /* max number of stream buffer types */
#define SE_MAX_MODULES 3 /* max number of streams modules */
#define SE_SHARE_NI NO /* LAN-NI with streams? */
#define SE_DATA_SIZE 0x0C00 /* size of pSE data area */
/* (must be at least 3K) */
#define SE_TASK_PRIO 250 /* priority for pSE task */
#define SE_STACK_SIZE 0x2000 /* stack size for pSE task */
#define SE_DEF_UID 0 /* default user id */
#define SE_DEF_GID 0 /* default group id */
#define SE_N_FDS 32 /* max # of system-wide */
/* stream descriptors */
#define SE_N_TASKFDS 8 /* max # of per-task stream */
/* descriptors */
#define SE_N_LINKS 32 /* max # of multiplexing links */
#define SE_N_TIMEOUTS 32 /* max # of timeout requests */
#define SE_N_BUFCALLS 32 /* max # of bufcall requests */
#define SE_N_QUEUES 256 /* # of queues */
#define SE_N_MBLKS 512 /* reserved for future use, must be 0 */
/*---------------------------------------------------------------------*/
/* Loader configuration parameters */
/* */
/* YES indicates for each module to be linked in. NO means do not link */
/* object module loader into this application. */
/* */
/*---------------------------------------------------------------------*/
#define LD_MAX_LOAD 8 /* Max. # of active loads */
#define LD_ELF_MODULE NO /* ELF object-load-module */
#define LD_SREC_MODULE NO /* SREC object-load-module */
#define LD_COFF_MODULE NO /* COFF object-load-module */
#define LD_IEEE_MODULE NO /* IEEE object-load-module */
#define LD_IHEX_MODULE NO /* IHEX object-load-module */
/*---------------------------------------------------------------------*/
/* pMONT+ configuration parameters - note that PM_DEV and PM_BAUD are */
/* only relevant to serial communication (PM_CMODE = 2) */
/*---------------------------------------------------------------------*/
#define PM_CMODE 1 /* 1 = networking, 2 = serial */
#define PM_DEV 2 /* Minor Device number for */
/* serial channel if used */
#define PM_BAUD 9600 /* Baud rate for serial chnl */
#define PM_TRACE_BUFF 0 /* Address of trace buffer -- */
/* Allocated by pSOSystem if 0 */
#define PM_TRACE_SIZE 0x6000 /* Size of trace buffer */
#define PM_TIMER NO /* 2nd timer for finer time */
/* within data collection */
/*---------------------------------------------------------------------*/
/* General Serial Block Configuration Parameters */
/*---------------------------------------------------------------------*/
#define GS_BUFS_0 64 /* number of 0 length buffers */
#define GS_BUFS_32 128 /* number of 32 byte buffers */
#define GS_BUFS_64 128 /* number of 64 byte buffers */
#define GS_BUFS_128 256 /* number of 128 byte buffers */
#define GS_BUFS_256 32 /* number of 256 byte buffers */
#define GS_BUFS_512 32 /* number of 512 byte buffers */
#define GS_BUFS_1024 16 /* number of 1k byte buffers */
#define GS_BUFS_2048 16 /* number of 2k byte buffers */
#define GS_BUFS_4096 8 /* number of 4k byte buffers */
#define GS_MBLKS 680
#define GS_MAX_BUFS 9 /* max number of serial buffer types */
/*---------------------------------------------------------------------*/
/* TCP/IP for OpEN configuration parameters */
/*---------------------------------------------------------------------*/
/*---------------------------------------------------------------------*/
/* Configurable parameters for the Network layer (IP) */
/*---------------------------------------------------------------------*/
#define OTCP_IPMAX 8 /* Max # of open IP device */
#define OTCP_IPNINTERFACES 4 /* Max # of network interfaces */
#define OTCP_IPNROUTES 64 /* Max #of routing tbl entries */
/*---------------------------------------------------------------------*/
/* Configurable parameters for ARP */
/*---------------------------------------------------------------------*/
#define OTCP_ARPMAX 8 /* Max # of open ARP device */
#define OTCP_ARPNINTERFACES 4 /* Max # of ARP interfaces */
#define OTCP_ARPNENTRIES 32 /* Max # of ARP table entries */
/*---------------------------------------------------------------------*/
/* Configurable parameters for TCP */
/*---------------------------------------------------------------------*/
#define OTCP_TCPMAX 64 /* Max # of open TCP device */
/*---------------------------------------------------------------------*/
/* Configurable parameters for UDP */
/*---------------------------------------------------------------------*/
#define OTCP_UDPMAX 32 /* Max # of open UDP device */
/*---------------------------------------------------------------------*/
/* Configurable parameters for RAW */
/*---------------------------------------------------------------------*/
#define OTCP_RAWMAX 32 /* Max # of open RAW device */
/*---------------------------------------------------------------------*/
/* Configurable parameters for LOOP */
/*---------------------------------------------------------------------*/
#define OTCP_LOOPMAX 2 /* Max # of open LOOP device */
#endif /* _SYS_CONF_H */
#if __cplusplus
}
#endif
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,113 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/mac/emissary.h,v 1.1.1.1 2001/11/05 17:47:12 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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 1992-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: emissary.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:12 tneale
* Tornado shuffle
*
* Revision 1.3 2001/01/19 22:23:01 paul
* Update copyright.
*
* Revision 1.2 2000/03/17 00:10:15 meister
* Update copyright message
*
* Revision 1.1 1998/02/25 04:56:52 sra
* Update copyrights.
*
* Revision 1.0 1997/08/08 22:11:16 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.3 1997/03/20 06:57:56 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.1 1996/10/28 20:35:56 sar
* Initial version
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <stddef.h>
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <errno.h>
#include <console.h>
#include <assert.h>
#include <limits.h>
/*
* Pathname separator character.
*/
#define EMISSARY_PATH_SEPARATOR ':'
#if __option(profile)
#include <profile.h>
#endif
/*
* I don't understand how the Macintosh works well enough to know
* if these are the right values in all cases. Change them if not.
*
* If you don't want the file type and file creator stuff at all,
* define these macros to expand to nothing.
*/
#if 1
#define EMISSARY_MACINTOSH_SET_FILE_TYPE \
{ extern long _ftype; _ftype = 'TEXT'; }
#define EMISSARY_MACINTOSH_SET_FILE_CREATOR \
{ extern long _fcreator; _fcreator = 'MPS '; }
#else
#define EMISSARY_MACINTOSH_SET_FILE_TYPE
#define EMISSARY_MACINTOSH_SET_FILE_CREATOR
#endif
/*
* OS-specific initialization code for the Macintosh with Think C.
* This is ugly, if you can think of a better way to do it that
* doesn't embed Mac-specific code in the guts of the MIB compiler,
* tell us.
*/
#if __option(profile)
#define EMISSARY_MACINTOSH_INITPROFILE InitProfile(512, 200)
#else
#define EMISSARY_MACINTOSH_INITPROFILE
#endif
#define EMISSARY_OS_DEPENDENT_INIT(argc,argv) \
do { \
extern struct __copt console_options; \
console_options.nrows = 25; \
argc = ccommand(&argv); \
EMISSARY_MACINTOSH_INITPROFILE; \
EMISSARY_MACINTOSH_SET_FILE_TYPE; \
EMISSARY_MACINTOSH_SET_FILE_CREATOR; \
} while (0)
@@ -0,0 +1,297 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/mach386/attache.h,v 1.1.1.1 2001/11/05 17:47:12 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: attache.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:12 tneale
* Tornado shuffle
*
* Revision 1.7 2001/01/19 22:23:01 paul
* Update copyright.
*
* Revision 1.6 2000/03/17 00:10:19 meister
* Update copyright message
*
* Revision 1.5 1998/03/12 18:23:43 meister
* GLUE_IPSEC_RCV_SA_NOTUNNEL()
*
* Revision 1.4 1998/03/11 21:11:12 meister
* Added some parameters to some IPSEC glue functions
*
* Revision 1.3 1998/02/27 22:30:09 meister
* Added IPSEC glue function defs
*
* Revision 1.2 1998/02/25 04:56:52 sra
* Update copyrights.
*
* Revision 1.1 1998/02/18 22:34:58 sra
* Add ip_loopback(), eradicate glue_pkt_handle().
*
* Revision 1.0 1997/08/08 22:11:16 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.3 1997/03/20 06:58:06 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.1 1996/10/28 20:30:07 sar
* Initial version
*
*/
/* [clearcase]
modification history
-------------------
*/
/* Previous revision history from mach386/attache.h
* with release update messages removed
*
* Revision 2.4 1994/12/20 21:19:11 lowell
* worked around problems between Mach's memory.h and
* the builtin versions provided by GCC...
*
* Revision 2.3 1994/09/04 23:55:50 sra
* Get rid of most of the ancient NO_PP cruft.
*
* Revision 2.2 1994/09/04 06:13:38 sra
* Clean up antique type names and install macros.
*
* Revision 1.6 1993/08/03 23:40:54 dab
* CONFIG_PREAMBLE is either defined or not, so use #ifdef
*
* Revision 1.5 1993/08/02 21:58:54 dab
* moved MEM* and STR* to the first section
*
* Revision 1.4 1993/04/21 15:30:10 dab
* Default configuration moved to <attache/h/config.h>
*
* Revision 1.2 1993/02/28 17:25:09 dab
* If set SGRP to 1 instead of just on then matches what happens in
* envoy/h/asn1conf.h.
*
*/
#ifdef CONFIG_PREAMBLE
/* Things which MAY be defined in here:
*
* MAX_PACKETS
* STATIC_PACKETS
* MAX_ARP_ENTRIES
* ARP_EXPIRATION
* ARP_TIMER_FREQUENCY
* ARP_TIMEOUT
* PRINTF
* DEFAULT_IP_TTL
* MAX_REASM
* IP_REASM_TIMEOUT
* TFTP_TIMEOUT
*/
/* Define MAX_PACKETS in order to preallocate packets using glue_alloc().
* MAX_PACKETS value is the number of packets to preallocate.
*
* Define STATIC_PACKETS to have MAX_PACKETS packet buffers allocated
* from a static array. STATIC_PACKETS should be the packet size
* to allocate.
*/
#define MAX_PACKETS 20
/*#define STATIC_PACKETS 1536 */
/* Define IP_MAX_PKTSIZE to be the maximum reassembly buffer size.
* This isn't the largest packet that can be reassembled because some of the
* buffer space is taken up with other things.
* Also, ptcp_init() will preallocate packets of this size at startup
*/
#ifdef STATIC_PACKETS
#define IP_MAX_PKTSIZE STATIC_PACKETS
#else
#define IP_MAX_PKTSIZE 1536
#endif
/* Declarations for various standard C functions needed by Attache.
* These later may be declared by just including system include files
* or the functions may be explcitly declared here. The standard C
* functions needed by Attache are:
*
* memcpy memcmp memset strcmp strcpy strlen
*
*/
/* The standard C functions provided by Mach 386 are declared with
* char* instead of void*. Rather than using Mach's declarations,
* we'll use gcc's builtin functions where they're available:
* memset() isn't a builtin, so we'll just define it here, gcc-style. */
void * memset(void *, int, size_t);
#include <strings.h>
/* If you're using Attache along with Envoy, these macros will be
* needed in envoy.h as well. Make sure they are identical so the
* C-preprocessor doesn't complain about them being redefined. */
#define MEMCPY(dst, src, n) memcpy((char *)(dst), (char *)(src), n)
#define MEMCMP(s1, s2, n) memcmp((char *)(s1), (char *)(s2), n)
#define MEMSET(dst, val, n) memset((char *)(dst), val, n)
#else /* CONFIG_PREAMBLE */
/* glue routines to interface to the outside world.
*/
int glue_intlock (int); /* lock interrupts, return old state */
/* generic memory allocation routines
*/
#define GLUE_ALLOC(len) malloc(len)
#define GLUE_FREE(mem) free(mem)
/* Define this one if you want your own packet allocation routine. Both
* GLUE_PKTALLOC() and GLUE_PKTFREE() must be defined or undefined.
*/
/* #define GLUE_PKTALLOC(len) gettapkt(len) */
/* #define GLUE_PKTFREE(p) givepkt(p) */
/* Define GLUE_PKTPRIVATE_FREE(x) to be a routine to free the pkt_private
* value, if you need to do that.
*/
/* #define GLUE_PKTPRIVATE_FREE(x) priv_free(x) */
/* Define GLUE_CKSUM to be a function that computes the IP checksum
* We provide a C routine in mach386/glue.c
*/
#define GLUE_CKSUM(buf, word_count) cksum((bits16_t *)(buf), (word_count))
/* Define GLUE_SWAP16 and GLUE_SWAP32 iff your machine is little endian and
* thus SWAP16 and SWAP32 are defined. These functions are provided in
* mach386/glue.c
*/
#ifdef SWAP16
#define GLUE_SWAP16(x) swap16(x)
#endif /* SWAP16 */
#ifdef SWAP32
#define GLUE_SWAP32(x) swap32(x)
#endif /* SWAP32 */
/* GLUE time functions
*
* GLUE_NOW() returns a 32 bit number in milliseconds. It's used as a
* relative, not absolute, number. Just keep it to whatever resolution is
* convenient, but make sure it is a monotonically increasing number.
*/
#define GLUE_NOW() glue_now()
/* GLUE_CALLIN() schedules a function to be called in ms milliseconds.
* It only has to remember one function; when it is called while a call is
* already scheduled, the previous settings can be forgotten.
* It should guarantee that when the function is called, GLUE_NOW() will
* be at least ms greater than it was when GLUE_CALLIN() was called (ie:
* make sure you call later rather than earlier)
* Also, be sure that from whatever context handler is called, it's
* safe to make calls into the protocol stack, for instance, into udp_sendto()
* or similar functions.
*/
#define GLUE_CALLIN(ms, handler) callin(ms, handler)
/* Declare all the previously used glue functions */
bits16_t cksum (bits16_t *, unsigned);
bits16_t swap16 (bits16_t);
bits32_t swap32 (bits32_t);
bits32_t glue_now (void);
void callin (bits32_t, void (*)(void));
void *malloc (unsigned);
void free (void *);
#ifdef ATTACHE_IPSEC_H
#define GLUE_IPSEC_SA_EXPIRED(W,X,Y,Z) \
glue_ipsec_sa_expired(W,X,Y,Z)
extern void glue_ipsec_sa_expired (ipsec_sa_dir_t, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_SND_PKT_DENIED(W,X,Y,Z) \
glue_ipsec_snd_pkt_denied((W),(X),(Y),(Z))
extern void glue_ipsec_snd_pkt_denied(packet *, ipaddr_t *, ipaddr_t *, int);
#define GLUE_IPSEC_RCV_PKT_BADSPI(V,W,X,Y,Z) \
glue_ipsec_rcv_pkt_badspi((V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_pkt_badspi(packet *, ipaddr_t *, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_PKT_NOTPARTY(V,W,X,Y,Z) \
glue_ipsec_rcv_pkt_notparty((V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_pkt_notparty(packet *, ipaddr_t *, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_TUNPKT_NOTIP(U,V,W,X,Y,Z) \
glue_ipsec_rcv_tunpkt_notip((U),(V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_tunpkt_notip(packet *, packet *, ipaddr_t *,
ipaddr_t *, bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_TUNPKT_NOTPARTY(S,T,U,V,W,X,Y,Z) \
glue_ipsec_rcv_tunpkt_notparty((S),(T),(U),(V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_tunpkt_notparty(packet *, ipaddr_t *, ipaddr_t *,
packet *, ipaddr_t *, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_SA_NOTUNNEL(V,W,X,Y,Z) \
glue_ipsec_rcv_sa_notunnel((V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_sa_notunnel(packet *, ipaddr_t *, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_PKT_BADAH(V,W,X,Y) \
glue_ipsec_rcv_pkt_badah((V),(W),(X),(Y))
extern void glue_ipsec_rcv_pkt_badah(packet *, ipaddr_t *, ipaddr_t *,
bits32_t);
#define GLUE_IPSEC_RCV_PKT_DENIED(V,W,X,Y,Z) \
glue_ipsec_rcv_pkt_denied((V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_pkt_denied(packet *, ipaddr_t *, ipaddr_t *,
ipsec_policy_flags_t, bits16_t);
#endif /* ATTACHE_IPSEC */
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,54 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/mach386/common.h,v 1.1.1.1 2001/11/05 17:47:12 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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:12 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:23:01 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:10:19 meister
* Update copyright message
*
* Revision 1.2 1998/02/25 04:56:53 sra
* Update copyrights.
*
* Revision 1.1 1997/08/21 17:23:45 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
-------------------
*/
/*
* NIY....
*/
#ifdef CONFIG_PREAMBLE
#else /* CONFIG_PREAMBLE */
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,129 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/mach386/emissary.h,v 1.1.1.1 2001/11/05 17:47:12 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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 1992-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: emissary.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:12 tneale
* Tornado shuffle
*
* Revision 1.3 2001/01/19 22:23:02 paul
* Update copyright.
*
* Revision 1.2 2000/03/17 00:10:19 meister
* Update copyright message
*
* Revision 1.1 1998/02/25 04:56:53 sra
* Update copyrights.
*
* Revision 1.0 1997/08/08 22:11:17 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.3 1997/03/20 06:58:06 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.1 1996/10/28 20:30:07 sar
* Initial version
*
*/
/* [clearcase]
modification history
-------------------
*/
/*
* The headers for this system are really screwed up, particularly
* when dealing with two different versions of gcc in ANSI mode.
* This will never be pretty, just grit your teeth.
*/
#define __GCC2__ (defined(__GNUC__) && __GNUC__ >= 2)
#include <sys/types.h>
#include <sys/file.h>
#include <stdio.h>
#if !__GCC2__
#include <libc.h>
#endif
#include <ctype.h>
#if !__GCC2__
#include <memory.h>
#endif
#include <string.h>
#include <time.h>
#include <errno.h>
#include <limits.h>
#include <assert.h>
#ifndef SEEK_SET
#define SEEK_SET 0
#endif
/*
* This is a pain, but the Mach386 header files don't declare this stuff
* if you're compiling with -traditional, and we want to avoid getting
* compiler warnings. It seems to be kind of arbitrary as to which functions
* are actually declared in the header files in this case.
*/
#if !__STDC__
extern int fflush(FILE*);
extern void exit(int);
extern int ungetc(int, FILE*);
extern int atoi(char *);
extern void perror(char *);
extern int fclose(FILE*);
extern int printf(char*,...);
extern int access(char *, int);
extern int _filbuf(FILE*);
extern void free(void *);
#endif /* !__STDC__ */
/*
* Definitions to suppress warnings from dumb system header files.
*/
#define MEMCPY(x,y,z) memcpy((char *) (x), (const char *) (y), (int) (z))
#define MEMSET(x,y,z) memset((char *) (x), (int) (y), (int) (z))
#define MEMCMP(x,y,z) memcmp((const char *) (x), (const char *) (y), (int) (z))
#define MEMCHR(x,y,z) memchr((const char *) (x), (int) (y), (int) (z))
/*
* These should be in the files <stddef.h>, <stdlib.h>, and <unistd.h>,
* but the versions of those that gcc-2.5.5 generated on Mach386 have
* everything conditionalized for C++ only, so they're useless. Sigh.
*/
#if __GCC2__
extern void *memchr(const void *, int, long unsigned int);
extern int memcmp(const void *, const void *, long unsigned int);
extern void *memcpy(void *, const void *, long unsigned int);
extern void *memset(void *, int, long unsigned int);
extern char *getenv (const char *);
extern int atoi(const char *);
extern void *malloc(long unsigned int);
extern void free(void *);
extern void *realloc(void *, long unsigned int);
#endif
@@ -0,0 +1,206 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/mach386/envoy.h,v 1.1.1.1 2001/11/05 17:47:12 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: envoy.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:12 tneale
* Tornado shuffle
*
* Revision 1.7 2001/01/19 22:23:02 paul
* Update copyright.
*
* Revision 1.6 2000/03/17 00:10:19 meister
* Update copyright message
*
* Revision 1.5 1998/06/21 21:53:05 sar
* Moved the porting stuff that is common to all of our demos to generic/envoy.h
* and included that file here.
*
* Revision 1.4 1998/06/20 18:29:20 sar
* Update for use with v3, also made it similar to other envoy.h files
*
* Revision 1.3 1998/02/25 04:56:54 sra
* Update copyrights.
*
* Revision 1.2 1997/11/04 00:29:36 sar
* Changed the agentx sub agent timeout period from 10000 (10 seconds)
* which was used for testing to 1000 (1 second).
*
* Revision 1.1 1997/10/29 01:31:29 sar
* Updated the master agent installation option.
*
* Revision 1.0 1997/08/08 22:11:17 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.4 1997/03/20 06:58:07 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.3 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.2 1997/01/15 22:13:32 sar
* moved the location of nvutils.h to snark/snmptalk
*
* Revision 0.1 1996/10/28 20:30:07 sar
* Initial version
*
* Revision 3.2 1996/03/22 10:05:39 sra
* Update copyrights prior to Attache 3.2 release.
*
* Revision 3.1 1995/09/27 21:21:17 lowell
* Ifdeffed the example locking code so it won't conflict with the defaults
* if we don't have locking turned on.
* (per sar's changes to the msdos example code)
*
* Revision 3.0 1995/05/10 22:37:24 sra
* Release 3.0.
*
* Revision 2.9 1995/05/01 20:59:29 sra
* Have to test CONFIG_PREAMBLE with #ifdef, not #if.
*
* Revision 2.8 1995/01/06 00:52:48 sra
* Update copyright notice for 2.1 release.
*
* Revision 2.7 1994/12/20 21:19:11 lowell
* worked around problems between Mach's memory.h and
* the builtin versions provided by GCC...
*
* Revision 2.6 1994/11/01 18:02:55 sar
* Updated *_add_mod to include a flags argument.
*
* Revision 2.5 1994/10/18 15:52:03 sar
* Modfied the calls for the new nvutils routines.
*
* Revision 2.4 1994/09/04 23:55:50 sra
* Get rid of most of the ancient NO_PP cruft.
*
* Revision 2.3 1994/05/12 17:28:21 sar
* moved the include for nvutils.h so it is available to all who need it.
*
* Revision 2.2 1994/05/10 20:43:24 sar
* Moved some view stuff around so it is available in other than v2 settings.
*
* Revision 2.1 1993/08/06 22:03:40 sra
* Release 2.0.
*
* Revision 1.8 1993/08/02 22:05:36 dab
* don't use #ifdef for INSTALL_ options
*
* Revision 1.7 1993/06/02 23:24:44 dab
* make MEMCMP identical to attache.h so the compiler doesn't complain.
*
* Revision 1.6 1993/05/13 22:27:54 sar
* added MEMCMP
*
* Revision 1.5 1993/05/13 18:47:44 sar
* Added macros for managing file impelementation of non volatile memory.
*
* Revision 1.4 1993/04/22 22:58:03 sar
* Got rid of pread and pwrite and some other macros, modified TIME
* to be SNMP_PARTYTIME
*
* Revision 1.3 1993/03/01 18:38:08 dab
* Added MEMSET and MEMCPY macros.
*
* Revision 1.2 1993/03/01 17:20:43 dab
* Added include of <string.h> to get strlen() declaration.
*
* Revision 1.1 1993/02/26 22:06:21 dab
* Initial revision
*
* Revision 1.1 1993/02/26 17:26:21 dab
* Initial revision
*
*
*/
/* [clearcase]
modification history
-------------------
*/
/*****************************************************************
This is the platform specific part of envoy.h for use with the
example code. It contains only the platform specific pieces of
the port code. The common porting code is in generic/envoy.h.
In general customers will have one envoy.h file per platform
that combines this file and the platform specific information,
we use two files as there is a lot of shared code between our
demos.
*****************************************************************/
#ifdef CONFIG_PREAMBLE
/*****************************************************************
System Includes:
Envoy uses memcpy(), memset(), and strlen(). The appropriate
include file should be put here to see that these routines are
properly declared. If no such include file exists on the system
then declare memcpy() and memset() here directly. Envoy also
uses min() and max(). Include the system's definition or use the
macros supplied below.
*****************************************************************/
void * memset(void *, int, size_t);
#include <string.h>
/*****************************************************************
Memory allocation routines. Envoy needs to allocate memory to
decode the packet into and also to store the response data
Make sure that the routines used by the SNMP_memory_alloc() and
SNMP_memory_free() macros are declared. If system memory routines
are used (e.g. malloc() and free()) then include the appropriate
system header file here.
On MACH 386 the system include files don't pass gcc's -pedentic
switch. This is just too painful to watch so I just declare malloc
and free myself.
*****************************************************************/
extern void *malloc (unsigned);
extern void free (void *);
#define SNMP_memory_alloc(need) malloc(need)
#define SNMP_memory_free(buf) free(buf)
/*****************************************************************
These macros fix up Mach 386's improper declaration of the mem*
routines. If you're using Envoy with Attache then these same macros
need to be defined in attache.h as well. Make sure they are identical
otherwise the C-preprocessor will complain about redefining them.
*****************************************************************/
#define MEMCPY(dst, src, n) memcpy((char *)(dst), (char *)(src), n)
#define MEMSET(dst, val, n) memset((char *)(dst), val, n)
#define MEMCMP(dst, src, n) memcmp((char *)(dst), (char *)(src), n)
#include <port/generic/envoy.h>
#else /* config preamble */
#include <port/generic/envoy.h>
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,69 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/mach386/oemtypes.h,v 1.1.1.1 2001/11/05 17:47:12 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: oemtypes.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:12 tneale
* Tornado shuffle
*
* Revision 1.3 2001/01/19 22:23:02 paul
* Update copyright.
*
* Revision 1.2 2000/03/17 00:10:19 meister
* Update copyright message
*
* Revision 1.1 1998/02/25 04:56:54 sra
* Update copyrights.
*
* Revision 1.0 1997/08/08 22:11:18 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.3 1997/03/20 06:58:07 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.1 1996/10/28 20:30:07 sar
* Initial version
*
*/
/* [clearcase]
modification history
-------------------
*/
/*
* We need to supply size_t. Everything else in <types.h> will
* work fine on Mach386.
*/
#include <sys/types.h>
/*
* For use with Emissary.
*/
#define __GCC2__ (defined(__GNUC__) && __GNUC__ >= 2)
#if __GCC2__
#include <stddef.h>
#endif
@@ -0,0 +1,71 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/mach386/snmptalk.h,v 1.1.1.1 2001/11/05 17:47:12 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: snmptalk.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:12 tneale
* Tornado shuffle
*
* Revision 1.3 2001/01/19 22:23:02 paul
* Update copyright.
*
* Revision 1.2 2000/03/17 00:10:19 meister
* Update copyright message
*
* Revision 1.1 1998/02/25 04:56:55 sra
* Update copyrights.
*
* Revision 1.0 1997/08/08 22:11:18 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.4 1997/03/20 06:58:08 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.3 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.2 1996/10/30 22:08:57 sar
* removed bsd_release
*
* Revision 0.1 1996/10/28 20:30:07 sar
* Initial version
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <strings.h>
/* defines for nvutils for file manipulation */
#define SNMP_READONLY "r"
#define SNMP_READPLUS "r+"
#define SNMP_WRITEPLUS "w+"
#define SNMP_REMOVE_FILE(fname) unlink(fname)
/* Mach doesn't have these routines so we provide them. */
#define NEEDS_STRDUP
#define NEEDS_STRTOL
#define NEEDS_STRTOUL
#define strnicmp strncasecmp
#define stricmp strcasecmp
@@ -0,0 +1,64 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/mach386/telnet.h,v 1.1.1.1 2001/11/05 17:47:12 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: telnet.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:12 tneale
* Tornado shuffle
*
* Revision 1.3 2001/01/19 22:23:02 paul
* Update copyright.
*
* Revision 1.2 2000/03/17 00:10:20 meister
* Update copyright message
*
* Revision 1.1 1998/02/25 04:56:55 sra
* Update copyrights.
*
* Revision 1.0 1997/08/08 22:11:18 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.3 1997/03/20 06:58:02 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
*/
/* [clearcase]
modification history
-------------------
*/
/* Things which MAY be defined in here:
*
* TN_LOCAL_NEWLINE
* TN_RECV_LOCAL_NEWLINE
* TN_SEND_LOCAL_NEWLINE
* TN_INITIAL_ACTIVE_WINDOW_SIZE
* TN_INITIAL_PASSIVE_WINDOW_SIZE
* GLUE_TN_WINDOW_SIZE
*/
/*
* All of the defaults are in attache/h/tnconfig.h.
*/
@@ -0,0 +1,356 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/msdos/attache.h,v 1.2 2002/02/26 18:22:53 josh Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: attache.h,v $
* Revision 1.2 2002/02/26 18:22:53 josh
* updating paths in port files
*
* Revision 1.1.1.1 2001/11/05 17:47:12 tneale
* Tornado shuffle
*
* Revision 1.12 2001/01/19 22:23:03 paul
* Update copyright.
*
* Revision 1.11 2000/03/17 00:10:25 meister
* Update copyright message
*
* Revision 1.10 1999/04/28 23:53:25 sra
* Clean up various minor installation option glitches.
*
* Revision 1.9 1998/09/06 08:11:06 sra
* Packet filtering hooks in Attache, rudimentary firewall
* implementation in Snark.
*
* Revision 1.8 1998/03/12 18:23:42 meister
* GLUE_IPSEC_RCV_SA_NOTUNNEL()
*
* Revision 1.7 1998/03/11 21:08:28 meister
* Added extra parameters to a couple of IPSEC glue macros
*
* Revision 1.6 1998/03/03 15:26:16 mrf
* Comment out PRINTF declarations.
*
* Revision 1.5 1998/02/28 01:40:00 meister
* Added stdio and a PRINTF
*
* Revision 1.4 1998/02/27 22:31:01 meister
* Added ipsec glue functions
*
* Revision 1.3 1998/02/25 04:56:56 sra
* Update copyrights.
*
* Revision 1.2 1998/02/18 22:34:59 sra
* Add ip_loopback(), eradicate glue_pkt_handle().
*
* Revision 1.1 1997/09/15 15:48:27 sra
* GLUE_NOW() migration version skew.
*
* Revision 1.0 1997/08/08 22:11:19 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.5 1997/03/20 06:57:47 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.4 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.3 1997/01/08 01:08:19 sar
* as part of changing snmptalk to use the snark suite we can remove
* the ifdefs for snark in this file.
*
* Revision 0.2 1996/10/26 00:43:57 sar
* put the #else for config_preamble in the right place
*
* Revision 0.1 1996/10/23 00:12:55 sar
* *** empty log message ***
*
*/
/* [clearcase]
modification history
-------------------
*/
/* previous history from attache/port/msdos/attache.h
*
* Revision 3.1 1996/03/22 10:05:39 sra
* Update copyrights prior to Attache 3.2 release.
*
* Revision 3.0 1995/05/10 22:37:24 sra
* Release 3.0.
*
* Revision 2.4 1995/01/06 00:52:48 sra
* Update copyright notice for 2.1 release.
*
* Revision 2.3 1994/09/04 23:55:50 sra
* Get rid of most of the ancient NO_PP cruft.
*
* Revision 2.2 1994/09/04 06:13:38 sra
* Clean up antique type names and install macros.
*
* Revision 2.1 1993/08/06 22:03:43 sra
* Release 2.0.
*
* Revision 1.8 1993/08/03 23:19:38 dab
* CONFIG_PREAMBLE is either defined or not, so use ifdef
*
* Revision 1.7 1993/08/02 21:59:13 dab
* moved MEM* and STR* to the first section
*
* Revision 1.6 1993/05/20 20:22:21 sar
* Removed memory.h if the compiler is watcom or intel 960
*
* Revision 1.5 1993/05/17 20:11:55 sar
* Added an ifdef for zortech to remove the include of memory.h and
* to add the define of NEEDS_STR{DUP ICMP NICMP} as they weren't
* available.
*
* Revision 1.4 1993/04/21 15:30:59 dab
* Default configuration moved to <attache/h/config.h>
*
* Revision 1.3 1993/02/28 18:28:38 dab
* Changed "#define SGRP" to "#define SGRP 1" so it matches envoy/h/asn1conf.h
* so we don't get warnings.
* Added include of <memory.h> and <string.h>.
*
* Revision 1.2 1993/02/27 17:31:59 dab
* Merged in stuff from glue.h
*
* Revision 1.1 1993/02/18 21:50:33 dab
* Initial revision
*/
#ifdef CONFIG_PREAMBLE
/* Things which MAY be defined in here:
*
* MAX_PACKETS
* STATIC_PACKETS
* MAX_ARP_ENTRIES
* ARP_EXPIRATION
* ARP_TIMER_FREQUENCY
* ARP_TIMEOUT
* PRINTF
* DEFAULT_IP_TTL
* MAX_REASM
* IP_REASM_TIMEOUT
* TFTP_TIMEOUT
*/
/* Define MAX_PACKETS in order to preallocate packets using glue_alloc().
* MAX_PACKETS value is the number of packets to preallocate.
*
* Define STATIC_PACKETS to have MAX_PACKETS packet buffers allocated
* from a static array. STATIC_PACKETS should be the packet size
* to allocate.
*/
#define MAX_PACKETS 20
/*#define STATIC_PACKETS 1536 */
/* Define IP_MAX_PKTSIZE to be the maximum reassembly buffer size.
* This isn't the largest packet that can be reassembled because some of the
* buffer space is taken up with other things.
* Also, ptcp_init() will preallocate packets of this size at startup
*/
#ifdef STATIC_PACKETS
#define IP_MAX_PKTSIZE STATIC_PACKETS
#else
#define IP_MAX_PKTSIZE 1536
#endif
#define TCP_DEFAULT_MAX_RETRANSMISSIONS 0
#else /* CONFIG_PREAMBLE */
/* Declarations for various standard C functions needed by Attache.
* These later may be declared by just including system include files
* or the functions may be explcitly declared here. The standard C
* functions needed by Attache are:
*
* memcpy memcmp memset strcmp strcpy strlen
*
*/
/* microsoft and borland have a memory.h so include it */
#if defined(INSTALL_on_microsoft) || defined(INSTALL_on_bcc)
#include <memory.h>
#endif
#include <string.h>
#include <stdio.h>
/* glue routines to interface to the outside world. */
/* lock interrupts, return old state */
extern int glue_intlock (int);
/* generic memory allocation routines */
#define GLUE_ALLOC(len) ((void *) malloc(len))
#define GLUE_FREE(mem) free((char *)(mem))
/* Define this one if you want your own packet allocation routine. Both
* GLUE_PKTALLOC() and GLUE_PKTFREE() must be defined or undefined.
*/
/* #define GLUE_PKTALLOC(len) gettapkt(len) */
/* #define GLUE_PKTFREE(p) givepkt(p) */
/* Define GLUE_PKTPRIVATE_FREE(x) to be a routine to free the pkt_private
* value, if you need to do that.
*/
/* #define GLUE_PKTPRIVATE_FREE(x) priv_free(x) */
/* Define GLUE_CKSUM to be a function that computes the IP checksum
*/
#define GLUE_CKSUM(x, y) glue_cksum((bits16_t *)(x), (y))
/* Define GLUE_SWAP16 and GLUE_SWAP32 iff your machine is little endian and
* thus SWAP16 and SWAP32 are defined. Supplied are definitions for PC-DOS.
*/
#define GLUE_SWAP16(x) glue_swap16(x)
#define GLUE_SWAP32(x) glue_swap32(x)
/* GLUE time functions
*
* GLUE_NOW() returns a 32 bit number in milliseconds. It's used as a
* relative, not absolute, number. Just keep it to whatever resolution is
* convenient, but make sure it is a monotonically increasing number.
*/
#ifndef GLUE_NOW
#define GLUE_NOW() glue_now()
#endif
/* GLUE_CALLIN() schedules a function to be called in ms milliseconds.
* It only has to remember one function; when it is called while a call is
* already scheduled, the previous settings can be forgotten.
* It should guarantee that when the function is called, GLUE_NOW() will
* be at least ms greater than it was when GLUE_CALLIN() was called (ie:
* make sure you call later rather than earlier)
* Also, be sure that from whatever context handler is called, it's
* safe to make calls into the protocol stack, for instance, into udp_sendto()
* or similar functions.
*/
#define GLUE_CALLIN(x, y) glue_callin(x, y)
/* here we include files that define functions (like malloc(), for instance)
* that may be glue routines or declare the functions directly
*/
#include <stdlib.h>
extern bits32_t glue_now (void);
extern bits16_t glue_cksum (bits16_t *, unsigned);
extern void glue_callin (bits32_t, void (*)(void));
extern bits16_t glue_swap16 (bits16_t);
extern bits32_t glue_swap32 (bits32_t);
#ifndef MEMCPY
#define MEMCPY(x, y, z) memcpy(x, y, z)
#endif
#ifndef MEMCMP
#define MEMCMP(x, y, z) memcmp(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
/* Define PRINTF to build debugging/printing code
#ifndef PRINTF
#define PRINTF printf
#endif
*/
#ifdef ATTACHE_IPSEC_H
#define GLUE_IPSEC_SA_EXPIRED(W,X,Y,Z) \
glue_ipsec_sa_expired(W,X,Y,Z)
extern void glue_ipsec_sa_expired (ipsec_sa_dir_t, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_SND_PKT_DENIED(W,X,Y,Z) \
glue_ipsec_snd_pkt_denied((W),(X),(Y),(Z))
extern void glue_ipsec_snd_pkt_denied(packet *, ipaddr_t *, ipaddr_t *, int);
#define GLUE_IPSEC_RCV_PKT_BADSPI(V,W,X,Y,Z) \
glue_ipsec_rcv_pkt_badspi((V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_pkt_badspi(packet *, ipaddr_t *, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_PKT_NOTPARTY(V,W,X,Y,Z) \
glue_ipsec_rcv_pkt_notparty((V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_pkt_notparty(packet *, ipaddr_t *, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_SA_NOTUNNEL(V,W,X,Y,Z) \
glue_ipsec_rcv_sa_notunnel((V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_sa_notunnel(packet *, ipaddr_t *, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_TUNPKT_NOTIP(U,V,W,X,Y,Z) \
glue_ipsec_rcv_tunpkt_notip((U),(V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_tunpkt_notip(packet *, packet *, ipaddr_t *,
ipaddr_t *, bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_TUNPKT_NOTPARTY(S,T,U,V,W,X,Y,Z) \
glue_ipsec_rcv_tunpkt_notparty((S),(T),(U),(V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_tunpkt_notparty(packet *, ipaddr_t *, ipaddr_t *,
packet *, ipaddr_t *, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_PKT_BADAH(V,W,X,Y) \
glue_ipsec_rcv_pkt_badah((V),(W),(X),(Y))
extern void glue_ipsec_rcv_pkt_badah(packet *, ipaddr_t *, ipaddr_t *,
bits32_t);
#define GLUE_IPSEC_RCV_PKT_DENIED(V,W,X,Y,Z) \
glue_ipsec_rcv_pkt_denied((V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_pkt_denied(packet *, ipaddr_t *, ipaddr_t *,
ipsec_policy_flags_t, bits16_t);
#endif /* ATTACHE_IPSEC */
#if defined(INSTALL_SNARK_FIREWALL) && INSTALL_SNARK_FIREWALL
#include <wrn/wm/demo/firewall.h>
#endif
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,90 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/msdos/common.h,v 1.1.1.1 2001/11/05 17:47:12 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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:12 tneale
* Tornado shuffle
*
* Revision 1.7 2001/01/19 22:23:03 paul
* Update copyright.
*
* Revision 1.6 2000/03/17 00:10:27 meister
* Update copyright message
*
* Revision 1.5 1998/06/21 21:43:51 sar
* Dos compilers seem to use stricmp and strnicmp instead of casecmp
*
* Revision 1.4 1998/02/25 04:56:57 sra
* Update copyrights.
*
* Revision 1.3 1997/12/02 16:15:15 mrf
* add GLUE_NOW definition to make prng.c build on DOS
*
* Revision 1.2 1997/10/29 20:32:33 sar
* Added memory.h for some compilers to get prototypes for mem functions.
*
* Revision 1.1 1997/08/21 17:23:46 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
-------------------
*/
/*
* NIY....
*/
#ifdef CONFIG_PREAMBLE
/* zortech, watcom and intel 960 don't have a memory.h so away it goes */
#if (!defined(INSTALL_on_ztc) && !defined(INSTALL_on_watcom) && !defined(INSTALL_on_i960))
#include <memory.h>
#endif /* INSTALL_on_ztc */
#ifndef STRICMP
#define STRICMP(x, y) stricmp(x, y)
#endif
#ifndef STRNICMP
#define STRNICMP(x, y, z) strnicmp(x, y, z)
#endif
#else /* CONFIG_PREAMBLE */
#ifndef GLUE_NOW
#define GLUE_NOW() glue_now()
extern bits32_t glue_now (void);
#endif
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,197 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/msdos/decorum.h,v 1.3 2003/01/15 14:00:26 josh Exp $ */
/*
* Copyright (C) 1999-2004 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 1996-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: decorum.h,v $
* Revision 1.3 2003/01/15 14:00:26 josh
* directory structure shifting
*
* Revision 1.2 2002/02/26 18:22:53 josh
* updating paths in port files
*
* Revision 1.1.1.1 2001/11/05 17:47:12 tneale
* Tornado shuffle
*
* Revision 2.7 2001/01/19 22:23:03 paul
* Update copyright.
*
* Revision 2.6 2000/03/17 00:10:27 meister
* Update copyright message
*
* Revision 2.5 1998/03/12 20:59:46 josh
* added string.h to prevent some compiler warnings
*
* Revision 2.4 1998/02/25 04:56:57 sra
* Update copyrights.
*
* Revision 2.3 1998/02/16 21:33:43 josh
* decorum port file now uses epilogue_char_t where appropriate
*
* Revision 2.2 1997/11/04 00:23:34 sar
* added memory.h for some compilers to get rid of some warnings.
*
* Revision 2.1 1997/09/15 22:32:59 josh
* include stdlib.h so we know how malloc() and free() are defined
*
* Revision 2.0 1997/09/11 15:08:17 josh
* updating version numbers for release
*
* Revision 1.0 1997/08/08 22:11:19 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.8 1997/08/05 19:23:36 josh
* updated for Decorum 2.0 -- new stuff added
*
* Revision 0.7 1997/03/20 06:57:48 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.6 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.5 1997/02/12 19:17:12 lowell
* refer to DECORUM_GET_RAWTIME
*
* Revision 0.4 1996/10/28 17:49:00 sar
* Added use of decorum_size_t
*
* Revision 0.3 1996/10/27 16:54:09 lowell
* ETC_STDIO_SIZE
*
* Revision 0.2 1996/10/26 23:03:18 lowell
* DECORUM_SENDBUF_LEN and ETC_STDIO_READ
*
* Revision 0.1 1996/10/23 00:12:55 sar
* *** empty log message ***
*
*/
/* [clearcase]
modification history
-------------------
*/
#if (!defined(decorum_inc))
#define decorum_inc
/* zortech, watcom and intel 960 don't have a memory.h so away it goes */
#if (!defined(INSTALL_on_ztc) && !defined(INSTALL_on_watcom) && !defined(INSTALL_on_i960))
#include <memory.h>
#endif /* INSTALL_on_ztc */
#include <wrn/wm/common/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifndef DECORUM_ALLOC
#define DECORUM_ALLOC(x) ((void *) malloc(x))
#endif
#ifndef DECORUM_FREE
#define DECORUM_FREE(x) (free((char *) (x)))
#endif
/* This first should be the same as SNMP_MAX_PACKET_SIZE in envoy.h */
#define DECORUM_MAX_PACKET_SIZE (1400)
#define DECORUM_DEFAULT_RECEIVE_BUFLEN (512)
/* needed for OIDC_T definition */
#if INSTALL_DECORUM_PROXY && (!defined(asn1conf_inc))
#include <wrn/wm/snmp/engine/asn1conf.h>
#endif
/* Some input routines, these are provided but may be replaced with
more efficient implentations if desired */
extern sbits16_t decorum_parse_sbits32 (epilogue_char_t *,
epilogue_char_t **,
sbits32_t *);
extern sbits16_t decorum_parse_bits32 (epilogue_char_t *,
epilogue_char_t **,
bits32_t *);
extern sbits16_t decorum_parse_hexstring (epilogue_char_t *,
epilogue_char_t *,
decorum_size_t);
#define ETC_STRING_GET_SBITS32 decorum_parse_sbits32
#define ETC_STRING_GET_BITS32 decorum_parse_bits32
#define ETC_STRING_GET_HEXSTRING decorum_parse_hexstring
/* a routine to output a number to a byte string, used to create
file/stream names */
#define ETC_STDIO_SPRINTF(buf, num, str) sprintf(buf, "%lu%s", num, str)
/* Define the structure that will be used for holding output
until we are done */
typedef FILE etc_stdio_t;
/* Macros for opening, closing and removing a stream */
#define ETC_STDIO_MODE_READ "r"
#define ETC_STDIO_MODE_WRITE "w+"
#define ETC_STDIO_OPEN(fname, how) fopen(fname, how)
#define ETC_STDIO_CLOSE(outstream) fclose(outstream)
#define ETC_STDIO_REMOVE(fname) remove(fname)
#define ETC_STDIO_READ(instream, size, buf) \
fread((buf), 1, (size), (instream))
#define ETC_STDIO_WRITE(outstream, size, buf) \
fwrite((buf), 1, (size), (outstream))
extern bits32_t file_size_32(char * fname);
#define ETC_STDIO_SIZE(fname) (file_size_32(fname))
#if 0
extern void file_last_modified_time(char *, struct decorum_rawtime *);
#define ETC_STDIO_LAST_MODIFIED_TIME(fname, tvp) \
(file_last_modified_time((fname), (tvp)))
#endif
/* Define the base output routines */
extern sbits16_t decorum_put_string (etc_stdio_t *, epilogue_char_t *,
decorum_size_t);
extern sbits16_t decorum_put_sbits32 (etc_stdio_t *, sbits32_t);
extern sbits16_t decorum_put_bits32 (etc_stdio_t *, bits32_t);
extern sbits16_t decorum_put_hex_string (etc_stdio_t *, bits8_t *,
decorum_size_t);
#define ETC_STDIO_PUT_STRING decorum_put_string
#define ETC_STDIO_PUT_SBITS32 decorum_put_sbits32
#define ETC_STDIO_PUT_BITS32 decorum_put_bits32
#define ETC_STDIO_PUT_HEX_STRING decorum_put_hex_string
#if INSTALL_DECORUM_PROXY
/* Define a more complex output routine, this may use the
base routines (as the example code does) or may be more direct */
extern sbits16_t decorum_put_oid (etc_stdio_t *, OIDC_T *, decorum_size_t);
#define ETC_STDIO_PUT_OID decorum_put_oid
#endif /* INSTALL_DECORUM_PROXY */
/* Define a string comparison routine */
#define ETC_STRING_STRCASECMP stricmp
/* Define a string length routine */
#define ETC_STRING_STRLEN strlen
/* Define a routine that gets the current time. */
/* This is compiler dependent on MS-DOS. */
#if 0
#define DECORUM_GET_RAWTIME(timeval_p) msdos_glue_getime ((timeval_p));
#endif
/* Define a routine that figgers out how big a buffer to use for a chunk
* of outgoing data. */
#define DECORUM_SENDBUF_LEN(http_sb) (256)
#endif /* #if (!defined(decorum_inc)) */
@@ -0,0 +1,113 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/msdos/emissary.h,v 1.1.1.1 2001/11/05 17:47:12 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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 1992-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: emissary.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:12 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:23:03 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:10:27 meister
* Update copyright message
*
* Revision 1.2 1998/10/08 19:31:45 paul
* small syntax cleanup
*
* Revision 1.1 1998/02/25 04:56:57 sra
* Update copyrights.
*
* Revision 1.0 1997/08/08 22:11:20 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.4 1997/03/20 06:57:48 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.3 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.2 1996/10/28 17:42:54 mrf
* undefine MEM_AVAIL if we are on msvc4.0 (which has no _memavl())
*
* Revision 0.1 1996/10/23 00:12:55 sar
* *** empty log message ***
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <sys/types.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <time.h>
#include <io.h>
#include <assert.h>
#include <limits.h>
#include <errno.h>
/*
* WATCOM C/C++ 9.5 warns about constructs like "defined(foo) && foo",
* so explicitly zero all the compiler install tests we know it will find.
*/
#ifndef INSTALL_on_bcc
#define INSTALL_on_bcc 0
#endif
#ifndef INSTALL_on_microsoft
#define INSTALL_on_microsoft 0
#endif
#ifndef INSTALL_on_microsoft
#define INSTALL_on_microsoft 0
#endif
#ifndef INSTALL_on_msvc40
#define INSTALL_on_msvc40 0
#endif
#ifndef INSTALL_on_ztc
#define INSTALL_on_ztc 0
#endif
#if INSTALL_on_bcc
#include <memory.h>
#include <alloc.h>
#define MEM_AVAIL() ((unsigned long) coreleft())
#endif
#if INSTALL_on_microsoft
#include <memory.h>
#include <malloc.h>
#define MEM_AVAIL() ((unsigned long) _memavl())
#endif
/* No _memavl() on msvc40 */
#if INSTALL_on_msvc40
#undef MEM_AVAIL
#endif
@@ -0,0 +1,228 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/msdos/envoy.h,v 1.1.1.1 2001/11/05 17:47:12 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: envoy.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:12 tneale
* Tornado shuffle
*
* Revision 1.6 2001/01/19 22:23:04 paul
* Update copyright.
*
* Revision 1.5 2000/03/17 00:10:27 meister
* Update copyright message
*
* Revision 1.4 1998/06/21 21:53:06 sar
* Moved the porting stuff that is common to all of our demos to generic/envoy.h
* and included that file here.
*
* Revision 1.3 1998/02/25 04:56:58 sra
* Update copyrights.
*
* Revision 1.2 1997/11/04 00:29:36 sar
* Changed the agentx sub agent timeout period from 10000 (10 seconds)
* which was used for testing to 1000 (1 second).
*
* Revision 1.1 1997/10/29 01:29:59 sar
* Added the agentx options and modified the older sub agent options
*
* Revision 1.0 1997/08/08 22:11:20 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.6 1997/03/20 06:57:49 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.5 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.4 1997/01/15 22:14:49 sar
* moved the location of nvutils.h to snark/snmptalk
*
* Revision 0.3 1996/10/30 04:41:43 sra
* Fix nested comment.
*
* Revision 0.2 1996/10/25 21:05:12 sar
* corrected install_envoy_proxy to install_envoy_snmp_proxy
*
* Revision 0.1 1996/10/23 00:12:55 sar
* *** empty log message ***
*/
/* [clearcase]
modification history
-------------------
*/
/* previous revision history from attache/port/msdos/envoy.h
*
* Revision 3.6 1996/03/22 10:05:39 sra
* Update copyrights prior to Attache 3.2 release.
*
* Revision 3.5 1996/01/26 22:07:27 sar
* changed partytime to usectime and ifdeffed it off of version_usec
*
* Revision 3.4 1995/11/10 23:58:18 sar
* stopped using the pre & post set user exits for the nvview stuff
*
* Revision 3.3 1995/11/06 20:03:42 sar
* Removed validate_community's dependency on install v1
* Remvoed validate_address & validate_version
*
* Revision 3.2 1995/10/20 23:19:42 sar
* removed party, context and acl macros
* modifed the install options for the view scheme inclusions.
*
* Revision 3.1 1995/05/22 19:38:28 sar
* Modified the lock code to add some new macros.
*
* Revision 3.0 1995/05/10 22:37:24 sra
* Release 3.0.
*
* Revision 2.10 1995/05/01 20:54:06 sar
* Added undo macros for the party mib for use with the async scheme.
*
* Revision 2.9 1995/03/24 16:39:14 sar
* Ifdeffed the example locking code so it won't conflict with the defaults
* if we don't have locking turned on.
* Added the envoy timer support routines.
*
* Revision 2.8 1995/01/06 00:52:48 sra
* Update copyright notice for 2.1 release.
*
* Revision 2.7 1994/11/01 18:00:30 sar
* *_add_mod now takes a flag as well as a data pointer.
*
* Revision 2.6 1994/10/18 15:54:01 sar
* Modified some macros for use with the new nvutils routines.
*
* Revision 2.5 1994/09/04 23:55:50 sra
* Get rid of most of the ancient NO_PP cruft.
*
* Revision 2.4 1994/05/12 17:25:20 sar
* moved include for nvutils.h so it is availble when needed.
*
* Revision 2.3 1994/05/10 20:22:11 sar
* moved view defines around so they are availabel in other than v2 settings.
*
* Revision 2.2 1994/05/09 21:07:17 sar
* added define for SNMP_RESETSYSUPTIME to be nothing.
*
* Revision 2.1 1993/08/06 22:03:43 sra
* Release 2.0.
*
* Revision 1.8 1993/08/02 22:06:06 dab
* don't use #ifdef for INSTALL_ optios
*
* Revision 1.7 1993/05/20 20:22:21 sar
* Removed memory.h if the compiler is watcom or intel 960.
* checked to see if config_preamble is defined rather than what it is.
*
* Revision 1.6 1993/05/17 20:11:55 sar
* Added an ifdef for zortech to remove the include of memory.h and
* to add the define of NEEDS_STR{DUP ICMP NICMP} as they weren't
* available.
*
* Revision 1.5 1993/05/13 18:51:39 sar
* Added macros for managing the file implementation of non volatile memory.
*
* Revision 1.4 1993/04/22 22:59:03 sar
* Got rid of pread and pwrite and some other macros, modified TIME
* to be SNMP_PARTYTIME and TIME_T to be PARTYTIME_T.
*
* Revision 1.3 1993/03/05 03:59:57 dab
* function declarations to keep the compiler happy
*
* Revision 1.2 1993/03/01 17:21:07 dab
* Added include of <string.h> to get strlen() declaration.
*
* Revision 1.1 1993/02/27 17:27:42 dab
* Initial revision
*
*/
/*****************************************************************
This is the platform specific part of envoy.h for use with the
example code. It contains only the platform specific pieces of
the port code. The common porting code is in generic/envoy.h.
In general customers will have one envoy.h file per platform
that combines this file and the platform specific information,
we use two files as there is a lot of shared code between our
demos.
*****************************************************************/
#if defined(CONFIG_PREAMBLE)
/*****************************************************************
*
* System Includes:
*
* The SNMP uses memcpy(), memset(), and strlen(). The appropriate
* include file should be put here to see that these routines are
* properly declared. If no such include file exists on the system
* then declare memcpy() and memset() here directly.
*****************************************************************/
/*****************************************************************
System Includes:
Envoy uses memcpy(), memset(), and strlen(). The appropriate
include file should be put here to see that these routines are
properly declared. If no such include file exists on the system
then declare memcpy() and memset() here directly. Envoy also
uses min() and max(). Include the system's definition or use the
macros supplied below.
*****************************************************************/
/* zortech, watcom and intel 960 don't have a memory.h so away it goes */
#if (!defined(INSTALL_on_ztc) && !defined(INSTALL_on_watcom) && !defined(INSTALL_on_i960))
#include <memory.h>
#endif /* INSTALL_on_ztc */
#include <string.h>
/*****************************************************************
Memory allocation routines. Envoy needs to allocate memory to
decode the packet into and also to store the response data
Make sure that the routines used by the SNMP_memory_alloc() and
SNMP_memory_free() macros are declared. If system memory routines
are used (e.g. malloc() and free()) then include the appropriate
system header file here.
*****************************************************************/
PTR_T SNMP_mem_alloc (unsigned int);
void SNMP_mem_free (PTR_T);
#define SNMP_memory_alloc(need) SNMP_mem_alloc(need)
#define SNMP_memory_free(buf) SNMP_mem_free(buf)
#include <port/generic/envoy.h>
#else /* CONFIG_PREAMBLE */
#include <port/generic/envoy.h>
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,49 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/msdos/liaison.h,v 1.1.1.1 2001/11/05 17:47:13 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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 1996-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: liaison.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:13 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:23:04 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:10:27 meister
* Update copyright message
*
* Revision 1.2 1998/02/25 04:56:59 sra
* Update copyrights.
*
* Revision 1.1 1997/11/18 19:59:33 josh
* liaison.h is a dummy file for now, but it will probably have stuff
* in the future
*
*/
/* [clearcase]
modification history
-------------------
*/
#if (!defined(liaison_inc))
#define liaison_inc
#endif /* #if (!defined(liaison_inc)) */
@@ -0,0 +1,105 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/msdos/snark.h,v 1.1.1.1 2001/11/05 17:47:13 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: snark.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:13 tneale
* Tornado shuffle
*
* Revision 1.5 2001/01/19 22:23:04 paul
* Update copyright.
*
* Revision 1.4 2000/03/17 00:10:27 meister
* Update copyright message
*
* Revision 1.3 1999/05/21 16:45:28 sra
* vsnprintf() => VSNPRINTF().
*
* Revision 1.2 1998/02/25 04:56:59 sra
* Update copyrights.
*
* Revision 1.1 1997/11/10 23:58:17 sar
* ifdef the include for memory.h to make some compilers happy
*
* Revision 1.0 1997/08/08 22:11:21 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.5 1997/07/11 12:59:07 mrf
* make definitions of GLUE_FREE in attache.h and snark.h match exactly
*
* Revision 0.4 1997/03/20 06:57:49 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.3 1997/03/09 18:37:16 sra
* Add STRICMP().
*
* Revision 0.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.1 1996/10/23 00:12:55 sar
* *** empty log message ***
*
*/
/* [clearcase]
modification history
-------------------
*/
/* zortech, watcom and intel 960 don't have a memory.h so away it goes */
#if (!defined(INSTALL_on_ztc) && !defined(INSTALL_on_watcom) && !defined(INSTALL_on_i960))
#include <memory.h>
#endif /* INSTALL_on_ztc */
#include <string.h>
#include <stdlib.h>
#ifndef GLUE_ALLOC
#define GLUE_ALLOC(len) ((void *) malloc(len))
#endif
#ifndef GLUE_FREE
#define GLUE_FREE(mem) free((char *)(mem))
#endif
#ifndef MEMCPY
#define MEMCPY(x, y, z) memcpy(x, y, z)
#endif
#ifndef MEMCMP
#define MEMCMP(x, y, z) memcmp(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 STRICMP
#define STRICMP(x, y) stricmp(x, y)
#endif
#ifndef STRNICMP
#define STRNICMP(x, y, z) strnicmp(x, y, z)
#endif
@@ -0,0 +1,87 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/msdos/snmptalk.h,v 1.1.1.1 2001/11/05 17:47:13 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: snmptalk.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:13 tneale
* Tornado shuffle
*
* Revision 1.3 2001/01/19 22:23:04 paul
* Update copyright.
*
* Revision 1.2 2000/03/17 00:10:28 meister
* Update copyright message
*
* Revision 1.1 1998/02/25 04:57:00 sra
* Update copyrights.
*
* Revision 1.0 1997/08/08 22:11:21 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.5 1997/03/20 06:57:50 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.4 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.3 1996/10/30 22:09:46 sar
* removed bsd_release
*
* Revision 0.2 1996/10/28 17:50:30 mrf
* add winsock definitions if we're building for winsock.
*
* Revision 0.1 1996/10/23 00:12:55 sar
* *** empty log message ***
*
*/
/* [clearcase]
modification history
-------------------
*/
/* System include files or function declarations for MS-DOS. */
#include <stdlib.h>
#include <string.h>
#define PTCP_STDFUNC_H
#define ATTACHE
/* defines for nvutils for file manipulation */
#define SNMP_READONLY "r"
#define SNMP_READPLUS "r+"
#define SNMP_WRITEPLUS "w+"
#define SNMP_REMOVE_FILE(fname) remove(fname)
/* defines for missing string items */
/* currently only needed for zortech */
#if defined(INSTALL_on_ztc)
#define NEEDS_STRDUP 1
#define NEEDS_STRICMP 1
#define NEEDS_STRNICMP 1
#endif /* INSTALL_on_ztc */
#if defined(INSTALL_on_winsock)
#define DESIRED_WINSOCK_VERSION 0x0101
#define MINIMUM_WINSOCK_VERSION 0x0001
#define SOCKET_TIMEOUT 20L /* time to wait to for selects */
#endif /* INSTALL_on_winsock */
@@ -0,0 +1,89 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/msdos/telnet.h,v 1.1.1.1 2001/11/05 17:47:13 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: telnet.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:13 tneale
* Tornado shuffle
*
* Revision 1.3 2001/01/19 22:23:04 paul
* Update copyright.
*
* Revision 1.2 2000/03/17 00:10:28 meister
* Update copyright message
*
* Revision 1.1 1998/02/25 04:57:00 sra
* Update copyrights.
*
* Revision 1.0 1997/08/08 22:11:21 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.3 1997/03/20 06:57:46 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.1 1996/10/23 00:12:55 sar
* *** empty log message ***
*
*/
/* [clearcase]
modification history
-------------------
*/
/* Things which MAY be defined in here,
* the defaults are in attache/h/tnconfig.h.
*
* TN_LOCAL_NEWLINE
* TN_RECV_LOCAL_NEWLINE
* TN_SEND_LOCAL_NEWLINE
* TN_INITIAL_ACTIVE_WINDOW_SIZE
* TN_INITIAL_PASSIVE_WINDOW_SIZE
* GLUE_TN_WINDOW_SIZE
*/
/*
* Use '\n' for local newline convention in both directions.
*/
#define TN_LOCAL_NEWLINE '\n'
/*
* All the windowing stuff for server telnet connections is controlled
* by the sty code, so shunt the decisions off to the sty_tn interface module.
*
* For client telnet connections we're not buffering output, so we just
* return a constant window size.
*/
#define TN_INITIAL_ACTIVE_WINDOW_SIZE (4096)
#define TN_INITIAL_PASSIVE_WINDOW_SIZE (stytn_space_initial)
#define GLUE_TN_WINDOW_SIZE(_tn_) \
(tn_get_flags((_tn_), TN_FLG_ACT_AS_SERVER) \
? stytn_space_left((_tn_)) \
: TN_INITIAL_ACTIVE_WINDOW_SIZE)
extern unsigned stytn_space_initial;
extern unsigned stytn_space_left (struct tn_connection *);
@@ -0,0 +1,273 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/solaris/attache.h,v 1.3 2003/01/15 14:00:27 josh Exp $ */
/*
* Copyright (C) 1999-2004 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 1994-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
*****************************************************************************/
/*
* $Log: attache.h,v $
* Revision 1.3 2003/01/15 14:00:27 josh
* directory structure shifting
*
* Revision 1.2 2001/11/07 15:58:29 tneale
* Updated for newest file layout
*
* Revision 1.1.1.1 2001/11/05 17:47:15 tneale
* Tornado shuffle
*
* Revision 1.11 2001/06/25 19:43:11 markadam
* Remove the gcc only inline code for MEMCMP. This forces the compiler to
* use the definition in glue.h, which aliases a call to etc_memcmp.
*
* Revision 1.10 2001/01/19 22:23:14 paul
* Update copyright.
*
* Revision 1.9 2000/11/16 21:29:39 paul
* Moved glue_set_deferred_io_handler to sockport.h.
*
* Revision 1.8 2000/10/16 19:21:47 paul
* Restore sockets and mempool code.
*
* Revision 1.7 2000/03/17 00:10:53 meister
* Update copyright message
*
* Revision 1.6 2000/03/15 19:30:35 paul
* Whoops, we actually needed one of those revs.
*
* Revision 1.5 2000/03/13 21:21:56 paul
* Removed some code that we are no longer working on.
*
* Revision 1.4 1999/11/03 19:26:41 paul
* Add attache/h/packet.h include for glue function with packet parameter
*
* Revision 1.3 1999/02/18 04:41:28 wes
* Sockets merge: Everything Else
* - memory pools
* - thread support
* - port-specific headers
*
* Revision 1.2.6.1 1998/10/22 21:09:57 wes
* Change glue_set_deferred_io_handler prototype; add it to other ports.
* (oops, missed this the other day).
*
* Revision 1.2 1998/07/29 20:54:46 wes
* First cut of the Solaris port.
* (DLPI support, termios, minor tweaks to libraries and port header files)
*
*/
/* [clearcase]
modification history
-------------------
*/
/* Previous revision history when this was snark/port/attache.h
*
* Revision 2.2 1996/10/16 16:49:55 sar
* Added ifndefs around the memory and string routines
* to keep compilers happy.
*
* Revision 2.1 1996/03/22 10:05:39 sra
* Update copyrights prior to Attache 3.2 release.
*
* Revision 2.0 1995/05/10 22:38:15 sra
* Attache release 3.0.
*
* Revision 1.6 1995/05/01 20:59:29 sra
* Have to test CONFIG_PREAMBLE with #ifdef, not #if.
*
* Revision 1.5 1995/01/06 00:52:48 sra
* Update copyright notice for 2.1 release.
*
* Revision 1.4 1994/12/20 22:13:46 sra
* Fix signature for crufty glue_pkt_handle() declaration.
*
* Revision 1.3 1994/09/04 23:55:50 sra
* Get rid of most of the ancient NO_PP cruft.
*
* Revision 1.2 1994/09/04 06:13:38 sra
* Clean up antique type names and install macros.
*
* Revision 1.1 1994/01/09 23:57:29 sra
* Add support for NIT under SunOS 4.1.2.
*
*/
#ifdef CONFIG_PREAMBLE
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <memory.h>
#include <malloc.h>
#define MAX_PACKETS 50
#define IP_MAX_PKTSIZE 1536
#define TCP_MAXCONN 128
#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
/*
* Fun with our new run-time debugging facility.
* This is still experimental, and defaults to uninstalled.
*/
#if defined(INSTALL_SNARK_BUG_CONF) && INSTALL_SNARK_BUG_CONF
#include <wrn/wm/demo/bug_conf.h>
#endif
/*
* Backwards compatability with old braindamage can be a real pain.
* Since this port file is strictly for debugging, we set a couple
* of configuration parameters to more reasonable values here.
*/
/* Please do install a retransmission timeout handler */
#define TCP_DEFAULT_MAX_RETRANSMISSIONS 0
/* Please buffer a reasonable number of ahead-of-sequence segments */
#define TCP_AHEAD_Q_MAX_DEFAULT 25
#else /* CONFIG_PREAMBLE */
#include <wrn/wm/common/install.h>
#include <wrn/wm/attache/packet.h>
#include <stdlib.h>
#include <stdio.h>
#ifdef htons
#undef htons
#endif
#ifdef htonl
#undef htonl
#endif
extern unsigned short htons (unsigned short);
extern unsigned long htonl (unsigned long);
#define GLUE_ALLOC(x) ((void *) malloc(x))
#define GLUE_FREE(x) free((char *) (x))
#define GLUE_CKSUM(x, y) glue_cksum((bits16_t *)(x), (y))
#define GLUE_SWAP16(x) ((bits16_t) htons((unsigned short) (x)))
#define GLUE_SWAP32(x) ((bits32_t) htonl((unsigned long) (x)))
#define GLUE_CALLIN(x, y) glue_callin(x, y)
extern int glue_intlock (int);
extern bits16_t glue_cksum (bits16_t *, unsigned);
extern void glue_callin (bits32_t, void (*)(void));
#ifndef GLUE_NOW
#define GLUE_NOW() glue_now()
extern bits32_t glue_now (void);
#endif
/* define the GLUE_SNTP_SET_TIME macro if using SNTP Client */
#if INSTALL_ATTACHE_MULTICAST && INSTALL_ATTACHE_SNTP_CLIENT
#ifndef GLUE_SNTP_SET_TIME
#define GLUE_SNTP_SET_TIME(p, s, f) glue_set_time((p),(s),(f))
extern void glue_set_time(packet *, bits32_t, bits32_t);
#endif
#endif
/* Define PRINTF for debugging and printing code
#ifndef PRINTF
#define PRINTF printf
#endif
*/
#ifdef ATTACHE_IPSEC_H
#define GLUE_IPSEC_SA_EXPIRED(W,X,Y,Z) \
glue_ipsec_sa_expired(W,X,Y,Z)
extern void glue_ipsec_sa_expired (ipsec_sa_dir_t, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_SND_PKT_DENIED(W,X,Y,Z) \
glue_ipsec_snd_pkt_denied((W),(X),(Y),(Z))
extern void glue_ipsec_snd_pkt_denied(packet *, ipaddr_t *, ipaddr_t *, int);
#define GLUE_IPSEC_RCV_PKT_BADSPI(V,W,X,Y,Z) \
glue_ipsec_rcv_pkt_badspi((V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_pkt_badspi(packet *, ipaddr_t *, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_PKT_NOTPARTY(V,W,X,Y,Z) \
glue_ipsec_rcv_pkt_notparty((V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_pkt_notparty(packet *, ipaddr_t *, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_TUNPKT_NOTIP(U,V,W,X,Y,Z) \
glue_ipsec_rcv_tunpkt_notip((U),(V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_tunpkt_notip(packet *, packet *, ipaddr_t *,
ipaddr_t *, bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_TUNPKT_NOTPARTY(S,T,U,V,W,X,Y,Z) \
glue_ipsec_rcv_tunpkt_notparty((S),(T),(U),(V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_tunpkt_notparty(packet *, ipaddr_t *, ipaddr_t *,
packet *, ipaddr_t *, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_SA_NOTUNNEL(V,W,X,Y,Z) \
glue_ipsec_rcv_sa_notunnel((V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_sa_notunnel(packet *, ipaddr_t *, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_PKT_BADAH(V,W,X,Y) \
glue_ipsec_rcv_pkt_badah((V),(W),(X),(Y))
extern void glue_ipsec_rcv_pkt_badah(packet *, ipaddr_t *, ipaddr_t *,
bits32_t);
#define GLUE_IPSEC_RCV_PKT_DENIED(V,W,X,Y,Z) \
glue_ipsec_rcv_pkt_denied((V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_pkt_denied(packet *, ipaddr_t *, ipaddr_t *,
ipsec_policy_flags_t, bits16_t);
#endif /* ATTACHE_IPSEC */
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,80 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/solaris/common.h,v 1.1.1.1 2001/11/05 17:47:15 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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:15 tneale
* Tornado shuffle
*
* Revision 1.5 2001/06/25 19:43:11 markadam
* Remove the gcc only inline code for MEMCMP. This forces the compiler to
* use the definition in glue.h, which aliases a call to etc_memcmp.
*
* Revision 1.4 2001/01/19 22:23:15 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:10:53 meister
* Update copyright message
*
* Revision 1.2 1998/07/29 20:54:47 wes
* First cut of the Solaris port.
* (DLPI support, termios, minor tweaks to libraries and port header files)
*
*
*/
/* [clearcase]
modification history
-------------------
*/
/*
* Common definitions for all Epilogue products on Solaris.
*/
#ifdef CONFIG_PREAMBLE
#include <string.h>
#include <memory.h>
/* things that should be in some system header file but don't seem to be */
extern int strncasecmp();
#ifndef STRICMP
#define STRICMP(x, y) strcasecmp(x, y)
#endif
#ifndef STRNICMP
#define STRNICMP(x, y, z) strncasecmp(x, y, z)
#endif
#else /* CONFIG_PREAMBLE */
#ifndef GLUE_NOW
#define GLUE_NOW() glue_now()
extern bits32_t glue_now (void);
#endif
#ifndef GLUE_SEED_PRNG
#define GLUE_SEED_PRNG(x,y) glue_seed_prng(x,y)
extern unsigned glue_seed_prng(bits8_t *, unsigned);
#endif
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,143 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/solaris/decorum.h,v 1.3 2003/01/15 14:00:27 josh Exp $ */
/*
* Copyright (C) 1999-2004 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 1996-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: decorum.h,v $
* Revision 1.3 2003/01/15 14:00:27 josh
* directory structure shifting
*
* Revision 1.2 2001/11/07 15:58:29 tneale
* Updated for newest file layout
*
* Revision 1.1.1.1 2001/11/05 17:47:15 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:23:15 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:10:53 meister
* Update copyright message
*
* Revision 1.2 1998/07/29 20:54:47 wes
* First cut of the Solaris port.
* (DLPI support, termios, minor tweaks to libraries and port header files)
*
*/
/* [clearcase]
modification history
-------------------
*/
#if (!defined(decorum_inc))
#define decorum_inc
#include <wrn/wm/common/types.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <malloc.h>
#ifndef DECORUM_ALLOC
#define DECORUM_ALLOC(x) ((void *) malloc(x))
#endif
#ifndef DECORUM_FREE
#define DECORUM_FREE(x) (free((char *) (x)))
#endif
/* This first should be the same as SNMP_MAX_PACKET_SIZE in envoy.h */
#define DECORUM_MAX_PACKET_SIZE (1400)
#define DECORUM_DEFAULT_RECEIVE_BUFLEN (512)
/* needed for OIDC_T definition */
#if INSTALL_DECORUM_PROXY && (!defined(asn1conf_inc))
#include <wrn/wm/snmp/engine/asn1conf.h>
#endif
/* Some input routines, these are provided but may be replaced with
more efficient implentations if desired */
extern sbits16_t decorum_parse_sbits32 (epilogue_char_t *,
epilogue_char_t **,
sbits32_t *);
extern sbits16_t decorum_parse_bits32 (epilogue_char_t *,
epilogue_char_t **,
bits32_t *);
extern sbits16_t decorum_parse_hexstring (epilogue_char_t *,
epilogue_char_t *,
decorum_size_t);
#define ETC_STRING_GET_SBITS32 decorum_parse_sbits32
#define ETC_STRING_GET_BITS32 decorum_parse_bits32
#define ETC_STRING_GET_HEXSTRING decorum_parse_hexstring
/* a routine to output a number to a byte string, used to create
file/stream names */
#define ETC_STDIO_SPRINTF(buf, num, str) sprintf(buf, "%lu%s", num, str)
/* Define the structure that will be used for holding output
until we are done */
typedef FILE etc_stdio_t;
/* Macros for opening, closing and removing a stream */
#define ETC_STDIO_MODE_READ "r"
#define ETC_STDIO_MODE_WRITE "w+"
#define ETC_STDIO_OPEN(fname, how) fopen(fname, how)
#define ETC_STDIO_CLOSE(outstream) fclose(outstream)
#define ETC_STDIO_REMOVE(fname) unlink(fname)
#define ETC_STDIO_READ(instream, size, buf) \
fread((buf), 1, (size), (instream))
#define ETC_STDIO_WRITE(outstream, size, buf) \
fwrite((buf), 1, (size), (outstream))
extern bits32_t file_size_32(char * fname);
#define ETC_STDIO_SIZE(fname) (file_size_32(fname))
/* Define the base output routines */
extern sbits16_t decorum_put_string (etc_stdio_t *, epilogue_char_t *,
decorum_size_t);
extern sbits16_t decorum_put_sbits32 (etc_stdio_t *, sbits32_t);
extern sbits16_t decorum_put_bits32 (etc_stdio_t *, bits32_t);
extern sbits16_t decorum_put_hex_string (etc_stdio_t *, bits8_t *,
decorum_size_t);
#define ETC_STDIO_PUT_STRING decorum_put_string
#define ETC_STDIO_PUT_SBITS32 decorum_put_sbits32
#define ETC_STDIO_PUT_BITS32 decorum_put_bits32
#define ETC_STDIO_PUT_HEX_STRING decorum_put_hex_string
#if INSTALL_DECORUM_PROXY
/* Define a more complex output routine, this may use the
base routines (as the example code does) or may be more direct */
extern sbits16_t decorum_put_oid (etc_stdio_t *, OIDC_T *, decorum_size_t);
#define ETC_STDIO_PUT_OID decorum_put_oid
#endif /* INSTALL_DECORUM_PROXY */
/* Define a string comparison routine */
#define ETC_STRING_STRCASECMP strcasecmp
extern int strcasecmp();
/* Define a string length routine */
#define ETC_STRING_STRLEN strlen
/* Define a routine that gets the current time. */
#define DECORUM_GET_RAWTIME(timeval_p) unix_glue_getime ((timeval_p));
/* Define a routine that figgers out how big a buffer to use for a chunk
* of outgoing data. */
#define DECORUM_SENDBUF_LEN(http_sb) (512)
#endif /* #if (!defined(decorum_inc)) */
@@ -0,0 +1,77 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/solaris/emissary.h,v 1.1.1.1 2001/11/05 17:47:15 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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 1992-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: emissary.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:15 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:23:15 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:10:53 meister
* Update copyright message
*
* Revision 1.2 1998/07/29 20:54:47 wes
* First cut of the Solaris port.
* (DLPI support, termios, minor tweaks to libraries and port header files)
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/file.h>
#include <stddef.h>
#include <stdio.h>
#include <ctype.h>
#include <memory.h>
#include <malloc.h>
#include <string.h>
#include <time.h>
#include <errno.h>
#include <assert.h>
#include <limits.h>
/*
* The following declarations shouldn't be necessary, particularly the ones
* that are stdio internal functions, but GCC whines without them. Should
* be harmless in any case.
*/
extern char *getenv (const char *);
extern int _filbuf (FILE *);
extern int _flsbuf (unsigned int, FILE *);
extern int fclose (FILE *);
extern int fprintf (FILE *, const char *, ...);
extern int fputs (const char *, FILE *);
extern int fseek (FILE *, long int, int);
extern int tolower (int);
extern int ungetc (int, FILE *);
extern long time (long *);
extern size_t fwrite (const void *,size_t,size_t,FILE *);
extern void perror (const char *);
@@ -0,0 +1,150 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/solaris/envoy.h,v 1.2 2001/11/07 16:55:52 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: envoy.h,v $
* Revision 1.2 2001/11/07 16:55:52 tneale
* Added path to target/h
*
* Revision 1.1.1.1 2001/11/05 17:47:15 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:23:15 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:10:53 meister
* Update copyright message
*
* Revision 1.2 1998/07/29 20:54:48 wes
* First cut of the Solaris port.
* (DLPI support, termios, minor tweaks to libraries and port header files)
*
*/
/* [clearcase]
modification history
-------------------
*/
/* previous revision history when this was envoy/port/sunos/envoy.h
* with rev and copyright updates removed
*
* Revision 6.5 1996/02/27 00:03:03 sar
* Updated partytime to be usectime
*
* Revision 6.4 1995/11/14 22:37:59 sar
* If proxy is installed release_private is proxy_release_private
*
* Revision 6.3 1995/11/10 23:59:08 sar
* stopped using the pre & post set user exits for the nvview stuff
*
* Revision 6.2 1995/11/06 20:05:22 sar
* Removed validate_community's dependency on install v1
* removed validate_address & validate_vesion
*
* Revision 6.1 1995/10/20 23:15:55 sar
* removed party, context and acl macros
*
* Revision 5.6 1995/05/22 19:39:24 sar
* Modified the lock code to add some new macros.
*
* Revision 5.5 1995/05/02 23:39:31 sar
* Added the envoy timer macros.
*
* Revision 5.4 1995/05/01 21:58:15 sar
* Put the example lock macros in an ifdef block
*
* Revision 5.3 1995/05/01 20:59:29 sra
* Have to test CONFIG_PPREAMBLE with #ifdef, not #if.
*
* Revision 5.2 1994/11/01 17:59:04 sar
* *_add_mod routines now take a flag as well as an data block.
*
* Revision 5.1 1994/09/29 20:39:39 sar
* added macros for a simple locking scheme to test the compiliation of
* our code
* Modified the macros for use with the non volatile storage stuff to
* use the new (as of fall 94) scheme.
*
* Revision 4.3 1994/05/12 17:24:05 sar
* moved the include for nvutils.h to make it available for everybody
* that needs it.
*
* Revision 4.2 1994/05/10 20:21:45 sar
* moved view defines aroudn so they are available in other than v2 settings.
*
* Revision 4.1 1994/05/09 21:06:41 sar
* Added define for SNMP_RESETSYSUPTIME to be nothing.
*
*/
/*****************************************************************
This is the platform specific part of envoy.h for use with the
example code. It contains only the platform specific pieces of
the port code. The common porting code is in generic/envoy.h.
In general customers will have one envoy.h file per platform
that combines this file and the platform specific information,
we use two files as there is a lot of shared code between our
demos.
*****************************************************************/
#ifdef CONFIG_PREAMBLE
/*****************************************************************
System Includes:
Envoy uses memcpy(), memset(), and strlen(). The appropriate
include file should be put here to see that these routines are
properly declared. If no such include file exists on the system
then declare memcpy() and memset() here directly. Envoy also
uses min() and max(). Include the system's definition or use the
macros supplied below.
*****************************************************************/
#include <memory.h>
#include <string.h>
/*****************************************************************
Memory allocation routines. Envoy needs to allocate memory to
decode the packet into and also to store the response data
Make sure that the routines used by the SNMP_memory_alloc() and
SNMP_memory_free() macros are declared. If system memory routines
are used (e.g. malloc() and free()) then include the appropriate
system header file here.
*****************************************************************/
/* Get malloc and free declarations */
#include <stdlib.h>
#define SNMP_memory_alloc(need) malloc(need)
#define SNMP_memory_free(buf) free(buf)
#include <wrn/wm/util/port/generic/envoy.h>
#else /* config preamble */
#include <wrn/wm/util/port/generic/envoy.h>
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,46 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/solaris/liaison.h,v 1.1.1.1 2001/11/05 17:47:15 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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 1996-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: liaison.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:15 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:23:15 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:10:53 meister
* Update copyright message
*
* Revision 1.2 1998/07/29 20:54:49 wes
* First cut of the Solaris port.
* (DLPI support, termios, minor tweaks to libraries and port header files)
*
*/
/* [clearcase]
modification history
-------------------
*/
#if (!defined(liaison_inc))
#define liaison_inc
#endif /* #if (!defined(liaison_inc)) */
@@ -0,0 +1,57 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/solaris/oemtypes.h,v 1.1.1.1 2001/11/05 17:47:15 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: oemtypes.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:15 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:23:16 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:10:54 meister
* Update copyright message
*
* Revision 1.2 1998/07/29 20:54:49 wes
* First cut of the Solaris port.
* (DLPI support, termios, minor tweaks to libraries and port header files)
*
*/
/* [clearcase]
modification history
-------------------
*/
/* get the size_t construct */
#include <sys/types.h>
#if 0
/* The sun compiler doesn't understand the `signed' keyword */
#define __TYPES_HAVE_sbits8_t_ 1
typedef char sbits8_t; /* signed 8 bits */
#define __TYPES_HAVE_sbits16_t_ 1
typedef short sbits16_t; /* signed 16 bits */
#define __TYPES_HAVE_sbits32_t_ 1
typedef long sbits32_t; /* signed 32 bits */
#endif
#define __TYPES_HAVE_boolean_t_ 1
@@ -0,0 +1,97 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/solaris/snark.h,v 1.1.1.1 2001/11/05 17:47:15 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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 1994-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: snark.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:15 tneale
* Tornado shuffle
*
* Revision 1.5 2001/01/19 22:23:16 paul
* Update copyright.
*
* Revision 1.4 2000/03/17 00:10:54 meister
* Update copyright message
*
* Revision 1.3 1999/05/21 16:45:25 sra
* vsnprintf() => VSNPRINTF().
*
* Revision 1.2 1998/07/29 20:54:50 wes
* First cut of the Solaris port.
* (DLPI support, termios, minor tweaks to libraries and port header files)
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <memory.h>
#include <malloc.h>
#define SNARK_ATTACHE_MAXLNH 20
#ifndef GLUE_ALLOC
#define GLUE_ALLOC(x) ((void *) malloc(x))
#endif
#ifndef GLUE_FREE
#define GLUE_FREE(x) free((char *) (x))
#endif
#ifndef MEMCPY
#define MEMCPY(x, y, z) memcpy(x, y, z)
#endif
#ifndef MEMCMP
#define MEMCMP(x, y, z) memcmp(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 STRNICMP
#define STRNICMP(x, y, z) strncasecmp(x, y, z)
#endif
#ifndef STRICMP
#define STRICMP(x, y) strcasecmp(x, y)
#endif
#define stricmp STRICMP
#define strnicmp STRNICMP
@@ -0,0 +1,51 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/solaris/snmptalk.h,v 1.1.1.1 2001/11/05 17:47:15 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: snmptalk.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:15 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:23:16 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:10:54 meister
* Update copyright message
*
* Revision 1.2 1998/07/29 20:54:50 wes
* First cut of the Solaris port.
* (DLPI support, termios, minor tweaks to libraries and port header files)
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <stdlib.h>
#include <strings.h>
/* defines for nvutils for file manipulation */
#define SNMP_READONLY "r"
#define SNMP_READPLUS "r+"
#define SNMP_WRITEPLUS "w+"
#define SNMP_REMOVE_FILE(fname) unlink(fname)
@@ -0,0 +1,134 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/solaris/sockport.h,v 1.1.1.1 2001/11/05 17:47:16 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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-1999 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: sockport.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:16 tneale
* Tornado shuffle
*
* Revision 1.12 2001/05/29 19:13:51 masashi
* Include errno.h if needed.
*
* Revision 1.11 2001/05/17 19:10:32 paul
* Added SOCKTABLE_MIN_FD.
*
* Revision 1.10 2001/01/19 22:23:16 paul
* Update copyright.
*
* Revision 1.9 2000/11/16 21:30:05 paul
* Moved glue_set_deferred_io_handler from attache.h.
* Removed stuff that is now defaulted in attache/sockets/sockintl.h.
*
* Revision 1.8 2000/10/16 19:21:47 paul
* Restore sockets and mempool code.
*
* Revision 1.6 2000/03/17 00:10:54 meister
* Update copyright message
*
* Revision 1.5 1999/05/14 20:31:20 paul
* Moved send[to]/recv[from] wrappers from sockets.c to socktop.c. Now
* the mainline sockets code only has entry points for sendmsg/recvmsg.
*
* Revision 1.4 1999/05/12 19:03:18 paul
* Added socktable_iterate.
*
* Revision 1.3 1999/03/04 17:08:35 paul
* added sockets_shutdown, socktable_dump
*
* Revision 1.2 1999/02/18 04:41:29 wes
* Sockets merge: Everything Else
* - memory pools
* - thread support
* - port-specific headers
*
* Revision 1.1.4.8 1999/02/05 20:17:45 paul
* Changed DEFAULT_* to SOCK_DFLT_*, moved fallback definitions to sockintl.h.
* Changed SETERROR to SOCK_SET_ERRNO to reduce possibility of name
* collision with customer code.
*
* Revision 1.1.4.7 1999/02/05 18:34:18 paul
* Updated to match the bsd44 version.
*
*/
/* [clearcase]
modification history
-------------------
*/
#ifndef _SOCKPORT_H
#define _SOCKPORT_H
#if !INSTALL_ATTACHE_SOCKETS_DEFINE_ERRORS
#include <errno.h>
#endif
extern int errno; /* needs to be per-thread/per-task */
#define SOCK_SET_ERRNO(x) (errno = (x))
void glue_set_deferred_io_handler (void (*first)(void), void (*handler)(void));
#define GLUE_SET_DEFERRED_IO_HANDLER(x,y) glue_set_deferred_io_handler(x,y)
/* Other things you can set here:
*
* If you are using the built-in socket table code:
* SOCKTABLE_MIN_FD
* SOCKTABLE_MAX_FDS
* SOCKTABLE_HASH_BUCKETS
*
* If you are supplying your own socket table code:
* SOCKTABLE_INIT
* SOCKTABLE_LOOKUP
* SOCKTABLE_ADD
* SOCKTABLE_DEL
* SOCKTABLE_ITERATE
* SOCKTABLE_DUMP
*
* If you want to insert your own system-call type interface between
* the user socket library and the real sockets code:
* SOCK_SOCKETS_INIT
* SOCK_SOCKETS_SHUTDOWN
* SOCK_SOCKET
* SOCK_BIND
* SOCK_LISTEN
* SOCK_ACCEPT
* SOCK_CONNECT
* SOCK_GETSOCKNAME
* SOCK_GETPEERNAME
* SOCK_SHUTDOWN
* SOCK_CLOSE
* SOCK_SENDMSG
* SOCK_RECVMSG
* SOCK_SELECT
* SOCK_SETSOCKOPT
* SOCK_GETSOCKOPT
* SOCK_IOCTL
*
* Default parameters for sending and receiving:
* SOCK_DFLT_UDP_SNDBUF
* SOCK_DFLT_TCP_SNDBUF
* SOCK_DFLT_RAW_SNDBUF
* SOCK_DFLT_UDP_RCVBUF
* SOCK_DFLT_TCP_RCVBUF
* SOCK_DFLT_RAW_RCVBUF
* SOCK_DFLT_SNDLOWAT
* SOCK_DFLT_RCVLOWAT
*/
#endif /* _SOCKPORT_H */
@@ -0,0 +1,66 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/solaris/telnet.h,v 1.1.1.1 2001/11/05 17:47:16 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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 1994-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: telnet.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:16 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:23:16 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:10:54 meister
* Update copyright message
*
* Revision 1.2 1998/07/29 20:54:50 wes
* First cut of the Solaris port.
* (DLPI support, termios, minor tweaks to libraries and port header files)
*
*
*/
/* [clearcase]
modification history
-------------------
*/
/*
* Use '\n' for local newline convention in both directions.
*/
#define TN_LOCAL_NEWLINE '\n'
/*
* All the windowing stuff for server telnet connections is controlled
* by the sty code, so shunt the decisions off to the sty_tn interface module.
*
* For client telnet connections we're not buffering output, so we just
* return a constant window size.
*/
#define TN_INITIAL_ACTIVE_WINDOW_SIZE (4096)
#define TN_INITIAL_PASSIVE_WINDOW_SIZE (stytn_space_initial)
#define GLUE_TN_WINDOW_SIZE(_tn_) \
(tn_get_flags((_tn_), TN_FLG_ACT_AS_SERVER) \
? stytn_space_left((_tn_)) \
: TN_INITIAL_ACTIVE_WINDOW_SIZE)
extern unsigned stytn_space_initial, stytn_space_left();
@@ -0,0 +1,86 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/solaris/thdport.h,v 1.1.1.1 2001/11/05 17:47:16 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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-1999 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: thdport.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:16 tneale
* Tornado shuffle
*
* Revision 1.9 2001/06/12 08:06:21 paul
* Removed errchk() wrappers - install THREAD_DEBUG if you want debugging.
*
* Revision 1.8 2001/03/22 16:54:17 paul
* Removed GLUE_COND_TIMEDWAIT().
*
* Revision 1.7 2001/03/20 17:11:16 paul
* Removed unused timeout macros.
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <pthread.h>
/* !!! checking return codes here? */
#define GLUE_MUTEX_PRIO_MAX 100
#define GLUE_MUTEX_PRIO_HIGH 80
#define GLUE_MUTEX_PRIO_MID 40
#define GLUE_MUTEX_PRIO_LOW 20
#define GLUE_MUTEX_PRIO_MIN 10
typedef pthread_mutex_t glue_mutex_t;
typedef pthread_cond_t glue_cond_t;
typedef pthread_t glue_thread_t;
#define GLUE_MUTEX_INIT(lock, prio) pthread_mutex_init(lock, NULL)
#define GLUE_MUTEX_INIT_MAGIC(lock) pthread_mutex_init(lock, NULL)
#define GLUE_MUTEX_LOCK(lock, prio) pthread_mutex_lock(lock)
#define GLUE_MUTEX_UNLOCK(lock, prio) pthread_mutex_unlock(lock)
#define GLUE_MUTEX_TRYLOCK(lock, prio) pthread_mutex_trylock(lock)
#define GLUE_MUTEX_DESTROY(lock) pthread_mutex_destroy(lock)
#define GLUE_COND_INIT(cond, mutex) pthread_cond_init(cond, NULL)
#define GLUE_COND_WAIT(cond, mutex) pthread_cond_wait(cond, mutex)
#define GLUE_COND_WAKEUP(cond, mutex) pthread_cond_signal(cond)
#define GLUE_COND_BROADCAST(cond, mutex) pthread_cond_broadcast(cond)
#define GLUE_COND_DESTROY(cond) pthread_cond_destroy(cond)
#define GLUE_THD_SELF() pthread_self()
#define GLUE_THD_YIELD() sched_yield()
#define GLUE_THD_CREATE(thread, func, arg) pthread_create(thread, NULL, func, arg)
#define GLUE_THD_WAIT(thread) pthread_join(thread, NULL)
#define GLUE_THD_EXIT() pthread_exit(NULL)
/* pthread_init() doesn't exist on solaris.. */
#define GLUE_THREAD_INIT()
pthread_key_t debug_state_key;
#define GLUE_THD_COOKIE_INIT(freertn) pthread_key_create (&debug_state_key, freertn);
#define GLUE_THD_COOKIE_GET(y) *(y) = pthread_getspecific(debug_state_key)
#define GLUE_THD_COOKIE_SET(x) pthread_setspecific(debug_state_key, x)
@@ -0,0 +1,330 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/sunos/attache.h,v 1.3 2003/01/15 14:00:28 josh Exp $ */
/*
* Copyright (C) 1999-2004 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 1994-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
*****************************************************************************/
/*
* $Log: attache.h,v $
* Revision 1.3 2003/01/15 14:00:28 josh
* directory structure shifting
*
* Revision 1.2 2002/02/26 18:22:54 josh
* updating paths in port files
*
* Revision 1.1.1.1 2001/11/05 17:47:16 tneale
* Tornado shuffle
*
* Revision 1.15 2001/01/19 22:23:17 paul
* Update copyright.
*
* Revision 1.14 2000/03/17 00:10:59 meister
* Update copyright message
*
* Revision 1.13 2000/03/15 19:52:54 paul
* Add attache/h/packet.h include for glue function with packet parameter
*
* Revision 1.12 1998/03/12 18:23:44 meister
* GLUE_IPSEC_RCV_SA_NOTUNNEL()
*
* Revision 1.11 1998/03/11 21:10:04 meister
* Added some parameters to IPSEC glue macros
*
* Revision 1.10 1998/03/11 20:20:49 mrf
* Comment out PRINTF declaration (again)
*
* Revision 1.9 1998/03/03 20:36:43 mrf
* Change GLUE_SNTP_SET_TIME macro to pass packet pointer
*
* Revision 1.8 1998/03/03 15:26:16 mrf
* Comment out PRINTF declarations.
*
* Revision 1.7 1998/02/27 23:38:12 meister
* Add stdio.h
*
* Revision 1.6 1998/02/27 22:30:36 meister
* Added ipsec glue functions
*
* Revision 1.5 1998/02/25 04:57:07 sra
* Update copyrights.
*
* Revision 1.4 1998/02/18 22:34:59 sra
* Add ip_loopback(), eradicate glue_pkt_handle().
*
* Revision 1.3 1998/02/16 17:43:08 mrf
* Add prototype for glue_set_time()
*
* Revision 1.2 1998/02/13 17:49:37 mrf
* Add conditionalized SNTP set-time macro.
*
* Revision 1.1 1997/09/15 15:48:28 sra
* GLUE_NOW() migration version skew.
*
* Revision 1.0 1997/08/08 22:11:22 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.9 1997/05/01 23:11:55 sra
* Work around broken SunOS memcmp().
*
* Revision 0.8 1997/03/20 06:57:51 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.7 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.6 1997/02/25 07:59:40 sra
* Comment out glue_pkt_handle(), we don't need it anymore.
*
* Revision 0.5 1997/02/24 00:56:59 sra
* Support for run-time configuration of BUG() macros.
*
* Revision 0.4 1997/01/17 23:11:38 sra
* Fiddle configuration parameters to make this configuration a little
* more suitable for performance testing.
*
* Revision 0.3 1996/10/30 18:28:52 sra
* The curse of htonx() strikes again.
*
* Revision 0.2 1996/10/30 04:54:49 sra
* Move glue stuff down to postamble section.
*
* Revision 0.1 1996/10/23 00:14:56 sar
* *** empty log message ***
*
*/
/* [clearcase]
modification history
-------------------
*/
/* Previous revision history when this was snark/port/attache.h
*
* Revision 2.2 1996/10/16 16:49:55 sar
* Added ifndefs around the memory and string routines
* to keep compilers happy.
*
* Revision 2.1 1996/03/22 10:05:39 sra
* Update copyrights prior to Attache 3.2 release.
*
* Revision 2.0 1995/05/10 22:38:15 sra
* Attache release 3.0.
*
* Revision 1.6 1995/05/01 20:59:29 sra
* Have to test CONFIG_PREAMBLE with #ifdef, not #if.
*
* Revision 1.5 1995/01/06 00:52:48 sra
* Update copyright notice for 2.1 release.
*
* Revision 1.4 1994/12/20 22:13:46 sra
* Fix signature for crufty glue_pkt_handle() declaration.
*
* Revision 1.3 1994/09/04 23:55:50 sra
* Get rid of most of the ancient NO_PP cruft.
*
* Revision 1.2 1994/09/04 06:13:38 sra
* Clean up antique type names and install macros.
*
* Revision 1.1 1994/01/09 23:57:29 sra
* Add support for NIT under SunOS 4.1.2.
*
*/
#ifdef CONFIG_PREAMBLE
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <memory.h>
#include <malloc.h>
#define MAX_PACKETS 50
#define IP_MAX_PKTSIZE 1536
#define TCP_MAXCONN 128
#ifndef MEMCPY
#define MEMCPY(x, y, z) memcpy(x, y, z)
#endif
/*
* SunOS 4.1.4's memcmp() does signed character comparision, so replace it.
* This inline code will only work with gcc, but this particular port file
* is only used for testing and demos anyway, so what the heck.
*/
#ifndef MEMCMP
#define MEMCMP(x, y, z) \
({ \
register unsigned char *_x_ = (void *) (x), *_y_ = (void *) (y); \
register unsigned _z_ = (z); \
int _r_ = 0; \
while (_z_-- > 0) \
if ((_r_ = (*_x_++) - (*_y_++)) != 0) \
break; \
_r_; \
})
#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
/*
* Fun with our new run-time debugging facility.
* This is still experimental, and defaults to uninstalled.
*/
#if defined(INSTALL_SNARK_BUG_CONF) && INSTALL_SNARK_BUG_CONF
#include <wrn/wm/demo/bug_conf.h>
#endif
/*
* Backwards compatability with old braindamage can be a real pain.
* Since this port file is strictly for debugging, we set a couple
* of configuration parameters to more reasonable values here.
*/
/* Please do install a retransmission timeout handler */
#define TCP_DEFAULT_MAX_RETRANSMISSIONS 0
/* Please buffer a reasonable number of ahead-of-sequence segments */
#define TCP_AHEAD_Q_MAX_DEFAULT 25
#else /* CONFIG_PREAMBLE */
#include <wrn/wm/common/install.h>
#include <wrn/wm/attache/packet.h>
#include <stdlib.h>
#include <stdio.h>
#ifdef htons
#undef htons
#endif
#ifdef htonl
#undef htonl
#endif
extern unsigned short htons (unsigned short);
extern unsigned long htonl (unsigned long);
#define GLUE_ALLOC(x) ((void *) malloc(x))
#define GLUE_FREE(x) free((char *) (x))
#define GLUE_CKSUM(x, y) glue_cksum((bits16_t *)(x), (y))
#define GLUE_SWAP16(x) ((bits16_t) htons((unsigned short) (x)))
#define GLUE_SWAP32(x) ((bits32_t) htonl((unsigned long) (x)))
#define GLUE_CALLIN(x, y) glue_callin(x, y)
extern int glue_intlock (int);
extern bits16_t glue_cksum (bits16_t *, unsigned);
extern void glue_callin (bits32_t, void (*)(void));
#ifndef GLUE_NOW
#define GLUE_NOW() glue_now()
extern bits32_t glue_now (void);
#endif
/* define the GLUE_SNTP_SET_TIME macro if using SNTP Client */
#if INSTALL_ATTACHE_MULTICAST && INSTALL_ATTACHE_SNTP_CLIENT
#ifndef GLUE_SNTP_SET_TIME
#define GLUE_SNTP_SET_TIME(p, s, f) glue_set_time((p),(s),(f))
extern void glue_set_time(packet *, bits32_t, bits32_t);
#endif
#endif
/* Define PRINTF for debugging and printing code
#ifndef PRINTF
#define PRINTF printf
#endif
*/
#ifdef ATTACHE_IPSEC_H
#define GLUE_IPSEC_SA_EXPIRED(W,X,Y,Z) \
glue_ipsec_sa_expired(W,X,Y,Z)
extern void glue_ipsec_sa_expired (ipsec_sa_dir_t, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_SND_PKT_DENIED(W,X,Y,Z) \
glue_ipsec_snd_pkt_denied((W),(X),(Y),(Z))
extern void glue_ipsec_snd_pkt_denied(packet *, ipaddr_t *, ipaddr_t *, int);
#define GLUE_IPSEC_RCV_PKT_BADSPI(V,W,X,Y,Z) \
glue_ipsec_rcv_pkt_badspi((V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_pkt_badspi(packet *, ipaddr_t *, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_PKT_NOTPARTY(V,W,X,Y,Z) \
glue_ipsec_rcv_pkt_notparty((V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_pkt_notparty(packet *, ipaddr_t *, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_TUNPKT_NOTIP(U,V,W,X,Y,Z) \
glue_ipsec_rcv_tunpkt_notip((U),(V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_tunpkt_notip(packet *, packet *, ipaddr_t *,
ipaddr_t *, bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_TUNPKT_NOTPARTY(S,T,U,V,W,X,Y,Z) \
glue_ipsec_rcv_tunpkt_notparty((S),(T),(U),(V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_tunpkt_notparty(packet *, ipaddr_t *, ipaddr_t *,
packet *, ipaddr_t *, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_SA_NOTUNNEL(V,W,X,Y,Z) \
glue_ipsec_rcv_sa_notunnel((V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_sa_notunnel(packet *, ipaddr_t *, ipaddr_t *,
bits32_t, bits8_t);
#define GLUE_IPSEC_RCV_PKT_BADAH(V,W,X,Y) \
glue_ipsec_rcv_pkt_badah((V),(W),(X),(Y))
extern void glue_ipsec_rcv_pkt_badah(packet *, ipaddr_t *, ipaddr_t *,
bits32_t);
#define GLUE_IPSEC_RCV_PKT_DENIED(V,W,X,Y,Z) \
glue_ipsec_rcv_pkt_denied((V),(W),(X),(Y),(Z))
extern void glue_ipsec_rcv_pkt_denied(packet *, ipaddr_t *, ipaddr_t *,
ipsec_policy_flags_t, bits16_t);
#endif /* ATTACHE_IPSEC */
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,107 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/sunos/common.h,v 1.1.1.1 2001/11/05 17:47:16 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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:16 tneale
* Tornado shuffle
*
* Revision 1.7 2001/01/19 22:23:17 paul
* Update copyright.
*
* Revision 1.6 2000/03/17 00:11:00 meister
* Update copyright message
*
* Revision 1.5 1998/06/19 19:28:46 sar
* added a memcmp macro to deal with the fact that the sunos memcmp
* uses signed comparisons. This is the macro from attache.h, it is
* added here so other products can use it.
*
* Revision 1.4 1998/06/10 16:39:04 sar
* Added the memory.h include file
*
* Revision 1.3 1998/02/25 04:57:07 sra
* Update copyrights.
*
* Revision 1.2 1997/08/22 16:30:45 sra
* Flesh out SunOS-specific stuff.
*
* Revision 1.1 1997/08/21 17:23:47 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
-------------------
*/
/*
* Common definitions for all Epilogue products on 4.4-BSD derived systems.
*/
#ifdef CONFIG_PREAMBLE
#include <string.h>
#include <memory.h>
/* things that should be in some system header file but don't seem to be */
extern int strncasecmp();
#ifndef STRICMP
#define STRICMP(x, y) strcasecmp(x, y)
#endif
#ifndef STRNICMP
#define STRNICMP(x, y, z) strncasecmp(x, y, z)
#endif
/*
* SunOS 4.1.4's memcmp() does signed character comparision, so replace it.
* This inline code will only work with gcc, but this particular port file
* is only used for testing and demos anyway, so what the heck.
*/
#ifndef MEMCMP
#define MEMCMP(x, y, z) \
({ \
register unsigned char *_x_ = (void *) (x), *_y_ = (void *) (y); \
register unsigned _z_ = (z); \
int _r_ = 0; \
while (_z_-- > 0) \
if ((_r_ = (*_x_++) - (*_y_++)) != 0) \
break; \
_r_; \
})
#endif
#else /* CONFIG_PREAMBLE */
#ifndef GLUE_NOW
#define GLUE_NOW() glue_now()
extern bits32_t glue_now (void);
#endif
#ifndef GLUE_SEED_PRNG
#define GLUE_SEED_PRNG(x,y) glue_seed_prng(x,y)
extern unsigned glue_seed_prng(bits8_t *, unsigned);
#endif
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,190 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/sunos/decorum.h,v 1.3 2003/01/15 14:00:28 josh Exp $ */
/*
* Copyright (C) 1999-2004 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 1996-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: decorum.h,v $
* Revision 1.3 2003/01/15 14:00:28 josh
* directory structure shifting
*
* Revision 1.2 2002/02/26 18:22:55 josh
* updating paths in port files
*
* Revision 1.1.1.1 2001/11/05 17:47:16 tneale
* Tornado shuffle
*
* Revision 2.5 2001/01/19 22:23:17 paul
* Update copyright.
*
* Revision 2.4 2000/03/17 00:11:00 meister
* Update copyright message
*
* Revision 2.3 1998/02/25 04:57:08 sra
* Update copyrights.
*
* Revision 2.2 1998/02/16 21:33:44 josh
* decorum port file now uses epilogue_char_t where appropriate
*
* Revision 2.1 1997/09/17 18:37:41 josh
* include malloc.h so malloc() and free() will be defined
*
* Revision 2.0 1997/09/11 15:08:18 josh
* updating version numbers for release
*
* Revision 1.2 1997/09/08 14:55:05 josh
* a few constants that were left out...
*
* Revision 1.1 1997/08/11 18:50:28 josh
* added ETC_STDIO_WRITE
*
* Revision 1.0 1997/08/08 22:11:22 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.9 1997/07/18 20:56:41 josh
* modifications for the recently adapted HTTPD. Nothing big,
* just added a couple of macros and changed <strings.h> to
* <string.h>
*
* Revision 0.8 1997/05/17 23:08:52 sra
* Clean up some SunOS/gcc warnings.
*
* Revision 0.7 1997/03/20 06:57:52 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.6 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.5 1996/10/29 23:02:34 sar
* added some includes to keep compilers happy
*
* Revision 0.4 1996/10/28 17:49:14 sar
* added use of decorum_size_t
*
* Revision 0.3 1996/10/27 16:54:09 lowell
* ETC_STDIO_SIZE
*
* Revision 0.2 1996/10/26 23:22:27 lowell
* DECORUM_SENDBUF_LEN and ETC_STDIO_READ
*
* Revision 0.1 1996/10/23 00:14:56 sar
* *** empty log message ***
*
*/
/* [clearcase]
modification history
-------------------
*/
#if (!defined(decorum_inc))
#define decorum_inc
#include <wrn/wm/common/types.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <malloc.h>
#ifndef DECORUM_ALLOC
#define DECORUM_ALLOC(x) ((void *) malloc(x))
#endif
#ifndef DECORUM_FREE
#define DECORUM_FREE(x) (free((char *) (x)))
#endif
/* This first should be the same as SNMP_MAX_PACKET_SIZE in envoy.h */
#define DECORUM_MAX_PACKET_SIZE (1400)
#define DECORUM_DEFAULT_RECEIVE_BUFLEN (512)
/* needed for OIDC_T definition */
#if INSTALL_DECORUM_PROXY && (!defined(asn1conf_inc))
#include <wrn/wm/snmp/engine/asn1conf.h>
#endif
/* Some input routines, these are provided but may be replaced with
more efficient implentations if desired */
extern sbits16_t decorum_parse_sbits32 (epilogue_char_t *,
epilogue_char_t **,
sbits32_t *);
extern sbits16_t decorum_parse_bits32 (epilogue_char_t *,
epilogue_char_t **,
bits32_t *);
extern sbits16_t decorum_parse_hexstring (epilogue_char_t *,
epilogue_char_t *,
decorum_size_t);
#define ETC_STRING_GET_SBITS32 decorum_parse_sbits32
#define ETC_STRING_GET_BITS32 decorum_parse_bits32
#define ETC_STRING_GET_HEXSTRING decorum_parse_hexstring
/* a routine to output a number to a byte string, used to create
file/stream names */
#define ETC_STDIO_SPRINTF(buf, num, str) sprintf(buf, "%lu%s", num, str)
/* Define the structure that will be used for holding output
until we are done */
typedef FILE etc_stdio_t;
/* Macros for opening, closing and removing a stream */
#define ETC_STDIO_MODE_READ "r"
#define ETC_STDIO_MODE_WRITE "w+"
#define ETC_STDIO_OPEN(fname, how) fopen(fname, how)
#define ETC_STDIO_CLOSE(outstream) fclose(outstream)
#define ETC_STDIO_REMOVE(fname) unlink(fname)
#define ETC_STDIO_READ(instream, size, buf) \
fread((buf), 1, (size), (instream))
#define ETC_STDIO_WRITE(outstream, size, buf) \
fwrite((buf), 1, (size), (outstream))
extern bits32_t file_size_32(char * fname);
#define ETC_STDIO_SIZE(fname) (file_size_32(fname))
/* Define the base output routines */
extern sbits16_t decorum_put_string (etc_stdio_t *, epilogue_char_t *,
decorum_size_t);
extern sbits16_t decorum_put_sbits32 (etc_stdio_t *, sbits32_t);
extern sbits16_t decorum_put_bits32 (etc_stdio_t *, bits32_t);
extern sbits16_t decorum_put_hex_string (etc_stdio_t *, bits8_t *,
decorum_size_t);
#define ETC_STDIO_PUT_STRING decorum_put_string
#define ETC_STDIO_PUT_SBITS32 decorum_put_sbits32
#define ETC_STDIO_PUT_BITS32 decorum_put_bits32
#define ETC_STDIO_PUT_HEX_STRING decorum_put_hex_string
#if INSTALL_DECORUM_PROXY
/* Define a more complex output routine, this may use the
base routines (as the example code does) or may be more direct */
extern sbits16_t decorum_put_oid (etc_stdio_t *, OIDC_T *, decorum_size_t);
#define ETC_STDIO_PUT_OID decorum_put_oid
#endif /* INSTALL_DECORUM_PROXY */
/* Define a string comparison routine */
#define ETC_STRING_STRCASECMP strcasecmp
extern int strcasecmp();
/* Define a string length routine */
#define ETC_STRING_STRLEN strlen
/* Define a routine that gets the current time. */
#define DECORUM_GET_RAWTIME(timeval_p) unix_glue_getime ((timeval_p));
/* Define a routine that figgers out how big a buffer to use for a chunk
* of outgoing data. */
#define DECORUM_SENDBUF_LEN(http_sb) (512)
#endif /* #if (!defined(decorum_inc)) */
@@ -0,0 +1,89 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/sunos/emissary.h,v 1.1.1.1 2001/11/05 17:47:16 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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 1992-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: emissary.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:16 tneale
* Tornado shuffle
*
* Revision 1.3 2001/01/19 22:23:18 paul
* Update copyright.
*
* Revision 1.2 2000/03/17 00:11:00 meister
* Update copyright message
*
* Revision 1.1 1998/02/25 04:57:08 sra
* Update copyrights.
*
* Revision 1.0 1997/08/08 22:11:23 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.3 1997/03/20 06:57:52 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.1 1996/10/23 00:14:56 sar
* *** empty log message ***
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/file.h>
#include <stddef.h>
#include <stdio.h>
#include <ctype.h>
#include <memory.h>
#include <malloc.h>
#include <string.h>
#include <time.h>
#include <errno.h>
#include <assert.h>
#include <limits.h>
/*
* The following declarations shouldn't be necessary, particularly the ones
* that are stdio internal functions, but GCC whines without them. Should
* be harmless in any case.
*/
extern char *getenv (const char *);
extern int _filbuf (FILE *);
extern int _flsbuf (unsigned int, FILE *);
extern int fclose (FILE *);
extern int fprintf (FILE *, const char *, ...);
extern int fputs (const char *, FILE *);
extern int fseek (FILE *, long int, int);
extern int tolower (int);
extern int ungetc (int, FILE *);
extern long time (long *);
extern unsigned long fwrite (const void *,unsigned long,unsigned long,FILE *);
extern void perror (const char *);
@@ -0,0 +1,183 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/sunos/envoy.h,v 1.1.1.1 2001/11/05 17:47:16 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: envoy.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:16 tneale
* Tornado shuffle
*
* Revision 1.8 2001/01/19 22:23:18 paul
* Update copyright.
*
* Revision 1.7 2000/03/17 00:11:00 meister
* Update copyright message
*
* Revision 1.6 1998/06/22 01:05:52 sar
* Moved common porting stuff to generic/envoy.h
*
* Revision 1.5 1998/06/17 05:05:30 sar
* Tidy up some macros for views
*
* Revision 1.4 1998/06/10 19:22:12 sar
* Added V3 macros and routines and rearranged the whole file
* to be more readable (at least to me).
*
* Revision 1.3 1998/02/25 04:57:09 sra
* Update copyrights.
*
* Revision 1.2 1997/11/04 00:29:37 sar
* Changed the agentx sub agent timeout period from 10000 (10 seconds)
* which was used for testing to 1000 (1 second).
*
* Revision 1.1 1997/10/23 06:21:30 sar
* Updates for agentx, this includes some new installation options and
* renaming the older ones for the older subagent scheme
*
* Revision 1.0 1997/08/08 22:11:23 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.5 1997/03/20 06:57:53 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.4 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.3 1997/01/15 22:30:42 sar
* moved location of nvutils.h to snark/snmptalk
*
* Revision 0.2 1996/10/28 02:44:53 sra
* Fix missing comment marker.
*
* Revision 0.1 1996/10/23 00:14:56 sar
* *** empty log message ***
*
*/
/* [clearcase]
modification history
-------------------
*/
/* previous revision history when this was envoy/port/sunos/envoy.h
* with rev and copyright updates removed
*
* Revision 6.5 1996/02/27 00:03:03 sar
* Updated partytime to be usectime
*
* Revision 6.4 1995/11/14 22:37:59 sar
* If proxy is installed release_private is proxy_release_private
*
* Revision 6.3 1995/11/10 23:59:08 sar
* stopped using the pre & post set user exits for the nvview stuff
*
* Revision 6.2 1995/11/06 20:05:22 sar
* Removed validate_community's dependency on install v1
* removed validate_address & validate_vesion
*
* Revision 6.1 1995/10/20 23:15:55 sar
* removed party, context and acl macros
*
* Revision 5.6 1995/05/22 19:39:24 sar
* Modified the lock code to add some new macros.
*
* Revision 5.5 1995/05/02 23:39:31 sar
* Added the envoy timer macros.
*
* Revision 5.4 1995/05/01 21:58:15 sar
* Put the example lock macros in an ifdef block
*
* Revision 5.3 1995/05/01 20:59:29 sra
* Have to test CONFIG_PPREAMBLE with #ifdef, not #if.
*
* Revision 5.2 1994/11/01 17:59:04 sar
* *_add_mod routines now take a flag as well as an data block.
*
* Revision 5.1 1994/09/29 20:39:39 sar
* added macros for a simple locking scheme to test the compiliation of
* our code
* Modified the macros for use with the non volatile storage stuff to
* use the new (as of fall 94) scheme.
*
* Revision 4.3 1994/05/12 17:24:05 sar
* moved the include for nvutils.h to make it available for everybody
* that needs it.
*
* Revision 4.2 1994/05/10 20:21:45 sar
* moved view defines aroudn so they are available in other than v2 settings.
*
* Revision 4.1 1994/05/09 21:06:41 sar
* Added define for SNMP_RESETSYSUPTIME to be nothing.
*
*/
/*****************************************************************
This is the platform specific part of envoy.h for use with the
example code. It contains only the platform specific pieces of
the port code. The common porting code is in generic/envoy.h.
In general customers will have one envoy.h file per platform
that combines this file and the platform specific information,
we use two files as there is a lot of shared code between our
demos.
*****************************************************************/
#ifdef CONFIG_PREAMBLE
/*****************************************************************
System Includes:
Envoy uses memcpy(), memset(), and strlen(). The appropriate
include file should be put here to see that these routines are
properly declared. If no such include file exists on the system
then declare memcpy() and memset() here directly. Envoy also
uses min() and max(). Include the system's definition or use the
macros supplied below.
*****************************************************************/
#include <memory.h>
#include <string.h>
/*****************************************************************
Memory allocation routines. Envoy needs to allocate memory to
decode the packet into and also to store the response data
Make sure that the routines used by the SNMP_memory_alloc() and
SNMP_memory_free() macros are declared. If system memory routines
are used (e.g. malloc() and free()) then include the appropriate
system header file here.
*****************************************************************/
/* Get malloc and free declarations */
#include <stdlib.h>
#define SNMP_memory_alloc(need) malloc(need)
#define SNMP_memory_free(buf) free(buf)
#include <port/generic/envoy.h>
#else /* config preamble */
#include <port/generic/envoy.h>
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,49 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/sunos/liaison.h,v 1.1.1.1 2001/11/05 17:47:16 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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 1996-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: liaison.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:16 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:23:18 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:11:00 meister
* Update copyright message
*
* Revision 1.2 1998/02/25 04:57:10 sra
* Update copyrights.
*
* Revision 1.1 1997/11/18 19:59:35 josh
* liaison.h is a dummy file for now, but it will probably have stuff
* in the future
*
*/
/* [clearcase]
modification history
-------------------
*/
#if (!defined(liaison_inc))
#define liaison_inc
#endif /* #if (!defined(liaison_inc)) */
@@ -0,0 +1,69 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/sunos/oemtypes.h,v 1.1.1.1 2001/11/05 17:47:16 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: oemtypes.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:16 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:23:18 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:11:00 meister
* Update copyright message
*
* Revision 1.2 1998/06/10 16:37:21 sar
* Added stdtypes to get the size_t construct
*
* Revision 1.1 1998/02/25 04:57:10 sra
* Update copyrights.
*
* Revision 1.0 1997/08/08 22:11:24 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.3 1997/03/20 06:57:54 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.1 1996/10/23 00:14:56 sar
* *** empty log message ***
*
*/
/* [clearcase]
modification history
-------------------
*/
/* get the size_t construct */
#include <sys/stdtypes.h>
/* The sun compiler doesn't understand the `signed' keyword */
#define __TYPES_HAVE_sbits8_t_ 1
typedef char sbits8_t; /* signed 8 bits */
#define __TYPES_HAVE_sbits16_t_ 1
typedef short sbits16_t; /* signed 16 bits */
#define __TYPES_HAVE_sbits32_t_ 1
typedef long sbits32_t; /* signed 32 bits */
@@ -0,0 +1,119 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/sunos/snark.h,v 1.1.1.1 2001/11/05 17:47:16 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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 1994-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: snark.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:16 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:23:18 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:11:01 meister
* Update copyright message
*
* Revision 1.2 1999/05/21 16:45:24 sra
* vsnprintf() => VSNPRINTF().
*
* Revision 1.1 1998/02/25 04:57:11 sra
* Update copyrights.
*
* Revision 1.0 1997/08/08 22:11:24 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.6 1997/05/17 23:08:53 sra
* Clean up some SunOS/gcc warnings.
*
* Revision 0.5 1997/03/20 06:57:54 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.4 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.3 1997/02/24 00:56:59 sra
* Support for run-time configuration of BUG() macros.
*
* Revision 0.2 1997/02/19 08:10:29 sra
* More fun merging snmptalk into snark, general snark cleanup.
*
* Revision 0.1 1996/10/23 00:14:56 sar
* *** empty log message ***
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <string.h>
#include <stdlib.h>
#include <memory.h>
#include <malloc.h>
#define SNARK_ATTACHE_MAXLNH 20
#ifndef GLUE_ALLOC
#define GLUE_ALLOC(x) ((void *) malloc(x))
#endif
#ifndef GLUE_FREE
#define GLUE_FREE(x) free((char *) (x))
#endif
#ifndef MEMCPY
#define MEMCPY(x, y, z) memcpy(x, y, z)
#endif
#ifndef MEMCMP
#define MEMCMP(x, y, z) memcmp(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 STRNICMP
#define STRNICMP(x, y, z) strncasecmp(x, y, z)
#endif
#ifndef STRICMP
#define STRICMP(x, y) strcasecmp(x, y)
#endif
#define stricmp STRICMP
#define strnicmp STRNICMP
/* This stuff all should be defined in some system header file or another, but I don't see it. */
extern int strcasecmp(), strncasecmp(), gettimeofday(), ioctl(), bzero(), select();
extern int setlinebuf(), sendto(), random(), recv(), socket(), bind();
@@ -0,0 +1,72 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/sunos/snmptalk.h,v 1.1.1.1 2001/11/05 17:47:16 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: snmptalk.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:16 tneale
* Tornado shuffle
*
* Revision 1.4 2001/01/19 22:23:19 paul
* Update copyright.
*
* Revision 1.3 2000/03/17 00:11:01 meister
* Update copyright message
*
* Revision 1.2 1998/06/10 16:40:37 sar
* removed needs_strtol, this is now handled by an install option
*
* Revision 1.1 1998/02/25 04:57:11 sra
* Update copyrights.
*
* Revision 1.0 1997/08/08 22:11:24 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.5 1997/05/17 23:08:54 sra
* Clean up some SunOS/gcc warnings.
*
* Revision 0.4 1997/03/20 06:57:55 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.3 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.2 1996/10/30 22:10:02 sar
* removed bsd_release
*
* Revision 0.1 1996/10/23 00:14:56 sar
* *** empty log message ***
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <stdlib.h>
#include <strings.h>
/* defines for nvutils for file manipulation */
#define SNMP_READONLY "r"
#define SNMP_READPLUS "r+"
#define SNMP_WRITEPLUS "w+"
#define SNMP_REMOVE_FILE(fname) unlink(fname)
@@ -0,0 +1,77 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/sunos/telnet.h,v 1.1.1.1 2001/11/05 17:47:16 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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 1994-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
* $Log: telnet.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:16 tneale
* Tornado shuffle
*
* Revision 1.3 2001/01/19 22:23:19 paul
* Update copyright.
*
* Revision 1.2 2000/03/17 00:11:01 meister
* Update copyright message
*
* Revision 1.1 1998/02/25 04:57:11 sra
* Update copyrights.
*
* Revision 1.0 1997/08/08 22:11:25 meister
* Bumped revision number to 1.0 to hopfully get rid of the spurious
* added files weirdness
*
* Revision 0.3 1997/03/20 06:57:51 sra
* DFARS-safe copyright text. Zap!
*
* Revision 0.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 0.1 1996/10/23 00:14:56 sar
* *** empty log message ***
*
*/
/* [clearcase]
modification history
-------------------
*/
/*
* Use '\n' for local newline convention in both directions.
*/
#define TN_LOCAL_NEWLINE '\n'
/*
* All the windowing stuff for server telnet connections is controlled
* by the sty code, so shunt the decisions off to the sty_tn interface module.
*
* For client telnet connections we're not buffering output, so we just
* return a constant window size.
*/
#define TN_INITIAL_ACTIVE_WINDOW_SIZE (4096)
#define TN_INITIAL_PASSIVE_WINDOW_SIZE (stytn_space_initial)
#define GLUE_TN_WINDOW_SIZE(_tn_) \
(tn_get_flags((_tn_), TN_FLG_ACT_AS_SERVER) \
? stytn_space_left((_tn_)) \
: TN_INITIAL_ACTIVE_WINDOW_SIZE)
extern unsigned stytn_space_initial, stytn_space_left();
@@ -0,0 +1,108 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/vxworks/common.h,v 1.3 2003/01/15 14:00:28 josh Exp $ */
/*
* Copyright (C) 1999-2003 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.3 2003/01/15 14:00:28 josh
* directory structure shifting
*
* Revision 1.2 2001/11/07 14:26:53 tneale
* Added wm to include path
*
* Revision 1.1.1.1 2001/11/05 17:47:17 tneale
* Tornado shuffle
*
* Revision 1.3 2000/02/04 21:49:29 josh
* modified header files for clean builds of vxWorks demo
*
* Revision 1.2 2000/01/28 23:09:25 josh
* make sure we're really using memcmp() when we intend to
*
* Revision 1.1 2000/01/27 18:25:29 josh
* initial checkin of porting files for vxWorks
*
*
*/
/*
modification history
-------------------
01a,06oct04,job draw processor alignment from vxWorks header files
*/
#include <string.h>
#include <vxWorks.h>
#ifdef INSTALL_ON_BIG_ENDIAN
#undef INSTALL_ON_BIG_ENDIAN
#endif
#ifdef INSTALL_ON_LITTLE_ENDIAN
#undef INSTALL_ON_LITTLE_ENDIAN
#endif
#if (_BYTE_ORDER == _BIG_ENDIAN)
#define INSTALL_ON_BIG_ENDIAN 1
#define INSTALL_ON_LITTLE_ENDIAN 0
#elif (_BYTE_ORDER == _LITTLE_ENDIAN)
#define INSTALL_ON_LITTLE_ENDIAN 1
#define INSTALL_ON_BIT_ENDIAN 0
#endif
#ifdef CONFIG_PREAMBLE
/* This is a sample of how one might use the BUG() macros for simple
* debugging. You can almost certainly do better than this, see the
* comments in common/h/bug.h for details. This definition suffices
* for simple (and very verbose) debugging.
*/
#if 0 && defined(INSTALL_BUG) && INSTALL_BUG
#define BUG_OUT stdout
#define BUG(w,x,y,z) \
do {\
fprintf z;\
fprintf (BUG_OUT, "\n");\
if ((x) == BUG_FATAL)\
t_suspend(0L);\
} while (0)
#include <wrn/wm/common/bug.h>
#endif /* defined(INSTALL_BUG) && INSTALL_BUG */
/*
* Fun with our new run-time debugging facility.
* This is still experimental, and defaults to uninstalled.
*/
#if defined(INSTALL_SNARK_BUG_CONF) && INSTALL_SNARK_BUG_CONF
#include <wrn/wm/demo/bug_conf.h>
#endif
#else /* CONFIG_PREAMBLE */
#define GLUE_ALLOC(x) ((void *) malloc(x))
#define GLUE_FREE(x) free((char *) (x))
#define GLUE_NOW() glue_now()
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,991 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/vxworks/envoy.h,v 1.6 2002/05/23 19:42:41 josh Exp $ */
/*
* Copyright (C) 1999-2004 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 1994-1997 Epilogue Technology Corporation.
* Copyright 1998 Integrated Systems, Inc.
* All rights reserved.
****************************************************************************/
/*
modification history
--------------------
01g,02may05,job vxWorks-specific definition of SNMP_DH_RAND moves here
01f,06oct04,job draw processor alignment from vxWorks header files
01e,26nov03,ps copyright update
01d,05nov03,ps merge from latest on ickthwa_devel_branch.nh
01c,19apr98,ann changed ENVOY_SNMP_INIT_LOCK macro
01b,04jun96,rjc changed #if defined to #if
01a,01may96,rjc Added copyright header
*/
/* envoy/port/sunos/envoy.h
* configuration for Envoy on VxWorks
*/
/*
* $Date: 2002/05/23 19:42:41 $
* $Revision: 1.6 $
* $Author: josh $
*
* $Log: envoy.h,v $
* Revision 1.6 2002/05/23 19:42:41 josh
* updates to support the entity MIB
*
* Revision 1.5 2002/04/05 13:45:18 andre
* Add ENVOY_AX_GET_CONNID user-exit.
*
* Revision 1.4 2002/04/04 15:23:15 andre
* Clean up; change enum params to int.
*
* Revision 1.2 2001/11/07 14:26:53 tneale
* Added wm to include path
*
* Revision 1.1.1.1 2001/11/05 17:47:17 tneale
* Tornado shuffle
*
* Revision 1.7.4.3 2001/10/29 21:42:50 josh
* adding a spot for the proxy forwarding routine
*
* Revision 1.7.4.2 2001/09/24 16:44:39 josh
* add a prototype for a function
*
* Revision 1.7.4.1 2001/08/24 15:35:20 josh
* add nonvolatile access definitions for proxy and community tables
*
* Revision 1.7 2001/04/13 18:09:25 josh
* merging in changes from kingfisher branch
*
* Revision 1.6 2000/07/26 19:39:31 josh
* fixing a broken comment
*
* Revision 1.5 2000/06/09 14:57:35 josh
* updating header files to correspond with new installation options and
* new code
*
* Revision 1.4.2.5 2001/03/12 22:09:03 tneale
* Updated copyright
*
* Revision 1.4.2.4 2000/12/07 22:09:56 tneale
* Added definition for ENVOY_AX_SA_MIB_ROOT_NODE
*
* Revision 1.4.2.3 2000/10/26 21:36:00 josh
* fixing a few bugs in the vxWorks AgentX master agent
*
* Revision 1.4.2.2 2000/10/18 20:05:41 josh
* added a definition for ENVOY_SNMP_FREE_LOCK_TAG() and removed
* responsibility for cleaning continue lock from
* snmpHookPrivRelease()
*
* Revision 1.4.2.1 2000/10/13 21:33:16 josh
* AgentX updates
*
* Revision 1.4 2000/03/08 20:01:13 josh
* SNMPv3 support for the vxWorks port of Envoy
*
* Revision 1.3 2000/03/07 21:23:37 josh
* overwriting old envoy.h withnew one corresponding to new demo
*
* Revision 7.0 1996/03/18 20:25:29 sar
* Updated rev to 7.0 and copyright ot 96
*
* Revision 6.5 1996/02/27 00:03:03 sar
* Updated partytime to be usectime
*
* Revision 6.4 1995/11/14 22:37:59 sar
* If proxy is installed release_private is proxy_release_private
*
* Revision 6.3 1995/11/10 23:59:08 sar
* stopped using the pre & post set user exits for the nvview stuff
*
* Revision 6.2 1995/11/06 20:05:22 sar
* Removed validate_community's dependency on install v1
* removed validate_address & validate_vesion
*
* Revision 6.1 1995/10/20 23:15:55 sar
* remvoed party, context and acl macros
*
* Revision 6.0 1995/05/31 22:00:33 sra
* Release 6.0.
*
* Revision 5.6 1995/05/22 19:39:24 sar
* Modified the lock code to add some new macros.
*
* Revision 5.5 1995/05/02 23:39:31 sar
* Added the envoy timer macros.
*
* Revision 5.4 1995/05/01 21:58:15 sar
* Put the example lock macros in an ifdef block
*
* Revision 5.3 1995/05/01 20:59:29 sra
* Have to test CONFIG_PREAMBLE with #ifdef, not #if.
*
* Revision 5.2 1994/11/01 17:59:04 sar
* *_add_mod routines now take a flag as well as an data block.
*
* Revision 5.1 1994/09/29 20:39:39 sar
* added macros for a simple locking scheme to test the compiliation of
* our code
* Modified the macros for use with the non volatile storage stuff to
* use the new (as of fall 94) scheme.
*
* Revision 5.0 1994/05/16 16:47:41 sar
* Updated revision to 5.0 and copyright to include 1994
*
* Revision 4.3 1994/05/12 17:24:05 sar
* moved the include for nvutils.h to make it available for everybody
* that needs it.
*
* Revision 4.2 1994/05/10 20:21:45 sar
* moved view defines aroudn so they are available in other than v2 settings.
*
* Revision 4.1 1994/05/09 21:06:41 sar
* Added define for SNMP_RESETSYSUPTIME to be nothing.
*
* Revision 4.0 1993/06/24 17:44:26 sar
* Updated rev to 4.0 and copyright to 93
*
* Revision 1.1 1993/06/09 19:33:45 dab
* Initial revision
*
*
*/
/* [clearcase]
modification history
-------------------
01a,03jun09,y_t add the trace type(input or output) macro
*/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <vxWorks.h>
#ifdef INSTALL_ON_BIG_ENDIAN
#undef INSTALL_ON_BIG_ENDIAN
#endif
#ifdef INSTALL_ON_LITTLE_ENDIAN
#undef INSTALL_ON_LITTLE_ENDIAN
#endif
#if (_BYTE_ORDER == _BIG_ENDIAN)
#define INSTALL_ON_BIG_ENDIAN 1
#define INSTALL_ON_LITTLE_ENDIAN 0
#elif (_BYTE_ORDER == _LITTLE_ENDIAN)
#define INSTALL_ON_LITTLE_ENDIAN 1
#define INSTALL_ON_BIT_ENDIAN 0
#endif
#ifdef INSTALL_ENVOY_SNMP_LOCK
#include <semLib.h>
#endif /* INSTALL_ENVOY_SNMP_LOCK */
#ifdef CONFIG_PREAMBLE
/*****************************************************************
*
* System Includes:
*
* The SNMP uses memcpy(), memset(), and strlen(). The appropriate
* include file should be put here to see that these routines are
* properly declared. If no such include file exists on the system
* then declare memcpy() and memset() here directly. The SNMP also
* uses min() and max(). Include the system's definition or use the
* macros supplied below.
*****************************************************************/
#include <string.h>
/*****************************************************************
* Memory allocation routines. The SNMP needs to allocate memory to
* decode the packet into and also to store the response data for GET's
* and GET-NEXT's.
*****************************************************************/
/*----------------------------------------------------------------
* Make sure that the routines used by the SNMP_memory_alloc() and
* SNMP_memory_free() macros are declared. If system memory routines
* are used (e.g. malloc() and free()) then include the appropriate
* system header file here.
----------------------------------------------------------------*/
extern void * snmpdMemoryAlloc (size_t);
extern void snmpdMemoryFree (void *);
#define SNMP_memory_alloc(p) snmpdMemoryAlloc (p)
#define SNMP_memory_free(p) snmpdMemoryFree (p)
/* Define the maximum packet size this implementation will accept. */
/* There is no hard upper limit. SNMP_MAX_PACKET_SIZE should not be */
/* reduced below the value of SNMP_MIN_PACKET_SIZE. */
/* xxxxxxxxxxxxxxxxxxxxxxxxxxx*/
#define SNMP_MAX_PACKET_SIZE (8*1024)
#define SNMP_MIN_PACKET_SIZE 484 /* shouldn't change */
/* Say what is the maximum number of components of an object identifer */
/* which we can handle, including those in the instance. */
#define MAX_OID_COUNT 32
#if (INSTALL_ENVOY_SNMP_LOCK)
typedef SEM_ID ENVOY_LOCK_T;
#endif
#define ENVOY_SA_SET_TIMEOUT 100000
#else /* CONFIG_PREAMBLE */
/*****************************************************************
*
* The following macro definitions allow access to the user configurable
* part of the SNMP code.
*
*****************************************************************/
/*****************************************************************
* Include any declarations needed for the routines specified below
* by the macros. Don't put <snmp.h> here because this file is
* included by that one.
*****************************************************************/
/*----------------------------------------------------------------
SNMP_validate_community -- Check an operation against the community name.
Parameters:
SNMP_PKT_T *pkt The received packet (decoded format)
SNMPADDR_T *src Source of the packet
SNMPADDR_T *dst Destination of the packet (most likely
the address of the machine on which this
code is running.)
Returns:
This procedure should return 0 if happy with the community and
1 if not.
This routine should fill in the packet structure with the mib
view mask associated with the community string.
This routine may hang additional data onto the "private" field of
the packet structure. The user will be given the opportinity to
release that memory via SNMP_release_private().
----------------------------------------------------------------*/
extern int snmpIoCommunityValidate __((SNMP_PKT_T *, SNMPADDR_T *, \
SNMPADDR_T *));
#define SNMP_validate_community(pkt, src, dst) \
snmpIoCommunityValidate (pkt, src, dst)
#if (INSTALL_ENVOY_SNMP_RFC1445_VIEWS)
#if 0 /* not supported for vxWorks agent */
#include <envoy/utils/nvutils.h>
#define SNMP_VIEW_CREATE_TEST(PKT, NEW) SNMP_NV_View_Add_Mod(NEW, 0)
#define SNMP_VIEW_UPDATE_TEST(PKT, OLD, NEW) SNMP_NV_View_Add_Mod(NEW, 0)
#define SNMP_VIEW_DESTROY_TEST(PKT, OLD) SNMP_NV_View_Add_Mod(OLD, 1)
#define SNMP_VIEW_BACKOUT_HOOK(NEW) SNMP_NV_Clean()
#define SNMP_VIEW_CREATE_UNDO(NEW) (SNMP_NV_Clean(), 0)
#define SNMP_VIEW_UPDATE_UNDO(OLD, NEW) (SNMP_NV_Clean(), 0)
#define SNMP_VIEW_DESTROY_UNDO(OLD) (SNMP_NV_Clean(), 0)
#define SNMP_VIEW_DESTROY_BACKOUT(OLD) SNMP_NV_Clean()
#define SNMP_VIEW_FINISHED SNMP_NV_Doit()
#endif /* 0 (not supported for vxWorks agent) */
#endif /* version2, master agent, v2 views */
#if (INSTALL_ENVOY_SNMP_RFC2275_VIEWS)
#include <wrn/wm/demo/nvutils.h>
#define SNMP_VIEW_2275_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_view_2275_test(PKT, VBP, CUR, NEW)
#define SNMP_VIEW_2275_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_view_2275_test(PKT, VBP, CUR, NEW)
#define SNMP_VIEW_2275_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_view_2275_test(PKT, VBP, CUR, NEW)
#define SNMP_VIEW_2275_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_view_2275_set(PKT, VBP, CUR, NEW)
#define SNMP_VIEW_2275_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_view_2275_set(PKT, VBP, CUR, NEW)
#define SNMP_VIEW_2275_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_view_2275_set(PKT, VBP, CUR, NEW)
#define SNMP_VIEW_2275_DESTROY_BACKOUT(CUR, NEW) \
snmp_view_2275_backout(CUR, NEW)
#define SNMP_VIEW_2275_CREATE_BACKOUT(CUR, NEW) \
snmp_view_2275_backout(CUR, NEW)
#define SNMP_VIEW_2275_UPDATE_BACKOUT(CUR, NEW) \
snmp_view_2275_backout(CUR, NEW)
#define SNMP_VIEW_2275_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_view_2275_undo(PKT, VBP, CUR, SAV)
#define SNMP_VIEW_2275_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_view_2275_undo(PKT, VBP, CUR, SAV)
#define SNMP_VIEW_2275_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_view_2275_undo(PKT, VBP, CUR, SAV)
#define SNMP_VIEW_2275_FINISHED() snmp_view_2275_finished()
#endif /* #if (INSTALL_ENVOY_SNMP_RFC2275_VIEWS) */
/*****************************************************************
If version 3 is installed we may need the following macros.
ENVOY_TIME - returns a clock with a granularity of seconds
PARAMETERS: none
returns: bits32_t
SNMP_validate_address
This routine gives the user a chance to examine the address
information as well as most of the packet itself before a v3
packet is processed. The routine must attach the address
information to the packet. It may attach a non-default mib
tree if desired. Note: in some error cases the packet will
not be decoded when this routine is called.
Parameters:
SNMP_PKT_T *pkt The received packet (decoded format)
SNMPADDR_T *src Source of the packet
SNMPADDR_T *dst Destination of the packet (most likely
the address of the machine on which this
code is running.)
returns:
0 - ok
1 - failure, drop the packet
Lastly are are a series of macros that will connect the method
routines we supplied for the v3 tables to your non-volatile
storage areas. You should consult the manuals for more information
about these macros.
*****************************************************************/
#if INSTALL_ENVOY_SNMP_VERSION_3
#include <wrn/wm/demo/nvutils.h>
extern bits32_t snmpSecsGet(void);
#define ENVOY_TIME() snmpSecsGet()
extern int snmpIoAddressValidate __((SNMP_PKT_T *, SNMPADDR_T *, \
SNMPADDR_T *));
#define SNMP_validate_address(pkt, src, dst) \
snmpIoAddressValidate (pkt, src, dst)
#if INSTALL_ENVOY_SNMP_V3_NOTIFY
extern int envoy_taddress_to_snmpaddr(SNMPADDR_T *, OBJ_ID_T *, EBUFFER_T *);
extern int envoy_snmpaddr_to_taddress(SNMPADDR_T *, OBJ_ID_T *, EBUFFER_T *);
#define ENVOY_TADDRESS_TO_SNMPADDR(A, D, T) \
envoy_taddress_to_snmpaddr(A, D, T)
#define ENVOY_SNMPADDR_TO_TADDRESS(A, D, T) \
envoy_snmpaddr_to_taddress(A, D, T)
#endif
#define SNMP_V3_GROUP_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_group_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_GROUP_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_group_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_GROUP_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_group_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_GROUP_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_v3_group_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_GROUP_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_group_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_GROUP_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_group_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_GROUP_DESTROY_BACKOUT(CUR, NEW) \
snmp_v3_group_backout(CUR, NEW)
#define SNMP_V3_GROUP_CREATE_BACKOUT(CUR, NEW) \
snmp_v3_group_backout(CUR, NEW)
#define SNMP_V3_GROUP_UPDATE_BACKOUT(CUR, NEW) \
snmp_v3_group_backout(CUR, NEW)
#define SNMP_V3_GROUP_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_group_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_GROUP_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_group_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_GROUP_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_group_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_GROUP_FINISHED() snmp_v3_group_finished()
#define SNMP_V3_ACCESS_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_access_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_ACCESS_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_access_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_ACCESS_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_access_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_ACCESS_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_v3_access_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_ACCESS_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_access_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_ACCESS_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_access_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_ACCESS_DESTROY_BACKOUT(CUR, NEW) \
snmp_v3_access_backout(CUR, NEW)
#define SNMP_V3_ACCESS_CREATE_BACKOUT(CUR, NEW) \
snmp_v3_access_backout(CUR, NEW)
#define SNMP_V3_ACCESS_UPDATE_BACKOUT(CUR, NEW) \
snmp_v3_access_backout(CUR, NEW)
#define SNMP_V3_ACCESS_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_access_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_ACCESS_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_access_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_ACCESS_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_access_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_ACCESS_FINISHED() snmp_v3_access_finished()
#define SNMP_V3_USER_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_user_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_USER_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_user_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_USER_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_user_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_USER_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_v3_user_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_USER_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_user_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_USER_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_user_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_USER_DESTROY_BACKOUT(CUR, NEW) \
snmp_v3_user_backout(CUR, NEW)
#define SNMP_V3_USER_CREATE_BACKOUT(CUR, NEW) \
snmp_v3_user_backout(CUR, NEW)
#define SNMP_V3_USER_UPDATE_BACKOUT(CUR, NEW) \
snmp_v3_user_backout(CUR, NEW)
#define SNMP_V3_USER_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_user_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_USER_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_user_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_USER_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_user_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_USER_FINISHED() snmp_v3_user_finished()
#define SNMP_V3_TADDR_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_taddr_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_TADDR_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_taddr_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_TADDR_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_taddr_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_TADDR_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_v3_taddr_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_TADDR_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_taddr_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_TADDR_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_taddr_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_TADDR_DESTROY_BACKOUT(CUR, NEW) \
snmp_v3_taddr_backout(CUR, NEW)
#define SNMP_V3_TADDR_CREATE_BACKOUT(CUR, NEW) \
snmp_v3_taddr_backout(CUR, NEW)
#define SNMP_V3_TADDR_UPDATE_BACKOUT(CUR, NEW) \
snmp_v3_taddr_backout(CUR, NEW)
#define SNMP_V3_TADDR_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_taddr_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_TADDR_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_taddr_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_TADDR_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_taddr_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_TADDR_FINISHED() snmp_v3_taddr_finished()
#define SNMP_V3_TPARAM_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_tparam_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_TPARAM_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_tparam_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_TPARAM_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_tparam_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_TPARAM_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_v3_tparam_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_TPARAM_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_tparam_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_TPARAM_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_tparam_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_TPARAM_DESTROY_BACKOUT(CUR, NEW) \
snmp_v3_tparam_backout(CUR, NEW)
#define SNMP_V3_TPARAM_CREATE_BACKOUT(CUR, NEW) \
snmp_v3_tparam_backout(CUR, NEW)
#define SNMP_V3_TPARAM_UPDATE_BACKOUT(CUR, NEW) \
snmp_v3_tparam_backout(CUR, NEW)
#define SNMP_V3_TPARAM_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_tparam_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_TPARAM_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_tparam_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_TPARAM_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_tparam_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_TPARAM_FINISHED() snmp_v3_tparam_finished()
#define SNMP_V3_NOTIFY_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_notify_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_NOTIFY_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_notify_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_NOTIFY_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_notify_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_NOTIFY_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_v3_notify_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_NOTIFY_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_notify_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_NOTIFY_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_notify_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_NOTIFY_DESTROY_BACKOUT(CUR, NEW) \
snmp_v3_notify_backout(CUR, NEW)
#define SNMP_V3_NOTIFY_CREATE_BACKOUT(CUR, NEW) \
snmp_v3_notify_backout(CUR, NEW)
#define SNMP_V3_NOTIFY_UPDATE_BACKOUT(CUR, NEW) \
snmp_v3_notify_backout(CUR, NEW)
#define SNMP_V3_NOTIFY_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_notify_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_NOTIFY_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_notify_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_NOTIFY_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_notify_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_NOTIFY_FINISHED() snmp_v3_notify_finished()
#define SNMP_V3_NPROF_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_nprof_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_NPROF_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_nprof_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_NPROF_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_nprof_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_NPROF_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_v3_nprof_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_NPROF_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_nprof_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_NPROF_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_nprof_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_NPROF_DESTROY_BACKOUT(CUR, NEW) \
snmp_v3_nprof_backout(CUR, NEW)
#define SNMP_V3_NPROF_CREATE_BACKOUT(CUR, NEW) \
snmp_v3_nprof_backout(CUR, NEW)
#define SNMP_V3_NPROF_UPDATE_BACKOUT(CUR, NEW) \
snmp_v3_nprof_backout(CUR, NEW)
#define SNMP_V3_NPROF_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_nprof_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_NPROF_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_nprof_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_NPROF_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_nprof_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_NPROF_FINISHED() snmp_v3_nprof_finished()
#define SNMP_V3_NFILT_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_nfilt_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_NFILT_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_nfilt_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_NFILT_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_nfilt_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_NFILT_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_v3_nfilt_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_NFILT_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_nfilt_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_NFILT_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_nfilt_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_NFILT_DESTROY_BACKOUT(CUR, NEW) \
snmp_v3_nfilt_backout(CUR, NEW)
#define SNMP_V3_NFILT_CREATE_BACKOUT(CUR, NEW) \
snmp_v3_nfilt_backout(CUR, NEW)
#define SNMP_V3_NFILT_UPDATE_BACKOUT(CUR, NEW) \
snmp_v3_nfilt_backout(CUR, NEW)
#define SNMP_V3_NFILT_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_nfilt_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_NFILT_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_nfilt_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_NFILT_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_nfilt_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_NFILT_FINISHED() snmp_v3_nfilt_finished()
#define SNMP_V3_PROXY_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_proxy_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_PROXY_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_proxy_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_PROXY_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_v3_proxy_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_PROXY_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_v3_proxy_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_PROXY_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_proxy_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_PROXY_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_v3_proxy_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_PROXY_DESTROY_BACKOUT(CUR, NEW) \
snmp_v3_proxy_backout(CUR, NEW)
#define SNMP_V3_PROXY_CREATE_BACKOUT(CUR, NEW) \
snmp_v3_proxy_backout(CUR, NEW)
#define SNMP_V3_PROXY_UPDATE_BACKOUT(CUR, NEW) \
snmp_v3_proxy_backout(CUR, NEW)
#define SNMP_V3_PROXY_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_proxy_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_PROXY_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_proxy_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_PROXY_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_v3_proxy_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_PROXY_FINISHED() snmp_v3_proxy_finished()
#define SNMP_V3_COMM_DESTROY_TEST(PKT, VBP, CUR, NEW) \
snmp_community_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_COMM_CREATE_TEST(PKT, VBP, CUR, NEW) \
snmp_community_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_COMM_UPDATE_TEST(PKT, VBP, CUR, NEW) \
snmp_community_test(PKT, VBP, CUR, NEW)
#define SNMP_V3_COMM_DESTROY_SET(PKT, VBP, CUR, NEW) \
snmp_community_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_COMM_CREATE_SET(PKT, VBP, CUR, NEW) \
snmp_community_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_COMM_UPDATE_SET(PKT, VBP, CUR, NEW) \
snmp_community_set(PKT, VBP, CUR, NEW)
#define SNMP_V3_COMM_DESTROY_BACKOUT(CUR, NEW) \
snmp_community_backout(CUR, NEW)
#define SNMP_V3_COMM_CREATE_BACKOUT(CUR, NEW) \
snmp_community_backout(CUR, NEW)
#define SNMP_V3_COMM_UPDATE_BACKOUT(CUR, NEW) \
snmp_community_backout(CUR, NEW)
#define SNMP_V3_COMM_CREATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_community_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_COMM_UPDATE_UNDO(PKT, VBP, CUR, SAV) \
snmp_community_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_COMM_DESTROY_UNDO(PKT, VBP, CUR, SAV) \
snmp_community_undo(PKT, VBP, CUR, SAV)
#define SNMP_V3_COMM_FINISHED() snmp_community_finished()
#if INSTALL_ENVOY_SNMP_V3_PROXY
void snmpSendProxyPkt __((SNMPADDR_T *, SNMPADDR_T *,
PTR_T, ALENGTH_T));
#define ENVOY_SNMP_SEND_PROXY(FOR, LOC, PKT, SIZ) \
snmpSendProxyPkt((FOR), (LOC), (PKT), (SIZ))
#endif /* #if INSTALL_ENVOY_SNMP_V3_PROXY */
#if INSTALL_SNMP_V3_DIFFIE_HELLMAN
#define SNMP_DH_RAND() snmpDHRand()
#endif
#endif /* #if INSTALL_ENVOY_SNMP_VERSION_3 */
#if (INSTALL_ENVOY_EPI_MASTER)
#define SNMP_RESETSYSUPTIME
#endif
#if (INSTALL_ENVOY_AGENTX_MASTER) || (INSTALL_ENVOY_ENTITY_MIB)
extern bits32_t envoyGetSysUpTime();
#define ENVOY_GET_SYSUPTIME(CON) envoyGetSysUpTime(CON)
#endif /* #if (INSTALL_ENVOY_AGENTX_MASTER) || (INSTALL_ENVOY_ENTITY_MIB) */
/* Routines required by agentx */
#if INSTALL_ENVOY_AGENTX_MASTER
/* This placeholders eliminate need to include axapi.h and */
/* the attendant duplicate definitions that can occur. */
struct AX_CONNENT_S;
struct AX_CONN_S;
/* Master agent routines and macros */
extern bits32_t envoyAxConnEntry (bits32_t axConnID, int matchFlag, struct AX_CONNENT_S *pConnEntry);
extern bits32_t envoyAxGetConnID (struct AX_CONN_S *pCE);
#define ENVOY_AX_CONN_ENTRY(INDEX, MATCH_TYPE, P_CONNENT) envoyAxConnEntry(INDEX, MATCH_TYPE, P_CONNENT)
#define ENVOY_AX_GET_CONNID(CONN_ENTRY) envoyAxGetConnID(CONN_ENTRY)
#endif /* #if INSTALL_ENVOY_AGENTX_MASTER */
#if INSTALL_ENVOY_AGENTX_SUB
/* then we do the subagent agentx macros */
extern int envoy_ax_sa_mib_root_node __((PTR_T, SNMP_PKT_T *));
#define ENVOY_AX_SA_MIB_ROOT_NODE(CKE, PKT) envoy_ax_sa_mib_root_node(CKE, PKT)
#define ENVOY_AX_SA_TIMEOUT 1000
#endif /* #if INSTALL_ENVOY_AGENTX_SUB */
/*----------------------------------------------------------------
SNMP_release_private -- Get rid of a any private data attached to the packet
structure. May be left undefined in which case nothing
is done with the private field when the SNMP packet
structure is freed.
Parameters:
SNMP_PKT_T *pkt The packet itself
Returns: Nothing
----------------------------------------------------------------*/
extern void snmpHookPrivRelease __((SNMP_PKT_T*));
#define SNMP_release_private(pkt) snmpHookPrivRelease (pkt)
#if (INSTALL_ENVOY_SNMP_PROXY)
extern void proxy_release_private __((SNMP_PKT_T *));
#define SNMP_release_private(pkt) proxy_release_private(pkt)
#endif /* (INSTALL_ENVOY_SNMP_PROXY) */
/*----------------------------------------------------------------
SNMP_user_get_encode_buffer -- Allows the user the opportunity to get the
buffer that the SNMP packet will be encoded into.
If not used then leave undefined.
Parameters:
SNMP_PKT_T *pkt The packet being encoded.
unsigned int need The amount of storage needed.
EBUFFER_T *ebuffp The ebuffer to fill in with the actual
buffer.
Returns:
0 successful
1 not successful
----------------------------------------------------------------*/
/* #define SNMP_user_get_encode_buffer(pkt, need, ebuffp) 0 */
/*----------------------------------------------------------------
SNMP_trace_input
SNMP_trace_output
-- for implementing packet tracing through the
SNMP code. May not be left undefined but may
instead be defined as nothing.
Parameters:
SNMP_PKT_T *pkt The packet being traced
Returns: Nothing
----------------------------------------------------------------*/
extern void snmpTrace(SNMP_PKT_T *,int);
#define SNMP_TRACE_INPUT(pkt) snmpTrace (pkt,INPUT)
#define SNMP_TRACE_OUTPUT(pkt) snmpTrace (pkt,OUTPUT)
/*****************************************************************
* The next series of macros are hooks into the processing of SET PDUs.
* For most uses you should be able to leave these undefined.
*****************************************************************/
/*----------------------------------------------------------------
SNMP_validate_set_pdu -- Perform a global validation of a SET PDU.
Parameters:
SNMP_PKT_T *pkt The packet itself
Returns:
-1 If the PDU is bad and should be rejected with a GEN_ERR.
0 If the PDU is good and normal handling should proceed.
+1 If the PDU is good and this routine has performed all of
the set operations internally.
----------------------------------------------------------------*/
extern int snmpHookSetPduValidate __((SNMP_PKT_T*));
#define SNMP_validate_set_pdu(pkt) snmpHookSetPduValidate (pkt)
/*----------------------------------------------------------------
SNMP_user_pre_set -- Perform a global validation of a SET PDU after all of the
test procedures have been called and given the "go ahead".
Parameters:
SNMP_PKT_T *pkt The packet itself
Returns:
-1 If the PDU is bad and should be rejected with a GEN_ERR.
0 If the PDU is good and normal handling should proceed.
+1 If the PDU is good and this routine has performed all of
the set operations internally.
----------------------------------------------------------------*/
extern int snmpHookPreSet __((SNMP_PKT_T*));
#define SNMP_user_pre_set(pkt) snmpHookPreSet(pkt)
/*----------------------------------------------------------------
SNMP_user_post_set -- Perform any final activities after all of the set
procedures have been called.
Parameters:
SNMP_PKT_T *pkt The packet itself
Returns: Nothing
----------------------------------------------------------------*/
extern int snmpHookPostSet __((SNMP_PKT_T*));
#define SNMP_user_post_set snmpHookPostSet
/*************************************************************************************
* set failed routine
*/
extern int snmpHookSetFailed __((SNMP_PKT_T*));
#define SNMP_user_set_failed snmpHookSetFailed
#if (INSTALL_ENVOY_SNMP_LOCK)
#define ENVOY_SNMP_LOCK(name) ENVOY_LOCK_T name
#define ENVOY_SNMP_LOCK_EXTERN(name) extern ENVOY_LOCK_T name
#define ENVOY_SNMP_INIT_LOCK(name) (name) = semBCreate (SEM_Q_PRIORITY, SEM_FULL)
#define ENVOY_SNMP_FREE_LOCK_TAG(name, tag) semDelete ((name))
#define ENVOY_SNMP_GET_READ_LOCK(name) semTake (name, WAIT_FOREVER)
#define ENVOY_SNMP_GET_WRITE_LOCK(name) semTake (name, WAIT_FOREVER)
#define ENVOY_SNMP_RELEASE_READ_LOCK(name) semGive (name)
#define ENVOY_SNMP_RELEASE_WRITE_LOCK(name) semGive (name)
#endif /* (INSTALL_ENVOY_SNMP_LOCK) */
extern void envoy_call_timer __((bits32_t, void (*)(void)));
extern bits32_t envoy_now __((void));
#define ENVOY_CALL_TIMER(T, H) envoy_call_timer(T, H)
#define ENVOY_NOW() envoy_now()
/* Definitions for use with the Virtual Stack features.
* SNMP_VIRTUAL_STACK_NUM specifies the number of virtual stacks for whcih we
* should add community and context information.
* SNMP_SET_VIRTUAL_STACK specifies the function to call to actually change
* the virtual stack we wish to use
* NAMING_SCOPE_PREFIX specifies the string to be prepended to the stack number
* for use within a community string or context name.
* ENT_LOGICAL_DESCR specifies the string to be prepended to the description in
* the entity table
* ENT_LOGICAL_TADDRESS specifies the address to be used in the entity table
*/
#if INSTALL_SNMP_VXWORKS_VIRTUAL_STACK
#define SNMP_VIRTUAL_STACK_NUM 2
#define SNMP_SET_VIRTUAL_STACK virtualStackNumTaskIdSet
#define NAMING_SCOPE_PREFIX "VS"
#if INSTALL_SNMP_VXWORKS_VS_ENTITY
#define ENT_LOGICAL_DESCR "Virtual Stack #"
#define ENT_LOGICAL_TADDRESS "192.168.0.52"
#endif /* INSTALL_SNMP_VXWORKS_VS_ENTITY */
/* Routines for use with the dynamic naming features. This feature allows
* community strings or context names to be dynamically configured instead
* of being statically built at compile time. This feature is useful with
* the virtual stack option to allow new community strings or context names
* to be added (removed) as a virtual is created (destroyed).
*/
extern void defaultCommunityStringsRegister __((bits32_t));
#define DEFAULT_COMMUNITIES_REGISTER(vsNum) \
defaultCommunityStringsRegister (vsNum)
extern void vsCommunityStringsRegister __((int));
#define VS_COMMUNITY_REGISTER(vsNum) \
vsCommunityStringsRegister (vsNum)
#if INSTALL_ENVOY_SNMP_VERSION_3
extern void defaultContextNamesRegister __((bits32_t));
#define DEFAULT_CONTEXTS_REGISTER(vsNum) \
defaultContextNamesRegister (vsNum)
extern void vsContextNameRegister __((int));
#define VS_CONTEXT_REGISTER(vsNum) \
vsContextNameRegister (vsNum)
#endif /* INSTALL_ENVOY_SNMP_VERSION_3 */
#endif /* INSTALL_SNMP_VXWORKS_VIRTUAL_STACK */
#define snmpdGroupByGetprocAndInstance group_by_getproc_and_instance
#define snmpdVbRowLooseExtract vb_extract_row_loose
#define snmpdVbRowExtract vb_extract_row
#define snmpdContinue SNMP_Continue_function
#define SNMP_user_set_failed snmpHookSetFailed
#endif /* CONFIG_PREAMBLE */
#ifdef __cplusplus
}
#endif /* __cplusplus */
@@ -0,0 +1,47 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/vxworks/oemtypes.h,v 1.1.1.1 2001/11/05 17:47:17 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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: oemtypes.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:17 tneale
* Tornado shuffle
*
* Revision 1.1 2000/01/27 18:25:29 josh
* initial checkin of porting files for vxWorks
*
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <vxWorks.h>
#include <sys/types.h>
/* The sun compiler doesn't understand the `signed' keyword */
#define __TYPES_HAVE_sbits8_t_ 1
typedef char sbits8_t; /* signed 8 bits */
#define __TYPES_HAVE_sbits16_t_ 1
typedef short sbits16_t; /* signed 16 bits */
#define __TYPES_HAVE_sbits32_t_ 1
typedef int sbits32_t; /* signed 32 bits */
@@ -0,0 +1,39 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/vxworks/snark.h,v 1.1.1.1 2001/11/05 17:47:17 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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: snark.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:17 tneale
* Tornado shuffle
*
* Revision 1.1 2000/01/27 18:25:30 josh
* initial checkin of porting files for vxWorks
*
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <string.h>
#define vsnprintf(w, x, y, z) vsprintf(w, y, z)
@@ -0,0 +1,46 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/vxworks/snmptalk.h,v 1.1.1.1 2001/11/05 17:47:17 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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: snmptalk.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:17 tneale
* Tornado shuffle
*
* Revision 1.1 2000/02/04 21:49:31 josh
* modified header files for clean builds of vxWorks demo
*
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
/* defines for nvutils for file manipulation */
#define SNMP_READONLY "r"
#define SNMP_READPLUS "r+"
#define SNMP_WRITEPLUS "w+"
#define SNMP_REMOVE_FILE(fname) unlink(fname)
@@ -0,0 +1,90 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/msdos/common.h,v 1.1.1.1 2001/11/05 17:47:12 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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:12 tneale
* Tornado shuffle
*
* Revision 1.7 2001/01/19 22:23:03 paul
* Update copyright.
*
* Revision 1.6 2000/03/17 00:10:27 meister
* Update copyright message
*
* Revision 1.5 1998/06/21 21:43:51 sar
* Dos compilers seem to use stricmp and strnicmp instead of casecmp
*
* Revision 1.4 1998/02/25 04:56:57 sra
* Update copyrights.
*
* Revision 1.3 1997/12/02 16:15:15 mrf
* add GLUE_NOW definition to make prng.c build on DOS
*
* Revision 1.2 1997/10/29 20:32:33 sar
* Added memory.h for some compilers to get prototypes for mem functions.
*
* Revision 1.1 1997/08/21 17:23:46 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
-------------------
*/
/*
* NIY....
*/
#ifdef CONFIG_PREAMBLE
/* zortech, watcom and intel 960 don't have a memory.h so away it goes */
#if (!defined(INSTALL_on_ztc) && !defined(INSTALL_on_watcom) && !defined(INSTALL_on_i960))
#include <memory.h>
#endif /* INSTALL_on_ztc */
#ifndef STRICMP
#define STRICMP(x, y) stricmp(x, y)
#endif
#ifndef STRNICMP
#define STRNICMP(x, y, z) strnicmp(x, y, z)
#endif
#else /* CONFIG_PREAMBLE */
#ifndef GLUE_NOW
#define GLUE_NOW() glue_now()
extern bits32_t glue_now (void);
#endif
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,153 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/winsock/envoy.h,v 1.1.1.1 2001/11/05 17:47:17 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* Configuration for Envoy on MSDOS with Attache.
*/
/*
* modification history
* --------------------
* 01a,25jun03,ps remove bad format clearcase history comment
*/
/*
* $Log: envoy.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:17 tneale
* Tornado shuffle
*
* Revision 1.7 2001/01/19 22:23:19 paul
* Update copyright.
*
* Revision 1.6 2000/03/17 00:11:05 meister
* Update copyright message
*
* Revision 1.5 1998/02/25 04:57:12 sra
* Update copyrights.
*
* Revision 1.4 1997/10/29 01:31:30 sar
* Updated the master agent installation option.
*
* Revision 1.3 1997/03/20 06:58:11 sra
* DFARS-safe copyright text. Zap!
*
* Revision 1.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 1.1 1996/10/30 17:32:19 mrf
* Initial revision
*
* Revision 1.1 1996/07/02 19:55:38 mrf
* Initial revision
*
* Revision 7.0 1996/03/18 20:25:57 sar
* Updated rev to 7.0 and copyright to 96
*
* Revision 6.1 1995/11/06 20:05:58 sar
* removed validate_community's dependency on install v1
*
* Revision 6.0 1995/05/31 22:00:34 sra
* Release 6.0.
*
* Revision 5.4 1995/05/22 19:39:49 sar
* Modified the lock code to add some new macros.
*
* Revision 5.3 1995/05/05 22:30:05 sar
* Added some default macros for the timer code.
*
* Revision 5.2 1995/05/01 21:57:42 sar
* Put the example lock macros in an if def block.
*
* Revision 5.1 1994/10/25 20:03:13 sar
* Added some simple lock code for testing and as an example, also
* added a definition for snmpresetsysuptime.
*
* Revision 5.0 1994/05/16 17:24:02 sar
* Updated revision to 5.0 and copyright to include 1994
*
* Revision 4.0 1993/06/24 17:47:40 sar
* Updated rev to 4.0 and copyright to 93
*
* Revision 1.1 1993/06/09 20:37:06 sar
* Initial revision
*/
/* [clearcase]
modification history
-------------------
*/
#if defined(CONFIG_PREAMBLE)
/*****************************************************************
*
* System Includes:
*
* The SNMP uses memcpy(), memset(), and strlen(). The appropriate
* include file should be put here to see that these routines are
* properly declared. If no such include file exists on the system
* then declare memcpy() and memset() here directly.
*****************************************************************/
/* zortech, watcom and intel 960 don't have a memory.h so away it goes */
#if (!defined(INSTALL_on_ztc) && !defined(INSTALL_on_watcom) && !defined(INSTALL_on_i960))
#include <memory.h>
#endif /* INSTALL_on_ztc */
#include <string.h>
/*****************************************************************
* Memory allocation routines. The SNMP needs to allocate memory to
* decode the packet into and also to store the response data for GET's
* and GET-NEXT's.
*****************************************************************/
/* Fix up mach 386's improper declaration of the mem* routines */
#if defined(INSTALL_on_mach386)
#define MEMCPY(dst, src, n) memcpy((char *)(dst), (char *)(src), n)
#define MEMSET(dst, val, n) memset((char *)(dst), val, n)
#define MEMCMP(dst, src, n) memcmp((char *)(dst), (char *)(src), n)
#endif
/*----------------------------------------------------------------
* Make sure that the routines used by the SNMP_memory_alloc() and
* SNMP_memory_free() macros are declared. If system memory routines
* are used (e.g. malloc() and free()) then include the appropriate
* system header file here.
----------------------------------------------------------------*/
/* The memory allocation macros */
#if defined(INSTALL_on_unix)
extern void *malloc __((unsigned));
extern void free __((void *));
#endif
#if defined(INSTALL_on_msdos)
#include <stdlib.h>
#endif
#define SNMP_memory_alloc(need) malloc(need)
#define SNMP_memory_free(buf) free(buf)
#include <wrn/wm/util/port/generic/envoy.h>
#else /* CONFIG_PREAMBLE */
#include <wrn/wm/util/port/generic/envoy.h>
#endif /* CONFIG_PREAMBLE */
@@ -0,0 +1,78 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/winsock/oemtypes.h,v 1.1.1.1 2001/11/05 17:47:17 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: oemtypes.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:17 tneale
* Tornado shuffle
*
* Revision 1.6 2001/01/19 22:23:19 paul
* Update copyright.
*
* Revision 1.5 2000/03/17 00:11:05 meister
* Update copyright message
*
* Revision 1.4 1998/02/25 04:57:12 sra
* Update copyrights.
*
* Revision 1.3 1997/03/20 06:58:10 sra
* DFARS-safe copyright text. Zap!
*
* Revision 1.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 1.1 1996/10/30 17:32:19 mrf
* Initial revision
*
* Revision 1.1 1996/07/02 19:55:38 mrf
* Initial revision
*
* Revision 7.0 1996/03/18 20:25:57 sar
* Updated rev to 7.0 and copyright to 96
*
* Revision 6.0 1995/05/31 21:51:00 sra
* Release 6.0.
*
* Revision 5.0 1994/05/16 17:24:02 sar
* Updated revision to 5.0 and copyright to include 1994
*
* Revision 4.0 1993/06/24 17:47:40 sar
* Updated rev to 4.0 and copyright to 93
*
* Revision 1.1 1993/06/09 20:37:06 sar
* Initial revision
*/
/* [clearcase]
modification history
-------------------
*/
/*
* We need to supply size_t. Everything else in <types.h> will
* work fine on with MSDOS compilers.
*/
#if defined(INSTALL_on_unix)
#include <sys/types.h>
#endif
#if defined(INSTALL_on_msdos)
#include <stddef.h>
#endif
@@ -0,0 +1,72 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/winsock/snark.h,v 1.1 2002/03/20 16:43:52 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* $Log: snark.h,v $
* Revision 1.1 2002/03/20 16:43:52 tneale
* To start with this is the same as snark.h in port/msdos
*
*
*/
/* [clearcase]
modification history
-------------------
*/
/* zortech, watcom and intel 960 don't have a memory.h so away it goes */
#if (!defined(INSTALL_on_ztc) && !defined(INSTALL_on_watcom) && !defined(INSTALL_on_i960))
#include <memory.h>
#endif /* INSTALL_on_ztc */
#include <string.h>
#include <stdlib.h>
#ifndef GLUE_ALLOC
#define GLUE_ALLOC(len) ((void *) malloc(len))
#endif
#ifndef GLUE_FREE
#define GLUE_FREE(mem) free((char *)(mem))
#endif
#ifndef MEMCPY
#define MEMCPY(x, y, z) memcpy(x, y, z)
#endif
#ifndef MEMCMP
#define MEMCMP(x, y, z) memcmp(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 STRICMP
#define STRICMP(x, y) stricmp(x, y)
#endif
#ifndef STRNICMP
#define STRNICMP(x, y, z) strnicmp(x, y, z)
#endif
@@ -0,0 +1,87 @@
/* $Header: /usr/cvsroot/target/h/wrn/wm/util/port/winsock/snmptalk.h,v 1.1.1.1 2001/11/05 17:47:17 tneale Exp $ */
/*
* Copyright (C) 1999-2004 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.
****************************************************************************/
/*
* Configuration for snmptalk on SunOS.
*/
/*
* $Log: snmptalk.h,v $
* Revision 1.1.1.1 2001/11/05 17:47:17 tneale
* Tornado shuffle
*
* Revision 1.6 2001/01/19 22:23:20 paul
* Update copyright.
*
* Revision 1.5 2000/03/17 00:11:05 meister
* Update copyright message
*
* Revision 1.4 1998/02/25 04:57:13 sra
* Update copyrights.
*
* Revision 1.3 1997/03/20 06:58:11 sra
* DFARS-safe copyright text. Zap!
*
* Revision 1.2 1997/02/25 10:58:16 sra
* Update copyright notice, dust under the bed.
*
* Revision 1.1 1996/10/30 17:32:19 mrf
* Initial revision
*
* Revision 1.1 1996/07/02 19:55:38 mrf
* Initial revision
*
* Revision 7.0 1996/03/18 20:25:29 sar
* Updated rev to 7.0 and copyright ot 96
*
* Revision 6.0 1995/05/31 21:51:00 sra
* Release 6.0.
*
* Revision 5.0 1994/05/16 16:47:41 sar
* Updated revision to 5.0 and copyright to include 1994
*
* Revision 4.0 1993/06/24 17:44:26 sar
* Updated rev to 4.0 and copyright to 93
*
* Revision 1.1 1993/06/09 19:33:45 dab
* Initial revision
*
*/
/* [clearcase]
modification history
-------------------
*/
#include <stdlib.h>
#include <string.h>
/* defines for nvutils for file manipulation */
#define SNMP_READONLY "r"
#define SNMP_READPLUS "r+"
#define SNMP_WRITEPLUS "w+"
#define SNMP_REMOVE_FILE(fname) unlink(fname)
#define BSD_RELEASE 43
#define DESIRED_WINSOCK_VERSION 0x0101
#define MINIMUM_WINSOCK_VERSION 0x0001
#define SOCKET_TIMEOUT 20L /* time to wait to for selects */