c26544aa7f
packets at all. Swapping byte order on SOCK_RAW was actually a bug, an artifact from the BSD network stack, that used to convert a packet to native byte order once it is received by kernel. Other operating systems didn't follow this, and later other BSD descendants fixed this, leaving us alone with the bug. Now it is clear that we should fix the bug. In collaboration with: Olivier Cochard-Labbé <olivier cochard.me> See also: https://wiki.freebsd.org/SOCK_RAW Sponsored by: Nginx, Inc.
43 lines
1.1 KiB
Makefile
43 lines
1.1 KiB
Makefile
# $FreeBSD$
|
|
|
|
TRACEROUTE_DISTDIR?= ${.CURDIR}/../../contrib/traceroute
|
|
.PATH: ${TRACEROUTE_DISTDIR}
|
|
|
|
PROG= traceroute
|
|
MAN= traceroute.8
|
|
SRCS= as.c version.c traceroute.c ifaddrlist.c findsaddr-udp.c
|
|
BINOWN= root
|
|
BINMODE=4555
|
|
CLEANFILES= version.c
|
|
|
|
CFLAGS+= -DHAVE_SYS_SELECT_H=1 -DHAVE_SYS_SOCKIO_H=1 \
|
|
-DHAVE_NET_ROUTE_H=1 -DHAVE_NET_IF_DL_H=1 \
|
|
-DHAVE_STRERROR=1 -DHAVE_USLEEP=1 \
|
|
-DHAVE_SYS_SYSCTL_H=1 -DBYTESWAP_IP_HDR=1 \
|
|
-DHAVE_SETLINEBUF=1 -DHAVE_RAW_OPTIONS=1 \
|
|
-DHAVE_SOCKADDR_SA_LEN=1 -DHAVE_ICMP_NEXTMTU=1
|
|
.if !defined(TRACEROUTE_NO_IPSEC)
|
|
CFLAGS+= -DIPSEC
|
|
.endif
|
|
# RTT Jitter on the internet these days means printing 3 decimal places on
|
|
# > 1000ms times is plain useless. Uncomment this to enable variable precision
|
|
# reporting, ie: print a variable precision from 0.001ms through 1000ms
|
|
# CFLAGS+= -DSANE_PRECISION
|
|
|
|
.if !defined(TRACEROUTE_NO_IPSEC)
|
|
DPADD= ${LIBIPSEC}
|
|
LDADD= -lipsec
|
|
.endif
|
|
|
|
CFLAGS+= -I${TRACEROUTE_DISTDIR}
|
|
|
|
WARNS?= 3
|
|
|
|
version.c: ${TRACEROUTE_DISTDIR}/VERSION
|
|
@rm -f ${.TARGET}
|
|
head -1 ${TRACEROUTE_DISTDIR}/VERSION | \
|
|
sed -e 's/.*/char version[] = "&";/' \
|
|
> ${.TARGET}
|
|
|
|
.include <bsd.prog.mk>
|