Commit 417b7f04 authored by Michal Vaner's avatar Michal Vaner
Browse files

Interface of the isc.net.check module

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac353@3068 e5f2f494-b856-4b98-b285-d166d9295462
parent c4652a9f
......@@ -487,6 +487,7 @@ AC_CONFIG_FILES([Makefile
src/lib/python/isc/config/tests/Makefile
src/lib/python/isc/log/Makefile
src/lib/python/isc/log/tests/Makefile
src/lib/python/isc/net/Makefile
src/lib/python/isc/notify/Makefile
src/lib/python/isc/notify/tests/Makefile
src/lib/config/Makefile
......
SUBDIRS = datasrc cc config log notify utils # Util
SUBDIRS = datasrc cc config log net notify utils # Util
python_PYTHON = __init__.py
......
SUBDIRS = tests
python_PYTHON = __init__.py check.py
pythondir = $(pyexecdir)/isc/net
"""
Here are function and classes that are related to networking.
"""
# Copyright (C) 2010 CZ NIC
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SYSTEMS CONSORTIUM
# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
# INTERNET SYSTEMS CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
"""
Checking and parsing of ports and IP addresses.
"""
def port_check(port):
"""
Takes a port as an int or string and checks if it is valid. It returns
the port as int. If it is not a valid port (the string doesn't contain
number or it is not in the valid range), it raises ValueError.
"""
pass
def addr_check(addr):
"""
Checks and parses an IP address (either IPv4 or IPv6) and returns
the IPAddr object. It raises ValueError if the passed string is not
valid IP address.
"""
pass
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment