From owner-freebsd-hackers Mon Nov 6 11:15:50 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id LAA09813 for hackers-outgoing; Mon, 6 Nov 1995 11:15:50 -0800 Received: from gvr.win.tue.nl (root@gvr.win.tue.nl [131.155.210.19]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id LAA09806 for ; Mon, 6 Nov 1995 11:15:37 -0800 Received: by gvr.win.tue.nl (8.6.10/1.53) id UAA24264; Mon, 6 Nov 1995 20:14:56 +0100 From: guido@gvr.win.tue.nl (Guido van Rooij) Message-Id: <199511061914.UAA24264@gvr.win.tue.nl> Subject: Re: [Q] Traceroute and source routing To: jmb@kryten.Atinc.COM (Jonathan M. Bresler) Date: Mon, 6 Nov 1995 20:14:55 +0100 (MET) Cc: hackers@freebsd.org In-Reply-To: from "Jonathan M. Bresler" at Nov 4, 95 08:40:16 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Content-Length: 1091 Sender: owner-hackers@freebsd.org Precedence: bulk > so...i want a source route option on traceroute. > > suggestions ?? pointers ?? code ?? > It is in the Stevens book: ftp://ftp.uu.net:/published/books/setevens.tcpipv1.tar.gz -Guido But beware: ***** SOURCE ROUTING LIMITATION: The traceroute.lsrr.c program only works for me under SunOS 4.1.x and vanilla SVR4. It *does not* work under BSD/386, 4.4BSD, or Solaris 2.x. The reason is as follows: traceroute sets the source route correctly using the IP_OPTIONS socket option and then sets the IP_HDRINCL socket option to allow it to pass a complete IP header (with its desired value of the TTL). But newer systems do not insert the IP options specified by IP_OPTIONS if IP_HDRINCL is also set (for a SOCK_RAW Internet socket), meaning the source route option is never used by the kernel! The only way around this appears to be for traceroute itself to set the correct source route options in the IP header, before doing the sendto(), essentially emulating what the kernel does when it inserts IP options prior to output. This is nontrivial and I haven't tried to do it.