Lines Matching refs:netmask
1058 # the form "a.b.c.d/n" or "a.b.c.d/e.f.g.h", or an ip and netmask as
1080 handle_kwarg(self, kwargs, 'netmask')
1084 if not 'ip' in kwargs and not 'netmask' in kwargs:
1087 handle_kwarg(self, kwargs, 'netmask', args[0])
1090 self.netmask = args[0].netmask
1092 (self.ip, self.netmask) = convert.toIpNetmask(args[0])
1096 self.netmask = args[1]
1110 return "%s/%d" % (super(IpNetmask, self).__str__(), self.netmask)
1114 return self.ip == other.ip and self.netmask == other.netmask
1117 return (self.ip, self.netmask) == convert.toIpNetmask(other)
1125 if self.netmask < 0 or self.netmask > 32:
1126 raise TypeError("invalid netmask %d" % netmask)
1130 return IpNetmask(self.ip, self.netmask)