Examples of UdpAddress


Examples of org.snmp4j.smi.UdpAddress

                                        SnmpNotificationMIB notificationMIB) {
    targetMIB.addDefaultTDomains();

    targetMIB.addTargetAddress(new OctetString("notification"),
                               TransportDomains.transportDomainUdpIpv4,
                               new OctetString(new UdpAddress("127.0.0.1/162").getValue()),
                               200, 1,
                               new OctetString("notify"),
                               new OctetString("v2c"),
                               StorageType.permanent);
    targetMIB.addTargetParams(new OctetString("v2c"),
View Full Code Here

Examples of org.snmp4j.smi.UdpAddress

      String oid, int port) throws SNMPException {
    int ret = 0;   
    address= address + "/" + port;
   
    try {
      Address targetaddress = new UdpAddress(address);
      TransportMapping transport = new DefaultUdpTransportMapping();
      transport.listen();
      CommunityTarget comtarget = new CommunityTarget();
      comtarget.setCommunity(new OctetString(community));
      comtarget.setVersion(SnmpConstants.version1);
View Full Code Here

Examples of org.snmp4j.smi.UdpAddress

  private final SNMPv3<UdpAddress> v3Client;

  public LiveSNMPTest() throws IOException {

    final InetAddress ip = InetAddress.getByName("192.168.0.1");
    this.address = new UdpAddress(ip,
        SnmpConstants.DEFAULT_COMMAND_RESPONDER_PORT);

    final UsmUser usmUser = new UsmUser(V3SECURITYNAME, V3AUTHPROTO,
        V3AUTHPASS, V3PRIVPROTO, V3PRIVPASS);
    this.v1Client = new StandardSNMPv1<UdpAddress>(V1V2COMMUNITY,
View Full Code Here

Examples of org.snmp4j.smi.UdpAddress

    public SnmpHelper(String address, String community) {
        _target = new CommunityTarget();
        _target.setCommunity(new OctetString(community));
        _target.setVersion(SnmpConstants.version2c);
        _target.setAddress(new UdpAddress(address));
        try {
            _snmp = new Snmp(new DefaultUdpTransportMapping());
        } catch (IOException e) {
            _snmp = null;
            throw new CloudRuntimeException(" Error in crearting snmp object, " + e.getMessage());
View Full Code Here

Examples of org.snmp4j.smi.UdpAddress

    }
    // Create Target Address object
    CommunityTarget comtarget = new CommunityTarget();
    comtarget.setCommunity(new OctetString(Settings.get("snmp.community", "public")));
    comtarget.setVersion(SnmpConstants.version1);
    comtarget.setAddress(new UdpAddress(ipAddress + "/" + Settings.getInt("snmp.port", 161)));
    comtarget.setRetries(2);
    comtarget.setTimeout(1000);
    // Create the PDU object
    // Create Snmp object
    Snmp snmp = new Snmp(transport);
View Full Code Here

Examples of org.snmp4j.smi.UdpAddress

  /**
   * Configures a {@link DefaultUdpTransportMapping} and starts listening on
   * <code>SnmpBinding.port</code> for incoming SNMP Traps.
   */
  private void listen() {
    UdpAddress address = new UdpAddress(SnmpBinding.port);
    try {
      if (transport != null) {
        transport.close();
        transport = null;
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.