PySNMP Project Logo

Project diary
Documentation
Examples
License
Download
Mailing lists

Projects using PySNMP
TwistedSNMP
Zenoss


Relevant projects
SNMPy
YAPSNMP
LibSMI
Scotty software

SourceForge Logo

Objects of the asn1.IPADDRESS class.

Instances of the asn1.IPADDRESS class have the following methods:

encode([value])

The encode method converts the content of the class instance into BER octet-stream (string).

The value parameter, whenever used for last-minute payload assignment to class instance, must be given in a symbolic, "dotted" form (for example, '127.0.0.1').

decode(data)

The decode method attempts to convert the data octet-stream (string) into an IP address value, and returns a tuple of (ipaddress_class_instance, rest).

Any unprocessed part of data octet-stream is returned in the rest string.

The data octet-stream must carry an ASN.1 IP address value or an exception would be thrown.

update(value)

The update method assigns the value, given in dotted notation, to class instance payload.

__call__()

Class instance invocation would return currently stored payload in dotted notation.

__cmp__(other)

Class instances may be compared against each other. The comparation would return negative if other is greater, zero on equivalence, positive if other is less.

__repr__()

Returns the canonical string representation of the class instance.

__str__()

Returns a nice string representation of the class instance.


Need help? Try PySNMP mailing lists.