OpenSolaris

Printable Version Enter a New Search
Bug ID 6782154
Synopsis one copy of parse_output_fields() & friends is enough.
State 10-Fix Delivered (Fix available in build)
Category:Subcategory network:dladm
Keywords
Responsible Engineer Sowmini Varadhan
Reported Against
Duplicate Of
Introduced In solaris_nevada
Commit to Fix snv_112
Fixed In snv_112
Release Fixed solaris_nevada(snv_112)
Related Bugs 6515065 , 6687693 , 6751617 , 6790184 , 6800985 , 6816102 , 6860889 , 6868083
Submit Date 8-December-2008
Last Update Date 8-April-2009
Description
The parse_output_fields() function provides support for the style of command-line
processing used by dladm and flowadm. However, instead of sharing the code,
the 2 applications needlessly cut/paste the same code. They should instead
share this function via libinetutil (from where it can also be accessed by 
other *adm commands for networking that are expected to show up in the future).

Also in the "needless" bucket, the cmdtype argument to parse_output_fields
is needless and should be dropped. 99% of the callers set this to 
and the only non-CMD_TYPE_ANY caller is from /sbin/dladm for the show-wifi
and scan-wifi functions. The wifi calls try to be clever about setting up
a common print_field_t array for both show and scan commands, and use the
cmdtype argument as a bitmask to permit/disallow arguments with the -o option
(e.g., 'dladm scan-wifi -o auth' will result in an "unrecognized arg" error)
But the sharing of a common print_field_t can be achieved in a cleaner way
that does not need the confusing cmdtype arg. See Evaluation for details.
Work Around
N/A
Comments
N/A