SNMPMgr Configuration
The class accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these internal properties is provided through the config method.SNMPManager Configuration Settings
AllowSingleStepDiscovery: Whether to allow discovery to be completed in a single step.When making a discovery request in SNMPv3 while this setting is set to False (default), the component will send a second discovery request even if the agent responds to the first request with the EngineBoots and EngineTime. If set to True, the component will skip the second request if all the necessary information is returned in the first response. | |||||
CheckMessageOrigin: Whether to match the origin IP address when receiving responses.This setting specifies whether the class matches the source IP address in the response to the destination IP address of the request. When True (default) the class makes sure that response are received from the same IP to which the request was sent. In most cases this does not need to be changed. If there is a specific reason that responses are expected to originate from a different IP from that which the request was sent, this may be set to False. When False the class will not check the origin of received responses. | |||||
CompatibilityMode:
Whether to operate the component in a specific compatibility mode.This setting will cause the component to operate in a manner different than normal so that it is
compatible with third-party products and libraries. The following table lists the possible values
for this setting:
| |||||
ContextEngineId: Sets the context engine id of the SNMP entity. If set, the context engine id included in the PDU will be set. | |||||
ContextName: Sets the context name of the SNMP entity. If set, the context name included in the PDU will be set. | |||||
DecryptLogPackets: Whether to decrypt logged packets.When set to True this setting will cause the class to decrypt packets logged in on_packet_trace. This only applies when using SNMP Version 3. The default is False. | |||||
ForceLocalPort: Forces the class to bind to a specific port. The default value is True, which makes the class throw an error if local_port is busy. When ForceLocalPort is set to False and the port is busy, the class silently chooses another random port. | |||||
IgnorePortMismatch: Whether to check if the port matches when a response is received.When a response is received, the class will validate that the port in the response is the same as the port in the request. To disable this, set this to True. | |||||
MsgMaxSize: The maximum supported message size.This setting specifies the maximum supported message size in bytes. This is only applicable when snmp_version is set to 3. This corresponds to the "msgMaxSize" field in the request. | |||||
SourceAddress: The source address of the received packet.This setting holds the source address of the received packet. This may be queried at any time, including from within an event, and returns the source address of the received packet. This value is read-only. | |||||
SourcePort: The source port of the received packet.This setting holds the source port of the received packet. This may be queried at any time, including from within an event, and returns the source port of the received packet. This value is read-only. | |||||
TimeoutInMilliseconds: The timeout is treated as milliseconds.Setting TimeoutInMilliseconds to true causes the class to use the value in timeout as milliseconds instead of seconds, which is the default. | |||||
WalkInsideRange: Stops the SNMP walk if the OID value returned from an agent is outside the table.When WalkInsideRange is set to true the Walk will continue only while the OID Values returned from the agent are greater than the current OID Value. If an object is returned with an OID value that is out of this range it is not added to the objects collection, the on_error event will fire, and walk will return. The default value is true. | |||||
WalkStartOID:
Specifies the OID to be used when a Walk is performed.When this property is set and walk is called, the first request sent will contain the specified WalkStartOID value.
This feature is particularly useful in the case of errors, such as timeouts, that may occur during a Walk. In such a case, you can set WalkStartOID
to the last OID returned before the Timeout occurred then call walk again (using the original tableOID parameter value).
This will allow you to continue the Walk where it left off (when the Timeout error occurred).
Note that when store_walk_objects is set to true and WalkStartOID is set, the existing entries in objects will be maintained when walk is called and new returned objects will be added (just as if no error occurred in the initial walk call). |
UDPPort Configuration Settings
CaptureIPPacketInfo:
Used to capture the packet information.If this is set to true, the component will capture the IP packet information.
The default value for this setting is False. Note: This setting is only available in Windows. | |
DestinationAddress:
Used to get the destination address from the packet information.If CaptureIPPacketInfo is set to true, then this will be populated with the packet's destination address when a packet is received.
This information will be accessible in the DataIn event.
Note: This setting is only available in Windows. | |
DontFragment: Used to set the Don't Fragment flag of outgoing packets.When set to True, packets sent by the class will have the Don't Fragment flag set. The default value is False. | |
LocalHost:
The name of the local host through which connections are initiated or accepted.
The local_host setting contains the name of the local host
as obtained by the gethostname() system call, or if the
user has assigned an IP address, the value of that address.
In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the class initiate connections (or accept in the case of server classs) only through that interface. If the class is connected, the local_host setting shows the IP address of the interface through which the connection is made in internet dotted format (aaa.bbb.ccc.ddd). In most cases, this is the address of the local host, except for multi-homed hosts (machines with more than one IP interface). | |
LocalPort:
The port in the local host where the class binds.
This must be set before a connection is
attempted. It instructs the class to bind to a specific
port (or communication endpoint) in the local machine.
Setting this to 0 (default) enables the system to choose a port at random. The chosen port will be shown by local_port after the connection is established. local_port cannot be changed once a connection is made. Any attempt to set this when a connection is active will generate an error. This; setting is useful when trying to connect to services that require a trusted port in the client side. An example is the remote shell (rsh) service in UNIX systems. | |
MaxPacketSize: The maximum length of the packets that can be received.This setting specifies the maximum size of the datagrams that the class will accept without truncation. | |
QOSDSCPValue:
Used to specify an arbitrary QOS/DSCP setting (optional).UseConnection must be True to use this setting. This option allows you to specify an arbitrary DSCP value
between 0 and 63. The default is 0. When set to the default value the component will not set a DSCP value.
Note: This setting uses the qWAVE API is only available on Windows 7, Windows Server 2008 R2, and later. | |
QOSTrafficType:
Used to specify QOS/DSCP settings (optional).UseConnection must be True to use this setting.
You may specify either the text or integer values: BestEffort (0), Background (1), ExcellentEffort (2), AudioVideo (3), Voice (4), and Control (5).
Note: This setting uses the qWAVE API which is only available on Windows Vista and Windows Server 2008 or above. Note: QOSTrafficType must be set before setting active to true. | |
ShareLocalPort:
If set to True, allows more than one instance of the class to be active on the same local port.This option must be set before the class is activated through
the active property or it will have no effect.
The default value for this setting is False. | |
SourceIPAddress:
Used to set the source IP address used when sending a packet.This configuration setting can be used to override the source IP address when sending a packet.
Note: This setting is only available in Windows and requires that the winpcap library be installed (or npcap with winpcap compatibility). | |
SourceMacAddress:
Used to set the source MAC address used when sending a packet.This configuration setting can be used to override the source MAC address when sending a packet.
Note: This setting is only available in Windows and requires that the winpcap library be installed (or npcap with winpcap compatibility). | |
UseConnection:
Determines whether to use a connected socket.UseConnection specifies whether the class
should use a connected socket or not. The connection is
defined as an association in between the local address/port
and the remote address/port. As such, this
is not a connection in the traditional TCP sense. What it
means is only that the class will send and receive data
only to and from the specified destination.
The default value for this setting is False. | |
UseIPv6: Whether or not to use IPv6.By default, the component expects an IPv4 address for local and remote host properties, and will create an IPv4 socket. To use IPv6 instead, set this to True. |
Socket Configuration Settings
AbsoluteTimeout:
Determines whether timeouts are inactivity timeouts or absolute timeouts.If AbsoluteTimeout is set to True, any method which does not complete within Timeout seconds
will be aborted. By default, AbsoluteTimeout is False, and the timeout is an inactivity timeout.
Note: This option is not valid for UDP ports. | |
FirewallData: Used to send extra data to the firewall.When the firewall is a tunneling proxy, use this property to send custom (additional) headers to the firewall (e.g. headers for custom authentication schemes). | |
InBufferSize:
The size in bytes of the incoming queue of the socket.
This is the size of an internal queue in the TCP/IP stack.
You can increase or decrease its size depending on the amount
of data that you will be receiving. Increasing the value of the
InBufferSize setting can provide significant improvements in
performance in some cases.
Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the class is activated the InBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small. | |
OutBufferSize:
The size in bytes of the outgoing queue of the socket.This is the size of an internal queue in the TCP/IP stack.
You can increase or decrease its size depending on the amount
of data that you will be sending. Increasing the value of the
OutBufferSize setting can provide significant improvements in
performance in some cases.
Some TCP/IP implementations do not support variable buffer sizes. If that is the case, when the class is activated the OutBufferSize reverts to its defined size. The same happens if you attempt to make it too large or too small. |
Base Configuration Settings
BuildInfo: Information about the product's build.When queried, this setting will return a string containing information about the product's build. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CodePage:
The system code page used for Unicode to Multibyte translations.The default code page is Unicode UTF-8 (65001).
The following is a list of valid code page identifiers:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
LicenseInfo:
Information about the current license.When queried, this setting will return a string containing information about the license this instance of a class is using. It will return the following information:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ProcessIdleEvents: Whether the class uses its internal event loop to process events when the main thread is idle.If set to False, the class will not fire internal idle events. Set this to false to use the class in a background thread on macOS. By default this setting is True. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
SelectWaitMillis: The length of time in milliseconds the class will wait when DoEvents is called if there are no events to process.If there are no events to process when do_events is called, the class will wait for the amount of time specified here before returning. The default value is 20. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
UseInternalSecurityAPI: Tells the class whether or not to use the system security libraries or an internal implementation. By default the class will use the system security libraries to perform cryptographic functions. Setting this to True tells the class to use the internal implementation instead of using the system's security API. |