nicinfo
在QNX操作系统中,nicinfo
是一个用于显示网络接口卡(NIC)信息的命令行工具。它可以提供有关系统中所有可用网络接口卡的详细信息,例如接口名称、MAC地址、IP地址、掩码、广播地址、传输单元大小等等。
通过nicinfo
命令可以查看所有网络接口卡的信息,也可以通过添加接口名称参数来查看特定接口的信息。
nicinfo
命令对于调试和排除与网络有关的问题非常有用,也可以用于监视和管理系统中的网络接口卡
nicinfo eth0
# nicinfo eth0
eth0: eth Ethernet ControllerPhysical Node ID ........................... 04C3E6 4F0000Current Physical Node ID ................... 04C3E6 4F0000Current Operation Rate ..................... 1000.00 Mb/s full-duplexActive Interface Type ...................... MIIActive PHY address ....................... 7Maximum Transmittable data Unit ............ 1500Maximum Receivable data Unit ............... 1500Hardware Interrupt ......................... 0x5bMemory Aperture ............................ 0x58d8d76000 - 0x58d8d76fffPromiscuous Mode ........................... OffMulticast Support .......................... EnabledPackets Transmitted OK ..................... 34953Bytes Transmitted OK ....................... 4342095Broadcast Packets Transmitted OK ........... 7Multicast Packets Transmitted OK ........... 3Memory Allocation Failures on Transmit ..... 0Packets Received OK ........................ 557043Bytes Received OK .......................... 158746695Broadcast Packets Received OK .............. 479442Multicast Packets Received OK .............. 1100Memory Allocation Failures on Receive ...... 0Single Collisions on Transmit .............. 0Multiple Collisions on Transmit ............ 0Deferred Transmits ......................... 0Late Collision on Transmit errors .......... 0Transmits aborted (excessive collisions) ... 0Transmit Underruns ......................... 0No Carrier on Transmit ..................... 0Jabber detected ............................ 0Receive Alignment errors ................... 0Received packets with CRC errors ........... 0Packets Dropped on receive ................. 0Oversized Packets received ................. 0Short packets .............................. 0
ifmcstat
ifmcstat是一个命令行程序,用于监控和显示网络接口的统计信息。使用ifmcstat,可以查看网络接口的包传输数量、丢包数量、传输速率等详细信息。下面是使用ifmcstat的示例命令:
./ifmcstat eht0
lo0:inet6 ::1inet6 fe80::1%lo0group ff01:1::1 refcnt 2group ff02::1%lo0 refcnt 2group ff02::1:ff00:1%lo0 refcnt 2
eth0:inet6 fe80::6c3:e6ff:fe4f:0%eth0group ff01:11::1 refcnt 1group ff02::1%eth0 refcnt 1group ff02::1:ff4f:0%eth0 refcnt 1enaddr 04:c3:e6:4f:00:00 multicnt 301:00:5e:00:00:01 -- 01:00:5e:00:00:01 133:33:00:00:00:01 -- 33:33:00:00:00:01 233:33:ff:4f:00:00 -- 33:33:ff:4f:00:00 1
上述命令将显示eth0网络接口的数据传输统计信息。
if_up
if_up也是一个命令行程序,用于启用和配置网络接口。使用if_up,可以设置网络接口的IP地址、子网掩码、网关等参数。以下是使用if_up的示例命令:
if_up eth0 192.168.1.10 netmask 255.255.255.0 gw 192.168.1.1
tcpdump
拷贝librpc.so.2和tcpdump至qnx设备中
./tcpdump -i eth0 port 8010 -w out1.cap