Date: Mon, 14 May 2001 23:24:07 +0400 (MSD) From: "Roman V. Palagin" <romanp@unshadow.net> To: <freebsd-hackers@freebsd.org> Subject: How to transfer data from netgraph node to user program? Message-ID: <Pine.SOL.4.33.0105142254130.3484-100000@abyss.unshadow.net>
next in thread | raw e-mail | index | archive | help
Hello! I've wrote netgraph node which collects some information from network. Now I want to transfer collected data into user program. I've NGM_XXX_STAT message which initiates data transfer and program which uses libnetgraph to communicate with node. When I send NGM_XXX_STAT message node must starts data transfer but I don't know exactly how much data should be transfered so I can't use synhronous reply. Also, NgSendMsg(..., NGM_XXX_STAT, ...) doesn't return until handler of NGM_XXX_STAT is finished, so I can't use ng_send_msg() in NGM_XXX_STAT handler - nobody will read sended messages and I finished up with "No buffer space available". The question is: how I can initiate smth. like asynchronous reply (so I can get data via NgRecvMsg later in my prgram)? Or I'm going wrong way and should use another scheme for data transfer? Data size ranges from 10Kb to 500Kb. - Roman --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.4.33.0105142254130.3484-100000>