fork inside ip_input

Julian Elischer julian at
Fri Jul 14 13:56:14 UTC 2006

Mykola Stryebkov wrote:

>Hi all.
>Have a strange question: is it possible to create new process (using
>fork or fork1) from inside of ip_input()?
>In kernel sources i found example of using fork1 in init_main.c but
>looking into ip_input.c i do not understand where i can get pointers to
>a thread and parent process to pass it into fork1.

you want to create a new kernel thread..

look at kthread_{xxx}
use curthread as your thread.

More information about the freebsd-hackers mailing list