在这两种情况下,我对通信的实现都不满意,因为我无法想出一种智能的、非冗长的和面向对象的编写方法,特别是解析字节。= -1)) { // 0x01 means we have pdu #1 and can continue// since we know what is coming.
// after we have all bytes and know
.;const IP* ip = packet.find_pdu<IP>(); // If the pointer is not null= packet.rfind_pdu<TCP>();
PDU::rfind_pdu()的定义如下。我的问题是,一个论点不应该传递给rfind_pdu()吗?允许<IP>附加到函数调用的语法是什么?template<typ
pdu = new PDU();
pdu.add(new VariableBinding(SnmpConstants.sysUpTime, new OctetString(new Date().toString())));
pdu.add(new VariableBinding(SnmpConstants.snmpTrapOID// variable binding for Ente