From a019a5d54a68a8ab5263dbad6c2d3dae66914470 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Sun, 2 Jan 2011 14:21:28 +0000 Subject: [PATCH] Angefangen git-svn-id: http://svn.brehm-online.com/svn/my-stuff/ipv6-hostpart/trunk@169 ec8d2aa5-1599-4edb-8739-2b3a1bc399aa --- bin/fbrehm/__init__.py | 9 +++++++++ bin/ipv6-hostpart.py | 31 +++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100755 bin/fbrehm/__init__.py create mode 100755 bin/ipv6-hostpart.py diff --git a/bin/fbrehm/__init__.py b/bin/fbrehm/__init__.py new file mode 100755 index 0000000..3d21abb --- /dev/null +++ b/bin/fbrehm/__init__.py @@ -0,0 +1,9 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +''' +@author: Frank Brehm +@contact: frank@brehm-online.com +@copyright: (c) 2010 - 2011 by Frank Brehm, Berlin +@summary: All my own stuff +''' +# vim: fileencoding=utf-8 filetype=python ts=4 diff --git a/bin/ipv6-hostpart.py b/bin/ipv6-hostpart.py new file mode 100755 index 0000000..3d52fd7 --- /dev/null +++ b/bin/ipv6-hostpart.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import sys +import pprint + +from fbrehm.common.getopt import BaseOptParser + +__author__ = 'Frank Brehm ' +__contact__ = 'frank@brehm-online.com' +__copyright__ = '(C) 2010 by Frank Brehm, Berlin' +__version__ = '0.0.1' +__license__ = 'GPL3' + +opt_parser = BaseOptParser( + version = __version__, + prog = 'ipv6-hostpart.py', + description = u'Calculates the 64 bit host part of an IPv6 address by given MAC addresses or infiniband GUIDs.', + usage = u'%s [Options] [ ...]' +) + +opt_parser.getOpts() + +verbose = opt_parser.options.verbose + +if len( opt_parser.args ) < 1: + print >> sys.stderr, "No MAC address or IB-GUID given\n" + opt_parser.parser.print_help( sys.stderr ) + sys.exit(1) + +# vim: fileencoding=utf-8 filetype=python ts=4 expandtab -- 2.39.5