USB_抓包

tcpdump -i usbmon1 -w uvc_capture.pcap -c 1000

usb.src == "1.2.0" || usb.dst == "1.2.0"

  1. init bh->head.

static void init_giveback_urb_bh(struct giveback_urb_bh *bh)

{

spin_lock_init(&bh->lock);

INIT_LIST_HEAD(&bh->head);

tasklet_init(&bh->bh, usb_giveback_urb_bh, (unsigned long)bh);

}

  1. add urb_list 2 bh->head.

void usb_hcd_giveback_urb(struct usb_hcd *hcd, struct urb *urb, int status)

list_add_tail(&urb->urb_list, &bh->head);

  1. replace_ bh->head with local_list.

static void usb_giveback_urb_bh(unsigned long param)

list_replace_init(&bh->head, &local_list);

(gdb) bt

#0 mon_complete (ubus=0xffffffc0e7e7c800, urb=0xffffffc0e7150c00, status=0) at drivers/usb/mon/mon_main.c:151

#1 0xffffff8008857d20 in usbmon_urb_complete (status=<optimized out>, urb=<optimized out>, bus=<optimized out>) at ./include/linux/usb/hcd.h:736

#2 __usb_hcd_giveback_urb (urb=0xffffffc0e7150c00) at drivers/usb/core/hcd.c:1764

#3 0xffffff8008858a14 in usb_giveback_urb_bh (param=18446743802722372112) at drivers/usb/core/hcd.c:1818

#4 0xffffff80080b60e8 in tasklet_action_common (tl_head=0xffffffc0efeea7c0, softirq_nr=6, a=<optimized out>) at kernel/softirq.c:522

#5 0xffffff80080b61a4 in tasklet_action (a=<optimized out>) at kernel/softirq.c:540

#6 0xffffff8008081448 in __do_softirq () at kernel/softirq.c:292

/////////

int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags)

rh_urb_enqueue(hcd, urb);

static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)

usb_hcd_link_urb_to_ep(hcd, urb);

int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb)

list_add_tail(&urb->urb_list, &urb->ep->urb_list);

///////// decode

static void __usb_hcd_giveback_urb(struct urb *urb)

urb->complete(urb);

uvc_video_complete

uvc_video_decode_isoc

0x8C

10001100

0x8D

10001101

bit0翻转表示新的一帧开始

相关推荐
归秋14218 分钟前
2026 企业 AI 办公工具选型指南:从评估框架到产品适配
大数据·运维·人工智能
Android系统攻城狮28 分钟前
Linux Gstreamer深度解析之gst_audio_encoder_set_frame_max调用流程与实战(六十一)
android·linux·运维·音视频·gstreamer音视频·音视频进阶·gstreamer音视频进阶
H.莓飛1 小时前
【C++】命名空间、缺省参数、函数重载与引用
linux·开发语言·c++·visual studio
91刘仁德1 小时前
IP协议详解:从IP协议头到网段划分、路由与NAT
linux·服务器·网络·网络协议·tcp/ip
辻弋2011 小时前
五年前的旅行视频糊成马赛克?Video2X用Real-ESRGAN逐帧重建细节,但只支持Windows、集显用户建议直接放弃
服务器·数据库·windows·游戏引擎·电脑
硅基手札2 小时前
【Linux内核专栏 14】网络协议栈
linux·运维·网络协议
沫璃染墨4 小时前
《Linux工程实践篇(一):认识设计模式——从日志系统看策略模式》
linux·c++·安全·设计模式·策略模式
工作10年+,存储芯片行业4 小时前
Linux NVMe 中断排查与性能优化:CPU 亲和性
linux·运维·服务器·windows·性能优化·ssd·pcie
wuminyu4 小时前
ForkJoinPool内部WorkQueue的Lock-Free数组操作以及并发任务窃取原理剖析
java·linux·c语言·jvm·c++
快乐の番薯4 小时前
卷王问卷考试系统自动化功能测试
运维·功能测试·自动化