usb设备拓扑关系

1.简介

我们在调试分析USB时通常要知道设备是被挂载到哪一个usb端口上,或者usb端口中接入一个hub,hub上又接了设备,那么这个设备是被接到hub中的哪一个端口呢。
要想知道这些usb驱动框架提供了两种查看方式:

  • 早期的系统linux-2.6采用的是/proc/bus/usb的方式进行查看设备挂载的拓扑关系。
    在linux-3.3之后移除了usbfs,改成通过debugfs的方式查看拓扑关系,并将/proc/bus/usb移到/dev/bus/usb下.
  • 通过libusb utils工具进行查看拓扑关系

2.usbfs和debugfs拓扑

USB设备的usbfs文件系统传统上安装在/proc/bus/usb。它提供/proc/bus/usb/devices文件,以及/proc/bus/usb/BBB/DDD文件。
在许多现代系统中linux-3.3以后的版本,根本不使用usbfs文件系统。相反USB设备节点是在/dev/USB/或类似的地方创建的。这个“devices”文件在debugfs中可用,通常为/sys/kernel/debug/usb/设备。

2.1挂载方式

  • usbfs
    系统配置挂载:
    Device Drivers —>
    [] USB Support —>
    [
    ] USB device filesystem(DEPRECATED)
    或者手动挂载
    mount -t usbfs usbfs /proc/bus/usb/
    这样可以通过查看/proc/bus/usb/devices文件,对文件内容进行分析

  • debugfs
    手动挂载
    mount -t debugfs none /sys/kernel/debug/
    详细的挂载可以参考自动挂载方式

2.2拓扑关系信息说明

当我们挂载了usbfs文件之后,就可以对文件进行查看所有的usb 设备挂载的信息。
我们以新的debugfs的方式进行举例,这种方式对于usbfs来说就是对相应的挂载文件做了迁移。

2.2.1usb总线上的设备信息

进入到/sys/bus/usb/devices文件进行查看,该文件列出了所有设备在usb总线上的挂载情况。

aiv8167sm3_bsp:/proc/bus $ ls /sys/bus/usb/devices/ -l
total 0
lrwxrwxrwx 1 root root 0 2023-03-06 17:49 1-0:1.0 -> ../../../devices/platform/soc/mt_usb/musb-hdrc/usb1/1-0:1.0
lrwxrwxrwx 1 root root 0 2023-03-06 22:34 1-1 -> ../../../devices/platform/soc/mt_usb/musb-hdrc/usb1/1-1
lrwxrwxrwx 1 root root 0 2023-03-06 22:35 1-1.2 -> ../../../devices/platform/soc/mt_usb/musb-hdrc/usb1/1-1/1-1.2
lrwxrwxrwx 1 root root 0 2023-03-06 22:35 1-1.2:1.0 -> ../../../devices/platform/soc/mt_usb/musb-hdrc/usb1/1-1/1-1.2/1-1.2:1.0
lrwxrwxrwx 1 root root 0 2023-03-06 22:35 1-1.2:1.1 -> ../../../devices/platform/soc/mt_usb/musb-hdrc/usb1/1-1/1-1.2/1-1.2:1.1
lrwxrwxrwx 1 root root 0 2023-03-06 22:34 1-1:1.0 -> ../../../devices/platform/soc/mt_usb/musb-hdrc/usb1/1-1/1-1:1.0
lrwxrwxrwx 1 root root 0 2023-03-06 17:49 2-0:1.0 -> ../../../devices/platform/soc/11190000.usb/musbfsh-hdrc.0/usb2/2-0:1.0
lrwxrwxrwx 1 root root 0 2023-03-06 17:12 usb1 -> ../../../devices/platform/soc/mt_usb/musb-hdrc/usb1
lrwxrwxrwx 1 root root 0 2023-03-06 17:12 usb2 -> ../../../devices/platform/soc/11190000.usb/musbfsh-hdrc.0/usb2

其中 usbx/第x个总线,x-y:a.b/的目录格式,x表示总线号,y表示端口,a表示配置,b表示接口。
官方给的 linux系统下 sysfs关于USB文件结构关系如下:

Q: What are the sysfs structures for Linux USB?
A: For example the directory will have something like:

