]> Frank Brehm's Git Trees - my-stuff/ipv6-hostpart.git/commitdiff
Angefangen
authorFrank Brehm <frank@brehm-online.com>
Sun, 2 Jan 2011 14:21:28 +0000 (14:21 +0000)
committerFrank Brehm <frank@brehm-online.com>
Sun, 2 Jan 2011 14:21:28 +0000 (14:21 +0000)
git-svn-id: http://svn.brehm-online.com/svn/my-stuff/ipv6-hostpart/trunk@169 ec8d2aa5-1599-4edb-8739-2b3a1bc399aa

bin/fbrehm/__init__.py [new file with mode: 0755]
bin/ipv6-hostpart.py [new file with mode: 0755]

diff --git a/bin/fbrehm/__init__.py b/bin/fbrehm/__init__.py
new file mode 100755 (executable)
index 0000000..3d21abb
--- /dev/null
@@ -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 (executable)
index 0000000..3d52fd7
--- /dev/null
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import sys
+import pprint
+
+from fbrehm.common.getopt import BaseOptParser
+
+__author__      = 'Frank Brehm <frank@brehm-online.com>'
+__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] <MAC address or IB-GUID> [<MAC> ...]'
+)
+
+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