5 void fp_udp4(packetinfo
*pi
, ip4_header
* ip4
, udp_header
* udph
, const uint8_t * end_ptr
)
14 * Decode variable length header options and remaining data in field
16 olen
= IP_HL(ip4
) - 5;
17 if (olen
< 0) { // Check for bad hlen
21 * Option length is number of 32 bit words
24 quirks
|= QUIRK_IPOPT
;
27 * If the declared length is shorter than the snapshot (etherleak
28 * or such), truncate the package.
30 opt_ptr
= (uint8_t *) ip4
+ htons(ip4
->ip_len
);
31 if (end_ptr
> opt_ptr
)
34 ilen
= ip4
->ip_vhl
& 15;
42 quirks
|= QUIRK_IPOPT
;
45 * If IP header ends past end_ptr
47 if ((uint8_t *) (ip4
+ 1) > end_ptr
)
50 if ((uint8_t *) opt_ptr
+ ilen
< end_ptr
) {
52 payload
= opt_ptr
+ ilen
;
54 uint8_t udata
= (uint8_t *) end_ptr
- payload
;
57 quirks
|= QUIRK_ZEROID
;
59 // Fingerprint format: $fplen,$ttl,$df,$io,$if,$fo
60 gen_fp_udp(ntohs(ip4
->ip_len
- udph
->len
), udata
, ip4
->ip_ttl
,
61 (ntohs(ip4
->ip_off
) & IP_DF
) != 0, olen
, ntohs(ip4
->ip_len
),
62 ip4
->ip_off
, ip4
->ip_tos
, quirks
,
63 //ip_src, udph->src_port,AF_INET);
66 //icmp_os_find_match($type,$code,$gttl,$df,$ipopts,$len,$ipflags,$foffset,$tos);