요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Export state와 remote socket
sysfs-platform-usbip-vudc:12-38Available·exported·fatal-error status를 보고하고 remote peer socket fd로 export를 열거나 -1로 닫습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
1
What: /sys/devices/platform/usbip-vudc.%d/dev_desc
2
Date: April 2016
3
KernelVersion: 4.6
4
Contact: Krzysztof Opasiak <[email protected]>
5
Description:
6
This file allows to read device descriptor of
7
gadget driver which is currently bound to this
8
controller. It is possible to read this file
9
only if gadget driver is bound, otherwise error
10
is returned.
12
What: /sys/devices/platform/usbip-vudc.%d/usbip_status
13
Date: April 2016
14
KernelVersion: 4.6
15
Contact: Krzysztof Opasiak <[email protected]>
16
Description:
17
Current status of the device.
18
Allowed values:
20
== ==========================================
21
1 Device is available and can be exported
22
2 Device is currently exported
23
3 Fatal error occurred during communication
24
with peer
25
== ==========================================
27
What: /sys/devices/platform/usbip-vudc.%d/usbip_sockfd
28
Date: April 2016
29
KernelVersion: 4.6
30
Contact: Krzysztof Opasiak <[email protected]>
31
Description:
32
This file allows to export usb device to
33
connection peer. It is done by writing to this
34
file socket fd (as a string for example "8")
35
associated with a connection to remote peer who
36
would like to use this device. It is possible to
37
close the connection by writing -1 instead of
38
socked fd.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
USB/IP virtual UDC sysfs ABI: dev desc
1-11| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/devices/platform/usbip-vudc.%d/dev_desc |
| Date | 2016년 4월 |
| KernelVersion | 4.6 |
| Contact | Krzysztof Opasiak <[email protected]> |
| Description | `/sys/devices/platform/usbip-vudc.%d/dev_desc`는 현재 controller에 bind된 gadget driver의 device descriptor를 읽게 합니다. Gadget driver가 bind된 경우에만 읽을 수 있으며, bind되지 않았으면 error를 반환합니다. |
Read dev_desc→Gadget driver bound?→Yes: return device descriptor
Read dev_desc→Gadget driver bound?→No: return error
Gadget-driver binding 여부가 dev_desc read 결과를 결정합니다.
USB/IP virtual UDC sysfs ABI: usbip status
12-26| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/devices/platform/usbip-vudc.%d/usbip_status |
| Date | 2016년 4월 |
| KernelVersion | 4.6 |
| Contact | Krzysztof Opasiak <[email protected]> |
| Description | `/sys/devices/platform/usbip-vudc.%d/usbip_status`는 device current status입니다. `1`은 device가 available하여 export할 수 있음, `2`는 현재 exported 상태, `3`은 peer와 communication 중 fatal error가 발생했음을 뜻합니다. |
ValueStatus
1Available and can be exported
2Currently exported
3Fatal error during communication with peer
Device export lifecycle과 communication failure를 구분합니다.
USB/IP virtual UDC sysfs ABI: usbip sockfd
27-38| 항목 | 한국어 전문 번역 |
|---|---|
| What | /sys/devices/platform/usbip-vudc.%d/usbip_sockfd |
| Date | 2016년 4월 |
| KernelVersion | 4.6 |
| Contact | Krzysztof Opasiak <[email protected]> |
| Description | `/sys/devices/platform/usbip-vudc.%d/usbip_sockfd`는 USB device를 connection peer에 export하게 합니다. Device 사용을 원하는 remote peer connection에 연결된 socket fd를 string, 예를 들어 `8`로 이 file에 씁니다. Socket fd 대신 `-1`을 쓰면 connection을 close할 수 있습니다. |
Remote peer connects→Write socket fd, e.g. 8→Export USB device
Write -1→Close peer connection
Remote connection의 socket fd string으로 export하고 -1로 연결을 닫습니다.
Bound gadget descriptor
sysfs-platform-usbip-vudc:1-11Gadget driver가 controller에 bind된 동안에만 device descriptor read를 허용합니다.