code: def isLoopback (self, ifname):
          
          # since not all systems have IFF_LOOPBACK as a flag defined,
          # the ifname is tested first
          if ifname.startswith('lo'):
              return True
          return (self.getFlags(ifname) & self.IFF_LOOPBACK) != 0
docs: Check whether interface is a loopback device.
          @param ifname: interface name
          @type ifname: string