So, I am very new to Python and version control however I think I have a patch here that will add a method to return the Solicited Multicast address for an IPv6Address instance. I'll be honest I spent 5 minutes trying to figure out how to submit this patch the proper way and just gave up because its a useful method to me but not enough to overcome the learning curve for the patching system. So I will drop a copy here. Feel free to have it, I have signed the CLA document as an individual so you should be able to use it. I welcome feedback I am sure this code is not very clear or pythonic.
Index: trunk/ipaddr.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- trunk/ipaddr.py (date 1406391300000)
+++ trunk/ipaddr.py (revision )
@@ -1813,7 +1813,15 @@
# which converts into a formatted IP string.
addr_str = str(address)
self._ip = self._ip_int_from_string(addr_str)
-
+ def solicitedMulticastAddress(self):
+ '''Returns IPv6Address Object with value of Solicited Multicast Address
+ Unless IPv6Address is multicast then return None'''
+ if self.is_multicast:
+ return None
+ solicitedMulticastPrefix = 'ff02:0000:0000:0000:0000:0001:ff{}'
+ hostBits = self.exploded[-7:]
+ hostSMA = IPv6Address(solicitedMulticastPrefix.format(hostBits))
+ return hostSMA
class IPv6Network(_BaseV6, _BaseNet):