Skip to main content

Tundra-NAT64 external address translation library for Python

Project description

tundra-xaxlib-python

tundra-xaxlib-python, or Tundra-NAT64 external address translation library for Python, enables one to easily parse and constructs wireformat messages used by Tundra-NAT64 external address translation protocol (specification) in Python programs. Although this library will probably be most commonly used to implement servers, it is also able to construct request messages and parse response messages, which are actions that only the client, i.e. Tundra-NAT64, needs to perform.

Installation

Coming soon!

Usage

Classes and variables try to reflect the protocol specification as closely as possible in terms of both names and functionality, so I would recommend to start there.

This library's central (data)classes are RequestMessage, SuccessfulResponseMessage and ErroneousResponseMessage. Each of them can be instantiated the usual way, or by using the from_wireformat() classmethod for parsing wireformat. The instances then have the to_wireformat() method for constructing wireformat. The RequestMessage class has additional methods for constructing response message objects which use existing data from the request: generate_successful_response() and generate_erroneous_response(). Methods which have it documented in their docstrings raise InvalidMessageDataExc (or a subclass thereof) in case an error occurs. If you, for some reason, needed to detect the appropriate message class from wireformat or instantiate it straightaway, the WireformatParsingHelpers class is there to help with that.

Examples

  • 001_nat64.py – An example external address translation server which works almost exactly the same as Tundra-NAT64's built-in nat64 addressing mode, i.e. it is able to, without the help of a NAT66, statelessly translate packets from one source IPv6 to one source IPv4 and do the inverse process for packets going the other way.

Licensing

This project is licensed under the 3-clause BSD license – see the LICENSE file.

Programmed by Vít Labuda.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tundra-xaxlib-python-1.0.1.tar.gz (10.3 kB view details)

Uploaded Source

File details

Details for the file tundra-xaxlib-python-1.0.1.tar.gz.

File metadata

  • Download URL: tundra-xaxlib-python-1.0.1.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.2

File hashes

Hashes for tundra-xaxlib-python-1.0.1.tar.gz
Algorithm Hash digest
SHA256 41de676b8d9abfa6385f73f7d0d345f84b8e54458475a1ee151fe86a6876a015
MD5 42a07875c4c83964d762180811ac2239
BLAKE2b-256 7a958515826c844453c45ad4ce19d0e331e3e532f9f61dd187d760bb06d13c28

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page