From: Lew Pitcher on
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Tiken Heirangkhongjam wrote:
> When I tried to Compile the traceroute.c program by Van Jacobson, I got
> an error that
> <netinet/ip_var.h> could not be found.
>
> reference:
> http://web.cecs.pdx.edu/~jrb/tcpip/misc.src/traceroute.c
>
> I m running on a Linux kernel 2.4.20 box. Can anyone suggest how can
> this be avoided.

You should realize that Van Jacobson wrote /that/ program for BSD Unix
circa 1989

Since 1989, the standard headers have changed, and the locations of
macros and function definitions are not what they were. You will have
to make changes to VJ's code to make it work in a recent Linux system
with recent GCC and headers.

I've quickly looked at the above traceroute.c code, and noticed that VJ
didn't include comments as to what he uses out of each header. If he
had, then it would be possible to look through the current headers and
locate the corresponding values. This way, you'd know which current
Linux headers to include as substitutes for the old BSD header.

But, since he didn't include comments, your detective work just got
harder. I would suggest two approaches:
1) do some research to find out what netinet/ip_var.h defined, and/or
2) remove all the #includes, and see what the compile complains is
missing

- From either of those methods, you should be able to identify the
functions, variables, and macros that the traceroute code uses from
those obsolete headers. From there, you search the current headers to
locate the equivalent values. Once you've identified the current
headers, you modify the code to use them instead of the obsolete BSD
headers it currently uses.

Luck be with you
HTH
- --
Lew Pitcher

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32) - WinPT 0.11.12

iD8DBQFFIlgbagVFX4UWr64RAqT/AJ9jTOH+nM2NKfJcyi3QsK5+yYGjAACeJKh4
YtrULpQXQ/F6OR0GxdNLBmQ=
=IxQX
-----END PGP SIGNATURE-----

From: toby on
Lew Pitcher wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Tiken Heirangkhongjam wrote:
> > When I tried to Compile the traceroute.c program by Van Jacobson, I got
> > an error that
> > <netinet/ip_var.h> could not be found.
> >
> > reference:
> > http://web.cecs.pdx.edu/~jrb/tcpip/misc.src/traceroute.c
> >
> > I m running on a Linux kernel 2.4.20 box. Can anyone suggest how can
> > this be avoided.
>
> You should realize that Van Jacobson wrote /that/ program for BSD Unix
> circa 1989 ... I would suggest two approaches:
> 1) do some research to find out what netinet/ip_var.h defined, and/or
> 2) remove all the #includes, and see what the compile complains is
> missing
>

To be picky, in 2) just removing the problematic one(s) would be
enough.

>
> Luck be with you
> HTH
> - --
> Lew Pitcher
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (MingW32) - WinPT 0.11.12
>
> iD8DBQFFIlgbagVFX4UWr64RAqT/AJ9jTOH+nM2NKfJcyi3QsK5+yYGjAACeJKh4
> YtrULpQXQ/F6OR0GxdNLBmQ=
> =IxQX
> -----END PGP SIGNATURE-----

From: Barry Margolin on
In article <1159878694.410291.85100(a)i42g2000cwa.googlegroups.com>,
"Lew Pitcher" <lpitcher(a)sympatico.ca> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Tiken Heirangkhongjam wrote:
> > When I tried to Compile the traceroute.c program by Van Jacobson, I got
> > an error that
> > <netinet/ip_var.h> could not be found.
> >
> > reference:
> > http://web.cecs.pdx.edu/~jrb/tcpip/misc.src/traceroute.c
> >
> > I m running on a Linux kernel 2.4.20 box. Can anyone suggest how can
> > this be avoided.
>
> You should realize that Van Jacobson wrote /that/ program for BSD Unix
> circa 1989
>
> Since 1989, the standard headers have changed, and the locations of
> macros and function definitions are not what they were. You will have
> to make changes to VJ's code to make it work in a recent Linux system
> with recent GCC and headers.

Or just get a copy of the source code for the Linux traceroute. It's
probably about 80% the same, and just as instructive for learning how
the program works.

--
Barry Margolin, barmar(a)alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
From: Tiken Heirangkhongjam on

Barry Margolin wrote:
> In article <1159878694.410291.85100(a)i42g2000cwa.googlegroups.com>,
> "Lew Pitcher" <lpitcher(a)sympatico.ca> wrote:
>
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> >
> > Tiken Heirangkhongjam wrote:
> > > When I tried to Compile the traceroute.c program by Van Jacobson, I got
> > > an error that
> > > <netinet/ip_var.h> could not be found.
> > >
> > > reference:
> > > http://web.cecs.pdx.edu/~jrb/tcpip/misc.src/traceroute.c
> > >
> > > I m running on a Linux kernel 2.4.20 box. Can anyone suggest how can
> > > this be avoided.
> >
> > You should realize that Van Jacobson wrote /that/ program for BSD Unix
> > circa 1989
> >
> > Since 1989, the standard headers have changed, and the locations of
> > macros and function definitions are not what they were. You will have
> > to make changes to VJ's code to make it work in a recent Linux system
> > with recent GCC and headers.
>
> Or just get a copy of the source code for the Linux traceroute. It's
> probably about 80% the same, and just as instructive for learning how
> the program works.
>
> --
> Barry Margolin, barmar(a)alum.mit.edu
> Arlington, MA
> *** PLEASE post questions in newsgroups, not directly to me ***
> *** PLEASE don't copy me on replies, I'll read them in the group ***


Hi!

Can you plz specify the link where I can get a copy of the source code
for the Linux traceroute.

From: Barry Margolin on
In article <1159936143.064656.314100(a)i42g2000cwa.googlegroups.com>,
"Tiken Heirangkhongjam" <tiken.h(a)gmail.com> wrote:

> Can you plz specify the link where I can get a copy of the source code
> for the Linux traceroute.

Linux comes with full source code, doesn't it? It should be in there.

--
Barry Margolin, barmar(a)alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
First  |  Prev  |  Next  |  Last
Pages: 1 2 3
Prev: sed
Next: System resource information on HP-UX