private ReferralResult handleReferralResponse(DfsRequestType type, SMB2IoctlResponse response, DFSPath originalPath) throws Buffer.BufferException { ReferralResult result = new ReferralResult(response.getHeader().getStatusCode()); if (result.status == NtStatus.STATUS_SUCCESS.getValue()) { SMB2GetDFSReferralResponse resp = new SMB2GetDFSReferralResponse(originalPath.toPath()); resp.read(new SMBBuffer(response.getOutputBuffer())); switch (type) { case DC: handleDCReferralResponse(result, resp); break; case DOMAIN: throw new UnsupportedOperationException(DfsRequestType.DOMAIN + " not used yet."); case SYSVOL: case ROOT: case LINK: handleRootOrLinkReferralResponse(result, resp); break; default: throw new IllegalStateException("Encountered unhandled DFS RequestType: " + type); } } return result; }
private ReferralResult handleReferralResponse(DfsRequestType type, SMB2IoctlResponse response, DFSPath originalPath) throws Buffer.BufferException { ReferralResult result = new ReferralResult(response.getHeader().getStatusCode()); if (result.status == NtStatus.STATUS_SUCCESS.getValue()) { SMB2GetDFSReferralResponse resp = new SMB2GetDFSReferralResponse(originalPath.toPath()); resp.read(new SMBBuffer(response.getOutputBuffer())); switch (type) { case DC: handleDCReferralResponse(result, resp); break; case DOMAIN: throw new UnsupportedOperationException(DfsRequestType.DOMAIN + " not used yet."); case SYSVOL: case ROOT: case LINK: handleRootOrLinkReferralResponse(result, resp); break; default: throw new IllegalStateException("Encountered unhandled DFS RequestType: " + type); } } return result; }