History log of /src/sbin/ifconfig/parse.c |
Revision | | Date | Author | Comments |
1.20 |
| 07-Jun-2020 |
thorpej | Update for proplib(3) API changes.
|
1.19 |
| 16-Aug-2019 |
msaitoh | Whitespace fix.
|
1.18 |
| 17-Jul-2013 |
christos | branches: 1.18.28; print the next parser name instead of just the pointer in debugging.
|
1.17 |
| 01-Mar-2013 |
joerg | Retire OSI network stack. OK core@
|
1.16 |
| 01-Jul-2010 |
dyoung | branches: 1.16.6; 1.16.12; Add to the string parse object (pstr), and its constructors, a flag that tells whether it should detect and convert to binary a hexadecimal octet string of the form 0x0123ABab, or leave those strings undecoded.
If the argument for a 'media', 'mediamode', 'mediaopt', '-mediaopt', 'nwkey', or 'bssid' keyword is a hexadecimal octet string, do not detect and decode it. (Note that setifnwkey decodes hexadecimal strings on its own.)
This fixes a bug noticed by Jim Miller where the trailing zero-octets were discarded from hexadecimal octet-string arguments for 'nwkey'.
|
1.15 |
| 20-Apr-2010 |
plunky | C99 says that offsetof() expands to a constant expresssion, so we can't use variable array index in there. Do the calculation manually for C99 compilers (pcc)
|
1.14 |
| 28-Jul-2009 |
dyoung | Both carp.c and vlan.c expect for a keyword with a KW_T_STR-type value to put a prop_string_t into the environment, but the keyword parser put a prop_data_t into the environment, instead. That broke the -vlanif and -carpdev keywords and defied developer expectations. Let's put a prop_string_t into the environment.
Thanks to Arnaud Degroote for reporting the problem.
|
1.13 |
| 18-Jan-2009 |
lukem | fix -Wsign-compare issues
|
1.12 |
| 01-Aug-2008 |
dyoung | branches: 1.12.2; 1.12.4; 1.12.6; Extract common code. Create subroutine paddr_prefix_size().
|
1.11 |
| 01-Aug-2008 |
dyoung | Always initialize the union of sockaddrs. I used to initialize it only in the AF_UNSPEC/AF_INET/AF_INET6 cases. Maybe this will fix the AF_APPLETALK problem that is@ reports:
random84# ifconfig nfe0 atalk 3.14 ifconfig: SIOCAIFADDR: Invalid argument
|
1.10 |
| 15-Jul-2008 |
dyoung | Cosmetic: s/xenv/oenv/
|
1.9 |
| 02-Jul-2008 |
dyoung | 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.
|
1.8 |
| 19-May-2008 |
dyoung | branches: 1.8.2; Fix two bugs:
1 Let us associate a keyword with either a signed or an unsigned number. Associate the '-chan' keyword with an unsigned number. This fixes the defect that crashed 'ifconfig wi0 -chan', reported by Michael van Elst.
2 Do not try to interpret names as ISO addresses unless the ISO address family was specified. iso_addr(3) does not report errors, so it appears to interpret *everything* as an ISO address. This is a stopgap fix for the defect in 'ifconfig lo0 inet6' on a !INET6 kernel that deletes the first IPv4 address on lo0. (Reported by Scott Ellis.)
|
1.7 |
| 12-May-2008 |
dyoung | branches: 1.7.2; Fix link-layer address parsing. Add debug statements.
Cosmetic: fix copyright whitespace.
|
1.6 |
| 12-May-2008 |
dyoung | Add code for parsing link-layer addresses of the form xx:xx:...:xx.
|
1.5 |
| 09-May-2008 |
dyoung | In address, integer, string parsers, gracefully handle a missing token.
|
1.4 |
| 07-May-2008 |
dyoung | Fix a bug that I introduced in rev 1.88, where the default IPv6 prefix length changed from 64 to 128. While I am here, allow an address to be given with prefix length /0, but interpret it as /128.
|
1.3 |
| 06-May-2008 |
dyoung | branches: 1.3.2; Use prop_dictionary_util(3).
|
1.2 |
| 06-May-2008 |
dyoung | Add a license.
|
1.1 |
| 06-May-2008 |
dyoung | 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.
|
1.3.2.2 |
| 18-Sep-2008 |
wrstuden | Sync with wrstuden-revivesa-base-2.
|
1.3.2.1 |
| 23-Jun-2008 |
wrstuden | Sync w/ -current. 34 merge conflicts to follow.
|
1.7.2.3 |
| 04-Jun-2008 |
yamt | sync with head
|
1.7.2.2 |
| 18-May-2008 |
yamt | sync with head.
|
1.7.2.1 |
| 12-May-2008 |
yamt | file parse.c was added on branch yamt-pf42 on 2008-05-18 12:30:53 +0000
|
1.8.2.3 |
| 28-Sep-2008 |
mjf | Sync with HEAD.
|
1.8.2.2 |
| 02-Jun-2008 |
mjf | Sync with HEAD.
|
1.8.2.1 |
| 19-May-2008 |
mjf | file parse.c was added on branch mjf-devfs2 on 2008-06-02 13:21:22 +0000
|
1.12.6.1 |
| 21-Apr-2010 |
matt | sync to netbsd-5
|
1.12.4.1 |
| 14-Aug-2009 |
snj | Pull up following revision(s) (requested by dyoung in ticket #878): sbin/ifconfig/parse.c: revision 1.14 Both carp.c and vlan.c expect for a keyword with a KW_T_STR-type value to put a prop_string_t into the environment, but the keyword parser put a prop_data_t into the environment, instead. That broke the -vlanif and -carpdev keywords and defied developer expectations. Let's put a prop_string_t into the environment. Thanks to Arnaud Degroote for reporting the problem.
|
1.12.2.1 |
| 14-Aug-2009 |
snj | Pull up following revision(s) (requested by dyoung in ticket #878): sbin/ifconfig/parse.c: revision 1.14 Both carp.c and vlan.c expect for a keyword with a KW_T_STR-type value to put a prop_string_t into the environment, but the keyword parser put a prop_data_t into the environment, instead. That broke the -vlanif and -carpdev keywords and defied developer expectations. Let's put a prop_string_t into the environment. Thanks to Arnaud Degroote for reporting the problem.
|
1.16.12.2 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.16.12.1 |
| 23-Jun-2013 |
tls | resync from head
|
1.16.6.1 |
| 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.18.28.1 |
| 13-Apr-2020 |
martin | Mostly merge changes from HEAD upto 20200411
|