1996-11-21 19:36:09 +00:00
|
|
|
# From: @(#)Makefile 8.1 (Berkeley) 6/5/93
|
1999-08-28 00:22:10 +00:00
|
|
|
# $FreeBSD$
|
1994-05-26 06:35:07 +00:00
|
|
|
|
2014-05-06 04:22:01 +00:00
|
|
|
.include <src.opts.mk>
|
2006-03-20 14:24:58 +00:00
|
|
|
|
2016-02-09 20:19:31 +00:00
|
|
|
PACKAGE=runtime
|
1994-05-26 06:35:07 +00:00
|
|
|
PROG= ifconfig
|
1997-05-04 06:27:45 +00:00
|
|
|
|
2004-12-08 19:18:07 +00:00
|
|
|
SRCS= ifconfig.c # base support
|
|
|
|
|
|
|
|
#
|
|
|
|
# NB: The order here defines the order in which the constructors
|
|
|
|
# are called. This in turn defines the default order in which
|
|
|
|
# status is displayed. Probably should add a priority mechanism
|
|
|
|
# to the registration process so we don't depend on this aspect
|
|
|
|
# of the toolchain.
|
|
|
|
#
|
|
|
|
SRCS+= af_link.c # LLC support
|
2011-05-31 14:40:21 +00:00
|
|
|
.if ${MK_INET_SUPPORT} != "no"
|
2004-12-08 19:18:07 +00:00
|
|
|
SRCS+= af_inet.c # IPv4 support
|
2011-05-31 14:40:21 +00:00
|
|
|
.endif
|
|
|
|
.if ${MK_INET6_SUPPORT} != "no"
|
2004-12-08 19:18:07 +00:00
|
|
|
SRCS+= af_inet6.c # IPv6 support
|
2011-05-31 14:40:21 +00:00
|
|
|
.endif
|
|
|
|
.if ${MK_INET6_SUPPORT} != "no"
|
2009-09-12 22:08:20 +00:00
|
|
|
SRCS+= af_nd6.c # ND6 support
|
2011-05-31 14:40:21 +00:00
|
|
|
.endif
|
2004-12-08 19:18:07 +00:00
|
|
|
|
|
|
|
SRCS+= ifclone.c # clone device support
|
|
|
|
SRCS+= ifmac.c # MAC support
|
|
|
|
SRCS+= ifmedia.c # SIOC[GS]IFMEDIA support
|
2011-07-03 12:22:02 +00:00
|
|
|
SRCS+= iffib.c # non-default FIB support
|
2004-12-08 19:18:07 +00:00
|
|
|
SRCS+= ifvlan.c # SIOC[GS]ETVLAN support
|
2014-12-17 05:36:34 +00:00
|
|
|
SRCS+= ifvxlan.c # VXLAN support
|
2008-08-03 03:36:12 +00:00
|
|
|
SRCS+= ifgre.c # GRE keys etc
|
Fix and add a workaround on an issue of EtherIP packet with reversed
version field sent via gif(4)+if_bridge(4). The EtherIP
implementation found on FreeBSD 6.1, 6.2, 6.3, 7.0, 7.1, and 7.2 had
an interoperability issue because it sent the incorrect EtherIP
packets and discarded the correct ones.
This change introduces the following two flags to gif(4):
accept_rev_ethip_ver: accepts both correct EtherIP packets and ones
with reversed version field, if enabled. If disabled, the gif
accepts the correct packets only. This flag is enabled by
default.
send_rev_ethip_ver: sends EtherIP packets with reversed version field
intentionally, if enabled. If disabled, the gif sends the correct
packets only. This flag is disabled by default.
These flags are stored in struct gif_softc and can be set by
ifconfig(8) on per-interface basis.
Note that this is an incompatible change of EtherIP with the older
FreeBSD releases. If you need to interoperate older FreeBSD boxes and
new versions after this commit, setting "send_rev_ethip_ver" is
needed.
Reviewed by: thompsa and rwatson
Spotted by: Shunsuke SHINOMIYA
PR: kern/125003
MFC after: 2 weeks
2009-06-07 23:00:40 +00:00
|
|
|
SRCS+= ifgif.c # GIF reversed header workaround
|
2017-02-06 08:49:57 +00:00
|
|
|
SRCS+= ifipsec.c # IPsec VTI
|
2008-04-20 20:35:46 +00:00
|
|
|
|
2014-08-16 19:13:52 +00:00
|
|
|
SRCS+= sfp.c # SFP/SFP+ information
|
2014-11-25 11:23:12 +00:00
|
|
|
LIBADD+= m
|
2014-08-16 19:13:52 +00:00
|
|
|
|
2019-03-04 03:47:06 +00:00
|
|
|
.if ${MK_WIRELESS_SUPPORT} != "no"
|
2015-11-30 06:34:16 +00:00
|
|
|
SRCS+= ifieee80211.c # SIOC[GS]IEEE80211 support
|
2015-12-24 11:30:29 +00:00
|
|
|
LIBADD+= 80211
|
2019-03-04 03:47:06 +00:00
|
|
|
.endif
|
2004-12-08 19:18:07 +00:00
|
|
|
|
2011-12-16 14:30:58 +00:00
|
|
|
SRCS+= carp.c # SIOC[GS]VH support
|
2006-06-19 22:20:45 +00:00
|
|
|
SRCS+= ifgroup.c # ...
|
2013-10-29 17:38:13 +00:00
|
|
|
.if ${MK_PF} != "no"
|
2005-02-22 13:04:05 +00:00
|
|
|
SRCS+= ifpfsync.c # pfsync(4) support
|
2013-10-29 17:38:13 +00:00
|
|
|
.endif
|
2005-02-22 13:04:05 +00:00
|
|
|
|
2005-06-05 03:32:53 +00:00
|
|
|
SRCS+= ifbridge.c # bridge support
|
2007-04-17 00:35:11 +00:00
|
|
|
SRCS+= iflagg.c # lagg support
|
2005-06-05 03:32:53 +00:00
|
|
|
|
Initial implementation of draft-ietf-6man-ipv6only-flag.
This change defines the RA "6" (IPv6-Only) flag which routers
may advertise, kernel logic to check if all routers on a link
have the flag set and accordingly update a per-interface flag.
If all routers agree that it is an IPv6-only link, ether_output_frame(),
based on the interface flag, will filter out all ETHERTYPE_IP/ARP
frames, drop them, and return EAFNOSUPPORT to upper layers.
The change also updates ndp to show the "6" flag, ifconfig to
display the IPV6_ONLY nd6 flag if set, and rtadvd to allow
announcing the flag.
Further changes to tcpdump (contrib code) are availble and will
be upstreamed.
Tested the code (slightly earlier version) with 2 FreeBSD
IPv6 routers, a FreeBSD laptop on ethernet as well as wifi,
and with Win10 and OSX clients (which did not fall over with
the "6" flag set but not understood).
We may also want to (a) implement and RX filter, and (b) over
time enahnce user space to, say, stop dhclient from running
when the interface flag is set. Also we might want to start
IPv6 before IPv4 in the future.
All the code is hidden under the EXPERIMENTAL option and not
compiled by default as the draft is a work-in-progress and
we cannot rely on the fact that IANA will assign the bits
as requested by the draft and hence they may change.
Dear 6man, you have running code.
Discussed with: Bob Hinden, Brian E Carpenter
2018-10-30 20:08:48 +00:00
|
|
|
.if ${MK_EXPERIMENTAL} != "no"
|
|
|
|
CFLAGS+= -DDRAFT_IETF_6MAN_IPV6ONLY_FLAG
|
2019-03-06 23:31:42 +00:00
|
|
|
CFLAGS+= -DEXPERIMENTAL
|
Initial implementation of draft-ietf-6man-ipv6only-flag.
This change defines the RA "6" (IPv6-Only) flag which routers
may advertise, kernel logic to check if all routers on a link
have the flag set and accordingly update a per-interface flag.
If all routers agree that it is an IPv6-only link, ether_output_frame(),
based on the interface flag, will filter out all ETHERTYPE_IP/ARP
frames, drop them, and return EAFNOSUPPORT to upper layers.
The change also updates ndp to show the "6" flag, ifconfig to
display the IPV6_ONLY nd6 flag if set, and rtadvd to allow
announcing the flag.
Further changes to tcpdump (contrib code) are availble and will
be upstreamed.
Tested the code (slightly earlier version) with 2 FreeBSD
IPv6 routers, a FreeBSD laptop on ethernet as well as wifi,
and with Win10 and OSX clients (which did not fall over with
the "6" flag set but not understood).
We may also want to (a) implement and RX filter, and (b) over
time enahnce user space to, say, stop dhclient from running
when the interface flag is set. Also we might want to start
IPv6 before IPv4 in the future.
All the code is hidden under the EXPERIMENTAL option and not
compiled by default as the draft is a work-in-progress and
we cannot rely on the fact that IANA will assign the bits
as requested by the draft and hence they may change.
Dear 6man, you have running code.
Discussed with: Bob Hinden, Brian E Carpenter
2018-10-30 20:08:48 +00:00
|
|
|
.endif
|
2011-05-31 14:40:21 +00:00
|
|
|
.if ${MK_INET6_SUPPORT} != "no"
|
|
|
|
CFLAGS+= -DINET6
|
|
|
|
.endif
|
|
|
|
.if ${MK_INET_SUPPORT} != "no"
|
|
|
|
CFLAGS+= -DINET
|
|
|
|
.endif
|
2019-07-19 20:04:13 +00:00
|
|
|
.if ${MK_JAIL} != "no" && !defined(RESCUE)
|
2012-02-14 07:14:42 +00:00
|
|
|
CFLAGS+= -DJAIL
|
2014-11-25 11:23:12 +00:00
|
|
|
LIBADD+= jail
|
2012-02-14 07:14:42 +00:00
|
|
|
.endif
|
2001-07-21 00:35:11 +00:00
|
|
|
|
2004-12-08 19:18:07 +00:00
|
|
|
MAN= ifconfig.8
|
|
|
|
|
2005-03-25 22:08:59 +00:00
|
|
|
CFLAGS+= -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wnested-externs
|
2010-01-17 21:56:27 +00:00
|
|
|
WARNS?= 2
|
1994-05-26 06:35:07 +00:00
|
|
|
|
2017-08-02 08:50:42 +00:00
|
|
|
HAS_TESTS=
|
2017-08-02 08:35:51 +00:00
|
|
|
SUBDIR.${MK_TESTS}+= tests
|
2015-01-04 22:25:16 +00:00
|
|
|
|
1994-05-26 06:35:07 +00:00
|
|
|
.include <bsd.prog.mk>
|