public TSM(OctetString localEngineID, boolean usePrefix) { this.counterSupport = CounterSupport.getInstance(); this.localEngineID = localEngineID; this.usePrefix = usePrefix; }
public TSM(OctetString localEngineID, boolean usePrefix) { this.counterSupport = CounterSupport.getInstance(); this.localEngineID = localEngineID; this.usePrefix = usePrefix; }
public DefaultSshTransportMapping(SshTransportAdapter transportAdapter) { this.transportAdapter = transportAdapter; this.counterSupport = CounterSupport.getInstance(); }
/** * Creates a DTLS transport mapping that binds to the given address * (interface) on the local host. * * @param securityCallback a security name callback to resolve X509 certificates to tmSecurityNames. * @param serverAddress the UdpAddress instance that describes the server address to listen * on incoming connection requests. * @throws IOException if the given address cannot be bound. */ public DTLSTM(TlsTmSecurityCallback<X509Certificate> securityCallback, UdpAddress serverAddress) throws IOException { this(securityCallback, serverAddress, CounterSupport.getInstance()); }
/** * Creates a TLS transport mapping that binds to the given address * (interface) on the local host. * * @param securityCallback * a security name callback to resolve X509 certificates to tmSecurityNames. * @param serverAddress * the TcpAddress instance that describes the server address to listen * on incoming connection requests. * * @throws java.io.IOException * if the given address cannot be bound. */ public TLSTM(TlsTmSecurityCallback<X509Certificate> securityCallback, TlsAddress serverAddress) throws IOException { this(securityCallback, serverAddress, CounterSupport.getInstance()); }
/** * Creates a TLS transport mapping that binds to the given address * (interface) on the local host. * * @param securityCallback * a security name callback to resolve X509 certificates to tmSecurityNames. * @param serverAddress * the TcpAddress instance that describes the server address to listen * on incoming connection requests. * @throws java.io.IOException * if the given address cannot be bound. */ public TLSTM(TlsTmSecurityCallback<X509Certificate> securityCallback, TlsAddress serverAddress) throws IOException { this(securityCallback, serverAddress, CounterSupport.getInstance()); }
/** * Creates a default TCP transport mapping with the server for incoming * messages disabled. * @throws UnknownHostException * if the local host cannot be determined. */ public TLSTM() throws UnknownHostException { super(new TlsAddress(InetAddress.getLocalHost(), 0)); this.counterSupport = CounterSupport.getInstance(); super.maxInboundMessageSize = MAX_TLS_PAYLOAD_SIZE; }
/** * Creates a default TCP transport mapping with the server for incoming * messages disabled. * * @throws UnknownHostException * if the local host cannot be determined. */ public TLSTM() throws UnknownHostException { super(new TlsAddress(InetAddress.getLocalHost(), 0)); this.counterSupport = CounterSupport.getInstance(); super.maxInboundMessageSize = MAX_TLS_PAYLOAD_SIZE; this.tlsMaxFragmentSize = TLS_MAX_FRAGMENT_SIZE; }
/** * Creates a default UDP transport mapping with the server for incoming * messages disabled. * * @throws UnknownHostException if the local host cannot be determined. */ public DTLSTM() throws IOException { super(new UdpAddress(InetAddress.getLocalHost(), 0)); this.counterSupport = CounterSupport.getInstance(); super.maxInboundMessageSize = MAX_TLS_PAYLOAD_SIZE; setSocketTimeout(DEFAULT_SOCKET_TIMEOUT); }
/** * Creates a MPv3 with a supplied local engine ID and {@link PDUFactory} * for incoming messages. * @param localEngineID * the local engine ID. Its length must be greater or equal than 5 and less or equal than 32. * @param incomingPDUFactory * a {@link PDUFactory}. If {@code null} the default factory will be * used which creates {@link ScopedPDU} instances. * @since 1.9.1 */ public MPv3(byte[] localEngineID, PDUFactory incomingPDUFactory) { this(localEngineID, incomingPDUFactory, SecurityProtocols.getInstance(), SecurityModels.getInstance(), CounterSupport.getInstance()); }
/** * Creates a MPv3 with a supplied local engine ID and {@link PDUFactory} * for incoming messages. * @param localEngineID * the local engine ID. Its length must be >= 5 and <= 32. * @param incomingPDUFactory * a {@link PDUFactory}. If <code>null</code> the default factory will be * used which creates {@link ScopedPDU} instances. * @since 1.9.1 */ public MPv3(byte[] localEngineID, PDUFactory incomingPDUFactory) { this(localEngineID, incomingPDUFactory, SecurityProtocols.getInstance(), SecurityModels.getInstance(), CounterSupport.getInstance()); }
/** * Creates a MPv3 with a supplied local engine ID and {@link PDUFactory} * for incoming messages. * @param localEngineID * the local engine ID. Its length must be greater or equal than 5 and less or equal than 32. * @param incomingPDUFactory * a {@link PDUFactory}. If {@code null} the default factory will be * used which creates {@link ScopedPDU} instances. * @since 1.9.1 */ public MPv3(byte[] localEngineID, PDUFactory incomingPDUFactory) { this(localEngineID, incomingPDUFactory, SecurityProtocols.getInstance(), SecurityModels.getInstance(), CounterSupport.getInstance()); }
/** * Creates a USM with the support for the supplied security protocols. * * @param securityProtocols * the security protocols to support. * @param localEngineID * the local engine ID. * @param engineBoots * the number of engine boots. * @since 1.2 */ public USM(SecurityProtocols securityProtocols, OctetString localEngineID, int engineBoots) { this.localEngineID = localEngineID; timeTable = new UsmTimeTable(localEngineID, engineBoots); userTable = new UsmUserTable(); this.securityProtocols = securityProtocols; counterSupport = CounterSupport.getInstance(); }
/** * Creates a USM with the support for the supplied security protocols. * * @param securityProtocols * the security protocols to support. * @param localEngineID * the local engine ID. * @param engineBoots * the number of engine boots. * @since 1.2 */ public USM(SecurityProtocols securityProtocols, OctetString localEngineID, int engineBoots) { this.localEngineID = localEngineID; timeTable = new UsmTimeTable(localEngineID, engineBoots); userTable = new UsmUserTable(); this.securityProtocols = securityProtocols; counterSupport = CounterSupport.getInstance(); }
/** * Creates a USM with the support for the supplied security protocols. * * @param securityProtocols * the security protocols to support. * @param localEngineID * the local engine ID. * @param engineBoots * the number of engine boots. * * @since 1.2 */ public USM(SecurityProtocols securityProtocols, OctetString localEngineID, int engineBoots) { this.localEngineID = localEngineID; timeTable = new UsmTimeTable(localEngineID, engineBoots); userTable = new UsmUserTable(); this.securityProtocols = securityProtocols; counterSupport = CounterSupport.getInstance(); }
/** * <p>fillTreeFromSNMP.</p> * * @param root a {@link net.itransformers.snmp2xml4j.snmptoolkit.Node} object. * @throws java.io.IOException if any. */ protected void fillTreeFromSNMP(Node root) throws IOException { CounterSupport.getInstance().addCounterListener(new DefaultCounterListener()); // AbstractTransportMapping transport = new DefaultUdpTransportMapping(localAddress); // TableUtils tutils = new TableUtils(snmp, pduFactory); fillTreeFromSNMP(root, tutils); }
/** * This is a convenience constructor which can be used to create a MPv3 which * is bound to a specific USM instance. A dedicated USM instance per * MPv3 is necessary if multiple {@link Snmp} instances are used within a VM. * @param usm * an USM instance. * @since 1.10 */ public MPv3(USM usm) { this(usm.getLocalEngineID().getValue(), null, SecurityProtocols.getInstance(), SecurityModels.getCollection(new SecurityModel[]{usm}), CounterSupport.getInstance()); }
/** * This is a convenience constructor which can be used to create a MPv3 which * is bound to a specific USM instance. A dedicated USM instance per * MPv3 is necessary if multiple {@link Snmp} instances are used within a VM. * @param usm * an USM instance. * @since 1.10 */ public MPv3(USM usm) { this(usm.getLocalEngineID().getValue(), null, SecurityProtocols.getInstance(), SecurityModels.getCollection(new SecurityModel[] { usm }), CounterSupport.getInstance()); }
/** * This is a convenience constructor which can be used to create a MPv3 which * is bound to a specific USM instance. A dedicated USM instance per * MPv3 is necessary if multiple {@link Snmp} instances are used within a VM. * @param usm * an USM instance. * @since 1.10 */ public MPv3(USM usm) { this(usm.getLocalEngineID().getValue(), null, SecurityProtocols.getInstance(), SecurityModels.getCollection(new SecurityModel[]{usm}), CounterSupport.getInstance()); }
public SnmpRequest(String[] args) { // Set the default counter listener to return proper USM and MP error // counters. CounterSupport.getInstance().addCounterListener(new DefaultCounterListener()); vbs.add(new VariableBinding(new OID("1.3.6"))); int paramStart = parseArgs(args); if (paramStart >= args.length) { printUsage(); System.exit(1); } else if (operation != SNAPSHOT_DUMP) { checkOptions(); address = getAddress(args[paramStart++]); Vector<VariableBinding> vbs = getVariableBindings(args, paramStart); checkTrapVariables(vbs); if (vbs.size() > 0) { this.vbs = vbs; } } }