legal measures against encroachments