}
else
{
-
if(ip6_frag->rb())
TextLog_Puts(log, " RB");
ip4h->hlen(),
ip4h->len());
- frag_off = ip4h->off();
-
- if (frag_off)
- {
- /* print the reserved bit if it's set */
- if(ip4h->rb())
- TextLog_Puts(log, " RB");
+ if(ip4h->rb())
+ TextLog_Puts(log, " RB");
- /* printf more frags/don't frag bits */
- if(ip4h->df())
- TextLog_Puts(log, " DF");
+ if(ip4h->df())
+ TextLog_Puts(log, " DF");
- if(ip4h->mf())
- TextLog_Puts(log, " MF");
+ if(ip4h->mf())
+ TextLog_Puts(log, " MF");
- frag_off = (frag_off & 0x1FFF);
- }
+ frag_off = ip4h->off();
}
TextLog_NewLine(log);
inline uint16_t rb() const
{ return ntohs(ip_off) & 0x8000; }
- inline uint16_t mf() const
- { return ntohs(ip_off) & 0x2000; }
-
inline uint16_t df() const
{ return ntohs(ip_off) & 0x4000; }
+ inline uint16_t mf() const
+ { return ntohs(ip_off) & 0x2000; }
+
inline uint16_t off() const
{ return (ntohs(ip_off) & 0x1FFF) << 3; }