From: Maxim Mamontov Date: Mon, 4 Apr 2011 18:31:17 +0000 (+0300) Subject: Comment translation X-Git-Tag: 2.407-rc3~92 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/6ae5b2c41024b4ab227759c3862bfbf524f5afde Comment translation --- diff --git a/include/raw_ip_packet.h b/include/raw_ip_packet.h index cd891266..a1bdda71 100644 --- a/include/raw_ip_packet.h +++ b/include/raw_ip_packet.h @@ -46,7 +46,7 @@ bool operator<(const RAW_PACKET & rvalue) const; union { - uint8_t pckt[pcktSize]; // îÁÞÁÌÏ ÐÁËÅÔÁ ÚÁÈ×ÁÞÅÎÎÏÇÏ ÉÚ ÓÅÔÉ + uint8_t pckt[pcktSize]; // Packet header as a raw data struct { struct ip ipHeader; @@ -55,7 +55,7 @@ union uint16_t dPort; } header __attribute__ ((packed)); }; -int32_t dataLen; // äÌÉÎÁ IP ÐÁËÅÔÁ. åÓÌÉ -1, ÔÏ ÉÓÐÏÌØÚÏ×ÁÔØ ÄÌÉÎÕ ÉÚ ÚÁÇÏÌÏ×ËÁ ÓÁÍÏÇÏ ÐÁËÅÔÁ. +int32_t dataLen; // IP packet length. Set to -1 to use length field from the header }; //----------------------------------------------------------------------------- inline uint16_t RAW_PACKET::GetIPVersion() const @@ -128,26 +128,6 @@ if (header.ipHeader.ip_p != rvalue.header.ipHeader.ip_p) return true; } -/*//----------------------------------------------------------------------------- -inline bool operator==(const RAW_PACKET & lhs, const RAW_PACKET & rhs) -{ -if (lhs.GetSrcIP() != rhs.GetSrcIP()) - return false; - -if (lhs.GetDstIP() != rhs.GetDstIP()) - return false; - -if (lhs.GetSrcPort() != rhs.GetSrcPort()) - return false; - -if (lhs.GetDstPort() != rhs.GetDstPort()) - return false; - -if (lhs.GetProto() != rhs.GetProto()) - return false; - -return true; -}*/ //----------------------------------------------------------------------------- inline bool RAW_PACKET::operator<(const RAW_PACKET & rvalue) const { @@ -184,33 +164,5 @@ if (header.ipHeader.ip_p < rvalue.header.ipHeader.ip_p) return false; } //----------------------------------------------------------------------------- -/*inline bool operator<(const RAW_PACKET & lhs, const RAW_PACKET & rhs) -{ -if (lhs.GetSrcIP() < rhs.GetSrcIP()) - return true; -if (lhs.GetSrcIP() > rhs.GetSrcIP()) - return false; - -if (lhs.GetDstIP() < rhs.GetDstIP()) - return true; -if (lhs.GetDstIP() > rhs.GetDstIP()) - return false; - -if (lhs.GetSrcPort() < rhs.GetSrcPort()) - return true; -if (lhs.GetSrcPort() > rhs.GetSrcPort()) - return false; - -if (lhs.GetDstPort() < rhs.GetDstPort()) - return true; -if (lhs.GetDstPort() > rhs.GetDstPort()) - return false; - -if (lhs.GetProto() < rhs.GetProto()) - return true; - -return false; -}*/ -//----------------------------------------------------------------------------- #endif