Thanks a lot.
Thanks a lot.
Last edited by liuxingyu_best; 2009-01-06 at 10:31.
If using the post hook
- the info addresses are normally (*) link layer addresses (TInetAddr class is only for IP addresses -- either IPv4 or IPv6)
- do not use the "Address()" method (it only works for IPv4 and is totally unneeded limitation). Address() returns 0 for non-IP addresses and IPv6.
- if you want to get address into text string, just use the Output function of the TInetAddress (it handles both IPv6 and IPv4).
- if you want to actually see the IP packet, you have to use UnPack and Pack functions to the aPacket and then look into the actual packet content... (there should be examples how to do this somewhere...)
(*) multicast and broadcast addresses are retained as IP addresses at this point (it the responsiblity of the driver to convert them to link layer equivalents). If the link layer does not use addresses (PPP), then the addresses in info are undefined (though may have some leftover garbage that looks like IP-address).
Note, in other hooking points (execpt post and pre), the info addresses are IP addresses (always presented in IPv6 format, even IPv4 addresses)
Thanks a lot.
Last edited by liuxingyu_best; 2009-01-06 at 10:31.