3 from abc import abstractmethod, ABCMeta
4 from cStringIO import StringIO
7 def ppp(headline, packet):
8 """ Return string containing the output of scapy packet.show() call. """
10 old_stdout = sys.stdout
14 sys.stdout = old_stdout
18 class NumericConstant(object):
19 __metaclass__ = ABCMeta
24 def __init__(self, value):
34 if self._value in self.desc_dict:
35 return self.desc_dict[self._value]
40 """ Generic test host "connected" to VPPs interface. """
55 return socket.inet_pton(socket.AF_INET, self._ip4)
62 def __init__(self, mac=None, ip4=None, ip6=None):