This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Binary output with byte granularity


I worked around this problem by doing:
_stp_printf("%4b", *w);
for outputting 4 byte data. You could probably do something similar for 1 byte data.
Mike Mason wrote:
Is there a way in SystemTap to output binary data with byte granularity? The only thing I've found is _stp_print_binary() in embedded C. That outputs in 64-bit chunks. What I'd like to do is output a buffer of raw binary data that may not be on a 64-bit boundary. In this case, it's to generate wireshark-compatible packet data from cifs.

Thanks,
Mike




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]