sosend() and mbuf

2009-08-03 Thread Maslan
Hello Guys, I can't find useful information on sosend(), I would like to send some plain text through sosend() Here is what i got so far, I don't know how to use mbuf with sosend() to achieve this. ret = socreate(PF_INET, &s, SOCK_STREAM, IPPROTO_TCP, curthread->td_ucred, curthread);

Re: sosend() and mbuf

2009-08-03 Thread Dag-Erling Smørgrav
Maslan writes: > I can't find useful information on sosend(), I would like to send some > plain text through sosend() > Here is what i got so far, I don't know how to use mbuf with sosend() > to achieve this. You need to stick your "plain text" in an mbuf. See 'man 9 socket' and 'man 9 mbuf' for

Re: Where have all the vnodes gone?

2009-08-03 Thread Linda Messerschmidt
Sorry, I did not mean to reply off-list. (I had asked if the kernel options suggested were appropriate for a production system.) On Sat, Aug 1, 2009 at 9:34 PM, Attilio Rao wrote: > Penalties in term of overhead are pretty huge. That would probably mean not putting it on that box. Don't get me

Re: sosend() and mbuf

2009-08-03 Thread Dag-Erling Smørgrav
[please cc: the list] Maslan writes: > man 9 sosend: > Data may be sent directly from kernel or user memory via the uio > argument, or as an mbuf chain via top, avoid- ing a data copy. > Only one of the uio or top pointers may be non-NULL Hmm, I missed that part. It never occurre

sys/cdefs.h not included automatically

2009-08-03 Thread Alex Zimnitsky
Hello, freebsd-hackers my system is 7.2-RELEASE there is a which is included in a lot of headers, but a few of them instead of including it, generate "#error this file needs sys/cdefs.h". seems like an omission, but if it's intentional I'm curious why it is so. thanks a lot, Alex _

Re: sosend() and mbuf

2009-08-03 Thread Maslan
No my code doesn't work, I thought it may be because that soaccept() -which is not found in man 9- is non-blocking, so i've to put my code in a thread. Now i got another problem, when I open a text file from this thread, the kernel crashes, I'm sure that its the thread. kthread_create((void *)thre

Re: sosend() and mbuf

2009-08-03 Thread Dag-Erling Smørgrav
Maslan writes: > Now i got another problem, when I open a text file from this thread, > the kernel crashes, I'm sure that its the thread. If the kernel crashed, I assume you have a dump and a backtrace and can tell us *where* it crashed? One thing that springs to mind is that kern_open() will de

Re: sosend() and mbuf

2009-08-03 Thread Dag-Erling Smørgrav
Dag-Erling Smørgrav writes: > One thing that springs to mind is that kern_open() will dereference > td->td_proc, and AFAIK kthread_create() does not associate the thread > with a process. This is wrong, and contradicts what I wrote further down. Just ignore it. DES -- Dag-Erling Smørgrav - d..

Re: sosend() and mbuf

2009-08-03 Thread Maslan
I'm running out 7.2-RELEASE-p2 Here is my bt GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see

Re: sosend() and mbuf

2009-08-03 Thread Max Laier
On Tuesday 04 August 2009 00:03:40 Dag-Erling Smørgrav wrote: > Dag-Erling Smørgrav writes: > > One thing that springs to mind is that kern_open() will dereference > > td->td_proc, and AFAIK kthread_create() does not associate the thread > > with a process. > > This is wrong, and contradicts what

Re: sys/cdefs.h not included automatically

2009-08-03 Thread Carlos A. M. dos Santos
On Mon, Aug 3, 2009 at 4:56 PM, Alex Zimnitsky wrote: > Hello, freebsd-hackers > > my system is 7.2-RELEASE > > there is a which is included in a lot of headers, but a > few of them instead of including it, generate "#error this file needs > sys/cdefs.h". > > seems like an omission, but if it's in