On Mon, 23 Oct 2006 17:44:24 -0700 Ben Greear wrote:

> Since IOCTLs are out of favor these days, what would be
> a preferred way to get a block of binary data out of the
> kernel?
> 
> I just want to grab a stats structure (well-aligned 32 and 64-bit counters
> and fixed-length strings) for a pktgen interface.
> 
> Can you do this with seq-files somehow?

seq-files just use printk() for text output.  Not well-suited
to binary output.

Similarly, sysfs is desirable in some circumstances, but
not for blocks of binary data.

ioctls or netlink or debugfs or relay output (see how blktrace
uses relay output) are your choices (I may have missed some. :)
ioctls can be OK for some purposes.  If you want to avoid them,
try debugfs or relay.  (I haven't looked at debugfs very much;
it may be more text-oriented also...)

---
~Randy
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to