tools/usb/usbip/libsrc/usbip_common.h
Source file repositories/reference/linux-study-clean/tools/usb/usbip/libsrc/usbip_common.h
File Facts
- System
- Linux kernel
- Corpus path
tools/usb/usbip/libsrc/usbip_common.h- Extension
.h- Size
- 3825 bytes
- Lines
- 153
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
libudev.hstdint.hstdio.hstdlib.hstring.hsyslog.hunistd.hlinux/usb/ch9.hlinux/usbip.h
Detected Declarations
struct usbip_usb_interfacestruct usbip_usb_device
Annotated Snippet
struct usbip_usb_interface {
uint8_t bInterfaceClass;
uint8_t bInterfaceSubClass;
uint8_t bInterfaceProtocol;
uint8_t padding; /* alignment */
} __attribute__((packed));
struct usbip_usb_device {
char path[SYSFS_PATH_MAX];
char busid[SYSFS_BUS_ID_SIZE];
uint32_t busnum;
uint32_t devnum;
uint32_t speed;
uint16_t idVendor;
uint16_t idProduct;
uint16_t bcdDevice;
uint8_t bDeviceClass;
uint8_t bDeviceSubClass;
uint8_t bDeviceProtocol;
uint8_t bConfigurationValue;
uint8_t bNumConfigurations;
uint8_t bNumInterfaces;
} __attribute__((packed));
#define to_string(s) #s
void dump_usb_interface(struct usbip_usb_interface *);
void dump_usb_device(struct usbip_usb_device *);
int read_usb_device(struct udev_device *sdev, struct usbip_usb_device *udev);
int read_attr_value(struct udev_device *dev, const char *name,
const char *format);
int read_usb_interface(struct usbip_usb_device *udev, int i,
struct usbip_usb_interface *uinf);
const char *usbip_speed_string(int num);
const char *usbip_status_string(int32_t status);
const char *usbip_op_common_status_string(int status);
int usbip_names_init(char *);
void usbip_names_free(void);
void usbip_names_get_product(char *buff, size_t size, uint16_t vendor,
uint16_t product);
void usbip_names_get_class(char *buff, size_t size, uint8_t class,
uint8_t subclass, uint8_t protocol);
#endif /* __USBIP_COMMON_H */
Annotation
- Immediate include surface: `libudev.h`, `stdint.h`, `stdio.h`, `stdlib.h`, `string.h`, `syslog.h`, `unistd.h`, `linux/usb/ch9.h`.
- Detected declarations: `struct usbip_usb_interface`, `struct usbip_usb_device`.
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.