> > > Regarding the readability of mdb output for IP address types, it seems
> > > like that's a more general problem. Is there a way to get mdb to
> > > pretty-print IP address types across the board?
> >
> > mdb_printf() supports %I
>
> Maybe I'm showing a hole in my mdb knowledge, but I'm actually wondering
> about how mdb prints in_addr_t, ipaddr_t, and in6_addr_t by default
> with ::print. For example, could it potentially print
> "fe80::214:4fff:fe01:926c" instead of:
>
> {
> ire_u.ire6_u.ire6_addr._S6_un = {
> _S6_u32 = [ 0x80fe, 0, 0xff4f1402, 0x6c9201fe ]
> _S6_u8 = [ 0xfe, 0x80, 0, 0, 0, 0, 0, 0, 0x2, 0x14, 0x4f, 0xff,
> 0xfe,
> 0x1, 0x92, 0x6c ]
> __S6_align = 0x80fe
> }
> }
Yes, that would just be a matter of adding some additional checks to the
print_*_val() logic in mdb_print.c. See for instance the existing
handling of time_t in print_int_val().
--
meem
_______________________________________________
networking-discuss mailing list
[email protected]