# fuchsia.device.fs

<br />

Added: 12

## **PROTOCOLS**

## Connector

*Defined in [fuchsia.device.fs/connector.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.device.fs/connector.fidl;l=21)*

A connector lets a client forward the server end of a protocol.

<br />

### Connect

Forward a server end of a protocol so that it can be connected.

- request `server` the server end of the protocol to be served. The FIDL protocol that this speaks is determined out-of-band.

<!-- -->

- response This function has no response. The function is one-way to match the pipelining behaviors of other virtual filesystems.

#### Request

| Name | Type |
|---|---|
| `server` | `handle<channel>` |

## TopologicalPath

*Defined in [fuchsia.device.fs/controller.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.device.fs/controller.fidl;l=18)*
Added: HEAD

<br />

### GetTopologicalPath

Return the topological path for this device

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.device.fs#TopologicalPath_GetTopologicalPath_Result` |

## **STRUCTS**

### TopologicalPath_GetTopologicalPath_Response

*Defined in [fuchsia.device.fs/controller.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.device.fs/controller.fidl;l=20)*

| Field | Type | Description | Default |
|---|---|---|---|
| `path` | `string:1024` |   | No default |

## **TABLES**

### DevfsAddArgs [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.device.fs/connector.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.device.fs/connector.fidl;l=34)*
Added: HEAD

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `connector` | `client_end:https://fuchsia.dev/reference/fidl/fuchsia.device.fs#Connector` | This is the connector to be installed in devfs. `Connect()` will be called when a client connects to this node in the filesystem. Optional: If this is not provided then an empty node will appear in devfs. |
| ### 2 | `class_name` | `string:255` | This is the class name for installing this node in devfs. The node will be placed within /dev/class/{class_name}. If `class_name` does not exist under /dev/class/ it will be created. Optional: If this is not provided then the node will only be added via topological path. |
| ### 3 | `inspect` | `handle<vmo>` | This is a vmo of inspect data that will be installed in devfs. Optional: If this is not provided then the devfs's inspect data will be empty. |
| ### 4 | `connector_supports` | `https://fuchsia.dev/reference/fidl/fuchsia.device.fs#ConnectionType` | The connection types that are supported by the \|connector\| given. The driver framework should handle connection types that are not supported by the connector. If not provided, only the device type is assumed as supported by the connector. Added: HEAD |
| ### 5 | `controller_connector` | `client_end:https://fuchsia.dev/reference/fidl/fuchsia.device.fs#Connector` | This is the controller connector to be installed in devfs. `Connect()` will be called when a client connects to the device_controller connection for this node in the filesystem. Optional: If this is not provided then the Node will handle the connection natively. This option should only be used by the compat shim or in tests Added: HEAD |

## **UNIONS**

### TopologicalPath_GetTopologicalPath_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.device.fs/controller.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.device.fs/controller.fidl;l=20)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.device.fs#TopologicalPath_GetTopologicalPath_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Status` |   |

<br />

## **BITS**

### ConnectionType [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint8`

*Defined in [fuchsia.device.fs/connector.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.device.fs/connector.fidl;l=11)*
Added: 16

<br />

| Name | Value | Description |
|---|---|---|
| ### NODE | 1 | Represents the fuchsia.io/Node protocol. |
| ### CONTROLLER | 2 | Represents the fuchsia.device/Controller protocol. |
| ### DEVICE | 4 | Represents the device specific FIDL. |

## **CONSTANTS**

| Name | Value | Type | Description |
|---|---|---|---|
| [DEVICE_CONTROLLER_NAME](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.device.fs/names.fidl;l=12) | `device_controller` | `String` | This name is reserved for accessing the fuchsia.device/Controller protocol within /dev/. No devices can be created with this name. |
| [DEVICE_PROTOCOL_NAME](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.device.fs/names.fidl;l=8) | `device_protocol` | `String` | This name is reserved for accessing the device specific protocol within /dev/. No devices can be created with this name. |
| [DEVICE_TOPOLOGY_NAME](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.device.fs/names.fidl;l=17) | `device_topology` | `String` | This name is reserved for accessing the fuchsia.device.fs/TopologicalPath protocol within /dev/. No devices can be created with this name. Added: HEAD |
| [MAX_DEVICE_PATH_LEN](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.device.fs/controller.fidl;l=10) | `1024` | `uint64` | Maximum length of a device path Added: HEAD |
| [MAX_DRIVER_PATH_LEN](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.device.fs/controller.fidl;l=13) | `1024` | `uint64` | Maximum length for a driver path Added: HEAD |