我遇到了一个问题,我试图使用Python的pyshark来读取IP地址。我能够使用packet.lldp.mgn_addr_ip4打印LLDP数据包的IP地址。但是packet.cdp..。除了返回字节序列的packet.cdp之外,似乎没有等效的。
我试过packet.cdp.nrgyz.ip_address,但没有打印出来。我也尝试过来自的所有其他字段,但是什么都不会回来。
for packet in cap:
try:
if packet.cdp:
print(packet.cdp.nrgyz.ip_address)
elif packet.lldp:
我有一个简单的Spring项目,就在一个模板上:
@SpringBootApplication
@RestController
public class HelloWorldRestApplication {
public static void main(String[] args) {
SpringApplication.run(HelloWorldRestApplication.class, args);
Performer p = new Performer();
p.perform();
}
}
我有一个确保自动装配工作的测试,实际上它在这个测试类