1. /*
  2. * @(#)file SnmpPduTrap.java
  3. * @(#)author Sun Microsystems, Inc.
  4. * @(#)version 4.10
  5. * @(#)date 04/09/15
  6. *
  7. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  8. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  9. *
  10. */
  11. package com.sun.jmx.snmp;
  12. /**
  13. * Represents an SNMPv1-trap PDU.
  14. * <P>
  15. * You will not usually need to use this class, except if you
  16. * decide to implement your own
  17. * {@link com.sun.jmx.snmp.SnmpPduFactory SnmpPduFactory} object.
  18. * <P>
  19. * The <CODE>SnmpPduTrap</CODE> extends {@link com.sun.jmx.snmp.SnmpPduPacket SnmpPduPacket}
  20. * and defines attributes specific to an SNMPv1 trap (see RFC1157).
  21. *
  22. * <p><b>This API is a Sun Microsystems internal API and is subject
  23. * to change without notice.</b></p>
  24. * @version 4.10 12/19/03
  25. * @author Sun Microsystems, Inc
  26. */
  27. public class SnmpPduTrap extends SnmpPduPacket {
  28. /**
  29. * Enterprise object identifier.
  30. * @serial
  31. */
  32. public SnmpOid enterprise ;
  33. /**
  34. * Agent address. If the agent address source was not an IPv4 one (eg : IPv6), this field is null.
  35. * @serial
  36. */
  37. public SnmpIpAddress agentAddr ;
  38. /**
  39. * Generic trap number.
  40. * <BR>
  41. * The possible values are defined in
  42. * {@link com.sun.jmx.snmp.SnmpDefinitions#trapColdStart SnmpDefinitions}.
  43. * @serial
  44. */
  45. public int genericTrap ;
  46. /**
  47. * Specific trap number.
  48. * @serial
  49. */
  50. public int specificTrap ;
  51. /**
  52. * Time-stamp.
  53. * @serial
  54. */
  55. public long timeStamp ;
  56. /**
  57. * Builds a new trap PDU.
  58. * <BR><CODE>type</CODE> and <CODE>version</CODE> fields are initialized with
  59. * {@link com.sun.jmx.snmp.SnmpDefinitions#pduV1TrapPdu pduV1TrapPdu}
  60. * and {@link com.sun.jmx.snmp.SnmpDefinitions#snmpVersionOne snmpVersionOne}.
  61. */
  62. public SnmpPduTrap() {
  63. type = pduV1TrapPdu ;
  64. version = snmpVersionOne ;
  65. }
  66. }