# ls  /sys/bus/usb/devices/
1-0:1.0      1-1.3        1-1.3.1:1.0  1-1:1.0
1-1          1-1.3.1      1-1.3:1.0    usb1

The names that begin with "usb" refer to USB controllers. More accurately, they refer to the "root hub" associated with each controller. The number is the USB bus number. In the example there is only one controller, so its bus is number 1. Hence the name "usb1".

"1-0:1.0" is a special case. It refers to the root hub's interface. This acts just like the interface in an actual hub an almost every respect; see below.

All the other entries refer to genuine USB devices and their interfaces. The devices are named by a scheme like this:

	bus-port.port.port ...

In other words, the name starts with the bus number followed by a '-'. Then comes the sequence of port numbers for each of the intermediate hubs along the path to the device.

For example, "1-1" is a device plugged into bus 1, port 1. It happens to be a hub, and "1-1.3" is the device plugged into port 3 of that hub. That device is another hub, and "1-1.3.1" is the device plugged into its port 1.

The interfaces are indicated by suffixes having this form:

	:config.interface

That is, a ':' followed by the configuration number followed by '.' followed by the interface number. In the above example, each of the devices is using configuration 1 and this configuration has only a single interface, number 0. So the interfaces show up as;

	1-1:1.0		1-1.3:1.0		1-1.3.1:1.0

A hub will never have more than a single interface; that's part of the USB spec. But other devices can and do have multiple interfaces (and sometimes multiple configurations). Each interface gets its own entry in sysfs and can have its own driver.

主要意思就是:

  1. 以usb开头的代表usb controller(可以理解usb驱动)也就是一个roothub即代表一个usb总线,后面跟着的数字即代表总线号,从1开始递增。如:usb1 usb2 usbx等
  2. “1-0:1.0” “2-0:1.0” 是一个特殊的实例,代表是一个root hub接口。
    “1-0:1.0” 就代表总线1的root hub, “2-0:1.0” 就代表总线2的root hub;

注意:一个hub只有一个interface

  1. 其它的文件命名,都代表一个具体的usb设备,命名规则如下:
    bus-port.port.port …
    每一个名称都是以总线号开始,然后用‘-’进行连接,后面跟着是设备路径devpath端口序号,可以理解为端口号。
    举例:
    “1-1” 代表插入总线1端口为1的设备, 它代表的是一个hub设备,可以通过bDeviceClass查看09
    “1-1.2” 代表插入总线1端口为1的设备上的它的端口为2的设备,它代表的是一个cdc设备, 可以通过bDeviceClass查看02
  2. 接口由以下的形式进行表示:
    :config.interface
    就是’:'后面跟着配置号,后面跟着“.”后跟接口号。在上面的示例中,每个设备都使用配置1,该配置只有一个接口,编号为0。因此,界面显示为:
    1-1:1.0 1-1.3:1.0 1-1.3.1:1.0 // 上述官方实例
    1-1.2:1.0 1-1.2:1.1 1-1:1.0 // 实际实例

一个集线器hub永远只有一个接口;这是USB规范的一部分,但其他设备可以也确实有多个接口(有时还有多种配置)。每个接口在sysfs中都有自己的条目,并且可以有自己的驱动程序。

2.2.2总线上特定设备的详细信息

进入到某个目录中去,可以看到该设备的详细信息,可用cat命令获取具体文件信息。

aiv8167sm3_bsp:/sys/bus/usb/devices $ cd 1-1
aiv8167sm3_bsp:/sys/bus/usb/devices/1-1 $ ls
1-1.2      avoid_reset_quirk   bDeviceProtocol bMaxPower          bcdDevice    configuration devnum  ep_00     ltm_capable power   removable   speed     urbnum
1-1:1.0    bConfigurationValue bDeviceSubClass bNumConfigurations bmAttributes descriptors   devpath idProduct maxchild    product remove      subsystem version
authorized bDeviceClass        bMaxPacketSize0 bNumInterfaces     busnum       dev           driver  idVendor  port        quirks  set_suspend uevent
aiv8167sm3_bsp:/sys/bus/usb/devices/1-1 $ cd 1-1.2/
aiv8167sm3_bsp:/sys/bus/usb/devices/1-1/1-1.2 $ ls
1-1.2:1.0  avoid_reset_quirk   bDeviceProtocol bMaxPower          bcdDevice    configuration devnum  ep_00     ltm_capable  port    quirks    serial      subsystem version
1-1.2:1.1  bConfigurationValue bDeviceSubClass bNumConfigurations bmAttributes descriptors   devpath idProduct manufacturer power   removable set_suspend uevent
authorized bDeviceClass        bMaxPacketSize0 bNumInterfaces     busnum       dev           driver  idVendor  maxchild     product remove    speed       urbnum
aiv8167sm3_bsp:/sys/bus/usb/devices/1-1/1-1.2 $ cat bDe
bDeviceClass     bDeviceProtocol  bDeviceSubClass
aiv8167sm3_bsp:/sys/bus/usb/devices/1-1/1-1.2 $ cat bDeviceClass
02

