On Sat, Jun 14, 2008 at 1:11 PM, Henning Brauer <[EMAIL PROTECTED]> wrote: > * Toni Mueller <[EMAIL PROTECTED]> [2008-06-14 11:29]: >> Would it be possible to walk along the live table, without copying the >> table, or would the continuous stream of route inserts and deletes lead >> to a corrupted view and/or access to the wrong parts of the system's >> memory (which must to be prevented), or would this be such a >> performance hit that this is unfeasible? > > userland can walk a kernel table since when exactly? > (leave dirty /dev/mem style hacks aside)
If the kernel table is kept in an ordered state, userland could provide a "starting value" or key. The kernel can then return the requested chunk (up to the size requested) starting at the "next" table item that comes after the key. Also depends if you're willing to let netstat display routes that are may appear inconsistent. Just thinking off the top of my head for ways to avoid allocating the whole table at once. Apologies if it's too gross an API change or has other, worse repercussions. --david