Lines Matching refs:ptr

170     EthPtr(const EthPacketPtr &ptr) : p(ptr) { }
180 const EthPtr &operator=(const EthPacketPtr &ptr) { p = ptr; return *this; }
289 void set(const EthPacketPtr &ptr)
294 if (ptr) {
295 EthHdr *eth = (EthHdr *)ptr->data;
297 p = ptr;
305 IpPtr(const EthPacketPtr &ptr) : p(0), eth_hdr_vlan(false) { set(ptr); }
306 IpPtr(const EthPtr &ptr) : p(0), eth_hdr_vlan(false) { set(ptr.p); }
307 IpPtr(const IpPtr &ptr) : p(ptr.p), eth_hdr_vlan(ptr.eth_hdr_vlan) { }
320 const IpPtr &operator=(const EthPacketPtr &ptr) { set(ptr); return *this; }
321 const IpPtr &operator=(const EthPtr &ptr) { set(ptr.p); return *this; }
322 const IpPtr &operator=(const IpPtr &ptr) { p = ptr.p; return *this; }
332 uint16_t cksum(const IpPtr &ptr);
402 void set(const EthPacketPtr &ptr)
407 if (ptr) {
408 EthHdr *eth = (EthHdr *)ptr->data;
410 p = ptr;
418 Ip6Ptr(const EthPacketPtr &ptr) : p(0), eth_hdr_vlan(false) { set(ptr); }
419 Ip6Ptr(const EthPtr &ptr) : p(0), eth_hdr_vlan(false) { set(ptr.p); }
420 Ip6Ptr(const Ip6Ptr &ptr) : p(ptr.p), eth_hdr_vlan(ptr.eth_hdr_vlan) { }
433 const Ip6Ptr &operator=(const EthPacketPtr &ptr)
434 { set(ptr); return *this; }
435 const Ip6Ptr &operator=(const EthPtr &ptr)
436 { set(ptr.p); return *this; }
437 const Ip6Ptr &operator=(const Ip6Ptr &ptr)
438 { p = ptr.p; return *this; }
541 void set(const EthPacketPtr &ptr, int offset) { p = ptr; _off = offset; }
542 void set(const IpPtr &ptr)
544 if (ptr && ptr->proto() == IP_PROTO_TCP)
545 set(ptr.p, ptr.pstart());
549 void set(const Ip6Ptr &ptr)
551 if (ptr && ptr->proto() == IP_PROTO_TCP)
552 set(ptr.p, ptr.pstart());
559 TcpPtr(const IpPtr &ptr) : p(0), _off(0) { set(ptr); }
560 TcpPtr(const Ip6Ptr &ptr) : p(0), _off(0) { set(ptr); }
561 TcpPtr(const TcpPtr &ptr) : p(ptr.p), _off(ptr._off) {}
584 uint16_t cksum(const TcpPtr &ptr);
637 void set(const EthPacketPtr &ptr, int offset) { p = ptr; _off = offset; }
638 void set(const IpPtr &ptr)
640 if (ptr && ptr->proto() == IP_PROTO_UDP)
641 set(ptr.p, ptr.pstart());
645 void set(const Ip6Ptr &ptr)
647 if (ptr && ptr->proto() == IP_PROTO_UDP)
648 set(ptr.p, ptr.pstart());
655 UdpPtr(const IpPtr &ptr) : p(0), _off(0) { set(ptr); }
656 UdpPtr(const Ip6Ptr &ptr) : p(0), _off(0) { set(ptr); }
657 UdpPtr(const UdpPtr &ptr) : p(ptr.p), _off(ptr._off) {}
681 uint16_t cksum(const UdpPtr &ptr);
683 int hsplit(const EthPacketPtr &ptr);