nip_icmp.inc 588 B

12345678910111213141516171819202122232425
  1. Function ICMP_ADVLEN(const p: icmp): cardinal;
  2. var
  3. L : Longint;
  4. begin
  5. L:=p.icmp_dun.id_ip.idi_ip.flag0 and $F;
  6. Result:=(8+(L shl 2) + 8);
  7. end;
  8. Function ICMP_INFOTYPE(_type: cardinal): Boolean;
  9. begin
  10. Result := (_type=ICMP_ECHOREPLY) or
  11. (_type=ICMP_ECHO) or
  12. (_type=ICMP_ROUTERADVERT) or
  13. (_type=ICMP_ROUTERSOLICIT) or
  14. (_type=ICMP_TSTAMP) or
  15. (_type=ICMP_TSTAMPREPLY) or
  16. (_type=ICMP_IREQ) or
  17. (_type=ICMP_IREQREPLY) or
  18. (_type=ICMP_MASKREQ) or
  19. (_type=ICMP_MASKREPLY);
  20. end;