> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/man/man4/xpt.4.md).

# xpt.4

`xpt` — CAM 传输层接口

## 名称

`xpt`

## 概要

`无。`

## 描述

`xpt` 驱动为用户空间应用程序提供向内核发出某些 CAM CCB 的方式。

由于 `xpt` 驱动允许直接访问 CAM 子系统，系统管理员在授予对此驱动的访问权限时应谨慎行事。如果使用不当，此驱动可能允许用户空间应用程序导致机器崩溃或数据丢失。

## 内核配置

`xpt` 驱动无需内核配置。当内核中启用 SCSI 支持时，它即被启用。每个 CAM 传输层实例对应一个 xpt 驱动实例。由于目前只有一个 CAM 传输层，因此此驱动只有一个实例。

## IOCTLS

**XPT\_SCAN\_BUS** **XPT\_RESET\_BUS** **XPT\_SCAN\_LUN** **XPT\_ENG\_INQ** **XPT\_ENG\_EXEC** **XPT\_DEBUG** **XPT\_DEV\_MATCH** **XPT\_PATH\_INQ**

**CAMIOCOMMAND** 此 ioctl 接受某些类型的 CAM CCB 并将其传递给 CAM 传输层执行。仅支持以下 CCB 类型：上述 CCB 是唯一受支持的，因为通过通用 pass-through 设备发送它们比通过绑定到特定底层 SCSI 设备的 pass-through 设备更有意义。

**CAMGETPASSTHRU** 此 ioctl 接受一个 XPT\_GDEVLIST CCB，并返回与相关设备对应的 pass-through 设备。

## 文件

**`/dev/xpt0`** `xpt` 驱动的字符设备节点。

## 诊断

无。

## 参见

cam(3), cam\_cdbparse(3), [pass(4)](/man/man4/pass.4.md), [camcontrol(8)](/man/man8/camcontrol.8.md)

## 历史

CAM 传输层驱动首次出现于 FreeBSD 3.0。

## 作者

Kenneth Merry <ken@FreeBSD.org>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://book.bsdcn.org/man/man4/xpt.4.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
