The NetBSD Project

CVS log for src/sbin/ifconfig/af_inetany.c

[BACK] Up to [cvs.NetBSD.org] / src / sbin / ifconfig

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.23: download - view: text, markup, annotated - select for diffs
Wed Aug 17 23:36:48 2022 UTC (2 years, 3 months ago) by nat
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, HEAD
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +4 -16 lines
Revert to previous as the atf tests are still failing.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Wed Aug 17 12:35:10 2022 UTC (2 years, 3 months ago) by nat
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +16 -4 lines
Use existing address when setting parameters.

No need to specify address every time when setting broadcast address or
netmask.

Hopefully successfully re addresses PR bin/10911.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Tue Aug 16 22:31:24 2022 UTC (2 years, 3 months ago) by nat
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +2 -20 lines
Revert to previous as atf tests were failing.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Aug 16 10:47:10 2022 UTC (2 years, 3 months ago) by nat
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +22 -4 lines
No need address every time to specify broadcast and netmask.

Previously ifconfig would fail silently.

Addresses PR bin/10911.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Sun Jun 7 06:02:58 2020 UTC (4 years, 6 months ago) by thorpej
Branches: MAIN
CVS tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +6 -6 lines
Update for proplib(3) API changes.

Revision 1.17.30.1: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:03:20 2020 UTC (4 years, 8 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.17: preferred, colored; next MAIN 1.18: preferred, colored
Changes since revision 1.17: +5 -5 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.18: download - view: text, markup, annotated - select for diffs
Fri Aug 16 10:33:17 2019 UTC (5 years, 3 months ago) by msaitoh
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, is-mlppp-base, is-mlppp
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +5 -5 lines
 Whitespace fix.

Revision 1.15.2.1: download - view: text, markup, annotated - select for diffs
Mon Feb 25 00:28:08 2013 UTC (11 years, 9 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15: +7 -4 lines
resync with head

Revision 1.14.6.1: download - view: text, markup, annotated - select for diffs
Fri Feb 8 22:41:29 2013 UTC (11 years, 10 months ago) by riz
Branches: netbsd-6
CVS tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1
Diff to: previous 1.14: preferred, colored; next MAIN 1.15: preferred, colored
Changes since revision 1.14: +6 -3 lines
Pull up following revision(s) (requested by christos in ticket #799):
	sbin/ifconfig/af_inetany.c: revision 1.16
PR/46579: Takahiro HAYASHI: ifconfig clone destroy should not print useless
diagnostic and exit with an error code. Get the interface name and flags
opportunistically to allow the code to return normally if it does not need
to do anything.

Revision 1.14.4.2: download - view: text, markup, annotated - select for diffs
Wed Jan 23 00:05:31 2013 UTC (11 years, 10 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.14.4.1: preferred, colored; branchpoint 1.14: preferred, colored; next MAIN 1.15: preferred, colored
Changes since revision 1.14.4.1: +7 -4 lines
sync with head

Revision 1.17: download - view: text, markup, annotated - select for diffs
Sun Dec 30 22:52:35 2012 UTC (11 years, 11 months ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-base9, yamt-pagecache-base8, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20190609, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-9-base, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9, netbsd-8-base, netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, agc-symver-base, agc-symver
Branch point for: phil-wifi
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +3 -3 lines
fix function name in error messages.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sun Dec 30 22:50:42 2012 UTC (11 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +6 -3 lines
PR/46579: Takahiro HAYASHI: ifconfig clone destroy should not print useless
diagnostic and exit with an error code. Get the interface name and flags
opportunistically to allow the code to return normally if it does not need
to do anything.

Revision 1.14.4.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:05:40 2012 UTC (12 years, 7 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +3 -3 lines
sync with head

Revision 1.15: download - view: text, markup, annotated - select for diffs
Sat Mar 17 02:25:08 2012 UTC (12 years, 9 months ago) by christos
Branches: MAIN
CVS tags: yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4
Branch point for: tls-maxphys
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +3 -3 lines
PR/43141: Tobias Nygren: Print an error on unknown interfaces.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Tue May 24 11:38:56 2011 UTC (13 years, 6 months ago) by joerg
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache, netbsd-6
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +8 -8 lines
Don't use address strings as format string.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Mon Dec 13 17:35:08 2010 UTC (14 years ago) by pooka
Branches: MAIN
CVS tags: matt-mips64-premerge-20101231, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +9 -8 lines
Convert from the .ifdef RUMP_ACTION stuff to RUMPPRG.

Revision 1.9.2.4: download - view: text, markup, annotated - select for diffs
Sun Sep 28 11:17:11 2008 UTC (16 years, 2 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.9.2.3: preferred, colored; next MAIN 1.10: preferred, colored
Changes since revision 1.9.2.3: +8 -10 lines
Sync with HEAD.

Revision 1.4.2.2: download - view: text, markup, annotated - select for diffs
Thu Sep 18 04:28:24 2008 UTC (16 years, 2 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.4.2.1: preferred, colored; next MAIN 1.5: preferred, colored
Changes since revision 1.4.2.1: +10 -12 lines
Sync with wrstuden-revivesa-base-2.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Wed Jul 2 07:44:14 2008 UTC (16 years, 5 months ago) by dyoung
Branches: MAIN
CVS tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, mjf-devfs2-base, matt-premerge-20091211, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +10 -12 lines
Let us add/remove features from ifconfig, such as support for
various address families (inet, inet6, iso, atalk) and protocols
(802.11, 802.3ad, CARP), simply by trimming the list of sources in
the Makefile.  This helps one customize ifconfig for an embedded
device or for install media, and it eliminates a lot of grotty
#ifdef'age.  Now, the ifconfig syntax and semantics are finalized
at run-time using the constructor routines in each address-family/protocol
module.

(In principle, ifconfig could load virtually all of its syntax from
shared objects.)

Extract a lot of common code into subroutines, in order to shrink
the ifconfig binary a bit.  Make all of the address families share
code for address addition/replacement/removal, and delete "legacy"
code for manipulating addresses.  That may have broken atalk and
iso, despite my best efforts.

Extract an include file, Makefile.inc, containing the make-fu that
both ifconfig and x_ifconfig share.

Sprinkle static.  Change some int's to bool's.  Constify.

Add RCS Ids to carp.c and env.c.  Move media code to a new file,
media.c.  Delete several unneeded header files.

Set, reset, and display the IEEE 802.11 attribute, 'dot11RTSThreshold'.

Bug fix: do not require both a interface address and a destination
address for point-to-point interfaces, but accept a interface
address by itself.

Revision 1.9.2.3: download - view: text, markup, annotated - select for diffs
Sun Jun 29 08:41:57 2008 UTC (16 years, 5 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.9.2.2: preferred, colored
Changes since revision 1.9.2.2: +7 -6 lines
Sync with HEAD.

Revision 1.4.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 23 04:29:57 2008 UTC (16 years, 5 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +28 -148 lines
Sync w/ -current. 34 merge conflicts to follow.

Revision 1.8.2.3: download - view: text, markup, annotated - select for diffs
Wed Jun 4 02:04:37 2008 UTC (16 years, 6 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.8.2.2: preferred, colored; branchpoint 1.8: preferred, colored; next MAIN 1.9: preferred, colored
Changes since revision 1.8.2.2: +17 -9 lines
sync with head

Revision 1.11: download - view: text, markup, annotated - select for diffs
Tue Jun 3 04:59:30 2008 UTC (16 years, 6 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +8 -8 lines
*Always* pass the prefix mask specified on the command line, even
on an IFF_POINTOPOINT interface.  Patch tested by John Klos and
found to fix the bug he reported on tech-net@, "Subject: Can't use
gif in -current".

Revision 1.10: download - view: text, markup, annotated - select for diffs
Mon Jun 2 23:19:16 2008 UTC (16 years, 6 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +3 -2 lines
Cosmetic: add missing /*FALLTHROUGH*/.

Revision 1.9.2.2: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:21:22 2008 UTC (16 years, 6 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.9.2.1: preferred, colored
Changes since revision 1.9.2.1: +176 -0 lines
Sync with HEAD.

Revision 1.9.2.1
Wed May 28 17:17:14 2008 UTC (16 years, 6 months ago) by mjf
Branches: mjf-devfs2
FILE REMOVED
Changes since revision 1.9: +0 -176 lines
file af_inetany.c was added on branch mjf-devfs2 on 2008-06-02 13:21:22 +0000

Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed May 28 17:17:14 2008 UTC (16 years, 6 months ago) by dyoung
Branches: MAIN
Branch point for: mjf-devfs2
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +12 -5 lines
Fix kern/38775, "ifconfig inet delete fails".

Revision 1.8.2.2: download - view: text, markup, annotated - select for diffs
Sun May 18 12:30:52 2008 UTC (16 years, 6 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.8.2.1: preferred, colored; branchpoint 1.8: preferred, colored
Changes since revision 1.8.2.1: +169 -0 lines
sync with head.

Revision 1.8.2.1
Fri May 16 20:57:42 2008 UTC (16 years, 7 months ago) by yamt
Branches: yamt-pf42
FILE REMOVED
Changes since revision 1.8: +0 -169 lines
file af_inetany.c was added on branch yamt-pf42 on 2008-05-18 12:30:52 +0000

Revision 1.8: download - view: text, markup, annotated - select for diffs
Fri May 16 20:57:42 2008 UTC (16 years, 7 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-pf42-base2, yamt-pf42-base, hpcarm-cleanup-nbase
Branch point for: yamt-pf42
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +5 -6 lines
Apply netmasks to !(IFF_BROADCAST|IFF_POINTOPOINT) interfaces as
well as to IFF_BROADCAST interfaces.  Fixes the bug reported by
Markus W Kilbinger,

	ifconfig stf0 inet6 2002:xxxx:76ec:0001::1 prefixlen 16 alias

results in the wrong configuration,

	stf0: flags=1<UP> mtu 1280
		inet6 2002:xxxx:76ec:1::1 prefixlen 64

Revision 1.7: download - view: text, markup, annotated - select for diffs
Mon May 12 22:01:32 2008 UTC (16 years, 7 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +7 -11 lines
Apply the right copyright notice.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun May 11 22:07:23 2008 UTC (16 years, 7 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -5 lines
Let the address family modules zero initialize their own ifreqs,
instead of zeroing them in commit_address().

Switch to in6_commit_address() from in6_getprefix() and in6_getaddr().

Temporarily add some debugging code to setia6eui64_impl().

Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu May 8 07:13:20 2008 UTC (16 years, 7 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +5 -125 lines
Move IPv4/IPv6-specific code from commit_address() to in_commit_address()
and in6_commit_address().  Fixes the USE_INET6=no build.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue May 6 21:16:52 2008 UTC (16 years, 7 months ago) by dyoung
Branches: MAIN
Branch point for: wrstuden-revivesa
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +5 -6 lines
Use prop_dictionary_util(3).

Revision 1.3: download - view: text, markup, annotated - select for diffs
Tue May 6 17:29:04 2008 UTC (16 years, 7 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +4 -4 lines
Use prop_dictionary_util(3) some more.

When we read interface flags and capabilities from the kernel, take
care not to record them in our current environment (env), but record
them in the output environment (oenv), instead.  This helps us get
interface capabilities and flags right.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue May 6 16:15:17 2008 UTC (16 years, 7 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +62 -26 lines
Rename in_addr_commit() to commit_address(), and refactor slightly
to support IPv6 as well as IPv4 (a work in progress).

Make the second argument of af_status() a bool instead of an int.

Exit early with an error if the operator specifies an unsupported
address family on the command line.  The change should help rc
scripts to detect that IPv6 support is missing from the kernel,
with 'ifconfig lo0 inet6'.

Start using prop_dictionary_util(3).

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue May 6 04:33:42 2008 UTC (16 years, 7 months ago) by dyoung
Branches: MAIN
Overhaul ifconfig.  Use fewer global variables.  Take a leap toward
improved modularity and extensibility.

In the new architecture, a directed graph of argument-matching
objects (match objects) expresses the set of feasible ifconfig
statements.  Match objects are labelled by subroutines that provide
the statement semantics.

Many IPv4, IPv6, 802.11, tunnel, and media configurations have been
tested.

AppleTalk, ISO, carp(4), agr(4), and vlan(4) configuration need
testing.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>