traceroute: rewrite. Do not emit raw IP packets, instead send UDP or ICMP

packets and rely on the kernel to form IP headers, select source IP
 and interface. Doing it in traceroute wasn't working too good,
 and was bloating it.

function                                             old     new   delta
freehostinfo                                          29       -     -29
setsin                                                30       -     -30
in_cksum                                              57       -     -57
gethostinfo                                          165       -    -165
ifaddrlist                                           364       -    -364
traceroute_main                                     3713    2951    -762
------------------------------------------------------------------------------
(add/remove: 0/5 grow/shrink: 0/1 up/down: 0/-1407)         Total: -1407 bytes
This commit is contained in:
Denis Vlasenko 2009-01-24 20:14:24 +00:00
parent fa65a3d78f
commit 766c10c386

File diff suppressed because it is too large Load Diff