-/* $Id: rredir.c,v 1.3 1996/09/14 16:54:47 wessels Exp $ */
+/* $Id: rredir.c,v 1.4 2001/01/07 10:57:13 hno Exp $ */
/*
* From: richard@hekkihek.hacom.nl (Richard Huveneers)
s++;
/* security: do not redirect to hidden files, the current
- * ** directory or the parent directory */
+ * directory or the parent directory */
if (*s == '.' || *s == '\0')
goto dont_redirect;
-
-/* -*- c++ -*- */
#ifndef _SNMP_PDU_H_
#define _SNMP_PDU_H_
*
* Author: Ryan Troll <ryan+@andrew.cmu.edu>
*
- * $Id: snmp_pdu.h,v 1.3 2001/01/07 09:55:22 hno Exp $
+ * $Id: snmp_pdu.h,v 1.4 2001/01/07 10:57:14 hno Exp $
*
**********************************************************************/
u_int time; /* Uptime */
};
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- struct snmp_pdu *snmp_pdu_create(int);
- struct snmp_pdu *snmp_pdu_clone(struct snmp_pdu *);
- struct snmp_pdu *snmp_pdu_fix(struct snmp_pdu *, int);
- struct snmp_pdu *snmp_fix_pdu(struct snmp_pdu *, int);
- void snmp_free_pdu(struct snmp_pdu *);
- void snmp_pdu_free(struct snmp_pdu *);
+struct snmp_pdu *snmp_pdu_create(int);
+struct snmp_pdu *snmp_pdu_clone(struct snmp_pdu *);
+struct snmp_pdu *snmp_pdu_fix(struct snmp_pdu *, int);
+struct snmp_pdu *snmp_fix_pdu(struct snmp_pdu *, int);
+void snmp_free_pdu(struct snmp_pdu *);
+void snmp_pdu_free(struct snmp_pdu *);
- u_char *snmp_pdu_encode(u_char *, int *, struct snmp_pdu *);
- u_char *snmp_pdu_decode(u_char *, int *, struct snmp_pdu *);
- char *snmp_pdu_type(struct snmp_pdu *);
+u_char *snmp_pdu_encode(u_char *, int *, struct snmp_pdu *);
+u_char *snmp_pdu_decode(u_char *, int *, struct snmp_pdu *);
+char *snmp_pdu_type(struct snmp_pdu *);
/* Add a NULL Variable to a PDU */
- void snmp_add_null_var(struct snmp_pdu *, oid *, int);
+void snmp_add_null_var(struct snmp_pdu *, oid *, int);
-#ifdef __cplusplus
-}
-
-#endif /*
- * * * RFC 1905: Protocol Operations for SNMPv2
- * * *
- * * * RFC 1157: A Simple Network Management Protocol (SNMP)
- * * *
- * * * PDU Types
- */
+/* RFC 1905: Protocol Operations for SNMPv2
+ *
+ * RFC 1157: A Simple Network Management Protocol (SNMP)
+ *
+ * PDU Types
+ */
#define SNMP_PDU_GET (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x0)
#define SNMP_PDU_GETNEXT (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x1)
#define SNMP_PDU_RESPONSE (ASN_CONTEXT | ASN_CONSTRUCTOR | 0x2)
#define SNMP_DEFAULT_ERRSTAT -1
#define SNMP_DEFAULT_ERRINDEX -1
#define SNMP_DEFAULT_ADDRESS 0
-#define SNMP_DEFAULT_REQID 0 /*
- * * * RFC 1907: Management Information Base for SNMPv2
- * * *
- * * * RFC 1157: A Simple Network Management Protocol (SNMP)
- * * *
- * * * Trap Types
- */
+#define SNMP_DEFAULT_REQID 0
+
+/* RFC 1907: Management Information Base for SNMPv2
+ *
+ * RFC 1157: A Simple Network Management Protocol (SNMP)
+ *
+ * Trap Types
+ */
#define SNMP_TRAP_COLDSTART (0x0)
#define SNMP_TRAP_WARMSTART (0x1)
#define SNMP_TRAP_LINKDOWN (0x2)
#define SNMP_TRAP_AUTHENTICATIONFAILURE (0x4)
#define SNMP_TRAP_EGPNEIGHBORLOSS (0x5)
#define SNMP_TRAP_ENTERPRISESPECIFIC (0x6)
-#endif /* _SNMP_PDU_H_ */
+#endif /* _SNMP_PDU_H_ */
/*
- * $Id: snmp_util.h,v 1.6 1998/09/23 17:20:04 wessels Exp $
+ * $Id: snmp_util.h,v 1.7 2001/01/07 10:57:14 hno Exp $
*/
#ifndef SNMP_UTIL_H
#define SNMP_UTIL_H
-/*
- * call a function at regular intervals (in seconds):
- */
+/* call a function at regular intervals (in seconds): */
extern void snmp_alarm(int ival, void (*handler) (void));
-/*
- * service for filedescriptors:
- */
+/* service for filedescriptors: */
extern void fd_add(int fd, void (*func) (int fd));
extern void fd_service(void);
/* ---------------------------------------------------------------------- */
/*
- * ** SNMP Agent extension for Spacer-Controler Management
- * **
- * ** Copyright (c) 1997 FT/CNET/DES/GRL Olivier Montanuy
- * **
- */
-/*
- * ** Function to safely copy a string, and ensure the last
- * ** character is always '\0'.
+ * SNMP Agent extension for Spacer-Controler Management
+ *
+ * Copyright (c) 1997 FT/CNET/DES/GRL Olivier Montanuy
*/
-void
- strcpy_safe(char *str, int str_len, char *val);
-/*
- * ** Function to get IP address of this agent
- * ** WARNING: this scans all interfaces (slow)
- */
-u_long
-Util_local_ip_address(void);
+/* Function to safely copy a string, and ensure the last
+ * character is always '\0'. */
+void strcpy_safe(char *str, int str_len, char *val);
-/*
- * ** Function to get the current time in seconds
- */
-long
- Util_time_now(void);
+/* Function to get IP address of this agent
+ * WARNING: this scans all interfaces (slow) */
+u_long Util_local_ip_address(void);
-/*
- * ** Function to determine how long the agent has been running
- * * (WARNING: this seems rather slow)
- */
-long
- Util_time_running();
+/* Function to get the current time in seconds */
+long Util_time_now(void);
-/*
- * ** Read data from file
- */
-int
- Util_file_read(char *file, int offset, char *data, int dataSz);
+/* Function to determine how long the agent has been running
+ * (WARNING: this seems rather slow) */
+long Util_time_running();
-/*
- * ** Write data into file
- */
-int
- Util_file_write(char *file, int offset, char *data, int dataSz);
+/* Read data from file */
+int Util_file_read(char *file, int offset, char *data, int dataSz);
+/* Write data into file */
+int Util_file_write(char *file, int offset, char *data, int dataSz);
/* ---------------------------------------------------------------------- */
-
-
-
-
#endif
-/* -*- c++ -*- */
#ifndef _SNMP_VARS_H_
#define _SNMP_VARS_H_
*
* Author: Ryan Troll <ryan+@andrew.cmu.edu>
*
- * $Id: snmp_vars.h,v 1.9 2001/01/07 09:55:22 hno Exp $
+ * $Id: snmp_vars.h,v 1.10 2001/01/07 10:57:14 hno Exp $
*
**********************************************************************/
int val_len;
};
-#ifdef __cplusplus
-extern "C" {
-#endif
+struct variable_list *snmp_var_new(oid *, int);
+struct variable_list *snmp_var_new_integer(oid *, int, int, unsigned char);
+struct variable_list *snmp_var_clone(struct variable_list *);
+void snmp_var_free(struct variable_list *);
- struct variable_list *snmp_var_new(oid *, int);
- struct variable_list *snmp_var_new_integer(oid *, int, int, unsigned char);
- struct variable_list *snmp_var_clone(struct variable_list *);
- void snmp_var_free(struct variable_list *);
+u_char *snmp_var_EncodeVarBind(u_char *, int *, struct variable_list *, int);
+u_char *snmp_var_DecodeVarBind(u_char *, int *, struct variable_list **, int);
- u_char *snmp_var_EncodeVarBind(u_char *, int *, struct variable_list *, int);
- u_char *snmp_var_DecodeVarBind(u_char *, int *, struct variable_list **, int);
+#define MAX_NAME_LEN 64 /* number of subid's in a objid */
-#ifdef __cplusplus
-}
-
-#endif
-#define MAX_NAME_LEN 64 /* number of subid's in a objid *//* *RFC 1902:Structure of Management Information for SNMPv2 * *Defined Types
-*
- */
+/* RFC 1902: Structure of Management Information for SNMPv2
+ *
+ * Defined Types
+ */
#define SMI_INTEGER ASN_INTEGER
#define SMI_STRING ASN_OCTET_STR
#define SMI_OBJID ASN_OBJECT_ID
/*
- * $Id: snprintf.c,v 1.17 1999/04/15 06:15:38 wessels Exp $
+ * $Id: snprintf.c,v 1.18 2001/01/07 10:57:14 hno Exp $
*/
/* ====================================================================
precision = FLOAT_DIGITS;
else if (precision == 0)
precision = 1;
- /*
- * * We use &num_buf[ 1 ], so that we have room for the sign
- */
+ /* We use &num_buf[ 1 ], so that we have room for the sign */
s = ap_gcvt(va_arg(ap, double), precision, &num_buf[1]);
if (*s == '-')
prefix_char = *s++;
/*
- * $Id: comm.cc,v 1.313 2001/01/05 09:51:37 adrian Exp $
+ * $Id: comm.cc,v 1.314 2001/01/07 10:57:14 hno Exp $
*
* DEBUG: section 5 Socket Functions
* AUTHOR: Harvest Derived
/* Select for Writing on FD, until SIZE bytes are sent. Call
- * * HANDLER when complete. */
+ * *HANDLER when complete. */
void
comm_write(int fd, char *buf, int size, CWCB * handler, void *handler_data, FREE * free_func)
{
/*
- * $Id: ftp.cc,v 1.303 2001/01/06 11:46:43 hno Exp $
+ * $Id: ftp.cc,v 1.304 2001/01/07 10:57:15 hno Exp $
*
* DEBUG: section 9 File Transfer Protocol (FTP)
* AUTHOR: Harvest Derived
int on = 1;
u_short port = 0;
/*
- * * Tear down any old data connection if any. We are about to
- * * establish a new one.
+ * Tear down any old data connection if any. We are about to
+ * establish a new one.
*/
if (ftpState->data.fd > 0) {
comm_close(ftpState->data.fd);