> I'm coalescing all the output parsing code in dladm, flowadm, ipmpstat
 > into shared code in libinetutil as part of  my fix for
 > "6782154 one copy of parse_output_fields() & friends is enough."
 > and looking for suggestions on what would be a user-friendly prefix
 > for this family of functions. The existing convention in 
 > libinetutil is to use the 'iu_' prefix (e.g., iu_eh_create,
 > iu_cancel_timer etc.) but calling my functions 
 > iu_print_open(), iu_print_output(), iu_print_close(), 
 > and passing around structures like iu_print_field_t between
 > the user and library seems a bit clumsy (or at least, hard to
 > pronounce :-)). Any better suggestions?

I used ofmt_ (for output format) for the ones in ipmpstat.  Admittedly
it's not immediately pronouncable (I say "o-format"), though "fmt" is a
well-established abbreviation for "format".  oformat_() might be
preferable if we're willing to trade some line wraps for spoken clarity.

I don't know why some of the routines as libinetutil sprouted iu_
prefixes; it seems unfortunate as there were already clear conventions
(e.g., eh_ and tq_ for the event handler and timer queue objects I wrote
forever ago) and further it was not consistently applied (such a
ifparse_ifspec()).  I've ignored that convention when adding to
libinetutil (witness ifaddrlistx()).

As an aside, there's not really anything networking-specific about these
output format routines, so libinetutil seems more of a rest stop than a
final destination.

-- 
meem

Reply via email to