class UdpCodec : public Codec
{
public:
- UdpCodec() : Codec("Udp"){};
+ UdpCodec() : Codec("udp"){};
~UdpCodec(){};
}
/* set the ptr to the start of the UDP header */
- p->inner_udph = p->udph = reinterpret_cast<udp::UDPHdr*>(const_cast<uint8_t*>(raw_pkt));
+ p->inner_udph = p->udph = reinterpret_cast<const udp::UDPHdr*>(raw_pkt);
if (!p->frag_flag)
{
}
// if the final codec returned false && is not the null codec
- if (!valid && mapped_prot)
+ if (!valid && (mapped_prot != FINISHED_DECODE))
pkt_cnt.discards++;
// If a codec attempted to decode another layer but we couldn't find it