1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright (c) 1998 by Sun Microsystems, Inc. 24 * All rights reserved. 25 */ 26 27 #pragma ident "%Z%%M% %I% %E% SMI" 28 29 #ifndef _TRAP_H_ 30 #define _TRAP_H_ 31 32 #include <sys/types.h> 33 #include "pdu.h" 34 35 /***** GLOBAL VARIABLES *****/ 36 37 extern char *trap_community; 38 39 extern Subid sun_subids[]; 40 extern Oid sun_oid; 41 42 /***** GLOBAL FUNCTIONS *****/ 43 44 extern int trap_init(Oid *default_enterprise, char *error_label); 45 46 extern int trap_send(IPAddress *ip_address, Oid *enterprise, int generic, int specific, SNMP_variable *variables, char *error_label); 47 extern int trap_send_with_more_para(IPAddress *ip_address, 48 IPAddress my_ip_addr, 49 char *community, 50 int i_flag, 51 Oid *enterprise, 52 int generic, 53 int specific, 54 int trap_port, 55 uint32_t time_stamp, 56 SNMP_variable *variables, 57 char *error_label); 58 extern int trap_destinator_add(char *name, char *error_label); 59 extern void delete_trap_destinator_list(); 60 extern void trace_trap_destinators(); 61 extern int trap_send_to_all_destinators(Oid *enterprise, int generic, int specific, SNMP_variable *variables, char *error_label); 62 extern int trap_send_to_all_destinators7(int i_flag, Oid *enterprise, int generic, int specific, uint32_t time_stamp, SNMP_variable *variables, char *error_label); 63 extern int trap_send_raw(IPAddress *ip_address, IPAddress my_ip_addr, 64 char* community,int i_flag,Oid *enterprise,int generic, 65 int specific,int trap_port,uint32_t time_stamp, 66 SNMP_variable *variables,char *error_label); 67 68 69 #endif 70