sysfs usb device结构参考

2.3debugfs中的设备拓扑信息

cat /sys/kernel/debug/usb/devices该文件信息:
如果是usbfs文件需要cat /proc/bus/usb/devices.

执行cat命令之后会以特定格式打印目前USB总线上所有USB设备的信息如下:

aiv8167sm3_bsp:/ $ cat /sys/kernel/debug/usb/devices

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12   MxCh= 1
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0001 Rev= 4.04
S:  Manufacturer=Linux 4.4.95 musbfsh-hcd
S:  Product=MUSBFSH HDRC host driver
S:  SerialNumber=musbfsh-hdrc.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 4.04
S:  Manufacturer=Linux 4.4.95 musb-hcd
S:  Product=MUSB HDRC host driver
S:  SerialNumber=musb-hdrc
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  9 Spd=480  MxCh= 4
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1a40 ProdID=0101 Rev= 1.11
S:  Product=USB 2.0 Hub
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=256ms

T:  Bus=01 Lev=02 Prnt=09 Port=01 Cnt=01 Dev#= 10 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=28e9 ProdID=018a Rev= 0.08
S:  Manufacturer=GMJK
S:  Product=GMJK_MZY_M22_Virtual_Comport
S:  SerialNumber=8A8B85C81150
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=(none)
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
E:  Ad=03(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
aiv8167sm3_bsp:/ $

至于信息的详细解析可以参照 Linux源代码中 Documentation/usb/proc_usb_info.txt 文件。现摘录其中对该格式的详细解释:
每一行都标有该行的一个字符ID开始, ID标识有以下几种:

Each line is tagged with a one-character ID for that line:
 
T = Topology (etc.)
    总线拓扑(Topology)结构(Lev, Prnt, Port, Cnt, 等),是指USB设备和主机之间的连接⽅式。
B = Bandwidth (applies only to USB host controllers, which are
    virtualized as root hubs)
    带宽(Bandwidth)('仅⽤于USB主控制器')。
D = Device descriptor info.
P = Product ID info. (from Device descriptor, but they won't fit
    together on one line)
S = String descriptors.
C = Configuration descriptor info. (* = active configuration)
I = Interface descriptor info.
E = Endpoint descriptor info.
Legend: (具体使用见下文)
  d = decimal number (may have leading spaces or 0's)
  x = hexadecimal number (may have leading spaces or 0's)
  s = string
T(Topology )
T:   Bus=dd Lev=dd Prnt=dd Port=dd Cnt=dd Dev#=ddd Spd=ddd MxCh=dd
|      |     |      |       |       |      |        |        |__最⼤⼦设备
|      |     |      |       |       |      |        |__设备速度(Mbps)
|      |     |      |       |       |      |__设备编号
|      |     |      |       |       |__这层的设备数
|      |     |      |       |__此设备的⽗连接器/端⼝
|      |     |      |__⽗设备号
|      |     |__此总线在拓扑结构中的层次
|      |__总线编号
|__拓扑信息标志
B(Bandwidth)
B:   Alloc=ddd/ddd us (xx%), #Int=ddd, #Iso=ddd
|       |                      |         |__同步请求编号
|       |                      |__中断请求号
|       |__分配给此总线的总带宽
|__带宽信息标志

D(Device descriptor info)
D:   Ver=x.xx Cls=xx(sssss) Sub=xx Prot=xx MxPS=dd #Cfgs=dd
|       |      |             |      |       |        |__配置编号
|       |      |             |      |       |______缺省终端点的最⼤包尺⼨
|       |      |             |      |__设备协议
|       |      |             |__设备⼦类型
|       |      |__设备类型
|       |__设备USB版本
|__设备信息标志编号#1

P(Product ID info)
P:   Vendor=xxxx ProdID=xxxx Rev=xx.xx
|       |          |          |__产品修订号
|       |          |__产品标识编码
|       |__制造商标识编码
|__设备信息标志编号#2

S(String descriptors)
S:   Manufacturer=ssss
|       |__设备上读出的制造商信息
|__串描述信息
S:   Product=ssss
|      |__设备上读出的产品描述信息,对于USB主控制器此字段为"USB *HCI Root Hub"
|__串描述信息

S:   SerialNumber=ssss
|       |__设备上读出的序列号,对于USB主控制器它是⼀个⽣成的字符串,表⽰设备标识
|__串描述信息

C (Configuration descriptor info)
C:   #Ifs=dd Cfg#=dd Atr=xx MPwr=dddmA
|     |      |       |      |__最⼤电流(mA)
|     |      |       |__属性
|     |      |__配置编号
|     |__接⼝数
|__配置信息标志

I (Interface descriptor info)

可以为多个

I:   If#=dd Alt=dd #EPs=dd Cls=xx(sssss) Sub=xx Prot=xx Driver=ssss
|    |      |       |       |             |     |        |__驱动名
|    |      |       |       |             |     |__接⼝协议
|    |      |       |       |             |__接⼝⼦类
|    |      |       |       |__接⼝类
|    |      |       |__端点数
|    |      |__可变设置编号
|    |__接⼝编号
|__接⼝信息标志

E (Endpoint descriptor info)
E:   Ad=xx(s) Atr=xx(ssss) MxPS=dddd Ivl=dddms
|    |        |             |         |__间隔
|    |        |             |__终端点最⼤包尺⼨
|    |        |__属性(终端点类型)
|    |__终端点地址(I=In,O=Out)
|__终端点信息标志

3.usbutils工具拓扑

usbutils是GNU/Linux系统中用于查看USB设备信息的工具。依赖于libusb接口库
usbutils中包含的命令:

3.1lsusb命令

lsusb是显示系统中以及连接到系统的USB总线信息的工具。换句话说,lsusb命令用于显示本机的USB设备列表及其详细信息。在Linux中,可以使用lsusb来列出USB设备和它的属性,是一个学习USB驱动开发、认识USB设备的好助手。

命令选项如下:

-v, --verbose:显示USB设备的详细信息
-vv:显示USB设备的完整信息
-s:仅显示指定的总线和(或)设备号的设备
-d:仅显示指定厂商和产品编号的设备
-D:设备路径。不扫描/proc/bus/usb,而以指定的设备路径取代
-t, --tree:以树状结构显示物理USB设备的层次
-V, --version:显示命令的版本信息
-h, --help:显示命令用法和帮助信息

我们主要讲解lsusb -t 树状结构的拓扑关系。

$ lsusb -t

/: Bus 08.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 07.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/6p, 480M
|__ Port 1: Dev 4, If 0, Class=stor., Driver=usb-storage, 480M
|__ Port 6: Dev 3, If 0, Class=’bInterfaceClass 0x0e not yet handled’, Driver=uvcvideo, 480M
|__ Port 6: Dev 3, If 1, Class=’bInterfaceClass 0x0e not yet handled’, Driver=uvcvideo, 480M
/: Bus 01.Port 1: Dev 1, Class=root\_hub, Driver=ehci_hcd/6p, 480M

release@ubuntu:~$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
    |__ Port 1: Dev 7, If 0, Class=Hub, Driver=hub/7p, 480M
        |__ Port 6: Dev 12, If 0, Class=Communications, Driver=cdc_ether, 480M
        |__ Port 6: Dev 12, If 1, Class=CDC Data, Driver=cdc_ether, 480M

release@release:~$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
    |__ Port 14: Dev 3, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 4: Dev 5, If 0, Class=Hub, Driver=hub/4p, 480M

lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    |__ Port 1: Dev 2, If 0, Class=, Driver=hub/4p, 5000M
        |__ Port 4: Dev 3, If 0, Class=, Driver=usb-storage, 5000M          // u盘
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=, Driver=hub/4p, 480M
        |__ Port 1: Dev 5, If 0, Class=, Driver=usbhid, 1.5M                // 脚踏板
        |__ Port 1: Dev 5, If 1, Class=, Driver=usbhid, 1.5M                // 脚踏板
        |__ Port 2: Dev 3, If 0, Class=, Driver=usbhid, 1.5M                // 键盘
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M

可以看到,每棵总线树中,除了首行的root hub,其余都是一行表示一个接口,也呈现了拓扑结构中的level层次。
首行root hub的port是无意义的,lsusb的代码里直接指定成了1,而其余行的port,代表该设备所挂接的上级hub的物理port。
设备号(Dev)是每棵总线树独立分配的,一般root hub是1,其余设备再依次分配。接口号(If)的含义也是明显的(注意首行root hub没有这个信息)。
对于hub,Driver末尾的1p,4p,分别表示该hub有1个,4个port。

数字12M、480M、5000M 是指USB类型的传输速率。

  • 12M表示12Mbit / s,这是USB 1.0 / 1.1类型
  • 480M表示480Mbit / s,这是USB 2.0类型
  • 5000M表示5Gbit / s,这是USB3.0类型
    Linux从/var/lib/usbutils/usb.ids识别USB设备的详细信息。或者你可以访问Linux-USB.org获取最新的USB ID列表。
  • 0
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
### 回答1: Java是一种跨平台的编程语言,它可以用来开发软件,包括采集设备拓扑信息的软件。要采集设备拓扑信息,可以使用Java中的网络编程功能,通过发送网络请求并接收响应来获取信息。也可以使用Java的访问设备的API来直接访问设备并获取信息。不过,具体的实现方式还要根据设备的类型和提供的API来决定。 ### 回答2: Java可以采集设备拓扑信息关系是因为它具有强大的网络编程能力和丰富的API库。通过使用Java的网络编程API,可以实现设备设备之间的通信和数据交互,从而获取设备拓扑信息关系。 首先,Java提供了Socket和ServerSocket类,可以建立客户端和服务器之间的连接。通过使用这些类,可以实现设备设备之间的通信和数据传输。例如,可以使用客户端Socket向服务器发送请求,获取设备拓扑信息。 其次,Java的网络编程库还提供了URL类,可以实现与远程设备之间的连接。URL类可以通过指定设备IP地址或URL链接,访问设备网络资源,包括设备拓扑信息。通过URL类,可以获取设备拓扑结构和关系。 此外,Java还提供了许多网络通信协议的支持,如HTTP、FTP、SNMP等。这些协议有助于Java实现与设备的连接和数据传输。例如,使用HTTP协议可以获取网页上的设备拓扑信息,使用SNMP协议可以查询设备网络状态。 最后,Java的网络编程还可以通过解析和处理网络协议的数据包,来获取设备拓扑信息。Java提供了各种第三方库和框架,如Netty和Apache MINA,支持处理网络数据包,从而实现设备拓扑信息的获取和分析。 综上所述,Java具有强大的网络编程能力和丰富的API库,可以实现设备拓扑信息关系的采集。它可以通过建立客户端和服务器的连接、使用URL类、支持各种网络通信协议和处理网络数据包等方式来获取设备拓扑信息。 ### 回答3: 在Java中,可以使用各种方法和技术来采集设备拓扑信息关系。一种常用的方法是通过使用Java的网络编程功能来获取设备之间的连接关系。通过使用Socket和ServerSocket类,可以建立网络连接,然后使用Java的IO流来读取设备之间的拓扑信息。 除了使用网络编程,还可以使用Java的SNMP(Simple Network Management Protocol)库来采集设备拓扑信息。SNMP是一种用于管理和监视网络设备的通信协议,它允许Java程序通过发送SNMP请求来获取设备的信息。 另外,Java还提供了一些第三方库和框架,如Apache Commons Net和Jersey等,可以用于实现设备拓扑信息的采集。这些库和框架提供了一些现成的API和工具,可以帮助开发者更容易地获取和处理设备之间的关系信息。 总之,使用Java采集设备拓扑信息关系可以通过网络编程、SNMP等方式实现。开发者可以根据具体的需求和情况选择适合的方法,通过编写Java代码来获取并处理设备之间的连接关系拓扑信息。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值